@feardread/feature-factory 5.1.1 → 5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var version=function(e){"use strict";function t(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var r=()=>Math.random().toString(36).substring(7).split("").join("."),n={INIT:`@@redux/INIT${r()}`,REPLACE:`@@redux/REPLACE${r()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${r()}`};function o(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function a(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function i(e,t,r,a){const i=Object.keys(t),s=r&&r.type===n.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===i.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!o(e))return`The ${s} has unexpected type of "${function(e){let t=typeof e;return"production"!==process.env.NODE_ENV&&(t=function(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const r=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}(e)),t}(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const c=Object.keys(e).filter(e=>!t.hasOwnProperty(e)&&!a[e]);return c.forEach(e=>{a[e]=!0}),r&&r.type===n.REPLACE?void 0:c.length>0?`Unexpected ${c.length>1?"keys":"key"} "${c.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`:void 0}function s(e){const r=Object.keys(e),o={};for(let t=0;t<r.length;t++){const n=r[t];"production"!==process.env.NODE_ENV&&void 0===e[n]&&a(`No reducer provided for key "${n}"`),"function"==typeof e[n]&&(o[n]=e[n])}const s=Object.keys(o);let c,u;"production"!==process.env.NODE_ENV&&(c={});try{!function(e){Object.keys(e).forEach(r=>{const o=e[r];if(void 0===o(void 0,{type:n.INIT}))throw new Error("production"===process.env.NODE_ENV?t(12):`The slice reducer for key "${r}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===o(void 0,{type:n.PROBE_UNKNOWN_ACTION()}))throw new Error("production"===process.env.NODE_ENV?t(13):`The slice reducer for key "${r}" returned undefined when probed with a random type. Don't try to handle '${n.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}(o)}catch(e){u=e}return function(e={},r){if(u)throw u;if("production"!==process.env.NODE_ENV){const t=i(e,o,r,c);t&&a(t)}let n=!1;const l={};for(let a=0;a<s.length;a++){const i=s[a],c=o[i],u=e[i],d=c(u,r);if(void 0===d){const e=r&&r.type;throw new Error("production"===process.env.NODE_ENV?t(14):`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${i}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}l[i]=d,n=n||d!==u}return n=n||s.length!==Object.keys(e).length,n?l:e}}function c(e){return o(e)&&"type"in e&&"string"==typeof e.type}var u=Symbol.for("immer-nothing"),l=Symbol.for("immer-draftable"),d=Symbol.for("immer-state"),f="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function p(e,...t){if("production"!==process.env.NODE_ENV){const r=f[e],n="function"==typeof r?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var y=Object.getPrototypeOf;function h(e){return!!e&&!!e[d]}function m(e){return!!e&&(b(e)||Array.isArray(e)||!!e[l]||!!e.constructor?.[l]||_(e)||A(e))}var g=Object.prototype.constructor.toString();function b(e){if(!e||"object"!=typeof e)return!1;const t=y(e);if(null===t)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===g}function v(e,t){0===w(e)?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function w(e){const t=e[d];return t?t.type_:Array.isArray(e)?1:_(e)?2:A(e)?3:0}function S(e,t){return 2===w(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function E(e,t){return 2===w(e)?e.get(t):e[t]}function O(e,t,r){const n=w(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function _(e){return e instanceof Map}function A(e){return e instanceof Set}function R(e){return e.copy_||e.base_}function T(e,t){if(_(e))return new Map(e);if(A(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=b(e);if(!0===t||"class_only"===t&&!r){const t=Object.getOwnPropertyDescriptors(e);delete t[d];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const o=r[n],a=t[o];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(y(e),t)}{const t=y(e);if(null!==t&&r)return{...e};const n=Object.create(t);return Object.assign(n,e)}}function P(e,t=!1){return j(e)||h(e)||!m(e)||(w(e)>1&&Object.defineProperties(e,{set:{value:k},add:{value:k},clear:{value:k},delete:{value:k}}),Object.freeze(e),t&&Object.values(e).forEach(e=>P(e,!0))),e}function k(){p(2)}function j(e){return Object.isFrozen(e)}var C,N={};function I(e){const t=N[e];return t||p(0,e),t}function x(){return C}function D(e,t){t&&(I("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function M(e){q(e),e.drafts_.forEach(U),e.drafts_=null}function q(e){e===C&&(C=e.parent_)}function F(e){return C={drafts_:[],parent_:C,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function U(e){const t=e[d];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function L(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[d].modified_&&(M(t),p(4)),m(e)&&(e=$(t,e),t.parent_||B(t,e)),t.patches_&&I("Patches").generateReplacementPatches_(r[d].base_,e,t.patches_,t.inversePatches_)):e=$(t,r,[]),M(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==u?e:void 0}function $(e,t,r){if(j(t))return t;const n=t[d];if(!n)return v(t,(o,a)=>Q(e,n,t,o,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return B(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let o=t,a=!1;3===n.type_&&(o=new Set(t),t.clear(),a=!0),v(o,(o,i)=>Q(e,n,t,o,i,r,a)),B(e,t,!1),r&&e.patches_&&I("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Q(e,t,r,n,o,a,i){if("production"!==process.env.NODE_ENV&&o===r&&p(5),h(o)){const i=$(e,o,a&&t&&3!==t.type_&&!S(t.assigned_,n)?a.concat(n):void 0);if(O(r,n,i),!h(i))return;e.canAutoFreeze_=!1}else i&&r.add(o);if(m(o)&&!j(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$(e,o),t&&t.scope_.parent_||"symbol"==typeof n||!(_(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))||B(e,o)}}function B(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&P(t,r)}var z={get(e,t){if(t===d)return e;const r=R(e);if(!S(r,t))return function(e,t,r){const n=H(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}(e,r,t);const n=r[t];return e.finalized_||!m(n)?n:n===K(e.base_,t)?(G(e),e.copy_[t]=J(n,e)):n},has:(e,t)=>t in R(e),ownKeys:e=>Reflect.ownKeys(R(e)),set(e,t,r){const n=H(R(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=K(R(e),t),i=n?.[d];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(((o=r)===(a=n)?0!==o||1/o==1/a:o!=o&&a!=a)&&(void 0!==r||S(e.base_,t)))return!0;G(e),W(e)}var o,a;return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==K(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,G(e),W(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=R(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){p(11)},getPrototypeOf:e=>y(e.base_),setPrototypeOf(){p(12)}},V={};function K(e,t){const r=e[d];return(r?R(r):e)[t]}function H(e,t){if(!(t in e))return;let r=y(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=y(r)}}function W(e){e.modified_||(e.modified_=!0,e.parent_&&W(e.parent_))}function G(e){e.copy_||(e.copy_=T(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function J(e,t){const r=_(e)?I("MapSet").proxyMap_(e,t):A(e)?I("MapSet").proxySet_(e,t):function(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:x(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=z;r&&(o=[n],a=V);const{revoke:i,proxy:s}=Proxy.revocable(o,a);return n.draft_=s,n.revoke_=i,s}(e,t);return(t?t.scope_:x()).drafts_.push(r),r}function Y(e){return h(e)||p(10,e),X(e)}function X(e){if(!m(e)||j(e))return e;const t=e[d];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=T(e,t.scope_.immer_.useStrictShallowCopy_)}else r=T(e,!0);return v(r,(e,t)=>{O(r,e,X(t))}),t&&(t.finalized_=!1),r}function Z(){"production"!==process.env.NODE_ENV&&f.push('Sets cannot have "replace" patches.',function(e){return"Unsupported patch operation: "+e},function(e){return"Cannot apply patch, path doesn't resolve: "+e},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");const e="replace",t="add",r="remove";function n(e){if(!m(e))return e;if(Array.isArray(e))return e.map(n);if(_(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,n(t)]));if(A(e))return new Set(Array.from(e).map(n));const t=Object.create(y(e));for(const r in e)t[r]=n(e[r]);return S(e,l)&&(t[l]=e[l]),t}function o(e){return h(e)?n(e):e}!function(e,t){N[e]||(N[e]=t)}("Patches",{applyPatches_:function(o,a){return a.forEach(a=>{const{path:i,op:s}=a;let c=o;for(let e=0;e<i.length-1;e++){const t=w(c);let r=i[e];"string"!=typeof r&&"number"!=typeof r&&(r=""+r),0!==t&&1!==t||"__proto__"!==r&&"constructor"!==r||p(19),"function"==typeof c&&"prototype"===r&&p(19),c=E(c,r),"object"!=typeof c&&p(18,i.join("/"))}const u=w(c),l=n(a.value),d=i[i.length-1];switch(s){case e:switch(u){case 2:return c.set(d,l);case 3:p(16);default:return c[d]=l}case t:switch(u){case 1:return"-"===d?c.push(l):c.splice(d,0,l);case 2:return c.set(d,l);case 3:return c.add(l);default:return c[d]=l}case r:switch(u){case 1:return c.splice(d,1);case 2:return c.delete(d);case 3:return c.delete(a.value);default:return delete c[d]}default:p(17,s)}}),o},generatePatches_:function(n,a,i,s){switch(n.type_){case 0:case 2:return function(n,a,i,s){const{base_:c,copy_:u}=n;v(n.assigned_,(n,l)=>{const d=E(c,n),f=E(u,n),p=l?S(c,n)?e:t:r;if(d===f&&p===e)return;const y=a.concat(n);i.push(p===r?{op:p,path:y}:{op:p,path:y,value:f}),s.push(p===t?{op:r,path:y}:p===r?{op:t,path:y,value:o(d)}:{op:e,path:y,value:o(d)})})}(n,a,i,s);case 1:return function(n,a,i,s){let{base_:c,assigned_:u}=n,l=n.copy_;l.length<c.length&&([c,l]=[l,c],[i,s]=[s,i]);for(let t=0;t<c.length;t++)if(u[t]&&l[t]!==c[t]){const r=a.concat([t]);i.push({op:e,path:r,value:o(l[t])}),s.push({op:e,path:r,value:o(c[t])})}for(let e=c.length;e<l.length;e++){const r=a.concat([e]);i.push({op:t,path:r,value:o(l[e])})}for(let e=l.length-1;c.length<=e;--e){const t=a.concat([e]);s.push({op:r,path:t})}}(n,a,i,s);case 3:return function(e,n,o,a){let{base_:i,copy_:s}=e,c=0;i.forEach(e=>{if(!s.has(e)){const i=n.concat([c]);o.push({op:r,path:i,value:e}),a.unshift({op:t,path:i,value:e})}c++}),c=0,s.forEach(e=>{if(!i.has(e)){const i=n.concat([c]);o.push({op:t,path:i,value:e}),a.unshift({op:r,path:i,value:e})}c++})}(n,a,i,s)}},generateReplacementPatches_:function(t,r,n,o){n.push({op:e,path:[],value:r===u?void 0:r}),o.push({op:e,path:[],value:t})}})}v(z,(e,t)=>{V[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),V.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&p(13),V.set.call(this,e,t,void 0)},V.set=function(e,t,r){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&p(14),z.set.call(this,e[0],t,r,e[0])};var ee=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...o){return n.produce(e,e=>t.call(this,e,...o))}}let n;if("function"!=typeof t&&p(6),void 0!==r&&"function"!=typeof r&&p(7),m(e)){const o=F(this),a=J(e,void 0);let i=!0;try{n=t(a),i=!1}finally{i?M(o):q(o)}return D(o,r),L(n,o)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===u&&(n=void 0),this.autoFreeze_&&P(n,!0),r){const t=[],o=[];I("Patches").generateReplacementPatches_(e,n,t,o),r(t,o)}return n}p(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,t=>e(t,...r));let r,n;return[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){m(e)||p(8),h(e)&&(e=Y(e));const t=F(this),r=J(e,void 0);return r[d].isManual_=!0,q(t),r}finishDraft(e,t){const r=e&&e[d];r&&r.isManual_||p(9);const{scope_:n}=r;return D(n,t),L(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=I("Patches").applyPatches_;return h(e)?n(e,t):this.produce(e,e=>n(e,t))}},te=ee.produce,re=ee.produceWithPatches.bind(ee),ne=ee.applyPatches.bind(ee),oe=(e,t,r)=>{if(1===t.length&&t[0]===r){let r=!1;try{const t={};e(t)===t&&(r=!0)}catch{}if(r){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}}},ae=(e,t,r)=>{const{memoize:n,memoizeOptions:o}=t,{inputSelectorResults:a,inputSelectorResultsCopy:i}=e,s=n(()=>({}),...o);if(s.apply(null,a)!==s.apply(null,i)){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:r,firstInputs:a,secondInputs:i,stack:e})}},ie={inputStabilityCheck:"once",identityFunctionCheck:"once"},se=e=>Array.isArray(e)?e:[e];function ce(e,t){const r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var ue="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function le(){return{s:0,v:void 0,o:null,p:null}}function de(e,t={}){let r={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:n}=t;let o,a=0;function i(){let t=r;const{length:i}=arguments;for(let e=0,r=i;e<r;e++){const r=arguments[e];if("function"==typeof r||"object"==typeof r&&null!==r){let e=t.o;null===e&&(t.o=e=new WeakMap);const n=e.get(r);void 0===n?(t=le(),e.set(r,t)):t=n}else{let e=t.p;null===e&&(t.p=e=new Map);const n=e.get(r);void 0===n?(t=le(),e.set(r,t)):t=n}}const s=t;let c;if(1===t.s)c=t.v;else if(c=e.apply(null,arguments),a++,n){const e=o?.deref?.()??o;null!=e&&n(e,c)&&(c=e,0!==a&&a--),o="object"==typeof c&&null!==c||"function"==typeof c?new ue(c):c}return s.s=1,s.v=c,c}return i.clearCache=()=>{r={s:0,v:void 0,o:null,p:null},i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function fe(e,...t){const r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,n=(...e)=>{let t,n=0,o=0,a={},i=e.pop();"object"==typeof i&&(a=i,i=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const s={...r,...a},{memoize:c,memoizeOptions:u=[],argsMemoize:l=de,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=se(u),y=se(d),h=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${r}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),m=c(function(){return n++,i.apply(null,arguments)},...p);let g=!0;const b=l(function(){o++;const e=ce(h,arguments);if(t=m.apply(null,e),"production"!==process.env.NODE_ENV){const{identityFunctionCheck:r,inputStabilityCheck:n}=((e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...ie,...t};return{identityFunctionCheck:{shouldRun:"always"===r||"once"===r&&e,run:oe},inputStabilityCheck:{shouldRun:"always"===n||"once"===n&&e,run:ae}}})(g,f);if(r.shouldRun&&r.run(i,e,t),n.shouldRun){const t=ce(h,arguments);n.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:c,memoizeOptions:p},arguments)}g&&(g=!1)}return t},...y);return Object.assign(b,{resultFunc:i,memoizedResultFunc:m,dependencies:h,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>n,resetRecomputations:()=>{n=0},memoize:c,argsMemoize:l})};return Object.assign(n,{withTypes:()=>n}),n}var pe=fe(de),ye=Object.assign((e,t=pe)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const r=Object.keys(e);return t(r.map(t=>e[t]),(...e)=>e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>ye}),he=((...e)=>{const t=fe(...e),r=Object.assign((...e)=>{const r=t(...e),n=(e,...t)=>r(h(e)?Y(e):e,...t);return Object.assign(n,r),n},{withTypes:()=>r});return r})(de);function me(e,t){function r(...r){if(t){let n=t(...r);if(!n)throw new Error("production"===process.env.NODE_ENV?tt(0):"prepareAction did not return an object");return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:r[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>c(t)&&t.type===e,r}function ge(e){return["type","payload","error","meta"].indexOf(e)>-1}function be(e){return m(e)?te(e,()=>{}):e}function ve(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var we="RTK_autoBatch",Se=()=>e=>({payload:e,meta:{[we]:!0}});function Ee(e){const t={},r=[];let n;const o={addCase(e,a){if("production"!==process.env.NODE_ENV){if(r.length>0)throw new Error("production"===process.env.NODE_ENV?tt(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error("production"===process.env.NODE_ENV?tt(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const i="string"==typeof e?e:e.type;if(!i)throw new Error("production"===process.env.NODE_ENV?tt(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error("production"===process.env.NODE_ENV?tt(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${i}'`);return t[i]=a,o},addAsyncThunk(e,a){if("production"!==process.env.NODE_ENV&&n)throw new Error("production"===process.env.NODE_ENV?tt(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[e.pending.type]=a.pending),a.rejected&&(t[e.rejected.type]=a.rejected),a.fulfilled&&(t[e.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:e.settled,reducer:a.settled}),o},addMatcher(e,t){if("production"!==process.env.NODE_ENV&&n)throw new Error("production"===process.env.NODE_ENV?tt(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:e,reducer:t}),o},addDefaultCase(e){if("production"!==process.env.NODE_ENV&&n)throw new Error("production"===process.env.NODE_ENV?tt(31):"`builder.addDefaultCase` can only be called once");return n=e,o}};return e(o),[t,r,n]}var Oe=(e,t)=>{return(r=e)&&"function"==typeof r.match?e.match(t):e(t);var r};function _e(...e){return t=>e.some(e=>Oe(e,t))}function Ae(...e){return t=>e.every(e=>Oe(e,t))}function Re(e,t){if(!e||!e.meta)return!1;const r="string"==typeof e.meta.requestId,n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Te(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Pe(...e){return 0===e.length?e=>Re(e,["pending"]):Te(e)?_e(...e.map(e=>e.pending)):Pe()(e[0])}function ke(...e){return 0===e.length?e=>Re(e,["rejected"]):Te(e)?_e(...e.map(e=>e.rejected)):ke()(e[0])}function je(...e){return 0===e.length||Te(e)?Ae(ke(...e),e=>e&&e.meta&&e.meta.rejectedWithValue):je()(e[0])}function Ce(...e){return 0===e.length?e=>Re(e,["fulfilled"]):Te(e)?_e(...e.map(e=>e.fulfilled)):Ce()(e[0])}function Ne(...e){return 0===e.length?e=>Re(e,["pending","fulfilled","rejected"]):Te(e)?_e(...e.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):Ne()(e[0])}var Ie=(e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},xe=["name","message","stack","code"],De=class{constructor(e,t){this.payload=e,this.meta=t}_type},Me=class{constructor(e,t){this.payload=e,this.meta=t}_type},qe=e=>{if("object"==typeof e&&null!==e){const t={};for(const r of xe)"string"==typeof e[r]&&(t[r]=e[r]);return t}return{message:String(e)}},Fe="External signal was aborted",Ue=(()=>{function e(e,t,r){const n=me(e+"/fulfilled",(e,t,r,n)=>({payload:e,meta:{...n||{},arg:r,requestId:t,requestStatus:"fulfilled"}})),o=me(e+"/pending",(e,t,r)=>({payload:void 0,meta:{...r||{},arg:t,requestId:e,requestStatus:"pending"}})),a=me(e+"/rejected",(e,t,n,o,a)=>({payload:o,error:(r&&r.serializeError||qe)(e||"Rejected"),meta:{...a||{},arg:n,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:i}={}){return(s,c,u)=>{const l=r?.idGenerator?r.idGenerator(e):Ie(),d=new AbortController;let f,p;function y(e){p=e,d.abort()}i&&(i.aborted?y(Fe):i.addEventListener("abort",()=>y(Fe),{once:!0}));const h=async function(){let i;try{let a=r?.condition?.(e,{getState:c,extra:u});if(null!==(h=a)&&"object"==typeof h&&"function"==typeof h.then&&(a=await a),!1===a||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const m=new Promise((e,t)=>{f=()=>{t({name:"AbortError",message:p||"Aborted"})},d.signal.addEventListener("abort",f)});s(o(l,e,r?.getPendingMeta?.({requestId:l,arg:e},{getState:c,extra:u}))),i=await Promise.race([m,Promise.resolve(t(e,{dispatch:s,getState:c,extra:u,requestId:l,signal:d.signal,abort:y,rejectWithValue:(e,t)=>new De(e,t),fulfillWithValue:(e,t)=>new Me(e,t)})).then(t=>{if(t instanceof De)throw t;return t instanceof Me?n(t.payload,l,e,t.meta):n(t,l,e)})])}catch(t){i=t instanceof De?a(null,l,e,t.payload,t.meta):a(t,l,e)}finally{f&&d.signal.removeEventListener("abort",f)}var h;return r&&!r.dispatchConditionRejection&&a.match(i)&&i.meta.condition||s(i),i}();return Object.assign(h,{abort:y,requestId:l,arg:e,unwrap:()=>h.then(Le)})}},{pending:o,rejected:a,fulfilled:n,settled:_e(a,n),typePrefix:e})}return e.withTypes=()=>e,e})();function Le(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var $e=Symbol.for("rtk-slice-createasyncthunk");function Qe(e,t){return`${e}/${t}`}function Be(e,t,r,n){function o(o,...a){let i=t(o);if(void 0===i)if(n)i=r();else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?tt(16):"selectState returned undefined for an uninjected slice reducer");return e(i,...a)}return o.unwrapped=e,o}var ze=function({creators:e}={}){const t=e?.asyncThunk?.[$e];return function(e){const{name:r,reducerPath:n=r}=e;if(!r)throw new Error("production"===process.env.NODE_ENV?tt(11):"`name` is a required option for createSlice");"undefined"!=typeof process&&"development"===process.env.NODE_ENV&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},a=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const r="string"==typeof e?e:e.type;if(!r)throw new Error("production"===process.env.NODE_ENV?tt(12):"`context.addCase` cannot be called with an empty action type");if(r in i.sliceCaseReducersByType)throw new Error("production"===process.env.NODE_ENV?tt(13):"`context.addCase` cannot be called with two reducers for the same action type: "+r);return i.sliceCaseReducersByType[r]=t,s},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(i.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,s)};function c(){if("production"!==process.env.NODE_ENV&&"object"==typeof e.extraReducers)throw new Error("production"===process.env.NODE_ENV?tt(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},r=[],n]="function"==typeof e.extraReducers?Ee(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return function(e,t){process.env.NODE_ENV;let r,[n,o,a]=Ee(t);if("function"==typeof e)r=()=>be(e());else{const t=be(e);r=()=>t}function i(e=r(),t){let i=[n[t.type],...o.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===i.filter(e=>!!e).length&&(i=[a]),i.reduce((e,r)=>{if(r){if(h(e)){const n=r(e,t);return void 0===n?e:n}if(m(e))return te(e,e=>r(e,t));{const n=r(e,t);if(void 0===n){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}}return e},e)}return i.getInitialState=r,i}(e.initialState,e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}a.forEach(n=>{const a=o[n],i={reducerName:n,type:Qe(r,n),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(a)?function({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(n))throw new Error("production"===process.env.NODE_ENV?tt(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=n.reducer,i=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?me(e,i):me(e))}(i,a,s):function({type:e,reducerName:t},r,n,o){if(!o)throw new Error("production"===process.env.NODE_ENV?tt(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:i,pending:s,rejected:c,settled:u,options:l}=r,d=o(e,a,l);n.exposeAction(t,d),i&&n.addCase(d.fulfilled,i),s&&n.addCase(d.pending,s),c&&n.addCase(d.rejected,c),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:i||Ve,pending:s||Ve,rejected:c||Ve,settled:u||Ve})}(i,a,s,t)});const u=e=>e,l=new Map,d=new WeakMap;let f;function p(e,t){return f||(f=c()),f(e,t)}function y(){return f||(f=c()),f.getInitialState()}function g(t,r=!1){function n(e){let o=e[t];if(void 0===o)if(r)o=ve(d,n,y);else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?tt(15):"selectSlice returned undefined for an uninjected slice reducer");return o}function o(t=u){const n=ve(l,r,()=>new WeakMap);return ve(n,t,()=>{const n={};for(const[o,a]of Object.entries(e.selectors??{}))n[o]=Be(a,t,()=>ve(d,t,y),r);return n})}return{reducerPath:t,getSelectors:o,get selectors(){return o(n)},selectSlice:n}}const b={name:r,reducer:p,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:y,...g(n),injectInto(e,{reducerPath:t,...r}={}){const o=t??n;return e.inject({reducerPath:o,reducer:p},r),{...b,...g(o,!0)}}};return b}}();function Ve(){}var Ke=h;function He(e){const t=We((t,r)=>e(r));return function(e){return t(e,void 0)}}function We(e){return function(t,r){const n=t=>{!function(e){return c(t=e)&&Object.keys(t).every(ge);var t}(r)?e(r,t):e(r.payload,t)};return Ke(t)?(n(t),t):te(t,n)}}function Ge(e,t){const r=t(e);return"production"!==process.env.NODE_ENV&&void 0===r&&console.warn("The entity passed to the `selectId` implementation returned undefined.","You should probably provide your own `selectId` implementation.","The entity that was passed:",e,"The `selectId` implementation:",t.toString()),r}function Je(e){return Array.isArray(e)||(e=Object.values(e)),e}function Ye(e){return h(e)?Y(e):e}function Xe(e,t,r){e=Je(e);const n=Ye(r.ids),o=new Set(n),a=[],i=new Set([]),s=[];for(const r of e){const e=Ge(r,t);o.has(e)||i.has(e)?s.push({id:e,changes:r}):(i.add(e),a.push(r))}return[a,s,n]}function Ze(e){function t(t,r){const n=Ge(t,e);n in r.entities||(r.ids.push(n),r.entities[n]=t)}function r(e,r){e=Je(e);for(const n of e)t(n,r)}function n(t,r){const n=Ge(t,e);n in r.entities||r.ids.push(n),r.entities[n]=t}function o(e,t){let r=!1;e.forEach(e=>{e in t.entities&&(delete t.entities[e],r=!0)}),r&&(t.ids=t.ids.filter(e=>e in t.entities))}function a(t,r){const n={},o={};if(t.forEach(e=>{e.id in r.entities&&(o[e.id]={id:e.id,changes:{...o[e.id]?.changes,...e.changes}})}),(t=Object.values(o)).length>0){const o=t.filter(t=>function(t,r,n){const o=n.entities[r.id];if(void 0===o)return!1;const a=Object.assign({},o,r.changes),i=Ge(a,e),s=i!==r.id;return s&&(t[r.id]=i,delete n.entities[r.id]),n.entities[i]=a,s}(n,t,r)).length>0;o&&(r.ids=Object.values(r.entities).map(t=>Ge(t,e)))}}function i(t,n){const[o,i]=Xe(t,e,n);r(o,n),a(i,n)}return{removeAll:He(function(e){Object.assign(e,{ids:[],entities:{}})}),addOne:We(t),addMany:We(r),setOne:We(n),setMany:We(function(e,t){e=Je(e);for(const r of e)n(r,t)}),setAll:We(function(e,t){e=Je(e),t.ids=[],t.entities={},r(e,t)}),updateOne:We(function(e,t){return a([e],t)}),updateMany:We(a),upsertOne:We(function(e,t){return i([e],t)}),upsertMany:We(i),removeOne:We(function(e,t){return o([e],t)}),removeMany:We(o)}}function et(e,t,r){const n=function(e,t,r){let n=0,o=e.length;for(;n<o;){let a=n+o>>>1;r(t,e[a])>=0?n=a+1:o=a}return n}(e,t,r);return e.splice(n,0,t),e}function tt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function rt(e,t){return function(){return e.apply(t,arguments)}}const{toString:nt}=Object.prototype,{getPrototypeOf:ot}=Object,{iterator:at,toStringTag:it}=Symbol,st=(e=>t=>{const r=nt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ct=e=>(e=e.toLowerCase(),t=>st(t)===e),ut=e=>t=>typeof t===e,{isArray:lt}=Array,dt=ut("undefined");function ft(e){return null!==e&&!dt(e)&&null!==e.constructor&&!dt(e.constructor)&&ht(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const pt=ct("ArrayBuffer"),yt=ut("string"),ht=ut("function"),mt=ut("number"),gt=e=>null!==e&&"object"==typeof e,bt=e=>{if("object"!==st(e))return!1;const t=ot(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||it in e||at in e)},vt=ct("Date"),wt=ct("File"),St=ct("Blob"),Et=ct("FileList"),Ot=ct("URLSearchParams"),[_t,At,Rt,Tt]=["ReadableStream","Request","Response","Headers"].map(ct);function Pt(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),lt(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(ft(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let i;for(n=0;n<a;n++)i=o[n],t.call(null,e[i],i,e)}}function kt(e,t){if(ft(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const jt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ct=e=>!dt(e)&&e!==jt,Nt=(It="undefined"!=typeof Uint8Array&&ot(Uint8Array),e=>It&&e instanceof It);var It;const xt=ct("HTMLFormElement"),Dt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Mt=ct("RegExp"),qt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Pt(r,(r,o)=>{let a;!1!==(a=t(r,o,e))&&(n[o]=a||r)}),Object.defineProperties(e,n)},Ft=ct("AsyncFunction"),Ut=(Lt="function"==typeof setImmediate,$t=ht(jt.postMessage),Lt?setImmediate:$t?(Qt=`axios@${Math.random()}`,Bt=[],jt.addEventListener("message",({source:e,data:t})=>{e===jt&&t===Qt&&Bt.length&&Bt.shift()()},!1),e=>{Bt.push(e),jt.postMessage(Qt,"*")}):e=>setTimeout(e));var Lt,$t,Qt,Bt;const zt="undefined"!=typeof queueMicrotask?queueMicrotask.bind(jt):"undefined"!=typeof process&&process.nextTick||Ut;var Vt={isArray:lt,isArrayBuffer:pt,isBuffer:ft,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ht(e.append)&&("formdata"===(t=st(e))||"object"===t&&ht(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&pt(e.buffer),t},isString:yt,isNumber:mt,isBoolean:e=>!0===e||!1===e,isObject:gt,isPlainObject:bt,isEmptyObject:e=>{if(!gt(e)||ft(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:_t,isRequest:At,isResponse:Rt,isHeaders:Tt,isUndefined:dt,isDate:vt,isFile:wt,isBlob:St,isRegExp:Mt,isFunction:ht,isStream:e=>gt(e)&&ht(e.pipe),isURLSearchParams:Ot,isTypedArray:Nt,isFileList:Et,forEach:Pt,merge:function e(){const{caseless:t,skipUndefined:r}=Ct(this)&&this||{},n={},o=(o,a)=>{const i=t&&kt(n,a)||a;bt(n[i])&&bt(o)?n[i]=e(n[i],o):bt(o)?n[i]=e({},o):lt(o)?n[i]=o.slice():r&&dt(o)||(n[i]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Pt(arguments[e],o);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(Pt(t,(t,n)=>{r&&ht(t)?e[n]=rt(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,a,i;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],n&&!n(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==r&&ot(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:st,kindOfTest:ct,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(lt(e))return e;let t=e.length;if(!mt(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[at]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:xt,hasOwnProperty:Dt,hasOwnProp:Dt,reduceDescriptors:qt,freezeMethods:e=>{qt(e,(t,r)=>{if(ht(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];ht(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return lt(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:kt,global:jt,isContextDefined:Ct,isSpecCompliantForm:function(e){return!!(e&&ht(e.append)&&"FormData"===e[it]&&e[at])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(gt(e)){if(t.indexOf(e)>=0)return;if(ft(e))return e;if(!("toJSON"in e)){t[n]=e;const o=lt(e)?[]:{};return Pt(e,(e,t)=>{const a=r(e,n+1);!dt(a)&&(o[t]=a)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:Ft,isThenable:e=>e&&(gt(e)||ht(e))&&ht(e.then)&&ht(e.catch),setImmediate:Ut,asap:zt,isIterable:e=>null!=e&&ht(e[at])};function Kt(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Vt.inherits(Kt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Vt.toJSONObject(this.config),code:this.code,status:this.status}}});const Ht=Kt.prototype,Wt={};function Gt(e){return Vt.isPlainObject(e)||Vt.isArray(e)}function Jt(e){return Vt.endsWith(e,"[]")?e.slice(0,-2):e}function Yt(e,t,r){return e?e.concat(t).map(function(e,t){return e=Jt(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Wt[e]={value:e}}),Object.defineProperties(Kt,Wt),Object.defineProperty(Ht,"isAxiosError",{value:!0}),Kt.from=(e,t,r,n,o,a)=>{const i=Object.create(Ht);Vt.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Kt.call(i,s,c,r,n,o),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",a&&Object.assign(i,a),i};const Xt=Vt.toFlatObject(Vt,{},null,function(e){return/^is[A-Z]/.test(e)});function Zt(e,t,r){if(!Vt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Vt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Vt.isUndefined(t[e])})).metaTokens,o=r.visitor||u,a=r.dots,i=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Vt.isSpecCompliantForm(t);if(!Vt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Vt.isDate(e))return e.toISOString();if(Vt.isBoolean(e))return e.toString();if(!s&&Vt.isBlob(e))throw new Kt("Blob is not supported. Use a Buffer instead.");return Vt.isArrayBuffer(e)||Vt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(Vt.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Vt.isArray(e)&&function(e){return Vt.isArray(e)&&!e.some(Gt)}(e)||(Vt.isFileList(e)||Vt.endsWith(r,"[]"))&&(s=Vt.toArray(e)))return r=Jt(r),s.forEach(function(e,n){!Vt.isUndefined(e)&&null!==e&&t.append(!0===i?Yt([r],n,a):null===i?r:r+"[]",c(e))}),!1;return!!Gt(e)||(t.append(Yt(o,r,a),c(e)),!1)}const l=[],d=Object.assign(Xt,{defaultVisitor:u,convertValue:c,isVisitable:Gt});if(!Vt.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Vt.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Vt.forEach(r,function(r,a){!0===(!(Vt.isUndefined(r)||null===r)&&o.call(t,r,Vt.isString(a)?a.trim():a,n,d))&&e(r,n?n.concat(a):[a])}),l.pop()}}(e),t}function er(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function tr(e,t){this._pairs=[],e&&Zt(e,this,t)}const rr=tr.prototype;function nr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function or(e,t,r){if(!t)return e;const n=r&&r.encode||nr;Vt.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let a;if(a=o?o(t,r):Vt.isURLSearchParams(t)?t.toString():new tr(t,r).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}rr.append=function(e,t){this._pairs.push([e,t])},rr.toString=function(e){const t=e?function(t){return e.call(this,t,er)}:er;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class ar{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Vt.forEach(this.handlers,function(t){null!==t&&e(t)})}}var ir={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sr={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:tr,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const cr="undefined"!=typeof window&&"undefined"!=typeof document,ur="object"==typeof navigator&&navigator||void 0,lr=cr&&(!ur||["ReactNative","NativeScript","NS"].indexOf(ur.product)<0),dr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,fr=cr&&window.location.href||"http://localhost";var pr={...Object.freeze({__proto__:null,hasBrowserEnv:cr,hasStandardBrowserEnv:lr,hasStandardBrowserWebWorkerEnv:dr,navigator:ur,origin:fr}),...sr};function yr(e){function t(e,r,n,o){let a=e[o++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),s=o>=e.length;return a=!a&&Vt.isArray(n)?n.length:a,s?(Vt.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!i):(n[a]&&Vt.isObject(n[a])||(n[a]=[]),t(e,r,n[a],o)&&Vt.isArray(n[a])&&(n[a]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let a;for(n=0;n<o;n++)a=r[n],t[a]=e[a];return t}(n[a])),!i)}if(Vt.isFormData(e)&&Vt.isFunction(e.entries)){const r={};return Vt.forEachEntry(e,(e,n)=>{t(function(e){return Vt.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const hr={transitional:ir,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Vt.isObject(e);if(o&&Vt.isHTMLForm(e)&&(e=new FormData(e)),Vt.isFormData(e))return n?JSON.stringify(yr(e)):e;if(Vt.isArrayBuffer(e)||Vt.isBuffer(e)||Vt.isStream(e)||Vt.isFile(e)||Vt.isBlob(e)||Vt.isReadableStream(e))return e;if(Vt.isArrayBufferView(e))return e.buffer;if(Vt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Zt(e,new pr.classes.URLSearchParams,{visitor:function(e,t,r,n){return pr.isNode&&Vt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=Vt.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Zt(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e){if(Vt.isString(e))try{return(0,JSON.parse)(e),Vt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||hr.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Vt.isResponse(e)||Vt.isReadableStream(e))return e;if(e&&Vt.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw Kt.from(e,Kt.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pr.classes.FormData,Blob:pr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Vt.forEach(["delete","get","head","post","put","patch"],e=>{hr.headers[e]={}});const mr=Vt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gr=Symbol("internals");function br(e){return e&&String(e).trim().toLowerCase()}function vr(e){return!1===e||null==e?e:Vt.isArray(e)?e.map(vr):String(e)}function wr(e,t,r,n,o){return Vt.isFunction(n)?n.call(this,t,r):(o&&(t=r),Vt.isString(t)?Vt.isString(n)?-1!==t.indexOf(n):Vt.isRegExp(n)?n.test(t):void 0:void 0)}let Sr=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=br(t);if(!o)throw new Error("header name must be a non-empty string");const a=Vt.findKey(n,o);(!a||void 0===n[a]||!0===r||void 0===r&&!1!==n[a])&&(n[a||t]=vr(e))}const a=(e,t)=>Vt.forEach(e,(e,r)=>o(e,r,t));if(Vt.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Vt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&mr[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(Vt.isObject(e)&&Vt.isIterable(e)){let r,n,o={};for(const t of e){if(!Vt.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?Vt.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=br(e)){const r=Vt.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Vt.isFunction(t))return t.call(this,e,r);if(Vt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=br(e)){const r=Vt.findKey(this,e);return!(!r||void 0===this[r]||t&&!wr(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=br(e)){const o=Vt.findKey(r,e);!o||t&&!wr(0,r[o],o,t)||(delete r[o],n=!0)}}return Vt.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!wr(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Vt.forEach(this,(n,o)=>{const a=Vt.findKey(r,o);if(a)return t[a]=vr(n),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();i!==o&&delete t[o],t[i]=vr(n),r[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Vt.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Vt.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[gr]=this[gr]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=br(e);t[n]||(function(e,t){const r=Vt.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return Vt.isArray(e)?e.forEach(n):n(e),this}};function Er(e,t){const r=this||hr,n=t||r,o=Sr.from(n.headers);let a=n.data;return Vt.forEach(e,function(e){a=e.call(r,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Or(e){return!(!e||!e.__CANCEL__)}function _r(e,t,r){Kt.call(this,null==e?"canceled":e,Kt.ERR_CANCELED,t,r),this.name="CanceledError"}function Ar(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Kt("Request failed with status code "+r.status,[Kt.ERR_BAD_REQUEST,Kt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Sr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Vt.reduceDescriptors(Sr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Vt.freezeMethods(Sr),Vt.inherits(_r,Kt,{__CANCEL__:!0});const Rr=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,a=0,i=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[i];o||(o=c),r[a]=s,n[a]=c;let l=i,d=0;for(;l!==a;)d+=r[l++],l%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let r,n,o=0,a=1e3/t;const i=(t,a=Date.now())=>{o=a,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=a?i(e,t):(r=e,n||(n=setTimeout(()=>{n=null,i(r)},a-s)))},()=>r&&i(r)]}(r=>{const a=r.loaded,i=r.lengthComputable?r.total:void 0,s=a-n,c=o(s);n=a,e({loaded:a,total:i,progress:i?a/i:void 0,bytes:s,rate:c||void 0,estimated:c&&i&&a<=i?(i-a)/c:void 0,event:r,lengthComputable:null!=i,[t?"download":"upload"]:!0})},r)},Tr=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Pr=e=>(...t)=>Vt.asap(()=>e(...t));var kr=pr.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,pr.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(pr.origin),pr.navigator&&/(msie|trident)/i.test(pr.navigator.userAgent)):()=>!0,jr=pr.hasStandardBrowserEnv?{write(e,t,r,n,o,a){const i=[e+"="+encodeURIComponent(t)];Vt.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),Vt.isString(n)&&i.push("path="+n),Vt.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Cr(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Nr=e=>e instanceof Sr?{...e}:e;function Ir(e,t){t=t||{};const r={};function n(e,t,r,n){return Vt.isPlainObject(e)&&Vt.isPlainObject(t)?Vt.merge.call({caseless:n},e,t):Vt.isPlainObject(t)?Vt.merge({},t):Vt.isArray(t)?t.slice():t}function o(e,t,r,o){return Vt.isUndefined(t)?Vt.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function a(e,t){if(!Vt.isUndefined(t))return n(void 0,t)}function i(e,t){return Vt.isUndefined(t)?Vt.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,a){return a in t?n(r,o):a in e?n(void 0,r):void 0}const c={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(e,t,r)=>o(Nr(e),Nr(t),0,!0)};return Vt.forEach(Object.keys({...e,...t}),function(n){const a=c[n]||o,i=a(e[n],t[n],n);Vt.isUndefined(i)&&a!==s||(r[n]=i)}),r}var xr=e=>{const t=Ir({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;if(t.headers=i=Sr.from(i),t.url=or(Cr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Vt.isFormData(r))if(pr.hasStandardBrowserEnv||pr.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(Vt.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&i.set(e,r)})}if(pr.hasStandardBrowserEnv&&(n&&Vt.isFunction(n)&&(n=n(t)),n||!1!==n&&kr(t.url))){const e=o&&a&&jr.read(a);e&&i.set(o,e)}return t},Dr="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=xr(e);let o=n.data;const a=Sr.from(n.headers).normalize();let i,s,c,u,l,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=n;function y(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(i),n.signal&&n.signal.removeEventListener("abort",i)}let h=new XMLHttpRequest;function m(){if(!h)return;const n=Sr.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Ar(function(e){t(e),y()},function(e){r(e),y()},{data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout,"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(m)},h.onabort=function(){h&&(r(new Kt("Request aborted",Kt.ECONNABORTED,e,h)),h=null)},h.onerror=function(t){const n=new Kt(t&&t.message?t.message:"Network Error",Kt.ERR_NETWORK,e,h);n.event=t||null,r(n),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||ir;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Kt(t,o.clarifyTimeoutError?Kt.ETIMEDOUT:Kt.ECONNABORTED,e,h)),h=null},void 0===o&&a.setContentType(null),"setRequestHeader"in h&&Vt.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),Vt.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),d&&"json"!==d&&(h.responseType=n.responseType),p&&([c,l]=Rr(p,!0),h.addEventListener("progress",c)),f&&h.upload&&([s,u]=Rr(f),h.upload.addEventListener("progress",s),h.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(i=t=>{h&&(r(!t||t.type?new _r(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(i),n.signal&&(n.signal.aborted?i():n.signal.addEventListener("abort",i)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===pr.protocols.indexOf(g)?r(new Kt("Unsupported protocol "+g+":",Kt.ERR_BAD_REQUEST,e)):h.send(o||null)})};const Mr=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Kt?t:new _r(t instanceof Error?t.message:t))}};let a=t&&setTimeout(()=>{a=null,o(new Kt(`timeout ${t} of ms exceeded`,Kt.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=n;return s.unsubscribe=()=>Vt.asap(i),s}},qr=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},Fr=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}}(e))yield*qr(r,t)}(e,t);let a,i=0,s=e=>{a||(a=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let a=n.byteLength;if(r){let e=i+=a;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:Ur}=Vt,Lr=(({Request:e,Response:t})=>({Request:e,Response:t}))(Vt.global),{ReadableStream:$r,TextEncoder:Qr}=Vt.global,Br=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},zr=e=>{e=Vt.merge.call({skipUndefined:!0},Lr,e);const{fetch:t,Request:r,Response:n}=e,o=t?Ur(t):"function"==typeof fetch,a=Ur(r),i=Ur(n);if(!o)return!1;const s=o&&Ur($r),c=o&&("function"==typeof Qr?(u=new Qr,e=>u.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var u;const l=a&&s&&Br(()=>{let e=!1;const t=new r(pr.origin,{body:new $r,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&s&&Br(()=>Vt.isReadableStream(new n("").body)),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Kt(`Response type '${e}' is not supported`,Kt.ERR_NOT_SUPPORT,r)})});const p=async(e,t)=>{const n=Vt.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Vt.isBlob(e))return e.size;if(Vt.isSpecCompliantForm(e)){const t=new r(pr.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Vt.isArrayBufferView(e)||Vt.isArrayBuffer(e)?e.byteLength:(Vt.isURLSearchParams(e)&&(e+=""),Vt.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:i,data:s,signal:c,cancelToken:u,timeout:y,onDownloadProgress:h,onUploadProgress:m,responseType:g,headers:b,withCredentials:v="same-origin",fetchOptions:w}=xr(e),S=t||fetch;g=g?(g+"").toLowerCase():"text";let E=Mr([c,u&&u.toAbortSignal()],y),O=null;const _=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let A;try{if(m&&l&&"get"!==i&&"head"!==i&&0!==(A=await p(b,s))){let e,t=new r(o,{method:"POST",body:s,duplex:"half"});if(Vt.isFormData(s)&&(e=t.headers.get("content-type"))&&b.setContentType(e),t.body){const[e,r]=Tr(A,Rr(Pr(m)));s=Fr(t.body,65536,e,r)}}Vt.isString(v)||(v=v?"include":"omit");const t=a&&"credentials"in r.prototype,c={...w,signal:E,method:i.toUpperCase(),headers:b.normalize().toJSON(),body:s,duplex:"half",credentials:t?v:void 0};O=a&&new r(o,c);let u=await(a?S(O,w):S(o,c));const y=d&&("stream"===g||"response"===g);if(d&&(h||y&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=Vt.toFiniteNumber(u.headers.get("content-length")),[r,o]=h&&Tr(t,Rr(Pr(h),!0))||[];u=new n(Fr(u.body,65536,r,()=>{o&&o(),_&&_()}),e)}g=g||"text";let R=await f[Vt.findKey(f,g)||"text"](u,e);return!y&&_&&_(),await new Promise((t,r)=>{Ar(t,r,{data:R,headers:Sr.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})})}catch(t){if(_&&_(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Kt("Network Error",Kt.ERR_NETWORK,e,O),{cause:t.cause||t});throw Kt.from(t,t&&t.code,e,O)}}},Vr=new Map,Kr=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:o}=t,a=[n,o,r];let i,s,c=a.length,u=Vr;for(;c--;)i=a[c],s=u.get(i),void 0===s&&u.set(i,s=c?new Map:zr(t)),u=s;return s};Kr();const Hr={http:null,xhr:Dr,fetch:{get:Kr}};Vt.forEach(Hr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Wr=e=>`- ${e}`,Gr=e=>Vt.isFunction(e)||null===e||!1===e;var Jr=(e,t)=>{e=Vt.isArray(e)?e:[e];const{length:r}=e;let n,o;const a={};for(let i=0;i<r;i++){let r;if(n=e[i],o=n,!Gr(n)&&(o=Hr[(r=String(n)).toLowerCase()],void 0===o))throw new Kt(`Unknown adapter '${r}'`);if(o&&(Vt.isFunction(o)||(o=o.get(t))))break;a[r||"#"+i]=o}if(!o){const e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Kt("There is no suitable adapter to dispatch the request "+(r?e.length>1?"since :\n"+e.map(Wr).join("\n"):" "+Wr(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function Yr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _r(null,e)}function Xr(e){return Yr(e),e.headers=Sr.from(e.headers),e.data=Er.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Jr(e.adapter||hr.adapter,e)(e).then(function(t){return Yr(e),t.data=Er.call(e,e.transformResponse,t),t.headers=Sr.from(t.headers),t},function(t){return Or(t)||(Yr(e),t&&t.response&&(t.response.data=Er.call(e,e.transformResponse,t.response),t.response.headers=Sr.from(t.response.headers))),Promise.reject(t)})}const Zr="1.12.2",en={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{en[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const tn={};en.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Zr+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,a)=>{if(!1===e)throw new Kt(n(o," has been removed"+(t?" in "+t:"")),Kt.ERR_DEPRECATED);return t&&!tn[o]&&(tn[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,a)}},en.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var rn={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Kt("options must be an object",Kt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const a=n[o],i=t[a];if(i){const t=e[a],r=void 0===t||i(t,a,e);if(!0!==r)throw new Kt("option "+a+" must be "+r,Kt.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Kt("Unknown option "+a,Kt.ERR_BAD_OPTION)}},validators:en};const nn=rn.validators;let on=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ar,response:new ar}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ir(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&rn.assertOptions(r,{silentJSONParsing:nn.transitional(nn.boolean),forcedJSONParsing:nn.transitional(nn.boolean),clarifyTimeoutError:nn.transitional(nn.boolean)},!1),null!=n&&(Vt.isFunction(n)?t.paramsSerializer={serialize:n}:rn.assertOptions(n,{encode:nn.function,serialize:nn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),rn.assertOptions(t,{baseUrl:nn.spelling("baseURL"),withXsrfToken:nn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&Vt.merge(o.common,o[t.method]);o&&Vt.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Sr.concat(a,o);const i=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!s){const e=[Xr.bind(this),void 0];for(e.unshift(...i),e.push(...c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=i.length;let f=t;for(;d<l;){const t=i[d++],r=i[d++];try{f=t(f)}catch(e){r.call(this,e);break}}try{u=Xr.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return or(Cr((e=Ir(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Vt.forEach(["delete","get","head","options"],function(e){on.prototype[e]=function(t,r){return this.request(Ir(r||{},{method:e,url:t,data:(r||{}).data}))}}),Vt.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(Ir(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}on.prototype[e]=t(),on.prototype[e+"Form"]=t(!0)});const an={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(an).forEach(([e,t])=>{an[t]=e});const sn=function e(t){const r=new on(t),n=rt(on.prototype.request,r);return Vt.extend(n,on.prototype,r,{allOwnKeys:!0}),Vt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Ir(t,r))},n}(hr);sn.Axios=on,sn.CanceledError=_r,sn.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new _r(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},sn.isCancel=Or,sn.VERSION=Zr,sn.toFormData=Zt,sn.AxiosError=Kt,sn.Cancel=sn.CanceledError,sn.all=function(e){return Promise.all(e)},sn.spread=function(e){return function(t){return e.apply(null,t)}},sn.isAxiosError=function(e){return Vt.isObject(e)&&!0===e.isAxiosError},sn.mergeConfig=Ir,sn.AxiosHeaders=Sr,sn.formToJSON=e=>yr(Vt.isHTMLForm(e)?new FormData(e):e),sn.getAdapter=Jr,sn.HttpStatusCode=an,sn.default=sn;const{Axios:cn,AxiosError:un,CanceledError:ln,isCancel:dn,CancelToken:fn,VERSION:pn,all:yn,Cancel:hn,isAxiosError:mn,spread:gn,toFormData:bn,AxiosHeaders:vn,HttpStatusCode:wn,formToJSON:Sn,getAdapter:En,mergeConfig:On}=sn;var _n,An,Rn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Tn(){return An?_n:(An=1,_n=TypeError)}var Pn,kn,jn,Cn,Nn,In,xn,Dn,Mn,qn,Fn,Un,Ln,$n,Qn,Bn,zn,Vn,Kn,Hn,Wn,Gn,Jn,Yn,Xn,Zn,eo,to,ro,no,oo,ao,io,so,co,uo,lo,fo,po,yo,ho,mo,go,bo,vo,wo,So,Eo,Oo,_o,Ao,Ro,To,Po,ko,jo,Co,No,Io,xo,Do,Mo,qo,Fo,Uo,Lo,$o,Qo,Bo,zo,Vo,Ko,Ho,Wo,Go,Jo,Yo,Xo,Zo,ea,ta,ra,na,oa,aa,ia,sa,ca,ua=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze({__proto__:null,default:{}}));function la(){if(kn)return Pn;kn=1;var e="function"==typeof Map&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&"function"==typeof t.get?t.get:null,n=e&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,i=o&&a&&"function"==typeof a.get?a.get:null,s=o&&Set.prototype.forEach,c="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,u="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,l="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,f=Object.prototype.toString,p=Function.prototype.toString,y=String.prototype.match,h=String.prototype.slice,m=String.prototype.replace,g=String.prototype.toUpperCase,b=String.prototype.toLowerCase,v=RegExp.prototype.test,w=Array.prototype.concat,S=Array.prototype.join,E=Array.prototype.slice,O=Math.floor,_="function"==typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,k=Object.prototype.propertyIsEnumerable,j=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function C(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||v.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-O(-e):O(e);if(n!==e){var o=String(n),a=h.call(t,o.length+1);return m.call(o,r,"$&_")+"."+m.call(m.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(t,r,"$&_")}var N=ua,I=N.custom,x=Q(I)?I:null,D={__proto__:null,double:'"',single:"'"},M={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function q(e,t,r){var n=r.quoteStyle||t,o=D[n];return o+e+o}function F(e){return m.call(String(e),/"/g,"&quot;")}function U(e){return!P||!("object"==typeof e&&(P in e||void 0!==e[P]))}function L(e){return"[object Array]"===V(e)&&U(e)}function $(e){return"[object RegExp]"===V(e)&&U(e)}function Q(e){if(T)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!R)return!1;try{return R.call(e),!0}catch(e){}return!1}Pn=function e(t,o,a,f){var g=o||{};if(z(g,"quoteStyle")&&!z(D,g.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(z(g,"maxStringLength")&&("number"==typeof g.maxStringLength?g.maxStringLength<0&&g.maxStringLength!==1/0:null!==g.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var v=!z(g,"customInspect")||g.customInspect;if("boolean"!=typeof v&&"symbol"!==v)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(z(g,"indent")&&null!==g.indent&&"\t"!==g.indent&&!(parseInt(g.indent,10)===g.indent&&g.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(z(g,"numericSeparator")&&"boolean"!=typeof g.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var O=g.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return H(t,g);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var A=String(t);return O?C(t,A):A}if("bigint"==typeof t){var I=String(t)+"n";return O?C(t,I):I}var M=void 0===g.depth?5:g.depth;if(void 0===a&&(a=0),a>=M&&M>0&&"object"==typeof t)return L(t)?"[Array]":"[Object]";var B=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=S.call(Array(e.indent+1)," ")}return{base:r,prev:S.call(Array(t+1),r)}}(g,a);if(void 0===f)f=[];else if(K(f,t)>=0)return"[Circular]";function W(t,r,n){if(r&&(f=E.call(f)).push(r),n){var o={depth:g.depth};return z(g,"quoteStyle")&&(o.quoteStyle=g.quoteStyle),e(t,o,a+1,f)}return e(t,g,a+1,f)}if("function"==typeof t&&!$(t)){var ee=function(e){if(e.name)return e.name;var t=y.call(p.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=Z(t,W);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+S.call(te,", ")+" }":"")}if(Q(t)){var re=T?m.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(t);return"object"!=typeof t||T?re:G(re)}if(function(e){return!(!e||"object"!=typeof e)&&("undefined"!=typeof HTMLElement&&e instanceof HTMLElement||"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}(t)){for(var ne="<"+b.call(String(t.nodeName)),oe=t.attributes||[],ae=0;ae<oe.length;ae++)ne+=" "+oe[ae].name+"="+q(F(oe[ae].value),"double",g);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+"</"+b.call(String(t.nodeName))+">"}if(L(t)){if(0===t.length)return"[]";var ie=Z(t,W);return B&&!function(e){for(var t=0;t<e.length;t++)if(K(e[t],"\n")>=0)return!1;return!0}(ie)?"["+X(ie,B)+"]":"[ "+S.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===V(e)&&U(e)}(t)){var se=Z(t,W);return"cause"in Error.prototype||!("cause"in t)||k.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(se,", ")+" }":"{ ["+String(t)+"] "+S.call(w.call("[cause]: "+W(t.cause),se),", ")+" }"}if("object"==typeof t&&v){if(x&&"function"==typeof t[x]&&N)return N(t,{depth:M-a});if("symbol"!==v&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!r||!e||"object"!=typeof e)return!1;try{r.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ce=[];return n&&n.call(t,function(e,r){ce.push(W(r,t,!0)+" => "+W(e,t))}),Y("Map",r.call(t),ce,B)}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{r.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ue=[];return s&&s.call(t,function(e){ue.push(W(e,t))}),Y("Set",i.call(t),ue,B)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e,c);try{u.call(e,u)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{c.call(e,c)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{return l.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return"[object Number]"===V(e)&&U(e)}(t))return G(W(Number(t)));if(function(e){if(!e||"object"!=typeof e||!_)return!1;try{return _.call(e),!0}catch(e){}return!1}(t))return G(W(_.call(t)));if(function(e){return"[object Boolean]"===V(e)&&U(e)}(t))return G(d.call(t));if(function(e){return"[object String]"===V(e)&&U(e)}(t))return G(W(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==Rn&&t===Rn)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===V(e)&&U(e)}(t)&&!$(t)){var le=Z(t,W),de=j?j(t)===Object.prototype:t instanceof Object||t.constructor===Object,fe=t instanceof Object?"":"null prototype",pe=!de&&P&&Object(t)===t&&P in t?h.call(V(t),8,-1):fe?"Object":"",ye=(de||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(pe||fe?"["+S.call(w.call([],pe||[],fe||[]),": ")+"] ":"");return 0===le.length?ye+"{}":B?ye+"{"+X(le,B)+"}":ye+"{ "+S.call(le,", ")+" }"}return String(t)};var B=Object.prototype.hasOwnProperty||function(e){return e in this};function z(e,t){return B.call(e,t)}function V(e){return f.call(e)}function K(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function H(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(h.call(e,0,t.maxStringLength),t)+n}var o=M[t.quoteStyle||"single"];return o.lastIndex=0,q(m.call(m.call(e,o,"\\$1"),/[\x00-\x1f]/g,W),"single",t)}function W(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+g.call(t.toString(16))}function G(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Y(e,t,r,n){return e+" ("+t+") {"+(n?X(r,n):S.call(r,", "))+"}"}function X(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+S.call(e,","+r)+"\n"+t.prev}function Z(e,t){var r=L(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=z(e,o)?t(e[o],e):""}var a,i="function"==typeof A?A(e):[];if(T){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var c in e)z(e,c)&&(r&&String(Number(c))===c&&c<e.length||T&&a["$"+c]instanceof Symbol||(v.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof A)for(var u=0;u<i.length;u++)k.call(e,i[u])&&n.push("["+t(i[u])+"]: "+t(e[i[u]],e));return n}return Pn}function da(){return In?Nn:(In=1,Nn=Object)}function fa(){if(so)return io;so=1;var e=ao?oo:(ao=1,oo=Number.isNaN||function(e){return e!=e});return io=function(t){return e(t)||0===t?t:t<0?-1:1}}function pa(){if(fo)return lo;fo=1;var e=uo?co:(uo=1,co=Object.getOwnPropertyDescriptor);if(e)try{e([],"length")}catch(t){e=null}return lo=e}function ya(){return wo?vo:(wo=1,vo="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function ha(){return Eo?So:(Eo=1,So=da().getPrototypeOf||null)}function ma(){if(Ro)return Ao;Ro=1;var e=function(){if(_o)return Oo;_o=1;var e=Object.prototype.toString,t=Math.max,r=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};return Oo=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var a,i=function(e){for(var t=[],r=1,n=0;r<e.length;r+=1,n+=1)t[n]=e[r];return t}(arguments),s=t(0,o.length-i.length),c=[],u=0;u<s;u++)c[u]="$"+u;if(a=Function("binder","return function ("+function(e){for(var t="",r=0;r<e.length;r+=1)t+=e[r],r+1<e.length&&(t+=",");return t}(c)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var e=o.apply(this,r(i,arguments));return Object(e)===e?e:this}return o.apply(n,r(i,arguments))}),o.prototype){var l=function(){};l.prototype=o.prototype,a.prototype=new l,l.prototype=null}return a},Oo}();return Ao=Function.prototype.bind||e}function ga(){return Po?To:(Po=1,To=Function.prototype.call)}function ba(){return jo?ko:(jo=1,ko=Function.prototype.apply)}function va(){if(Mo)return Do;Mo=1;var e=ma(),t=Tn(),r=ga(),n=function(){if(xo)return Io;xo=1;var e=ma(),t=ba(),r=ga(),n=No?Co:(No=1,Co="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return Io=n||e.call(r,t)}();return Do=function(o){if(o.length<1||"function"!=typeof o[0])throw new t("a function is required");return n(e,r,o)}}function wa(){if(Lo)return Uo;Lo=1;var e=ya(),t=ha(),r=function(){if(Fo)return qo;Fo=1;var e,t=va(),r=pa();try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var n=!!e&&r&&r(Object.prototype,"__proto__"),o=Object,a=o.getPrototypeOf;return qo=n&&"function"==typeof n.get?t([n.get]):"function"==typeof a&&function(e){return a(null==e?e:o(e))}}();return Uo=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function(e){return r(e)}:null}function Sa(){if(zo)return Bo;var e;zo=1;var t=da(),r=Dn?xn:(Dn=1,xn=Error),n=qn?Mn:(qn=1,Mn=EvalError),o=Un?Fn:(Un=1,Fn=RangeError),a=$n?Ln:($n=1,Ln=ReferenceError),i=Bn?Qn:(Bn=1,Qn=SyntaxError),s=Tn(),c=Vn?zn:(Vn=1,zn=URIError),u=Hn?Kn:(Hn=1,Kn=Math.abs),l=Gn?Wn:(Gn=1,Wn=Math.floor),d=Yn?Jn:(Yn=1,Jn=Math.max),f=Zn?Xn:(Zn=1,Xn=Math.min),p=to?eo:(to=1,eo=Math.pow),y=no?ro:(no=1,ro=Math.round),h=fa(),m=Function,g=function(e){try{return m('"use strict"; return ('+e+").constructor;")()}catch(e){}},b=pa(),v=function(){if(yo)return po;yo=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return po=e}(),w=function(){throw new s},S=b?function(){try{return w}catch(e){try{return b(arguments,"callee").get}catch(e){return w}}}():w,E=function(){if(bo)return go;bo=1;var e="undefined"!=typeof Symbol&&Symbol,t=mo?ho:(mo=1,ho=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0});return go=function(){return"function"==typeof e&&"function"==typeof Symbol&&"symbol"==typeof e("foo")&&"symbol"==typeof Symbol("bar")&&t()}}()(),O=wa(),_=ha(),A=ya(),R=ba(),T=ga(),P={},k="undefined"!=typeof Uint8Array&&O?O(Uint8Array):e,j={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":E&&O?O([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":P,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&O?O(O([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&E&&O?O((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":o,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&E&&O?O((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&O?O(""[Symbol.iterator]()):e,"%Symbol%":E?Symbol:e,"%SyntaxError%":i,"%ThrowTypeError%":S,"%TypedArray%":k,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":T,"%Function.prototype.apply%":R,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":_,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":y,"%Math.sign%":h,"%Reflect.getPrototypeOf%":A};if(O)try{null.error}catch(e){var C=O(O(e));j["%Error.prototype%"]=C}var N=function e(t){var r;if("%AsyncFunction%"===t)r=g("async function () {}");else if("%GeneratorFunction%"===t)r=g("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=g("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&O&&(r=O(o.prototype))}return j[t]=r,r},I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=ma(),D=function(){if(Qo)return $o;Qo=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=ma();return $o=r.call(e,t)}(),M=x.call(T,Array.prototype.concat),q=x.call(R,Array.prototype.splice),F=x.call(T,String.prototype.replace),U=x.call(T,String.prototype.slice),L=x.call(T,RegExp.prototype.exec),$=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q=/\\(\\)?/g,B=function(e,t){var r,n=e;if(D(I,n)&&(n="%"+(r=I[n])[0]+"%"),D(j,n)){var o=j[n];if(o===P&&(o=N(n)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};return Bo=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return F(e,$,function(e,t,r,o){n[n.length]=r?F(o,Q,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=B("%"+n+"%",t),a=o.name,c=o.value,u=!1,l=o.alias;l&&(n=l[0],q(r,M([0,1],l)));for(var d=1,f=!0;d<r.length;d+=1){var p=r[d],y=U(p,0,1),h=U(p,-1);if(('"'===y||"'"===y||"`"===y||'"'===h||"'"===h||"`"===h)&&y!==h)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&f||(u=!0),D(j,a="%"+(n+="."+p)+"%"))c=j[a];else if(null!=c){if(!(p in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&d+1>=r.length){var m=b(c,p);c=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[p]}else f=D(c,p),c=c[p];f&&!u&&(j[a]=c)}}return c},Bo}function Ea(){if(Ko)return Vo;Ko=1;var e=Sa(),t=va(),r=t([e("%String.prototype.indexOf%")]);return Vo=function(n,o){var a=e(n,!!o);return"function"==typeof a&&r(n,".prototype.")>-1?t([a]):a}}function Oa(){if(Wo)return Ho;Wo=1;var e=Sa(),t=Ea(),r=la(),n=Tn(),o=e("%Map%",!0),a=t("Map.prototype.get",!0),i=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),c=t("Map.prototype.delete",!0),u=t("Map.prototype.size",!0);return Ho=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+r(e))},delete:function(t){if(e){var r=c(e,t);return 0===u(e)&&(e=void 0),r}return!1},get:function(t){if(e)return a(e,t)},has:function(t){return!!e&&s(e,t)},set:function(t,r){e||(e=new o),i(e,t,r)}};return t}}function _a(){if(Xo)return Yo;Xo=1;var e=Tn(),t=la(),r=function(){if(Cn)return jn;Cn=1;var e=la(),t=Tn(),r=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n};return jn=function(){var n,o={assert:function(r){if(!o.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(e){var t=n&&n.next,o=function(e,t){if(e)return r(e,t,!0)}(n,e);return o&&t&&t===o&&(n=void 0),!!o},get:function(e){return function(e,t){if(e){var n=r(e,t);return n&&n.value}}(n,e)},has:function(e){return function(e,t){return!!e&&!!r(e,t)}(n,e)},set:function(e,t){n||(n={next:void 0}),function(e,t,n){var o=r(e,t);o?o.value=n:e.next={key:t,next:e.next,value:n}}(n,e,t)}};return o}}(),n=Oa(),o=function(){if(Jo)return Go;Jo=1;var e=Sa(),t=Ea(),r=la(),n=Oa(),o=Tn(),a=e("%WeakMap%",!0),i=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),c=t("WeakMap.prototype.has",!0),u=t("WeakMap.prototype.delete",!0);return Go=a?function(){var e,t,l={assert:function(e){if(!l.has(e))throw new o("Side channel does not contain "+r(e))},delete:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return u(e,r)}else if(n&&t)return t.delete(r);return!1},get:function(r){return a&&r&&("object"==typeof r||"function"==typeof r)&&e?i(e,r):t&&t.get(r)},has:function(r){return a&&r&&("object"==typeof r||"function"==typeof r)&&e?c(e,r):!!t&&t.has(r)},set:function(r,o){a&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new a),s(e,r,o)):n&&(t||(t=n()),t.set(r,o))}};return l}:n}(),a=o||n||r;return Yo=function(){var r,n={assert:function(r){if(!n.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(e){return!!r&&r.delete(e)},get:function(e){return r&&r.get(e)},has:function(e){return!!r&&r.has(e)},set:function(e,t){r||(r=a()),r.set(e,t)}};return n}}function Aa(){if(ea)return Zo;ea=1;var e=String.prototype.replace,t=/%20/g,r="RFC3986";return Zo={default:r,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}}function Ra(){if(ra)return ta;ra=1;var e=Aa(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},a=1024;return ta={arrayToObject:o,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],o=0;o<t.length;++o)for(var a=t[o],i=a.obj[a.prop],s=Object.keys(i),c=0;c<s.length;++c){var u=s[c],l=i[u];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:i,prop:u}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(r(n)){for(var o=[],a=0;a<n.length;++a)void 0!==n[a]&&o.push(n[a]);t.obj[t.prop]=o}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(t,r,o,i,s){if(0===t.length)return t;var c=t;if("symbol"==typeof t?c=Symbol.prototype.toString.call(t):"string"!=typeof t&&(c=String(t)),"iso-8859-1"===o)return escape(c).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var u="",l=0;l<c.length;l+=a){for(var d=c.length>=a?c.slice(l,l+a):c,f=[],p=0;p<d.length;++p){var y=d.charCodeAt(p);45===y||46===y||95===y||126===y||y>=48&&y<=57||y>=65&&y<=90||y>=97&&y<=122||s===e.RFC1738&&(40===y||41===y)?f[f.length]=d.charAt(p):y<128?f[f.length]=n[y]:y<2048?f[f.length]=n[192|y>>6]+n[128|63&y]:y<55296||y>=57344?f[f.length]=n[224|y>>12]+n[128|y>>6&63]+n[128|63&y]:(p+=1,y=65536+((1023&y)<<10|1023&d.charCodeAt(p)),f[f.length]=n[240|y>>18]+n[128|y>>12&63]+n[128|y>>6&63]+n[128|63&y])}u+=f.join("")}return u},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(r(e)){for(var n=[],o=0;o<e.length;o+=1)n.push(t(e[o]));return n}return t(e)},merge:function e(n,a,i){if(!a)return n;if("object"!=typeof a&&"function"!=typeof a){if(r(n))n.push(a);else{if(!n||"object"!=typeof n)return[n,a];(i&&(i.plainObjects||i.allowPrototypes)||!t.call(Object.prototype,a))&&(n[a]=!0)}return n}if(!n||"object"!=typeof n)return[n].concat(a);var s=n;return r(n)&&!r(a)&&(s=o(n,i)),r(n)&&r(a)?(a.forEach(function(r,o){if(t.call(n,o)){var a=n[o];a&&"object"==typeof a&&r&&"object"==typeof r?n[o]=e(a,r,i):n.push(r)}else n[o]=r}),n):Object.keys(a).reduce(function(r,n){var o=a[n];return t.call(r,n)?r[n]=e(r[n],o,i):r[n]=o,r},s)}},ta}var Ta=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(function(){if(ca)return sa;ca=1;var e=function(){if(oa)return na;oa=1;var e=_a(),t=Ra(),r=Aa(),n=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Array.isArray,i=Array.prototype.push,s=function(e,t){i.apply(e,a(t)?t:[t])},c=Date.prototype.toISOString,u=r.default,l={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:u,formatter:r.formatters[u],indices:!1,serializeDate:function(e){return c.call(e)},skipNulls:!1,strictNullHandling:!1},d={},f=function r(n,o,i,c,u,f,p,y,h,m,g,b,v,w,S,E,O,_){for(var A,R=n,T=_,P=0,k=!1;void 0!==(T=T.get(d))&&!k;){var j=T.get(n);if(P+=1,void 0!==j){if(j===P)throw new RangeError("Cyclic object value");k=!0}void 0===T.get(d)&&(P=0)}if("function"==typeof m?R=m(o,R):R instanceof Date?R=v(R):"comma"===i&&a(R)&&(R=t.maybeMap(R,function(e){return e instanceof Date?v(e):e})),null===R){if(f)return h&&!E?h(o,l.encoder,O,"key",w):o;R=""}if("string"==typeof(A=R)||"number"==typeof A||"boolean"==typeof A||"symbol"==typeof A||"bigint"==typeof A||t.isBuffer(R))return h?[S(E?o:h(o,l.encoder,O,"key",w))+"="+S(h(R,l.encoder,O,"value",w))]:[S(o)+"="+S(String(R))];var C,N=[];if(void 0===R)return N;if("comma"===i&&a(R))E&&h&&(R=t.maybeMap(R,h)),C=[{value:R.length>0?R.join(",")||null:void 0}];else if(a(m))C=m;else{var I=Object.keys(R);C=g?I.sort(g):I}var x=y?String(o).replace(/\./g,"%2E"):String(o),D=c&&a(R)&&1===R.length?x+"[]":x;if(u&&a(R)&&0===R.length)return D+"[]";for(var M=0;M<C.length;++M){var q=C[M],F="object"==typeof q&&q&&void 0!==q.value?q.value:R[q];if(!p||null!==F){var U=b&&y?String(q).replace(/\./g,"%2E"):String(q),L=a(R)?"function"==typeof i?i(D,U):D:D+(b?"."+U:"["+U+"]");_.set(n,P);var $=e();$.set(d,_),s(N,r(F,L,i,c,u,f,p,y,"comma"===i&&E&&a(R)?null:h,m,g,b,v,w,S,E,O,$))}}return N};return na=function(t,i){var c,u=t,d=function(e){if(!e)return l;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||l.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=r.default;if(void 0!==e.format){if(!n.call(r.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var s,c=r.formatters[i],u=l.filter;if(("function"==typeof e.filter||a(e.filter))&&(u=e.filter),s=e.arrayFormat in o?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":l.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=void 0===e.allowDots?!0===e.encodeDotInKeys||l.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:l.addQueryPrefix,allowDots:d,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:l.allowEmptyArrays,arrayFormat:s,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:l.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?l.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:l.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:l.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:l.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:l.encodeValuesOnly,filter:u,format:i,formatter:c,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:l.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:l.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:l.strictNullHandling}}(i);"function"==typeof d.filter?u=(0,d.filter)("",u):a(d.filter)&&(c=d.filter);var p=[];if("object"!=typeof u||null===u)return"";var y=o[d.arrayFormat],h="comma"===y&&d.commaRoundTrip;c||(c=Object.keys(u)),d.sort&&c.sort(d.sort);for(var m=e(),g=0;g<c.length;++g){var b=c[g],v=u[b];d.skipNulls&&null===v||s(p,f(v,b,y,h,d.allowEmptyArrays,d.strictNullHandling,d.skipNulls,d.encodeDotInKeys,d.encode?d.encoder:null,d.filter,d.sort,d.allowDots,d.serializeDate,d.format,d.formatter,d.encodeValuesOnly,d.charset,m))}var w=p.join(d.delimiter),S=!0===d.addQueryPrefix?"?":"";return d.charsetSentinel&&("iso-8859-1"===d.charset?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),w.length>0?S+w:""},na}(),t=function(){if(ia)return aa;ia=1;var e=Ra(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},a=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},i=function(r,n,o,i){if(r){var s=o.allowDots?r.replace(/\.([^.[]+)/g,"[$1]"):r,c=/(\[[^[\]]*])/g,u=o.depth>0&&/(\[[^[\]]*])/.exec(s),l=u?s.slice(0,u.index):s,d=[];if(l){if(!o.plainObjects&&t.call(Object.prototype,l)&&!o.allowPrototypes)return;d.push(l)}for(var f=0;o.depth>0&&null!==(u=c.exec(s))&&f<o.depth;){if(f+=1,!o.plainObjects&&t.call(Object.prototype,u[1].slice(1,-1))&&!o.allowPrototypes)return;d.push(u[1])}if(u){if(!0===o.strictDepth)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");d.push("["+s.slice(u.index)+"]")}return function(t,r,n,o){var i=0;if(t.length>0&&"[]"===t[t.length-1]){var s=t.slice(0,-1).join("");i=Array.isArray(r)&&r[s]?r[s].length:0}for(var c=o?r:a(r,n,i),u=t.length-1;u>=0;--u){var l,d=t[u];if("[]"===d&&n.parseArrays)l=n.allowEmptyArrays&&(""===c||n.strictNullHandling&&null===c)?[]:e.combine([],c);else{l=n.plainObjects?{__proto__:null}:{};var f="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,p=n.decodeDotInKeys?f.replace(/%2E/g,"."):f,y=parseInt(p,10);n.parseArrays||""!==p?!isNaN(y)&&d!==p&&String(y)===p&&y>=0&&n.parseArrays&&y<=n.arrayLimit?(l=[])[y]=c:"__proto__"!==p&&(l[p]=c):l={0:c}}c=l}return c}(d,n,o,i)}};return aa=function(s,c){var u=function(t){if(!t)return n;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===t.charset?n.charset:t.charset,o=void 0===t.duplicates?n.duplicates:t.duplicates;if("combine"!==o&&"first"!==o&&"last"!==o)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||n.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:n.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:n.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:n.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:n.decoder,delimiter:"string"==typeof t.delimiter||e.isRegExp(t.delimiter)?t.delimiter:n.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:n.depth,duplicates:o,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:n.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:n.strictDepth,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(c);if(""===s||null==s)return u.plainObjects?{__proto__:null}:{};for(var l="string"==typeof s?function(i,s){var c={__proto__:null},u=s.ignoreQueryPrefix?i.replace(/^\?/,""):i;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=s.parameterLimit===1/0?void 0:s.parameterLimit,d=u.split(s.delimiter,s.throwOnLimitExceeded?l+1:l);if(s.throwOnLimitExceeded&&d.length>l)throw new RangeError("Parameter limit exceeded. Only "+l+" parameter"+(1===l?"":"s")+" allowed.");var f,p=-1,y=s.charset;if(s.charsetSentinel)for(f=0;f<d.length;++f)0===d[f].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[f]?y="utf-8":"utf8=%26%2310003%3B"===d[f]&&(y="iso-8859-1"),p=f,f=d.length);for(f=0;f<d.length;++f)if(f!==p){var h,m,g=d[f],b=g.indexOf("]="),v=-1===b?g.indexOf("="):b+1;-1===v?(h=s.decoder(g,n.decoder,y,"key"),m=s.strictNullHandling?null:""):(h=s.decoder(g.slice(0,v),n.decoder,y,"key"),m=e.maybeMap(a(g.slice(v+1),s,r(c[h])?c[h].length:0),function(e){return s.decoder(e,n.decoder,y,"value")})),m&&s.interpretNumericEntities&&"iso-8859-1"===y&&(m=o(String(m))),g.indexOf("[]=")>-1&&(m=r(m)?[m]:m);var w=t.call(c,h);w&&"combine"===s.duplicates?c[h]=e.combine(c[h],m):w&&"last"!==s.duplicates||(c[h]=m)}return c}(s,u):s,d=u.plainObjects?{__proto__:null}:{},f=Object.keys(l),p=0;p<f.length;++p){var y=f[p],h=i(y,l[y],u,"string"==typeof s);d=e.merge(d,h,u)}return!0===u.allowSparse?d:e.compact(d)}}();return sa={formats:Aa(),parse:t,stringify:e}}());const Pa={type:"session",prefix:"",enableLogging:!1,fallbackToMemory:!0,maxRetries:3};class ka{constructor(){this.data=new Map}setItem(e,t){this.data.set(e,t)}getItem(e){return this.data.get(e)||null}removeItem(e){this.data.delete(e)}clear(){this.data.clear()}get length(){return this.data.size}key(e){return Array.from(this.data.keys())[e]||null}keys(){return Array.from(this.data.keys())}}const ja=(e,t)=>{let r=0;for(;r<=t;)try{return e()}catch(e){if(r===t)throw e;r++}},Ca=(e={})=>{const t={...Pa,...e},r="local"===t.type?"localStorage":"sessionStorage";let n=null,o=!1;(()=>{if("undefined"==typeof window)return void(t.fallbackToMemory&&(n=new ka,o=!0,t.enableLogging&&console.warn("CacheFactory: Browser storage unavailable, using memory fallback")));const e=window[r];(e=>{if(!e)return!1;try{const t="__cache_factory_test__",r="test";e.setItem(t,r);const n=e.getItem(t);return e.removeItem(t),n===r}catch(e){return!1}})(e)?n=e:t.fallbackToMemory&&(n=new ka,o=!0,t.enableLogging&&console.warn(`CacheFactory: ${r} unavailable, using memory fallback`))})();const a=e=>t.prefix?`${t.prefix}${e}`:e,i=(e,n,a=null)=>{t.enableLogging&&console.debug(`CacheFactory[${r}]: ${e}`,{key:n,data:a,usingMemoryFallback:o})};return{isAvailable:()=>null!==n,isUsingMemoryFallback:()=>o,getStorageType:()=>o?"memory":r,set(e,r){if(!n)return console.error("CacheFactory: Storage not available"),!1;if(!e||"string"!=typeof e)throw new Error("CacheFactory: Invalid key provided");const o=a(e),s=(e=>{try{return JSON.stringify(e)}catch(e){return console.error("CacheFactory: Failed to serialize value",e),null}})(r);if(null===s)return!1;try{return ja(()=>{n.setItem(o,s)},t.maxRetries),i("SET",e,r),!0}catch(t){return console.error(`CacheFactory: Error setting item ${e}:`,t),!1}},get(e,r=null){if(!n)return console.warn("CacheFactory: Storage not available"),r;if(!e||"string"!=typeof e||"undefined"===e)return console.warn("CacheFactory: Invalid key provided for get operation"),r;const o=a(e);try{const a=ja(()=>n.getItem(o),t.maxRetries);if(null===a||"undefined"===a)return i("GET_MISS",e),r;const s=(e=>{if(null==e)return null;try{return JSON.parse(e)}catch(t){return e}})(a);return i("GET_HIT",e,s),s}catch(t){return console.error(`CacheFactory: Error getting item ${e}:`,t),r}},remove(e){if(!n)return console.error("CacheFactory: Storage not available"),!1;if(!e||"string"!=typeof e)return console.warn("CacheFactory: Invalid key provided for remove operation"),!1;const r=a(e);try{return ja(()=>{n.removeItem(r)},t.maxRetries),i("REMOVE",e),!0}catch(t){return console.error(`CacheFactory: Error removing item ${e}:`,t),!1}},clear(){if(!n)return console.error("CacheFactory: Storage not available"),!1;try{return t.prefix?this.keys().forEach(e=>this.remove(e)):ja(()=>{n.clear()},t.maxRetries),i("CLEAR"),!0}catch(e){return console.error("CacheFactory: Error clearing storage:",e),!1}},keys(){if(!n)return console.warn("CacheFactory: Storage not available"),[];try{let e=[];e=o?n.keys():Object.keys(n);const r=t.prefix?e.filter(e=>e.startsWith(t.prefix)).map(e=>{return r=e,t.prefix&&r.startsWith(t.prefix)?r.slice(t.prefix.length):r;var r}):e;return i("KEYS",null,r),r}catch(e){return console.error("CacheFactory: Error getting keys:",e),[]}},has(e){if(!n||!e||"string"!=typeof e)return!1;const r=a(e);try{const o=ja(()=>null!==n.getItem(r),t.maxRetries);return i("HAS",e,o),o}catch(t){return console.error(`CacheFactory: Error checking if key ${e} exists:`,t),!1}},getStats(){const e=this.keys();return{keyCount:e.length,storageType:this.getStorageType(),usingMemoryFallback:o,prefix:t.prefix||"none",keys:e}},bulk:{set:e=>{const t={};return Object.entries(e).forEach(([e,r])=>{t[e]=this.set(e,r)}),t},get:e=>{const t={};return e.forEach(e=>{t[e]=this.get(e)}),t},remove:e=>{const t={};return e.forEach(e=>{t[e]=this.remove(e)}),t}}}};Ca.local=Ca({type:"local"}),Ca.session=Ca({type:"session"}),e.Cache=Ca({type:"local"}),Ca.memory=Ca({type:"session",fallbackToMemory:!0});const Na={BASE_URL:null,baseUrls:{production:process.env.API_BASE_URL_PROD||"http://fear.master.com/fear/api/",development:process.env.API_BASE_URL_DEV||"http://localhost:4000/fear/api/",test:process.env.API_BASE_URL_TEST||"https://fear.dedyn.io/fear/api/"},tokenNames:{bearer:"Authorization",custom:process.env.REACT_APP_JWT_TOKEN_HEADER||"x-token"},cacheKeys:{auth:"auth",refreshToken:"refresh_token",userPrefs:"user_preferences"},timeout:parseInt(process.env.REACT_APP_API_TIMEOUT)||3e4,retryAttempts:parseInt(process.env.REACT_APP_API_RETRY_ATTEMPTS)||3,retryDelay:parseInt(process.env.REACT_APP_API_RETRY_DELAY)||1e3},Ia=()=>{const e=process.env.NODE_ENV||"development";return Na.BASE_URL||(Na.BASE_URL=Na.baseUrls[e]||Na.baseUrls.development),Na.BASE_URL},xa=()=>{try{const e=Ca.local.get(Na.cacheKeys.auth);return e&&"object"==typeof e?e:null}catch(e){return console.warn("Failed to retrieve auth data:",e),null}},Da=e=>{if(!e)return!0;try{const t=JSON.parse(atob(e.split(".")[1])),r=Date.now()/1e3;return t.exp<r}catch(e){return!0}},Ma=async()=>{try{const e=xa(),t=e?.refreshToken||Ca.local.get(Na.cacheKeys.refreshToken);if(!t)throw new Error("No refresh token available");const r=await sn.post(`${Ia()}auth/refresh`,{refreshToken:t}),n={token:r.data.token,refreshToken:r.data.refreshToken||t,user:r.data.user,expiresAt:r.data.expiresAt};return Ca.local.set(Na.cacheKeys.auth,n),n.token}catch(e){return console.error("Token refresh failed:",e),qa(),null}},qa=()=>{try{Ca.local.remove(Na.cacheKeys.auth),Ca.local.remove(Na.cacheKeys.refreshToken)}catch(e){console.warn("Failed to clear auth data:",e)}},Fa=e=>{const t={message:"An unknown error occurred",status:null,code:null,data:null,timestamp:(new Date).toISOString()};return e.response?{...t,message:e.response.data?.message||`HTTP Error ${e.response.status}`,status:e.response.status,code:e.response.data?.code||e.code,data:e.response.data}:e.request?{...t,message:"Network error - no response received",code:"NETWORK_ERROR"}:{...t,message:e.message||"Request configuration error",code:e.code||"CONFIG_ERROR"}},Ua=async e=>{try{e.metadata={startTime:Date.now()},e._retry=e._retry||0;const t=xa();let r=t?.token;return r&&Da(r)&&0===e._retry&&(r=await Ma()),r&&(e.headers[Na.tokenNames.bearer]=`Bearer ${r}`,e.headers[Na.tokenNames.custom]=r),e.headers["X-Request-ID"]=`req_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,e.headers["X-Client-Version"]=process.env.REACT_APP_VERSION||"1.0.0",e.headers["X-Client-Platform"]="web",e}catch(t){return console.error("Request interceptor error:",t),e}},La=e=>(console.error("Request setup error:",e),Promise.reject(Fa(e))),$a=e=>(e.metadata={responseTime:Date.now()-(e.config.metadata?.startTime||Date.now()),requestId:e.config.headers["X-Request-ID"]},console.log("Loaded Env = ",process.env),"development"===process.env.NODE_ENV&&console.log(`✅ API Success [${e.status}]:`,{url:e.config.url,data:e.data,method:e.config.method?.toUpperCase(),responseTime:e.metadata.responseTime,requestId:e.metadata.requestId}),e.data&&"object"==typeof e.data&&[200,201,202,204].includes(e.status)||e.status>=200&&e.status<300?e:Promise.reject(Fa({response:e,message:`Unexpected response status: ${e.status}`}))),Qa=async e=>{const t=e.config,r=Fa(e);if("development"===process.env.NODE_ENV&&console.error(`❌ API Error [${r.status}]:`,{url:t?.url,error:r,method:t?.method?.toUpperCase(),message:r.message,requestId:t?.headers["X-Request-ID"]}),401===r.status&&!t._isRetryingAuth){t._isRetryingAuth=!0;try{const e=await Ma();if(e)return t.headers[Na.tokenNames.bearer]=`Bearer ${e}`,t.headers[Na.tokenNames.custom]=e,Ba(t)}catch(e){console.error("Auth refresh failed:",e)}qa(),"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("auth:failure",{detail:{error:r}}))}if(([408,429,500,502,503,504].includes(r.status)||"NETWORK_ERROR"===r.code)&&t._retry<Na.retryAttempts){t._retry+=1;const e=(n=t._retry,Na.retryDelay*Math.pow(2,n-1));return console.log(`⏳ Retrying request (${t._retry}/${Na.retryAttempts}) in ${e}ms`),await new Promise(t=>setTimeout(t,e)),Ba(t)}var n;if(429===r.status){const t=e.response?.headers["retry-after"];t&&(r.retryAfter=1e3*parseInt(t))}return Promise.reject(r)},Ba=(()=>{const e=sn.create({baseURL:Ia(),timeout:Na.timeout,headers:{Accept:"application/json","Content-Type":"application/json"},paramsSerializer:{serialize:e=>Ta.stringify(e,{indices:!1,skipNulls:!0,arrayFormat:"brackets"})},withCredentials:!0,transformResponse:[e=>{try{return JSON.parse(e)}catch(t){return e}}]});return e.interceptors.request.use(Ua,La),e.interceptors.response.use($a,Qa),e})(),za={instance:Ba,get:Ba.get.bind(Ba),post:Ba.post.bind(Ba),put:Ba.put.bind(Ba),patch:Ba.patch.bind(Ba),delete:Ba.delete.bind(Ba),head:Ba.head.bind(Ba),options:Ba.options.bind(Ba),request:e=>Ba.request(e),create:(e={})=>{const t=sn.create({...Ba.defaults,...e});return t.interceptors.request.use(Ua,La),t.interceptors.response.use($a,Qa),t},setAuth:(e,t={})=>{try{const r={token:e,user:t,timestamp:Date.now(),expiresAt:t.expiresAt};return Ca.local.set(Na.cacheKeys.auth,r)}catch(e){return console.error("Failed to set auth:",e),!1}},clearAuth:()=>{try{return qa(),!0}catch(e){return console.error("Failed to clear auth:",e),!1}},getAuthStatus:()=>{const e=xa();return{isAuthenticated:!(!e?.token||Da(e.token)),user:e?.user||null,token:e?.token||null,expiresAt:e?.expiresAt||null}},configure:e=>{Object.assign(Ba.defaults,e)},healthCheck:async()=>{try{return{status:"healthy",response:(await Ba.get("health",{timeout:5e3})).data,timestamp:Date.now()}}catch(e){return{status:"unhealthy",error:Fa(e),timestamp:Date.now()}}},uploadFile:(e,t,r)=>Ba.post(e,t,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:e=>{if(r&&e.total){const t=Math.round(100*e.loaded/e.total);r(t,e)}}}),getCached:(e,t=null)=>Ca.local.get(e,t),setCached:(e,t)=>Ca.local.set(e,t),removeCached:e=>Ca.local.remove(e),clearCache:()=>Ca.local.clear(),getCacheStats:()=>Ca.local.getStats(),cache:{getMultiple:e=>Ca.local.bulk.get(e),setMultiple:e=>Ca.local.bulk.set(e),removeMultiple:e=>Ca.local.bulk.remove(e)},config:Na,getBaseUrl:Ia,setBaseUrl:e=>{Na.BASE_URL=e||Na.baseUrls.development,Ia()}};"undefined"!=typeof window&&window.addEventListener("auth:failure",e=>{console.warn("Authentication failed:",e.detail.error)});const Va={GET:"GET",POST:"POST",PUT:"PUT",PATCH:"PATCH",DELETE:"DELETE"},Ka={all:{method:Va.GET,useParams:!1},one:{method:Va.GET,useParams:!0,useIdInUrl:!0},search:{method:Va.POST,useParams:!0},new:{method:Va.POST,useParams:!1},create:{method:Va.POST,useParams:!1},update:{method:Va.PUT,useParams:!1,useIdInUrl:!0},patch:{method:Va.PATCH,useParams:!1,useIdInUrl:!0},delete:{method:Va.DELETE,useParams:!1,useIdInUrl:!0}},Ha=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Entity must be a non-empty string");if(!t||"string"!=typeof t)throw new Error("Prefix must be a non-empty string")},Wa=(e,t,r={})=>{Ha(e,t);const n={method:Va.GET,useParams:!1,useIdInUrl:!1,customUrl:null,customApiUrl:null,...r};return Ue(`${e}/${t}`,async(r={},o)=>{try{const o=((e,t,r={},n=!1)=>{let o=`${e}`;return o+=r?.id||n?`/${r.id}`:`/${t}`,o})(e,t,r,n.useIdInUrl);let a;const i=n.useParams?{params:r}:{};switch(n.method){case Va.GET:a=za.get(o,i);break;case Va.POST:a=za.post(o,r,i);break;case Va.PUT:a=za.put(o,r,i);break;case Va.PATCH:a=za.patch(o,r,i);break;case Va.DELETE:a=za.delete(o,i);break;default:throw new Error(`Unsupported HTTP method: ${n.method}`)}return(e=>void 0!==e?.data?.result?e.data.result:void 0!==e?.data?e.data:e)(await a)}catch(e){return((e,t)=>{const r={message:e?.response?.data?.message||e?.message||"An unknown error occurred",status:e?.response?.status,code:e?.code};return t.rejectWithValue(r)})(e,o)}})},Ga={create:(e,t)=>(Ha(e,t),Ka[t]?Wa(e,t):Wa(e,t,{method:Va.GET,useParams:"search"===t,useIdInUrl:"one"===t})),post:(e,t)=>Wa(e,t,{method:Va.POST,useParams:!0}),put:(e,t)=>Wa(e,t,{method:Va.PUT,useIdInUrl:"update"===t}),patch:(e,t)=>Wa(e,t,{method:Va.PATCH,useIdInUrl:!0}),delete:(e,t)=>Wa(e,t,{method:Va.DELETE,useIdInUrl:!0}),custom:(e,t,r={})=>Wa(e,t,r),createCrud:e=>(Ha(e,"crud"),{fetch:Ga.create(e,"all"),read:Ga.create(e,"one"),create:Ga.post(e,"create"),update:Ga.put(e,"update"),patch:Ga.patch(e,"patch"),delete:Ga.delete(e,"delete"),search:Ga.post(e,"search")}),getHttpMethods:()=>({...Va}),getStandardOperations:()=>({...Ka}),setApiUrl:e=>{Ga.API_URL=e,Ga.getApiUrl()},getApiUrl:()=>Ga.API_URL},Ja={includeEntityState:!0,includePagination:!0,includeFiltering:!0,includeSorting:!0,includeSelection:!0,includeValidation:!1,includeMetadata:!0,customFields:{}},Ya={IDLE:"idle",PENDING:"pending",FULFILLED:"fulfilled",REJECTED:"rejected"},Xa={ASC:"asc",DESC:"desc"},Za=(e,t)=>{if(!t||"object"!=typeof t)return e;const r={...e};return Object.keys(t).forEach(n=>{t[n]&&"object"==typeof t[n]&&!Array.isArray(t[n])?r[n]=Za(e[n]||{},t[n]):r[n]=t[n]}),r},ei=(e,t={})=>{(e=>{if(!e||"string"!=typeof e)throw new Error("Namespace must be a non-empty string");if(!/^[a-zA-Z][a-zA-Z0-9_]*$/.test(e))throw new Error("Namespace must be a valid identifier (letters, numbers, underscore, starting with letter)")})(e);const r={...Ja,...t},n={...{data:[],loading:!1,success:!1,error:null,loadingState:Ya.IDLE,...r.includeEntityState&&{[e]:null,[`${e}List`]:[],[`current${e.charAt(0).toUpperCase()+e.slice(1)}`]:null}},...{...r.includePagination&&{pagination:{currentPage:1,pageSize:10,totalItems:0,totalPages:0,hasNextPage:!1,hasPreviousPage:!1}},...r.includeFiltering&&{filtering:{filters:{},activeFilters:[],searchTerm:"",searchFields:[]}},...r.includeSorting&&{sorting:{sortBy:null,sortOrder:Xa.ASC,multiSort:[]}},...r.includeSelection&&{selection:{selectedItems:[],selectedIds:[],allSelected:!1,selectionMode:"multiple"}},...r.includeValidation&&{validation:{validationErrors:{},isValid:!0,fieldErrors:{},touched:{}}},...r.includeMetadata&&{metadata:{lastFetch:null,lastUpdate:null,version:0,source:null,cached:!1,stale:!1}},async:{operations:{},globalLoading:!1,operationQueue:[]}},...r.customFields};return console.log("Initial State :: ",n),n};ei.minimal=e=>ei(e,{includeEntityState:!0,includePagination:!1,includeFiltering:!1,includeSorting:!1,includeSelection:!1,includeValidation:!1,includeMetadata:!1}),ei.forList=e=>ei(e,{includeEntityState:!0,includePagination:!0,includeFiltering:!0,includeSorting:!0,includeSelection:!0,includeValidation:!1,includeMetadata:!0}),ei.forForm=e=>ei(e,{includeEntityState:!0,includePagination:!1,includeFiltering:!1,includeSorting:!1,includeSelection:!1,includeValidation:!0,includeMetadata:!0,customFields:{formData:{},isDirty:!1,isSubmitting:!1,submitCount:0}}),ei.forRealTime=e=>ei(e,{includeEntityState:!0,includePagination:!1,includeFiltering:!1,includeSorting:!1,includeSelection:!1,includeValidation:!1,includeMetadata:!0,customFields:{connected:!1,connectionStatus:"disconnected",lastHeartbeat:null,subscriptions:[],liveUpdates:!0}}),ei.normalized=e=>ei(e,{includeEntityState:!1,customFields:{ids:[],entities:{}}}),ei.withOperations=(e,t=[])=>{const r=t.reduce((e,t)=>(e[`${t}Loading`]=!1,e[`${t}Success`]=!1,e[`${t}Error`]=null,e),{});return ei(e,{customFields:{...r,operations:t.reduce((e,t)=>(e[t]={loading:!1,success:!1,error:null,lastRun:null},e),{})}})},ei.utils={getLoadingStates:()=>({...Ya}),getSortOrders:()=>({...Xa}),createLoadingUpdates:(e="default")=>({pending:{loading:!0,success:!1,error:null,loadingState:Ya.PENDING,[`async.operations.${e}.loading`]:!0},fulfilled:{loading:!1,success:!0,error:null,loadingState:Ya.FULFILLED,[`async.operations.${e}.loading`]:!1,[`async.operations.${e}.success`]:!0,[`async.operations.${e}.lastRun`]:(new Date).toISOString()},rejected:t=>({loading:!1,success:!1,error:t,loadingState:Ya.REJECTED,[`async.operations.${e}.loading`]:!1,[`async.operations.${e}.error`]:t,[`async.operations.${e}.lastRun`]:(new Date).toISOString()})}),validateState:(e,t)=>!(!e||"object"!=typeof e||!Array.isArray(e.data)||"boolean"!=typeof e.loading||"boolean"!=typeof e.success),mergeState:Za,resetState:(e,t={})=>ei(e,t)};const ti=(e,t,r)=>{Object.entries(t).forEach(([t,n])=>{e.addCase(n.pending,e=>{e.loading=!0,e.error=null,e.loadingState="pending",e.async?.operations&&(e.async.operations[t]={loading:!0,success:!1,error:null,lastRun:(new Date).toISOString()})}).addCase(n.fulfilled,(e,n)=>{e.loading=!1,e.success=!0,e.loadingState="fulfilled";const o=n.payload;if(console.log("payload = ",o),"fetch"===t||"search"===t)e.data=Array.isArray(o)?o:o?.data.result||[];else if("fetchOne"===t)e[r]=Array.isArray(o)?o[0]:o;else if("create"===t)Array.isArray(e.data)&&e.data.push(o);else if("update"===t||"patch"===t){if(Array.isArray(e.data)){const t=e.data.findIndex(e=>e.id===o.id);-1!==t&&(e.data[t]=o)}e[r]?.id===o.id&&(e[r]=o)}else"delete"===t&&Array.isArray(e.data)&&(e.data=e.data.filter(e=>e.id!==n.meta.arg?.id));e.metadata&&(e.metadata.lastUpdate=(new Date).toISOString(),e.metadata.stale=!1,"fetch"!==t&&"fetchOne"!==t&&"search"!==t||(e.metadata.lastFetch=(new Date).toISOString())),e.async?.operations&&(e.async.operations[t]={loading:!1,success:!0,error:null,lastRun:(new Date).toISOString()})}).addCase(n.rejected,(e,r)=>{e.loading=!1,e.success=!1,e.error=r.error?.message||r.payload||"An error occurred",e.loadingState="rejected",e.async?.operations&&(e.async.operations[t]={loading:!1,success:!1,error:e.error,lastRun:(new Date).toISOString()})})})};var ri=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},ni=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(ni||{});function oi(e){return{status:e,isUninitialized:"uninitialized"===e,isLoading:"pending"===e,isSuccess:"fulfilled"===e,isError:"rejected"===e}}var ai=o;function ii(e,t){if(e===t||!(ai(e)&&ai(t)||Array.isArray(e)&&Array.isArray(t)))return t;const r=Object.keys(t),n=Object.keys(e);let o=r.length===n.length;const a=Array.isArray(t)?[]:{};for(const n of r)a[n]=ii(e[n],t[n]),o&&(o=e[n]===a[n]);return o?e:a}function si(e){let t=0;for(const r in e)t++;return t}var ci=e=>[].concat(...e);function ui(e){return null!=e}function li(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var di=()=>new Map,fi=(...e)=>fetch(...e),pi=e=>e.status>=200&&e.status<=299,yi=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function hi(e){if(!o(e))return e;const t={...e};for(const[e,r]of Object.entries(t))void 0===r&&delete t[e];return t}function mi({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:r=fi,paramsSerializer:n,isJsonContentType:a=yi,jsonContentType:i="application/json",jsonReplacer:s,timeout:c,responseHandler:u,validateStatus:l,...d}={}){return"undefined"==typeof fetch&&r===fi&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(p,y,h)=>{const{getState:m,extra:g,endpoint:b,forced:v,type:w}=y;let S,E,{url:O,headers:_=new Headers(d.headers),params:A,responseHandler:R=u??"json",validateStatus:T=l??pi,timeout:P=c,...k}="string"==typeof p?{url:p}:p,j=y.signal;P&&(E=new AbortController,y.signal.addEventListener("abort",E.abort),j=E.signal);let C={...d,signal:j,...k};_=new Headers(hi(_)),C.headers=await t(_,{getState:m,arg:p,extra:g,endpoint:b,forced:v,type:w,extraOptions:h})||_;const N=e=>"object"==typeof e&&(o(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!C.headers.has("content-type")&&N(C.body)&&C.headers.set("content-type",i),N(C.body)&&a(C.headers)&&(C.body=JSON.stringify(C.body,s)),A){const e=~O.indexOf("?")?"&":"?";O+=e+(n?n(A):new URLSearchParams(hi(A)))}O=function(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;const r=e.endsWith("/")||!t.startsWith("?")?"/":"";return`${e=(e=>e.replace(/\/$/,""))(e)}${r}${t=(e=>e.replace(/^\//,""))(t)}`}(e,O);const I=new Request(O,C);S={request:new Request(O,C)};let x,D=!1,M=E&&setTimeout(()=>{D=!0,E.abort()},P);try{x=await r(I)}catch(e){return{error:{status:D?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:S}}finally{M&&clearTimeout(M),E?.signal.removeEventListener("abort",E.abort)}const q=x.clone();let F;S.response=q;let U="";try{let e;if(await Promise.all([f(x,R).then(e=>F=e,t=>e=t),q.text().then(e=>U=e,()=>{})]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:x.status,data:U,error:String(e)},meta:S}}return T(x,F)?{data:F,meta:S}:{error:{status:x.status,data:F},meta:S}};async function f(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=a(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var gi=class{constructor(e,t=void 0){this.value=e,this.meta=t}},bi=me("__rtkq/focused"),vi=me("__rtkq/unfocused"),wi=me("__rtkq/online"),Si=me("__rtkq/offline");function Ei(e){return"query"===e.type}function Oi(e){return"infinitequery"===e.type}function _i(e){return Ei(e)||Oi(e)}function Ai(e,t,r,n,o,a){return"function"==typeof e?e(t,r,n,o).filter(ui).map(Ri).map(a):Array.isArray(e)?e.map(Ri).map(a):[]}function Ri(e){return"string"==typeof e?{type:e}:e}var Ti=Symbol("forceQueryFn"),Pi=e=>"function"==typeof e[Ti],ki=class extends ri{constructor(e,t,r,n){super(e),this.value=t,this.schemaName=r,this._bqMeta=n}},ji=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function Ci(e,t,r,n){const o=await e["~standard"].validate(t);if(o.issues)throw new ki(o.issues,t,r,n);return o.value}function Ni(e){return e}var Ii=(e={})=>({...e,[we]:!0});function xi(e,{pages:t,pageParams:r},n){const o=t.length-1;return e.getNextPageParam(t[o],t,r[o],r,n)}function Di(e,{pages:t,pageParams:r},n){return e.getPreviousPageParam?.(t[0],t,r[0],r,n)}function Mi(e,t,r,n){return Ai(r[e.meta.arg.endpointName][t],Ce(e)?e.payload:void 0,je(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function qi(e,t,r){const n=e[t];n&&r(n)}function Fi(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function Ui(e,t,r){const n=e[Fi(t)];n&&r(n)}var Li={};function $i({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:a,extractRehydrationInfo:i,hasRehydrationInfo:c},assertTagType:u,config:l}){const f=me(`${e}/resetApiState`);function y(e,t,r,n){e[t.queryCacheKey]??={status:"uninitialized",endpointName:t.endpointName},qi(e,t.queryCacheKey,e=>{e.status="pending",e.requestId=r&&e.requestId?e.requestId:n.requestId,void 0!==t.originalArgs&&(e.originalArgs=t.originalArgs),e.startedTimeStamp=n.startedTimeStamp,Oi(o[n.arg.endpointName])&&"direction"in t&&(e.direction=t.direction)})}function m(e,t,r,n){qi(e,t.arg.queryCacheKey,e=>{if(e.requestId!==t.requestId&&!n)return;const{merge:a}=o[t.arg.endpointName];if(e.status="fulfilled",a)if(void 0!==e.data){const{fulfilledTimeStamp:n,arg:o,baseQueryMeta:i,requestId:s}=t;let c=te(e.data,e=>a(e,r,{arg:o.originalArgs,baseQueryMeta:i,fulfilledTimeStamp:n,requestId:s}));e.data=c}else e.data=r;else e.data=o[t.arg.endpointName].structuralSharing??1?ii(h(e.data)?(h(i=e.data)||p(15,i),i[d].base_):e.data,r):r;var i;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp})}const g=ze({name:`${e}/queries`,initialState:Li,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:Se()},cacheEntriesUpserted:{reducer(e,t){for(const r of t.payload){const{queryDescription:n,value:o}=r;y(e,n,!0,{arg:n,requestId:t.meta.requestId,startedTimeStamp:t.meta.timestamp}),m(e,{arg:n,requestId:t.meta.requestId,fulfilledTimeStamp:t.meta.timestamp,baseQueryMeta:{}},o,!0)}},prepare:e=>({payload:e.map(e=>{const{endpointName:t,arg:r,value:a}=e,i=o[t];return{queryDescription:{type:"query",endpointName:t,originalArgs:e.arg,queryCacheKey:n({queryArgs:r,endpointDefinition:i,endpointName:t})},value:a}}),meta:{[we]:!0,requestId:Ie(),timestamp:Date.now()}})},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:r}}){qi(e,t,e=>{e.data=ne(e.data,r.concat())})},prepare:Se()}},extraReducers(e){e.addCase(t.pending,(e,{meta:t,meta:{arg:r}})=>{y(e,r,Pi(r),t)}).addCase(t.fulfilled,(e,{meta:t,payload:r})=>{m(e,t,r,Pi(t.arg))}).addCase(t.rejected,(e,{meta:{condition:t,arg:r,requestId:n},error:o,payload:a})=>{qi(e,r.queryCacheKey,e=>{if(t);else{if(e.requestId!==n)return;e.status="rejected",e.error=a??o}})}).addMatcher(c,(e,t)=>{const{queries:r}=i(t);for(const[t,n]of Object.entries(r))"fulfilled"!==n?.status&&"rejected"!==n?.status||(e[t]=n)})}}),b=ze({name:`${e}/mutations`,initialState:Li,reducers:{removeMutationResult:{reducer(e,{payload:t}){const r=Fi(t);r in e&&delete e[r]},prepare:Se()}},extraReducers(e){e.addCase(r.pending,(e,{meta:t,meta:{requestId:r,arg:n,startedTimeStamp:o}})=>{n.track&&(e[Fi(t)]={requestId:r,status:"pending",endpointName:n.endpointName,startedTimeStamp:o})}).addCase(r.fulfilled,(e,{payload:t,meta:r})=>{r.arg.track&&Ui(e,r,e=>{e.requestId===r.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=r.fulfilledTimeStamp)})}).addCase(r.rejected,(e,{payload:t,error:r,meta:n})=>{n.arg.track&&Ui(e,n,e=>{e.requestId===n.requestId&&(e.status="rejected",e.error=t??r)})}).addMatcher(c,(e,t)=>{const{mutations:r}=i(t);for(const[t,n]of Object.entries(r))"fulfilled"!==n?.status&&"rejected"!==n?.status||t===n?.requestId||(e[t]=n)})}}),v=ze({name:`${e}/invalidation`,initialState:{tags:{},keys:{}},reducers:{updateProvidedBy:{reducer(e,t){for(const{queryCacheKey:r,providedTags:n}of t.payload){w(e,r);for(const{type:t,id:o}of n){const n=(e.tags[t]??={})[o||"__internal_without_id"]??=[];n.includes(r)||n.push(r)}e.keys[r]=n}},prepare:Se()}},extraReducers(e){e.addCase(g.actions.removeQueryResult,(e,{payload:{queryCacheKey:t}})=>{w(e,t)}).addMatcher(c,(e,t)=>{const{provided:r}=i(t);for(const[t,n]of Object.entries(r.tags??{}))for(const[o,a]of Object.entries(n)){const n=(e.tags[t]??={})[o||"__internal_without_id"]??=[];for(const t of a)n.includes(t)||n.push(t),e.keys[t]=r.keys[t]}}).addMatcher(_e(Ce(t),je(t)),(e,t)=>{S(e,[t])}).addMatcher(g.actions.cacheEntriesUpserted.match,(e,t)=>{S(e,t.payload.map(({queryDescription:e,value:t})=>({type:"UNKNOWN",payload:t,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:e}})))})}});function w(e,t){const r=e.keys[t]??[];for(const n of r){const r=n.type,o=n.id??"__internal_without_id",a=e.tags[r]?.[o];a&&(e.tags[r][o]=a.filter(e=>e!==t))}delete e.keys[t]}function S(e,t){const r=t.map(e=>{const t=Mi(e,"providesTags",o,u),{queryCacheKey:r}=e.meta.arg;return{queryCacheKey:r,providedTags:t}});v.caseReducers.updateProvidedBy(e,v.actions.updateProvidedBy(r))}const E=ze({name:`${e}/subscriptions`,initialState:Li,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),O=ze({name:`${e}/internalSubscriptions`,initialState:Li,reducers:{subscriptionsUpdated:{reducer:(e,t)=>ne(e,t.payload),prepare:Se()}}}),_=ze({name:`${e}/config`,initialState:{online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...l},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&a===t||"conflict"}},extraReducers:e=>{e.addCase(wi,e=>{e.online=!0}).addCase(Si,e=>{e.online=!1}).addCase(bi,e=>{e.focused=!0}).addCase(vi,e=>{e.focused=!1}).addMatcher(c,e=>({...e}))}}),A=s({queries:g.reducer,mutations:b.reducer,provided:v.reducer,subscriptions:O.reducer,config:_.reducer});return{reducer:(e,t)=>A(f.match(t)?void 0:e,t),actions:{..._.actions,...g.actions,...E.actions,...O.actions,...b.actions,...v.actions,resetApiState:f}}}var Qi=Symbol.for("RTKQ/skipToken"),Bi={status:"uninitialized"},zi=te(Bi,()=>{}),Vi=te(Bi,()=>{}),Ki=WeakMap?new WeakMap:void 0,Hi=({endpointName:e,queryArgs:t})=>{let r="";const n=Ki?.get(t);if("string"==typeof n)r=n;else{const e=JSON.stringify(t,(e,t)=>t=o(t="bigint"==typeof t?{$bigint:t.toString()}:t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t);o(t)&&Ki?.set(t,e),r=e}return`${e}(${r})`};function Wi(e,...t){return Object.assign(e,...t)}var Gi=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:o,selectors:{selectQueryEntry:a,selectConfig:i},getRunningQueryThunk:s,mwApi:c})=>{const{removeQueryResult:u,unsubscribeQueryResult:l,cacheEntriesUpserted:d}=t.internalActions,f=o.runningQueries.get(c.dispatch),p=_e(l.match,r.fulfilled,r.rejected,d.match);function y(e){const t=o.currentSubscriptions.get(e);return!!t&&(t.size>0||void 0!==f?.[e])}const h={};function m(e,t,r){const n=t.getState();for(const o of e){const e=a(n,o);e?.endpointName&&g(o,e.endpointName,t,r)}}function g(e,t,r,o){const i=n.endpointDefinitions[t],c=i?.keepUnusedDataFor??o.keepUnusedDataFor;if(c===1/0)return;const l=Math.max(0,Math.min(c,2147482.647));if(!y(e)){const t=h[e];t&&clearTimeout(t),h[e]=setTimeout(()=>{if(!y(e)){const t=a(r.getState(),e);if(t?.endpointName){const e=r.dispatch(s(t.endpointName,t.originalArgs));e?.abort()}r.dispatch(u({queryCacheKey:e}))}delete h[e]},1e3*l)}}return(e,r,o)=>{const a=r.getState(),s=i(a);if(p(e)){let t;if(d.match(e))t=e.payload.map(e=>e.queryDescription.queryCacheKey);else{const{queryCacheKey:r}=l.match(e)?e.payload:e.meta.arg;t=[r]}m(t,r,s)}if(t.util.resetApiState.match(e))for(const[e,t]of Object.entries(h))t&&clearTimeout(t),delete h[e];if(n.hasRehydrationInfo(e)){const{queries:t}=n.extractRehydrationInfo(e);m(Object.keys(t),r,s)}}},Ji=new Error("Promise never resolved before cacheEntryRemoved."),Yi=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:a,selectors:{selectQueryEntry:i,selectApiState:s}})=>{const c=Ne(n),u=Ne(o),l=Ce(n,o),d={};function f(e,t,r){const n=d[e];n?.valueResolved&&(n.valueResolved({data:t,meta:r}),delete n.valueResolved)}function p(e){const t=d[e];t&&(delete d[e],t.cacheEntryRemoved())}function y(t,n,o,a,i){const s=r.endpointDefinitions[t],c=s?.onCacheEntryAdded;if(!c)return;const u={},l=new Promise(e=>{u.cacheEntryRemoved=e}),f=Promise.race([new Promise(e=>{u.valueResolved=e}),l.then(()=>{throw Ji})]);f.catch(()=>{}),d[o]=u;const p=e.endpoints[t].select(_i(s)?n:o),y=a.dispatch((e,t,r)=>r),h={...a,getCacheEntry:()=>p(a.getState()),requestId:i,extra:y,updateCachedData:_i(s)?r=>a.dispatch(e.util.updateQueryData(t,n,r)):void 0,cacheDataLoaded:f,cacheEntryRemoved:l},m=c(n,h);Promise.resolve(m).catch(e=>{if(e!==Ji)throw e})}return(r,a,s)=>{const h=function(t){return c(t)?t.meta.arg.queryCacheKey:u(t)?t.meta.arg.fixedCacheKey??t.meta.requestId:e.internalActions.removeQueryResult.match(t)?t.payload.queryCacheKey:e.internalActions.removeMutationResult.match(t)?Fi(t.payload):""}(r);function m(e,t,r,n){const o=i(s,t),c=i(a.getState(),t);!o&&c&&y(e,n,t,a,r)}if(n.pending.match(r))m(r.meta.arg.endpointName,h,r.meta.requestId,r.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(r))for(const{queryDescription:e,value:t}of r.payload){const{endpointName:n,originalArgs:o,queryCacheKey:a}=e;m(n,a,r.meta.requestId,o),f(a,t,{})}else if(o.pending.match(r))a.getState()[t].mutations[h]&&y(r.meta.arg.endpointName,r.meta.arg.originalArgs,h,a,r.meta.requestId);else if(l(r))f(h,r.payload,r.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(r)||e.internalActions.removeMutationResult.match(r))p(h);else if(e.util.resetApiState.match(r))for(const e of Object.keys(d))p(e)}},Xi=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),"undefined"!=typeof process&&"development"===process.env.NODE_ENV&&e.internalActions.middlewareRegistered.match(n)&&n.payload===t&&"conflict"===o.getState()[r]?.config?.middlewareRegistered&&console.warn(`There is a mismatch between slice and middleware for the reducerPath "${r}".\nYou can only have one api per reducer path, this will lead to crashes in various situations!${"api"===r?"\nIf you have multiple apis, you *have* to specify the reducerPath option when using createApi!":""}`)},Zi=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:o,api:a,assertTagType:i,refetchQuery:s,internalState:c})=>{const{removeQueryResult:u}=a.internalActions,l=_e(Ce(n),je(n)),d=_e(Ce(n,o),ke(n,o));let f=[];function p(r,n){const o=n.getState(),i=o[e];if(f.push(...r),"delayed"===i.config.invalidationBehavior&&function(e){const{queries:t,mutations:r}=e;for(const e of[t,r])for(const t in e)if("pending"===e[t]?.status)return!0;return!1}(i))return;const l=f;if(f=[],0===l.length)return;const d=a.util.selectInvalidatedBy(o,l);t.batch(()=>{const e=Array.from(d.values());for(const{queryCacheKey:t}of e){const e=i.queries[t],r=li(c.currentSubscriptions,t,di);e&&(0===r.size?n.dispatch(u({queryCacheKey:t})):"uninitialized"!==e.status&&n.dispatch(s(e)))}})}return(e,t)=>{l(e)?p(Mi(e,"invalidatesTags",r,i),t):d(e)?p([],t):a.util.invalidateTags.match(e)&&p(Ai(e.payload,void 0,void 0,void 0,void 0,i),t)}},es=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:o})=>{const{currentPolls:a,currentSubscriptions:i}=o,s=new Set;let c=null;function u(e,t){s.add(e),c||(c=setTimeout(()=>{for(const e of s)d({queryCacheKey:e},t);s.clear(),c=null},0))}function l({queryCacheKey:t},r){const o=r.getState()[e],s=o.queries[t],c=i.get(t);if(!s||"uninitialized"===s.status)return;const{lowestPollingInterval:u,skipPollingIfUnfocused:d}=p(c);if(!Number.isFinite(u))return;const f=a.get(t);f?.timeout&&(clearTimeout(f.timeout),f.timeout=void 0);const y=Date.now()+u;a.set(t,{nextPollTimestamp:y,pollingInterval:u,timeout:setTimeout(()=>{!o.config.focused&&d||r.dispatch(n(s)),l({queryCacheKey:t},r)},u)})}function d({queryCacheKey:t},r){const n=r.getState()[e].queries[t],o=i.get(t);if(!n||"uninitialized"===n.status)return;const{lowestPollingInterval:s}=p(o);if("test"===process.env.NODE_ENV){const e=a.pollUpdateCounters??={};e[t]??=0,e[t]++}if(!Number.isFinite(s))return void f(t);const c=a.get(t),u=Date.now()+s;(!c||u<c.nextPollTimestamp)&&l({queryCacheKey:t},r)}function f(e){const t=a.get(e);t?.timeout&&clearTimeout(t.timeout),a.delete(e)}function p(e=new Map){let t=!1,r=Number.POSITIVE_INFINITY;for(const n of e.values())n.pollingInterval&&(r=Math.min(n.pollingInterval,r),t=n.skipPollingIfUnfocused||t);return{lowestPollingInterval:r,skipPollingIfUnfocused:t}}return(e,n)=>{(r.internalActions.updateSubscriptionOptions.match(e)||r.internalActions.unsubscribeQueryResult.match(e))&&u(e.payload.queryCacheKey,n),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&u(e.meta.arg.queryCacheKey,n),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&l(e.meta.arg,n),r.util.resetApiState.match(e)&&(function(){for(const e of a.keys())f(e)}(),c&&(clearTimeout(c),c=null),s.clear())}},ts=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{const o=Pe(r,n),a=ke(r,n),i=Ce(r,n),s={};return(r,n)=>{if(o(r)){const{requestId:o,arg:{endpointName:a,originalArgs:i}}=r.meta,c=t.endpointDefinitions[a],u=c?.onQueryStarted;if(u){const t={},r=new Promise((e,r)=>{t.resolve=e,t.reject=r});r.catch(()=>{}),s[o]=t;const l=e.endpoints[a].select(_i(c)?i:o),d=n.dispatch((e,t,r)=>r),f={...n,getCacheEntry:()=>l(n.getState()),requestId:o,extra:d,updateCachedData:_i(c)?t=>n.dispatch(e.util.updateQueryData(a,i,t)):void 0,queryFulfilled:r};u(i,f)}}else if(i(r)){const{requestId:e,baseQueryMeta:t}=r.meta;s[e]?.resolve({data:r.payload,meta:t}),delete s[e]}else if(a(r)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:n}=r.meta;s[e]?.reject({error:r.payload??r.error,isUnhandledError:!t,meta:n}),delete s[e]}}};function rs(e){const{reducerPath:t,queryThunk:r,api:n,context:o,internalState:a}=e,{apiUid:i}=o,s={invalidateTags:me(`${t}/invalidateTags`)},u=e=>e.type.startsWith(`${t}/`),l=[Xi,Gi,Zi,es,Yi,ts];return{middleware:r=>{let s=!1;const f={...e,internalState:a,refetchQuery:d,isThisApiSliceAction:u,mwApi:r},p=l.map(e=>e(f)),y=(({api:e,queryThunk:t,internalState:r,mwApi:n})=>{const o=`${e.reducerPath}/subscriptions`;let a=null,i=null;const{updateSubscriptionOptions:s,unsubscribeQueryResult:c}=e.internalActions,u=()=>r.currentSubscriptions,l={getSubscriptions:u,getSubscriptionCount:e=>{const t=u().get(e);return t?.size??0},isRequestSubscribed:(e,t)=>{const r=u();return!!r?.get(e)?.get(t)}};function d(e){return JSON.parse(JSON.stringify(Object.fromEntries([...e].map(([e,t])=>[e,Object.fromEntries(t)]))))}return(n,u)=>{if(a||(a=d(r.currentSubscriptions)),e.util.resetApiState.match(n))return a={},r.currentSubscriptions.clear(),i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(n))return[!1,l];const f=((r,n)=>{if(s.match(n)){const{queryCacheKey:e,requestId:t,options:o}=n.payload,a=r.get(e);return a?.has(t)&&a.set(t,o),!0}if(c.match(n)){const{queryCacheKey:e,requestId:t}=n.payload,o=r.get(e);return o&&o.delete(t),!0}if(e.internalActions.removeQueryResult.match(n))return r.delete(n.payload.queryCacheKey),!0;if(t.pending.match(n)){const{meta:{arg:e,requestId:t}}=n,o=li(r,e.queryCacheKey,di);return e.subscribe&&o.set(t,e.subscriptionOptions??o.get(t)??{}),!0}let o=!1;if(t.rejected.match(n)){const{meta:{condition:e,arg:t,requestId:a}}=n;if(e&&t.subscribe){const e=li(r,t.queryCacheKey,di);e.set(a,t.subscriptionOptions??e.get(a)??{}),o=!0}}return o})(r.currentSubscriptions,n);let p=!0;if("test"===process.env.NODE_ENV&&"string"==typeof n.type&&n.type===`${e.reducerPath}/getPolling`)return[!1,r.currentPolls];if(f){i||(i=setTimeout(()=>{const t=d(r.currentSubscriptions),[,n]=re(a,()=>t);u.next(e.internalActions.subscriptionsUpdated(n)),a=t,i=null},500));const s="string"==typeof n.type&&!!n.type.startsWith(o),c=t.rejected.match(n)&&n.meta.condition&&!!n.meta.arg.subscribe;p=!s&&!c}return[p,!1]}})(f),h=(({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{const{removeQueryResult:a}=r.internalActions;function i(r,i){const s=r.getState()[e],c=s.queries,u=o.currentSubscriptions;t.batch(()=>{for(const e of u.keys()){const t=c[e],o=u.get(e);if(!o||!t)continue;const l=[...o.values()];(l.some(e=>!0===e[i])||l.every(e=>void 0===e[i])&&s.config[i])&&(0===o.size?r.dispatch(a({queryCacheKey:e})):"uninitialized"!==t.status&&r.dispatch(n(t)))}})}return(e,t)=>{bi.match(e)&&i(t,"refetchOnFocus"),wi.match(e)&&i(t,"refetchOnReconnect")}})(f);return e=>a=>{if(!c(a))return e(a);s||(s=!0,r.dispatch(n.internalActions.middlewareRegistered(i)));const l={...r,next:e},d=r.getState(),[f,m]=y(a,l,d);let g;if(g=f?e(a):m,r.getState()[t]&&(h(a,l,d),u(a)||o.hasRehydrationInfo(a)))for(const e of p)e(a,l,d);return g}},actions:s};function d(t){return e.api.endpoints[t.endpointName].initiate(t.originalArgs,{subscribe:!1,forceRefetch:!0})}}var ns=Symbol(),os=({createSelector:e=pe}={})=>({name:ns,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:a,keepUnusedDataFor:i,refetchOnMountOrArgChange:s,refetchOnFocus:c,refetchOnReconnect:u,invalidationBehavior:l,onSchemaFailure:d,catchSchemaFailure:f,skipSchemaValidation:p},y){Z();const h=e=>("undefined"!=typeof process&&"development"===process.env.NODE_ENV&&(n.includes(e.type)||console.error(`Tag type '${e.type}' was used, but not specified in \`tagTypes\`!`)),e);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:wi,onOffline:Si,onFocus:bi,onFocusLost:vi},util:{}});const g=function({serializeQueryArgs:e,reducerPath:t,createSelector:r}){const n=e=>zi,o=e=>Vi;return{buildQuerySelector:function(e,t){return u(e,t,a)},buildInfiniteQuerySelector:function(e,t){const{infiniteQueryOptions:r}=t;return u(e,t,function(e){const t={...e,...oi(e.status)},{isLoading:n,isError:o,direction:a}=t,i="forward"===a,s="backward"===a;return{...t,hasNextPage:l(r,t.data,t.originalArgs),hasPreviousPage:d(r,t.data,t.originalArgs),isFetchingNextPage:n&&i,isFetchingPreviousPage:n&&s,isFetchNextPageError:o&&i,isFetchPreviousPageError:o&&s}})},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?Fi(e)??Qi:e,r(t===Qi?o:e=>i(e)?.mutations?.[t]??Vi,a)}},selectInvalidatedBy:function(e,r){const n=e[t],o=new Set;for(const e of r.filter(ui).map(Ri)){const t=n.provided.tags[e.type];if(!t)continue;let r=(void 0!==e.id?t[e.id]:ci(Object.values(t)))??[];for(const e of r)o.add(e)}return ci(Array.from(o.values()).map(e=>{const t=n.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]}))},selectCachedArgsForQuery:function(e,t){return Object.values(s(e)).filter(e=>e?.endpointName===t&&"uninitialized"!==e.status).map(e=>e.originalArgs)},selectApiState:i,selectQueries:s,selectMutations:function(e){return i(e)?.mutations},selectQueryEntry:c,selectConfig:function(e){return i(e)?.config}};function a(e){return{...e,...oi(e.status)}}function i(e){const r=e[t];if("production"!==process.env.NODE_ENV&&!r){if(i.triggered)return r;i.triggered=!0,console.error(`Error: No data found at \`state.${t}\`. Did you forget to add the reducer to the store?`)}return r}function s(e){return i(e)?.queries}function c(e,t){return s(e)?.[t]}function u(t,o,a){return i=>{if(i===Qi)return r(n,a);const s=e({queryArgs:i,endpointDefinition:o,endpointName:t});return r(e=>c(e,s)??zi,a)}}function l(e,t,r){return!!t&&null!=xi(e,t,r)}function d(e,t,r){return!(!t||!e.getPreviousPageParam)&&null!=Di(e,t,r)}}({serializeQueryArgs:a,reducerPath:o,createSelector:e}),{selectInvalidatedBy:b,selectCachedArgsForQuery:v,buildQuerySelector:w,buildInfiniteQuerySelector:S,buildMutationSelector:E}=g;Wi(t.util,{selectInvalidatedBy:b,selectCachedArgsForQuery:v});const{queryThunk:O,infiniteQueryThunk:_,mutationThunk:A,patchQueryData:R,updateQueryData:T,upsertQueryData:P,prefetch:k,buildMatchThunkActions:j}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:a,selectors:i,onSchemaFailure:s,catchSchemaFailure:c,skipSchemaValidation:u}){function l(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}function d(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}const f=(e,t)=>e.query&&e[t]?e[t]:Ni,p=async(e,{signal:n,abort:o,rejectWithValue:a,fulfillWithValue:p,dispatch:h,getState:m,extra:g})=>{const b=r[e.endpointName],{metaSchema:v,skipSchemaValidation:w=u}=b;try{let S=Ni;const E={signal:n,abort:o,dispatch:h,getState:m,extra:g,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?y(e,m()):void 0,queryCacheKey:"query"===e.type?e.queryCacheKey:void 0},O="query"===e.type?e[Ti]:void 0;let _;const A=async(t,r,n,o)=>{if(null==r&&t.pages.length)return Promise.resolve({data:t});const a={queryArg:e.originalArgs,pageParam:r},i=await R(a),s=o?l:d;return{data:{pages:s(t.pages,i.data,n),pageParams:s(t.pageParams,r,n)},meta:i.meta}};async function R(r){let n;const{extraOptions:o,argSchema:a,rawResponseSchema:i,responseSchema:s}=b;if(a&&!ji(w,"arg")&&(r=await Ci(a,r,"argSchema",{})),O?n=O():b.query?(S=f(b,"transformResponse"),n=await t(b.query(r),E,o)):n=await b.queryFn(r,E,o,e=>t(e,E,o)),"undefined"!=typeof process&&"development"===process.env.NODE_ENV){const t=b.query?"`baseQuery`":"`queryFn`";let r;if(n){if("object"!=typeof n)r=`${t} did not return an object.`;else if(n.error&&n.data)r=`${t} returned an object containing both \`error\` and \`result\`.`;else if(void 0===n.error&&void 0===n.data)r=`${t} returned an object containing neither a valid \`error\` and \`result\`. At least one of them should not be \`undefined\``;else for(const e of Object.keys(n))if("error"!==e&&"data"!==e&&"meta"!==e){r=`The object returned by ${t} has the unknown property ${e}.`;break}}else r=`${t} did not return anything.`;r&&console.error(`Error encountered handling the endpoint ${e.endpointName}.\n ${r}\n It needs to return an object with either the shape \`{ data: <value> }\` or \`{ error: <value> }\` that may contain an optional \`meta\` property.\n Object returned was:`,n)}if(n.error)throw new gi(n.error,n.meta);let{data:c}=n;i&&!ji(w,"rawResponse")&&(c=await Ci(i,n.data,"rawResponseSchema",n.meta));let u=await S(c,n.meta,r);return s&&!ji(w,"response")&&(u=await Ci(s,u,"responseSchema",n.meta)),{...n,data:u}}if("query"===e.type&&"infiniteQueryOptions"in b){const{infiniteQueryOptions:T}=b,{maxPages:P=1/0}=T;let k;const j={pages:[],pageParams:[]},C=i.selectQueryEntry(m(),e.queryCacheKey)?.data,N=y(e,m())&&!e.direction||!C?j:C;if("direction"in e&&e.direction&&N.pages.length){const I="backward"===e.direction,x=(I?Di:xi)(T,N,e.originalArgs);k=await A(N,x,P,I)}else{const{initialPageParam:D=T.initialPageParam}=e,M=C?.pageParams??[],q=M[0]??D,F=M.length;k=await A(N,q,P),O&&(k={data:k.data.pages[0]});for(let U=1;U<F;U++){const L=xi(T,k.data,e.originalArgs);k=await A(k.data,L,P)}}_=k}else _=await R(e.originalArgs);return v&&!ji(w,"meta")&&_.meta&&(_.meta=await Ci(v,_.meta,"metaSchema",_.meta)),p(_.data,Ii({fulfilledTimeStamp:Date.now(),baseQueryMeta:_.meta}))}catch($){let Q=$;if(Q instanceof gi){let B=f(b,"transformErrorResponse");const{rawErrorResponseSchema:z,errorResponseSchema:V}=b;let{value:K,meta:H}=Q;try{z&&!ji(w,"rawErrorResponse")&&(K=await Ci(z,K,"rawErrorResponseSchema",H)),v&&!ji(w,"meta")&&(H=await Ci(v,H,"metaSchema",H));let W=await B(K,H,e.originalArgs);return V&&!ji(w,"errorResponse")&&(W=await Ci(V,W,"errorResponseSchema",H)),a(W,Ii({baseQueryMeta:H}))}catch(G){Q=G}}try{if(Q instanceof ki){const J={endpoint:e.endpointName,arg:e.originalArgs,type:e.type,queryCacheKey:"query"===e.type?e.queryCacheKey:void 0};b.onSchemaFailure?.(Q,J),s?.(Q,J);const{catchSchemaFailure:Y=c}=b;if(Y)return a(Y(Q,J),Ii({baseQueryMeta:Q._bqMeta}))}}catch(X){Q=X}throw"undefined"!=typeof process&&"production"!==process.env.NODE_ENV?console.error(`An unhandled error occurred processing a request for the endpoint "${e.endpointName}".\nIn the case of an unhandled error, no tags will be "provided" or "invalidated".`,Q):console.error(Q),Q}};function y(e,t){const r=i.selectQueryEntry(t,e.queryCacheKey),n=i.selectConfig(t).refetchOnMountOrArgChange,o=r?.fulfilledTimeStamp,a=e.forceRefetch??(e.subscribe&&n);return!!a&&(!0===a||(Number(new Date)-Number(o))/1e3>=a)}const h=()=>Ue(`${e}/executeQuery`,p,{getPendingMeta({arg:e}){const t=r[e.endpointName];return Ii({startedTimeStamp:Date.now(),...Oi(t)?{direction:e.direction}:{}})},condition(e,{getState:t}){const n=t(),o=i.selectQueryEntry(n,e.queryCacheKey),a=o?.fulfilledTimeStamp,s=e.originalArgs,c=o?.originalArgs,u=r[e.endpointName],l=e.direction;return!(!Pi(e)&&("pending"===o?.status||!y(e,n)&&(!Ei(u)||!u?.forceRefetch?.({currentArg:s,previousArg:c,endpointState:o,state:n}))&&a&&!l))},dispatchConditionRejection:!0}),g=h(),b=h();function v(e){return t=>t?.meta?.arg?.endpointName===e}return{queryThunk:g,mutationThunk:Ue(`${e}/executeMutation`,p,{getPendingMeta:()=>Ii({startedTimeStamp:Date.now()})}),infiniteQueryThunk:b,prefetch:(e,t,r)=>(n,a)=>{const i=(e=>"force"in e)(r)&&r.force,s=(e=>"ifOlderThan"in e)(r)&&r.ifOlderThan,c=(r=!0)=>{const n={forceRefetch:r,isPrefetch:!0};return o.endpoints[e].initiate(t,n)},u=o.endpoints[e].select(t)(a());if(i)n(c());else if(s){const e=u?.fulfilledTimeStamp;if(!e)return void n(c());(Number(new Date)-Number(new Date(e)))/1e3>=s&&n(c())}else n(c(!1))},updateQueryData:(e,t,r,n=!0)=>(a,i)=>{const s=o.endpoints[e].select(t)(i()),c={patches:[],inversePatches:[],undo:()=>a(o.util.patchQueryData(e,t,c.inversePatches,n))};if("uninitialized"===s.status)return c;let u;if("data"in s)if(m(s.data)){const[e,t,n]=re(s.data,r);c.patches.push(...t),c.inversePatches.push(...n),u=e}else u=r(s.data),c.patches.push({op:"replace",path:[],value:u}),c.inversePatches.push({op:"replace",path:[],value:s.data});return 0===c.patches.length||a(o.util.patchQueryData(e,t,c.patches,n)),c},upsertQueryData:(e,t,r)=>n=>n(o.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[Ti]:()=>({data:r})})),patchQueryData:(e,t,i,s)=>(c,u)=>{const l=r[e],d=n({queryArgs:t,endpointDefinition:l,endpointName:e});if(c(o.internalActions.queryResultPatched({queryCacheKey:d,patches:i})),!s)return;const f=o.endpoints[e].select(t)(u()),p=Ai(l.providesTags,f.data,void 0,t,{},a);c(o.internalActions.updateProvidedBy([{queryCacheKey:d,providedTags:p}]))},buildMatchThunkActions:function(e,t){return{matchPending:Ae(Pe(e),v(t)),matchFulfilled:Ae(Ce(e),v(t)),matchRejected:Ae(ke(e),v(t))}}}}({baseQuery:r,reducerPath:o,context:y,api:t,serializeQueryArgs:a,assertTagType:h,selectors:g,onSchemaFailure:d,catchSchemaFailure:f,skipSchemaValidation:p}),{reducer:C,actions:N}=$i({context:y,queryThunk:O,mutationThunk:A,serializeQueryArgs:a,reducerPath:o,assertTagType:h,config:{refetchOnFocus:c,refetchOnReconnect:u,refetchOnMountOrArgChange:s,keepUnusedDataFor:i,reducerPath:o,invalidationBehavior:l}});Wi(t.util,{patchQueryData:R,updateQueryData:T,upsertQueryData:P,prefetch:k,resetApiState:N.resetApiState,upsertQueryEntries:N.cacheEntriesUpserted}),Wi(t.internalActions,N);const I={currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map},{buildInitiateQuery:x,buildInitiateInfiniteQuery:D,buildInitiateMutation:M,getRunningMutationThunk:q,getRunningMutationsThunk:F,getRunningQueriesThunk:U,getRunningQueryThunk:L}=function({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:n,api:o,context:a,internalState:i}){const{runningQueries:s,runningMutations:c}=i,{unsubscribeQueryResult:u,removeMutationResult:l,updateSubscriptionOptions:d}=o.internalActions;return{buildInitiateQuery:function(e,t){return p(e,t)},buildInitiateInfiniteQuery:function(e,t){return p(e,t)},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:o}={})=>(a,i)=>{const s=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:o}),u=a(s);f(a);const{requestId:d,abort:p,unwrap:y}=u,h=(m=e=>({error:e}),u.unwrap().then(e=>({data:e})).catch(m));var m;const g=Object.assign(h,{arg:u.arg,requestId:d,abort:p,unwrap:y,reset:()=>{a(l({requestId:d,fixedCacheKey:o}))}}),b=c.get(a)||{};return c.set(a,b),b[d]=g,g.then(()=>{delete b[d],si(b)||c.delete(a)}),o&&(b[o]=g,g.then(()=>{b[o]===g&&(delete b[o],si(b)||c.delete(a))})),g}},getRunningQueryThunk:function(t,r){return n=>{const o=a.endpointDefinitions[t],i=e({queryArgs:r,endpointDefinition:o,endpointName:t});return s.get(n)?.[i]}},getRunningMutationThunk:function(e,t){return e=>c.get(e)?.[t]},getRunningQueriesThunk:function(){return e=>Object.values(s.get(e)||{}).filter(ui)},getRunningMutationsThunk:function(){return e=>Object.values(c.get(e)||{}).filter(ui)}};function f(e){if("production"!==process.env.NODE_ENV){if(f.triggered)return;const t=e(o.internalActions.internal_getRTKQSubscriptions());if(f.triggered=!0,"object"!=typeof t||"string"==typeof t?.type)throw new Error("production"===process.env.NODE_ENV?tt(34):`Warning: Middleware for RTK-Query API at reducerPath "${o.reducerPath}" has not been added to the store.\nYou must add the middleware for RTK-Query to function correctly!`)}}function p(n,a){const i=(c,{subscribe:l=!0,forceRefetch:p,subscriptionOptions:y,[Ti]:h,...m}={})=>(g,b)=>{const v=e({queryArgs:c,endpointDefinition:a,endpointName:n});let w;const S={...m,type:"query",subscribe:l,forceRefetch:p,subscriptionOptions:y,endpointName:n,originalArgs:c,queryCacheKey:v,[Ti]:h};if(Ei(a))w=t(S);else{const{direction:e,initialPageParam:t}=m;w=r({...S,direction:e,initialPageParam:t})}const E=o.endpoints[n].select(c),O=g(w),_=E(b());f(g);const{requestId:A,abort:R}=O,T=_.requestId!==A,P=s.get(g)?.[v],k=()=>E(b()),j=Object.assign(h?O.then(k):T&&!P?Promise.resolve(_):Promise.all([P,O]).then(k),{arg:c,requestId:A,subscriptionOptions:y,queryCacheKey:v,abort:R,async unwrap(){const e=await j;if(e.isError)throw e.error;return e.data},refetch:()=>g(i(c,{subscribe:!1,forceRefetch:!0})),unsubscribe(){l&&g(u({queryCacheKey:v,requestId:A}))},updateSubscriptionOptions(e){j.subscriptionOptions=e,g(d({endpointName:n,requestId:A,queryCacheKey:v,options:e}))}});if(!P&&!T&&!h){const e=(N=g,I={},(C=s).has(N)?C.get(N):C.set(N,I).get(N));e[v]=j,j.then(()=>{delete e[v],si(e)||s.delete(g)})}var C,N,I;return j};return i}}({queryThunk:O,mutationThunk:A,infiniteQueryThunk:_,api:t,serializeQueryArgs:a,context:y,internalState:I});Wi(t.util,{getRunningMutationThunk:q,getRunningMutationsThunk:F,getRunningQueryThunk:L,getRunningQueriesThunk:U});const{middleware:$,actions:Q}=rs({reducerPath:o,context:y,queryThunk:O,mutationThunk:A,infiniteQueryThunk:_,api:t,assertTagType:h,selectors:g,getRunningQueryThunk:L,internalState:I});return Wi(t.util,Q),Wi(t,{reducer:C,middleware:$}),{name:ns,injectEndpoint(e,r){const n=t,o=n.endpoints[e]??={};Ei(r)&&Wi(o,{name:e,select:w(e,r),initiate:x(e,r)},j(O,e)),"mutation"===r.type&&Wi(o,{name:e,select:E(),initiate:M(e)},j(A,e)),Oi(r)&&Wi(o,{name:e,select:S(e,r),initiate:D(e,r)},j(O,e))}}}});os();var as,is={exports:{}},ss={};var cs,us,ls={exports:{}};
1
+ var version=function(e){"use strict";function t(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var r=()=>Math.random().toString(36).substring(7).split("").join("."),n={INIT:`@@redux/INIT${r()}`,REPLACE:`@@redux/REPLACE${r()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${r()}`};function o(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function a(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function i(e,t,r,a){const i=Object.keys(t),s=r&&r.type===n.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===i.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!o(e))return`The ${s} has unexpected type of "${function(e){let t=typeof e;return"production"!==process.env.NODE_ENV&&(t=function(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const r=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}(e)),t}(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const c=Object.keys(e).filter(e=>!t.hasOwnProperty(e)&&!a[e]);return c.forEach(e=>{a[e]=!0}),r&&r.type===n.REPLACE?void 0:c.length>0?`Unexpected ${c.length>1?"keys":"key"} "${c.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`:void 0}function s(e){const r=Object.keys(e),o={};for(let t=0;t<r.length;t++){const n=r[t];"production"!==process.env.NODE_ENV&&void 0===e[n]&&a(`No reducer provided for key "${n}"`),"function"==typeof e[n]&&(o[n]=e[n])}const s=Object.keys(o);let c,u;"production"!==process.env.NODE_ENV&&(c={});try{!function(e){Object.keys(e).forEach(r=>{const o=e[r];if(void 0===o(void 0,{type:n.INIT}))throw new Error("production"===process.env.NODE_ENV?t(12):`The slice reducer for key "${r}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===o(void 0,{type:n.PROBE_UNKNOWN_ACTION()}))throw new Error("production"===process.env.NODE_ENV?t(13):`The slice reducer for key "${r}" returned undefined when probed with a random type. Don't try to handle '${n.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}(o)}catch(e){u=e}return function(e={},r){if(u)throw u;if("production"!==process.env.NODE_ENV){const t=i(e,o,r,c);t&&a(t)}let n=!1;const l={};for(let a=0;a<s.length;a++){const i=s[a],c=o[i],u=e[i],d=c(u,r);if(void 0===d){const e=r&&r.type;throw new Error("production"===process.env.NODE_ENV?t(14):`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${i}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}l[i]=d,n=n||d!==u}return n=n||s.length!==Object.keys(e).length,n?l:e}}function c(e){return o(e)&&"type"in e&&"string"==typeof e.type}var u=Symbol.for("immer-nothing"),l=Symbol.for("immer-draftable"),d=Symbol.for("immer-state"),f="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function p(e,...t){if("production"!==process.env.NODE_ENV){const r=f[e],n="function"==typeof r?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var y=Object.getPrototypeOf;function h(e){return!!e&&!!e[d]}function m(e){return!!e&&(b(e)||Array.isArray(e)||!!e[l]||!!e.constructor?.[l]||_(e)||A(e))}var g=Object.prototype.constructor.toString();function b(e){if(!e||"object"!=typeof e)return!1;const t=y(e);if(null===t)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===g}function v(e,t){0===w(e)?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function w(e){const t=e[d];return t?t.type_:Array.isArray(e)?1:_(e)?2:A(e)?3:0}function S(e,t){return 2===w(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function E(e,t){return 2===w(e)?e.get(t):e[t]}function O(e,t,r){const n=w(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function _(e){return e instanceof Map}function A(e){return e instanceof Set}function R(e){return e.copy_||e.base_}function T(e,t){if(_(e))return new Map(e);if(A(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=b(e);if(!0===t||"class_only"===t&&!r){const t=Object.getOwnPropertyDescriptors(e);delete t[d];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const o=r[n],a=t[o];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(y(e),t)}{const t=y(e);if(null!==t&&r)return{...e};const n=Object.create(t);return Object.assign(n,e)}}function P(e,t=!1){return j(e)||h(e)||!m(e)||(w(e)>1&&Object.defineProperties(e,{set:{value:k},add:{value:k},clear:{value:k},delete:{value:k}}),Object.freeze(e),t&&Object.values(e).forEach(e=>P(e,!0))),e}function k(){p(2)}function j(e){return Object.isFrozen(e)}var C,N={};function I(e){const t=N[e];return t||p(0,e),t}function x(){return C}function D(e,t){t&&(I("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function M(e){q(e),e.drafts_.forEach(U),e.drafts_=null}function q(e){e===C&&(C=e.parent_)}function F(e){return C={drafts_:[],parent_:C,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function U(e){const t=e[d];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function L(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[d].modified_&&(M(t),p(4)),m(e)&&(e=$(t,e),t.parent_||B(t,e)),t.patches_&&I("Patches").generateReplacementPatches_(r[d].base_,e,t.patches_,t.inversePatches_)):e=$(t,r,[]),M(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==u?e:void 0}function $(e,t,r){if(j(t))return t;const n=t[d];if(!n)return v(t,(o,a)=>Q(e,n,t,o,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return B(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let o=t,a=!1;3===n.type_&&(o=new Set(t),t.clear(),a=!0),v(o,(o,i)=>Q(e,n,t,o,i,r,a)),B(e,t,!1),r&&e.patches_&&I("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Q(e,t,r,n,o,a,i){if("production"!==process.env.NODE_ENV&&o===r&&p(5),h(o)){const i=$(e,o,a&&t&&3!==t.type_&&!S(t.assigned_,n)?a.concat(n):void 0);if(O(r,n,i),!h(i))return;e.canAutoFreeze_=!1}else i&&r.add(o);if(m(o)&&!j(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$(e,o),t&&t.scope_.parent_||"symbol"==typeof n||!(_(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))||B(e,o)}}function B(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&P(t,r)}var z={get(e,t){if(t===d)return e;const r=R(e);if(!S(r,t))return function(e,t,r){const n=H(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}(e,r,t);const n=r[t];return e.finalized_||!m(n)?n:n===K(e.base_,t)?(G(e),e.copy_[t]=J(n,e)):n},has:(e,t)=>t in R(e),ownKeys:e=>Reflect.ownKeys(R(e)),set(e,t,r){const n=H(R(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=K(R(e),t),i=n?.[d];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(((o=r)===(a=n)?0!==o||1/o==1/a:o!=o&&a!=a)&&(void 0!==r||S(e.base_,t)))return!0;G(e),W(e)}var o,a;return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==K(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,G(e),W(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=R(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){p(11)},getPrototypeOf:e=>y(e.base_),setPrototypeOf(){p(12)}},V={};function K(e,t){const r=e[d];return(r?R(r):e)[t]}function H(e,t){if(!(t in e))return;let r=y(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=y(r)}}function W(e){e.modified_||(e.modified_=!0,e.parent_&&W(e.parent_))}function G(e){e.copy_||(e.copy_=T(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function J(e,t){const r=_(e)?I("MapSet").proxyMap_(e,t):A(e)?I("MapSet").proxySet_(e,t):function(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:x(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=z;r&&(o=[n],a=V);const{revoke:i,proxy:s}=Proxy.revocable(o,a);return n.draft_=s,n.revoke_=i,s}(e,t);return(t?t.scope_:x()).drafts_.push(r),r}function Y(e){return h(e)||p(10,e),X(e)}function X(e){if(!m(e)||j(e))return e;const t=e[d];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=T(e,t.scope_.immer_.useStrictShallowCopy_)}else r=T(e,!0);return v(r,(e,t)=>{O(r,e,X(t))}),t&&(t.finalized_=!1),r}function Z(){"production"!==process.env.NODE_ENV&&f.push('Sets cannot have "replace" patches.',function(e){return"Unsupported patch operation: "+e},function(e){return"Cannot apply patch, path doesn't resolve: "+e},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");const e="replace",t="add",r="remove";function n(e){if(!m(e))return e;if(Array.isArray(e))return e.map(n);if(_(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,n(t)]));if(A(e))return new Set(Array.from(e).map(n));const t=Object.create(y(e));for(const r in e)t[r]=n(e[r]);return S(e,l)&&(t[l]=e[l]),t}function o(e){return h(e)?n(e):e}!function(e,t){N[e]||(N[e]=t)}("Patches",{applyPatches_:function(o,a){return a.forEach(a=>{const{path:i,op:s}=a;let c=o;for(let e=0;e<i.length-1;e++){const t=w(c);let r=i[e];"string"!=typeof r&&"number"!=typeof r&&(r=""+r),0!==t&&1!==t||"__proto__"!==r&&"constructor"!==r||p(19),"function"==typeof c&&"prototype"===r&&p(19),c=E(c,r),"object"!=typeof c&&p(18,i.join("/"))}const u=w(c),l=n(a.value),d=i[i.length-1];switch(s){case e:switch(u){case 2:return c.set(d,l);case 3:p(16);default:return c[d]=l}case t:switch(u){case 1:return"-"===d?c.push(l):c.splice(d,0,l);case 2:return c.set(d,l);case 3:return c.add(l);default:return c[d]=l}case r:switch(u){case 1:return c.splice(d,1);case 2:return c.delete(d);case 3:return c.delete(a.value);default:return delete c[d]}default:p(17,s)}}),o},generatePatches_:function(n,a,i,s){switch(n.type_){case 0:case 2:return function(n,a,i,s){const{base_:c,copy_:u}=n;v(n.assigned_,(n,l)=>{const d=E(c,n),f=E(u,n),p=l?S(c,n)?e:t:r;if(d===f&&p===e)return;const y=a.concat(n);i.push(p===r?{op:p,path:y}:{op:p,path:y,value:f}),s.push(p===t?{op:r,path:y}:p===r?{op:t,path:y,value:o(d)}:{op:e,path:y,value:o(d)})})}(n,a,i,s);case 1:return function(n,a,i,s){let{base_:c,assigned_:u}=n,l=n.copy_;l.length<c.length&&([c,l]=[l,c],[i,s]=[s,i]);for(let t=0;t<c.length;t++)if(u[t]&&l[t]!==c[t]){const r=a.concat([t]);i.push({op:e,path:r,value:o(l[t])}),s.push({op:e,path:r,value:o(c[t])})}for(let e=c.length;e<l.length;e++){const r=a.concat([e]);i.push({op:t,path:r,value:o(l[e])})}for(let e=l.length-1;c.length<=e;--e){const t=a.concat([e]);s.push({op:r,path:t})}}(n,a,i,s);case 3:return function(e,n,o,a){let{base_:i,copy_:s}=e,c=0;i.forEach(e=>{if(!s.has(e)){const i=n.concat([c]);o.push({op:r,path:i,value:e}),a.unshift({op:t,path:i,value:e})}c++}),c=0,s.forEach(e=>{if(!i.has(e)){const i=n.concat([c]);o.push({op:t,path:i,value:e}),a.unshift({op:r,path:i,value:e})}c++})}(n,a,i,s)}},generateReplacementPatches_:function(t,r,n,o){n.push({op:e,path:[],value:r===u?void 0:r}),o.push({op:e,path:[],value:t})}})}v(z,(e,t)=>{V[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),V.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&p(13),V.set.call(this,e,t,void 0)},V.set=function(e,t,r){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&p(14),z.set.call(this,e[0],t,r,e[0])};var ee=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...o){return n.produce(e,e=>t.call(this,e,...o))}}let n;if("function"!=typeof t&&p(6),void 0!==r&&"function"!=typeof r&&p(7),m(e)){const o=F(this),a=J(e,void 0);let i=!0;try{n=t(a),i=!1}finally{i?M(o):q(o)}return D(o,r),L(n,o)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===u&&(n=void 0),this.autoFreeze_&&P(n,!0),r){const t=[],o=[];I("Patches").generateReplacementPatches_(e,n,t,o),r(t,o)}return n}p(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,t=>e(t,...r));let r,n;return[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){m(e)||p(8),h(e)&&(e=Y(e));const t=F(this),r=J(e,void 0);return r[d].isManual_=!0,q(t),r}finishDraft(e,t){const r=e&&e[d];r&&r.isManual_||p(9);const{scope_:n}=r;return D(n,t),L(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=I("Patches").applyPatches_;return h(e)?n(e,t):this.produce(e,e=>n(e,t))}},te=ee.produce,re=ee.produceWithPatches.bind(ee),ne=ee.applyPatches.bind(ee),oe=(e,t,r)=>{if(1===t.length&&t[0]===r){let r=!1;try{const t={};e(t)===t&&(r=!0)}catch{}if(r){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}}},ae=(e,t,r)=>{const{memoize:n,memoizeOptions:o}=t,{inputSelectorResults:a,inputSelectorResultsCopy:i}=e,s=n(()=>({}),...o);if(s.apply(null,a)!==s.apply(null,i)){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:r,firstInputs:a,secondInputs:i,stack:e})}},ie={inputStabilityCheck:"once",identityFunctionCheck:"once"},se=e=>Array.isArray(e)?e:[e];function ce(e,t){const r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var ue="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function le(){return{s:0,v:void 0,o:null,p:null}}function de(e,t={}){let r={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:n}=t;let o,a=0;function i(){let t=r;const{length:i}=arguments;for(let e=0,r=i;e<r;e++){const r=arguments[e];if("function"==typeof r||"object"==typeof r&&null!==r){let e=t.o;null===e&&(t.o=e=new WeakMap);const n=e.get(r);void 0===n?(t=le(),e.set(r,t)):t=n}else{let e=t.p;null===e&&(t.p=e=new Map);const n=e.get(r);void 0===n?(t=le(),e.set(r,t)):t=n}}const s=t;let c;if(1===t.s)c=t.v;else if(c=e.apply(null,arguments),a++,n){const e=o?.deref?.()??o;null!=e&&n(e,c)&&(c=e,0!==a&&a--),o="object"==typeof c&&null!==c||"function"==typeof c?new ue(c):c}return s.s=1,s.v=c,c}return i.clearCache=()=>{r={s:0,v:void 0,o:null,p:null},i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function fe(e,...t){const r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,n=(...e)=>{let t,n=0,o=0,a={},i=e.pop();"object"==typeof i&&(a=i,i=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const s={...r,...a},{memoize:c,memoizeOptions:u=[],argsMemoize:l=de,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=se(u),y=se(d),h=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${r}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),m=c(function(){return n++,i.apply(null,arguments)},...p);let g=!0;const b=l(function(){o++;const e=ce(h,arguments);if(t=m.apply(null,e),"production"!==process.env.NODE_ENV){const{identityFunctionCheck:r,inputStabilityCheck:n}=((e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...ie,...t};return{identityFunctionCheck:{shouldRun:"always"===r||"once"===r&&e,run:oe},inputStabilityCheck:{shouldRun:"always"===n||"once"===n&&e,run:ae}}})(g,f);if(r.shouldRun&&r.run(i,e,t),n.shouldRun){const t=ce(h,arguments);n.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:c,memoizeOptions:p},arguments)}g&&(g=!1)}return t},...y);return Object.assign(b,{resultFunc:i,memoizedResultFunc:m,dependencies:h,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>n,resetRecomputations:()=>{n=0},memoize:c,argsMemoize:l})};return Object.assign(n,{withTypes:()=>n}),n}var pe=fe(de),ye=Object.assign((e,t=pe)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const r=Object.keys(e);return t(r.map(t=>e[t]),(...e)=>e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>ye}),he=((...e)=>{const t=fe(...e),r=Object.assign((...e)=>{const r=t(...e),n=(e,...t)=>r(h(e)?Y(e):e,...t);return Object.assign(n,r),n},{withTypes:()=>r});return r})(de);function me(e,t){function r(...r){if(t){let n=t(...r);if(!n)throw new Error("production"===process.env.NODE_ENV?tt(0):"prepareAction did not return an object");return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:r[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>c(t)&&t.type===e,r}function ge(e){return["type","payload","error","meta"].indexOf(e)>-1}function be(e){return m(e)?te(e,()=>{}):e}function ve(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var we="RTK_autoBatch",Se=()=>e=>({payload:e,meta:{[we]:!0}});function Ee(e){const t={},r=[];let n;const o={addCase(e,a){if("production"!==process.env.NODE_ENV){if(r.length>0)throw new Error("production"===process.env.NODE_ENV?tt(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error("production"===process.env.NODE_ENV?tt(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const i="string"==typeof e?e:e.type;if(!i)throw new Error("production"===process.env.NODE_ENV?tt(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error("production"===process.env.NODE_ENV?tt(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${i}'`);return t[i]=a,o},addAsyncThunk(e,a){if("production"!==process.env.NODE_ENV&&n)throw new Error("production"===process.env.NODE_ENV?tt(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[e.pending.type]=a.pending),a.rejected&&(t[e.rejected.type]=a.rejected),a.fulfilled&&(t[e.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:e.settled,reducer:a.settled}),o},addMatcher(e,t){if("production"!==process.env.NODE_ENV&&n)throw new Error("production"===process.env.NODE_ENV?tt(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:e,reducer:t}),o},addDefaultCase(e){if("production"!==process.env.NODE_ENV&&n)throw new Error("production"===process.env.NODE_ENV?tt(31):"`builder.addDefaultCase` can only be called once");return n=e,o}};return e(o),[t,r,n]}var Oe=(e,t)=>{return(r=e)&&"function"==typeof r.match?e.match(t):e(t);var r};function _e(...e){return t=>e.some(e=>Oe(e,t))}function Ae(...e){return t=>e.every(e=>Oe(e,t))}function Re(e,t){if(!e||!e.meta)return!1;const r="string"==typeof e.meta.requestId,n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Te(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Pe(...e){return 0===e.length?e=>Re(e,["pending"]):Te(e)?_e(...e.map(e=>e.pending)):Pe()(e[0])}function ke(...e){return 0===e.length?e=>Re(e,["rejected"]):Te(e)?_e(...e.map(e=>e.rejected)):ke()(e[0])}function je(...e){return 0===e.length||Te(e)?Ae(ke(...e),e=>e&&e.meta&&e.meta.rejectedWithValue):je()(e[0])}function Ce(...e){return 0===e.length?e=>Re(e,["fulfilled"]):Te(e)?_e(...e.map(e=>e.fulfilled)):Ce()(e[0])}function Ne(...e){return 0===e.length?e=>Re(e,["pending","fulfilled","rejected"]):Te(e)?_e(...e.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):Ne()(e[0])}var Ie=(e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},xe=["name","message","stack","code"],De=class{constructor(e,t){this.payload=e,this.meta=t}_type},Me=class{constructor(e,t){this.payload=e,this.meta=t}_type},qe=e=>{if("object"==typeof e&&null!==e){const t={};for(const r of xe)"string"==typeof e[r]&&(t[r]=e[r]);return t}return{message:String(e)}},Fe="External signal was aborted",Ue=(()=>{function e(e,t,r){const n=me(e+"/fulfilled",(e,t,r,n)=>({payload:e,meta:{...n||{},arg:r,requestId:t,requestStatus:"fulfilled"}})),o=me(e+"/pending",(e,t,r)=>({payload:void 0,meta:{...r||{},arg:t,requestId:e,requestStatus:"pending"}})),a=me(e+"/rejected",(e,t,n,o,a)=>({payload:o,error:(r&&r.serializeError||qe)(e||"Rejected"),meta:{...a||{},arg:n,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:i}={}){return(s,c,u)=>{const l=r?.idGenerator?r.idGenerator(e):Ie(),d=new AbortController;let f,p;function y(e){p=e,d.abort()}i&&(i.aborted?y(Fe):i.addEventListener("abort",()=>y(Fe),{once:!0}));const h=async function(){let i;try{let a=r?.condition?.(e,{getState:c,extra:u});if(null!==(h=a)&&"object"==typeof h&&"function"==typeof h.then&&(a=await a),!1===a||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const m=new Promise((e,t)=>{f=()=>{t({name:"AbortError",message:p||"Aborted"})},d.signal.addEventListener("abort",f)});s(o(l,e,r?.getPendingMeta?.({requestId:l,arg:e},{getState:c,extra:u}))),i=await Promise.race([m,Promise.resolve(t(e,{dispatch:s,getState:c,extra:u,requestId:l,signal:d.signal,abort:y,rejectWithValue:(e,t)=>new De(e,t),fulfillWithValue:(e,t)=>new Me(e,t)})).then(t=>{if(t instanceof De)throw t;return t instanceof Me?n(t.payload,l,e,t.meta):n(t,l,e)})])}catch(t){i=t instanceof De?a(null,l,e,t.payload,t.meta):a(t,l,e)}finally{f&&d.signal.removeEventListener("abort",f)}var h;return r&&!r.dispatchConditionRejection&&a.match(i)&&i.meta.condition||s(i),i}();return Object.assign(h,{abort:y,requestId:l,arg:e,unwrap:()=>h.then(Le)})}},{pending:o,rejected:a,fulfilled:n,settled:_e(a,n),typePrefix:e})}return e.withTypes=()=>e,e})();function Le(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var $e=Symbol.for("rtk-slice-createasyncthunk");function Qe(e,t){return`${e}/${t}`}function Be(e,t,r,n){function o(o,...a){let i=t(o);if(void 0===i)if(n)i=r();else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?tt(16):"selectState returned undefined for an uninjected slice reducer");return e(i,...a)}return o.unwrapped=e,o}var ze=function({creators:e}={}){const t=e?.asyncThunk?.[$e];return function(e){const{name:r,reducerPath:n=r}=e;if(!r)throw new Error("production"===process.env.NODE_ENV?tt(11):"`name` is a required option for createSlice");"undefined"!=typeof process&&"development"===process.env.NODE_ENV&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},a=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const r="string"==typeof e?e:e.type;if(!r)throw new Error("production"===process.env.NODE_ENV?tt(12):"`context.addCase` cannot be called with an empty action type");if(r in i.sliceCaseReducersByType)throw new Error("production"===process.env.NODE_ENV?tt(13):"`context.addCase` cannot be called with two reducers for the same action type: "+r);return i.sliceCaseReducersByType[r]=t,s},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(i.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,s)};function c(){if("production"!==process.env.NODE_ENV&&"object"==typeof e.extraReducers)throw new Error("production"===process.env.NODE_ENV?tt(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},r=[],n]="function"==typeof e.extraReducers?Ee(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return function(e,t){process.env.NODE_ENV;let r,[n,o,a]=Ee(t);if("function"==typeof e)r=()=>be(e());else{const t=be(e);r=()=>t}function i(e=r(),t){let i=[n[t.type],...o.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===i.filter(e=>!!e).length&&(i=[a]),i.reduce((e,r)=>{if(r){if(h(e)){const n=r(e,t);return void 0===n?e:n}if(m(e))return te(e,e=>r(e,t));{const n=r(e,t);if(void 0===n){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}}return e},e)}return i.getInitialState=r,i}(e.initialState,e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}a.forEach(n=>{const a=o[n],i={reducerName:n,type:Qe(r,n),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(a)?function({type:e,reducerName:t,createNotation:r},n,o){let a,i;if("reducer"in n){if(r&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(n))throw new Error("production"===process.env.NODE_ENV?tt(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=n.reducer,i=n.prepare}else a=n;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?me(e,i):me(e))}(i,a,s):function({type:e,reducerName:t},r,n,o){if(!o)throw new Error("production"===process.env.NODE_ENV?tt(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:i,pending:s,rejected:c,settled:u,options:l}=r,d=o(e,a,l);n.exposeAction(t,d),i&&n.addCase(d.fulfilled,i),s&&n.addCase(d.pending,s),c&&n.addCase(d.rejected,c),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:i||Ve,pending:s||Ve,rejected:c||Ve,settled:u||Ve})}(i,a,s,t)});const u=e=>e,l=new Map,d=new WeakMap;let f;function p(e,t){return f||(f=c()),f(e,t)}function y(){return f||(f=c()),f.getInitialState()}function g(t,r=!1){function n(e){let o=e[t];if(void 0===o)if(r)o=ve(d,n,y);else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?tt(15):"selectSlice returned undefined for an uninjected slice reducer");return o}function o(t=u){const n=ve(l,r,()=>new WeakMap);return ve(n,t,()=>{const n={};for(const[o,a]of Object.entries(e.selectors??{}))n[o]=Be(a,t,()=>ve(d,t,y),r);return n})}return{reducerPath:t,getSelectors:o,get selectors(){return o(n)},selectSlice:n}}const b={name:r,reducer:p,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:y,...g(n),injectInto(e,{reducerPath:t,...r}={}){const o=t??n;return e.inject({reducerPath:o,reducer:p},r),{...b,...g(o,!0)}}};return b}}();function Ve(){}var Ke=h;function He(e){const t=We((t,r)=>e(r));return function(e){return t(e,void 0)}}function We(e){return function(t,r){const n=t=>{!function(e){return c(t=e)&&Object.keys(t).every(ge);var t}(r)?e(r,t):e(r.payload,t)};return Ke(t)?(n(t),t):te(t,n)}}function Ge(e,t){const r=t(e);return"production"!==process.env.NODE_ENV&&void 0===r&&console.warn("The entity passed to the `selectId` implementation returned undefined.","You should probably provide your own `selectId` implementation.","The entity that was passed:",e,"The `selectId` implementation:",t.toString()),r}function Je(e){return Array.isArray(e)||(e=Object.values(e)),e}function Ye(e){return h(e)?Y(e):e}function Xe(e,t,r){e=Je(e);const n=Ye(r.ids),o=new Set(n),a=[],i=new Set([]),s=[];for(const r of e){const e=Ge(r,t);o.has(e)||i.has(e)?s.push({id:e,changes:r}):(i.add(e),a.push(r))}return[a,s,n]}function Ze(e){function t(t,r){const n=Ge(t,e);n in r.entities||(r.ids.push(n),r.entities[n]=t)}function r(e,r){e=Je(e);for(const n of e)t(n,r)}function n(t,r){const n=Ge(t,e);n in r.entities||r.ids.push(n),r.entities[n]=t}function o(e,t){let r=!1;e.forEach(e=>{e in t.entities&&(delete t.entities[e],r=!0)}),r&&(t.ids=t.ids.filter(e=>e in t.entities))}function a(t,r){const n={},o={};if(t.forEach(e=>{e.id in r.entities&&(o[e.id]={id:e.id,changes:{...o[e.id]?.changes,...e.changes}})}),(t=Object.values(o)).length>0){const o=t.filter(t=>function(t,r,n){const o=n.entities[r.id];if(void 0===o)return!1;const a=Object.assign({},o,r.changes),i=Ge(a,e),s=i!==r.id;return s&&(t[r.id]=i,delete n.entities[r.id]),n.entities[i]=a,s}(n,t,r)).length>0;o&&(r.ids=Object.values(r.entities).map(t=>Ge(t,e)))}}function i(t,n){const[o,i]=Xe(t,e,n);r(o,n),a(i,n)}return{removeAll:He(function(e){Object.assign(e,{ids:[],entities:{}})}),addOne:We(t),addMany:We(r),setOne:We(n),setMany:We(function(e,t){e=Je(e);for(const r of e)n(r,t)}),setAll:We(function(e,t){e=Je(e),t.ids=[],t.entities={},r(e,t)}),updateOne:We(function(e,t){return a([e],t)}),updateMany:We(a),upsertOne:We(function(e,t){return i([e],t)}),upsertMany:We(i),removeOne:We(function(e,t){return o([e],t)}),removeMany:We(o)}}function et(e,t,r){const n=function(e,t,r){let n=0,o=e.length;for(;n<o;){let a=n+o>>>1;r(t,e[a])>=0?n=a+1:o=a}return n}(e,t,r);return e.splice(n,0,t),e}function tt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function rt(e,t){return function(){return e.apply(t,arguments)}}const{toString:nt}=Object.prototype,{getPrototypeOf:ot}=Object,{iterator:at,toStringTag:it}=Symbol,st=(e=>t=>{const r=nt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ct=e=>(e=e.toLowerCase(),t=>st(t)===e),ut=e=>t=>typeof t===e,{isArray:lt}=Array,dt=ut("undefined");function ft(e){return null!==e&&!dt(e)&&null!==e.constructor&&!dt(e.constructor)&&ht(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const pt=ct("ArrayBuffer"),yt=ut("string"),ht=ut("function"),mt=ut("number"),gt=e=>null!==e&&"object"==typeof e,bt=e=>{if("object"!==st(e))return!1;const t=ot(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||it in e||at in e)},vt=ct("Date"),wt=ct("File"),St=ct("Blob"),Et=ct("FileList"),Ot=ct("URLSearchParams"),[_t,At,Rt,Tt]=["ReadableStream","Request","Response","Headers"].map(ct);function Pt(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),lt(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(ft(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let i;for(n=0;n<a;n++)i=o[n],t.call(null,e[i],i,e)}}function kt(e,t){if(ft(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const jt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ct=e=>!dt(e)&&e!==jt,Nt=(It="undefined"!=typeof Uint8Array&&ot(Uint8Array),e=>It&&e instanceof It);var It;const xt=ct("HTMLFormElement"),Dt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Mt=ct("RegExp"),qt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Pt(r,(r,o)=>{let a;!1!==(a=t(r,o,e))&&(n[o]=a||r)}),Object.defineProperties(e,n)},Ft=ct("AsyncFunction"),Ut=(Lt="function"==typeof setImmediate,$t=ht(jt.postMessage),Lt?setImmediate:$t?(Qt=`axios@${Math.random()}`,Bt=[],jt.addEventListener("message",({source:e,data:t})=>{e===jt&&t===Qt&&Bt.length&&Bt.shift()()},!1),e=>{Bt.push(e),jt.postMessage(Qt,"*")}):e=>setTimeout(e));var Lt,$t,Qt,Bt;const zt="undefined"!=typeof queueMicrotask?queueMicrotask.bind(jt):"undefined"!=typeof process&&process.nextTick||Ut;var Vt={isArray:lt,isArrayBuffer:pt,isBuffer:ft,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ht(e.append)&&("formdata"===(t=st(e))||"object"===t&&ht(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&pt(e.buffer),t},isString:yt,isNumber:mt,isBoolean:e=>!0===e||!1===e,isObject:gt,isPlainObject:bt,isEmptyObject:e=>{if(!gt(e)||ft(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:_t,isRequest:At,isResponse:Rt,isHeaders:Tt,isUndefined:dt,isDate:vt,isFile:wt,isBlob:St,isRegExp:Mt,isFunction:ht,isStream:e=>gt(e)&&ht(e.pipe),isURLSearchParams:Ot,isTypedArray:Nt,isFileList:Et,forEach:Pt,merge:function e(){const{caseless:t,skipUndefined:r}=Ct(this)&&this||{},n={},o=(o,a)=>{const i=t&&kt(n,a)||a;bt(n[i])&&bt(o)?n[i]=e(n[i],o):bt(o)?n[i]=e({},o):lt(o)?n[i]=o.slice():r&&dt(o)||(n[i]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Pt(arguments[e],o);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(Pt(t,(t,n)=>{r&&ht(t)?e[n]=rt(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,a,i;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],n&&!n(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==r&&ot(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:st,kindOfTest:ct,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(lt(e))return e;let t=e.length;if(!mt(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[at]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:xt,hasOwnProperty:Dt,hasOwnProp:Dt,reduceDescriptors:qt,freezeMethods:e=>{qt(e,(t,r)=>{if(ht(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];ht(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return lt(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:kt,global:jt,isContextDefined:Ct,isSpecCompliantForm:function(e){return!!(e&&ht(e.append)&&"FormData"===e[it]&&e[at])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(gt(e)){if(t.indexOf(e)>=0)return;if(ft(e))return e;if(!("toJSON"in e)){t[n]=e;const o=lt(e)?[]:{};return Pt(e,(e,t)=>{const a=r(e,n+1);!dt(a)&&(o[t]=a)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:Ft,isThenable:e=>e&&(gt(e)||ht(e))&&ht(e.then)&&ht(e.catch),setImmediate:Ut,asap:zt,isIterable:e=>null!=e&&ht(e[at])};function Kt(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Vt.inherits(Kt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Vt.toJSONObject(this.config),code:this.code,status:this.status}}});const Ht=Kt.prototype,Wt={};function Gt(e){return Vt.isPlainObject(e)||Vt.isArray(e)}function Jt(e){return Vt.endsWith(e,"[]")?e.slice(0,-2):e}function Yt(e,t,r){return e?e.concat(t).map(function(e,t){return e=Jt(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Wt[e]={value:e}}),Object.defineProperties(Kt,Wt),Object.defineProperty(Ht,"isAxiosError",{value:!0}),Kt.from=(e,t,r,n,o,a)=>{const i=Object.create(Ht);Vt.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Kt.call(i,s,c,r,n,o),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",a&&Object.assign(i,a),i};const Xt=Vt.toFlatObject(Vt,{},null,function(e){return/^is[A-Z]/.test(e)});function Zt(e,t,r){if(!Vt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Vt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Vt.isUndefined(t[e])})).metaTokens,o=r.visitor||u,a=r.dots,i=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Vt.isSpecCompliantForm(t);if(!Vt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Vt.isDate(e))return e.toISOString();if(Vt.isBoolean(e))return e.toString();if(!s&&Vt.isBlob(e))throw new Kt("Blob is not supported. Use a Buffer instead.");return Vt.isArrayBuffer(e)||Vt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(Vt.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Vt.isArray(e)&&function(e){return Vt.isArray(e)&&!e.some(Gt)}(e)||(Vt.isFileList(e)||Vt.endsWith(r,"[]"))&&(s=Vt.toArray(e)))return r=Jt(r),s.forEach(function(e,n){!Vt.isUndefined(e)&&null!==e&&t.append(!0===i?Yt([r],n,a):null===i?r:r+"[]",c(e))}),!1;return!!Gt(e)||(t.append(Yt(o,r,a),c(e)),!1)}const l=[],d=Object.assign(Xt,{defaultVisitor:u,convertValue:c,isVisitable:Gt});if(!Vt.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Vt.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Vt.forEach(r,function(r,a){!0===(!(Vt.isUndefined(r)||null===r)&&o.call(t,r,Vt.isString(a)?a.trim():a,n,d))&&e(r,n?n.concat(a):[a])}),l.pop()}}(e),t}function er(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function tr(e,t){this._pairs=[],e&&Zt(e,this,t)}const rr=tr.prototype;function nr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function or(e,t,r){if(!t)return e;const n=r&&r.encode||nr;Vt.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let a;if(a=o?o(t,r):Vt.isURLSearchParams(t)?t.toString():new tr(t,r).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}rr.append=function(e,t){this._pairs.push([e,t])},rr.toString=function(e){const t=e?function(t){return e.call(this,t,er)}:er;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class ar{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Vt.forEach(this.handlers,function(t){null!==t&&e(t)})}}var ir={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sr={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:tr,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const cr="undefined"!=typeof window&&"undefined"!=typeof document,ur="object"==typeof navigator&&navigator||void 0,lr=cr&&(!ur||["ReactNative","NativeScript","NS"].indexOf(ur.product)<0),dr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,fr=cr&&window.location.href||"http://localhost";var pr={...Object.freeze({__proto__:null,hasBrowserEnv:cr,hasStandardBrowserEnv:lr,hasStandardBrowserWebWorkerEnv:dr,navigator:ur,origin:fr}),...sr};function yr(e){function t(e,r,n,o){let a=e[o++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),s=o>=e.length;return a=!a&&Vt.isArray(n)?n.length:a,s?(Vt.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!i):(n[a]&&Vt.isObject(n[a])||(n[a]=[]),t(e,r,n[a],o)&&Vt.isArray(n[a])&&(n[a]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let a;for(n=0;n<o;n++)a=r[n],t[a]=e[a];return t}(n[a])),!i)}if(Vt.isFormData(e)&&Vt.isFunction(e.entries)){const r={};return Vt.forEachEntry(e,(e,n)=>{t(function(e){return Vt.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const hr={transitional:ir,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Vt.isObject(e);if(o&&Vt.isHTMLForm(e)&&(e=new FormData(e)),Vt.isFormData(e))return n?JSON.stringify(yr(e)):e;if(Vt.isArrayBuffer(e)||Vt.isBuffer(e)||Vt.isStream(e)||Vt.isFile(e)||Vt.isBlob(e)||Vt.isReadableStream(e))return e;if(Vt.isArrayBufferView(e))return e.buffer;if(Vt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Zt(e,new pr.classes.URLSearchParams,{visitor:function(e,t,r,n){return pr.isNode&&Vt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=Vt.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Zt(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e){if(Vt.isString(e))try{return(0,JSON.parse)(e),Vt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||hr.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Vt.isResponse(e)||Vt.isReadableStream(e))return e;if(e&&Vt.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw Kt.from(e,Kt.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pr.classes.FormData,Blob:pr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Vt.forEach(["delete","get","head","post","put","patch"],e=>{hr.headers[e]={}});const mr=Vt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gr=Symbol("internals");function br(e){return e&&String(e).trim().toLowerCase()}function vr(e){return!1===e||null==e?e:Vt.isArray(e)?e.map(vr):String(e)}function wr(e,t,r,n,o){return Vt.isFunction(n)?n.call(this,t,r):(o&&(t=r),Vt.isString(t)?Vt.isString(n)?-1!==t.indexOf(n):Vt.isRegExp(n)?n.test(t):void 0:void 0)}let Sr=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=br(t);if(!o)throw new Error("header name must be a non-empty string");const a=Vt.findKey(n,o);(!a||void 0===n[a]||!0===r||void 0===r&&!1!==n[a])&&(n[a||t]=vr(e))}const a=(e,t)=>Vt.forEach(e,(e,r)=>o(e,r,t));if(Vt.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Vt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&mr[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(Vt.isObject(e)&&Vt.isIterable(e)){let r,n,o={};for(const t of e){if(!Vt.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?Vt.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=br(e)){const r=Vt.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Vt.isFunction(t))return t.call(this,e,r);if(Vt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=br(e)){const r=Vt.findKey(this,e);return!(!r||void 0===this[r]||t&&!wr(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=br(e)){const o=Vt.findKey(r,e);!o||t&&!wr(0,r[o],o,t)||(delete r[o],n=!0)}}return Vt.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!wr(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Vt.forEach(this,(n,o)=>{const a=Vt.findKey(r,o);if(a)return t[a]=vr(n),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();i!==o&&delete t[o],t[i]=vr(n),r[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Vt.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Vt.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[gr]=this[gr]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=br(e);t[n]||(function(e,t){const r=Vt.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return Vt.isArray(e)?e.forEach(n):n(e),this}};function Er(e,t){const r=this||hr,n=t||r,o=Sr.from(n.headers);let a=n.data;return Vt.forEach(e,function(e){a=e.call(r,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Or(e){return!(!e||!e.__CANCEL__)}function _r(e,t,r){Kt.call(this,null==e?"canceled":e,Kt.ERR_CANCELED,t,r),this.name="CanceledError"}function Ar(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Kt("Request failed with status code "+r.status,[Kt.ERR_BAD_REQUEST,Kt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Sr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Vt.reduceDescriptors(Sr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Vt.freezeMethods(Sr),Vt.inherits(_r,Kt,{__CANCEL__:!0});const Rr=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,a=0,i=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[i];o||(o=c),r[a]=s,n[a]=c;let l=i,d=0;for(;l!==a;)d+=r[l++],l%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let r,n,o=0,a=1e3/t;const i=(t,a=Date.now())=>{o=a,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=a?i(e,t):(r=e,n||(n=setTimeout(()=>{n=null,i(r)},a-s)))},()=>r&&i(r)]}(r=>{const a=r.loaded,i=r.lengthComputable?r.total:void 0,s=a-n,c=o(s);n=a,e({loaded:a,total:i,progress:i?a/i:void 0,bytes:s,rate:c||void 0,estimated:c&&i&&a<=i?(i-a)/c:void 0,event:r,lengthComputable:null!=i,[t?"download":"upload"]:!0})},r)},Tr=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Pr=e=>(...t)=>Vt.asap(()=>e(...t));var kr=pr.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,pr.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(pr.origin),pr.navigator&&/(msie|trident)/i.test(pr.navigator.userAgent)):()=>!0,jr=pr.hasStandardBrowserEnv?{write(e,t,r,n,o,a){const i=[e+"="+encodeURIComponent(t)];Vt.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),Vt.isString(n)&&i.push("path="+n),Vt.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Cr(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Nr=e=>e instanceof Sr?{...e}:e;function Ir(e,t){t=t||{};const r={};function n(e,t,r,n){return Vt.isPlainObject(e)&&Vt.isPlainObject(t)?Vt.merge.call({caseless:n},e,t):Vt.isPlainObject(t)?Vt.merge({},t):Vt.isArray(t)?t.slice():t}function o(e,t,r,o){return Vt.isUndefined(t)?Vt.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function a(e,t){if(!Vt.isUndefined(t))return n(void 0,t)}function i(e,t){return Vt.isUndefined(t)?Vt.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,a){return a in t?n(r,o):a in e?n(void 0,r):void 0}const c={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(e,t,r)=>o(Nr(e),Nr(t),0,!0)};return Vt.forEach(Object.keys({...e,...t}),function(n){const a=c[n]||o,i=a(e[n],t[n],n);Vt.isUndefined(i)&&a!==s||(r[n]=i)}),r}var xr=e=>{const t=Ir({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;if(t.headers=i=Sr.from(i),t.url=or(Cr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Vt.isFormData(r))if(pr.hasStandardBrowserEnv||pr.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(Vt.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&i.set(e,r)})}if(pr.hasStandardBrowserEnv&&(n&&Vt.isFunction(n)&&(n=n(t)),n||!1!==n&&kr(t.url))){const e=o&&a&&jr.read(a);e&&i.set(o,e)}return t},Dr="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=xr(e);let o=n.data;const a=Sr.from(n.headers).normalize();let i,s,c,u,l,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=n;function y(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(i),n.signal&&n.signal.removeEventListener("abort",i)}let h=new XMLHttpRequest;function m(){if(!h)return;const n=Sr.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Ar(function(e){t(e),y()},function(e){r(e),y()},{data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout,"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(m)},h.onabort=function(){h&&(r(new Kt("Request aborted",Kt.ECONNABORTED,e,h)),h=null)},h.onerror=function(t){const n=new Kt(t&&t.message?t.message:"Network Error",Kt.ERR_NETWORK,e,h);n.event=t||null,r(n),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||ir;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Kt(t,o.clarifyTimeoutError?Kt.ETIMEDOUT:Kt.ECONNABORTED,e,h)),h=null},void 0===o&&a.setContentType(null),"setRequestHeader"in h&&Vt.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),Vt.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),d&&"json"!==d&&(h.responseType=n.responseType),p&&([c,l]=Rr(p,!0),h.addEventListener("progress",c)),f&&h.upload&&([s,u]=Rr(f),h.upload.addEventListener("progress",s),h.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(i=t=>{h&&(r(!t||t.type?new _r(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(i),n.signal&&(n.signal.aborted?i():n.signal.addEventListener("abort",i)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===pr.protocols.indexOf(g)?r(new Kt("Unsupported protocol "+g+":",Kt.ERR_BAD_REQUEST,e)):h.send(o||null)})};const Mr=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Kt?t:new _r(t instanceof Error?t.message:t))}};let a=t&&setTimeout(()=>{a=null,o(new Kt(`timeout ${t} of ms exceeded`,Kt.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=n;return s.unsubscribe=()=>Vt.asap(i),s}},qr=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},Fr=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}}(e))yield*qr(r,t)}(e,t);let a,i=0,s=e=>{a||(a=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let a=n.byteLength;if(r){let e=i+=a;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:Ur}=Vt,Lr=(({Request:e,Response:t})=>({Request:e,Response:t}))(Vt.global),{ReadableStream:$r,TextEncoder:Qr}=Vt.global,Br=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},zr=e=>{e=Vt.merge.call({skipUndefined:!0},Lr,e);const{fetch:t,Request:r,Response:n}=e,o=t?Ur(t):"function"==typeof fetch,a=Ur(r),i=Ur(n);if(!o)return!1;const s=o&&Ur($r),c=o&&("function"==typeof Qr?(u=new Qr,e=>u.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var u;const l=a&&s&&Br(()=>{let e=!1;const t=new r(pr.origin,{body:new $r,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&s&&Br(()=>Vt.isReadableStream(new n("").body)),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Kt(`Response type '${e}' is not supported`,Kt.ERR_NOT_SUPPORT,r)})});const p=async(e,t)=>{const n=Vt.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Vt.isBlob(e))return e.size;if(Vt.isSpecCompliantForm(e)){const t=new r(pr.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Vt.isArrayBufferView(e)||Vt.isArrayBuffer(e)?e.byteLength:(Vt.isURLSearchParams(e)&&(e+=""),Vt.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:i,data:s,signal:c,cancelToken:u,timeout:y,onDownloadProgress:h,onUploadProgress:m,responseType:g,headers:b,withCredentials:v="same-origin",fetchOptions:w}=xr(e),S=t||fetch;g=g?(g+"").toLowerCase():"text";let E=Mr([c,u&&u.toAbortSignal()],y),O=null;const _=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let A;try{if(m&&l&&"get"!==i&&"head"!==i&&0!==(A=await p(b,s))){let e,t=new r(o,{method:"POST",body:s,duplex:"half"});if(Vt.isFormData(s)&&(e=t.headers.get("content-type"))&&b.setContentType(e),t.body){const[e,r]=Tr(A,Rr(Pr(m)));s=Fr(t.body,65536,e,r)}}Vt.isString(v)||(v=v?"include":"omit");const t=a&&"credentials"in r.prototype,c={...w,signal:E,method:i.toUpperCase(),headers:b.normalize().toJSON(),body:s,duplex:"half",credentials:t?v:void 0};O=a&&new r(o,c);let u=await(a?S(O,w):S(o,c));const y=d&&("stream"===g||"response"===g);if(d&&(h||y&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=Vt.toFiniteNumber(u.headers.get("content-length")),[r,o]=h&&Tr(t,Rr(Pr(h),!0))||[];u=new n(Fr(u.body,65536,r,()=>{o&&o(),_&&_()}),e)}g=g||"text";let R=await f[Vt.findKey(f,g)||"text"](u,e);return!y&&_&&_(),await new Promise((t,r)=>{Ar(t,r,{data:R,headers:Sr.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})})}catch(t){if(_&&_(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Kt("Network Error",Kt.ERR_NETWORK,e,O),{cause:t.cause||t});throw Kt.from(t,t&&t.code,e,O)}}},Vr=new Map,Kr=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:o}=t,a=[n,o,r];let i,s,c=a.length,u=Vr;for(;c--;)i=a[c],s=u.get(i),void 0===s&&u.set(i,s=c?new Map:zr(t)),u=s;return s};Kr();const Hr={http:null,xhr:Dr,fetch:{get:Kr}};Vt.forEach(Hr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Wr=e=>`- ${e}`,Gr=e=>Vt.isFunction(e)||null===e||!1===e;var Jr=(e,t)=>{e=Vt.isArray(e)?e:[e];const{length:r}=e;let n,o;const a={};for(let i=0;i<r;i++){let r;if(n=e[i],o=n,!Gr(n)&&(o=Hr[(r=String(n)).toLowerCase()],void 0===o))throw new Kt(`Unknown adapter '${r}'`);if(o&&(Vt.isFunction(o)||(o=o.get(t))))break;a[r||"#"+i]=o}if(!o){const e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Kt("There is no suitable adapter to dispatch the request "+(r?e.length>1?"since :\n"+e.map(Wr).join("\n"):" "+Wr(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function Yr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _r(null,e)}function Xr(e){return Yr(e),e.headers=Sr.from(e.headers),e.data=Er.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Jr(e.adapter||hr.adapter,e)(e).then(function(t){return Yr(e),t.data=Er.call(e,e.transformResponse,t),t.headers=Sr.from(t.headers),t},function(t){return Or(t)||(Yr(e),t&&t.response&&(t.response.data=Er.call(e,e.transformResponse,t.response),t.response.headers=Sr.from(t.response.headers))),Promise.reject(t)})}const Zr="1.12.2",en={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{en[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const tn={};en.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Zr+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,a)=>{if(!1===e)throw new Kt(n(o," has been removed"+(t?" in "+t:"")),Kt.ERR_DEPRECATED);return t&&!tn[o]&&(tn[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,a)}},en.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var rn={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Kt("options must be an object",Kt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const a=n[o],i=t[a];if(i){const t=e[a],r=void 0===t||i(t,a,e);if(!0!==r)throw new Kt("option "+a+" must be "+r,Kt.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Kt("Unknown option "+a,Kt.ERR_BAD_OPTION)}},validators:en};const nn=rn.validators;let on=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ar,response:new ar}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ir(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&rn.assertOptions(r,{silentJSONParsing:nn.transitional(nn.boolean),forcedJSONParsing:nn.transitional(nn.boolean),clarifyTimeoutError:nn.transitional(nn.boolean)},!1),null!=n&&(Vt.isFunction(n)?t.paramsSerializer={serialize:n}:rn.assertOptions(n,{encode:nn.function,serialize:nn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),rn.assertOptions(t,{baseUrl:nn.spelling("baseURL"),withXsrfToken:nn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&Vt.merge(o.common,o[t.method]);o&&Vt.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Sr.concat(a,o);const i=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!s){const e=[Xr.bind(this),void 0];for(e.unshift(...i),e.push(...c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=i.length;let f=t;for(;d<l;){const t=i[d++],r=i[d++];try{f=t(f)}catch(e){r.call(this,e);break}}try{u=Xr.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return or(Cr((e=Ir(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Vt.forEach(["delete","get","head","options"],function(e){on.prototype[e]=function(t,r){return this.request(Ir(r||{},{method:e,url:t,data:(r||{}).data}))}}),Vt.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(Ir(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}on.prototype[e]=t(),on.prototype[e+"Form"]=t(!0)});const an={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(an).forEach(([e,t])=>{an[t]=e});const sn=function e(t){const r=new on(t),n=rt(on.prototype.request,r);return Vt.extend(n,on.prototype,r,{allOwnKeys:!0}),Vt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Ir(t,r))},n}(hr);sn.Axios=on,sn.CanceledError=_r,sn.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new _r(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},sn.isCancel=Or,sn.VERSION=Zr,sn.toFormData=Zt,sn.AxiosError=Kt,sn.Cancel=sn.CanceledError,sn.all=function(e){return Promise.all(e)},sn.spread=function(e){return function(t){return e.apply(null,t)}},sn.isAxiosError=function(e){return Vt.isObject(e)&&!0===e.isAxiosError},sn.mergeConfig=Ir,sn.AxiosHeaders=Sr,sn.formToJSON=e=>yr(Vt.isHTMLForm(e)?new FormData(e):e),sn.getAdapter=Jr,sn.HttpStatusCode=an,sn.default=sn;const{Axios:cn,AxiosError:un,CanceledError:ln,isCancel:dn,CancelToken:fn,VERSION:pn,all:yn,Cancel:hn,isAxiosError:mn,spread:gn,toFormData:bn,AxiosHeaders:vn,HttpStatusCode:wn,formToJSON:Sn,getAdapter:En,mergeConfig:On}=sn;var _n,An,Rn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Tn(){return An?_n:(An=1,_n=TypeError)}var Pn,kn,jn,Cn,Nn,In,xn,Dn,Mn,qn,Fn,Un,Ln,$n,Qn,Bn,zn,Vn,Kn,Hn,Wn,Gn,Jn,Yn,Xn,Zn,eo,to,ro,no,oo,ao,io,so,co,uo,lo,fo,po,yo,ho,mo,go,bo,vo,wo,So,Eo,Oo,_o,Ao,Ro,To,Po,ko,jo,Co,No,Io,xo,Do,Mo,qo,Fo,Uo,Lo,$o,Qo,Bo,zo,Vo,Ko,Ho,Wo,Go,Jo,Yo,Xo,Zo,ea,ta,ra,na,oa,aa,ia,sa,ca,ua=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze({__proto__:null,default:{}}));function la(){if(kn)return Pn;kn=1;var e="function"==typeof Map&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&"function"==typeof t.get?t.get:null,n=e&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,i=o&&a&&"function"==typeof a.get?a.get:null,s=o&&Set.prototype.forEach,c="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,u="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,l="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,f=Object.prototype.toString,p=Function.prototype.toString,y=String.prototype.match,h=String.prototype.slice,m=String.prototype.replace,g=String.prototype.toUpperCase,b=String.prototype.toLowerCase,v=RegExp.prototype.test,w=Array.prototype.concat,S=Array.prototype.join,E=Array.prototype.slice,O=Math.floor,_="function"==typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,k=Object.prototype.propertyIsEnumerable,j=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function C(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||v.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-O(-e):O(e);if(n!==e){var o=String(n),a=h.call(t,o.length+1);return m.call(o,r,"$&_")+"."+m.call(m.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(t,r,"$&_")}var N=ua,I=N.custom,x=Q(I)?I:null,D={__proto__:null,double:'"',single:"'"},M={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function q(e,t,r){var n=r.quoteStyle||t,o=D[n];return o+e+o}function F(e){return m.call(String(e),/"/g,"&quot;")}function U(e){return!P||!("object"==typeof e&&(P in e||void 0!==e[P]))}function L(e){return"[object Array]"===V(e)&&U(e)}function $(e){return"[object RegExp]"===V(e)&&U(e)}function Q(e){if(T)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!R)return!1;try{return R.call(e),!0}catch(e){}return!1}Pn=function e(t,o,a,f){var g=o||{};if(z(g,"quoteStyle")&&!z(D,g.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(z(g,"maxStringLength")&&("number"==typeof g.maxStringLength?g.maxStringLength<0&&g.maxStringLength!==1/0:null!==g.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var v=!z(g,"customInspect")||g.customInspect;if("boolean"!=typeof v&&"symbol"!==v)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(z(g,"indent")&&null!==g.indent&&"\t"!==g.indent&&!(parseInt(g.indent,10)===g.indent&&g.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(z(g,"numericSeparator")&&"boolean"!=typeof g.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var O=g.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return H(t,g);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var A=String(t);return O?C(t,A):A}if("bigint"==typeof t){var I=String(t)+"n";return O?C(t,I):I}var M=void 0===g.depth?5:g.depth;if(void 0===a&&(a=0),a>=M&&M>0&&"object"==typeof t)return L(t)?"[Array]":"[Object]";var B=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=S.call(Array(e.indent+1)," ")}return{base:r,prev:S.call(Array(t+1),r)}}(g,a);if(void 0===f)f=[];else if(K(f,t)>=0)return"[Circular]";function W(t,r,n){if(r&&(f=E.call(f)).push(r),n){var o={depth:g.depth};return z(g,"quoteStyle")&&(o.quoteStyle=g.quoteStyle),e(t,o,a+1,f)}return e(t,g,a+1,f)}if("function"==typeof t&&!$(t)){var ee=function(e){if(e.name)return e.name;var t=y.call(p.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=Z(t,W);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+S.call(te,", ")+" }":"")}if(Q(t)){var re=T?m.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(t);return"object"!=typeof t||T?re:G(re)}if(function(e){return!(!e||"object"!=typeof e)&&("undefined"!=typeof HTMLElement&&e instanceof HTMLElement||"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}(t)){for(var ne="<"+b.call(String(t.nodeName)),oe=t.attributes||[],ae=0;ae<oe.length;ae++)ne+=" "+oe[ae].name+"="+q(F(oe[ae].value),"double",g);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+"</"+b.call(String(t.nodeName))+">"}if(L(t)){if(0===t.length)return"[]";var ie=Z(t,W);return B&&!function(e){for(var t=0;t<e.length;t++)if(K(e[t],"\n")>=0)return!1;return!0}(ie)?"["+X(ie,B)+"]":"[ "+S.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===V(e)&&U(e)}(t)){var se=Z(t,W);return"cause"in Error.prototype||!("cause"in t)||k.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(se,", ")+" }":"{ ["+String(t)+"] "+S.call(w.call("[cause]: "+W(t.cause),se),", ")+" }"}if("object"==typeof t&&v){if(x&&"function"==typeof t[x]&&N)return N(t,{depth:M-a});if("symbol"!==v&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!r||!e||"object"!=typeof e)return!1;try{r.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ce=[];return n&&n.call(t,function(e,r){ce.push(W(r,t,!0)+" => "+W(e,t))}),Y("Map",r.call(t),ce,B)}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{r.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ue=[];return s&&s.call(t,function(e){ue.push(W(e,t))}),Y("Set",i.call(t),ue,B)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e,c);try{u.call(e,u)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{c.call(e,c)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{return l.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return"[object Number]"===V(e)&&U(e)}(t))return G(W(Number(t)));if(function(e){if(!e||"object"!=typeof e||!_)return!1;try{return _.call(e),!0}catch(e){}return!1}(t))return G(W(_.call(t)));if(function(e){return"[object Boolean]"===V(e)&&U(e)}(t))return G(d.call(t));if(function(e){return"[object String]"===V(e)&&U(e)}(t))return G(W(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==Rn&&t===Rn)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===V(e)&&U(e)}(t)&&!$(t)){var le=Z(t,W),de=j?j(t)===Object.prototype:t instanceof Object||t.constructor===Object,fe=t instanceof Object?"":"null prototype",pe=!de&&P&&Object(t)===t&&P in t?h.call(V(t),8,-1):fe?"Object":"",ye=(de||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(pe||fe?"["+S.call(w.call([],pe||[],fe||[]),": ")+"] ":"");return 0===le.length?ye+"{}":B?ye+"{"+X(le,B)+"}":ye+"{ "+S.call(le,", ")+" }"}return String(t)};var B=Object.prototype.hasOwnProperty||function(e){return e in this};function z(e,t){return B.call(e,t)}function V(e){return f.call(e)}function K(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function H(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return H(h.call(e,0,t.maxStringLength),t)+n}var o=M[t.quoteStyle||"single"];return o.lastIndex=0,q(m.call(m.call(e,o,"\\$1"),/[\x00-\x1f]/g,W),"single",t)}function W(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+g.call(t.toString(16))}function G(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Y(e,t,r,n){return e+" ("+t+") {"+(n?X(r,n):S.call(r,", "))+"}"}function X(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+S.call(e,","+r)+"\n"+t.prev}function Z(e,t){var r=L(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=z(e,o)?t(e[o],e):""}var a,i="function"==typeof A?A(e):[];if(T){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var c in e)z(e,c)&&(r&&String(Number(c))===c&&c<e.length||T&&a["$"+c]instanceof Symbol||(v.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof A)for(var u=0;u<i.length;u++)k.call(e,i[u])&&n.push("["+t(i[u])+"]: "+t(e[i[u]],e));return n}return Pn}function da(){return In?Nn:(In=1,Nn=Object)}function fa(){if(so)return io;so=1;var e=ao?oo:(ao=1,oo=Number.isNaN||function(e){return e!=e});return io=function(t){return e(t)||0===t?t:t<0?-1:1}}function pa(){if(fo)return lo;fo=1;var e=uo?co:(uo=1,co=Object.getOwnPropertyDescriptor);if(e)try{e([],"length")}catch(t){e=null}return lo=e}function ya(){return wo?vo:(wo=1,vo="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function ha(){return Eo?So:(Eo=1,So=da().getPrototypeOf||null)}function ma(){if(Ro)return Ao;Ro=1;var e=function(){if(_o)return Oo;_o=1;var e=Object.prototype.toString,t=Math.max,r=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};return Oo=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var a,i=function(e){for(var t=[],r=1,n=0;r<e.length;r+=1,n+=1)t[n]=e[r];return t}(arguments),s=t(0,o.length-i.length),c=[],u=0;u<s;u++)c[u]="$"+u;if(a=Function("binder","return function ("+function(e){for(var t="",r=0;r<e.length;r+=1)t+=e[r],r+1<e.length&&(t+=",");return t}(c)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var e=o.apply(this,r(i,arguments));return Object(e)===e?e:this}return o.apply(n,r(i,arguments))}),o.prototype){var l=function(){};l.prototype=o.prototype,a.prototype=new l,l.prototype=null}return a},Oo}();return Ao=Function.prototype.bind||e}function ga(){return Po?To:(Po=1,To=Function.prototype.call)}function ba(){return jo?ko:(jo=1,ko=Function.prototype.apply)}function va(){if(Mo)return Do;Mo=1;var e=ma(),t=Tn(),r=ga(),n=function(){if(xo)return Io;xo=1;var e=ma(),t=ba(),r=ga(),n=No?Co:(No=1,Co="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return Io=n||e.call(r,t)}();return Do=function(o){if(o.length<1||"function"!=typeof o[0])throw new t("a function is required");return n(e,r,o)}}function wa(){if(Lo)return Uo;Lo=1;var e=ya(),t=ha(),r=function(){if(Fo)return qo;Fo=1;var e,t=va(),r=pa();try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var n=!!e&&r&&r(Object.prototype,"__proto__"),o=Object,a=o.getPrototypeOf;return qo=n&&"function"==typeof n.get?t([n.get]):"function"==typeof a&&function(e){return a(null==e?e:o(e))}}();return Uo=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function(e){return r(e)}:null}function Sa(){if(zo)return Bo;var e;zo=1;var t=da(),r=Dn?xn:(Dn=1,xn=Error),n=qn?Mn:(qn=1,Mn=EvalError),o=Un?Fn:(Un=1,Fn=RangeError),a=$n?Ln:($n=1,Ln=ReferenceError),i=Bn?Qn:(Bn=1,Qn=SyntaxError),s=Tn(),c=Vn?zn:(Vn=1,zn=URIError),u=Hn?Kn:(Hn=1,Kn=Math.abs),l=Gn?Wn:(Gn=1,Wn=Math.floor),d=Yn?Jn:(Yn=1,Jn=Math.max),f=Zn?Xn:(Zn=1,Xn=Math.min),p=to?eo:(to=1,eo=Math.pow),y=no?ro:(no=1,ro=Math.round),h=fa(),m=Function,g=function(e){try{return m('"use strict"; return ('+e+").constructor;")()}catch(e){}},b=pa(),v=function(){if(yo)return po;yo=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return po=e}(),w=function(){throw new s},S=b?function(){try{return w}catch(e){try{return b(arguments,"callee").get}catch(e){return w}}}():w,E=function(){if(bo)return go;bo=1;var e="undefined"!=typeof Symbol&&Symbol,t=mo?ho:(mo=1,ho=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0});return go=function(){return"function"==typeof e&&"function"==typeof Symbol&&"symbol"==typeof e("foo")&&"symbol"==typeof Symbol("bar")&&t()}}()(),O=wa(),_=ha(),A=ya(),R=ba(),T=ga(),P={},k="undefined"!=typeof Uint8Array&&O?O(Uint8Array):e,j={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":E&&O?O([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":P,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&O?O(O([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&E&&O?O((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":o,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&E&&O?O((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&O?O(""[Symbol.iterator]()):e,"%Symbol%":E?Symbol:e,"%SyntaxError%":i,"%ThrowTypeError%":S,"%TypedArray%":k,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":T,"%Function.prototype.apply%":R,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":_,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":y,"%Math.sign%":h,"%Reflect.getPrototypeOf%":A};if(O)try{null.error}catch(e){var C=O(O(e));j["%Error.prototype%"]=C}var N=function e(t){var r;if("%AsyncFunction%"===t)r=g("async function () {}");else if("%GeneratorFunction%"===t)r=g("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=g("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&O&&(r=O(o.prototype))}return j[t]=r,r},I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=ma(),D=function(){if(Qo)return $o;Qo=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=ma();return $o=r.call(e,t)}(),M=x.call(T,Array.prototype.concat),q=x.call(R,Array.prototype.splice),F=x.call(T,String.prototype.replace),U=x.call(T,String.prototype.slice),L=x.call(T,RegExp.prototype.exec),$=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q=/\\(\\)?/g,B=function(e,t){var r,n=e;if(D(I,n)&&(n="%"+(r=I[n])[0]+"%"),D(j,n)){var o=j[n];if(o===P&&(o=N(n)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};return Bo=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return F(e,$,function(e,t,r,o){n[n.length]=r?F(o,Q,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=B("%"+n+"%",t),a=o.name,c=o.value,u=!1,l=o.alias;l&&(n=l[0],q(r,M([0,1],l)));for(var d=1,f=!0;d<r.length;d+=1){var p=r[d],y=U(p,0,1),h=U(p,-1);if(('"'===y||"'"===y||"`"===y||'"'===h||"'"===h||"`"===h)&&y!==h)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&f||(u=!0),D(j,a="%"+(n+="."+p)+"%"))c=j[a];else if(null!=c){if(!(p in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&d+1>=r.length){var m=b(c,p);c=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[p]}else f=D(c,p),c=c[p];f&&!u&&(j[a]=c)}}return c},Bo}function Ea(){if(Ko)return Vo;Ko=1;var e=Sa(),t=va(),r=t([e("%String.prototype.indexOf%")]);return Vo=function(n,o){var a=e(n,!!o);return"function"==typeof a&&r(n,".prototype.")>-1?t([a]):a}}function Oa(){if(Wo)return Ho;Wo=1;var e=Sa(),t=Ea(),r=la(),n=Tn(),o=e("%Map%",!0),a=t("Map.prototype.get",!0),i=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),c=t("Map.prototype.delete",!0),u=t("Map.prototype.size",!0);return Ho=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+r(e))},delete:function(t){if(e){var r=c(e,t);return 0===u(e)&&(e=void 0),r}return!1},get:function(t){if(e)return a(e,t)},has:function(t){return!!e&&s(e,t)},set:function(t,r){e||(e=new o),i(e,t,r)}};return t}}function _a(){if(Xo)return Yo;Xo=1;var e=Tn(),t=la(),r=function(){if(Cn)return jn;Cn=1;var e=la(),t=Tn(),r=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n};return jn=function(){var n,o={assert:function(r){if(!o.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(e){var t=n&&n.next,o=function(e,t){if(e)return r(e,t,!0)}(n,e);return o&&t&&t===o&&(n=void 0),!!o},get:function(e){return function(e,t){if(e){var n=r(e,t);return n&&n.value}}(n,e)},has:function(e){return function(e,t){return!!e&&!!r(e,t)}(n,e)},set:function(e,t){n||(n={next:void 0}),function(e,t,n){var o=r(e,t);o?o.value=n:e.next={key:t,next:e.next,value:n}}(n,e,t)}};return o}}(),n=Oa(),o=function(){if(Jo)return Go;Jo=1;var e=Sa(),t=Ea(),r=la(),n=Oa(),o=Tn(),a=e("%WeakMap%",!0),i=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),c=t("WeakMap.prototype.has",!0),u=t("WeakMap.prototype.delete",!0);return Go=a?function(){var e,t,l={assert:function(e){if(!l.has(e))throw new o("Side channel does not contain "+r(e))},delete:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return u(e,r)}else if(n&&t)return t.delete(r);return!1},get:function(r){return a&&r&&("object"==typeof r||"function"==typeof r)&&e?i(e,r):t&&t.get(r)},has:function(r){return a&&r&&("object"==typeof r||"function"==typeof r)&&e?c(e,r):!!t&&t.has(r)},set:function(r,o){a&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new a),s(e,r,o)):n&&(t||(t=n()),t.set(r,o))}};return l}:n}(),a=o||n||r;return Yo=function(){var r,n={assert:function(r){if(!n.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(e){return!!r&&r.delete(e)},get:function(e){return r&&r.get(e)},has:function(e){return!!r&&r.has(e)},set:function(e,t){r||(r=a()),r.set(e,t)}};return n}}function Aa(){if(ea)return Zo;ea=1;var e=String.prototype.replace,t=/%20/g,r="RFC3986";return Zo={default:r,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}}function Ra(){if(ra)return ta;ra=1;var e=Aa(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},a=1024;return ta={arrayToObject:o,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],o=0;o<t.length;++o)for(var a=t[o],i=a.obj[a.prop],s=Object.keys(i),c=0;c<s.length;++c){var u=s[c],l=i[u];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:i,prop:u}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(r(n)){for(var o=[],a=0;a<n.length;++a)void 0!==n[a]&&o.push(n[a]);t.obj[t.prop]=o}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(t,r,o,i,s){if(0===t.length)return t;var c=t;if("symbol"==typeof t?c=Symbol.prototype.toString.call(t):"string"!=typeof t&&(c=String(t)),"iso-8859-1"===o)return escape(c).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var u="",l=0;l<c.length;l+=a){for(var d=c.length>=a?c.slice(l,l+a):c,f=[],p=0;p<d.length;++p){var y=d.charCodeAt(p);45===y||46===y||95===y||126===y||y>=48&&y<=57||y>=65&&y<=90||y>=97&&y<=122||s===e.RFC1738&&(40===y||41===y)?f[f.length]=d.charAt(p):y<128?f[f.length]=n[y]:y<2048?f[f.length]=n[192|y>>6]+n[128|63&y]:y<55296||y>=57344?f[f.length]=n[224|y>>12]+n[128|y>>6&63]+n[128|63&y]:(p+=1,y=65536+((1023&y)<<10|1023&d.charCodeAt(p)),f[f.length]=n[240|y>>18]+n[128|y>>12&63]+n[128|y>>6&63]+n[128|63&y])}u+=f.join("")}return u},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(r(e)){for(var n=[],o=0;o<e.length;o+=1)n.push(t(e[o]));return n}return t(e)},merge:function e(n,a,i){if(!a)return n;if("object"!=typeof a&&"function"!=typeof a){if(r(n))n.push(a);else{if(!n||"object"!=typeof n)return[n,a];(i&&(i.plainObjects||i.allowPrototypes)||!t.call(Object.prototype,a))&&(n[a]=!0)}return n}if(!n||"object"!=typeof n)return[n].concat(a);var s=n;return r(n)&&!r(a)&&(s=o(n,i)),r(n)&&r(a)?(a.forEach(function(r,o){if(t.call(n,o)){var a=n[o];a&&"object"==typeof a&&r&&"object"==typeof r?n[o]=e(a,r,i):n.push(r)}else n[o]=r}),n):Object.keys(a).reduce(function(r,n){var o=a[n];return t.call(r,n)?r[n]=e(r[n],o,i):r[n]=o,r},s)}},ta}var Ta=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(function(){if(ca)return sa;ca=1;var e=function(){if(oa)return na;oa=1;var e=_a(),t=Ra(),r=Aa(),n=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Array.isArray,i=Array.prototype.push,s=function(e,t){i.apply(e,a(t)?t:[t])},c=Date.prototype.toISOString,u=r.default,l={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:u,formatter:r.formatters[u],indices:!1,serializeDate:function(e){return c.call(e)},skipNulls:!1,strictNullHandling:!1},d={},f=function r(n,o,i,c,u,f,p,y,h,m,g,b,v,w,S,E,O,_){for(var A,R=n,T=_,P=0,k=!1;void 0!==(T=T.get(d))&&!k;){var j=T.get(n);if(P+=1,void 0!==j){if(j===P)throw new RangeError("Cyclic object value");k=!0}void 0===T.get(d)&&(P=0)}if("function"==typeof m?R=m(o,R):R instanceof Date?R=v(R):"comma"===i&&a(R)&&(R=t.maybeMap(R,function(e){return e instanceof Date?v(e):e})),null===R){if(f)return h&&!E?h(o,l.encoder,O,"key",w):o;R=""}if("string"==typeof(A=R)||"number"==typeof A||"boolean"==typeof A||"symbol"==typeof A||"bigint"==typeof A||t.isBuffer(R))return h?[S(E?o:h(o,l.encoder,O,"key",w))+"="+S(h(R,l.encoder,O,"value",w))]:[S(o)+"="+S(String(R))];var C,N=[];if(void 0===R)return N;if("comma"===i&&a(R))E&&h&&(R=t.maybeMap(R,h)),C=[{value:R.length>0?R.join(",")||null:void 0}];else if(a(m))C=m;else{var I=Object.keys(R);C=g?I.sort(g):I}var x=y?String(o).replace(/\./g,"%2E"):String(o),D=c&&a(R)&&1===R.length?x+"[]":x;if(u&&a(R)&&0===R.length)return D+"[]";for(var M=0;M<C.length;++M){var q=C[M],F="object"==typeof q&&q&&void 0!==q.value?q.value:R[q];if(!p||null!==F){var U=b&&y?String(q).replace(/\./g,"%2E"):String(q),L=a(R)?"function"==typeof i?i(D,U):D:D+(b?"."+U:"["+U+"]");_.set(n,P);var $=e();$.set(d,_),s(N,r(F,L,i,c,u,f,p,y,"comma"===i&&E&&a(R)?null:h,m,g,b,v,w,S,E,O,$))}}return N};return na=function(t,i){var c,u=t,d=function(e){if(!e)return l;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||l.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=r.default;if(void 0!==e.format){if(!n.call(r.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var s,c=r.formatters[i],u=l.filter;if(("function"==typeof e.filter||a(e.filter))&&(u=e.filter),s=e.arrayFormat in o?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":l.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=void 0===e.allowDots?!0===e.encodeDotInKeys||l.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:l.addQueryPrefix,allowDots:d,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:l.allowEmptyArrays,arrayFormat:s,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:l.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?l.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:l.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:l.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:l.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:l.encodeValuesOnly,filter:u,format:i,formatter:c,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:l.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:l.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:l.strictNullHandling}}(i);"function"==typeof d.filter?u=(0,d.filter)("",u):a(d.filter)&&(c=d.filter);var p=[];if("object"!=typeof u||null===u)return"";var y=o[d.arrayFormat],h="comma"===y&&d.commaRoundTrip;c||(c=Object.keys(u)),d.sort&&c.sort(d.sort);for(var m=e(),g=0;g<c.length;++g){var b=c[g],v=u[b];d.skipNulls&&null===v||s(p,f(v,b,y,h,d.allowEmptyArrays,d.strictNullHandling,d.skipNulls,d.encodeDotInKeys,d.encode?d.encoder:null,d.filter,d.sort,d.allowDots,d.serializeDate,d.format,d.formatter,d.encodeValuesOnly,d.charset,m))}var w=p.join(d.delimiter),S=!0===d.addQueryPrefix?"?":"";return d.charsetSentinel&&("iso-8859-1"===d.charset?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),w.length>0?S+w:""},na}(),t=function(){if(ia)return aa;ia=1;var e=Ra(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},a=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},i=function(r,n,o,i){if(r){var s=o.allowDots?r.replace(/\.([^.[]+)/g,"[$1]"):r,c=/(\[[^[\]]*])/g,u=o.depth>0&&/(\[[^[\]]*])/.exec(s),l=u?s.slice(0,u.index):s,d=[];if(l){if(!o.plainObjects&&t.call(Object.prototype,l)&&!o.allowPrototypes)return;d.push(l)}for(var f=0;o.depth>0&&null!==(u=c.exec(s))&&f<o.depth;){if(f+=1,!o.plainObjects&&t.call(Object.prototype,u[1].slice(1,-1))&&!o.allowPrototypes)return;d.push(u[1])}if(u){if(!0===o.strictDepth)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");d.push("["+s.slice(u.index)+"]")}return function(t,r,n,o){var i=0;if(t.length>0&&"[]"===t[t.length-1]){var s=t.slice(0,-1).join("");i=Array.isArray(r)&&r[s]?r[s].length:0}for(var c=o?r:a(r,n,i),u=t.length-1;u>=0;--u){var l,d=t[u];if("[]"===d&&n.parseArrays)l=n.allowEmptyArrays&&(""===c||n.strictNullHandling&&null===c)?[]:e.combine([],c);else{l=n.plainObjects?{__proto__:null}:{};var f="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,p=n.decodeDotInKeys?f.replace(/%2E/g,"."):f,y=parseInt(p,10);n.parseArrays||""!==p?!isNaN(y)&&d!==p&&String(y)===p&&y>=0&&n.parseArrays&&y<=n.arrayLimit?(l=[])[y]=c:"__proto__"!==p&&(l[p]=c):l={0:c}}c=l}return c}(d,n,o,i)}};return aa=function(s,c){var u=function(t){if(!t)return n;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===t.charset?n.charset:t.charset,o=void 0===t.duplicates?n.duplicates:t.duplicates;if("combine"!==o&&"first"!==o&&"last"!==o)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||n.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:n.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:n.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:n.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:n.decoder,delimiter:"string"==typeof t.delimiter||e.isRegExp(t.delimiter)?t.delimiter:n.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:n.depth,duplicates:o,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:n.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:n.strictDepth,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(c);if(""===s||null==s)return u.plainObjects?{__proto__:null}:{};for(var l="string"==typeof s?function(i,s){var c={__proto__:null},u=s.ignoreQueryPrefix?i.replace(/^\?/,""):i;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=s.parameterLimit===1/0?void 0:s.parameterLimit,d=u.split(s.delimiter,s.throwOnLimitExceeded?l+1:l);if(s.throwOnLimitExceeded&&d.length>l)throw new RangeError("Parameter limit exceeded. Only "+l+" parameter"+(1===l?"":"s")+" allowed.");var f,p=-1,y=s.charset;if(s.charsetSentinel)for(f=0;f<d.length;++f)0===d[f].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[f]?y="utf-8":"utf8=%26%2310003%3B"===d[f]&&(y="iso-8859-1"),p=f,f=d.length);for(f=0;f<d.length;++f)if(f!==p){var h,m,g=d[f],b=g.indexOf("]="),v=-1===b?g.indexOf("="):b+1;-1===v?(h=s.decoder(g,n.decoder,y,"key"),m=s.strictNullHandling?null:""):(h=s.decoder(g.slice(0,v),n.decoder,y,"key"),m=e.maybeMap(a(g.slice(v+1),s,r(c[h])?c[h].length:0),function(e){return s.decoder(e,n.decoder,y,"value")})),m&&s.interpretNumericEntities&&"iso-8859-1"===y&&(m=o(String(m))),g.indexOf("[]=")>-1&&(m=r(m)?[m]:m);var w=t.call(c,h);w&&"combine"===s.duplicates?c[h]=e.combine(c[h],m):w&&"last"!==s.duplicates||(c[h]=m)}return c}(s,u):s,d=u.plainObjects?{__proto__:null}:{},f=Object.keys(l),p=0;p<f.length;++p){var y=f[p],h=i(y,l[y],u,"string"==typeof s);d=e.merge(d,h,u)}return!0===u.allowSparse?d:e.compact(d)}}();return sa={formats:Aa(),parse:t,stringify:e}}());const Pa={type:"session",prefix:"",enableLogging:!1,fallbackToMemory:!0,maxRetries:3};class ka{constructor(){this.data=new Map}setItem(e,t){this.data.set(e,t)}getItem(e){return this.data.get(e)||null}removeItem(e){this.data.delete(e)}clear(){this.data.clear()}get length(){return this.data.size}key(e){return Array.from(this.data.keys())[e]||null}keys(){return Array.from(this.data.keys())}}const ja=(e,t)=>{let r=0;for(;r<=t;)try{return e()}catch(e){if(r===t)throw e;r++}},Ca=(e={})=>{const t={...Pa,...e},r="local"===t.type?"localStorage":"sessionStorage";let n=null,o=!1;(()=>{if("undefined"==typeof window)return void(t.fallbackToMemory&&(n=new ka,o=!0,t.enableLogging&&console.warn("CacheFactory: Browser storage unavailable, using memory fallback")));const e=window[r];(e=>{if(!e)return!1;try{const t="__cache_factory_test__",r="test";e.setItem(t,r);const n=e.getItem(t);return e.removeItem(t),n===r}catch(e){return!1}})(e)?n=e:t.fallbackToMemory&&(n=new ka,o=!0,t.enableLogging&&console.warn(`CacheFactory: ${r} unavailable, using memory fallback`))})();const a=e=>t.prefix?`${t.prefix}${e}`:e,i=(e,n,a=null)=>{t.enableLogging&&console.debug(`CacheFactory[${r}]: ${e}`,{key:n,data:a,usingMemoryFallback:o})};return{isAvailable:()=>null!==n,isUsingMemoryFallback:()=>o,getStorageType:()=>o?"memory":r,set(e,r){if(!n)return console.error("CacheFactory: Storage not available"),!1;if(!e||"string"!=typeof e)throw new Error("CacheFactory: Invalid key provided");const o=a(e),s=(e=>{try{return JSON.stringify(e)}catch(e){return console.error("CacheFactory: Failed to serialize value",e),null}})(r);if(null===s)return!1;try{return ja(()=>{n.setItem(o,s)},t.maxRetries),i("SET",e,r),!0}catch(t){return console.error(`CacheFactory: Error setting item ${e}:`,t),!1}},get(e,r=null){if(!n)return console.warn("CacheFactory: Storage not available"),r;if(!e||"string"!=typeof e||"undefined"===e)return console.warn("CacheFactory: Invalid key provided for get operation"),r;const o=a(e);try{const a=ja(()=>n.getItem(o),t.maxRetries);if(null===a||"undefined"===a)return i("GET_MISS",e),r;const s=(e=>{if(null==e)return null;try{return JSON.parse(e)}catch(t){return e}})(a);return i("GET_HIT",e,s),s}catch(t){return console.error(`CacheFactory: Error getting item ${e}:`,t),r}},remove(e){if(!n)return console.error("CacheFactory: Storage not available"),!1;if(!e||"string"!=typeof e)return console.warn("CacheFactory: Invalid key provided for remove operation"),!1;const r=a(e);try{return ja(()=>{n.removeItem(r)},t.maxRetries),i("REMOVE",e),!0}catch(t){return console.error(`CacheFactory: Error removing item ${e}:`,t),!1}},clear(){if(!n)return console.error("CacheFactory: Storage not available"),!1;try{return t.prefix?this.keys().forEach(e=>this.remove(e)):ja(()=>{n.clear()},t.maxRetries),i("CLEAR"),!0}catch(e){return console.error("CacheFactory: Error clearing storage:",e),!1}},keys(){if(!n)return console.warn("CacheFactory: Storage not available"),[];try{let e=[];e=o?n.keys():Object.keys(n);const r=t.prefix?e.filter(e=>e.startsWith(t.prefix)).map(e=>{return r=e,t.prefix&&r.startsWith(t.prefix)?r.slice(t.prefix.length):r;var r}):e;return i("KEYS",null,r),r}catch(e){return console.error("CacheFactory: Error getting keys:",e),[]}},has(e){if(!n||!e||"string"!=typeof e)return!1;const r=a(e);try{const o=ja(()=>null!==n.getItem(r),t.maxRetries);return i("HAS",e,o),o}catch(t){return console.error(`CacheFactory: Error checking if key ${e} exists:`,t),!1}},getStats(){const e=this.keys();return{keyCount:e.length,storageType:this.getStorageType(),usingMemoryFallback:o,prefix:t.prefix||"none",keys:e}},bulk:{set:e=>{const t={};return Object.entries(e).forEach(([e,r])=>{t[e]=this.set(e,r)}),t},get:e=>{const t={};return e.forEach(e=>{t[e]=this.get(e)}),t},remove:e=>{const t={};return e.forEach(e=>{t[e]=this.remove(e)}),t}}}};Ca.local=Ca({type:"local"}),Ca.session=Ca({type:"session"}),e.Cache=Ca({type:"local"}),Ca.memory=Ca({type:"session",fallbackToMemory:!0});const Na={BASE_URL:null,baseUrls:{production:process.env.API_BASE_URL_PROD||"http://fear.master.com/fear/api/",development:process.env.API_BASE_URL_DEV||"http://localhost:4000/fear/api/",test:process.env.API_BASE_URL_TEST||"https://fear.dedyn.io/fear/api/"},tokenNames:{bearer:"Authorization",custom:process.env.REACT_APP_JWT_TOKEN_HEADER||"x-token"},cacheKeys:{auth:"auth",refreshToken:"refresh_token",userPrefs:"user_preferences"},timeout:parseInt(process.env.REACT_APP_API_TIMEOUT)||3e4,retryAttempts:parseInt(process.env.REACT_APP_API_RETRY_ATTEMPTS)||3,retryDelay:parseInt(process.env.REACT_APP_API_RETRY_DELAY)||1e3},Ia=()=>{const e=process.env.NODE_ENV||"development";return Na.BASE_URL||(Na.BASE_URL=Na.baseUrls[e]||Na.baseUrls.development),Na.BASE_URL},xa=()=>{try{const e=Ca.local.get(Na.cacheKeys.auth);return e&&"object"==typeof e?e:null}catch(e){return console.warn("Failed to retrieve auth data:",e),null}},Da=e=>{if(!e)return!0;try{const t=JSON.parse(atob(e.split(".")[1])),r=Date.now()/1e3;return t.exp<r}catch(e){return!0}},Ma=async()=>{try{const e=xa(),t=e?.refreshToken||Ca.local.get(Na.cacheKeys.refreshToken);if(!t)throw new Error("No refresh token available");const r=await sn.post(`${Ia()}auth/refresh`,{refreshToken:t}),n={token:r.data.token,refreshToken:r.data.refreshToken||t,user:r.data.user,expiresAt:r.data.expiresAt};return Ca.local.set(Na.cacheKeys.auth,n),n.token}catch(e){return console.error("Token refresh failed:",e),qa(),null}},qa=()=>{try{Ca.local.remove(Na.cacheKeys.auth),Ca.local.remove(Na.cacheKeys.refreshToken)}catch(e){console.warn("Failed to clear auth data:",e)}},Fa=e=>{const t={message:"An unknown error occurred",status:null,code:null,data:null,timestamp:(new Date).toISOString()};return e.response?{...t,message:e.response.data?.message||`HTTP Error ${e.response.status}`,status:e.response.status,code:e.response.data?.code||e.code,data:e.response.data}:e.request?{...t,message:"Network error - no response received",code:"NETWORK_ERROR"}:{...t,message:e.message||"Request configuration error",code:e.code||"CONFIG_ERROR"}},Ua=async e=>{try{e.metadata={startTime:Date.now()},e._retry=e._retry||0;const t=xa();let r=t?.token;return r&&Da(r)&&0===e._retry&&(r=await Ma()),r&&(e.headers[Na.tokenNames.bearer]=`Bearer ${r}`,e.headers[Na.tokenNames.custom]=r),e.headers["X-Request-ID"]=`req_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,e.headers["X-Client-Version"]=process.env.REACT_APP_VERSION||"1.0.0",e.headers["X-Client-Platform"]="web",e}catch(t){return console.error("Request interceptor error:",t),e}},La=e=>(console.error("Request setup error:",e),Promise.reject(Fa(e))),$a=e=>(e.metadata={responseTime:Date.now()-(e.config.metadata?.startTime||Date.now()),requestId:e.config.headers["X-Request-ID"]},console.log("Loaded Env = ",process.env),"development"===process.env.NODE_ENV&&console.log(`✅ API Success [${e.status}]:`,{url:e.config.url,data:e.data,method:e.config.method?.toUpperCase(),responseTime:e.metadata.responseTime,requestId:e.metadata.requestId}),e.data&&"object"==typeof e.data&&[200,201,202,204].includes(e.status)||e.status>=200&&e.status<300?e:Promise.reject(Fa({response:e,message:`Unexpected response status: ${e.status}`}))),Qa=async e=>{const t=e.config,r=Fa(e);if("development"===process.env.NODE_ENV&&console.error(`❌ API Error [${r.status}]:`,{url:t?.url,error:r,method:t?.method?.toUpperCase(),message:r.message,requestId:t?.headers["X-Request-ID"]}),401===r.status&&!t._isRetryingAuth){t._isRetryingAuth=!0;try{const e=await Ma();if(e)return t.headers[Na.tokenNames.bearer]=`Bearer ${e}`,t.headers[Na.tokenNames.custom]=e,Ba(t)}catch(e){console.error("Auth refresh failed:",e)}qa(),"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("auth:failure",{detail:{error:r}}))}if(([408,429,500,502,503,504].includes(r.status)||"NETWORK_ERROR"===r.code)&&t._retry<Na.retryAttempts){t._retry+=1;const e=(n=t._retry,Na.retryDelay*Math.pow(2,n-1));return console.log(`⏳ Retrying request (${t._retry}/${Na.retryAttempts}) in ${e}ms`),await new Promise(t=>setTimeout(t,e)),Ba(t)}var n;if(429===r.status){const t=e.response?.headers["retry-after"];t&&(r.retryAfter=1e3*parseInt(t))}return Promise.reject(r)},Ba=(()=>{const e=sn.create({baseURL:Ia(),timeout:Na.timeout,headers:{Accept:"application/json","Content-Type":"application/json"},paramsSerializer:{serialize:e=>Ta.stringify(e,{indices:!1,skipNulls:!0,arrayFormat:"brackets"})},withCredentials:!0,transformResponse:[e=>{try{return JSON.parse(e)}catch(t){return e}}]});return e.interceptors.request.use(Ua,La),e.interceptors.response.use($a,Qa),e})(),za={instance:Ba,get:Ba.get.bind(Ba),post:Ba.post.bind(Ba),put:Ba.put.bind(Ba),patch:Ba.patch.bind(Ba),delete:Ba.delete.bind(Ba),head:Ba.head.bind(Ba),options:Ba.options.bind(Ba),request:e=>Ba.request(e),create:(e={})=>{const t=sn.create({...Ba.defaults,...e});return t.interceptors.request.use(Ua,La),t.interceptors.response.use($a,Qa),t},setAuth:(e,t={})=>{try{const r={token:e,user:t,timestamp:Date.now(),expiresAt:t.expiresAt};return Ca.local.set(Na.cacheKeys.auth,r)}catch(e){return console.error("Failed to set auth:",e),!1}},clearAuth:()=>{try{return qa(),!0}catch(e){return console.error("Failed to clear auth:",e),!1}},getAuthStatus:()=>{const e=xa();return{isAuthenticated:!(!e?.token||Da(e.token)),user:e?.user||null,token:e?.token||null,expiresAt:e?.expiresAt||null}},configure:e=>{Object.assign(Ba.defaults,e)},healthCheck:async()=>{try{return{status:"healthy",response:(await Ba.get("health",{timeout:5e3})).data,timestamp:Date.now()}}catch(e){return{status:"unhealthy",error:Fa(e),timestamp:Date.now()}}},uploadFile:(e,t,r)=>Ba.post(e,t,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:e=>{if(r&&e.total){const t=Math.round(100*e.loaded/e.total);r(t,e)}}}),getCached:(e,t=null)=>Ca.local.get(e,t),setCached:(e,t)=>Ca.local.set(e,t),removeCached:e=>Ca.local.remove(e),clearCache:()=>Ca.local.clear(),getCacheStats:()=>Ca.local.getStats(),cache:{getMultiple:e=>Ca.local.bulk.get(e),setMultiple:e=>Ca.local.bulk.set(e),removeMultiple:e=>Ca.local.bulk.remove(e)},config:Na,getBaseUrl:Ia,setBaseUrl:e=>{Na.BASE_URL=e||Na.baseUrls.development,Ia()}};"undefined"!=typeof window&&window.addEventListener("auth:failure",e=>{console.warn("Authentication failed:",e.detail.error)});const Va={GET:"GET",POST:"POST",PUT:"PUT",PATCH:"PATCH",DELETE:"DELETE"},Ka={all:{method:Va.GET,useParams:!1},one:{method:Va.GET,useParams:!0,useIdInUrl:!0},search:{method:Va.POST,useParams:!0},new:{method:Va.POST,useParams:!1},create:{method:Va.POST,useParams:!1},update:{method:Va.PUT,useParams:!1,useIdInUrl:!0},patch:{method:Va.PATCH,useParams:!1,useIdInUrl:!0},delete:{method:Va.DELETE,useParams:!1,useIdInUrl:!0}},Ha=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Entity must be a non-empty string");if(!t||"string"!=typeof t)throw new Error("Prefix must be a non-empty string")},Wa=(e,t,r={})=>{Ha(e,t);const n={method:Va.GET,useParams:!1,useIdInUrl:!1,customUrl:null,customApiUrl:null,...r};return Ue(`${e}/${t}`,async(r={},o)=>{try{const o=((e,t,r={},n=!1)=>{let o=`${e}`;return o+=r?.id||n?`/${r.id}`:`/${t}`,o})(e,t,r,n.useIdInUrl);let a;const i=n.useParams?{params:r}:{};switch(n.method){case Va.GET:a=za.get(o,i);break;case Va.POST:a=za.post(o,r,i);break;case Va.PUT:a=za.put(o,r,i);break;case Va.PATCH:a=za.patch(o,r,i);break;case Va.DELETE:a=za.delete(o,i);break;default:throw new Error(`Unsupported HTTP method: ${n.method}`)}return(e=>void 0!==e?.data?.result?e.data.result:void 0!==e?.data?e.data:e)(await a)}catch(e){return((e,t)=>{const r={message:e?.response?.data?.message||e?.message||"An unknown error occurred",status:e?.response?.status,code:e?.code};return t.rejectWithValue(r)})(e,o)}})},Ga={create:(e,t)=>(Ha(e,t),Ka[t]?Wa(e,t):Wa(e,t,{method:Va.GET,useParams:"search"===t,useIdInUrl:"one"===t})),post:(e,t)=>Wa(e,t,{method:Va.POST,useParams:!0}),put:(e,t)=>Wa(e,t,{method:Va.PUT,useIdInUrl:"update"===t}),patch:(e,t)=>Wa(e,t,{method:Va.PATCH,useIdInUrl:!0}),delete:(e,t)=>Wa(e,t,{method:Va.DELETE,useIdInUrl:!0}),custom:(e,t,r={})=>Wa(e,t,r),createCrud:e=>(Ha(e,"crud"),{fetch:Ga.create(e,"all"),read:Ga.create(e,"one"),create:Ga.post(e,"create"),update:Ga.put(e,"update"),patch:Ga.patch(e,"patch"),delete:Ga.delete(e,"delete"),search:Ga.post(e,"search")}),getHttpMethods:()=>({...Va}),getStandardOperations:()=>({...Ka}),setApiUrl:e=>{Ga.API_URL=e,Ga.getApiUrl()},getApiUrl:()=>Ga.API_URL},Ja={includeEntityState:!0,includePagination:!0,includeFiltering:!0,includeSorting:!0,includeSelection:!0,includeValidation:!1,includeMetadata:!0,customFields:{}},Ya={IDLE:"idle",PENDING:"pending",FULFILLED:"fulfilled",REJECTED:"rejected"},Xa={ASC:"asc",DESC:"desc"},Za=(e,t)=>{if(!t||"object"!=typeof t)return e;const r={...e};return Object.keys(t).forEach(n=>{t[n]&&"object"==typeof t[n]&&!Array.isArray(t[n])?r[n]=Za(e[n]||{},t[n]):r[n]=t[n]}),r},ei=(e,t={})=>{(e=>{if(!e||"string"!=typeof e)throw new Error("Namespace must be a non-empty string");if(!/^[a-zA-Z][a-zA-Z0-9_]*$/.test(e))throw new Error("Namespace must be a valid identifier (letters, numbers, underscore, starting with letter)")})(e);const r={...Ja,...t},n={...{data:[],loading:!1,success:!1,error:null,loadingState:Ya.IDLE,...r.includeEntityState&&{[e]:null,[`${e}List`]:[],[`current${e.charAt(0).toUpperCase()+e.slice(1)}`]:null}},...{...r.includePagination&&{pagination:{currentPage:1,pageSize:10,totalItems:0,totalPages:0,hasNextPage:!1,hasPreviousPage:!1}},...r.includeFiltering&&{filtering:{filters:{},activeFilters:[],searchTerm:"",searchFields:[]}},...r.includeSorting&&{sorting:{sortBy:null,sortOrder:Xa.ASC,multiSort:[]}},...r.includeSelection&&{selection:{selectedItems:[],selectedIds:[],allSelected:!1,selectionMode:"multiple"}},...r.includeValidation&&{validation:{validationErrors:{},isValid:!0,fieldErrors:{},touched:{}}},...r.includeMetadata&&{metadata:{lastFetch:null,lastUpdate:null,version:0,source:null,cached:!1,stale:!1}},async:{operations:{},globalLoading:!1,operationQueue:[]}},...r.customFields};return console.log("Initial State :: ",n),n};ei.minimal=e=>ei(e,{includeEntityState:!0,includePagination:!1,includeFiltering:!1,includeSorting:!1,includeSelection:!1,includeValidation:!1,includeMetadata:!1}),ei.forList=e=>ei(e,{includeEntityState:!0,includePagination:!0,includeFiltering:!0,includeSorting:!0,includeSelection:!0,includeValidation:!1,includeMetadata:!0}),ei.forForm=e=>ei(e,{includeEntityState:!0,includePagination:!1,includeFiltering:!1,includeSorting:!1,includeSelection:!1,includeValidation:!0,includeMetadata:!0,customFields:{formData:{},isDirty:!1,isSubmitting:!1,submitCount:0}}),ei.forRealTime=e=>ei(e,{includeEntityState:!0,includePagination:!1,includeFiltering:!1,includeSorting:!1,includeSelection:!1,includeValidation:!1,includeMetadata:!0,customFields:{connected:!1,connectionStatus:"disconnected",lastHeartbeat:null,subscriptions:[],liveUpdates:!0}}),ei.normalized=e=>ei(e,{includeEntityState:!1,customFields:{ids:[],entities:{}}}),ei.withOperations=(e,t=[])=>{const r=t.reduce((e,t)=>(e[`${t}Loading`]=!1,e[`${t}Success`]=!1,e[`${t}Error`]=null,e),{});return ei(e,{customFields:{...r,operations:t.reduce((e,t)=>(e[t]={loading:!1,success:!1,error:null,lastRun:null},e),{})}})},ei.utils={getLoadingStates:()=>({...Ya}),getSortOrders:()=>({...Xa}),createLoadingUpdates:(e="default")=>({pending:{loading:!0,success:!1,error:null,loadingState:Ya.PENDING,[`async.operations.${e}.loading`]:!0},fulfilled:{loading:!1,success:!0,error:null,loadingState:Ya.FULFILLED,[`async.operations.${e}.loading`]:!1,[`async.operations.${e}.success`]:!0,[`async.operations.${e}.lastRun`]:(new Date).toISOString()},rejected:t=>({loading:!1,success:!1,error:t,loadingState:Ya.REJECTED,[`async.operations.${e}.loading`]:!1,[`async.operations.${e}.error`]:t,[`async.operations.${e}.lastRun`]:(new Date).toISOString()})}),validateState:(e,t)=>!(!e||"object"!=typeof e||!Array.isArray(e.data)||"boolean"!=typeof e.loading||"boolean"!=typeof e.success),mergeState:Za,resetState:(e,t={})=>ei(e,t)};const ti=(e,t,r)=>{Object.entries(t).forEach(([t,n])=>{e.addCase(n.pending,e=>{e.loading=!0,e.error=null,e.loadingState="pending",e.async?.operations&&(e.async.operations[t]={loading:!0,success:!1,error:null,lastRun:(new Date).toISOString()}),console.log("pending state = ",e)}).addCase(n.fulfilled,(e,n)=>{e.loading=!1,e.success=!0,e.loadingState="fulfilled";const o=n.payload;if(console.log("fulfilled state = ",e),console.log("loading state = false (success)",o),"fetch"===t||"search"===t)e.data=Array.isArray(o)?o:o?.data||[];else if("fetchOne"===t)e[r]=Array.isArray(o)?o[0]:o;else if("create"===t)Array.isArray(e.data)&&e.data.push(o);else if("update"===t||"patch"===t){if(Array.isArray(e.data)){const t=e.data.findIndex(e=>e.id===o.id);-1!==t&&(e.data[t]=o)}e[r]?.id===o.id&&(e[r]=o)}else"delete"===t&&Array.isArray(e.data)&&(e.data=e.data.filter(e=>e.id!==n.meta.arg?.id));e.metadata&&(e.metadata.lastUpdate=(new Date).toISOString(),e.metadata.stale=!1,"fetch"!==t&&"fetchOne"!==t&&"search"!==t||(e.metadata.lastFetch=(new Date).toISOString())),e.async?.operations&&(e.async.operations[t]={loading:!1,success:!0,error:null,lastRun:(new Date).toISOString()}),console.log("fully fulfilled state :: ",e)}).addCase(n.rejected,(e,r)=>{e.loading=!1,e.success=!1,e.error=r.error?.message||r.payload||"An error occurred",e.loadingState="rejected",e.async?.operations&&(e.async.operations[t]={loading:!1,success:!1,error:e.error,lastRun:(new Date).toISOString()}),console.log("Rejected state = ",e)})})};var ri=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},ni=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(ni||{});function oi(e){return{status:e,isUninitialized:"uninitialized"===e,isLoading:"pending"===e,isSuccess:"fulfilled"===e,isError:"rejected"===e}}var ai=o;function ii(e,t){if(e===t||!(ai(e)&&ai(t)||Array.isArray(e)&&Array.isArray(t)))return t;const r=Object.keys(t),n=Object.keys(e);let o=r.length===n.length;const a=Array.isArray(t)?[]:{};for(const n of r)a[n]=ii(e[n],t[n]),o&&(o=e[n]===a[n]);return o?e:a}function si(e){let t=0;for(const r in e)t++;return t}var ci=e=>[].concat(...e);function ui(e){return null!=e}function li(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var di=()=>new Map,fi=(...e)=>fetch(...e),pi=e=>e.status>=200&&e.status<=299,yi=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function hi(e){if(!o(e))return e;const t={...e};for(const[e,r]of Object.entries(t))void 0===r&&delete t[e];return t}function mi({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:r=fi,paramsSerializer:n,isJsonContentType:a=yi,jsonContentType:i="application/json",jsonReplacer:s,timeout:c,responseHandler:u,validateStatus:l,...d}={}){return"undefined"==typeof fetch&&r===fi&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(p,y,h)=>{const{getState:m,extra:g,endpoint:b,forced:v,type:w}=y;let S,E,{url:O,headers:_=new Headers(d.headers),params:A,responseHandler:R=u??"json",validateStatus:T=l??pi,timeout:P=c,...k}="string"==typeof p?{url:p}:p,j=y.signal;P&&(E=new AbortController,y.signal.addEventListener("abort",E.abort),j=E.signal);let C={...d,signal:j,...k};_=new Headers(hi(_)),C.headers=await t(_,{getState:m,arg:p,extra:g,endpoint:b,forced:v,type:w,extraOptions:h})||_;const N=e=>"object"==typeof e&&(o(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!C.headers.has("content-type")&&N(C.body)&&C.headers.set("content-type",i),N(C.body)&&a(C.headers)&&(C.body=JSON.stringify(C.body,s)),A){const e=~O.indexOf("?")?"&":"?";O+=e+(n?n(A):new URLSearchParams(hi(A)))}O=function(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;const r=e.endsWith("/")||!t.startsWith("?")?"/":"";return`${e=(e=>e.replace(/\/$/,""))(e)}${r}${t=(e=>e.replace(/^\//,""))(t)}`}(e,O);const I=new Request(O,C);S={request:new Request(O,C)};let x,D=!1,M=E&&setTimeout(()=>{D=!0,E.abort()},P);try{x=await r(I)}catch(e){return{error:{status:D?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:S}}finally{M&&clearTimeout(M),E?.signal.removeEventListener("abort",E.abort)}const q=x.clone();let F;S.response=q;let U="";try{let e;if(await Promise.all([f(x,R).then(e=>F=e,t=>e=t),q.text().then(e=>U=e,()=>{})]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:x.status,data:U,error:String(e)},meta:S}}return T(x,F)?{data:F,meta:S}:{error:{status:x.status,data:F},meta:S}};async function f(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=a(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var gi=class{constructor(e,t=void 0){this.value=e,this.meta=t}},bi=me("__rtkq/focused"),vi=me("__rtkq/unfocused"),wi=me("__rtkq/online"),Si=me("__rtkq/offline");function Ei(e){return"query"===e.type}function Oi(e){return"infinitequery"===e.type}function _i(e){return Ei(e)||Oi(e)}function Ai(e,t,r,n,o,a){return"function"==typeof e?e(t,r,n,o).filter(ui).map(Ri).map(a):Array.isArray(e)?e.map(Ri).map(a):[]}function Ri(e){return"string"==typeof e?{type:e}:e}var Ti=Symbol("forceQueryFn"),Pi=e=>"function"==typeof e[Ti],ki=class extends ri{constructor(e,t,r,n){super(e),this.value=t,this.schemaName=r,this._bqMeta=n}},ji=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function Ci(e,t,r,n){const o=await e["~standard"].validate(t);if(o.issues)throw new ki(o.issues,t,r,n);return o.value}function Ni(e){return e}var Ii=(e={})=>({...e,[we]:!0});function xi(e,{pages:t,pageParams:r},n){const o=t.length-1;return e.getNextPageParam(t[o],t,r[o],r,n)}function Di(e,{pages:t,pageParams:r},n){return e.getPreviousPageParam?.(t[0],t,r[0],r,n)}function Mi(e,t,r,n){return Ai(r[e.meta.arg.endpointName][t],Ce(e)?e.payload:void 0,je(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function qi(e,t,r){const n=e[t];n&&r(n)}function Fi(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function Ui(e,t,r){const n=e[Fi(t)];n&&r(n)}var Li={};function $i({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:a,extractRehydrationInfo:i,hasRehydrationInfo:c},assertTagType:u,config:l}){const f=me(`${e}/resetApiState`);function y(e,t,r,n){e[t.queryCacheKey]??={status:"uninitialized",endpointName:t.endpointName},qi(e,t.queryCacheKey,e=>{e.status="pending",e.requestId=r&&e.requestId?e.requestId:n.requestId,void 0!==t.originalArgs&&(e.originalArgs=t.originalArgs),e.startedTimeStamp=n.startedTimeStamp,Oi(o[n.arg.endpointName])&&"direction"in t&&(e.direction=t.direction)})}function m(e,t,r,n){qi(e,t.arg.queryCacheKey,e=>{if(e.requestId!==t.requestId&&!n)return;const{merge:a}=o[t.arg.endpointName];if(e.status="fulfilled",a)if(void 0!==e.data){const{fulfilledTimeStamp:n,arg:o,baseQueryMeta:i,requestId:s}=t;let c=te(e.data,e=>a(e,r,{arg:o.originalArgs,baseQueryMeta:i,fulfilledTimeStamp:n,requestId:s}));e.data=c}else e.data=r;else e.data=o[t.arg.endpointName].structuralSharing??1?ii(h(e.data)?(h(i=e.data)||p(15,i),i[d].base_):e.data,r):r;var i;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp})}const g=ze({name:`${e}/queries`,initialState:Li,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:Se()},cacheEntriesUpserted:{reducer(e,t){for(const r of t.payload){const{queryDescription:n,value:o}=r;y(e,n,!0,{arg:n,requestId:t.meta.requestId,startedTimeStamp:t.meta.timestamp}),m(e,{arg:n,requestId:t.meta.requestId,fulfilledTimeStamp:t.meta.timestamp,baseQueryMeta:{}},o,!0)}},prepare:e=>({payload:e.map(e=>{const{endpointName:t,arg:r,value:a}=e,i=o[t];return{queryDescription:{type:"query",endpointName:t,originalArgs:e.arg,queryCacheKey:n({queryArgs:r,endpointDefinition:i,endpointName:t})},value:a}}),meta:{[we]:!0,requestId:Ie(),timestamp:Date.now()}})},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:r}}){qi(e,t,e=>{e.data=ne(e.data,r.concat())})},prepare:Se()}},extraReducers(e){e.addCase(t.pending,(e,{meta:t,meta:{arg:r}})=>{y(e,r,Pi(r),t)}).addCase(t.fulfilled,(e,{meta:t,payload:r})=>{m(e,t,r,Pi(t.arg))}).addCase(t.rejected,(e,{meta:{condition:t,arg:r,requestId:n},error:o,payload:a})=>{qi(e,r.queryCacheKey,e=>{if(t);else{if(e.requestId!==n)return;e.status="rejected",e.error=a??o}})}).addMatcher(c,(e,t)=>{const{queries:r}=i(t);for(const[t,n]of Object.entries(r))"fulfilled"!==n?.status&&"rejected"!==n?.status||(e[t]=n)})}}),b=ze({name:`${e}/mutations`,initialState:Li,reducers:{removeMutationResult:{reducer(e,{payload:t}){const r=Fi(t);r in e&&delete e[r]},prepare:Se()}},extraReducers(e){e.addCase(r.pending,(e,{meta:t,meta:{requestId:r,arg:n,startedTimeStamp:o}})=>{n.track&&(e[Fi(t)]={requestId:r,status:"pending",endpointName:n.endpointName,startedTimeStamp:o})}).addCase(r.fulfilled,(e,{payload:t,meta:r})=>{r.arg.track&&Ui(e,r,e=>{e.requestId===r.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=r.fulfilledTimeStamp)})}).addCase(r.rejected,(e,{payload:t,error:r,meta:n})=>{n.arg.track&&Ui(e,n,e=>{e.requestId===n.requestId&&(e.status="rejected",e.error=t??r)})}).addMatcher(c,(e,t)=>{const{mutations:r}=i(t);for(const[t,n]of Object.entries(r))"fulfilled"!==n?.status&&"rejected"!==n?.status||t===n?.requestId||(e[t]=n)})}}),v=ze({name:`${e}/invalidation`,initialState:{tags:{},keys:{}},reducers:{updateProvidedBy:{reducer(e,t){for(const{queryCacheKey:r,providedTags:n}of t.payload){w(e,r);for(const{type:t,id:o}of n){const n=(e.tags[t]??={})[o||"__internal_without_id"]??=[];n.includes(r)||n.push(r)}e.keys[r]=n}},prepare:Se()}},extraReducers(e){e.addCase(g.actions.removeQueryResult,(e,{payload:{queryCacheKey:t}})=>{w(e,t)}).addMatcher(c,(e,t)=>{const{provided:r}=i(t);for(const[t,n]of Object.entries(r.tags??{}))for(const[o,a]of Object.entries(n)){const n=(e.tags[t]??={})[o||"__internal_without_id"]??=[];for(const t of a)n.includes(t)||n.push(t),e.keys[t]=r.keys[t]}}).addMatcher(_e(Ce(t),je(t)),(e,t)=>{S(e,[t])}).addMatcher(g.actions.cacheEntriesUpserted.match,(e,t)=>{S(e,t.payload.map(({queryDescription:e,value:t})=>({type:"UNKNOWN",payload:t,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:e}})))})}});function w(e,t){const r=e.keys[t]??[];for(const n of r){const r=n.type,o=n.id??"__internal_without_id",a=e.tags[r]?.[o];a&&(e.tags[r][o]=a.filter(e=>e!==t))}delete e.keys[t]}function S(e,t){const r=t.map(e=>{const t=Mi(e,"providesTags",o,u),{queryCacheKey:r}=e.meta.arg;return{queryCacheKey:r,providedTags:t}});v.caseReducers.updateProvidedBy(e,v.actions.updateProvidedBy(r))}const E=ze({name:`${e}/subscriptions`,initialState:Li,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),O=ze({name:`${e}/internalSubscriptions`,initialState:Li,reducers:{subscriptionsUpdated:{reducer:(e,t)=>ne(e,t.payload),prepare:Se()}}}),_=ze({name:`${e}/config`,initialState:{online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...l},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&a===t||"conflict"}},extraReducers:e=>{e.addCase(wi,e=>{e.online=!0}).addCase(Si,e=>{e.online=!1}).addCase(bi,e=>{e.focused=!0}).addCase(vi,e=>{e.focused=!1}).addMatcher(c,e=>({...e}))}}),A=s({queries:g.reducer,mutations:b.reducer,provided:v.reducer,subscriptions:O.reducer,config:_.reducer});return{reducer:(e,t)=>A(f.match(t)?void 0:e,t),actions:{..._.actions,...g.actions,...E.actions,...O.actions,...b.actions,...v.actions,resetApiState:f}}}var Qi=Symbol.for("RTKQ/skipToken"),Bi={status:"uninitialized"},zi=te(Bi,()=>{}),Vi=te(Bi,()=>{}),Ki=WeakMap?new WeakMap:void 0,Hi=({endpointName:e,queryArgs:t})=>{let r="";const n=Ki?.get(t);if("string"==typeof n)r=n;else{const e=JSON.stringify(t,(e,t)=>t=o(t="bigint"==typeof t?{$bigint:t.toString()}:t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t);o(t)&&Ki?.set(t,e),r=e}return`${e}(${r})`};function Wi(e,...t){return Object.assign(e,...t)}var Gi=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:o,selectors:{selectQueryEntry:a,selectConfig:i},getRunningQueryThunk:s,mwApi:c})=>{const{removeQueryResult:u,unsubscribeQueryResult:l,cacheEntriesUpserted:d}=t.internalActions,f=o.runningQueries.get(c.dispatch),p=_e(l.match,r.fulfilled,r.rejected,d.match);function y(e){const t=o.currentSubscriptions.get(e);return!!t&&(t.size>0||void 0!==f?.[e])}const h={};function m(e,t,r){const n=t.getState();for(const o of e){const e=a(n,o);e?.endpointName&&g(o,e.endpointName,t,r)}}function g(e,t,r,o){const i=n.endpointDefinitions[t],c=i?.keepUnusedDataFor??o.keepUnusedDataFor;if(c===1/0)return;const l=Math.max(0,Math.min(c,2147482.647));if(!y(e)){const t=h[e];t&&clearTimeout(t),h[e]=setTimeout(()=>{if(!y(e)){const t=a(r.getState(),e);if(t?.endpointName){const e=r.dispatch(s(t.endpointName,t.originalArgs));e?.abort()}r.dispatch(u({queryCacheKey:e}))}delete h[e]},1e3*l)}}return(e,r,o)=>{const a=r.getState(),s=i(a);if(p(e)){let t;if(d.match(e))t=e.payload.map(e=>e.queryDescription.queryCacheKey);else{const{queryCacheKey:r}=l.match(e)?e.payload:e.meta.arg;t=[r]}m(t,r,s)}if(t.util.resetApiState.match(e))for(const[e,t]of Object.entries(h))t&&clearTimeout(t),delete h[e];if(n.hasRehydrationInfo(e)){const{queries:t}=n.extractRehydrationInfo(e);m(Object.keys(t),r,s)}}},Ji=new Error("Promise never resolved before cacheEntryRemoved."),Yi=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:a,selectors:{selectQueryEntry:i,selectApiState:s}})=>{const c=Ne(n),u=Ne(o),l=Ce(n,o),d={};function f(e,t,r){const n=d[e];n?.valueResolved&&(n.valueResolved({data:t,meta:r}),delete n.valueResolved)}function p(e){const t=d[e];t&&(delete d[e],t.cacheEntryRemoved())}function y(t,n,o,a,i){const s=r.endpointDefinitions[t],c=s?.onCacheEntryAdded;if(!c)return;const u={},l=new Promise(e=>{u.cacheEntryRemoved=e}),f=Promise.race([new Promise(e=>{u.valueResolved=e}),l.then(()=>{throw Ji})]);f.catch(()=>{}),d[o]=u;const p=e.endpoints[t].select(_i(s)?n:o),y=a.dispatch((e,t,r)=>r),h={...a,getCacheEntry:()=>p(a.getState()),requestId:i,extra:y,updateCachedData:_i(s)?r=>a.dispatch(e.util.updateQueryData(t,n,r)):void 0,cacheDataLoaded:f,cacheEntryRemoved:l},m=c(n,h);Promise.resolve(m).catch(e=>{if(e!==Ji)throw e})}return(r,a,s)=>{const h=function(t){return c(t)?t.meta.arg.queryCacheKey:u(t)?t.meta.arg.fixedCacheKey??t.meta.requestId:e.internalActions.removeQueryResult.match(t)?t.payload.queryCacheKey:e.internalActions.removeMutationResult.match(t)?Fi(t.payload):""}(r);function m(e,t,r,n){const o=i(s,t),c=i(a.getState(),t);!o&&c&&y(e,n,t,a,r)}if(n.pending.match(r))m(r.meta.arg.endpointName,h,r.meta.requestId,r.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(r))for(const{queryDescription:e,value:t}of r.payload){const{endpointName:n,originalArgs:o,queryCacheKey:a}=e;m(n,a,r.meta.requestId,o),f(a,t,{})}else if(o.pending.match(r))a.getState()[t].mutations[h]&&y(r.meta.arg.endpointName,r.meta.arg.originalArgs,h,a,r.meta.requestId);else if(l(r))f(h,r.payload,r.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(r)||e.internalActions.removeMutationResult.match(r))p(h);else if(e.util.resetApiState.match(r))for(const e of Object.keys(d))p(e)}},Xi=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),"undefined"!=typeof process&&"development"===process.env.NODE_ENV&&e.internalActions.middlewareRegistered.match(n)&&n.payload===t&&"conflict"===o.getState()[r]?.config?.middlewareRegistered&&console.warn(`There is a mismatch between slice and middleware for the reducerPath "${r}".\nYou can only have one api per reducer path, this will lead to crashes in various situations!${"api"===r?"\nIf you have multiple apis, you *have* to specify the reducerPath option when using createApi!":""}`)},Zi=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:o,api:a,assertTagType:i,refetchQuery:s,internalState:c})=>{const{removeQueryResult:u}=a.internalActions,l=_e(Ce(n),je(n)),d=_e(Ce(n,o),ke(n,o));let f=[];function p(r,n){const o=n.getState(),i=o[e];if(f.push(...r),"delayed"===i.config.invalidationBehavior&&function(e){const{queries:t,mutations:r}=e;for(const e of[t,r])for(const t in e)if("pending"===e[t]?.status)return!0;return!1}(i))return;const l=f;if(f=[],0===l.length)return;const d=a.util.selectInvalidatedBy(o,l);t.batch(()=>{const e=Array.from(d.values());for(const{queryCacheKey:t}of e){const e=i.queries[t],r=li(c.currentSubscriptions,t,di);e&&(0===r.size?n.dispatch(u({queryCacheKey:t})):"uninitialized"!==e.status&&n.dispatch(s(e)))}})}return(e,t)=>{l(e)?p(Mi(e,"invalidatesTags",r,i),t):d(e)?p([],t):a.util.invalidateTags.match(e)&&p(Ai(e.payload,void 0,void 0,void 0,void 0,i),t)}},es=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:o})=>{const{currentPolls:a,currentSubscriptions:i}=o,s=new Set;let c=null;function u(e,t){s.add(e),c||(c=setTimeout(()=>{for(const e of s)d({queryCacheKey:e},t);s.clear(),c=null},0))}function l({queryCacheKey:t},r){const o=r.getState()[e],s=o.queries[t],c=i.get(t);if(!s||"uninitialized"===s.status)return;const{lowestPollingInterval:u,skipPollingIfUnfocused:d}=p(c);if(!Number.isFinite(u))return;const f=a.get(t);f?.timeout&&(clearTimeout(f.timeout),f.timeout=void 0);const y=Date.now()+u;a.set(t,{nextPollTimestamp:y,pollingInterval:u,timeout:setTimeout(()=>{!o.config.focused&&d||r.dispatch(n(s)),l({queryCacheKey:t},r)},u)})}function d({queryCacheKey:t},r){const n=r.getState()[e].queries[t],o=i.get(t);if(!n||"uninitialized"===n.status)return;const{lowestPollingInterval:s}=p(o);if("test"===process.env.NODE_ENV){const e=a.pollUpdateCounters??={};e[t]??=0,e[t]++}if(!Number.isFinite(s))return void f(t);const c=a.get(t),u=Date.now()+s;(!c||u<c.nextPollTimestamp)&&l({queryCacheKey:t},r)}function f(e){const t=a.get(e);t?.timeout&&clearTimeout(t.timeout),a.delete(e)}function p(e=new Map){let t=!1,r=Number.POSITIVE_INFINITY;for(const n of e.values())n.pollingInterval&&(r=Math.min(n.pollingInterval,r),t=n.skipPollingIfUnfocused||t);return{lowestPollingInterval:r,skipPollingIfUnfocused:t}}return(e,n)=>{(r.internalActions.updateSubscriptionOptions.match(e)||r.internalActions.unsubscribeQueryResult.match(e))&&u(e.payload.queryCacheKey,n),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&u(e.meta.arg.queryCacheKey,n),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&l(e.meta.arg,n),r.util.resetApiState.match(e)&&(function(){for(const e of a.keys())f(e)}(),c&&(clearTimeout(c),c=null),s.clear())}},ts=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{const o=Pe(r,n),a=ke(r,n),i=Ce(r,n),s={};return(r,n)=>{if(o(r)){const{requestId:o,arg:{endpointName:a,originalArgs:i}}=r.meta,c=t.endpointDefinitions[a],u=c?.onQueryStarted;if(u){const t={},r=new Promise((e,r)=>{t.resolve=e,t.reject=r});r.catch(()=>{}),s[o]=t;const l=e.endpoints[a].select(_i(c)?i:o),d=n.dispatch((e,t,r)=>r),f={...n,getCacheEntry:()=>l(n.getState()),requestId:o,extra:d,updateCachedData:_i(c)?t=>n.dispatch(e.util.updateQueryData(a,i,t)):void 0,queryFulfilled:r};u(i,f)}}else if(i(r)){const{requestId:e,baseQueryMeta:t}=r.meta;s[e]?.resolve({data:r.payload,meta:t}),delete s[e]}else if(a(r)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:n}=r.meta;s[e]?.reject({error:r.payload??r.error,isUnhandledError:!t,meta:n}),delete s[e]}}};function rs(e){const{reducerPath:t,queryThunk:r,api:n,context:o,internalState:a}=e,{apiUid:i}=o,s={invalidateTags:me(`${t}/invalidateTags`)},u=e=>e.type.startsWith(`${t}/`),l=[Xi,Gi,Zi,es,Yi,ts];return{middleware:r=>{let s=!1;const f={...e,internalState:a,refetchQuery:d,isThisApiSliceAction:u,mwApi:r},p=l.map(e=>e(f)),y=(({api:e,queryThunk:t,internalState:r,mwApi:n})=>{const o=`${e.reducerPath}/subscriptions`;let a=null,i=null;const{updateSubscriptionOptions:s,unsubscribeQueryResult:c}=e.internalActions,u=()=>r.currentSubscriptions,l={getSubscriptions:u,getSubscriptionCount:e=>{const t=u().get(e);return t?.size??0},isRequestSubscribed:(e,t)=>{const r=u();return!!r?.get(e)?.get(t)}};function d(e){return JSON.parse(JSON.stringify(Object.fromEntries([...e].map(([e,t])=>[e,Object.fromEntries(t)]))))}return(n,u)=>{if(a||(a=d(r.currentSubscriptions)),e.util.resetApiState.match(n))return a={},r.currentSubscriptions.clear(),i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(n))return[!1,l];const f=((r,n)=>{if(s.match(n)){const{queryCacheKey:e,requestId:t,options:o}=n.payload,a=r.get(e);return a?.has(t)&&a.set(t,o),!0}if(c.match(n)){const{queryCacheKey:e,requestId:t}=n.payload,o=r.get(e);return o&&o.delete(t),!0}if(e.internalActions.removeQueryResult.match(n))return r.delete(n.payload.queryCacheKey),!0;if(t.pending.match(n)){const{meta:{arg:e,requestId:t}}=n,o=li(r,e.queryCacheKey,di);return e.subscribe&&o.set(t,e.subscriptionOptions??o.get(t)??{}),!0}let o=!1;if(t.rejected.match(n)){const{meta:{condition:e,arg:t,requestId:a}}=n;if(e&&t.subscribe){const e=li(r,t.queryCacheKey,di);e.set(a,t.subscriptionOptions??e.get(a)??{}),o=!0}}return o})(r.currentSubscriptions,n);let p=!0;if("test"===process.env.NODE_ENV&&"string"==typeof n.type&&n.type===`${e.reducerPath}/getPolling`)return[!1,r.currentPolls];if(f){i||(i=setTimeout(()=>{const t=d(r.currentSubscriptions),[,n]=re(a,()=>t);u.next(e.internalActions.subscriptionsUpdated(n)),a=t,i=null},500));const s="string"==typeof n.type&&!!n.type.startsWith(o),c=t.rejected.match(n)&&n.meta.condition&&!!n.meta.arg.subscribe;p=!s&&!c}return[p,!1]}})(f),h=(({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{const{removeQueryResult:a}=r.internalActions;function i(r,i){const s=r.getState()[e],c=s.queries,u=o.currentSubscriptions;t.batch(()=>{for(const e of u.keys()){const t=c[e],o=u.get(e);if(!o||!t)continue;const l=[...o.values()];(l.some(e=>!0===e[i])||l.every(e=>void 0===e[i])&&s.config[i])&&(0===o.size?r.dispatch(a({queryCacheKey:e})):"uninitialized"!==t.status&&r.dispatch(n(t)))}})}return(e,t)=>{bi.match(e)&&i(t,"refetchOnFocus"),wi.match(e)&&i(t,"refetchOnReconnect")}})(f);return e=>a=>{if(!c(a))return e(a);s||(s=!0,r.dispatch(n.internalActions.middlewareRegistered(i)));const l={...r,next:e},d=r.getState(),[f,m]=y(a,l,d);let g;if(g=f?e(a):m,r.getState()[t]&&(h(a,l,d),u(a)||o.hasRehydrationInfo(a)))for(const e of p)e(a,l,d);return g}},actions:s};function d(t){return e.api.endpoints[t.endpointName].initiate(t.originalArgs,{subscribe:!1,forceRefetch:!0})}}var ns=Symbol(),os=({createSelector:e=pe}={})=>({name:ns,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:a,keepUnusedDataFor:i,refetchOnMountOrArgChange:s,refetchOnFocus:c,refetchOnReconnect:u,invalidationBehavior:l,onSchemaFailure:d,catchSchemaFailure:f,skipSchemaValidation:p},y){Z();const h=e=>("undefined"!=typeof process&&"development"===process.env.NODE_ENV&&(n.includes(e.type)||console.error(`Tag type '${e.type}' was used, but not specified in \`tagTypes\`!`)),e);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:wi,onOffline:Si,onFocus:bi,onFocusLost:vi},util:{}});const g=function({serializeQueryArgs:e,reducerPath:t,createSelector:r}){const n=e=>zi,o=e=>Vi;return{buildQuerySelector:function(e,t){return u(e,t,a)},buildInfiniteQuerySelector:function(e,t){const{infiniteQueryOptions:r}=t;return u(e,t,function(e){const t={...e,...oi(e.status)},{isLoading:n,isError:o,direction:a}=t,i="forward"===a,s="backward"===a;return{...t,hasNextPage:l(r,t.data,t.originalArgs),hasPreviousPage:d(r,t.data,t.originalArgs),isFetchingNextPage:n&&i,isFetchingPreviousPage:n&&s,isFetchNextPageError:o&&i,isFetchPreviousPageError:o&&s}})},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?Fi(e)??Qi:e,r(t===Qi?o:e=>i(e)?.mutations?.[t]??Vi,a)}},selectInvalidatedBy:function(e,r){const n=e[t],o=new Set;for(const e of r.filter(ui).map(Ri)){const t=n.provided.tags[e.type];if(!t)continue;let r=(void 0!==e.id?t[e.id]:ci(Object.values(t)))??[];for(const e of r)o.add(e)}return ci(Array.from(o.values()).map(e=>{const t=n.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]}))},selectCachedArgsForQuery:function(e,t){return Object.values(s(e)).filter(e=>e?.endpointName===t&&"uninitialized"!==e.status).map(e=>e.originalArgs)},selectApiState:i,selectQueries:s,selectMutations:function(e){return i(e)?.mutations},selectQueryEntry:c,selectConfig:function(e){return i(e)?.config}};function a(e){return{...e,...oi(e.status)}}function i(e){const r=e[t];if("production"!==process.env.NODE_ENV&&!r){if(i.triggered)return r;i.triggered=!0,console.error(`Error: No data found at \`state.${t}\`. Did you forget to add the reducer to the store?`)}return r}function s(e){return i(e)?.queries}function c(e,t){return s(e)?.[t]}function u(t,o,a){return i=>{if(i===Qi)return r(n,a);const s=e({queryArgs:i,endpointDefinition:o,endpointName:t});return r(e=>c(e,s)??zi,a)}}function l(e,t,r){return!!t&&null!=xi(e,t,r)}function d(e,t,r){return!(!t||!e.getPreviousPageParam)&&null!=Di(e,t,r)}}({serializeQueryArgs:a,reducerPath:o,createSelector:e}),{selectInvalidatedBy:b,selectCachedArgsForQuery:v,buildQuerySelector:w,buildInfiniteQuerySelector:S,buildMutationSelector:E}=g;Wi(t.util,{selectInvalidatedBy:b,selectCachedArgsForQuery:v});const{queryThunk:O,infiniteQueryThunk:_,mutationThunk:A,patchQueryData:R,updateQueryData:T,upsertQueryData:P,prefetch:k,buildMatchThunkActions:j}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:a,selectors:i,onSchemaFailure:s,catchSchemaFailure:c,skipSchemaValidation:u}){function l(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}function d(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}const f=(e,t)=>e.query&&e[t]?e[t]:Ni,p=async(e,{signal:n,abort:o,rejectWithValue:a,fulfillWithValue:p,dispatch:h,getState:m,extra:g})=>{const b=r[e.endpointName],{metaSchema:v,skipSchemaValidation:w=u}=b;try{let S=Ni;const E={signal:n,abort:o,dispatch:h,getState:m,extra:g,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?y(e,m()):void 0,queryCacheKey:"query"===e.type?e.queryCacheKey:void 0},O="query"===e.type?e[Ti]:void 0;let _;const A=async(t,r,n,o)=>{if(null==r&&t.pages.length)return Promise.resolve({data:t});const a={queryArg:e.originalArgs,pageParam:r},i=await R(a),s=o?l:d;return{data:{pages:s(t.pages,i.data,n),pageParams:s(t.pageParams,r,n)},meta:i.meta}};async function R(r){let n;const{extraOptions:o,argSchema:a,rawResponseSchema:i,responseSchema:s}=b;if(a&&!ji(w,"arg")&&(r=await Ci(a,r,"argSchema",{})),O?n=O():b.query?(S=f(b,"transformResponse"),n=await t(b.query(r),E,o)):n=await b.queryFn(r,E,o,e=>t(e,E,o)),"undefined"!=typeof process&&"development"===process.env.NODE_ENV){const t=b.query?"`baseQuery`":"`queryFn`";let r;if(n){if("object"!=typeof n)r=`${t} did not return an object.`;else if(n.error&&n.data)r=`${t} returned an object containing both \`error\` and \`result\`.`;else if(void 0===n.error&&void 0===n.data)r=`${t} returned an object containing neither a valid \`error\` and \`result\`. At least one of them should not be \`undefined\``;else for(const e of Object.keys(n))if("error"!==e&&"data"!==e&&"meta"!==e){r=`The object returned by ${t} has the unknown property ${e}.`;break}}else r=`${t} did not return anything.`;r&&console.error(`Error encountered handling the endpoint ${e.endpointName}.\n ${r}\n It needs to return an object with either the shape \`{ data: <value> }\` or \`{ error: <value> }\` that may contain an optional \`meta\` property.\n Object returned was:`,n)}if(n.error)throw new gi(n.error,n.meta);let{data:c}=n;i&&!ji(w,"rawResponse")&&(c=await Ci(i,n.data,"rawResponseSchema",n.meta));let u=await S(c,n.meta,r);return s&&!ji(w,"response")&&(u=await Ci(s,u,"responseSchema",n.meta)),{...n,data:u}}if("query"===e.type&&"infiniteQueryOptions"in b){const{infiniteQueryOptions:T}=b,{maxPages:P=1/0}=T;let k;const j={pages:[],pageParams:[]},C=i.selectQueryEntry(m(),e.queryCacheKey)?.data,N=y(e,m())&&!e.direction||!C?j:C;if("direction"in e&&e.direction&&N.pages.length){const I="backward"===e.direction,x=(I?Di:xi)(T,N,e.originalArgs);k=await A(N,x,P,I)}else{const{initialPageParam:D=T.initialPageParam}=e,M=C?.pageParams??[],q=M[0]??D,F=M.length;k=await A(N,q,P),O&&(k={data:k.data.pages[0]});for(let U=1;U<F;U++){const L=xi(T,k.data,e.originalArgs);k=await A(k.data,L,P)}}_=k}else _=await R(e.originalArgs);return v&&!ji(w,"meta")&&_.meta&&(_.meta=await Ci(v,_.meta,"metaSchema",_.meta)),p(_.data,Ii({fulfilledTimeStamp:Date.now(),baseQueryMeta:_.meta}))}catch($){let Q=$;if(Q instanceof gi){let B=f(b,"transformErrorResponse");const{rawErrorResponseSchema:z,errorResponseSchema:V}=b;let{value:K,meta:H}=Q;try{z&&!ji(w,"rawErrorResponse")&&(K=await Ci(z,K,"rawErrorResponseSchema",H)),v&&!ji(w,"meta")&&(H=await Ci(v,H,"metaSchema",H));let W=await B(K,H,e.originalArgs);return V&&!ji(w,"errorResponse")&&(W=await Ci(V,W,"errorResponseSchema",H)),a(W,Ii({baseQueryMeta:H}))}catch(G){Q=G}}try{if(Q instanceof ki){const J={endpoint:e.endpointName,arg:e.originalArgs,type:e.type,queryCacheKey:"query"===e.type?e.queryCacheKey:void 0};b.onSchemaFailure?.(Q,J),s?.(Q,J);const{catchSchemaFailure:Y=c}=b;if(Y)return a(Y(Q,J),Ii({baseQueryMeta:Q._bqMeta}))}}catch(X){Q=X}throw"undefined"!=typeof process&&"production"!==process.env.NODE_ENV?console.error(`An unhandled error occurred processing a request for the endpoint "${e.endpointName}".\nIn the case of an unhandled error, no tags will be "provided" or "invalidated".`,Q):console.error(Q),Q}};function y(e,t){const r=i.selectQueryEntry(t,e.queryCacheKey),n=i.selectConfig(t).refetchOnMountOrArgChange,o=r?.fulfilledTimeStamp,a=e.forceRefetch??(e.subscribe&&n);return!!a&&(!0===a||(Number(new Date)-Number(o))/1e3>=a)}const h=()=>Ue(`${e}/executeQuery`,p,{getPendingMeta({arg:e}){const t=r[e.endpointName];return Ii({startedTimeStamp:Date.now(),...Oi(t)?{direction:e.direction}:{}})},condition(e,{getState:t}){const n=t(),o=i.selectQueryEntry(n,e.queryCacheKey),a=o?.fulfilledTimeStamp,s=e.originalArgs,c=o?.originalArgs,u=r[e.endpointName],l=e.direction;return!(!Pi(e)&&("pending"===o?.status||!y(e,n)&&(!Ei(u)||!u?.forceRefetch?.({currentArg:s,previousArg:c,endpointState:o,state:n}))&&a&&!l))},dispatchConditionRejection:!0}),g=h(),b=h();function v(e){return t=>t?.meta?.arg?.endpointName===e}return{queryThunk:g,mutationThunk:Ue(`${e}/executeMutation`,p,{getPendingMeta:()=>Ii({startedTimeStamp:Date.now()})}),infiniteQueryThunk:b,prefetch:(e,t,r)=>(n,a)=>{const i=(e=>"force"in e)(r)&&r.force,s=(e=>"ifOlderThan"in e)(r)&&r.ifOlderThan,c=(r=!0)=>{const n={forceRefetch:r,isPrefetch:!0};return o.endpoints[e].initiate(t,n)},u=o.endpoints[e].select(t)(a());if(i)n(c());else if(s){const e=u?.fulfilledTimeStamp;if(!e)return void n(c());(Number(new Date)-Number(new Date(e)))/1e3>=s&&n(c())}else n(c(!1))},updateQueryData:(e,t,r,n=!0)=>(a,i)=>{const s=o.endpoints[e].select(t)(i()),c={patches:[],inversePatches:[],undo:()=>a(o.util.patchQueryData(e,t,c.inversePatches,n))};if("uninitialized"===s.status)return c;let u;if("data"in s)if(m(s.data)){const[e,t,n]=re(s.data,r);c.patches.push(...t),c.inversePatches.push(...n),u=e}else u=r(s.data),c.patches.push({op:"replace",path:[],value:u}),c.inversePatches.push({op:"replace",path:[],value:s.data});return 0===c.patches.length||a(o.util.patchQueryData(e,t,c.patches,n)),c},upsertQueryData:(e,t,r)=>n=>n(o.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[Ti]:()=>({data:r})})),patchQueryData:(e,t,i,s)=>(c,u)=>{const l=r[e],d=n({queryArgs:t,endpointDefinition:l,endpointName:e});if(c(o.internalActions.queryResultPatched({queryCacheKey:d,patches:i})),!s)return;const f=o.endpoints[e].select(t)(u()),p=Ai(l.providesTags,f.data,void 0,t,{},a);c(o.internalActions.updateProvidedBy([{queryCacheKey:d,providedTags:p}]))},buildMatchThunkActions:function(e,t){return{matchPending:Ae(Pe(e),v(t)),matchFulfilled:Ae(Ce(e),v(t)),matchRejected:Ae(ke(e),v(t))}}}}({baseQuery:r,reducerPath:o,context:y,api:t,serializeQueryArgs:a,assertTagType:h,selectors:g,onSchemaFailure:d,catchSchemaFailure:f,skipSchemaValidation:p}),{reducer:C,actions:N}=$i({context:y,queryThunk:O,mutationThunk:A,serializeQueryArgs:a,reducerPath:o,assertTagType:h,config:{refetchOnFocus:c,refetchOnReconnect:u,refetchOnMountOrArgChange:s,keepUnusedDataFor:i,reducerPath:o,invalidationBehavior:l}});Wi(t.util,{patchQueryData:R,updateQueryData:T,upsertQueryData:P,prefetch:k,resetApiState:N.resetApiState,upsertQueryEntries:N.cacheEntriesUpserted}),Wi(t.internalActions,N);const I={currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map},{buildInitiateQuery:x,buildInitiateInfiniteQuery:D,buildInitiateMutation:M,getRunningMutationThunk:q,getRunningMutationsThunk:F,getRunningQueriesThunk:U,getRunningQueryThunk:L}=function({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:n,api:o,context:a,internalState:i}){const{runningQueries:s,runningMutations:c}=i,{unsubscribeQueryResult:u,removeMutationResult:l,updateSubscriptionOptions:d}=o.internalActions;return{buildInitiateQuery:function(e,t){return p(e,t)},buildInitiateInfiniteQuery:function(e,t){return p(e,t)},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:o}={})=>(a,i)=>{const s=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:o}),u=a(s);f(a);const{requestId:d,abort:p,unwrap:y}=u,h=(m=e=>({error:e}),u.unwrap().then(e=>({data:e})).catch(m));var m;const g=Object.assign(h,{arg:u.arg,requestId:d,abort:p,unwrap:y,reset:()=>{a(l({requestId:d,fixedCacheKey:o}))}}),b=c.get(a)||{};return c.set(a,b),b[d]=g,g.then(()=>{delete b[d],si(b)||c.delete(a)}),o&&(b[o]=g,g.then(()=>{b[o]===g&&(delete b[o],si(b)||c.delete(a))})),g}},getRunningQueryThunk:function(t,r){return n=>{const o=a.endpointDefinitions[t],i=e({queryArgs:r,endpointDefinition:o,endpointName:t});return s.get(n)?.[i]}},getRunningMutationThunk:function(e,t){return e=>c.get(e)?.[t]},getRunningQueriesThunk:function(){return e=>Object.values(s.get(e)||{}).filter(ui)},getRunningMutationsThunk:function(){return e=>Object.values(c.get(e)||{}).filter(ui)}};function f(e){if("production"!==process.env.NODE_ENV){if(f.triggered)return;const t=e(o.internalActions.internal_getRTKQSubscriptions());if(f.triggered=!0,"object"!=typeof t||"string"==typeof t?.type)throw new Error("production"===process.env.NODE_ENV?tt(34):`Warning: Middleware for RTK-Query API at reducerPath "${o.reducerPath}" has not been added to the store.\nYou must add the middleware for RTK-Query to function correctly!`)}}function p(n,a){const i=(c,{subscribe:l=!0,forceRefetch:p,subscriptionOptions:y,[Ti]:h,...m}={})=>(g,b)=>{const v=e({queryArgs:c,endpointDefinition:a,endpointName:n});let w;const S={...m,type:"query",subscribe:l,forceRefetch:p,subscriptionOptions:y,endpointName:n,originalArgs:c,queryCacheKey:v,[Ti]:h};if(Ei(a))w=t(S);else{const{direction:e,initialPageParam:t}=m;w=r({...S,direction:e,initialPageParam:t})}const E=o.endpoints[n].select(c),O=g(w),_=E(b());f(g);const{requestId:A,abort:R}=O,T=_.requestId!==A,P=s.get(g)?.[v],k=()=>E(b()),j=Object.assign(h?O.then(k):T&&!P?Promise.resolve(_):Promise.all([P,O]).then(k),{arg:c,requestId:A,subscriptionOptions:y,queryCacheKey:v,abort:R,async unwrap(){const e=await j;if(e.isError)throw e.error;return e.data},refetch:()=>g(i(c,{subscribe:!1,forceRefetch:!0})),unsubscribe(){l&&g(u({queryCacheKey:v,requestId:A}))},updateSubscriptionOptions(e){j.subscriptionOptions=e,g(d({endpointName:n,requestId:A,queryCacheKey:v,options:e}))}});if(!P&&!T&&!h){const e=(N=g,I={},(C=s).has(N)?C.get(N):C.set(N,I).get(N));e[v]=j,j.then(()=>{delete e[v],si(e)||s.delete(g)})}var C,N,I;return j};return i}}({queryThunk:O,mutationThunk:A,infiniteQueryThunk:_,api:t,serializeQueryArgs:a,context:y,internalState:I});Wi(t.util,{getRunningMutationThunk:q,getRunningMutationsThunk:F,getRunningQueryThunk:L,getRunningQueriesThunk:U});const{middleware:$,actions:Q}=rs({reducerPath:o,context:y,queryThunk:O,mutationThunk:A,infiniteQueryThunk:_,api:t,assertTagType:h,selectors:g,getRunningQueryThunk:L,internalState:I});return Wi(t.util,Q),Wi(t,{reducer:C,middleware:$}),{name:ns,injectEndpoint(e,r){const n=t,o=n.endpoints[e]??={};Ei(r)&&Wi(o,{name:e,select:w(e,r),initiate:x(e,r)},j(O,e)),"mutation"===r.type&&Wi(o,{name:e,select:E(),initiate:M(e)},j(A,e)),Oi(r)&&Wi(o,{name:e,select:S(e,r),initiate:D(e,r)},j(O,e))}}}});os();var as,is={exports:{}},ss={};var cs,us,ls={exports:{}};
2
2
  /**
3
3
  * @license React
4
4
  * react.development.js