@mono.co/connect.js
Version:
Mono Connect Library
2 lines • 44.3 kB
JavaScript
/*! For license information please see index.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@mono.co/connect.js"]=t():e["@mono.co/connect.js"]=t()}(this,(()=>(()=>{"use strict";var e={187:(e,t,n)=>{var o=n(672);const r=n(425).default,i=()=>{},s=e=>{throw new Error(`${e} is required`)};function a({key:e,onClose:t=i,onSuccess:n,onLoad:r=i,onEvent:c=i,...l}){if(!(this instanceof a))return new a({key:e,onClose:t,onSuccess:n,onLoad:r,onEvent:c,...l});this.key=e||s("PUBLIC_KEY"),this.config={...l},a.prototype.onLoad=r,a.prototype.onClose=t,a.prototype.onSuccess=n||s("onSuccess callback"),a.prototype.onEvent=c,a.prototype.utils=o()}a.prototype.setup=function(e={}){a.prototype.utils.addStyle();const t={...this.config,...e};a.prototype.utils.init({key:this.key,qs:t,onload:this.onLoad,onevent:this.onEvent})},a.prototype.reauthorise=function(e){if(!e)throw new Error("Account ID is required for re-authorisation");if("string"!=typeof e)throw new Error("Invalid accountId: must be a string");a.prototype.utils.addStyle(),a.prototype.utils.init({key:this.key,qs:{...this.config,data:{...this.config.data||{},account:e}},onload:this.onLoad,onevent:this.onEvent})},a.prototype.open=function(){a.prototype.utils.openWidget(),a.prototype.eventHandler=function(e){switch(e.data.type){case"mono.connect.widget.charge_complete":case"mono.connect.widget.account_linked":this.onSuccess({...e.data.data}),this.onEvent("SUCCESS",e.data.data),a.prototype.close();break;case"mono.connect.widget.closed":a.prototype.close();break;case"mono.connect.widget_opened":this.onEvent("OPENED",e.data.data);break;case"mono.connect.error_occured":this.onEvent("ERROR",e.data.data);break;case"mono.connect.institution_selected":this.onEvent("INSTITUTION_SELECTED",e.data.data);break;case"mono.connect.auth_method_switched":this.onEvent("AUTH_METHOD_SWITCHED",e.data.data);break;case"mono.connect.on_exit":this.onEvent("EXIT",e.data.data);break;case"mono.connect.login_attempt":this.onEvent("SUBMIT_CREDENTIALS",e.data.data);break;case"mono.connect.mfa_submitted":this.onEvent("SUBMIT_MFA",e.data.data);break;case"mono.connect.account_linked":this.onEvent("ACCOUNT_LINKED",e.data.data);break;case"mono.connect.account_selected":this.onEvent("ACCOUNT_SELECTED",e.data.data)}}.bind(this),window.addEventListener("message",this.eventHandler,!1)},a.prototype.close=function(){window.removeEventListener("message",this.eventHandler,!1),a.prototype.utils.closeWidget(),this.onClose()},a.prototype.fetchInstitutions=function(){return r.get("https://api.withmono.com/coverage")},"undefined"!=typeof window&&(window.Connect=a),e.exports=a},425:(e,t,n)=>{function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),e=>{const t=r.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>s(t)===e),l=e=>t=>typeof t===e,{isArray:d}=Array,u=l("undefined");const f=c("ArrayBuffer");const p=l("string"),h=l("function"),m=l("number"),y=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==s(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},g=c("Date"),w=c("File"),E=c("Blob"),v=c("FileList"),S=c("URLSearchParams"),[O,R,T,_]=["ReadableStream","Request","Response","Headers"].map(c);function x(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let o,r;if("object"!=typeof e&&(e=[e]),d(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{const r=n?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let s;for(o=0;o<i;o++)s=r[o],t.call(null,e[s],s,e)}}function A(e,t){t=t.toLowerCase();const n=Object.keys(e);let o,r=n.length;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,C=e=>!u(e)&&e!==k;const j=(N="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>N&&e instanceof N);var N;const U=c("HTMLFormElement"),L=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),P=c("RegExp"),B=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};x(n,((n,r)=>{let i;!1!==(i=t(n,r,e))&&(o[r]=i||n)})),Object.defineProperties(e,o)};const F=c("AsyncFunction"),D=(I="function"==typeof setImmediate,q=h(k.postMessage),I?setImmediate:q?(M=`axios@${Math.random()}`,z=[],k.addEventListener("message",(({source:e,data:t})=>{e===k&&t===M&&z.length&&z.shift()()}),!1),e=>{z.push(e),k.postMessage(M,"*")}):e=>setTimeout(e));var I,q,M,z;const H="undefined"!=typeof queueMicrotask?queueMicrotask.bind(k):"undefined"!=typeof process&&process.nextTick||D;var W={isArray:d,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||h(e.append)&&("formdata"===(t=s(e))||"object"===t&&h(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:p,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:b,isReadableStream:O,isRequest:R,isResponse:T,isHeaders:_,isUndefined:u,isDate:g,isFile:w,isBlob:E,isRegExp:P,isFunction:h,isStream:e=>y(e)&&h(e.pipe),isURLSearchParams:S,isTypedArray:j,isFileList:v,forEach:x,merge:function e(){const{caseless:t}=C(this)&&this||{},n={},o=(o,r)=>{const i=t&&A(n,r)||r;b(n[i])&&b(o)?n[i]=e(n[i],o):b(o)?n[i]=e({},o):d(o)?n[i]=o.slice():n[i]=o};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&x(arguments[e],o);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(x(t,((t,r)=>{n&&h(t)?e[r]=o(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,o)=>{let r,s,a;const c={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),s=r.length;s-- >0;)a=r[s],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return-1!==o&&o===n},toArray:e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const o=[];for(;null!==(n=e.exec(t));)o.push(n);return o},isHTMLForm:U,hasOwnProperty:L,hasOwnProp:L,reduceDescriptors:B,freezeMethods:e=>{B(e,((t,n)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=e[n];h(o)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},o=e=>{e.forEach((e=>{n[e]=!0}))};return d(e)?o(e):o(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:A,global:k,isContextDefined:C,isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,o)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[o]=e;const r=d(e)?[]:{};return x(e,((e,t)=>{const i=n(e,o+1);!u(i)&&(r[t]=i)})),t[o]=void 0,r}}return e};return n(e,0)},isAsyncFn:F,isThenable:e=>e&&(y(e)||h(e))&&h(e.then)&&h(e.catch),setImmediate:D,asap:H};function J(e,t,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r,this.status=r.status?r.status:null)}W.inherits(J,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:W.toJSONObject(this.config),code:this.code,status:this.status}}});const K=J.prototype,V={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{V[e]={value:e}})),Object.defineProperties(J,V),Object.defineProperty(K,"isAxiosError",{value:!0}),J.from=(e,t,n,o,r,i)=>{const s=Object.create(K);return W.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),J.call(s,e.message,t,n,o,r),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};function $(e){return W.isPlainObject(e)||W.isArray(e)}function X(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function G(e,t,n){return e?e.concat(t).map((function(e,t){return e=X(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Q=W.toFlatObject(W,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Y(e,t,n){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!W.isUndefined(t[e])}))).metaTokens,r=n.visitor||l,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(r))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(W.isDate(e))return e.toISOString();if(!a&&W.isBlob(e))throw new J("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(e)||W.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,r){let a=e;if(e&&!r&&"object"==typeof e)if(W.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=JSON.stringify(e);else if(W.isArray(e)&&function(e){return W.isArray(e)&&!e.some($)}(e)||(W.isFileList(e)||W.endsWith(n,"[]"))&&(a=W.toArray(e)))return n=X(n),a.forEach((function(e,o){!W.isUndefined(e)&&null!==e&&t.append(!0===s?G([n],o,i):null===s?n:n+"[]",c(e))})),!1;return!!$(e)||(t.append(G(r,n,i),c(e)),!1)}const d=[],u=Object.assign(Q,{defaultVisitor:l,convertValue:c,isVisitable:$});if(!W.isObject(e))throw new TypeError("data must be an object");return function e(n,o){if(!W.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+o.join("."));d.push(n),W.forEach(n,(function(n,i){!0===(!(W.isUndefined(n)||null===n)&&r.call(t,n,W.isString(i)?i.trim():i,o,u))&&e(n,o?o.concat(i):[i])})),d.pop()}}(e),t}function Z(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ee(e,t){this._pairs=[],e&&Y(e,this,t)}const te=ee.prototype;function ne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function oe(e,t,n){if(!t)return e;const o=n&&n.encode||ne;W.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let i;if(i=r?r(t,n):W.isURLSearchParams(t)?t.toString():new ee(t,n).toString(o),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}te.append=function(e,t){this._pairs.push([e,t])},te.toString=function(e){const t=e?function(t){return e.call(this,t,Z)}:Z;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var re=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){W.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ie={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},se={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ee,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ae="undefined"!=typeof window&&"undefined"!=typeof document,ce="object"==typeof navigator&&navigator||void 0,le=ae&&(!ce||["ReactNative","NativeScript","NS"].indexOf(ce.product)<0),de="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ue=ae&&window.location.href||"http://localhost";var fe={...Object.freeze({__proto__:null,hasBrowserEnv:ae,hasStandardBrowserWebWorkerEnv:de,hasStandardBrowserEnv:le,navigator:ce,origin:ue}),...se};function pe(e){function t(e,n,o,r){let i=e[r++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=r>=e.length;if(i=!i&&W.isArray(o)?o.length:i,a)return W.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!s;o[i]&&W.isObject(o[i])||(o[i]=[]);return t(e,n,o[i],r)&&W.isArray(o[i])&&(o[i]=function(e){const t={},n=Object.keys(e);let o;const r=n.length;let i;for(o=0;o<r;o++)i=n[o],t[i]=e[i];return t}(o[i])),!s}if(W.isFormData(e)&&W.isFunction(e.entries)){const n={};return W.forEachEntry(e,((e,o)=>{t(function(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),o,n,0)})),n}return null}const he={transitional:ie,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",o=n.indexOf("application/json")>-1,r=W.isObject(e);r&&W.isHTMLForm(e)&&(e=new FormData(e));if(W.isFormData(e))return o?JSON.stringify(pe(e)):e;if(W.isArrayBuffer(e)||W.isBuffer(e)||W.isStream(e)||W.isFile(e)||W.isBlob(e)||W.isReadableStream(e))return e;if(W.isArrayBufferView(e))return e.buffer;if(W.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Y(e,new fe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,o){return fe.isNode&&W.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=W.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Y(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||o?(t.setContentType("application/json",!1),function(e,t,n){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||he.transitional,n=t&&t.forcedJSONParsing,o="json"===this.responseType;if(W.isResponse(e)||W.isReadableStream(e))return e;if(e&&W.isString(e)&&(n&&!this.responseType||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw J.from(e,J.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],(e=>{he.headers[e]={}}));var me=he;const ye=W.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"]);const be=Symbol("internals");function ge(e){return e&&String(e).trim().toLowerCase()}function we(e){return!1===e||null==e?e:W.isArray(e)?e.map(we):String(e)}function Ee(e,t,n,o,r){return W.isFunction(o)?o.call(this,t,n):(r&&(t=n),W.isString(t)?W.isString(o)?-1!==t.indexOf(o):W.isRegExp(o)?o.test(t):void 0:void 0)}class ve{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function r(e,t,n){const r=ge(t);if(!r)throw new Error("header name must be a non-empty string");const i=W.findKey(o,r);(!i||void 0===o[i]||!0===n||void 0===n&&!1!==o[i])&&(o[i||t]=we(e))}const i=(e,t)=>W.forEach(e,((e,n)=>r(e,n,t)));if(W.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(W.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,o,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),o=e.substring(r+1).trim(),!n||t[n]&&ye[n]||("set-cookie"===n?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)})),t})(e),t);else if(W.isHeaders(e))for(const[t,o]of e.entries())r(o,t,n);else null!=e&&r(t,e,n);return this}get(e,t){if(e=ge(e)){const n=W.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}(e);if(W.isFunction(t))return t.call(this,e,n);if(W.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ge(e)){const n=W.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ee(0,this[n],n,t))}return!1}delete(e,t){const n=this;let o=!1;function r(e){if(e=ge(e)){const r=W.findKey(n,e);!r||t&&!Ee(0,n[r],r,t)||(delete n[r],o=!0)}}return W.isArray(e)?e.forEach(r):r(e),o}clear(e){const t=Object.keys(this);let n=t.length,o=!1;for(;n--;){const r=t[n];e&&!Ee(0,this[r],r,e,!0)||(delete this[r],o=!0)}return o}normalize(e){const t=this,n={};return W.forEach(this,((o,r)=>{const i=W.findKey(n,r);if(i)return t[i]=we(o),void delete t[r];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(r):String(r).trim();s!==r&&delete t[r],t[s]=we(o),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return W.forEach(this,((n,o)=>{null!=n&&!1!==n&&(t[o]=e&&W.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[be]=this[be]={accessors:{}}).accessors,n=this.prototype;function o(e){const o=ge(e);t[o]||(!function(e,t){const n=W.toCamelCase(" "+t);["get","set","has"].forEach((o=>{Object.defineProperty(e,o+n,{value:function(e,n,r){return this[o].call(this,t,e,n,r)},configurable:!0})}))}(n,e),t[o]=!0)}return W.isArray(e)?e.forEach(o):o(e),this}}ve.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(ve.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),W.freezeMethods(ve);var Se=ve;function Oe(e,t){const n=this||me,o=t||n,r=Se.from(o.headers);let i=o.data;return W.forEach(e,(function(e){i=e.call(n,i,r.normalize(),t?t.status:void 0)})),r.normalize(),i}function Re(e){return!(!e||!e.__CANCEL__)}function Te(e,t,n){J.call(this,null==e?"canceled":e,J.ERR_CANCELED,t,n),this.name="CanceledError"}function _e(e,t,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new J("Request failed with status code "+n.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}W.inherits(Te,J,{__CANCEL__:!0});const xe=(e,t,n=3)=>{let o=0;const r=function(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=o[s];r||(r=c),n[i]=a,o[i]=c;let d=s,u=0;for(;d!==i;)u+=n[d++],d%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-r<t)return;const f=l&&c-l;return f?Math.round(1e3*u/f):void 0}}(50,250);return function(e,t){let n,o,r=0,i=1e3/t;const s=(t,i=Date.now())=>{r=i,n=null,o&&(clearTimeout(o),o=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-r;a>=i?s(e,t):(n=e,o||(o=setTimeout((()=>{o=null,s(n)}),i-a)))},()=>n&&s(n)]}((n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-o,c=r(a);o=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),n)},Ae=(e,t)=>{const n=null!=e;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},ke=e=>(...t)=>W.asap((()=>e(...t)));var Ce=fe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,fe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,je=fe.hasStandardBrowserEnv?{write(e,t,n,o,r,i){const s=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),W.isString(o)&&s.push("path="+o),W.isString(r)&&s.push("domain="+r),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ne(e,t,n){let o=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&o||0==n?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ue=e=>e instanceof Se?{...e}:e;function Le(e,t){t=t||{};const n={};function o(e,t,n,o){return W.isPlainObject(e)&&W.isPlainObject(t)?W.merge.call({caseless:o},e,t):W.isPlainObject(t)?W.merge({},t):W.isArray(t)?t.slice():t}function r(e,t,n,r){return W.isUndefined(t)?W.isUndefined(e)?void 0:o(void 0,e,0,r):o(e,t,0,r)}function i(e,t){if(!W.isUndefined(t))return o(void 0,t)}function s(e,t){return W.isUndefined(t)?W.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function a(n,r,i){return i in t?o(n,r):i in e?o(void 0,n):void 0}const c={url:i,method:i,data:i,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:(e,t,n)=>r(Ue(e),Ue(t),0,!0)};return W.forEach(Object.keys(Object.assign({},e,t)),(function(o){const i=c[o]||r,s=i(e[o],t[o],o);W.isUndefined(s)&&i!==a||(n[o]=s)})),n}var Pe=e=>{const t=Le({},e);let n,{data:o,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=Se.from(a),t.url=oe(Ne(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),W.isFormData(o))if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(fe.hasStandardBrowserEnv&&(r&&W.isFunction(r)&&(r=r(t)),r||!1!==r&&Ce(t.url))){const e=i&&s&&je.read(s);e&&a.set(i,e)}return t};var Be="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const o=Pe(e);let r=o.data;const i=Se.from(o.headers).normalize();let s,a,c,l,d,{responseType:u,onUploadProgress:f,onDownloadProgress:p}=o;function h(){l&&l(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(s),o.signal&&o.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function y(){if(!m)return;const o=Se.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());_e((function(e){t(e),h()}),(function(e){n(e),h()}),{data:u&&"text"!==u&&"json"!==u?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:o,config:e,request:m}),m=null}m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new J("Request aborted",J.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new J("Network Error",J.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const r=o.transitional||ie;o.timeoutErrorMessage&&(t=o.timeoutErrorMessage),n(new J(t,r.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,m)),m=null},void 0===r&&i.setContentType(null),"setRequestHeader"in m&&W.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),W.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),u&&"json"!==u&&(m.responseType=o.responseType),p&&([c,d]=xe(p,!0),m.addEventListener("progress",c)),f&&m.upload&&([a,l]=xe(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(o.cancelToken||o.signal)&&(s=t=>{m&&(n(!t||t.type?new Te(null,e,m):t),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(s),o.signal&&(o.signal.aborted?s():o.signal.addEventListener("abort",s)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(o.url);b&&-1===fe.protocols.indexOf(b)?n(new J("Unsupported protocol "+b+":",J.ERR_BAD_REQUEST,e)):m.send(r||null)}))};var Fe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,o=new AbortController;const r=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;o.abort(t instanceof J?t:new Te(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,r(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))}),t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)})),e=null)};e.forEach((e=>e.addEventListener("abort",r)));const{signal:a}=o;return a.unsubscribe=()=>W.asap(s),a}};const De=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let o,r=0;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Ie=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},qe=(e,t,n,o)=>{const r=async function*(e,t){for await(const n of Ie(e))yield*De(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,o&&o(e))};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await r.next();if(t)return a(),void e.close();let i=o.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(o))}catch(e){throw a(e),e}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},Me="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,ze=Me&&"function"==typeof ReadableStream,He=Me&&("function"==typeof TextEncoder?(We=new TextEncoder,e=>We.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var We;const Je=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ke=ze&&Je((()=>{let e=!1;const t=new Request(fe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ve=ze&&Je((()=>W.isReadableStream(new Response("").body))),$e={stream:Ve&&(e=>e.body)};var Xe;Me&&(Xe=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!$e[e]&&($e[e]=W.isFunction(Xe[e])?t=>t[e]():(t,n)=>{throw new J(`Response type '${e}' is not supported`,J.ERR_NOT_SUPPORT,n)})})));const Ge=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e)){const t=new Request(fe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return W.isArrayBufferView(e)||W.isArrayBuffer(e)?e.byteLength:(W.isURLSearchParams(e)&&(e+=""),W.isString(e)?(await He(e)).byteLength:void 0)})(t):n};const Qe={http:null,xhr:Be,fetch:Me&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:d,withCredentials:u="same-origin",fetchOptions:f}=Pe(e);l=l?(l+"").toLowerCase():"text";let p,h=Fe([r,i&&i.toAbortSignal()],s);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(c&&Ke&&"get"!==n&&"head"!==n&&0!==(y=await Ge(d,o))){let e,n=new Request(t,{method:"POST",body:o,duplex:"half"});if(W.isFormData(o)&&(e=n.headers.get("content-type"))&&d.setContentType(e),n.body){const[e,t]=Ae(y,xe(ke(c)));o=qe(n.body,65536,e,t)}}W.isString(u)||(u=u?"include":"omit");const r="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:o,duplex:"half",credentials:r?u:void 0});let i=await fetch(p);const s=Ve&&("stream"===l||"response"===l);if(Ve&&(a||s&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=W.toFiniteNumber(i.headers.get("content-length")),[n,o]=a&&Ae(t,xe(ke(a),!0))||[];i=new Response(qe(i.body,65536,n,(()=>{o&&o(),m&&m()})),e)}l=l||"text";let b=await $e[W.findKey($e,l)||"text"](i,e);return!s&&m&&m(),await new Promise(((t,n)=>{_e(t,n,{data:b,headers:Se.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,e,p),{cause:t.cause||t});throw J.from(t,t&&t.code,e,p)}})};W.forEach(Qe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ye=e=>`- ${e}`,Ze=e=>W.isFunction(e)||null===e||!1===e;var et=e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let i=0;i<t;i++){let t;if(n=e[i],o=n,!Ze(n)&&(o=Qe[(t=String(n)).toLowerCase()],void 0===o))throw new J(`Unknown adapter '${t}'`);if(o)break;r[t||"#"+i]=o}if(!o){const e=Object.entries(r).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new J("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ye).join("\n"):" "+Ye(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function tt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Te(null,e)}function nt(e){tt(e),e.headers=Se.from(e.headers),e.data=Oe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return et(e.adapter||me.adapter)(e).then((function(t){return tt(e),t.data=Oe.call(e,e.transformResponse,t),t.headers=Se.from(t.headers),t}),(function(t){return Re(t)||(tt(e),t&&t.response&&(t.response.data=Oe.call(e,e.transformResponse,t.response),t.response.headers=Se.from(t.response.headers))),Promise.reject(t)}))}const ot="1.8.2",rt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{rt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const it={};rt.transitional=function(e,t,n){function o(e,t){return"[Axios v1.8.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,i)=>{if(!1===e)throw new J(o(r," has been removed"+(t?" in "+t:"")),J.ERR_DEPRECATED);return t&&!it[r]&&(it[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,i)}},rt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var st={assertOptions:function(e,t,n){if("object"!=typeof e)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const i=o[r],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new J("option "+i+" must be "+n,J.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new J("Unknown option "+i,J.ERR_BAD_OPTION)}},validators:rt};const at=st.validators;class ct{constructor(e){this.defaults=e,this.interceptors={request:new re,response:new re}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Le(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:r}=t;void 0!==n&&st.assertOptions(n,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean)},!1),null!=o&&(W.isFunction(o)?t.paramsSerializer={serialize:o}:st.assertOptions(o,{encode:at.function,serialize:at.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),st.assertOptions(t,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=r&&W.merge(r.common,r[t.method]);r&&W.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete r[e]})),t.headers=Se.concat(i,r);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[nt.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=s.length;let f=t;for(u=0;u<d;){const e=s[u++],t=s[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=nt.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return oe(Ne((e=Le(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}W.forEach(["delete","get","head","options"],(function(e){ct.prototype[e]=function(t,n){return this.request(Le(n||{},{method:e,url:t,data:(n||{}).data}))}})),W.forEach(["post","put","patch"],(function(e){function t(t){return function(n,o,r){return this.request(Le(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}ct.prototype[e]=t(),ct.prototype[e+"Form"]=t(!0)}));var lt=ct;class dt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const o=new Promise((e=>{n.subscribe(e),t=e})).then(e);return o.cancel=function(){n.unsubscribe(t)},o},e((function(e,o,r){n.reason||(n.reason=new Te(e,o,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new dt((function(t){e=t})),cancel:e}}}var ut=dt;const ft={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(ft).forEach((([e,t])=>{ft[t]=e}));var pt=ft;const ht=function e(t){const n=new lt(t),r=o(lt.prototype.request,n);return W.extend(r,lt.prototype,n,{allOwnKeys:!0}),W.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Le(t,n))},r}(me);ht.Axios=lt,ht.CanceledError=Te,ht.CancelToken=ut,ht.isCancel=Re,ht.VERSION=ot,ht.toFormData=Y,ht.AxiosError=J,ht.Cancel=ht.CanceledError,ht.all=function(e){return Promise.all(e)},ht.spread=function(e){return function(t){return e.apply(null,t)}},ht.isAxiosError=function(e){return W.isObject(e)&&!0===e.isAxiosError},ht.mergeConfig=Le,ht.AxiosHeaders=Se,ht.formToJSON=e=>pe(W.isHTMLForm(e)?new FormData(e):e),ht.getAdapter=et,ht.HttpStatusCode=pt,ht.default=ht,e.exports=ht},672:e=>{e.exports=()=>{function e(){let e=document.createElement("div"),t=document.createElement("div");e.setAttribute("id","mono-connect-app-loader"),e.classList.add("app-loader"),t.classList.add("app-loader__spinner");for(let e=0;e<12;e++){let e=document.createElement("div");t.appendChild(e)}return e.appendChild(t),e}return{openWidget:function(){var e=document.getElementById("mono-connect--widget-div"),t=document.getElementById("mono-connect-app-loader"),n=document.getElementById("mono-connect--frame-id");e.style.visibility="visible",e.style.display="flex",t.style.display="block",setTimeout((()=>{!function(){var e=document.getElementById("mono-connect--widget-div"),t=document.getElementById("mono-connect--frame-id");e.style.display="flex",t.style.display="block",e.style.visibility="visible",t.style.visibility="visible"}(),n.focus({preventScroll:!1}),e.focus({preventScroll:!1});let t=new Event("message"),o={type:"mono.connect.widget_opened",data:{timestamp:Date.now()}};t.data=Object.assign({},o),window.dispatchEvent(t)}),2e3)},closeWidget:function(){var e,t;e=document.getElementById("mono-connect--widget-div"),t=document.getElementById("mono-connect--frame-id"),e.style.display="none",t.style.display="none",e.style.visibility="hidden",t.style.visibility="hidden"},createLoader:e,addStyle:function(){let e=document.createElement("style");e.type="text/css",e.innerText=o,document.head.appendChild(e)},init:function(o){document.getElementById("mono-connect--widget-div")&&document.getElementById("mono-connect--frame-id")&&document.getElementById("mono-connect--widget-div").remove();const{key:r,onload:i,qs:s,onevent:a}=o,c=["data","selectedInstitution"];var l=new URL("https://connect.mono.co");l.searchParams.set("key",r),l.searchParams.set("referrer",window.location.href),l.searchParams.set("version","2023-12-14"),Object.keys(s).map((e=>{if(c.includes(e)){const t=JSON.stringify(s[e]);return l.searchParams.set(e,t)}l.searchParams.set(e,s[e])}));var d=document.createElement("div");d.setAttribute("id","mono-connect--widget-div"),d.setAttribute("style",t),document.body.insertBefore(d,document.body.childNodes[0]);var u=document.createElement("IFRAME");u.src=`${l.href}`,u.setAttribute("style",n),u.setAttribute("id","mono-connect--frame-id"),u.setAttribute("allowfullscreen","true"),u.setAttribute("frameborder",0),u.setAttribute("title","Mono connect"),u.setAttribute("sandbox","allow-forms allow-scripts allow-same-origin allow-top-navigation-by-user-activation allow-popups"),u.setAttribute("allow","clipboard-write; clipboard-read; camera"),u.onload=function(){var e=document.getElementById("mono-connect-app-loader");"visible"===u.style.visibility&&(e.style.display="none"),i();let t=new Event("message"),n={type:"mono.connect.widget_loaded",data:{timestamp:Date.now()}};t.data=Object.assign({},n),window.dispatchEvent(t),a("LOADED",t.data.data)};var f=e();document.getElementById("mono-connect--widget-div").appendChild(f),document.getElementById("mono-connect--widget-div").appendChild(u)}}};const t="position:fixed;overflow: hidden;display: none;justify-content: center;align-items: center;z-index: 999999999;height: 100%;width: 100%;color: transparent;background: rgba(0, 0, 0, 0.6);visibility:hidden;margin: 0;top:0;right:0;bottom:0;left:0;",n="position: fixed;display: none;overflow: hidden;z-index: 999999999;width: 100%;height: 100%;transition: opacity 0.3s ease 0s;visibility:hidden;margin: 0;top:0;right:0;bottom:0;left:0;",o=".app-loader {\n text-align: center;\n color: white;\n margin-right: -30px;\n width: 100%;\n position: fixed;\n}\n\n@-webkit-keyframes app-loader__spinner {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n\n.app-loader__spinner {\n position: relative;\n display: inline-block;\n width: fit-content;\n}\n\n.app-loader__spinner div {\n position: absolute;\n -webkit-animation: app-loader__spinner linear 1s infinite;\n animation: app-loader__spinner linear 1s infinite;\n background: white;\n width: 10px;\n height: 30px;\n border-radius: 40%;\n -webkit-transform-origin: 5px 65px;\n transform-origin: 5px 65px;\n}\n\n.app-loader__spinner div:nth-child(1) {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n -webkit-animation-delay: -0.916666666666667s;\n animation-delay: -0.916666666666667s;\n}\n\n.app-loader__spinner div:nth-child(2) {\n -webkit-transform: rotate(30deg);\n transform: rotate(30deg);\n -webkit-animation-delay: -0.833333333333333s;\n animation-delay: -0.833333333333333s;\n}\n\n.app-loader__spinner div:nth-child(3) {\n -webkit-transform: rotate(60deg);\n transform: rotate(60deg);\n -webkit-animation-delay: -0.75s;\n animation-delay: -0.75s;\n}\n\n.app-loader__spinner div:nth-child(4) {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n -webkit-animation-delay: -0.666666666666667s;\n animation-delay: -0.666666666666667s;\n}\n\n.app-loader__spinner div:nth-child(5) {\n -webkit-transform: rotate(120deg);\n transform: rotate(120deg);\n -webkit-animation-delay: -0.583333333333333s;\n animation-delay: -0.583333333333333s;\n}\n\n.app-loader__spinner div:nth-child(6) {\n -webkit-transform: rotate(150deg);\n transform: rotate(150deg);\n -webkit-animation-delay: -0.5s;\n animation-delay: -0.5s;\n}\n\n.app-loader__spinner div:nth-child(7) {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n -webkit-animation-delay: -0.416666666666667s;\n animation-delay: -0.416666666666667s;\n}\n\n.app-loader__spinner div:nth-child(8) {\n -webkit-transform: rotate(210deg);\n transform: rotate(210deg);\n -webkit-animation-delay: -0.333333333333333s;\n animation-delay: -0.333333333333333s;\n}\n\n.app-loader__spinner div:nth-child(9) {\n -webkit-transform: rotate(240deg);\n transform: rotate(240deg);\n -webkit-animation-delay: -0.25s;\n animation-delay: -0.25s;\n}\n\n.app-loader__spinner div:nth-child(10) {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n -webkit-animation-delay: -0.166666666666667s;\n animation-delay: -0.166666666666667s;\n}\n\n.app-loader__spinner div:nth-child(11) {\n -webkit-transform: rotate(300deg);\n transform: rotate(300deg);\n -webkit-animation-delay: -0.083333333333333s;\n animation-delay: -0.083333333333333s;\n}\n\n.app-loader__spinner div:nth-child(12) {\n -webkit-transform: rotate(330deg);\n transform: rotate(330deg);\n -webkit-animation-delay: 0s;\n animation-delay: 0s;\n}\n\n.app-loader__spinner {\n -webkit-transform: translate(-20px, -20px) scale(0.2) translate(20px, 20px);\n transform: translate(-20px, -20px) scale(0.2) translate(20px, 20px);\n}\n"}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(672),n(187)})()));