@a-tech.jo/atech_payment 1.0.8 → 1.0.10
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/.env +1 -0
- package/build/index.js +1 -1
- package/build/index.js.LICENSE.txt +0 -17
- package/package.json +1 -1
- package/src/shared/config.js +4 -4
- package/src/shared/requests/hyperpayConnector.js +1 -0
package/.env
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
NEXT_PUBLIC_NODE_ENV="staging"
|
package/build/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var t={287:(t,e)=>{var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator,d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,m={};function v(t,e,r){this.props=t,this.context=e,this.refs=m,this.updater=r||d}function g(){}function b(t,e,r){this.props=t,this.context=e,this.refs=m,this.updater=r||d}v.prototype.isReactComponent={},v.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")},v.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},g.prototype=v.prototype;var w=b.prototype=new g;w.constructor=b,y(w,v.prototype),w.isPureReactComponent=!0;var E=Array.isArray,O=Object.prototype.hasOwnProperty,S={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function x(t,e,n){var o,i={},a=null,s=null;if(null!=e)for(o in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)O.call(e,o)&&!R.hasOwnProperty(o)&&(i[o]=e[o]);var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];i.children=u}if(t&&t.defaultProps)for(o in c=t.defaultProps)void 0===i[o]&&(i[o]=c[o]);return{$$typeof:r,type:t,key:a,ref:s,props:i,_owner:S.current}}function P(t){return"object"==typeof t&&null!==t&&t.$$typeof===r}var _=/\/+/g;function j(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function L(t,e,o,i,a){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var c=!1;if(null===t)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case r:case n:c=!0}}if(c)return a=a(c=t),t=""===i?"."+j(c,0):i,E(a)?(o="",null!=t&&(o=t.replace(_,"$&/")+"/"),L(a,e,o,"",(function(t){return t}))):null!=a&&(P(a)&&(a=function(t,e){return{$$typeof:r,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(a,o+(!a.key||c&&c.key===a.key?"":(""+a.key).replace(_,"$&/")+"/")+t)),e.push(a)),1;if(c=0,i=""===i?".":i+":",E(t))for(var u=0;u<t.length;u++){var l=i+j(s=t[u],u);c+=L(s,e,o,l,a)}else if(l=function(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=h&&t[h]||t["@@iterator"])?t:null}(t),"function"==typeof l)for(t=l.call(t),u=0;!(s=t.next()).done;)c+=L(s=s.value,e,o,l=i+j(s,u++),a);else if("object"===s)throw e=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return c}function T(t,e,r){if(null==t)return t;var n=[],o=0;return L(t,n,"","",(function(t){return e.call(r,t,o++)})),n}function N(t){if(-1===t._status){var e=t._result;(e=e()).then((function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)}),(function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)})),-1===t._status&&(t._status=0,t._result=e)}if(1===t._status)return t._result.default;throw t._result}var A={current:null},k={transition:null},C={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:k,ReactCurrentOwner:S};e.Children={map:T,forEach:function(t,e,r){T(t,(function(){e.apply(this,arguments)}),r)},count:function(t){var e=0;return T(t,(function(){e++})),e},toArray:function(t){return T(t,(function(t){return t}))||[]},only:function(t){if(!P(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},e.Component=v,e.Fragment=o,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C,e.cloneElement=function(t,e,n){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o=y({},t.props),i=t.key,a=t.ref,s=t._owner;if(null!=e){if(void 0!==e.ref&&(a=e.ref,s=S.current),void 0!==e.key&&(i=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(u in e)O.call(e,u)&&!R.hasOwnProperty(u)&&(o[u]=void 0===e[u]&&void 0!==c?c[u]:e[u])}var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){c=Array(u);for(var l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:r,type:t.type,key:i,ref:a,props:o,_owner:s}},e.createContext=function(t){return(t={$$typeof:c,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:t},t.Consumer=t},e.createElement=x,e.createFactory=function(t){var e=x.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:u,render:t}},e.isValidElement=P,e.lazy=function(t){return{$$typeof:p,_payload:{_status:-1,_result:t},_init:N}},e.memo=function(t,e){return{$$typeof:f,type:t,compare:void 0===e?null:e}},e.startTransition=function(t){var e=k.transition;k.transition={};try{t()}finally{k.transition=e}},e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(t,e){return A.current.useCallback(t,e)},e.useContext=function(t){return A.current.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t){return A.current.useDeferredValue(t)},e.useEffect=function(t,e){return A.current.useEffect(t,e)},e.useId=function(){return A.current.useId()},e.useImperativeHandle=function(t,e,r){return A.current.useImperativeHandle(t,e,r)},e.useInsertionEffect=function(t,e){return A.current.useInsertionEffect(t,e)},e.useLayoutEffect=function(t,e){return A.current.useLayoutEffect(t,e)},e.useMemo=function(t,e){return A.current.useMemo(t,e)},e.useReducer=function(t,e,r){return A.current.useReducer(t,e,r)},e.useRef=function(t){return A.current.useRef(t)},e.useState=function(t){return A.current.useState(t)},e.useSyncExternalStore=function(t,e,r){return A.current.useSyncExternalStore(t,e,r)},e.useTransition=function(){return A.current.useTransition()},e.version="18.2.0"},540:(t,e,r)=>{t.exports=r(287)}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={};r.r(t),r.d(t,{hasBrowserEnv:()=>ht,hasStandardBrowserEnv:()=>yt,hasStandardBrowserWebWorkerEnv:()=>mt,navigator:()=>dt,origin:()=>vt});var e=r(540);const n={development:{BACKEND_BASE_URL:"http://localhost:5000/api",HYPERPAY_BASE_URL:"https://eu-test.oppwa.com/"},production:{BACKEND_BASE_URL:"http://prod:5000/api",HYPERPAY_BASE_URL:"https://eu-prod.oppwa.com/"}};function o(t,e){return function(){return t.apply(e,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,s=(c=Object.create(null),t=>{const e=i.call(t);return c[e]||(c[e]=e.slice(8,-1).toLowerCase())});var c;const u=t=>(t=t.toLowerCase(),e=>s(e)===t),l=t=>e=>typeof e===t,{isArray:f}=Array,p=l("undefined"),h=u("ArrayBuffer"),d=l("string"),y=l("function"),m=l("number"),v=t=>null!==t&&"object"==typeof t,g=t=>{if("object"!==s(t))return!1;const e=a(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},b=u("Date"),w=u("File"),E=u("Blob"),O=u("FileList"),S=u("URLSearchParams"),[R,x,P,_]=["ReadableStream","Request","Response","Headers"].map(u);function j(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),f(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function L(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,o=r.length;for(;o-- >0;)if(n=r[o],e===n.toLowerCase())return n;return null}const T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,N=t=>!p(t)&&t!==T,A=(k="undefined"!=typeof Uint8Array&&a(Uint8Array),t=>k&&t instanceof k);var k;const C=u("HTMLFormElement"),F=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),D=u("RegExp"),B=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};j(r,((r,o)=>{let i;!1!==(i=e(r,o,t))&&(n[o]=i||r)})),Object.defineProperties(t,n)},U="abcdefghijklmnopqrstuvwxyz",I="0123456789",q={DIGIT:I,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+I},M=u("AsyncFunction"),H=(G="function"==typeof setImmediate,$=y(T.postMessage),G?setImmediate:$?(z=`axios@${Math.random()}`,V=[],T.addEventListener("message",(({source:t,data:e})=>{t===T&&e===z&&V.length&&V.shift()()}),!1),t=>{V.push(t),T.postMessage(z,"*")}):t=>setTimeout(t));var G,$,z,V;const K="undefined"!=typeof queueMicrotask?queueMicrotask.bind(T):"undefined"!=typeof process&&process.nextTick||H,J={isArray:f,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!p(t)&&null!==t.constructor&&!p(t.constructor)&&y(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||y(t.append)&&("formdata"===(e=s(t))||"object"===e&&y(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:d,isNumber:m,isBoolean:t=>!0===t||!1===t,isObject:v,isPlainObject:g,isReadableStream:R,isRequest:x,isResponse:P,isHeaders:_,isUndefined:p,isDate:b,isFile:w,isBlob:E,isRegExp:D,isFunction:y,isStream:t=>v(t)&&y(t.pipe),isURLSearchParams:S,isTypedArray:A,isFileList:O,forEach:j,merge:function t(){const{caseless:e}=N(this)&&this||{},r={},n=(n,o)=>{const i=e&&L(r,o)||o;g(r[i])&&g(n)?r[i]=t(r[i],n):g(n)?r[i]=t({},n):f(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&j(arguments[t],n);return r},extend:(t,e,r,{allOwnKeys:n}={})=>(j(e,((e,n)=>{r&&y(e)?t[n]=o(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,i,s;const c={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],n&&!n(s,t,e)||c[s]||(e[s]=t[s],c[s]=!0);t=!1!==r&&a(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:u,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(f(t))return t;let e=t.length;if(!m(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:C,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:B,freezeMethods:t=>{B(t,((e,r)=>{if(y(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];y(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return f(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:L,global:T,isContextDefined:N,ALPHABET:q,generateString:(t=16,e=q.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&y(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(v(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=f(t)?[]:{};return j(t,((t,e)=>{const i=r(t,n+1);!p(i)&&(o[e]=i)})),e[n]=void 0,o}}return t};return r(t,0)},isAsyncFn:M,isThenable:t=>t&&(v(t)||y(t))&&y(t.then)&&y(t.catch),setImmediate:H,asap:K};function W(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}J.inherits(W,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:J.toJSONObject(this.config),code:this.code,status:this.status}}});const Y=W.prototype,X={};["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((t=>{X[t]={value:t}})),Object.defineProperties(W,X),Object.defineProperty(Y,"isAxiosError",{value:!0}),W.from=(t,e,r,n,o,i)=>{const a=Object.create(Y);return J.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),W.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const Q=W;function Z(t){return J.isPlainObject(t)||J.isArray(t)}function tt(t){return J.endsWith(t,"[]")?t.slice(0,-2):t}function et(t,e,r){return t?t.concat(e).map((function(t,e){return t=tt(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const rt=J.toFlatObject(J,{},null,(function(t){return/^is[A-Z]/.test(t)})),nt=function(t,e,r){if(!J.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const n=(r=J.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!J.isUndefined(e[t])}))).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&J.isSpecCompliantForm(e);if(!J.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(J.isDate(t))return t.toISOString();if(!s&&J.isBlob(t))throw new Q("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(t)||J.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,r,o){let s=t;if(t&&!o&&"object"==typeof t)if(J.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(J.isArray(t)&&function(t){return J.isArray(t)&&!t.some(Z)}(t)||(J.isFileList(t)||J.endsWith(r,"[]"))&&(s=J.toArray(t)))return r=tt(r),s.forEach((function(t,n){!J.isUndefined(t)&&null!==t&&e.append(!0===a?et([r],n,i):null===a?r:r+"[]",c(t))})),!1;return!!Z(t)||(e.append(et(o,r,i),c(t)),!1)}const l=[],f=Object.assign(rt,{defaultVisitor:u,convertValue:c,isVisitable:Z});if(!J.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!J.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),J.forEach(r,(function(r,i){!0===(!(J.isUndefined(r)||null===r)&&o.call(e,r,J.isString(i)?i.trim():i,n,f))&&t(r,n?n.concat(i):[i])})),l.pop()}}(t),e};function ot(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function it(t,e){this._pairs=[],t&&nt(t,this,e)}const at=it.prototype;at.append=function(t,e){this._pairs.push([t,e])},at.toString=function(t){const e=t?function(e){return t.call(this,e,ot)}:ot;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const st=it;function ct(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ut(t,e,r){if(!e)return t;const n=r&&r.encode||ct,o=r&&r.serialize;let i;if(i=o?o(e,r):J.isURLSearchParams(e)?e.toString():new st(e,r).toString(n),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const lt=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,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){J.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:st,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ht="undefined"!=typeof window&&"undefined"!=typeof document,dt="object"==typeof navigator&&navigator||void 0,yt=ht&&(!dt||["ReactNative","NativeScript","NS"].indexOf(dt.product)<0),mt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,vt=ht&&window.location.href||"http://localhost",gt={...t,...pt},bt=function(t){function e(t,r,n,o){let i=t[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=t.length;return i=!i&&J.isArray(n)?n.length:i,s?(J.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&J.isObject(n[i])||(n[i]=[]),e(t,r,n[i],o)&&J.isArray(n[i])&&(n[i]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}(n[i])),!a)}if(J.isFormData(t)&&J.isFunction(t.entries)){const r={};return J.forEachEntry(t,((t,n)=>{e(function(t){return J.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null},wt={transitional:ft,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=J.isObject(t);if(o&&J.isHTMLForm(t)&&(t=new FormData(t)),J.isFormData(t))return n?JSON.stringify(bt(t)):t;if(J.isArrayBuffer(t)||J.isBuffer(t)||J.isStream(t)||J.isFile(t)||J.isBlob(t)||J.isReadableStream(t))return t;if(J.isArrayBufferView(t))return t.buffer;if(J.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return nt(t,new gt.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return gt.isNode&&J.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=J.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return nt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if(J.isString(t))try{return(0,JSON.parse)(t),J.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||wt.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(J.isResponse(t)||J.isReadableStream(t))return t;if(t&&J.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw Q.from(t,Q.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gt.classes.FormData,Blob:gt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],(t=>{wt.headers[t]={}}));const Et=wt,Ot=J.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"]),St=Symbol("internals");function Rt(t){return t&&String(t).trim().toLowerCase()}function xt(t){return!1===t||null==t?t:J.isArray(t)?t.map(xt):String(t)}function Pt(t,e,r,n,o){return J.isFunction(n)?n.call(this,e,r):(o&&(e=r),J.isString(e)?J.isString(n)?-1!==e.indexOf(n):J.isRegExp(n)?n.test(e):void 0:void 0)}class _t{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=Rt(e);if(!o)throw new Error("header name must be a non-empty string");const i=J.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=xt(t))}const i=(t,e)=>J.forEach(t,((t,r)=>o(t,r,e)));if(J.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(J.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))i((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&Ot[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e);else if(J.isHeaders(t))for(const[e,n]of t.entries())o(n,e,r);else null!=t&&o(e,t,r);return this}get(t,e){if(t=Rt(t)){const r=J.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(J.isFunction(e))return e.call(this,t,r);if(J.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Rt(t)){const r=J.findKey(this,t);return!(!r||void 0===this[r]||e&&!Pt(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=Rt(t)){const o=J.findKey(r,t);!o||e&&!Pt(0,r[o],o,e)||(delete r[o],n=!0)}}return J.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const o=e[r];t&&!Pt(0,this[o],o,t,!0)||(delete this[o],n=!0)}return n}normalize(t){const e=this,r={};return J.forEach(this,((n,o)=>{const i=J.findKey(r,o);if(i)return e[i]=xt(n),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete e[o],e[a]=xt(n),r[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return J.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&J.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[St]=this[St]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=Rt(t);e[n]||(function(t,e){const r=J.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}(r,t),e[n]=!0)}return J.isArray(t)?t.forEach(n):n(t),this}}_t.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(_t.prototype,(({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}})),J.freezeMethods(_t);const jt=_t;function Lt(t,e){const r=this||Et,n=e||r,o=jt.from(n.headers);let i=n.data;return J.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Tt(t){return!(!t||!t.__CANCEL__)}function Nt(t,e,r){Q.call(this,null==t?"canceled":t,Q.ERR_CANCELED,e,r),this.name="CanceledError"}J.inherits(Nt,Q,{__CANCEL__:!0});const At=Nt;function kt(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new Q("Request failed with status code "+r.status,[Q.ERR_BAD_REQUEST,Q.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}const Ct=(t,e,r=3)=>{let n=0;const o=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),c-o<e)return;const p=u&&c-u;return p?Math.round(1e3*f/p):void 0}}(50,250);return function(t,e){let r,n,o=0,i=1e3/e;const a=(e,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),s=e-o;s>=i?a(t,e):(r=t,n||(n=setTimeout((()=>{n=null,a(r)}),i-s)))},()=>r&&a(r)]}((r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i,t({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[e?"download":"upload"]:!0})}),r)},Ft=(t,e)=>{const r=null!=t;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Dt=t=>(...e)=>J.asap((()=>t(...e))),Bt=gt.hasStandardBrowserEnv?function(){const t=gt.navigator&&/(msie|trident)/i.test(gt.navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=J.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0},Ut=gt.hasStandardBrowserEnv?{write(t,e,r,n,o,i){const a=[t+"="+encodeURIComponent(e)];J.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),J.isString(n)&&a.push("path="+n),J.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function It(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const qt=t=>t instanceof jt?{...t}:t;function Mt(t,e){e=e||{};const r={};function n(t,e,r){return J.isPlainObject(t)&&J.isPlainObject(e)?J.merge.call({caseless:r},t,e):J.isPlainObject(e)?J.merge({},e):J.isArray(e)?e.slice():e}function o(t,e,r){return J.isUndefined(e)?J.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!J.isUndefined(e))return n(void 0,e)}function a(t,e){return J.isUndefined(e)?J.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(qt(t),qt(e),!0)};return J.forEach(Object.keys(Object.assign({},t,e)),(function(n){const i=c[n]||o,a=i(t[n],e[n],n);J.isUndefined(a)&&i!==s||(r[n]=a)})),r}const Ht=t=>{const e=Mt({},t);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:c}=e;if(e.headers=s=jt.from(s),e.url=ut(It(e.baseURL,e.url),t.params,t.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),J.isFormData(n))if(gt.hasStandardBrowserEnv||gt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(r=s.getContentType())){const[t,...e]=r?r.split(";").map((t=>t.trim())).filter(Boolean):[];s.setContentType([t||"multipart/form-data",...e].join("; "))}if(gt.hasStandardBrowserEnv&&(o&&J.isFunction(o)&&(o=o(e)),o||!1!==o&&Bt(e.url))){const t=i&&a&&Ut.read(a);t&&s.set(i,t)}return e},Gt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){const n=Ht(t);let o=n.data;const i=jt.from(n.headers).normalize();let a,s,c,u,l,{responseType:f,onUploadProgress:p,onDownloadProgress:h}=n;function d(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=jt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());kt((function(t){e(t),d()}),(function(t){r(t),d()}),{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:t,request:y}),y=null}y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},y.onabort=function(){y&&(r(new Q("Request aborted",Q.ECONNABORTED,t,y)),y=null)},y.onerror=function(){r(new Q("Network Error",Q.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let e=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||ft;n.timeoutErrorMessage&&(e=n.timeoutErrorMessage),r(new Q(e,o.clarifyTimeoutError?Q.ETIMEDOUT:Q.ECONNABORTED,t,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&J.forEach(i.toJSON(),(function(t,e){y.setRequestHeader(e,t)})),J.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),f&&"json"!==f&&(y.responseType=n.responseType),h&&([c,l]=Ct(h,!0),y.addEventListener("progress",c)),p&&y.upload&&([s,u]=Ct(p),y.upload.addEventListener("progress",s),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=e=>{y&&(r(!e||e.type?new At(null,t,y):e),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const v=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(n.url);v&&-1===gt.protocols.indexOf(v)?r(new Q("Unsupported protocol "+v+":",Q.ERR_BAD_REQUEST,t)):y.send(o||null)}))},$t=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let r,n=new AbortController;const o=function(t){if(!r){r=!0,a();const e=t instanceof Error?t:this.reason;n.abort(e instanceof Q?e:new At(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{i=null,o(new Q(`timeout ${e} of ms exceeded`,Q.ETIMEDOUT))}),e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(o):t.removeEventListener("abort",o)})),t=null)};t.forEach((t=>t.addEventListener("abort",o)));const{signal:s}=n;return s.unsubscribe=()=>J.asap(a),s}},zt=function*(t,e){let r=t.byteLength;if(!e||r<e)return void(yield t);let n,o=0;for(;o<r;)n=o+e,yield t.slice(o,n),o=n},Vt=(t,e,r,n)=>{const o=async function*(t,e){for await(const r of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}}(t))yield*zt(r,e)}(t,e);let i,a=0,s=t=>{i||(i=!0,n&&n(t))};return new ReadableStream({async pull(t){try{const{done:e,value:n}=await o.next();if(e)return s(),void t.close();let i=n.byteLength;if(r){let t=a+=i;r(t)}t.enqueue(new Uint8Array(n))}catch(t){throw s(t),t}},cancel:t=>(s(t),o.return())},{highWaterMark:2})},Kt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Jt=Kt&&"function"==typeof ReadableStream,Wt=Kt&&("function"==typeof TextEncoder?(Yt=new TextEncoder,t=>Yt.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var Yt;const Xt=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},Qt=Jt&&Xt((()=>{let t=!1;const e=new Request(gt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),Zt=Jt&&Xt((()=>J.isReadableStream(new Response("").body))),te={stream:Zt&&(t=>t.body)};var ee;Kt&&(ee=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!te[t]&&(te[t]=J.isFunction(ee[t])?e=>e[t]():(e,r)=>{throw new Q(`Response type '${t}' is not supported`,Q.ERR_NOT_SUPPORT,r)})})));const re=Kt&&(async t=>{let{url:e,method:r,data:n,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:p}=Ht(t);u=u?(u+"").toLowerCase():"text";let h,d=$t([o,i&&i.toAbortSignal()],a);const y=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let m;try{if(c&&Qt&&"get"!==r&&"head"!==r&&0!==(m=await(async(t,e)=>{const r=J.toFiniteNumber(t.getContentLength());return null==r?(async t=>{if(null==t)return 0;if(J.isBlob(t))return t.size;if(J.isSpecCompliantForm(t)){const e=new Request(gt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return J.isArrayBufferView(t)||J.isArrayBuffer(t)?t.byteLength:(J.isURLSearchParams(t)&&(t+=""),J.isString(t)?(await Wt(t)).byteLength:void 0)})(e):r})(l,n))){let t,r=new Request(e,{method:"POST",body:n,duplex:"half"});if(J.isFormData(n)&&(t=r.headers.get("content-type"))&&l.setContentType(t),r.body){const[t,e]=Ft(m,Ct(Dt(c)));n=Vt(r.body,65536,t,e)}}J.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;h=new Request(e,{...p,signal:d,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?f:void 0});let i=await fetch(h);const a=Zt&&("stream"===u||"response"===u);if(Zt&&(s||a&&y)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=i[e]}));const e=J.toFiniteNumber(i.headers.get("content-length")),[r,n]=s&&Ft(e,Ct(Dt(s),!0))||[];i=new Response(Vt(i.body,65536,r,(()=>{n&&n(),y&&y()})),t)}u=u||"text";let v=await te[J.findKey(te,u)||"text"](i,t);return!a&&y&&y(),await new Promise(((e,r)=>{kt(e,r,{data:v,headers:jt.from(i.headers),status:i.status,statusText:i.statusText,config:t,request:h})}))}catch(e){if(y&&y(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new Q("Network Error",Q.ERR_NETWORK,t,h),{cause:e.cause||e});throw Q.from(e,e&&e.code,t,h)}}),ne={http:null,xhr:Gt,fetch:re};J.forEach(ne,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const oe=t=>`- ${t}`,ie=t=>J.isFunction(t)||null===t||!1===t,ae=t=>{t=J.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let i=0;i<e;i++){let e;if(r=t[i],n=r,!ie(r)&&(n=ne[(e=String(r)).toLowerCase()],void 0===n))throw new Q(`Unknown adapter '${e}'`);if(n)break;o[e||"#"+i]=n}if(!n){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let r=e?t.length>1?"since :\n"+t.map(oe).join("\n"):" "+oe(t[0]):"as no adapter specified";throw new Q("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function se(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new At(null,t)}function ce(t){return se(t),t.headers=jt.from(t.headers),t.data=Lt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ae(t.adapter||Et.adapter)(t).then((function(e){return se(t),e.data=Lt.call(t,t.transformResponse,e),e.headers=jt.from(e.headers),e}),(function(e){return Tt(e)||(se(t),e&&e.response&&(e.response.data=Lt.call(t,t.transformResponse,e.response),e.response.headers=jt.from(e.response.headers))),Promise.reject(e)}))}const ue={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ue[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const le={};ue.transitional=function(t,e,r){function n(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,o,i)=>{if(!1===t)throw new Q(n(o," has been removed"+(e?" in "+e:"")),Q.ERR_DEPRECATED);return e&&!le[o]&&(le[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};const fe={assertOptions:function(t,e,r){if("object"!=typeof t)throw new Q("options must be an object",Q.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],a=e[i];if(a){const e=t[i],r=void 0===e||a(e,i,t);if(!0!==r)throw new Q("option "+i+" must be "+r,Q.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Q("Unknown option "+i,Q.ERR_BAD_OPTION)}},validators:ue},pe=fe.validators;class he{constructor(t){this.defaults=t,this.interceptors={request:new lt,response:new lt}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const r=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Mt(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;void 0!==r&&fe.assertOptions(r,{silentJSONParsing:pe.transitional(pe.boolean),forcedJSONParsing:pe.transitional(pe.boolean),clarifyTimeoutError:pe.transitional(pe.boolean)},!1),null!=n&&(J.isFunction(n)?e.paramsSerializer={serialize:n}:fe.assertOptions(n,{encode:pe.function,serialize:pe.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&J.merge(o.common,o[e.method]);o&&J.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=jt.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[ce.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,c),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=a.length;let p=e;for(f=0;f<l;){const t=a[f++],e=a[f++];try{p=t(p)}catch(t){e.call(this,t);break}}try{u=ce.call(this,p)}catch(t){return Promise.reject(t)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(t){return ut(It((t=Mt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}J.forEach(["delete","get","head","options"],(function(t){he.prototype[t]=function(e,r){return this.request(Mt(r||{},{method:t,url:e,data:(r||{}).data}))}})),J.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(Mt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}he.prototype[t]=e(),he.prototype[t+"Form"]=e(!0)}));const de=he;class ye{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then((t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new At(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new ye((function(e){t=e})),cancel:t}}}const me=ye,ve={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(ve).forEach((([t,e])=>{ve[e]=t}));const ge=ve,be=function t(e){const r=new de(e),n=o(de.prototype.request,r);return J.extend(n,de.prototype,r,{allOwnKeys:!0}),J.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Mt(e,r))},n}(Et);be.Axios=de,be.CanceledError=At,be.CancelToken=me,be.isCancel=Tt,be.VERSION="1.7.7",be.toFormData=nt,be.AxiosError=Q,be.Cancel=be.CanceledError,be.all=function(t){return Promise.all(t)},be.spread=function(t){return function(e){return t.apply(null,e)}},be.isAxiosError=function(t){return J.isObject(t)&&!0===t.isAxiosError},be.mergeConfig=Mt,be.AxiosHeaders=jt,be.formToJSON=t=>bt(J.isHTMLForm(t)?new FormData(t):t),be.getAdapter=ae,be.HttpStatusCode=ge,be.default=be;const we=be;function Ee(t){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ee(t)}function Oe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Se(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Oe(Object(r),!0).forEach((function(e){Re(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Re(t,e,r){return(e=Le(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xe(){xe=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),s=new T(n||[]);return o(a,"_invoke",{value:P(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,O=E&&E(E(N([])));O&&O!==r&&n.call(O,a)&&(w=O);var S=b.prototype=v.prototype=Object.create(w);function R(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,s){var c=f(t[o],t,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Ee(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=_(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function _(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ee(e)+" is not iterable")}return g.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},R(x.prototype),u(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},R(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Pe(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function _e(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Pe(i,n,o,a,s,"next",t)}function s(t){Pe(i,n,o,a,s,"throw",t)}a(void 0)}))}}function je(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Le(n.key),n)}}function Le(t){var e=function(t,e){if("object"!=Ee(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ee(e)?e:e+""}const Te=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"handleRequests",value:(c=_e(xe().mark((function t(e,r){var o;return xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,we.defaults.baseURL=n[r].BACKEND_BASE_URL,t.next=4,we.request(e);case 4:return o=t.sent,t.abrupt("return",o.data);case 8:if(t.prev=8,t.t0=t.catch(0),console.log("err",t.t0),!t.t0.response){t.next=17;break}if(401!==t.t0.response.status){t.next=14;break}return t.abrupt("return",window.location.href="/login");case 14:return t.abrupt("return",t.t0.response.data);case 17:if(!t.t0.request){t.next=21;break}return t.abrupt("return",{success:!1,message:"No response received, please try again later."});case 21:return t.abrupt("return",{success:!1,message:"An unexpected error occurred."});case 22:case"end":return t.stop()}}),t,null,[[0,8]])}))),function(t,e){return c.apply(this,arguments)})},{key:"post",value:(s=_e(xe().mark((function t(e,r){var n;return xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Se(Se({},{method:"post"}),e),t.next=4,this.handleRequests(n,r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return s.apply(this,arguments)})},{key:"get",value:(a=_e(xe().mark((function t(){var e,r,n,o=arguments;return xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=o.length>0&&void 0!==o[0]?o[0]:{},r=o.length>1?o[1]:void 0,n=Se(Se({},{method:"get"}),e),t.next=6,this.handleRequests(n,r);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"put",value:(i=_e(xe().mark((function t(e,r){var n;return xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Se(Se({},{method:"put"}),e),t.next=4,this.handleRequests(n,r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return i.apply(this,arguments)})},{key:"patch",value:(o=_e(xe().mark((function t(e,r){var n;return xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Se(Se({},{method:"patch"}),e),t.next=4,this.handleRequests(n,r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})},{key:"delete",value:(r=_e(xe().mark((function t(e,r){var n;return xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Se(Se({},{method:"delete"}),e),t.next=4,this.handleRequests(n,r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})}],e&&je(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,o,i,a,s,c}());function Ne(t){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ne(t)}function Ae(){Ae=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),s=new T(n||[]);return o(a,"_invoke",{value:P(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,O=E&&E(E(N([])));O&&O!==r&&n.call(O,a)&&(w=O);var S=b.prototype=v.prototype=Object.create(w);function R(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,s){var c=f(t[o],t,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Ne(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=_(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function _(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ne(e)+" is not iterable")}return g.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},R(x.prototype),u(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},R(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function ke(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function Ce(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ke(i,n,o,a,s,"next",t)}function s(t){ke(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Fe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,De(n.key),n)}}function De(t){var e=function(t,e){if("object"!=Ne(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ne(e)?e:e+""}var Be,Ue,Ie;new(function(){return t=function t(){var e,r,o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,o=function(t){return{"Content-Type":"application/x-www-form-urlencoded","Content-Length":null==t?void 0:t.length}},(r=De(r="defaultHeaders"))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,this.BASEURL=n.production.HYPERPAY_BASE_URL,this.DEV_BASEURL=n.development.HYPERPAY_BASE_URL},e=[{key:"createHyperpayOrder",value:(i=Ce(Ae().mark((function t(e,r){var n,o,i;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.defaultHeaders(),o={url:"/hyperpay/orders/create-order",data:e,headers:n},console.log("requestConfig",o),t.next=6,Te.post(o,r);case 6:return i=t.sent,console.log("result",i),t.abrupt("return",i);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e){return i.apply(this,arguments)})},{key:"getOrderStatus",value:(o=Ce(Ae().mark((function t(e){var r,n,o;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.defaultHeaders(),n={url:"/hyperpay/orders/get-order/".concat(e),headers:r},t.next=5,Te.get(n);case 5:return o=t.sent,t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"captureOrder",value:(r=Ce(Ae().mark((function t(e){var r,n,o;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.defaultHeaders(),n={url:"/hyperpay/orders/capture-order/".concat(e),headers:r},t.next=5,Te.post(n);case 5:return o=t.sent,t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})}],e&&Fe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,o,i}()),function(t){t.INITIAL="initial",t.PENDING="pending",t.REJECTED="rejected",t.RESOLVED="resolved"}(Be||(Be={})),function(t){t.LOADING_STATUS="setLoadingStatus",t.RESET_OPTIONS="resetOptions",t.SET_BRAINTREE_INSTANCE="braintreeInstance"}(Ue||(Ue={})),function(t){t.NUMBER="number",t.CVV="cvv",t.EXPIRATION_DATE="expirationDate",t.EXPIRATION_MONTH="expirationMonth",t.EXPIRATION_YEAR="expirationYear",t.POSTAL_CODE="postalCode"}(Ie||(Ie={}));var qe=function(){return qe=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},qe.apply(this,arguments)};function Me(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function He(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var Ge="dataNamespace",$e="3.84.0",ze=("https://js.braintreegateway.com/web/".concat($e,"/js/client.min.js"),"https://js.braintreegateway.com/web/".concat($e,"/js/paypal-checkout.min.js"),"paypal"),Ve="usePayPalScriptReducer must be used within a PayPalScriptProvider";function Ke(t){return void 0===t&&(t=ze),window[t]}function Je(t){var e=t.reactComponentName,r=t.sdkComponentKey,n=t.sdkRequestedComponents,o=void 0===n?"":n,i=t.sdkDataNamespace,a=void 0===i?ze:i,s=r.charAt(0).toUpperCase().concat(r.substring(1)),c="Unable to render <".concat(e," /> because window.").concat(a,".").concat(s," is undefined."),u="string"==typeof o?o:o.join(",");if(!u.includes(r)){var l=[u,r].filter(Boolean).join();c+="\nTo fix the issue, add '".concat(r,"' to the list of components passed to the parent PayPalScriptProvider:")+"\n`<PayPalScriptProvider options={{ components: '".concat(l,"'}}>`.")}return c}var We=(0,e.createContext)(null);function Ye(){var t=function(t){if("function"==typeof(null==t?void 0:t.dispatch)&&0!==t.dispatch.length)return t;throw new Error(Ve)}((0,e.useContext)(We));return[qe(qe({},t),{isInitial:t.loadingStatus===Be.INITIAL,isPending:t.loadingStatus===Be.PENDING,isResolved:t.loadingStatus===Be.RESOLVED,isRejected:t.loadingStatus===Be.REJECTED}),t.dispatch]}(0,e.createContext)({});var Xe=function(t){var r,n=t.className,o=void 0===n?"":n,i=t.disabled,a=void 0!==i&&i,s=t.children,c=t.forceReRender,u=void 0===c?[]:c,l=Me(t,["className","disabled","children","forceReRender"]),f=a?{opacity:.38}:{},p="".concat(o," ").concat(a?"paypal-buttons-disabled":"").trim(),h=(0,e.useRef)(null),d=(0,e.useRef)(null),y=Ye()[0],m=y.isResolved,v=y.options,g=(0,e.useState)(null),b=g[0],w=g[1],E=(0,e.useState)(!0),O=E[0],S=E[1],R=(0,e.useState)(null)[1];function x(){null!==d.current&&d.current.close().catch((function(){}))}return(null===(r=d.current)||void 0===r?void 0:r.updateProps)&&d.current.updateProps({message:l.message}),(0,e.useEffect)((function(){if(!1===m)return x;var t=Ke(v.dataNamespace);if(void 0===t||void 0===t.Buttons)return R((function(){throw new Error(Je({reactComponentName:Xe.displayName,sdkComponentKey:"buttons",sdkRequestedComponents:v.components,sdkDataNamespace:v[Ge]}))})),x;try{d.current=t.Buttons(qe(qe({},l),{onInit:function(t,e){w(e),"function"==typeof l.onInit&&l.onInit(t,e)}}))}catch(t){return R((function(){throw new Error("Failed to render <PayPalButtons /> component. Failed to initialize: ".concat(t))}))}return!1===d.current.isEligible()?(S(!1),x):h.current?(d.current.render(h.current).catch((function(t){null!==h.current&&0!==h.current.children.length&&R((function(){throw new Error("Failed to render <PayPalButtons /> component. ".concat(t))}))})),x):x}),He(He([m],u,!0),[l.fundingSource],!1)),(0,e.useEffect)((function(){null!==b&&(!0===a?b.disable().catch((function(){})):b.enable().catch((function(){})))}),[a,b]),e.createElement(e.Fragment,null,O?e.createElement("div",{ref:h,style:f,className:p}):s)};Xe.displayName="PayPalButtons";var Qe=function(t){var r=t.className,n=void 0===r?"":r,o=t.children,i=Me(t,["className","children"]),a=Ye()[0],s=a.isResolved,c=a.options,u=(0,e.useRef)(null),l=(0,e.useState)(!0),f=l[0],p=l[1],h=(0,e.useState)(null)[1];return(0,e.useEffect)((function(){if(!1!==s){var t=Ke(c[Ge]);if(void 0===t||void 0===t.Marks)return h((function(){throw new Error(Je({reactComponentName:Qe.displayName,sdkComponentKey:"marks",sdkRequestedComponents:c.components,sdkDataNamespace:c[Ge]}))}));!function(t){var e=u.current;if(!e||!t.isEligible())return p(!1);e.firstChild&&e.removeChild(e.firstChild),t.render(e).catch((function(t){null!==e&&0!==e.children.length&&h((function(){throw new Error("Failed to render <PayPalMarks /> component. ".concat(t))}))}))}(t.Marks(qe({},i)))}}),[s,i.fundingSource]),e.createElement(e.Fragment,null,f?e.createElement("div",{ref:u,className:n}):o)};Qe.displayName="PayPalMarks";var Ze=function(t){var r=t.className,n=void 0===r?"":r,o=t.forceReRender,i=void 0===o?[]:o,a=Me(t,["className","forceReRender"]),s=Ye()[0],c=s.isResolved,u=s.options,l=(0,e.useRef)(null),f=(0,e.useRef)(null),p=(0,e.useState)(null)[1];return(0,e.useEffect)((function(){if(!1!==c){var t=Ke(u[Ge]);if(void 0===t||void 0===t.Messages)return p((function(){throw new Error(Je({reactComponentName:Ze.displayName,sdkComponentKey:"messages",sdkRequestedComponents:u.components,sdkDataNamespace:u[Ge]}))}));f.current=t.Messages(qe({},a)),f.current.render(l.current).catch((function(t){null!==l.current&&0!==l.current.children.length&&p((function(){throw new Error("Failed to render <PayPalMessages /> component. ".concat(t))}))}))}}),He([c],i,!0)),e.createElement("div",{ref:l,className:n})};function tr(){}function er(t){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(t)}function rr(){rr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),s=new T(n||[]);return o(a,"_invoke",{value:P(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,O=E&&E(E(N([])));O&&O!==r&&n.call(O,a)&&(w=O);var S=b.prototype=v.prototype=Object.create(w);function R(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,s){var c=f(t[o],t,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==er(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=_(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function _(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(er(e)+" is not iterable")}return g.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},R(x.prototype),u(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},R(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function nr(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function or(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){nr(i,n,o,a,s,"next",t)}function s(t){nr(i,n,o,a,s,"throw",t)}a(void 0)}))}}function ir(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ar(n.key),n)}}function ar(t){var e=function(t,e){if("object"!=er(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==er(e)?e:e+""}Ze.displayName="PayPalMessages",(0,e.createContext)({cardFieldsForm:null,fields:{},registerField:tr,unregisterField:tr}),new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createPaypalOrder",value:(n=or(rr().mark((function t(e,r){var n,o;return rr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={url:"/paypal/orders/create-order",data:e},t.next=3,Te.post(n,r);case 3:return o=t.sent,t.abrupt("return",o);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return n.apply(this,arguments)})},{key:"approveOrder",value:(r=or(rr().mark((function t(e,r){var n,o;return rr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={url:"/paypal/orders/capture-order",data:e},t.next=3,Te.post(n,r);case 3:return o=t.sent,t.abrupt("return",o);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return r.apply(this,arguments)})}],e&&ir(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,n}())})()})();
|
|
2
|
+
(()=>{"use strict";var t={287:(t,e)=>{var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator,d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,m={};function v(t,e,r){this.props=t,this.context=e,this.refs=m,this.updater=r||d}function b(){}function g(t,e,r){this.props=t,this.context=e,this.refs=m,this.updater=r||d}v.prototype.isReactComponent={},v.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")},v.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},b.prototype=v.prototype;var w=g.prototype=new b;w.constructor=g,y(w,v.prototype),w.isPureReactComponent=!0;var E=Array.isArray,O=Object.prototype.hasOwnProperty,S={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function x(t,e,n){var o,i={},a=null,s=null;if(null!=e)for(o in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)O.call(e,o)&&!R.hasOwnProperty(o)&&(i[o]=e[o]);var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];i.children=u}if(t&&t.defaultProps)for(o in c=t.defaultProps)void 0===i[o]&&(i[o]=c[o]);return{$$typeof:r,type:t,key:a,ref:s,props:i,_owner:S.current}}function P(t){return"object"==typeof t&&null!==t&&t.$$typeof===r}var j=/\/+/g;function _(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function T(t,e,o,i,a){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var c=!1;if(null===t)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case r:case n:c=!0}}if(c)return a=a(c=t),t=""===i?"."+_(c,0):i,E(a)?(o="",null!=t&&(o=t.replace(j,"$&/")+"/"),T(a,e,o,"",(function(t){return t}))):null!=a&&(P(a)&&(a=function(t,e){return{$$typeof:r,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(a,o+(!a.key||c&&c.key===a.key?"":(""+a.key).replace(j,"$&/")+"/")+t)),e.push(a)),1;if(c=0,i=""===i?".":i+":",E(t))for(var u=0;u<t.length;u++){var l=i+_(s=t[u],u);c+=T(s,e,o,l,a)}else if(l=function(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=h&&t[h]||t["@@iterator"])?t:null}(t),"function"==typeof l)for(t=l.call(t),u=0;!(s=t.next()).done;)c+=T(s=s.value,e,o,l=i+_(s,u++),a);else if("object"===s)throw e=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return c}function L(t,e,r){if(null==t)return t;var n=[],o=0;return T(t,n,"","",(function(t){return e.call(r,t,o++)})),n}function N(t){if(-1===t._status){var e=t._result;(e=e()).then((function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)}),(function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)})),-1===t._status&&(t._status=0,t._result=e)}if(1===t._status)return t._result.default;throw t._result}var A={current:null},k={transition:null},C={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:k,ReactCurrentOwner:S};e.Children={map:L,forEach:function(t,e,r){L(t,(function(){e.apply(this,arguments)}),r)},count:function(t){var e=0;return L(t,(function(){e++})),e},toArray:function(t){return L(t,(function(t){return t}))||[]},only:function(t){if(!P(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},e.Component=v,e.Fragment=o,e.Profiler=a,e.PureComponent=g,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C,e.cloneElement=function(t,e,n){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o=y({},t.props),i=t.key,a=t.ref,s=t._owner;if(null!=e){if(void 0!==e.ref&&(a=e.ref,s=S.current),void 0!==e.key&&(i=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(u in e)O.call(e,u)&&!R.hasOwnProperty(u)&&(o[u]=void 0===e[u]&&void 0!==c?c[u]:e[u])}var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){c=Array(u);for(var l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:r,type:t.type,key:i,ref:a,props:o,_owner:s}},e.createContext=function(t){return(t={$$typeof:c,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:t},t.Consumer=t},e.createElement=x,e.createFactory=function(t){var e=x.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:u,render:t}},e.isValidElement=P,e.lazy=function(t){return{$$typeof:p,_payload:{_status:-1,_result:t},_init:N}},e.memo=function(t,e){return{$$typeof:f,type:t,compare:void 0===e?null:e}},e.startTransition=function(t){var e=k.transition;k.transition={};try{t()}finally{k.transition=e}},e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(t,e){return A.current.useCallback(t,e)},e.useContext=function(t){return A.current.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t){return A.current.useDeferredValue(t)},e.useEffect=function(t,e){return A.current.useEffect(t,e)},e.useId=function(){return A.current.useId()},e.useImperativeHandle=function(t,e,r){return A.current.useImperativeHandle(t,e,r)},e.useInsertionEffect=function(t,e){return A.current.useInsertionEffect(t,e)},e.useLayoutEffect=function(t,e){return A.current.useLayoutEffect(t,e)},e.useMemo=function(t,e){return A.current.useMemo(t,e)},e.useReducer=function(t,e,r){return A.current.useReducer(t,e,r)},e.useRef=function(t){return A.current.useRef(t)},e.useState=function(t){return A.current.useState(t)},e.useSyncExternalStore=function(t,e,r){return A.current.useSyncExternalStore(t,e,r)},e.useTransition=function(){return A.current.useTransition()},e.version="18.2.0"},540:(t,e,r)=>{t.exports=r(287)}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={};r.r(t),r.d(t,{hasBrowserEnv:()=>bt,hasStandardBrowserEnv:()=>wt,hasStandardBrowserWebWorkerEnv:()=>Et,navigator:()=>gt,origin:()=>Ot});var e=r(540);function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s={NODE_ENV:"staging",BACKEND_BASE_URL:"http://localhost:5000/api",HYPERPAY_BASE_URL:"https://eu-test.oppwa.com/"};const c=s=i(i({},s),{BACKEND_BASE_URL:"https://stage.payment.atech-workspace.com/api"});function u(t,e){return function(){return t.apply(e,arguments)}}const{toString:l}=Object.prototype,{getPrototypeOf:f}=Object,p=(h=Object.create(null),t=>{const e=l.call(t);return h[e]||(h[e]=e.slice(8,-1).toLowerCase())});var h;const d=t=>(t=t.toLowerCase(),e=>p(e)===t),y=t=>e=>typeof e===t,{isArray:m}=Array,v=y("undefined"),b=d("ArrayBuffer"),g=y("string"),w=y("function"),E=y("number"),O=t=>null!==t&&"object"==typeof t,S=t=>{if("object"!==p(t))return!1;const e=f(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},R=d("Date"),x=d("File"),P=d("Blob"),j=d("FileList"),_=d("URLSearchParams"),[T,L,N,A]=["ReadableStream","Request","Response","Headers"].map(d);function k(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),m(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function C(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,o=r.length;for(;o-- >0;)if(n=r[o],e===n.toLowerCase())return n;return null}const F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,D=t=>!v(t)&&t!==F,B=(U="undefined"!=typeof Uint8Array&&f(Uint8Array),t=>U&&t instanceof U);var U;const I=d("HTMLFormElement"),q=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),M=d("RegExp"),G=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};k(r,((r,o)=>{let i;!1!==(i=e(r,o,t))&&(n[o]=i||r)})),Object.defineProperties(t,n)},H="abcdefghijklmnopqrstuvwxyz",$="0123456789",z={DIGIT:$,ALPHA:H,ALPHA_DIGIT:H+H.toUpperCase()+$},V=d("AsyncFunction"),K=(J="function"==typeof setImmediate,W=w(F.postMessage),J?setImmediate:W?(Y=`axios@${Math.random()}`,X=[],F.addEventListener("message",(({source:t,data:e})=>{t===F&&e===Y&&X.length&&X.shift()()}),!1),t=>{X.push(t),F.postMessage(Y,"*")}):t=>setTimeout(t));var J,W,Y,X;const Q="undefined"!=typeof queueMicrotask?queueMicrotask.bind(F):"undefined"!=typeof process&&process.nextTick||K,Z={isArray:m,isArrayBuffer:b,isBuffer:function(t){return null!==t&&!v(t)&&null!==t.constructor&&!v(t.constructor)&&w(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||w(t.append)&&("formdata"===(e=p(t))||"object"===e&&w(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&b(t.buffer),e},isString:g,isNumber:E,isBoolean:t=>!0===t||!1===t,isObject:O,isPlainObject:S,isReadableStream:T,isRequest:L,isResponse:N,isHeaders:A,isUndefined:v,isDate:R,isFile:x,isBlob:P,isRegExp:M,isFunction:w,isStream:t=>O(t)&&w(t.pipe),isURLSearchParams:_,isTypedArray:B,isFileList:j,forEach:k,merge:function t(){const{caseless:e}=D(this)&&this||{},r={},n=(n,o)=>{const i=e&&C(r,o)||o;S(r[i])&&S(n)?r[i]=t(r[i],n):S(n)?r[i]=t({},n):m(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&k(arguments[t],n);return r},extend:(t,e,r,{allOwnKeys:n}={})=>(k(e,((e,n)=>{r&&w(e)?t[n]=u(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,i,a;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==r&&f(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:p,kindOfTest:d,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(m(t))return t;let e=t.length;if(!E(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:I,hasOwnProperty:q,hasOwnProp:q,reduceDescriptors:G,freezeMethods:t=>{G(t,((e,r)=>{if(w(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];w(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return m(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:C,global:F,isContextDefined:D,ALPHABET:z,generateString:(t=16,e=z.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&w(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(O(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=m(t)?[]:{};return k(t,((t,e)=>{const i=r(t,n+1);!v(i)&&(o[e]=i)})),e[n]=void 0,o}}return t};return r(t,0)},isAsyncFn:V,isThenable:t=>t&&(O(t)||w(t))&&w(t.then)&&w(t.catch),setImmediate:K,asap:Q};function tt(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Z.inherits(tt,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:Z.toJSONObject(this.config),code:this.code,status:this.status}}});const et=tt.prototype,rt={};["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((t=>{rt[t]={value:t}})),Object.defineProperties(tt,rt),Object.defineProperty(et,"isAxiosError",{value:!0}),tt.from=(t,e,r,n,o,i)=>{const a=Object.create(et);return Z.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),tt.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const nt=tt;function ot(t){return Z.isPlainObject(t)||Z.isArray(t)}function it(t){return Z.endsWith(t,"[]")?t.slice(0,-2):t}function at(t,e,r){return t?t.concat(e).map((function(t,e){return t=it(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const st=Z.toFlatObject(Z,{},null,(function(t){return/^is[A-Z]/.test(t)})),ct=function(t,e,r){if(!Z.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const n=(r=Z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!Z.isUndefined(e[t])}))).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Z.isSpecCompliantForm(e);if(!Z.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(Z.isDate(t))return t.toISOString();if(!s&&Z.isBlob(t))throw new nt("Blob is not supported. Use a Buffer instead.");return Z.isArrayBuffer(t)||Z.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,r,o){let s=t;if(t&&!o&&"object"==typeof t)if(Z.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(Z.isArray(t)&&function(t){return Z.isArray(t)&&!t.some(ot)}(t)||(Z.isFileList(t)||Z.endsWith(r,"[]"))&&(s=Z.toArray(t)))return r=it(r),s.forEach((function(t,n){!Z.isUndefined(t)&&null!==t&&e.append(!0===a?at([r],n,i):null===a?r:r+"[]",c(t))})),!1;return!!ot(t)||(e.append(at(o,r,i),c(t)),!1)}const l=[],f=Object.assign(st,{defaultVisitor:u,convertValue:c,isVisitable:ot});if(!Z.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!Z.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Z.forEach(r,(function(r,i){!0===(!(Z.isUndefined(r)||null===r)&&o.call(e,r,Z.isString(i)?i.trim():i,n,f))&&t(r,n?n.concat(i):[i])})),l.pop()}}(t),e};function ut(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function lt(t,e){this._pairs=[],t&&ct(t,this,e)}const ft=lt.prototype;ft.append=function(t,e){this._pairs.push([t,e])},ft.toString=function(t){const e=t?function(e){return t.call(this,e,ut)}:ut;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const pt=lt;function ht(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function dt(t,e,r){if(!e)return t;const n=r&&r.encode||ht,o=r&&r.serialize;let i;if(i=o?o(e,r):Z.isURLSearchParams(e)?e.toString():new pt(e,r).toString(n),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const yt=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,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){Z.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},mt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:pt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},bt="undefined"!=typeof window&&"undefined"!=typeof document,gt="object"==typeof navigator&&navigator||void 0,wt=bt&&(!gt||["ReactNative","NativeScript","NS"].indexOf(gt.product)<0),Et="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ot=bt&&window.location.href||"http://localhost",St={...t,...vt},Rt=function(t){function e(t,r,n,o){let i=t[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=t.length;return i=!i&&Z.isArray(n)?n.length:i,s?(Z.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&Z.isObject(n[i])||(n[i]=[]),e(t,r,n[i],o)&&Z.isArray(n[i])&&(n[i]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}(n[i])),!a)}if(Z.isFormData(t)&&Z.isFunction(t.entries)){const r={};return Z.forEachEntry(t,((t,n)=>{e(function(t){return Z.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null},xt={transitional:mt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=Z.isObject(t);if(o&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return n?JSON.stringify(Rt(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t)||Z.isReadableStream(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return ct(t,new St.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return St.isNode&&Z.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=Z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return ct(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if(Z.isString(t))try{return(0,JSON.parse)(t),Z.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||xt.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw nt.from(t,nt.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:St.classes.FormData,Blob:St.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch"],(t=>{xt.headers[t]={}}));const Pt=xt,jt=Z.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"]),_t=Symbol("internals");function Tt(t){return t&&String(t).trim().toLowerCase()}function Lt(t){return!1===t||null==t?t:Z.isArray(t)?t.map(Lt):String(t)}function Nt(t,e,r,n,o){return Z.isFunction(n)?n.call(this,e,r):(o&&(e=r),Z.isString(e)?Z.isString(n)?-1!==e.indexOf(n):Z.isRegExp(n)?n.test(e):void 0:void 0)}class At{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=Tt(e);if(!o)throw new Error("header name must be a non-empty string");const i=Z.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=Lt(t))}const i=(t,e)=>Z.forEach(t,((t,r)=>o(t,r,e)));if(Z.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(Z.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))i((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&jt[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e);else if(Z.isHeaders(t))for(const[e,n]of t.entries())o(n,e,r);else null!=t&&o(e,t,r);return this}get(t,e){if(t=Tt(t)){const r=Z.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(Z.isFunction(e))return e.call(this,t,r);if(Z.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Tt(t)){const r=Z.findKey(this,t);return!(!r||void 0===this[r]||e&&!Nt(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=Tt(t)){const o=Z.findKey(r,t);!o||e&&!Nt(0,r[o],o,e)||(delete r[o],n=!0)}}return Z.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const o=e[r];t&&!Nt(0,this[o],o,t,!0)||(delete this[o],n=!0)}return n}normalize(t){const e=this,r={};return Z.forEach(this,((n,o)=>{const i=Z.findKey(r,o);if(i)return e[i]=Lt(n),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete e[o],e[a]=Lt(n),r[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Z.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&Z.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[_t]=this[_t]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=Tt(t);e[n]||(function(t,e){const r=Z.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}(r,t),e[n]=!0)}return Z.isArray(t)?t.forEach(n):n(t),this}}At.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Z.reduceDescriptors(At.prototype,(({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}})),Z.freezeMethods(At);const kt=At;function Ct(t,e){const r=this||Pt,n=e||r,o=kt.from(n.headers);let i=n.data;return Z.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Ft(t){return!(!t||!t.__CANCEL__)}function Dt(t,e,r){nt.call(this,null==t?"canceled":t,nt.ERR_CANCELED,e,r),this.name="CanceledError"}Z.inherits(Dt,nt,{__CANCEL__:!0});const Bt=Dt;function Ut(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new nt("Request failed with status code "+r.status,[nt.ERR_BAD_REQUEST,nt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}const It=(t,e,r=3)=>{let n=0;const o=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),c-o<e)return;const p=u&&c-u;return p?Math.round(1e3*f/p):void 0}}(50,250);return function(t,e){let r,n,o=0,i=1e3/e;const a=(e,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),s=e-o;s>=i?a(t,e):(r=t,n||(n=setTimeout((()=>{n=null,a(r)}),i-s)))},()=>r&&a(r)]}((r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i,t({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[e?"download":"upload"]:!0})}),r)},qt=(t,e)=>{const r=null!=t;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Mt=t=>(...e)=>Z.asap((()=>t(...e))),Gt=St.hasStandardBrowserEnv?function(){const t=St.navigator&&/(msie|trident)/i.test(St.navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=Z.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0},Ht=St.hasStandardBrowserEnv?{write(t,e,r,n,o,i){const a=[t+"="+encodeURIComponent(e)];Z.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),Z.isString(n)&&a.push("path="+n),Z.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function $t(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const zt=t=>t instanceof kt?{...t}:t;function Vt(t,e){e=e||{};const r={};function n(t,e,r){return Z.isPlainObject(t)&&Z.isPlainObject(e)?Z.merge.call({caseless:r},t,e):Z.isPlainObject(e)?Z.merge({},e):Z.isArray(e)?e.slice():e}function o(t,e,r){return Z.isUndefined(e)?Z.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!Z.isUndefined(e))return n(void 0,e)}function a(t,e){return Z.isUndefined(e)?Z.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(zt(t),zt(e),!0)};return Z.forEach(Object.keys(Object.assign({},t,e)),(function(n){const i=c[n]||o,a=i(t[n],e[n],n);Z.isUndefined(a)&&i!==s||(r[n]=a)})),r}const Kt=t=>{const e=Vt({},t);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:c}=e;if(e.headers=s=kt.from(s),e.url=dt($t(e.baseURL,e.url),t.params,t.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Z.isFormData(n))if(St.hasStandardBrowserEnv||St.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(r=s.getContentType())){const[t,...e]=r?r.split(";").map((t=>t.trim())).filter(Boolean):[];s.setContentType([t||"multipart/form-data",...e].join("; "))}if(St.hasStandardBrowserEnv&&(o&&Z.isFunction(o)&&(o=o(e)),o||!1!==o&&Gt(e.url))){const t=i&&a&&Ht.read(a);t&&s.set(i,t)}return e},Jt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){const n=Kt(t);let o=n.data;const i=kt.from(n.headers).normalize();let a,s,c,u,l,{responseType:f,onUploadProgress:p,onDownloadProgress:h}=n;function d(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=kt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());Ut((function(t){e(t),d()}),(function(t){r(t),d()}),{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:t,request:y}),y=null}y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},y.onabort=function(){y&&(r(new nt("Request aborted",nt.ECONNABORTED,t,y)),y=null)},y.onerror=function(){r(new nt("Network Error",nt.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let e=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||mt;n.timeoutErrorMessage&&(e=n.timeoutErrorMessage),r(new nt(e,o.clarifyTimeoutError?nt.ETIMEDOUT:nt.ECONNABORTED,t,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&Z.forEach(i.toJSON(),(function(t,e){y.setRequestHeader(e,t)})),Z.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),f&&"json"!==f&&(y.responseType=n.responseType),h&&([c,l]=It(h,!0),y.addEventListener("progress",c)),p&&y.upload&&([s,u]=It(p),y.upload.addEventListener("progress",s),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=e=>{y&&(r(!e||e.type?new Bt(null,t,y):e),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const v=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(n.url);v&&-1===St.protocols.indexOf(v)?r(new nt("Unsupported protocol "+v+":",nt.ERR_BAD_REQUEST,t)):y.send(o||null)}))},Wt=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let r,n=new AbortController;const o=function(t){if(!r){r=!0,a();const e=t instanceof Error?t:this.reason;n.abort(e instanceof nt?e:new Bt(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{i=null,o(new nt(`timeout ${e} of ms exceeded`,nt.ETIMEDOUT))}),e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(o):t.removeEventListener("abort",o)})),t=null)};t.forEach((t=>t.addEventListener("abort",o)));const{signal:s}=n;return s.unsubscribe=()=>Z.asap(a),s}},Yt=function*(t,e){let r=t.byteLength;if(!e||r<e)return void(yield t);let n,o=0;for(;o<r;)n=o+e,yield t.slice(o,n),o=n},Xt=(t,e,r,n)=>{const o=async function*(t,e){for await(const r of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}}(t))yield*Yt(r,e)}(t,e);let i,a=0,s=t=>{i||(i=!0,n&&n(t))};return new ReadableStream({async pull(t){try{const{done:e,value:n}=await o.next();if(e)return s(),void t.close();let i=n.byteLength;if(r){let t=a+=i;r(t)}t.enqueue(new Uint8Array(n))}catch(t){throw s(t),t}},cancel:t=>(s(t),o.return())},{highWaterMark:2})},Qt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Zt=Qt&&"function"==typeof ReadableStream,te=Qt&&("function"==typeof TextEncoder?(ee=new TextEncoder,t=>ee.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var ee;const re=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},ne=Zt&&re((()=>{let t=!1;const e=new Request(St.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),oe=Zt&&re((()=>Z.isReadableStream(new Response("").body))),ie={stream:oe&&(t=>t.body)};var ae;Qt&&(ae=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!ie[t]&&(ie[t]=Z.isFunction(ae[t])?e=>e[t]():(e,r)=>{throw new nt(`Response type '${t}' is not supported`,nt.ERR_NOT_SUPPORT,r)})})));const se=Qt&&(async t=>{let{url:e,method:r,data:n,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:p}=Kt(t);u=u?(u+"").toLowerCase():"text";let h,d=Wt([o,i&&i.toAbortSignal()],a);const y=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let m;try{if(c&&ne&&"get"!==r&&"head"!==r&&0!==(m=await(async(t,e)=>{const r=Z.toFiniteNumber(t.getContentLength());return null==r?(async t=>{if(null==t)return 0;if(Z.isBlob(t))return t.size;if(Z.isSpecCompliantForm(t)){const e=new Request(St.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return Z.isArrayBufferView(t)||Z.isArrayBuffer(t)?t.byteLength:(Z.isURLSearchParams(t)&&(t+=""),Z.isString(t)?(await te(t)).byteLength:void 0)})(e):r})(l,n))){let t,r=new Request(e,{method:"POST",body:n,duplex:"half"});if(Z.isFormData(n)&&(t=r.headers.get("content-type"))&&l.setContentType(t),r.body){const[t,e]=qt(m,It(Mt(c)));n=Xt(r.body,65536,t,e)}}Z.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;h=new Request(e,{...p,signal:d,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?f:void 0});let i=await fetch(h);const a=oe&&("stream"===u||"response"===u);if(oe&&(s||a&&y)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=i[e]}));const e=Z.toFiniteNumber(i.headers.get("content-length")),[r,n]=s&&qt(e,It(Mt(s),!0))||[];i=new Response(Xt(i.body,65536,r,(()=>{n&&n(),y&&y()})),t)}u=u||"text";let v=await ie[Z.findKey(ie,u)||"text"](i,t);return!a&&y&&y(),await new Promise(((e,r)=>{Ut(e,r,{data:v,headers:kt.from(i.headers),status:i.status,statusText:i.statusText,config:t,request:h})}))}catch(e){if(y&&y(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new nt("Network Error",nt.ERR_NETWORK,t,h),{cause:e.cause||e});throw nt.from(e,e&&e.code,t,h)}}),ce={http:null,xhr:Jt,fetch:se};Z.forEach(ce,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const ue=t=>`- ${t}`,le=t=>Z.isFunction(t)||null===t||!1===t,fe=t=>{t=Z.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let i=0;i<e;i++){let e;if(r=t[i],n=r,!le(r)&&(n=ce[(e=String(r)).toLowerCase()],void 0===n))throw new nt(`Unknown adapter '${e}'`);if(n)break;o[e||"#"+i]=n}if(!n){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let r=e?t.length>1?"since :\n"+t.map(ue).join("\n"):" "+ue(t[0]):"as no adapter specified";throw new nt("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function pe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Bt(null,t)}function he(t){return pe(t),t.headers=kt.from(t.headers),t.data=Ct.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),fe(t.adapter||Pt.adapter)(t).then((function(e){return pe(t),e.data=Ct.call(t,t.transformResponse,e),e.headers=kt.from(e.headers),e}),(function(e){return Ft(e)||(pe(t),e&&e.response&&(e.response.data=Ct.call(t,t.transformResponse,e.response),e.response.headers=kt.from(e.response.headers))),Promise.reject(e)}))}const de={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{de[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const ye={};de.transitional=function(t,e,r){function n(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,o,i)=>{if(!1===t)throw new nt(n(o," has been removed"+(e?" in "+e:"")),nt.ERR_DEPRECATED);return e&&!ye[o]&&(ye[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};const me={assertOptions:function(t,e,r){if("object"!=typeof t)throw new nt("options must be an object",nt.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],a=e[i];if(a){const e=t[i],r=void 0===e||a(e,i,t);if(!0!==r)throw new nt("option "+i+" must be "+r,nt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new nt("Unknown option "+i,nt.ERR_BAD_OPTION)}},validators:de},ve=me.validators;class be{constructor(t){this.defaults=t,this.interceptors={request:new yt,response:new yt}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const r=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Vt(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;void 0!==r&&me.assertOptions(r,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),null!=n&&(Z.isFunction(n)?e.paramsSerializer={serialize:n}:me.assertOptions(n,{encode:ve.function,serialize:ve.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&Z.merge(o.common,o[e.method]);o&&Z.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=kt.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[he.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,c),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=a.length;let p=e;for(f=0;f<l;){const t=a[f++],e=a[f++];try{p=t(p)}catch(t){e.call(this,t);break}}try{u=he.call(this,p)}catch(t){return Promise.reject(t)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(t){return dt($t((t=Vt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}Z.forEach(["delete","get","head","options"],(function(t){be.prototype[t]=function(e,r){return this.request(Vt(r||{},{method:t,url:e,data:(r||{}).data}))}})),Z.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(Vt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}be.prototype[t]=e(),be.prototype[t+"Form"]=e(!0)}));const ge=be;class we{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then((t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new Bt(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new we((function(e){t=e})),cancel:t}}}const Ee=we,Oe={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(Oe).forEach((([t,e])=>{Oe[e]=t}));const Se=Oe,Re=function t(e){const r=new ge(e),n=u(ge.prototype.request,r);return Z.extend(n,ge.prototype,r,{allOwnKeys:!0}),Z.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Vt(e,r))},n}(Pt);Re.Axios=ge,Re.CanceledError=Bt,Re.CancelToken=Ee,Re.isCancel=Ft,Re.VERSION="1.7.7",Re.toFormData=ct,Re.AxiosError=nt,Re.Cancel=Re.CanceledError,Re.all=function(t){return Promise.all(t)},Re.spread=function(t){return function(e){return t.apply(null,e)}},Re.isAxiosError=function(t){return Z.isObject(t)&&!0===t.isAxiosError},Re.mergeConfig=Vt,Re.AxiosHeaders=kt,Re.formToJSON=t=>Rt(Z.isHTMLForm(t)?new FormData(t):t),Re.getAdapter=fe,Re.HttpStatusCode=Se,Re.default=Re;const xe=Re;function Pe(t){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pe(t)}function je(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _e(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?je(Object(r),!0).forEach((function(e){Te(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Te(t,e,r){return(e=Ce(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Le(){Le=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),s=new L(n||[]);return o(a,"_invoke",{value:P(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,O=E&&E(E(N([])));O&&O!==r&&n.call(O,a)&&(w=O);var S=g.prototype=v.prototype=Object.create(w);function R(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,s){var c=f(t[o],t,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Pe(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=j(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Pe(e)+" is not iterable")}return b.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},R(x.prototype),u(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},R(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Ne(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function Ae(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ne(i,n,o,a,s,"next",t)}function s(t){Ne(i,n,o,a,s,"throw",t)}a(void 0)}))}}function ke(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ce(n.key),n)}}function Ce(t){var e=function(t,e){if("object"!=Pe(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=Pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pe(e)?e:e+""}const Fe=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"handleRequests",value:(s=Ae(Le().mark((function t(e){var r;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,xe.defaults.baseURL=c.BACKEND_BASE_URL,t.next=4,xe.request(e);case 4:return r=t.sent,t.abrupt("return",r.data);case 8:if(t.prev=8,t.t0=t.catch(0),console.log("err",t.t0),!t.t0.response){t.next=17;break}if(401!==t.t0.response.status){t.next=14;break}return t.abrupt("return",window.location.href="/login");case 14:return t.abrupt("return",t.t0.response.data);case 17:if(!t.t0.request){t.next=21;break}return t.abrupt("return",{success:!1,message:"No response received, please try again later."});case 21:return t.abrupt("return",{success:!1,message:"An unexpected error occurred."});case 22:case"end":return t.stop()}}),t,null,[[0,8]])}))),function(t){return s.apply(this,arguments)})},{key:"post",value:(a=Ae(Le().mark((function t(e){var r;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_e(_e({},{method:"post"}),e),t.next=4,this.handleRequests(r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"get",value:(i=Ae(Le().mark((function t(){var e,r,n=arguments;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},r=_e(_e({},{method:"get"}),e),t.next=5,this.handleRequests(r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"put",value:(o=Ae(Le().mark((function t(e){var r;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_e(_e({},{method:"put"}),e),t.next=4,this.handleRequests(r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"patch",value:(n=Ae(Le().mark((function t(e){var r;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_e(_e({},{method:"patch"}),e),t.next=4,this.handleRequests(r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"delete",value:(r=Ae(Le().mark((function t(e){var r;return Le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_e(_e({},{method:"delete"}),e),t.next=4,this.handleRequests(r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})}],e&&ke(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,n,o,i,a,s}());function De(t){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},De(t)}function Be(){Be=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),s=new L(n||[]);return o(a,"_invoke",{value:P(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,O=E&&E(E(N([])));O&&O!==r&&n.call(O,a)&&(w=O);var S=g.prototype=v.prototype=Object.create(w);function R(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,s){var c=f(t[o],t,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==De(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=j(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(De(e)+" is not iterable")}return b.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},R(x.prototype),u(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},R(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Ue(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function Ie(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ue(i,n,o,a,s,"next",t)}function s(t){Ue(i,n,o,a,s,"throw",t)}a(void 0)}))}}function qe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Me(n.key),n)}}function Me(t){var e=function(t,e){if("object"!=De(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=De(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==De(e)?e:e+""}var Ge,He,$e;function ze(t){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ze(t)}function Ve(){Ve=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),s=new L(n||[]);return o(a,"_invoke",{value:P(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,O=E&&E(E(N([])));O&&O!==r&&n.call(O,a)&&(w=O);var S=g.prototype=v.prototype=Object.create(w);function R(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,s){var c=f(t[o],t,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==ze(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=j(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ze(e)+" is not iterable")}return b.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},R(x.prototype),u(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},R(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Ke(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function Je(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ke(i,n,o,a,s,"next",t)}function s(t){Ke(i,n,o,a,s,"throw",t)}a(void 0)}))}}function We(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ye(n.key),n)}}function Ye(t){var e=function(t,e){if("object"!=ze(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ze(e)?e:e+""}new(function(){return t=function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(t){return{"Content-Type":"application/x-www-form-urlencoded","Content-Length":null==t?void 0:t.length}},(r=Me(r="defaultHeaders"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.BASEURL=c.BACKEND_BASE_URL,xe.defaults.baseURL=c.BACKEND_BASE_URL},e=[{key:"createHyperpayOrder",value:(o=Ie(Be().mark((function t(e){var r,n,o;return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.defaultHeaders(),n={url:"/hyperpay/orders/create-order",data:e,headers:r},console.log("requestConfig",n),t.next=6,Fe.post(n);case 6:return o=t.sent,console.log("result",o),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"getOrderStatus",value:(n=Ie(Be().mark((function t(e,r){var n,o,i;return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.defaultHeaders(),o={url:"/hyperpay/orders/get-order/".concat(e,"?resoucePath=").concat(r),headers:n},t.next=4,Fe.get(o);case 4:return i=t.sent,t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"captureOrder",value:(r=Ie(Be().mark((function t(e){var r,n,o;return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.defaultHeaders(),n={url:"/hyperpay/orders/capture-order/".concat(e),headers:r},t.next=4,Fe.post(n);case 4:return o=t.sent,t.abrupt("return",o);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})}],e&&qe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,n,o}()),new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createPaypalOrder",value:(n=Je(Ve().mark((function t(e){var r,n;return Ve().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={url:"/paypal/orders/create-order",data:e},t.next=3,Fe.post(r);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"approveOrder",value:(r=Je(Ve().mark((function t(e){var r,n;return Ve().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={url:"/paypal/orders/capture-order",data:e},t.next=3,Fe.post(r);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)})}],e&&We(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,n}()),function(t){t.INITIAL="initial",t.PENDING="pending",t.REJECTED="rejected",t.RESOLVED="resolved"}(Ge||(Ge={})),function(t){t.LOADING_STATUS="setLoadingStatus",t.RESET_OPTIONS="resetOptions",t.SET_BRAINTREE_INSTANCE="braintreeInstance"}(He||(He={})),function(t){t.NUMBER="number",t.CVV="cvv",t.EXPIRATION_DATE="expirationDate",t.EXPIRATION_MONTH="expirationMonth",t.EXPIRATION_YEAR="expirationYear",t.POSTAL_CODE="postalCode"}($e||($e={}));var Xe=function(){return Xe=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Xe.apply(this,arguments)};function Qe(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function Ze(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var tr="dataNamespace",er="3.84.0",rr=("https://js.braintreegateway.com/web/".concat(er,"/js/client.min.js"),"https://js.braintreegateway.com/web/".concat(er,"/js/paypal-checkout.min.js"),"paypal"),nr="usePayPalScriptReducer must be used within a PayPalScriptProvider";function or(t){return void 0===t&&(t=rr),window[t]}function ir(t){var e=t.reactComponentName,r=t.sdkComponentKey,n=t.sdkRequestedComponents,o=void 0===n?"":n,i=t.sdkDataNamespace,a=void 0===i?rr:i,s=r.charAt(0).toUpperCase().concat(r.substring(1)),c="Unable to render <".concat(e," /> because window.").concat(a,".").concat(s," is undefined."),u="string"==typeof o?o:o.join(",");if(!u.includes(r)){var l=[u,r].filter(Boolean).join();c+="\nTo fix the issue, add '".concat(r,"' to the list of components passed to the parent PayPalScriptProvider:")+"\n`<PayPalScriptProvider options={{ components: '".concat(l,"'}}>`.")}return c}var ar=(0,e.createContext)(null);function sr(){var t=function(t){if("function"==typeof(null==t?void 0:t.dispatch)&&0!==t.dispatch.length)return t;throw new Error(nr)}((0,e.useContext)(ar));return[Xe(Xe({},t),{isInitial:t.loadingStatus===Ge.INITIAL,isPending:t.loadingStatus===Ge.PENDING,isResolved:t.loadingStatus===Ge.RESOLVED,isRejected:t.loadingStatus===Ge.REJECTED}),t.dispatch]}(0,e.createContext)({});var cr=function(t){var r,n=t.className,o=void 0===n?"":n,i=t.disabled,a=void 0!==i&&i,s=t.children,c=t.forceReRender,u=void 0===c?[]:c,l=Qe(t,["className","disabled","children","forceReRender"]),f=a?{opacity:.38}:{},p="".concat(o," ").concat(a?"paypal-buttons-disabled":"").trim(),h=(0,e.useRef)(null),d=(0,e.useRef)(null),y=sr()[0],m=y.isResolved,v=y.options,b=(0,e.useState)(null),g=b[0],w=b[1],E=(0,e.useState)(!0),O=E[0],S=E[1],R=(0,e.useState)(null)[1];function x(){null!==d.current&&d.current.close().catch((function(){}))}return(null===(r=d.current)||void 0===r?void 0:r.updateProps)&&d.current.updateProps({message:l.message}),(0,e.useEffect)((function(){if(!1===m)return x;var t=or(v.dataNamespace);if(void 0===t||void 0===t.Buttons)return R((function(){throw new Error(ir({reactComponentName:cr.displayName,sdkComponentKey:"buttons",sdkRequestedComponents:v.components,sdkDataNamespace:v[tr]}))})),x;try{d.current=t.Buttons(Xe(Xe({},l),{onInit:function(t,e){w(e),"function"==typeof l.onInit&&l.onInit(t,e)}}))}catch(t){return R((function(){throw new Error("Failed to render <PayPalButtons /> component. Failed to initialize: ".concat(t))}))}return!1===d.current.isEligible()?(S(!1),x):h.current?(d.current.render(h.current).catch((function(t){null!==h.current&&0!==h.current.children.length&&R((function(){throw new Error("Failed to render <PayPalButtons /> component. ".concat(t))}))})),x):x}),Ze(Ze([m],u,!0),[l.fundingSource],!1)),(0,e.useEffect)((function(){null!==g&&(!0===a?g.disable().catch((function(){})):g.enable().catch((function(){})))}),[a,g]),e.createElement(e.Fragment,null,O?e.createElement("div",{ref:h,style:f,className:p}):s)};cr.displayName="PayPalButtons";var ur=function(t){var r=t.className,n=void 0===r?"":r,o=t.children,i=Qe(t,["className","children"]),a=sr()[0],s=a.isResolved,c=a.options,u=(0,e.useRef)(null),l=(0,e.useState)(!0),f=l[0],p=l[1],h=(0,e.useState)(null)[1];return(0,e.useEffect)((function(){if(!1!==s){var t=or(c[tr]);if(void 0===t||void 0===t.Marks)return h((function(){throw new Error(ir({reactComponentName:ur.displayName,sdkComponentKey:"marks",sdkRequestedComponents:c.components,sdkDataNamespace:c[tr]}))}));!function(t){var e=u.current;if(!e||!t.isEligible())return p(!1);e.firstChild&&e.removeChild(e.firstChild),t.render(e).catch((function(t){null!==e&&0!==e.children.length&&h((function(){throw new Error("Failed to render <PayPalMarks /> component. ".concat(t))}))}))}(t.Marks(Xe({},i)))}}),[s,i.fundingSource]),e.createElement(e.Fragment,null,f?e.createElement("div",{ref:u,className:n}):o)};ur.displayName="PayPalMarks";var lr=function(t){var r=t.className,n=void 0===r?"":r,o=t.forceReRender,i=void 0===o?[]:o,a=Qe(t,["className","forceReRender"]),s=sr()[0],c=s.isResolved,u=s.options,l=(0,e.useRef)(null),f=(0,e.useRef)(null),p=(0,e.useState)(null)[1];return(0,e.useEffect)((function(){if(!1!==c){var t=or(u[tr]);if(void 0===t||void 0===t.Messages)return p((function(){throw new Error(ir({reactComponentName:lr.displayName,sdkComponentKey:"messages",sdkRequestedComponents:u.components,sdkDataNamespace:u[tr]}))}));f.current=t.Messages(Xe({},a)),f.current.render(l.current).catch((function(t){null!==l.current&&0!==l.current.children.length&&p((function(){throw new Error("Failed to render <PayPalMessages /> component. ".concat(t))}))}))}}),Ze([c],i,!0)),e.createElement("div",{ref:l,className:n})};function fr(){}lr.displayName="PayPalMessages",(0,e.createContext)({cardFieldsForm:null,fields:{},registerField:fr,unregisterField:fr})})()})();
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* react-paypal-js v8.7.0 (2024-09-16T17:52:54.237Z)
|
|
3
|
-
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
1
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
19
2
|
|
|
20
3
|
/**
|
package/package.json
CHANGED
package/src/shared/config.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
const env = process.env.NEXT_PUBLIC_NODE_ENV || "staging";
|
|
1
2
|
let config = {
|
|
2
|
-
NODE_ENV:
|
|
3
|
+
NODE_ENV: env,
|
|
3
4
|
BACKEND_BASE_URL: "http://localhost:5000/api",
|
|
4
5
|
HYPERPAY_BASE_URL: "https://eu-test.oppwa.com/",
|
|
5
6
|
};
|
|
@@ -13,8 +14,7 @@ const staging = {
|
|
|
13
14
|
BACKEND_BASE_URL: "https://stage.payment.atech-workspace.com/api",
|
|
14
15
|
};
|
|
15
16
|
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
if (process.env.NODE_ENV === "staging") config = { ...config, ...staging };
|
|
17
|
+
if (env === "production") config = { ...config, ...production };
|
|
18
|
+
if (env === "staging") config = { ...config, ...staging };
|
|
19
19
|
|
|
20
20
|
export default config;
|