@tracktor/shared-module 2.12.3 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,19 +1,35 @@
1
1
  {
2
2
  "name": "@tracktor/shared-module",
3
- "version": "2.12.3",
3
+ "version": "2.13.0",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "types": "./dist/main.d.ts",
7
- "main": "./dist/main.umd.cjs",
7
+ "main": "./dist/main.cjs",
8
8
  "module": "./dist/main.js",
9
9
  "files": [
10
- "dist"
10
+ "dist",
11
+ "src/axios/axiosCustomInstance.ts"
11
12
  ],
12
13
  "exports": {
13
14
  ".": {
14
15
  "import": "./dist/main.js",
15
- "require": "./dist/main.umd.cjs",
16
+ "require": "./dist/main.cjs",
16
17
  "types": "./dist/main.d.ts"
18
+ },
19
+ "./axios": {
20
+ "import": {
21
+ "types": "./dist/axios.d.ts",
22
+ "default": "./dist/axios.js"
23
+ },
24
+ "require": {
25
+ "types": "./dist/axios.d.ts",
26
+ "default": "./dist/axios.cjs"
27
+ }
28
+ }
29
+ },
30
+ "typesVersions": {
31
+ "*": {
32
+ "axios": ["./dist/axios.d.ts"]
17
33
  }
18
34
  },
19
35
  "repository": {
@@ -26,13 +42,15 @@
26
42
  },
27
43
  "scripts": {
28
44
  "dev": "vite",
29
- "build": "vite build && cp src/config/orval/axiosCustomInstance.ts dist/config/orval/axiosCustomInstance.ts",
45
+ "build": "vite build",
30
46
  "lint": "eslint . --max-warnings=0 && tsc --noEmit",
31
47
  "preview": "vite preview",
32
48
  "test": "yarn lint && vitest",
33
49
  "prepare": "yarn run build && husky install"
34
50
  },
35
- "dependencies": {},
51
+ "dependencies": {
52
+ "axios": "^1.9.0"
53
+ },
36
54
  "devDependencies": {
37
55
  "@testing-library/jest-dom": "^5.17.0",
38
56
  "@testing-library/react": "^14.0.0",
@@ -40,18 +58,18 @@
40
58
  "@types/react": "^18.2.30",
41
59
  "@types/react-dom": "^18.2.14",
42
60
  "@vitejs/plugin-react": "^4.2.1",
43
- "axios": "^1.7.2",
44
61
  "eslint-config-react-tracktor": "^1.8.1",
45
62
  "husky": "^8.0.3",
46
63
  "jsdom": "^22.1.0",
47
64
  "react": "^18.2.0",
48
65
  "react-dom": "^18.2.0",
49
66
  "typescript": "^5.3.3",
50
- "vite": "^5.3.4",
67
+ "vite": "^5.4.19",
51
68
  "vite-plugin-dts": "^3.7.3",
52
69
  "vitest": "^1.3.1"
53
70
  },
54
71
  "peerDependencies": {
72
+ "axios": "*",
55
73
  "react": ">=18.0.0",
56
74
  "react-dom": ">=18.0.0"
57
75
  }
@@ -0,0 +1,23 @@
1
+ import axios, { AxiosError, AxiosRequestConfig } from "axios";
2
+
3
+ export const axiosCustomInstance = <T>(config: AxiosRequestConfig, options?: AxiosRequestConfig): Promise<T> => {
4
+ const source = axios.CancelToken.source();
5
+
6
+ const promise = axios({
7
+ ...config,
8
+ ...options,
9
+ cancelToken: source.token,
10
+ }).then(({ data }) => data);
11
+
12
+ // @ts-ignore
13
+ promise.cancel = () => {
14
+ source.cancel("Query was cancelled");
15
+ };
16
+
17
+ return promise;
18
+ };
19
+
20
+ export default axiosCustomInstance;
21
+
22
+ export type ErrorType<Error> = AxiosError<Error>;
23
+ export type BodyType<BodyData> = BodyData;
package/dist/main.umd.cjs DELETED
@@ -1,30 +0,0 @@
1
- (function(x,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],C):(x=typeof globalThis<"u"?globalThis:x||self,C(x["@tracktor/shared-module"]={},x.React))})(this,function(x,C){"use strict";var _e={exports:{}},re={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var et;function dn(){if(et)return re;et=1;var e=C,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(c,f,d){var u,y={},R=null,p=null;d!==void 0&&(R=""+d),f.key!==void 0&&(R=""+f.key),f.ref!==void 0&&(p=f.ref);for(u in f)r.call(f,u)&&!s.hasOwnProperty(u)&&(y[u]=f[u]);if(c&&c.defaultProps)for(u in f=c.defaultProps,f)y[u]===void 0&&(y[u]=f[u]);return{$$typeof:t,type:c,key:R,ref:p,props:y,_owner:o.current}}return re.Fragment=n,re.jsx=i,re.jsxs=i,re}var oe={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var tt;function hn(){return tt||(tt=1,process.env.NODE_ENV!=="production"&&function(){var e=C,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,E="@@iterator";function O(a){if(a===null||typeof a!="object")return null;var h=m&&a[m]||a[E];return typeof h=="function"?h:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(a){{for(var h=arguments.length,g=new Array(h>1?h-1:0),b=1;b<h;b++)g[b-1]=arguments[b];T("error",a,g)}}function T(a,h,g){{var b=w.ReactDebugCurrentFrame,P=b.getStackAddendum();P!==""&&(h+="%s",g=g.concat([P]));var j=g.map(function(_){return String(_)});j.unshift("Warning: "+h),Function.prototype.apply.call(console[a],console,j)}}var I=!1,W=!1,k=!1,F=!1,ue=!1,Je;Je=Symbol.for("react.module.reference");function Se(a){return!!(typeof a=="string"||typeof a=="function"||a===r||a===s||ue||a===o||a===d||a===u||F||a===p||I||W||k||typeof a=="object"&&a!==null&&(a.$$typeof===R||a.$$typeof===y||a.$$typeof===i||a.$$typeof===c||a.$$typeof===f||a.$$typeof===Je||a.getModuleId!==void 0))}function uo(a,h,g){var b=a.displayName;if(b)return b;var P=h.displayName||h.name||"";return P!==""?g+"("+P+")":g}function Wt(a){return a.displayName||"Context"}function q(a){if(a==null)return null;if(typeof a.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case u:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var h=a;return Wt(h)+".Consumer";case i:var g=a;return Wt(g._context)+".Provider";case f:return uo(a,a.render,"ForwardRef");case y:var b=a.displayName||null;return b!==null?b:q(a.type)||"Memo";case R:{var P=a,j=P._payload,_=P._init;try{return q(_(j))}catch{return null}}}return null}var $=Object.assign,le=0,Vt,Ht,Jt,Yt,qt,Kt,Gt;function Qt(){}Qt.__reactDisabledLog=!0;function lo(){{if(le===0){Vt=console.log,Ht=console.info,Jt=console.warn,Yt=console.error,qt=console.group,Kt=console.groupCollapsed,Gt=console.groupEnd;var a={configurable:!0,enumerable:!0,value:Qt,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}le++}}function fo(){{if(le--,le===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},a,{value:Vt}),info:$({},a,{value:Ht}),warn:$({},a,{value:Jt}),error:$({},a,{value:Yt}),group:$({},a,{value:qt}),groupCollapsed:$({},a,{value:Kt}),groupEnd:$({},a,{value:Gt})})}le<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ye=w.ReactCurrentDispatcher,qe;function ve(a,h,g){{if(qe===void 0)try{throw Error()}catch(P){var b=P.stack.trim().match(/\n( *(at )?)/);qe=b&&b[1]||""}return`
18
- `+qe+a}}var Ke=!1,Oe;{var ho=typeof WeakMap=="function"?WeakMap:Map;Oe=new ho}function Xt(a,h){if(!a||Ke)return"";{var g=Oe.get(a);if(g!==void 0)return g}var b;Ke=!0;var P=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j;j=Ye.current,Ye.current=null,lo();try{if(h){var _=function(){throw Error()};if(Object.defineProperty(_.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_,[])}catch(K){b=K}Reflect.construct(a,[],_)}else{try{_.call()}catch(K){b=K}a.call(_.prototype)}}else{try{throw Error()}catch(K){b=K}a()}}catch(K){if(K&&b&&typeof K.stack=="string"){for(var A=K.stack.split(`
19
- `),U=b.stack.split(`
20
- `),N=A.length-1,L=U.length-1;N>=1&&L>=0&&A[N]!==U[L];)L--;for(;N>=1&&L>=0;N--,L--)if(A[N]!==U[L]){if(N!==1||L!==1)do if(N--,L--,L<0||A[N]!==U[L]){var V=`
21
- `+A[N].replace(" at new "," at ");return a.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",a.displayName)),typeof a=="function"&&Oe.set(a,V),V}while(N>=1&&L>=0);break}}}finally{Ke=!1,Ye.current=j,fo(),Error.prepareStackTrace=P}var ne=a?a.displayName||a.name:"",fn=ne?ve(ne):"";return typeof a=="function"&&Oe.set(a,fn),fn}function po(a,h,g){return Xt(a,!1)}function mo(a){var h=a.prototype;return!!(h&&h.isReactComponent)}function Te(a,h,g){if(a==null)return"";if(typeof a=="function")return Xt(a,mo(a));if(typeof a=="string")return ve(a);switch(a){case d:return ve("Suspense");case u:return ve("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case f:return po(a.render);case y:return Te(a.type,h,g);case R:{var b=a,P=b._payload,j=b._init;try{return Te(j(P),h,g)}catch{}}}return""}var Ce=Object.prototype.hasOwnProperty,$t={},Zt=w.ReactDebugCurrentFrame;function Ae(a){if(a){var h=a._owner,g=Te(a.type,a._source,h?h.type:null);Zt.setExtraStackFrame(g)}else Zt.setExtraStackFrame(null)}function yo(a,h,g,b,P){{var j=Function.call.bind(Ce);for(var _ in a)if(j(a,_)){var A=void 0;try{if(typeof a[_]!="function"){var U=Error((b||"React class")+": "+g+" type `"+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[_]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw U.name="Invariant Violation",U}A=a[_](h,_,b,g,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(N){A=N}A&&!(A instanceof Error)&&(Ae(P),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",b||"React class",g,_,typeof A),Ae(null)),A instanceof Error&&!(A.message in $t)&&($t[A.message]=!0,Ae(P),v("Failed %s type: %s",g,A.message),Ae(null))}}}var go=Array.isArray;function Ge(a){return go(a)}function Eo(a){{var h=typeof Symbol=="function"&&Symbol.toStringTag,g=h&&a[Symbol.toStringTag]||a.constructor.name||"Object";return g}}function wo(a){try{return en(a),!1}catch{return!0}}function en(a){return""+a}function tn(a){if(wo(a))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Eo(a)),en(a)}var fe=w.ReactCurrentOwner,Ro={key:!0,ref:!0,__self:!0,__source:!0},nn,rn,Qe;Qe={};function bo(a){if(Ce.call(a,"ref")){var h=Object.getOwnPropertyDescriptor(a,"ref").get;if(h&&h.isReactWarning)return!1}return a.ref!==void 0}function So(a){if(Ce.call(a,"key")){var h=Object.getOwnPropertyDescriptor(a,"key").get;if(h&&h.isReactWarning)return!1}return a.key!==void 0}function vo(a,h){if(typeof a.ref=="string"&&fe.current&&h&&fe.current.stateNode!==h){var g=q(fe.current.type);Qe[g]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',q(fe.current.type),a.ref),Qe[g]=!0)}}function Oo(a,h){{var g=function(){nn||(nn=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};g.isReactWarning=!0,Object.defineProperty(a,"key",{get:g,configurable:!0})}}function To(a,h){{var g=function(){rn||(rn=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};g.isReactWarning=!0,Object.defineProperty(a,"ref",{get:g,configurable:!0})}}var Co=function(a,h,g,b,P,j,_){var A={$$typeof:t,type:a,key:h,ref:g,props:_,_owner:j};return A._store={},Object.defineProperty(A._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(A,"_self",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.defineProperty(A,"_source",{configurable:!1,enumerable:!1,writable:!1,value:P}),Object.freeze&&(Object.freeze(A.props),Object.freeze(A)),A};function Ao(a,h,g,b,P){{var j,_={},A=null,U=null;g!==void 0&&(tn(g),A=""+g),So(h)&&(tn(h.key),A=""+h.key),bo(h)&&(U=h.ref,vo(h,P));for(j in h)Ce.call(h,j)&&!Ro.hasOwnProperty(j)&&(_[j]=h[j]);if(a&&a.defaultProps){var N=a.defaultProps;for(j in N)_[j]===void 0&&(_[j]=N[j])}if(A||U){var L=typeof a=="function"?a.displayName||a.name||"Unknown":a;A&&Oo(_,L),U&&To(_,L)}return Co(a,A,U,P,b,fe.current,_)}}var Xe=w.ReactCurrentOwner,on=w.ReactDebugCurrentFrame;function te(a){if(a){var h=a._owner,g=Te(a.type,a._source,h?h.type:null);on.setExtraStackFrame(g)}else on.setExtraStackFrame(null)}var $e;$e=!1;function Ze(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function sn(){{if(Xe.current){var a=q(Xe.current.type);if(a)return`
22
-
23
- Check the render method of \``+a+"`."}return""}}function _o(a){return""}var an={};function Po(a){{var h=sn();if(!h){var g=typeof a=="string"?a:a.displayName||a.name;g&&(h=`
24
-
25
- Check the top-level render call using <`+g+">.")}return h}}function cn(a,h){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var g=Po(h);if(an[g])return;an[g]=!0;var b="";a&&a._owner&&a._owner!==Xe.current&&(b=" It was passed a child from "+q(a._owner.type)+"."),te(a),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',g,b),te(null)}}function un(a,h){{if(typeof a!="object")return;if(Ge(a))for(var g=0;g<a.length;g++){var b=a[g];Ze(b)&&cn(b,h)}else if(Ze(a))a._store&&(a._store.validated=!0);else if(a){var P=O(a);if(typeof P=="function"&&P!==a.entries)for(var j=P.call(a),_;!(_=j.next()).done;)Ze(_.value)&&cn(_.value,h)}}}function xo(a){{var h=a.type;if(h==null||typeof h=="string")return;var g;if(typeof h=="function")g=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===f||h.$$typeof===y))g=h.propTypes;else return;if(g){var b=q(h);yo(g,a.props,"prop",b,a)}else if(h.PropTypes!==void 0&&!$e){$e=!0;var P=q(h);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",P||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function jo(a){{for(var h=Object.keys(a.props),g=0;g<h.length;g++){var b=h[g];if(b!=="children"&&b!=="key"){te(a),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",b),te(null);break}}a.ref!==null&&(te(a),v("Invalid attribute `ref` supplied to `React.Fragment`."),te(null))}}function ln(a,h,g,b,P,j){{var _=Se(a);if(!_){var A="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(A+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=_o();U?A+=U:A+=sn();var N;a===null?N="null":Ge(a)?N="array":a!==void 0&&a.$$typeof===t?(N="<"+(q(a.type)||"Unknown")+" />",A=" Did you accidentally export a JSX literal instead of a component?"):N=typeof a,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",N,A)}var L=Ao(a,h,g,P,j);if(L==null)return L;if(_){var V=h.children;if(V!==void 0)if(b)if(Ge(V)){for(var ne=0;ne<V.length;ne++)un(V[ne],a);Object.freeze&&Object.freeze(V)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else un(V,a)}return a===r?jo(L):xo(L),L}}function Fo(a,h,g){return ln(a,h,g,!0)}function Do(a,h,g){return ln(a,h,g,!1)}var No=Do,Lo=Fo;oe.Fragment=r,oe.jsx=No,oe.jsxs=Lo}()),oe}process.env.NODE_ENV==="production"?_e.exports=dn():_e.exports=hn();var Y=_e.exports;const M=C.createContext({}),pn=({children:e,apiURL:t,libraries:n,localStorageKeys:r})=>{const o=C.useMemo(()=>({apiURL:t,libraries:n,localStorageKeys:r}),[t,n,r]);return Y.jsx(M.Provider,{value:o,children:e})},mn="user",yn=({Fallback:e,isLogged:t,loginPath:n="/login",redirect401Path:r="/login",...o})=>{var T,I,W,k;const{libraries:s,localStorageKeys:i}=C.useContext(M),c=(o==null?void 0:o.reactRouter)||(s==null?void 0:s.reactRouter),f=(o==null?void 0:o.axios)||(s==null?void 0:s.axios),d=(o==null?void 0:o.localStorageKey)||(i==null?void 0:i.user)||mn;if(!c)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const[u,y]=C.useState(null),{useLocation:R,Navigate:p,Outlet:m}=c,E=R(),O=C.useRef(!1),w=typeof t=="function"?t():!!t,v=typeof w=="boolean"?w:w==null?void 0:w.isLogged;return C.useEffect(()=>{O.current||(O.current=!0,f.interceptors.response.use(F=>F,async F=>{var Se;return typeof F=="object"&&F&&"response"in F&&F.response&&typeof F.response=="object"&&"status"in F.response&&F.response&&typeof F.response=="object"&&"status"in F.response&&((Se=F==null?void 0:F.response)==null?void 0:Se.status)===401&&(f.defaults.headers.common.Authorization=null,typeof window<"u"&&window.localStorage&&localStorage.removeItem(d),y(r)),Promise.reject(F)}))},[f.defaults.headers.common,f.interceptors.response,d,r]),v&&!u?Y.jsx(C.Suspense,{fallback:e,children:(I=(T=E.state)==null?void 0:T.from)!=null&&I.state&&((k=(W=E.state)==null?void 0:W.from)==null?void 0:k.pathname)===n?Y.jsx(p,{to:E.state.from.state.from.pathname+E.state.from.state.from.search,replace:!0}):Y.jsx(m,{})}):Y.jsx(p,{to:n+E.search,state:{from:E},replace:!0})},gn=({data:e,...t})=>{const{libraries:n}=C.useContext(M),r=(t==null?void 0:t.reactRouter)||(n==null?void 0:n.reactRouter),o=(t==null?void 0:t.gtm)||(n==null?void 0:n.gtm);if(!r)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");if(!o)throw new Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");const{useGoogleTagManager:s}=o,{useLocation:i,Outlet:c}=r,{pathname:f}=i(),{sendEvent:d}=s();return C.useEffect(()=>{d({event:"pageView",pathname:f,...e})},[e,f,d]),Y.jsx(c,{})},En="user",wn=({tokenTypeKey:e="tokenType",tokenKey:t="accessToken",postContentType:n="application/json",...r})=>{const{apiURL:o=r.apiURL,libraries:s,localStorageKeys:i}=C.useContext(M),c=(r==null?void 0:r.userLocalStorageKey)||(i==null?void 0:i.user)||En,f=(r==null?void 0:r.axios)||(s==null?void 0:s.axios);if(!f)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!(f!=null&&f.defaults))return null;if(typeof window<"u"&&window.localStorage){const d=localStorage.getItem(c),u=d?JSON.parse(d):null,y=u!=null&&u[e]?u[e]:null,R=u!=null&&u[t]?u[t]:null,p=d?`${y} ${R}`:null;p&&(f.defaults.headers.common.Authorization=p)}return f.defaults.baseURL=o,f.defaults.headers.post["Content-Type"]=n,null},Rn=({debug:e,resources:t,...n})=>{const{libraries:r}=C.useContext(M),o=(n==null?void 0:n.i18)||(r==null?void 0:r.i18),{i18next:s,initReactI18next:i,languageDetector:c}=o||{};if(!o)throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return s!=null&&s.isInitialized||(s.use(c).use(i).init({debug:e,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:"languageChanged loaded",useSuspense:!0},resources:t,returnNull:!1}).then(()=>{document.documentElement.lang!==s.resolvedLanguage&&s.resolvedLanguage&&document.documentElement.setAttribute("lang",s.resolvedLanguage)}),s.on("languageChanged",f=>{document.documentElement.setAttribute("lang",f)})),null},bn=({dsn:e,integrations:t,tracesSampleRate:n,replaysSessionSampleRate:r,replaysOnErrorSampleRate:o,tracePropagationTargets:s,ignoreErrors:i,debug:c,environment:f,release:d,...u})=>{const{libraries:y}=C.useContext(M),R=(u==null?void 0:u.sentry)||(y==null?void 0:y.sentry),p=(u==null?void 0:u.reactRouter)||(y==null?void 0:y.reactRouter);if(!R)throw new Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!p)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(R.isInitialized())return null;const{createRoutesFromChildren:m,matchRoutes:E,useLocation:O,useNavigationType:w}=p;return(c||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&R.init({debug:c,dsn:e,environment:f||"production",ignoreErrors:[...i||[],/dynamically imported module/,/Cannot read properties of undefined \(reading 'default'\)/,/Loading chunk \d+ failed/,/ChunkLoadError/,/Failed to fetch dynamically imported module/,/vite:preloadError/],integrations:[R.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:m,matchRoutes:E,useEffect:C.useEffect,useLocation:O,useNavigationType:w}),...t||[]],release:d,replaysOnErrorSampleRate:o||1,replaysSessionSampleRate:r||.1,tracePropagationTargets:s,tracesSampleRate:n||1}),null},Sn=({IMaskMixin:e,...t})=>{const n=C.useMemo(()=>e(({TextField:r,...o})=>Y.jsx(r,{...o})),[e]);return Y.jsx(n,{...t})},vn=({language:e,...t})=>{const{libraries:n}=C.useContext(M),r=(t==null?void 0:t.dayjs)||(n==null?void 0:n.dayjs),o=(t==null?void 0:t.plugin)||(n==null?void 0:n.dayjsPlugin);if(!r)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props of InitializeDaysJSConfig.");return C.useEffect(()=>{(async()=>{var c;const i=e||((c=navigator.language)==null?void 0:c.slice(0,2))||"en";o&&o.forEach(f=>{f&&r.extend(f)}),await import("dayjs/locale/en"),await import("dayjs/locale/fr"),r.locale(i)})().then()},[r,o,e]),null},On=()=>(C.useEffect(()=>{const e=t=>{try{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),window.location.reload()}catch{}};return window.addEventListener("vite:preloadError",e),()=>{window.removeEventListener("vite:preloadError",e)}},[]),null),Tn=e=>e&&typeof e=="function",Cn=e=>e&&typeof e=="function",An=({children:e,defaultQueriesOptions:t,defaultMutationsOptions:n,...r})=>{var f,d;const{libraries:o}=C.useContext(M),s=(r==null?void 0:r.QueryClient)||((f=o==null?void 0:o.reactQuery)==null?void 0:f.QueryClient),i=(r==null?void 0:r.QueryClientProvider)||((d=o==null?void 0:o.reactQuery)==null?void 0:d.QueryClientProvider);if(!s)throw new Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!i)throw new Error("QueryClientProvider is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!Tn(i))throw new Error("Provided QueryClientProvider dependencies are not valid.");if(!Cn(s))throw new Error("Provided QueryClient dependencies are not valid.");const c=new s({defaultOptions:{mutations:{...n},queries:{getNextPageParam:(u,y,R)=>u.length+(R||0),refetchOnWindowFocus:!1,retry:3,...t}}});return Y.jsx(i,{client:c,children:e})},_n=e=>{var d,u,y;const{libraries:t}=C.useContext(M),n=(e==null?void 0:e.i18)||(t==null?void 0:t.i18),r=((d=e==null?void 0:e.i18)==null?void 0:d.translateFunction)||((u=t==null?void 0:t.i18)==null?void 0:u.translateFunction),o=((y=n==null?void 0:n.i18next)==null?void 0:y.t)||r||(R=>R),{unknownErrorTranslationKey:s="error.unknownError"}=e||{},i=o(s),c=C.useCallback(R=>{var m,E,O,w,v,T,I,W,k;const{response:p}=R||{};return p!=null&&p.reason?String(p.reason):(m=p==null?void 0:p.data)!=null&&m.reason?String(p.data.reason):(E=p==null?void 0:p.data)!=null&&E.message?String(p.data.message):(w=(O=p==null?void 0:p.data)==null?void 0:O.detail)!=null&&w.length&&Array.isArray((v=p==null?void 0:p.data)==null?void 0:v.detail)&&((I=(T=p==null?void 0:p.data)==null?void 0:T.detail[0])!=null&&I.msg)&&typeof((k=(W=p==null?void 0:p.data)==null?void 0:W.detail[0])==null?void 0:k.msg)=="string"?String(p.data.detail[0].msg):i},[i]);return{getErrorCode:C.useCallback(R=>{var m,E,O;const{response:p}=R||{};return p!=null&&p.error_code?String(p==null?void 0:p.error_code):(m=p==null?void 0:p.data)!=null&&m.error_code?String((E=p==null?void 0:p.data)==null?void 0:E.error_code):p!=null&&p.error_code?String(p==null?void 0:p.error_code):(O=p==null?void 0:p.data)!=null&&O.error_code?String(p.data.error_code):"unknown_error_code"},[]),printError:c}},Pn=({data:e,fetchNextPage:t,isFetchingNextPage:n,isInitialLoading:r,isLoading:o,enabled:s=!0})=>{const i=C.useCallback(async f=>{n||!s||await t({pageParam:(f==null?void 0:f.pageParam)||f.visibleRowsCount})},[s,t,n]),c=C.useMemo(()=>{if(e)return e.pages.reduce((f,d)=>[...f,...d],[])},[e]);return{fetchNextPageOnRowsScrollEnd:i,isLoading:n||o,loadingVariant:r?"skeleton":"linear",rows:c}},xn=e=>{const{libraries:t}=C.useContext(M),n=(e==null?void 0:e.axios)||(t==null?void 0:t.axios),r=(e==null?void 0:e.localStorageKey)||"user";if(!n)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");const o=C.useCallback(({tokenType:i,accessToken:c})=>{n.defaults.headers.common.Authorization=`${i} ${c}`},[n.defaults.headers.common]),s=()=>{n.defaults.headers.common.Authorization=null};return C.useEffect(()=>{const i=({newValue:c,key:f})=>{if(f===r&&c)try{const{accessToken:d,tokenType:u}=JSON.parse(c);o({accessToken:d,tokenType:u})}catch(d){console.error("Failed to parse newValue from localStorage:",d)}};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}},[r,o]),{clearAuthenticationToken:s,setAuthenticationToken:o}},nt=({library:e,date:t,format:n="ll"})=>e(t).format(n),rt=(e,t)=>{const{fractionDigits:n=0,metric:r="km"}=t||{},o=Number(e);return Number.isNaN(o)?`0${r}`:`${o.toFixed(n)}${r}`},ot=e=>!e||typeof e!="string"?"":e.replace(/_/g," ").toLowerCase().split(" ").map(n=>n.length>0?n.charAt(0).toUpperCase()+n.slice(1):n).join(" "),jn=e=>e!=null&&e.startsWith("/")?e!=null&&e.startsWith("/files")?e:`/files${e}`:e!=null&&e.startsWith("files")?`/${e}`:`/files/${e}`,Fn=({path:e,size:t,apiURL:n})=>{if(!e)return"";const r=jn(e),o=`${n}${r}`,s=o.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/)!==null;return typeof t=="number"&&s?`${o.replace("/files",`/thumbs/${t}`)}`:o},Dn=e=>{const{apiURL:t,libraries:n}=C.useContext(M),r=(e==null?void 0:e.dayjs)||(n==null?void 0:n.dayjs);return{dateAdapter:(i,c)=>{if(!r)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return nt({date:i,format:c,library:r})},distanceAdapter:rt,filePathAdapter:(i,c)=>{if(!t)throw new Error("API URL is not provided. You can provide it with InjectDependenciesProvider or directly in props to filePathAdapter.");return Fn({apiURL:t,path:i,size:c})},worksiteNameAdapter:ot}},de=(e,t)=>t==="short"?e.split("-")[0]:e,Nn=(e,t="full")=>{const[n,r]=C.useState(()=>{const o=(e==null?void 0:e.language)||navigator.language;return e&&"isInitialized"in e&&e.isInitialized,de(o,t)});return C.useEffect(()=>{var s;e&&"isInitialized"in e&&e.isInitialized&&e.language&&r(de(e.language,t));const o=i=>{r(de(i,t))};return(s=e==null?void 0:e.on)==null||s.call(e,"languageChanged",o),()=>{var i;(i=e==null?void 0:e.off)==null||i.call(e,"languageChanged",o)}},[e,t]),n},Ln="tracktor.filter",st=(e,t,n)=>`${n}_${e}=>${t}`,kn=e=>{const{libraries:t,localStorageKeys:n}=C.useContext(M),r=(e==null?void 0:e.reactRouter)||(t==null?void 0:t.reactRouter),{useLocation:o,useSearchParams:s}=r,{pathname:i}=o(),[c,f]=s(),d=(n==null?void 0:n.filter)||Ln;if(!r)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");const u=(m,E,O=!0)=>{const w=st(m,(e==null?void 0:e.pathname)||i,d);if(!E||Array.isArray(E)&&!E.length){c.delete(m),f(c),localStorage.removeItem(w);return}O&&E&&localStorage.setItem(w,JSON.stringify({...c,[m]:E})),E&&(c.set(m,JSON.stringify(E)),f(c))};return{getFilter:(m,E)=>{const O=c.get(m);if(O)try{return JSON.parse(O)}catch{return O}const w=st(m,(e==null?void 0:e.pathname)||i,d),v=localStorage.getItem(w);if(v)try{return JSON.parse(v)[m]}catch{}return E},getFilters:()=>{const m=Object.fromEntries(c.entries()),O=Object.keys(localStorage).filter(w=>w.startsWith(d)&&w.endsWith((e==null?void 0:e.pathname)||i)).reduce((w,v)=>{var I,W;const T=localStorage.getItem(v);if(T){const k=JSON.parse(T),F=(I=Object.keys(k))==null?void 0:I[0];w[F]=(W=Object.values(k))==null?void 0:W[0]}return w},{});return{...m,...O}},handleFilter:(m,E)=>(O,w)=>{if(w||Array.isArray(w)&&w.length===0){const v=E||"value",T=typeof w=="object"&&v in w?w[v||"value"]:w;u(m,T);return}u(m,void 0)},setFilter:u}},In=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),Un=e=>{const r=e.split("/").filter(o=>o.length>0).map(o=>o.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(f=>f.charAt(0).toUpperCase()+f.slice(1)).join("")).join("");return r.charAt(0).toLowerCase()+r.slice(1)},Bn=e=>(e.split("/").pop()||e).replace(/\.json$/,"").replace(/^openapi\./,""),Mn=(e,t,n)=>{const r=Un(t),o=In(n);return`${r}${o}`},zn=e=>{if(e)return(e==null?void 0:e.reduce((t,n)=>(t[n]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},t),{}))||{}},Wn=e=>(Array.isArray(e)?e:[e]).reduce((n,r)=>{const{output:o,operationsToGenerateInfiniteQueryHook:s,input:i="./openapi.json"}=r||{},c=Bn(i);return{...n,[c]:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:i,output:{baseUrl:o==null?void 0:o.baseUrl,client:"react-query",mode:"tags-split",override:{...(s==null?void 0:s.length)&&{operations:zn(s)},header:f=>["Generated by orval 🍺",...f.title?[f.title]:[],...f.description?[f.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/axiosCustomInstance.ts`},operationName:Mn,query:{useQuery:!0}},schemas:(o==null?void 0:o.schemas)||`src/api/${c}/model`,target:(o==null?void 0:o.target)||`src/api/${c}/services/api.ts`,...o}}}},{});function it(e,t){return function(){return e.apply(t,arguments)}}const{toString:Vn}=Object.prototype,{getPrototypeOf:Pe}=Object,he=(e=>t=>{const n=Vn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),H=e=>(e=e.toLowerCase(),t=>he(t)===e),pe=e=>t=>typeof t===e,{isArray:Z}=Array,se=pe("undefined");function Hn(e){return e!==null&&!se(e)&&e.constructor!==null&&!se(e.constructor)&&z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const at=H("ArrayBuffer");function Jn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&at(e.buffer),t}const Yn=pe("string"),z=pe("function"),ct=pe("number"),me=e=>e!==null&&typeof e=="object",qn=e=>e===!0||e===!1,ye=e=>{if(he(e)!=="object")return!1;const t=Pe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Kn=H("Date"),Gn=H("File"),Qn=H("Blob"),Xn=H("FileList"),$n=e=>me(e)&&z(e.pipe),Zn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||z(e.append)&&((t=he(e))==="formdata"||t==="object"&&z(e.toString)&&e.toString()==="[object FormData]"))},er=H("URLSearchParams"),[tr,nr,rr,or]=["ReadableStream","Request","Response","Headers"].map(H),sr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Z(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let c;for(r=0;r<i;r++)c=s[r],t.call(null,e[c],c,e)}}function ut(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const lt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ft=e=>!se(e)&&e!==lt;function xe(){const{caseless:e}=ft(this)&&this||{},t={},n=(r,o)=>{const s=e&&ut(t,o)||o;ye(t[s])&&ye(r)?t[s]=xe(t[s],r):ye(r)?t[s]=xe({},r):Z(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ie(arguments[r],n);return t}const ir=(e,t,n,{allOwnKeys:r}={})=>(ie(t,(o,s)=>{n&&z(o)?e[s]=it(o,n):e[s]=o},{allOwnKeys:r}),e),ar=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),cr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ur=(e,t,n,r)=>{let o,s,i;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&Pe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},lr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},fr=e=>{if(!e)return null;if(Z(e))return e;let t=e.length;if(!ct(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},dr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Pe(Uint8Array)),hr=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},pr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},mr=H("HTMLFormElement"),yr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),dt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),gr=H("RegExp"),ht=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ie(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Er=e=>{ht(e,(t,n)=>{if(z(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(z(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Z(e)?r(e):r(String(e).split(t)),n},Rr=()=>{},br=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,je="abcdefghijklmnopqrstuvwxyz",pt="0123456789",mt={DIGIT:pt,ALPHA:je,ALPHA_DIGIT:je+je.toUpperCase()+pt},Sr=(e=16,t=mt.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function vr(e){return!!(e&&z(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Or=e=>{const t=new Array(10),n=(r,o)=>{if(me(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Z(r)?[]:{};return ie(r,(i,c)=>{const f=n(i,o+1);!se(f)&&(s[c]=f)}),t[o]=void 0,s}}return r};return n(e,0)},Tr=H("AsyncFunction"),l={isArray:Z,isArrayBuffer:at,isBuffer:Hn,isFormData:Zn,isArrayBufferView:Jn,isString:Yn,isNumber:ct,isBoolean:qn,isObject:me,isPlainObject:ye,isReadableStream:tr,isRequest:nr,isResponse:rr,isHeaders:or,isUndefined:se,isDate:Kn,isFile:Gn,isBlob:Qn,isRegExp:gr,isFunction:z,isStream:$n,isURLSearchParams:er,isTypedArray:dr,isFileList:Xn,forEach:ie,merge:xe,extend:ir,trim:sr,stripBOM:ar,inherits:cr,toFlatObject:ur,kindOf:he,kindOfTest:H,endsWith:lr,toArray:fr,forEachEntry:hr,matchAll:pr,isHTMLForm:mr,hasOwnProperty:dt,hasOwnProp:dt,reduceDescriptors:ht,freezeMethods:Er,toObjectSet:wr,toCamelCase:yr,noop:Rr,toFiniteNumber:br,findKey:ut,global:lt,isContextDefined:ft,ALPHABET:mt,generateString:Sr,isSpecCompliantForm:vr,toJSONObject:Or,isAsyncFn:Tr,isThenable:e=>e&&(me(e)||z(e))&&z(e.then)&&z(e.catch)};function S(e,t,n,r,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),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}l.inherits(S,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:l.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const yt=S.prototype,gt={};["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=>{gt[e]={value:e}}),Object.defineProperties(S,gt),Object.defineProperty(yt,"isAxiosError",{value:!0}),S.from=(e,t,n,r,o,s)=>{const i=Object.create(yt);return l.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),S.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const Cr=null;function Fe(e){return l.isPlainObject(e)||l.isArray(e)}function Et(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function wt(e,t,n){return e?e.concat(t).map(function(o,s){return o=Et(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Ar(e){return l.isArray(e)&&!e.some(Fe)}const _r=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function ge(e,t,n){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=l.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,O){return!l.isUndefined(O[E])});const r=n.metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(o))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(l.isDate(m))return m.toISOString();if(!f&&l.isBlob(m))throw new S("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(m)||l.isTypedArray(m)?f&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,E,O){let w=m;if(m&&!O&&typeof m=="object"){if(l.endsWith(E,"{}"))E=r?E:E.slice(0,-2),m=JSON.stringify(m);else if(l.isArray(m)&&Ar(m)||(l.isFileList(m)||l.endsWith(E,"[]"))&&(w=l.toArray(m)))return E=Et(E),w.forEach(function(T,I){!(l.isUndefined(T)||T===null)&&t.append(i===!0?wt([E],I,s):i===null?E:E+"[]",d(T))}),!1}return Fe(m)?!0:(t.append(wt(O,E,s),d(m)),!1)}const y=[],R=Object.assign(_r,{defaultVisitor:u,convertValue:d,isVisitable:Fe});function p(m,E){if(!l.isUndefined(m)){if(y.indexOf(m)!==-1)throw Error("Circular reference detected in "+E.join("."));y.push(m),l.forEach(m,function(w,v){(!(l.isUndefined(w)||w===null)&&o.call(t,w,l.isString(v)?v.trim():v,E,R))===!0&&p(w,E?E.concat(v):[v])}),y.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function De(e,t){this._pairs=[],e&&ge(e,this,t)}const bt=De.prototype;bt.append=function(t,n){this._pairs.push([t,n])},bt.toString=function(t){const n=t?function(r){return t.call(this,r,Rt)}:Rt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Pr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function St(e,t,n){if(!t)return e;const r=n&&n.encode||Pr,o=n&&n.serialize;let s;if(o?s=o(t,n):s=l.isURLSearchParams(t)?t.toString():new De(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class vt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:De,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ne=typeof window<"u"&&typeof document<"u",jr=(e=>Ne&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Fr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dr=Ne&&window.location.href||"http://localhost",J={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ne,hasStandardBrowserEnv:jr,hasStandardBrowserWebWorkerEnv:Fr,origin:Dr},Symbol.toStringTag,{value:"Module"})),...xr};function Nr(e,t){return ge(e,new J.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return J.isNode&&l.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Lr(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kr(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Tt(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=s>=n.length;return i=!i&&l.isArray(o)?o.length:i,f?(l.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!c):((!o[i]||!l.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&l.isArray(o[i])&&(o[i]=kr(o[i])),!c)}if(l.isFormData(e)&&l.isFunction(e.entries)){const n={};return l.forEachEntry(e,(r,o)=>{t(Lr(r),o,n,0)}),n}return null}function Ir(e,t,n){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ae={transitional:Ot,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=l.isObject(t);if(s&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return o?JSON.stringify(Tt(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Nr(t,this.formSerializer).toString();if((c=l.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ge(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Ir(t)):t}],transformResponse:[function(t){const n=this.transitional||ae.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?S.from(c,S.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:J.classes.FormData,Blob:J.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],e=>{ae.headers[e]={}});const Ur=l.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"]),Br=e=>{const t={};let n,r,o;return e&&e.split(`
26
- `).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&Ur[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ct=Symbol("internals");function ce(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return e===!1||e==null?e:l.isArray(e)?e.map(Ee):String(e)}function Mr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const zr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Le(e,t,n,r,o){if(l.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!l.isString(t)){if(l.isString(r))return t.indexOf(r)!==-1;if(l.isRegExp(r))return r.test(t)}}function Wr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Vr(e,t){const n=l.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}class B{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(c,f,d){const u=ce(f);if(!u)throw new Error("header name must be a non-empty string");const y=l.findKey(o,u);(!y||o[y]===void 0||d===!0||d===void 0&&o[y]!==!1)&&(o[y||f]=Ee(c))}const i=(c,f)=>l.forEach(c,(d,u)=>s(d,u,f));if(l.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(l.isString(t)&&(t=t.trim())&&!zr(t))i(Br(t),n);else if(l.isHeaders(t))for(const[c,f]of t.entries())s(f,c,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=ce(t),t){const r=l.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Mr(o);if(l.isFunction(n))return n.call(this,o,r);if(l.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ce(t),t){const r=l.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Le(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=ce(i),i){const c=l.findKey(r,i);c&&(!n||Le(r,r[c],c,n))&&(delete r[c],o=!0)}}return l.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Le(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return l.forEach(this,(o,s)=>{const i=l.findKey(r,s);if(i){n[i]=Ee(o),delete n[s];return}const c=t?Wr(s):String(s).trim();c!==s&&delete n[s],n[c]=Ee(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return l.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&l.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
27
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ct]=this[Ct]={accessors:{}}).accessors,o=this.prototype;function s(i){const c=ce(i);r[c]||(Vr(o,i),r[c]=!0)}return l.isArray(t)?t.forEach(s):s(t),this}}B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(B.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),l.freezeMethods(B);function ke(e,t){const n=this||ae,r=t||n,o=B.from(r.headers);let s=r.data;return l.forEach(e,function(c){s=c.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function At(e){return!!(e&&e.__CANCEL__)}function ee(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}l.inherits(ee,S,{__CANCEL__:!0});function _t(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Hr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Jr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),u=r[s];i||(i=d),n[o]=f,r[o]=d;let y=s,R=0;for(;y!==o;)R+=n[y++],y=y%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),d-i<t)return;const p=u&&d-u;return p?Math.round(R*1e3/p):void 0}}function Yr(e,t){let n=0;const r=1e3/t;let o=null;return function(){const i=this===!0,c=Date.now();if(i||c-n>r)return o&&(clearTimeout(o),o=null),n=c,e.apply(null,arguments);o||(o=setTimeout(()=>(o=null,n=Date.now(),e.apply(null,arguments)),r-(c-n)))}}const we=(e,t,n=3)=>{let r=0;const o=Jr(50,250);return Yr(s=>{const i=s.loaded,c=s.lengthComputable?s.total:void 0,f=i-r,d=o(f),u=i<=c;r=i;const y={loaded:i,total:c,progress:c?i/c:void 0,bytes:f,rate:d||void 0,estimated:d&&c&&u?(c-i)/d:void 0,event:s,lengthComputable:c!=null};y[t?"download":"upload"]=!0,e(y)},n)},qr=J.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(s){let i=s;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(i){const c=l.isString(i)?o(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),Kr=J.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];l.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),l.isString(r)&&i.push("path="+r),l.isString(o)&&i.push("domain="+o),s===!0&&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(){return null},remove(){}};function Gr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Qr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Pt(e,t){return e&&!Gr(t)?Qr(e,t):t}const xt=e=>e instanceof B?{...e}:e;function Q(e,t){t=t||{};const n={};function r(d,u,y){return l.isPlainObject(d)&&l.isPlainObject(u)?l.merge.call({caseless:y},d,u):l.isPlainObject(u)?l.merge({},u):l.isArray(u)?u.slice():u}function o(d,u,y){if(l.isUndefined(u)){if(!l.isUndefined(d))return r(void 0,d,y)}else return r(d,u,y)}function s(d,u){if(!l.isUndefined(u))return r(void 0,u)}function i(d,u){if(l.isUndefined(u)){if(!l.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function c(d,u,y){if(y in t)return r(d,u);if(y in e)return r(void 0,d)}const f={url:s,method:s,data:s,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:c,headers:(d,u)=>o(xt(d),xt(u),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(u){const y=f[u]||o,R=y(e[u],t[u],u);l.isUndefined(R)&&y!==c||(n[u]=R)}),n}const jt=e=>{const t=Q({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:c}=t;t.headers=i=B.from(i),t.url=St(Pt(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let f;if(l.isFormData(n)){if(J.hasStandardBrowserEnv||J.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[d,...u]=f?f.split(";").map(y=>y.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...u].join("; "))}}if(J.hasStandardBrowserEnv&&(r&&l.isFunction(r)&&(r=r(t)),r||r!==!1&&qr(t.url))){const d=o&&s&&Kr.read(s);d&&i.set(o,d)}return t},Xr=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=jt(e);let s=o.data;const i=B.from(o.headers).normalize();let{responseType:c}=o,f;function d(){o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let u=new XMLHttpRequest;u.open(o.method.toUpperCase(),o.url,!0),u.timeout=o.timeout;function y(){if(!u)return;const p=B.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!c||c==="text"||c==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:p,config:e,request:u};_t(function(w){n(w),d()},function(w){r(w),d()},E),u=null}"onloadend"in u?u.onloadend=y:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(y)},u.onabort=function(){u&&(r(new S("Request aborted",S.ECONNABORTED,o,u)),u=null)},u.onerror=function(){r(new S("Network Error",S.ERR_NETWORK,o,u)),u=null},u.ontimeout=function(){let m=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Ot;o.timeoutErrorMessage&&(m=o.timeoutErrorMessage),r(new S(m,E.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,o,u)),u=null},s===void 0&&i.setContentType(null),"setRequestHeader"in u&&l.forEach(i.toJSON(),function(m,E){u.setRequestHeader(E,m)}),l.isUndefined(o.withCredentials)||(u.withCredentials=!!o.withCredentials),c&&c!=="json"&&(u.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&u.addEventListener("progress",we(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",we(o.onUploadProgress)),(o.cancelToken||o.signal)&&(f=p=>{u&&(r(!p||p.type?new ee(null,e,u):p),u.abort(),u=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const R=Hr(o.url);if(R&&J.protocols.indexOf(R)===-1){r(new S("Unsupported protocol "+R+":",S.ERR_BAD_REQUEST,e));return}u.send(s||null)})},$r=(e,t)=>{let n=new AbortController,r;const o=function(f){if(!r){r=!0,i();const d=f instanceof Error?f:this.reason;n.abort(d instanceof S?d:new ee(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{o(new S(`timeout ${t} of ms exceeded`,S.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(f=>{f&&(f.removeEventListener?f.removeEventListener("abort",o):f.unsubscribe(o))}),e=null)};e.forEach(f=>f&&f.addEventListener&&f.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=i,[c,()=>{s&&clearTimeout(s),s=null}]},Zr=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},eo=async function*(e,t,n){for await(const r of e)yield*Zr(ArrayBuffer.isView(r)?r:await n(String(r)),t)},Ft=(e,t,n,r,o)=>{const s=eo(e,t,o);let i=0;return new ReadableStream({type:"bytes",async pull(c){const{done:f,value:d}=await s.next();if(f){c.close(),r();return}let u=d.byteLength;n&&n(i+=u),c.enqueue(new Uint8Array(d))},cancel(c){return r(c),s.return()}},{highWaterMark:2})},Dt=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},Re=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Nt=Re&&typeof ReadableStream=="function",Ie=Re&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),to=Nt&&(()=>{let e=!1;const t=new Request(J.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Lt=64*1024,Ue=Nt&&!!(()=>{try{return l.isReadableStream(new Response("").body)}catch{}})(),be={stream:Ue&&(e=>e.body)};Re&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!be[t]&&(be[t]=l.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new S(`Response type '${t}' is not supported`,S.ERR_NOT_SUPPORT,r)})})})(new Response);const no=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(l.isArrayBufferView(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await Ie(e)).byteLength},ro=async(e,t)=>{const n=l.toFiniteNumber(e.getContentLength());return n??no(t)},Be={http:Cr,xhr:Xr,fetch:Re&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:f,responseType:d,headers:u,withCredentials:y="same-origin",fetchOptions:R}=jt(e);d=d?(d+"").toLowerCase():"text";let[p,m]=o||s||i?$r([o,s],i):[],E,O;const w=()=>{!E&&setTimeout(()=>{p&&p.unsubscribe()}),E=!0};let v;try{if(f&&to&&n!=="get"&&n!=="head"&&(v=await ro(u,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),F;l.isFormData(r)&&(F=k.headers.get("content-type"))&&u.setContentType(F),k.body&&(r=Ft(k.body,Lt,Dt(v,we(f)),null,Ie))}l.isString(y)||(y=y?"cors":"omit"),O=new Request(t,{...R,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",withCredentials:y});let T=await fetch(O);const I=Ue&&(d==="stream"||d==="response");if(Ue&&(c||I)){const k={};["status","statusText","headers"].forEach(ue=>{k[ue]=T[ue]});const F=l.toFiniteNumber(T.headers.get("content-length"));T=new Response(Ft(T.body,Lt,c&&Dt(F,we(c,!0)),I&&w,Ie),k)}d=d||"text";let W=await be[l.findKey(be,d)||"text"](T,e);return!I&&w(),m&&m(),await new Promise((k,F)=>{_t(k,F,{data:W,headers:B.from(T.headers),status:T.status,statusText:T.statusText,config:e,request:O})})}catch(T){throw w(),T&&T.name==="TypeError"&&/fetch/i.test(T.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,e,O),{cause:T.cause||T}):S.from(T,T&&T.code,e,O)}})};l.forEach(Be,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const kt=e=>`- ${e}`,oo=e=>l.isFunction(e)||e===null||e===!1,It={getAdapter:e=>{e=l.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let i;if(r=n,!oo(n)&&(r=Be[(i=String(n)).toLowerCase()],r===void 0))throw new S(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
28
- `+s.map(kt).join(`
29
- `):" "+kt(s[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Be};function Me(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ee(null,e)}function Ut(e){return Me(e),e.headers=B.from(e.headers),e.data=ke.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),It.getAdapter(e.adapter||ae.adapter)(e).then(function(r){return Me(e),r.data=ke.call(e,e.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return At(r)||(Me(e),r&&r.response&&(r.response.data=ke.call(e,e.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const Bt="1.7.2",ze={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ze[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Mt={};ze.transitional=function(t,n,r){function o(s,i){return"[Axios v"+Bt+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,c)=>{if(t===!1)throw new S(o(i," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!Mt[i]&&(Mt[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,c):!0}};function so(e,t,n){if(typeof e!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const c=e[s],f=c===void 0||i(c,s,e);if(f!==!0)throw new S("option "+s+" must be "+f,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+s,S.ERR_BAD_OPTION)}}const We={assertOptions:so,validators:ze},G=We.validators;class X{constructor(t){this.defaults=t,this.interceptors={request:new vt,response:new vt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
30
- `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Q(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&We.assertOptions(r,{silentJSONParsing:G.transitional(G.boolean),forcedJSONParsing:G.transitional(G.boolean),clarifyTimeoutError:G.transitional(G.boolean)},!1),o!=null&&(l.isFunction(o)?n.paramsSerializer={serialize:o}:We.assertOptions(o,{encode:G.function,serialize:G.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&l.merge(s.common,s[n.method]);s&&l.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=B.concat(i,s);const c=[];let f=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(f=f&&E.synchronous,c.unshift(E.fulfilled,E.rejected))});const d=[];this.interceptors.response.forEach(function(E){d.push(E.fulfilled,E.rejected)});let u,y=0,R;if(!f){const m=[Ut.bind(this),void 0];for(m.unshift.apply(m,c),m.push.apply(m,d),R=m.length,u=Promise.resolve(n);y<R;)u=u.then(m[y++],m[y++]);return u}R=c.length;let p=n;for(y=0;y<R;){const m=c[y++],E=c[y++];try{p=m(p)}catch(O){E.call(this,O);break}}try{u=Ut.call(this,p)}catch(m){return Promise.reject(m)}for(y=0,R=d.length;y<R;)u=u.then(d[y++],d[y++]);return u}getUri(t){t=Q(this.defaults,t);const n=Pt(t.baseURL,t.url);return St(n,t.params,t.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(t){X.prototype[t]=function(n,r){return this.request(Q(r||{},{method:t,url:n,data:(r||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,c){return this.request(Q(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}X.prototype[t]=n(),X.prototype[t+"Form"]=n(!0)});class Ve{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(c=>{r.subscribe(c),s=c}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,c){r.reason||(r.reason=new ee(s,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ve(function(o){t=o}),cancel:t}}}function io(e){return function(n){return e.apply(null,n)}}function ao(e){return l.isObject(e)&&e.isAxiosError===!0}const He={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(He).forEach(([e,t])=>{He[t]=e});function zt(e){const t=new X(e),n=it(X.prototype.request,t);return l.extend(n,X.prototype,t,{allOwnKeys:!0}),l.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return zt(Q(e,o))},n}const D=zt(ae);D.Axios=X,D.CanceledError=ee,D.CancelToken=Ve,D.isCancel=At,D.VERSION=Bt,D.toFormData=ge,D.AxiosError=S,D.Cancel=D.CanceledError,D.all=function(t){return Promise.all(t)},D.spread=io,D.isAxiosError=ao,D.mergeConfig=Q,D.AxiosHeaders=B,D.formToJSON=e=>Tt(l.isHTMLForm(e)?new FormData(e):e),D.getAdapter=It.getAdapter,D.HttpStatusCode=He,D.default=D;const co=(e,t)=>{const n=D.CancelToken.source(),r=D({...e,...t,cancelToken:n.token}).then(({data:o})=>o);return r.cancel=()=>{n.cancel("Query was cancelled")},r};x.GTMSendPageView=gn,x.InitializeAxiosConfig=wn,x.InitializeDaysJSConfig=vn,x.InitializeI18nConfig=Rn,x.InitializeSentryConfig=bn,x.InjectDependenciesContext=M,x.InjectDependenciesProvider=pn,x.MaskTextField=Sn,x.PreloadErrorHandler=On,x.QueryClientProviderWithConfig=An,x.RequireAuth=yn,x.axiosCustomInstance=co,x.dateAdapter=nt,x.distanceAdapter=rt,x.getOrvalConfig=Wn,x.useAdapter=Dn,x.useAuth=xn,x.useCurrentLanguage=Nn,x.useFilters=kn,x.useInfiniteDataGrid=Pn,x.useResponseError=_n,x.worksiteNameAdapter=ot,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});