UNPKG

@comgate/checkout-dev

Version:

Comgate pre-built checkout library

11 lines 132 kB
/* * @comgate/checkout-dev v1.1.7 (https://www.npmjs.com/package/@comgate/checkout-dev) * Copyright 2024 - Comgate a.s. * Licensed under BUSL-1.1 (https://www.unpkg.com/@comgate/checkout-dev@1.1.7/LICENSE) */ (function(k,C){typeof exports=="object"&&typeof module!="undefined"?C(exports):typeof define=="function"&&define.amd?define(["exports"],C):(k=typeof globalThis!="undefined"?globalThis:k||self,C(k.comgateCheckout={}))})(this,function(k){"use strict";var Qo=Object.defineProperty,es=Object.defineProperties;var ts=Object.getOwnPropertyDescriptors;var vr=Object.getOwnPropertySymbols;var ns=Object.prototype.hasOwnProperty,rs=Object.prototype.propertyIsEnumerable;var br=(k,C,g)=>C in k?Qo(k,C,{enumerable:!0,configurable:!0,writable:!0,value:g}):k[C]=g,T=(k,C)=>{for(var g in C||(C={}))ns.call(C,g)&&br(k,g,C[g]);if(vr)for(var g of vr(C))rs.call(C,g)&&br(k,g,C[g]);return k},ut=(k,C)=>es(k,ts(C));var B=(k,C,g)=>new Promise((K,me)=>{var Ge=U=>{try{le(g.next(U))}catch(I){me(I)}},dt=U=>{try{le(g.throw(U))}catch(I){me(I)}},le=U=>U.done?K(U.value):Promise.resolve(U.value).then(Ge,dt);le((g=g.apply(k,C)).next())});var C=document.createElement("style");C.textContent=`#cg-checkout-overlay{display:block;position:fixed;width:100%;height:100%;inset:0;background-color:#000000bf;z-index:999999;opacity:1;transition:all .15s linear}#cg-checkout-overlay.hidden{display:none}#cg-checkout-overlay.hiddenVisually{opacity:0}#cg-checkout-overlay .oloader-box{display:flex;justify-content:center;align-items:center;width:100%;height:100%}#cg-checkout-overlay .oloader{height:45px;width:45px;aspect-ratio:1;border:4px solid #eee;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1.5s linear infinite;opacity:.9;border-bottom-color:transparent!important}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cg-gp-btn>button.disabled,.cg-gp-btn>button:disabled{opacity:.55!important;cursor:not-allowed}@supports (-webkit-appearance: -apple-pay-button){.cg-ap-btn{-webkit-appearance:-apple-pay-button;-apple-pay-button-padding:2px 0px;-apple-pay-button-box-sizing:border-box}}@supports not (-webkit-appearance: -apple-pay-button){.cg-ap-btn{--apple-pay-scale: 2;padding:0;background-size:50%;background-color:#000;background-image:-webkit-named-image(apple-pay-logo-white);background-repeat:no-repeat;background-position:center center}.cg-ap-btn.black{background-image:-webkit-named-image(apple-pay-logo-white);background-color:#000}.cg-ap-btn.white{background-image:-webkit-named-image(apple-pay-logo-black);background-color:#fff}.cg-ap-btn.white-outline{background-image:-webkit-named-image(apple-pay-logo-black);background-color:#fff;border:.5px solid black}}.cg-ap-btn.disabled{opacity:.55!important;cursor:not-allowed}.cg-ap-btn:hover{cursor:pointer;opacity:.92}.cg-ap-btn.black:hover{cursor:pointer;opacity:.75!important}.cg-loader-box{top:0;left:0;width:100%;height:100%;position:absolute;display:flex;justify-content:center;align-items:center;flex-direction:column;background:#666666aa;border-radius:3px}.cg-loader-box .cgl{border:4px solid #d9d9d9;width:25px;height:25px;aspect-ratio:1;border-left-color:transparent!important;border-radius:100%;animation:cgspin 12s cubic-bezier(.5,-10,.5,10) infinite}.cg-loader-box.white{background:#555555aa}.cg-loader-box.white .cgl{border-color:#e5e5e5}.cg-loader-box.sm .cgl{width:17px;height:17px}.cg-loader-box.xs .cgl{width:10px;height:10px;border-width:3px}@keyframes cgspin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cg-list-container{box-sizing:border-box;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cg-list-container .cg-list-group{position:relative}.cg-list-container .cg-list-group .cg-group-label{position:relative;font-size:18px;color:#000;text-align:left;display:flex;align-items:center;justify-content:space-between;background:#f6f6f6;padding:8px 35px 8px 15px;border:solid 1px #ccc;border-radius:0;min-height:38px;min-width:200px}.cg-list-container .cg-list-group .cg-group-label:before{display:none;content:"";position:absolute;top:calc(50% - 10px);right:15px;font-size:15px;color:#888;width:10px;height:10px;border:solid 3px #999;border-top:none;border-left:none;transform:rotate(45deg) scaleX(1) scaleY(1);transition:.1s}.cg-list-container .cg-list-group.expandable .cg-group-label{cursor:pointer}.cg-list-container .cg-list-group.expandable .cg-group-label:before{display:block}.cg-list-container .cg-list-group:not(:last-child){margin-bottom:5px}.cg-list-container .cg-list-group .cg-group-content{position:relative;height:0;font-size:20px;text-align:justify;overflow:hidden;transition:.5s;margin-left:15px}.cg-list-container .cg-list-group .cg-group-content .cg-item-wrapper:first-child{margin-top:5px}.cg-list-container .cg-list-group.open .cg-group-label:before{top:calc(50% - 3px);transform:rotate(45deg) scaleX(-1) scaleY(-1)}.cg-list-container .cg-list-group.open .cg-group-content{height:auto}.cg-list-container .cg-item-wrapper{display:flex;align-items:center;justify-content:space-between;background:#f6f6f6;padding:8px 15px;border:solid 1px #ccc;border-radius:0;min-height:38px;cursor:pointer;min-width:200px}.cg-list-container .cg-item-wrapper:not(:last-child){margin-bottom:5px}.cg-list-container .cg-item-wrapper .cg-ibox{display:block;position:relative;cursor:pointer;font-size:1.5rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:50px;min-width:50px}.cg-list-container .cg-item-wrapper .cg-ibox input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.cg-list-container .cg-item-wrapper .cg-ibox .cg-checkmark{position:relative;top:0;left:0;height:22px;width:22px;border:solid 1px #ccc;border-radius:50%}.cg-list-container .cg-item-wrapper .cg-ibox .cg-checkmark:after{content:"";position:absolute;display:none;left:8px;top:5px;width:4px;height:8px;border:solid #fafafa;border-width:0 2px 2px 0;transform:rotate(45deg)}.cg-list-container .cg-item-wrapper .cg-ibox input:checked~.cg-checkmark{background:#279b37;border-radius:50%;border:none;animation:pulse .25s ease-in-out}.cg-list-container .cg-item-wrapper .cg-ibox input:checked~.cg-checkmark:after{display:block}@keyframes pulse{0%{box-shadow:0 0 #0b6e4f90;rotate:20deg}50%{rotate:-20deg}75%{box-shadow:0 0 0 4px #269a3661}to{box-shadow:0 0 0 4px #269a3630;rotate:0}}.cg-list-container .cg-item-wrapper .cg-item{display:flex;width:100%;align-items:center;justify-content:flex-start}.cg-list-container .cg-item-wrapper .cg-item .cg-lbox{display:flex;text-align:left;flex-flow:column;width:100%}.cg-list-container .cg-item-wrapper .cg-item .cg-lbox .cg-name{font-size:15px;font-weight:500}.cg-list-container .cg-item-wrapper .cg-item .cg-lbox .cg-desc{font-size:12px;background:green}.cg-list-container .cg-item-wrapper .cg-item .cg-logo{display:flex;justify-content:flex-start;align-items:stretch;width:-moz-fit-content;width:fit-content;margin-right:35px}.cg-list-container .cg-item-wrapper .cg-item .cg-logo img{aspect-ratio:auto;max-height:32px}.cg-list-container .cg-item-wrapper:hover{border:solid 1px #bbb;background:#eaeaea}.cg-list-container .cg-item-wrapper:hover .cg-checkmark{border:solid 1px #bbb}.cg-list-container .cg-item-wrapper.active{background:#eaf6ec;border-color:#a3d38b}.cg-list-container .cg-item-wrapper.active:hover{background:#d6efda;border-color:#8ec474}.cg-list-container.small .cg-item-wrapper{padding:5px 11px;margin-bottom:3px;min-height:30px}.cg-list-container.small .cg-item-wrapper .cg-ibox{width:40px;min-width:40px}.cg-list-container.small .cg-item-wrapper .cg-ibox .cg-checkmark{height:18px;width:18px}.cg-list-container.small .cg-item-wrapper .cg-ibox .cg-checkmark:after{left:6px;top:3px;width:4px;height:8px;border:solid #fafafa;border-width:0 2px 2px 0}.cg-list-container.small .cg-item-wrapper .cg-item .cg-name{font-size:13px}.cg-list-container.small .cg-item-wrapper .cg-item .cg-logo{margin-right:20px}.cg-list-container.small .cg-item-wrapper .cg-item .cg-logo img{max-height:22px}.cg-list-container.xsmall .cg-item-wrapper{padding:3px 9px;margin-bottom:3px;min-height:30px}.cg-list-container.xsmall .cg-item-wrapper .cg-ibox{width:30px;min-width:30px}.cg-list-container.xsmall .cg-item-wrapper .cg-ibox .cg-checkmark{height:16px;width:16px}.cg-list-container.xsmall .cg-item-wrapper .cg-ibox .cg-checkmark:after{left:5px;top:2px;width:4px;height:8px;border:solid #fafafa;border-width:0 2px 2px 0}.cg-list-container.xsmall .cg-item-wrapper .cg-item .cg-name{font-size:12px}.cg-list-container.xsmall .cg-item-wrapper .cg-item .cg-logo{margin-right:13px}.cg-list-container.xsmall .cg-item-wrapper .cg-item .cg-logo img{max-height:14px}.cg-list-container.disabled .cg-item-wrapper{cursor:no-drop} `,document.head.appendChild(C);function g(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(h){try{c(r.next(h))}catch(d){s(d)}}function l(h){try{c(r.throw(h))}catch(d){s(d)}}function c(h){h.done?o(h.value):i(h.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function K(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}function me(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;function Ge(t,e){return function(){return t.apply(e,arguments)}}const{toString:dt}=Object.prototype,{getPrototypeOf:le}=Object,U=(t=>e=>{const n=dt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),I=t=>(t=t.toLowerCase(),e=>U(e)===t),ze=t=>e=>typeof e===t,{isArray:ge}=Array,Ce=ze("undefined");function wr(t){return t!==null&&!Ce(t)&&t.constructor!==null&&!Ce(t.constructor)&&F(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ht=I("ArrayBuffer");function _r(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ht(t.buffer),e}const Pr=ze("string"),F=ze("function"),Wt=ze("number"),He=t=>t!==null&&typeof t=="object",Er=t=>t===!0||t===!1,We=t=>{if(U(t)!=="object")return!1;const e=le(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},xr=I("Date"),Sr=I("File"),Cr=I("Blob"),Or=I("FileList"),kr=t=>He(t)&&F(t.pipe),Ar=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||F(t.append)&&((e=U(t))==="formdata"||e==="object"&&F(t.toString)&&t.toString()==="[object FormData]"))},Lr=I("URLSearchParams"),Tr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF�]+|[\s\uFEFF�]+$/g,"");function Oe(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let r,i;if(typeof t!="object"&&(t=[t]),ge(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function Kt(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Jt=(()=>typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global)(),Zt=t=>!Ce(t)&&t!==Jt;function ht(){const{caseless:t}=Zt(this)&&this||{},e={},n=(r,i)=>{const o=t&&Kt(e,i)||i;We(e[o])&&We(r)?e[o]=ht(e[o],r):We(r)?e[o]=ht({},r):ge(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Oe(arguments[r],n);return e}const Rr=(t,e,n,{allOwnKeys:r}={})=>(Oe(e,(i,o)=>{n&&F(i)?t[o]=Ge(i,n):t[o]=i},{allOwnKeys:r}),t),Ir=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Dr=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Mr=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&le(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Nr=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},jr=t=>{if(!t)return null;if(ge(t))return t;let e=t.length;if(!Wt(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Ur=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&le(Uint8Array)),Fr=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},Br=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Vr=I("HTMLFormElement"),qr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Yt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),$r=I("RegExp"),Xt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Oe(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},Gr=t=>{Xt(t,(e,n)=>{if(F(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(F(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},zr=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ge(t)?r(t):r(String(t).split(e)),n},Hr=()=>{},Wr=(t,e)=>(t=+t,Number.isFinite(t)?t:e),ft="abcdefghijklmnopqrstuvwxyz",Qt="0123456789",en={DIGIT:Qt,ALPHA:ft,ALPHA_DIGIT:ft+ft.toUpperCase()+Qt},Kr=(t=16,e=en.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Jr(t){return!!(t&&F(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Zr=t=>{const e=new Array(10),n=(r,i)=>{if(He(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=ge(r)?[]:{};return Oe(r,(s,a)=>{const l=n(s,i+1);!Ce(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},Yr=I("AsyncFunction"),f={isArray:ge,isArrayBuffer:Ht,isBuffer:wr,isFormData:Ar,isArrayBufferView:_r,isString:Pr,isNumber:Wt,isBoolean:Er,isObject:He,isPlainObject:We,isUndefined:Ce,isDate:xr,isFile:Sr,isBlob:Cr,isRegExp:$r,isFunction:F,isStream:kr,isURLSearchParams:Lr,isTypedArray:Ur,isFileList:Or,forEach:Oe,merge:ht,extend:Rr,trim:Tr,stripBOM:Ir,inherits:Dr,toFlatObject:Mr,kindOf:U,kindOfTest:I,endsWith:Nr,toArray:jr,forEachEntry:Fr,matchAll:Br,isHTMLForm:Vr,hasOwnProperty:Yt,hasOwnProp:Yt,reduceDescriptors:Xt,freezeMethods:Gr,toObjectSet:zr,toCamelCase:qr,noop:Hr,toFiniteNumber:Wr,findKey:Kt,global:Jt,isContextDefined:Zt,ALPHABET:en,generateString:Kr,isSpecCompliantForm:Jr,toJSONObject:Zr,isAsyncFn:Yr,isThenable:t=>t&&(He(t)||F(t))&&F(t.then)&&F(t.catch)};function w(t,e,n,r,i){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),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}f.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:f.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const tn=w.prototype,nn={};["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=>{nn[t]={value:t}}),Object.defineProperties(w,nn),Object.defineProperty(tn,"isAxiosError",{value:!0}),w.from=(t,e,n,r,i,o)=>{const s=Object.create(tn);return f.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),w.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const Xr=null;function pt(t){return f.isPlainObject(t)||f.isArray(t)}function rn(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function on(t,e,n){return t?t.concat(e).map(function(i,o){return i=rn(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Qr(t){return f.isArray(t)&&!t.some(pt)}const ei=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function Ke(t,e,n){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,P){return!f.isUndefined(P[v])});const r=n.metaTokens,i=n.visitor||h,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(f.isDate(p))return p.toISOString();if(!l&&f.isBlob(p))throw new w("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(p)||f.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function h(p,v,P){let x=p;if(p&&!P&&typeof p=="object"){if(f.endsWith(v,"{}"))v=r?v:v.slice(0,-2),p=JSON.stringify(p);else if(f.isArray(p)&&Qr(p)||(f.isFileList(p)||f.endsWith(v,"[]"))&&(x=f.toArray(p)))return v=rn(v),x.forEach(function(j,xe){!(f.isUndefined(j)||j===null)&&e.append(s===!0?on([v],xe,o):s===null?v:v+"[]",c(j))}),!1}return pt(p)?!0:(e.append(on(P,v,o),c(p)),!1)}const d=[],y=Object.assign(ei,{defaultVisitor:h,convertValue:c,isVisitable:pt});function E(p,v){if(!f.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(p),f.forEach(p,function(x,M){(!(f.isUndefined(x)||x===null)&&i.call(e,x,f.isString(M)?M.trim():M,v,y))===!0&&E(x,v?v.concat(M):[M])}),d.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return E(t),e}function sn(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":""};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function mt(t,e){this._pairs=[],t&&Ke(t,this,e)}const an=mt.prototype;an.append=function(e,n){this._pairs.push([e,n])},an.toString=function(e){const n=e?function(r){return e.call(this,r,sn)}:sn;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function ti(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ln(t,e,n){if(!e)return t;const r=n&&n.encode||ti,i=n&&n.serialize;let o;if(i?o=i(e,n):o=f.isURLSearchParams(e)?e.toString():new mt(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class ni{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(r){r!==null&&e(r)})}}const cn=ni,un={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ri={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:mt,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},dn=typeof window!="undefined"&&typeof document!="undefined",ii=(t=>dn&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator!="undefined"&&navigator.product),oi=(()=>typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$=T(T({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dn,hasStandardBrowserEnv:ii,hasStandardBrowserWebWorkerEnv:oi},Symbol.toStringTag,{value:"Module"}))),ri);function si(t,e){return Ke(t,new $.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return $.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function ai(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function li(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function hn(t){function e(n,r,i,o){let s=n[o++];const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&f.isArray(i)?i.length:s,l?(f.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!f.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&f.isArray(i[s])&&(i[s]=li(i[s])),!a)}if(f.isFormData(t)&&f.isFunction(t.entries)){const n={};return f.forEachEntry(t,(r,i)=>{e(ai(r),i,n,0)}),n}return null}function ci(t,e,n){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const gt={transitional:un,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=f.isObject(e);if(o&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return i&&i?JSON.stringify(hn(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return si(e,this.formSerializer).toString();if((a=f.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ke(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),ci(e)):e}],transformResponse:[function(e){const n=this.transitional||gt.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&f.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?w.from(a,w.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{gt.headers[t]={}});const vt=gt,ui=f.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"]),di=t=>{const e={};let n,r,i;return t&&t.split(` `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&ui[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},fn=Symbol("internals");function ke(t){return t&&String(t).trim().toLowerCase()}function Je(t){return t===!1||t==null?t:f.isArray(t)?t.map(Je):String(t)}function hi(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const fi=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function bt(t,e,n,r,i){if(f.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!f.isString(e)){if(f.isString(r))return e.indexOf(r)!==-1;if(f.isRegExp(r))return r.test(e)}}function pi(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function mi(t,e){const n=f.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}class Ze{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,l,c){const h=ke(l);if(!h)throw new Error("header name must be a non-empty string");const d=f.findKey(i,h);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Je(a))}const s=(a,l)=>f.forEach(a,(c,h)=>o(c,h,l));return f.isPlainObject(e)||e instanceof this.constructor?s(e,n):f.isString(e)&&(e=e.trim())&&!fi(e)?s(di(e),n):e!=null&&o(n,e,r),this}get(e,n){if(e=ke(e),e){const r=f.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return hi(i);if(f.isFunction(n))return n.call(this,i,r);if(f.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ke(e),e){const r=f.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||bt(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=ke(s),s){const a=f.findKey(r,s);a&&(!n||bt(r,r[a],a,n))&&(delete r[a],i=!0)}}return f.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||bt(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return f.forEach(this,(i,o)=>{const s=f.findKey(r,o);if(s){n[s]=Je(i),delete n[o];return}const a=e?pi(o):String(o).trim();a!==o&&delete n[o],n[a]=Je(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return f.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&f.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[fn]=this[fn]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=ke(s);r[a]||(mi(i,s),r[a]=!0)}return f.isArray(e)?e.forEach(o):o(e),this}}Ze.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),f.reduceDescriptors(Ze.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),f.freezeMethods(Ze);const J=Ze;function yt(t,e){const n=this||vt,r=e||n,i=J.from(r.headers);let o=r.data;return f.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function pn(t){return!!(t&&t.__CANCEL__)}function Ae(t,e,n){w.call(this,t==null?"canceled":t,w.ERR_CANCELED,e,n),this.name="CanceledError"}f.inherits(Ae,w,{__CANCEL__:!0});function gi(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new w("Request failed with status code "+n.status,[w.ERR_BAD_REQUEST,w.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const vi=$.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];f.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),f.isString(r)&&s.push("path="+r),f.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.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(){return null},remove(){}};function bi(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yi(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function mn(t,e){return t&&!bi(e)?yi(t,e):e}const wi=$.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=f.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function _i(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Pi(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),h=r[o];s||(s=c),n[i]=l,r[i]=c;let d=o,y=0;for(;d!==i;)y+=n[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s<e)return;const E=h&&c-h;return E?Math.round(y*1e3/E):void 0}}function gn(t,e){let n=0;const r=Pi(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a),c=o<=s;n=o;const h={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&c?(s-o)/l:void 0,event:i};h[e?"download":"upload"]=!0,t(h)}}const wt={http:Xr,xhr:typeof XMLHttpRequest!="undefined"&&function(t){return new Promise(function(n,r){let i=t.data;const o=J.from(t.headers).normalize();let{responseType:s,withXSRFToken:a}=t,l;function c(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let h;if(f.isFormData(i)){if($.hasStandardBrowserEnv||$.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((h=o.getContentType())!==!1){const[v,...P]=h?h.split(";").map(x=>x.trim()).filter(Boolean):[];o.setContentType([v||"multipart/form-data",...P].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const v=t.auth.username||"",P=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(v+":"+P))}const y=mn(t.baseURL,t.url);d.open(t.method.toUpperCase(),ln(y,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function E(){if(!d)return;const v=J.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:v,config:t,request:d};gi(function(j){n(j),c()},function(j){r(j),c()},x),d=null}if("onloadend"in d?d.onloadend=E:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(E)},d.onabort=function(){d&&(r(new w("Request aborted",w.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new w("Network Error",w.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let P=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const x=t.transitional||un;t.timeoutErrorMessage&&(P=t.timeoutErrorMessage),r(new w(P,x.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,t,d)),d=null},$.hasStandardBrowserEnv&&(a&&f.isFunction(a)&&(a=a(t)),a||a!==!1&&wi(y))){const v=t.xsrfHeaderName&&t.xsrfCookieName&&vi.read(t.xsrfCookieName);v&&o.set(t.xsrfHeaderName,v)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&f.forEach(o.toJSON(),function(P,x){d.setRequestHeader(x,P)}),f.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",gn(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",gn(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=v=>{d&&(r(!v||v.type?new Ae(null,t,d):v),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const p=_i(y);if(p&&$.protocols.indexOf(p)===-1){r(new w("Unsupported protocol "+p+":",w.ERR_BAD_REQUEST,t));return}d.send(i||null)})}};f.forEach(wt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}});const vn=t=>`- ${t}`,Ei=t=>f.isFunction(t)||t===null||t===!1,bn={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){n=t[o];let s;if(r=n,!Ei(n)&&(r=wt[(s=String(n)).toLowerCase()],r===void 0))throw new w(`Unknown adapter '${s}'`);if(r)break;i[s||"#"+o]=r}if(!r){const o=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since : `+o.map(vn).join(` `):" "+vn(o[0]):"as no adapter specified";throw new w("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:wt};function _t(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ae(null,t)}function yn(t){return _t(t),t.headers=J.from(t.headers),t.data=yt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),bn.getAdapter(t.adapter||vt.adapter)(t).then(function(r){return _t(t),r.data=yt.call(t,t.transformResponse,r),r.headers=J.from(r.headers),r},function(r){return pn(r)||(_t(t),r&&r.response&&(r.response.data=yt.call(t,t.transformResponse,r.response),r.response.headers=J.from(r.response.headers))),Promise.reject(r)})}const wn=t=>t instanceof J?t.toJSON():t;function ve(t,e){e=e||{};const n={};function r(c,h,d){return f.isPlainObject(c)&&f.isPlainObject(h)?f.merge.call({caseless:d},c,h):f.isPlainObject(h)?f.merge({},h):f.isArray(h)?h.slice():h}function i(c,h,d){if(f.isUndefined(h)){if(!f.isUndefined(c))return r(void 0,c,d)}else return r(c,h,d)}function o(c,h){if(!f.isUndefined(h))return r(void 0,h)}function s(c,h){if(f.isUndefined(h)){if(!f.isUndefined(c))return r(void 0,c)}else return r(void 0,h)}function a(c,h,d){if(d in e)return r(c,h);if(d in t)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,h)=>i(wn(c),wn(h),!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(h){const d=l[h]||i,y=d(t[h],e[h],h);f.isUndefined(y)&&d!==a||(n[h]=y)}),n}const _n="1.6.2",Pt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Pt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Pn={};Pt.transitional=function(e,n,r){function i(o,s){return"[Axios v"+_n+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new w(i(s," has been removed"+(n?" in "+n:"")),w.ERR_DEPRECATED);return n&&!Pn[s]&&(Pn[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};function xi(t,e,n){if(typeof t!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new w("option "+o+" must be "+l,w.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new w("Unknown option "+o,w.ERR_BAD_OPTION)}}const Et={assertOptions:xi,validators:Pt},te=Et.validators;class Ye{constructor(e){this.defaults=e,this.interceptors={request:new cn,response:new cn}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ve(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Et.assertOptions(r,{silentJSONParsing:te.transitional(te.boolean),forcedJSONParsing:te.transitional(te.boolean),clarifyTimeoutError:te.transitional(te.boolean)},!1),i!=null&&(f.isFunction(i)?n.paramsSerializer={serialize:i}:Et.assertOptions(i,{encode:te.function,serialize:te.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&f.merge(o.common,o[n.method]);o&&f.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=J.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let h,d=0,y;if(!l){const p=[yn.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),y=p.length,h=Promise.resolve(n);d<y;)h=h.then(p[d++],p[d++]);return h}y=a.length;let E=n;for(d=0;d<y;){const p=a[d++],v=a[d++];try{E=p(E)}catch(P){v.call(this,P);break}}try{h=yn.call(this,E)}catch(p){return Promise.reject(p)}for(d=0,y=c.length;d<y;)h=h.then(c[d++],c[d++]);return h}getUri(e){e=ve(this.defaults,e);const n=mn(e.baseURL,e.url);return ln(n,e.params,e.paramsSerializer)}}f.forEach(["delete","get","head","options"],function(e){Ye.prototype[e]=function(n,r){return this.request(ve(r||{},{method:e,url:n,data:(r||{}).data}))}}),f.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(ve(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Ye.prototype[e]=n(),Ye.prototype[e+"Form"]=n(!0)});const Xe=Ye;class xt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new Ae(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new xt(function(i){e=i}),cancel:e}}}const Si=xt;function Ci(t){return function(n){return t.apply(null,n)}}function Oi(t){return f.isObject(t)&&t.isAxiosError===!0}const St={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(St).forEach(([t,e])=>{St[e]=t});const ki=St;function En(t){const e=new Xe(t),n=Ge(Xe.prototype.request,e);return f.extend(n,Xe.prototype,e,{allOwnKeys:!0}),f.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return En(ve(t,i))},n}const A=En(vt);A.Axios=Xe,A.CanceledError=Ae,A.CancelToken=Si,A.isCancel=pn,A.VERSION=_n,A.toFormData=Ke,A.AxiosError=w,A.Cancel=A.CanceledError,A.all=function(e){return Promise.all(e)},A.spread=Ci,A.isAxiosError=Oi,A.mergeConfig=ve,A.AxiosHeaders=J,A.formToJSON=t=>hn(f.isHTMLForm(t)?new FormData(t):t),A.getAdapter=bn.getAdapter,A.HttpStatusCode=ki,A.default=A;const Ai=A;var Qe=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Li(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ti="Expected a function",xn=0/0,Ri="[object Symbol]",Ii=/^\s+|\s+$/g,Di=/^[-+]0x[0-9a-f]+$/i,Mi=/^0b[01]+$/i,Ni=/^0o[0-7]+$/i,ji=parseInt,Ui=typeof Qe=="object"&&Qe&&Qe.Object===Object&&Qe,Fi=typeof self=="object"&&self&&self.Object===Object&&self,Bi=Ui||Fi||Function("return this")(),Vi=Object.prototype,qi=Vi.toString,$i=Math.max,Gi=Math.min,Ct=function(){return Bi.Date.now()};function zi(t,e,n){var r,i,o,s,a,l,c=0,h=!1,d=!1,y=!0;if(typeof t!="function")throw new TypeError(Ti);e=Sn(e)||0,Ot(n)&&(h=!!n.leading,d="maxWait"in n,o=d?$i(Sn(n.maxWait)||0,e):o,y="trailing"in n?!!n.trailing:y);function E(S){var q=r,ae=i;return r=i=void 0,c=S,s=t.apply(ae,q),s}function p(S){return c=S,a=setTimeout(x,e),h?E(S):s}function v(S){var q=S-l,ae=S-c,$e=e-q;return d?Gi($e,o-ae):$e}function P(S){var q=S-l,ae=S-c;return l===void 0||q>=e||q<0||d&&ae>=o}function x(){var S=Ct();if(P(S))return M(S);a=setTimeout(x,v(S))}function M(S){return a=void 0,y&&r?E(S):(r=i=void 0,s)}function j(){a!==void 0&&clearTimeout(a),c=0,r=l=i=a=void 0}function xe(){return a===void 0?s:M(Ct())}function Se(){var S=Ct(),q=P(S);if(r=arguments,i=this,l=S,q){if(a===void 0)return p(l);if(d)return a=setTimeout(x,e),E(l)}return a===void 0&&(a=setTimeout(x,e)),s}return Se.cancel=j,Se.flush=xe,Se}function Ot(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Hi(t){return!!t&&typeof t=="object"}function Wi(t){return typeof t=="symbol"||Hi(t)&&qi.call(t)==Ri}function Sn(t){if(typeof t=="number")return t;if(Wi(t))return xn;if(Ot(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ot(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(Ii,"");var n=Mi.test(t);return n||Ni.test(t)?ji(t.slice(2),n?2:8):Di.test(t)?xn:+t}var Ki=zi;const Cn=Li(Ki);var Ji=Object.defineProperty,Zi=(t,e,n)=>e in t?Ji(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,be=(t,e,n)=>(Zi(t,typeof e!="symbol"?e+"":e,n),n),kt=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},b=(t,e,n)=>(kt(t,e,"read from private field"),n?n.call(t):e.get(t)),O=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},D=(t,e,n,r)=>(kt(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Yi=(t,e,n,r)=>({set _(i){D(t,e,i,n)},get _(){return b(t,e,r)}}),L=(t,e,n)=>(kt(t,e,"access private method"),n);let m=class extends Error{constructor(t,e=null,n=null){super(t),be(this,"context"),this.name="CgError",this.context=e!=null?e:null,this.cause=n!=null?n:null}toString(){let t=`[${this.name}] ${this.message}`;return this.context&&(t+=` Context: ${JSON.stringify(this.context)}`),this.cause&&(t+=` Cause: [${this.cause.toString()}]`),t}};function Xi(t){return new Promise(e=>{const n=setTimeout(()=>{e(n)},t)})}function On(t,e,n=!1,r=null){const i=o=>n&&Math.floor(o)>=e?Math.floor(o):o;return typeof t=="number"&&t>=e?i(t):i(r?r<e?e:r:e)}function kn(t,e,n=!1,r=null){const i=o=>n&&Math.ceil(o)<=e?Math.ceil(o):o;return typeof t=="number"&&t<e?i(t):i(r?r>e?e:r:e)}function Le(t,e,n,r=!1,i=!1,o="lower"){let s=n;return o==="lower"?s=e:Number.isFinite(o)&&(s=o),On(kn(t,n,r,s),e,i,s)}function Qi(){let t=!1;try{t=window.navigator.javaEnabled()}catch(e){}return{language:window.navigator.language,colorDepth:window.screen.colorDepth,screenHeight:window.screen.height,screenWidth:window.screen.width,timezone:new Date().getTimezoneOffset(),javaEnabled:t,javascriptEnabled:!0}}function eo(t=!1){const e={isSecureContext:window.isSecureContext},n=["vendor","connection","hardwareConcurrency","cookieEnabled","appCodeName","appName","appVersion","platform","product","userAgent","language","onLine","userAgentData","globalPrivacyControl","maxTouchPoints","productSub","userActivation","webdriver","doNotTrack"],r=navigator;for(const i of n)i in r&&![null,void 0].includes(r[i])&&(typeof r[i]=="object"?Object.keys(r[i]).length>0&&(e[i]=r[i]):e[i]=r[i]);return t?" Navigator: "+JSON.stringify(e):e}function An(){return crypto&&"randomUUID"in crypto?crypto.randomUUID():Ln(16)}function Ln(t,e="-"){return(Array.isArray(t)?t:[t]).map(n=>{let r="";do r+=Math.floor(Math.random()*Date.now()).toString(32);while(r.length<n);return r.slice(0,n)}).join(e)}function to(t,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"){let n="";const r=e.length;let i=0;for(;i<t;)n+=e.charAt(Math.floor(Math.random()*r)),i+=1;return n}function no(t){return B(this,null,function*(){return new Promise((e,n)=>{var r,i;try{if(typeof t.foundValidator=="function"&&t.foundValidator()){t.id,e(!0);return}if(document.getElementById(t.id))t.foundValidator?typeof t.foundValidator!="function"?(console.warn("FoundValidator is not a function"),e(!1)):t.foundValidator()===!0?(t.id,e(!0)):(t.id,n("Script injected to the DOM but not loaded.")):(t.id,e(!1));else{let o=null;if(t.elementType==="script")o=document.createElement("script"),o.src=t.link,o.async=(r=t.async)!=null?r:!1,o.defer=(i=t.defer)!=null?i:!1;else if(t.elementType==="link")o=document.createElement("link"),o.href=t.link,o.rel=t.rel,o.as=t.as;else throw new CgError("Invalid elementType: "+t.elementType);o.id=t.id,o.addEventListener("load",()=>{typeof t.foundValidator=="function"&&t.foundValidator()===!0?(t.id,e(!0)):e(!1)}),t.elementType!=="link"&&o.addEventListener("error",s=>{t.id,n(s)}),document.head.append(o)}}catch(o){t.id,n(o)}})})}const ne=Object.freeze(Object.defineProperty({__proto__:null,appendScript:no,bothBarrier:Le,delayedPromise:Xi,getBrowserInfo:Qi,getNavigatorDump:eo,getPseudoRandom:Ln,getPseudoRandomString:An,getRandom:to,lowerBarrier:On,upperBarrier:kn},Symbol.toStringTag,{value:"Module"}));let et="https://payments.comgate.cz";const ro=Ai.create({baseURL:et});function io(t,e=200,n={},r={}){return new Promise((i,o)=>{At({url:t,method:"GET",params:n},e,i,o,In(r),!1,!1,0,0)})}function Tn(t,e=200,n={},r={},i={}){return new Promise((o,s)=>{At({url:t,params:n,data:r,method:"POST"},e,o,s,In(i),!1,!1,0,0)})}function Rn(t){return typeof t=="string"&&/^https:\/\/[a-zA-Z0-9_.-]+/.test(t)}function oo(t){let e=!0,n=t;n&&typeof n=="string"&&(n=n.toLowerCase().trim(),n.endsWith("/")&&(n=n.slice(0,-1)),n.startsWith("http://")&&(!window.Cypress||location.hostname!=="localhost")&&(n=n.replace("http://","https://"),console.warn(`Checkout SDK: Changing HTTP of base domain to HTTPS: '${n}'`)),Rn(n)&&(et=n,e=!1)),e&&console.warn(`Checkout SDK: Invalid base domain: '${n}'. Using default domain: '${et}'`)}function In(t){const{maxRetries:e,repeatDelay:n,responseValidator:r}=t;return{checkSuccessParam:t.checkSuccessParam!==!1,strictMaxRetries:t.strictMaxRetries!==!1,repeatDelay:Le(n,0,5e3,!0,!0,500),maxRetries:Le(e,0,10,!0,!0,1),responseValidator:r&&typeof r=="function"?r:null}}function At(t,e=200,n,r,i,o=!1,s=!1,a=0,l=0){if(!t.url)throw new m("Missing URL");t.url=Dn(t.url),t.headers||(t.headers={}),t.headers["X-Requested-With"]="XMLHttpRequest",t.headers["X-Cg-Origin"]=window.location.origin,ro(t).then(c=>{var h;if(Array.isArray(e)&&(e.length!==2||e[0]>e[1])&&console.warn("Invalid successCode array "+JSON.stringify(e)+" the first number must be lower or equal than the second one"),(Array.isArray(e)?c.status>=e[0]&&c.status<=e[1]:c.status===e)&&(i.checkSuccessParam&&((h=c.data)==null?void 0:h.success)===!0||!i.checkSuccessParam)){if(delete c.data.success,i.responseValidator){if(i.responseValidator(c.data,c.status,c.headers,c.config)===!0){n(c.data);return}return Promise.reject({msg:"Invalid response by custom validator.",valid:!1,response:c})}n(c.data);return}return Promise.reject({msg:"Invalid response by basic validation.",valid:!1,response:c})}).catch(c=>{var M,j,xe,Se,S,q,ae;var h,d;const y=(xe=(j=(M=c==null?void 0:c.code)!=null?M:(h=c==null?void 0:c.response)==null?void 0:h.code)!=null?j:(d=c==null?void 0:c.error)==null?void 0:d.code)!=null?xe:"Not specified",E=y==="ETIMEDOUT",p=y==="ERR_NETWORK";let v,P;(c==null?void 0:c.valid)===!1?(v=(c==null?void 0:c.msg)||"Invalid response validation",P=c==null?void 0:c.response):(v=(Se=c==null?void 0:c.toString())!=null?Se:"Unknown error",typeof c=="object"&&"response"in c&&typeof c.response=="object"?P=c.response:P=c);let x=a;if(E&&!o||p&&!s?x+=1:x=0,!i.strictMaxRetries&&x<=2||i.maxRetries>l){let $e=l+1;(E||p)&&x<1&&!i.strictMaxRetries&&($e=l),setTimeout(()=>{At(t,e,n,r,i,E,p,x,$e)},i.repeatDelay);return}r({url:t.url,message:v,status:(S=P==null?void 0:P.status)!=null?S:null,expectedStatus:e,requiredSuccessResponseParam:i.checkSuccessParam,data:(q=P==null?void 0:P.data)!=null?q:null,headers:(ae=P==null?void 0:P.headers)!=null?ae:null,retries:l,maxRetries:i.maxRetries,errorCode:y,networkErrorCountInner:x})})}function Dn(t){let e=t;return e.startsWith("/")&&(e=et+e),e}const V=Object.freeze(Object.defineProperty({__proto__:null,changeBaseDomain:oo,expandUrl:Dn,get:io,isDomainValid:Rn,post:Tn},Symbol.toStringTag,{value:"Module"}));var tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mn={},G=tt&&tt.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Lt=tt&&tt.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Z,re;Object.defineProperty(Mn,"__esModule",{value:!0});class so{constructor(){Z.set(this,!1),re.set(this,new Set)}get acquired(){return G(this,Z,"f")}acquireAsync({timeout:e}={}){if(!G(this,Z,"f"))return Lt(this,Z,!0,"f"),Promise.resolve();if(e==null)return new Promise(i=>{G(this,re,"f").add(i)});let n,r;return Promise.race([new Promise(i=>{n=()=>{clearTimeout(r),i()},G(this,re,"f").add(n)}),new Promise((i,o)=>{r=setTimeout(()=>{G(this,re,"f").delete(n),o(new Error("Timed out waiting for lock"))},e)})])}tryAcquire(){return G(this,Z,"f")?!1:(Lt(this,Z,!0,"f"),!0)}release(){if(!G(this,Z,"f"))throw new Error("Cannot release an unacquired lock");if(G(this,re,"f").size>0){con