@assembled-brands/frontend 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/pages/account-recovery-complete/index.js +7 -7
  2. package/dist/pages/account-recovery-complete/index.js.map +2 -2
  3. package/dist/pages/account-recovery-initiate/index.js +6 -6
  4. package/dist/pages/account-recovery-initiate/index.js.map +2 -2
  5. package/dist/pages/account-setup-finish-verification/index.js +7 -7
  6. package/dist/pages/account-setup-finish-verification/index.js.map +2 -2
  7. package/dist/pages/claim-account/index.js +6 -6
  8. package/dist/pages/claim-account/index.js.map +2 -2
  9. package/dist/pages/cold-lead-register/index.js +6 -6
  10. package/dist/pages/cold-lead-register/index.js.map +2 -2
  11. package/dist/pages/finance-docs-accounts-inventory/index.js +6 -6
  12. package/dist/pages/finance-docs-accounts-inventory/index.js.map +3 -3
  13. package/dist/pages/finance-docs-ecommerce-performance/index.js +6 -6
  14. package/dist/pages/finance-docs-ecommerce-performance/index.js.map +3 -3
  15. package/dist/pages/finance-docs-financial-reports/index.js +6 -6
  16. package/dist/pages/finance-docs-financial-reports/index.js.map +3 -3
  17. package/dist/pages/finance-docs-team-ownership/index.js +6 -6
  18. package/dist/pages/finance-docs-team-ownership/index.js.map +3 -3
  19. package/dist/pages/financial-company-profile/index.js +6 -6
  20. package/dist/pages/financial-company-profile/index.js.map +3 -3
  21. package/dist/pages/financial-financial-overview/index.js +6 -6
  22. package/dist/pages/financial-financial-overview/index.js.map +3 -3
  23. package/dist/pages/invite-team-members/index.js +6 -6
  24. package/dist/pages/invite-team-members/index.js.map +3 -3
  25. package/dist/pages/login/index.js +8 -8
  26. package/dist/pages/login/index.js.map +2 -2
  27. package/dist/pages/onboarding-step-1/index.js +6 -6
  28. package/dist/pages/onboarding-step-1/index.js.map +2 -2
  29. package/dist/pages/onboarding-step-2/index.js +6 -6
  30. package/dist/pages/onboarding-step-2/index.js.map +2 -2
  31. package/dist/pages/onboarding-step-3/index.js +6 -6
  32. package/dist/pages/onboarding-step-3/index.js.map +2 -2
  33. package/dist/pages/team-acknowledge-invitation/index.js +6 -6
  34. package/dist/pages/team-acknowledge-invitation/index.js.map +2 -2
  35. package/dist/pages/team-members/index.js +6 -6
  36. package/dist/pages/team-members/index.js.map +3 -3
  37. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- var ar=Object.defineProperty;var cr=(e,t)=>{for(var r in t)ar(e,r,{get:t[r],enumerable:!0})};function ee(e,t){return function(){return e.apply(t,arguments)}}var{toString:lr}=Object.prototype,{getPrototypeOf:Ue}=Object,{iterator:ye,toStringTag:pt}=Symbol,Ee=(e=>t=>{let r=lr.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),P=e=>(e=e.toLowerCase(),t=>Ee(t)===e),be=e=>t=>typeof t===e,{isArray:V}=Array,J=be("undefined");function te(e){return e!==null&&!J(e)&&e.constructor!==null&&!J(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var mt=P("ArrayBuffer");function ur(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mt(e.buffer),t}var fr=be("string"),O=be("function"),ht=be("number"),re=e=>e!==null&&typeof e=="object",dr=e=>e===!0||e===!1,ge=e=>{if(Ee(e)!=="object")return!1;let t=Ue(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(pt in e)&&!(ye in e)},pr=e=>{if(!re(e)||te(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},mr=P("Date"),hr=P("File"),gr=P("Blob"),yr=P("FileList"),Er=e=>re(e)&&O(e.pipe),br=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||O(e.append)&&((t=Ee(e))==="formdata"||t==="object"&&O(e.toString)&&e.toString()==="[object FormData]"))},xr=P("URLSearchParams"),[wr,vr,Rr,Ar]=["ReadableStream","Request","Response","Headers"].map(P),Sr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),V(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(te(e))return;let i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length,c;for(n=0;n<s;n++)c=i[n],t.call(null,e[c],c,e)}}function gt(e,t){if(te(e))return null;t=t.toLowerCase();let r=Object.keys(e),n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}var z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,yt=e=>!J(e)&&e!==z;function Fe(){let{caseless:e,skipUndefined:t}=yt(this)&&this||{},r={},n=(o,i)=>{let s=e&&gt(r,i)||i;ge(r[s])&&ge(o)?r[s]=Fe(r[s],o):ge(o)?r[s]=Fe({},o):V(o)?r[s]=o.slice():(!t||!J(o))&&(r[s]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&ne(arguments[o],n);return r}var Tr=(e,t,r,{allOwnKeys:n}={})=>(ne(t,(o,i)=>{r&&O(o)?e[i]=ee(o,r):e[i]=o},{allOwnKeys:n}),e),Cr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Or=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Lr=(e,t,r,n)=>{let o,i,s,c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!n||n(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=r!==!1&&Ue(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},_r=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},Pr=e=>{if(!e)return null;if(V(e))return e;let t=e.length;if(!ht(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Dr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ue(Uint8Array)),Fr=(e,t)=>{let n=(e&&e[ye]).call(e),o;for(;(o=n.next())&&!o.done;){let i=o.value;t.call(e,i[0],i[1])}},Ur=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Nr=P("HTMLFormElement"),kr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),dt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Br=P("RegExp"),Et=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};ne(r,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(n[i]=s||o)}),Object.defineProperties(e,n)},Mr=e=>{Et(e,(t,r)=>{if(O(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(O(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Hr=(e,t)=>{let r={},n=o=>{o.forEach(i=>{r[i]=!0})};return V(e)?n(e):n(String(e).split(t)),r},Ir=()=>{},qr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function jr(e){return!!(e&&O(e.append)&&e[pt]==="FormData"&&e[ye])}var zr=e=>{let t=new Array(10),r=(n,o)=>{if(re(n)){if(t.indexOf(n)>=0)return;if(te(n))return n;if(!("toJSON"in n)){t[o]=n;let i=V(n)?[]:{};return ne(n,(s,c)=>{let m=r(s,o+1);!J(m)&&(i[c]=m)}),t[o]=void 0,i}}return n};return r(e,0)},Wr=P("AsyncFunction"),$r=e=>e&&(re(e)||O(e))&&O(e.then)&&O(e.catch),bt=((e,t)=>e?setImmediate:t?((r,n)=>(z.addEventListener("message",({source:o,data:i})=>{o===z&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),z.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",O(z.postMessage)),Jr=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||bt,Vr=e=>e!=null&&O(e[ye]),a={isArray:V,isArrayBuffer:mt,isBuffer:te,isFormData:br,isArrayBufferView:ur,isString:fr,isNumber:ht,isBoolean:dr,isObject:re,isPlainObject:ge,isEmptyObject:pr,isReadableStream:wr,isRequest:vr,isResponse:Rr,isHeaders:Ar,isUndefined:J,isDate:mr,isFile:hr,isBlob:gr,isRegExp:Br,isFunction:O,isStream:Er,isURLSearchParams:xr,isTypedArray:Dr,isFileList:yr,forEach:ne,merge:Fe,extend:Tr,trim:Sr,stripBOM:Cr,inherits:Or,toFlatObject:Lr,kindOf:Ee,kindOfTest:P,endsWith:_r,toArray:Pr,forEachEntry:Fr,matchAll:Ur,isHTMLForm:Nr,hasOwnProperty:dt,hasOwnProp:dt,reduceDescriptors:Et,freezeMethods:Mr,toObjectSet:Hr,toCamelCase:kr,noop:Ir,toFiniteNumber:qr,findKey:gt,global:z,isContextDefined:yt,isSpecCompliantForm:jr,toJSONObject:zr,isAsyncFn:Wr,isThenable:$r,setImmediate:bt,asap:Jr,isIterable:Vr};function K(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}a.inherits(K,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:a.toJSONObject(this.config),code:this.code,status:this.status}}});var xt=K.prototype,wt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{wt[e]={value:e}});Object.defineProperties(K,wt);Object.defineProperty(xt,"isAxiosError",{value:!0});K.from=(e,t,r,n,o,i)=>{let s=Object.create(xt);a.toFlatObject(e,s,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");let c=e&&e.message?e.message:"Error",m=t==null&&e?e.code:t;return K.call(s,c,m,r,n,o),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};var g=K;var xe=null;function Ne(e){return a.isPlainObject(e)||a.isArray(e)}function Rt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function vt(e,t,r){return e?e.concat(t).map(function(o,i){return o=Rt(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Kr(e){return a.isArray(e)&&!e.some(Ne)}var Gr=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function Xr(e,t,r){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new(xe||FormData),r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!a.isUndefined(p[f])});let n=r.metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,m=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(a.isBoolean(d))return d.toString();if(!m&&a.isBlob(d))throw new g("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?m&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,f,p){let E=d;if(d&&!p&&typeof d=="object"){if(a.endsWith(f,"{}"))f=n?f:f.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&Kr(d)||(a.isFileList(d)||a.endsWith(f,"[]"))&&(E=a.toArray(d)))return f=Rt(f),E.forEach(function(b,R){!(a.isUndefined(b)||b===null)&&t.append(s===!0?vt([f],R,i):s===null?f:f+"[]",u(b))}),!1}return Ne(d)?!0:(t.append(vt(p,f,i),u(d)),!1)}let h=[],y=Object.assign(Gr,{defaultVisitor:l,convertValue:u,isVisitable:Ne});function x(d,f){if(!a.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+f.join("."));h.push(d),a.forEach(d,function(E,v){(!(a.isUndefined(E)||E===null)&&o.call(t,E,a.isString(v)?v.trim():v,f,y))===!0&&x(E,f?f.concat(v):[v])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return x(e),t}var q=Xr;function At(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function St(e,t){this._pairs=[],e&&q(e,this,t)}var Tt=St.prototype;Tt.append=function(t,r){this._pairs.push([t,r])};Tt.toString=function(t){let r=t?function(n){return t.call(this,n,At)}:At;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};var we=St;function Qr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function oe(e,t,r){if(!t)return e;let n=r&&r.encode||Qr;a.isFunction(r)&&(r={serialize:r});let o=r&&r.serialize,i;if(o?i=o(t,r):i=a.isURLSearchParams(t)?t.toString():new we(t,r).toString(n),i){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var ke=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(n){n!==null&&t(n)})}},Be=ke;var ve={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Ct=typeof URLSearchParams<"u"?URLSearchParams:we;var Ot=typeof FormData<"u"?FormData:null;var Lt=typeof Blob<"u"?Blob:null;var _t={isBrowser:!0,classes:{URLSearchParams:Ct,FormData:Ot,Blob:Lt},protocols:["http","https","file","blob","url","data"]};var Ie={};cr(Ie,{hasBrowserEnv:()=>He,hasStandardBrowserEnv:()=>Yr,hasStandardBrowserWebWorkerEnv:()=>Zr,navigator:()=>Me,origin:()=>en});var He=typeof window<"u"&&typeof document<"u",Me=typeof navigator=="object"&&navigator||void 0,Yr=He&&(!Me||["ReactNative","NativeScript","NS"].indexOf(Me.product)<0),Zr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",en=He&&window.location.href||"http://localhost";var w={...Ie,..._t};function qe(e,t){return q(e,new w.classes.URLSearchParams,{visitor:function(r,n,o,i){return w.isNode&&a.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function tn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rn(e){let t={},r=Object.keys(e),n,o=r.length,i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function nn(e){function t(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;let c=Number.isFinite(+s),m=i>=r.length;return s=!s&&a.isArray(o)?o.length:s,m?(a.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!c):((!o[s]||!a.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],i)&&a.isArray(o[s])&&(o[s]=rn(o[s])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){let r={};return a.forEachEntry(e,(n,o)=>{t(tn(n),o,r,0)}),r}return null}var Re=nn;function on(e,t,r){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var je={transitional:ve,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return o?JSON.stringify(Re(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return qe(t,this.formSerializer).toString();if((c=a.isFileList(t))||n.indexOf("multipart/form-data")>-1){let m=this.env&&this.env.FormData;return q(c?{"files[]":t}:t,m&&new m,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),on(t)):t}],transformResponse:[function(t){let r=this.transitional||je.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(n&&!this.responseType||o)){let s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(s)throw c.name==="SyntaxError"?g.from(c,g.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:w.classes.FormData,Blob:w.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{je.headers[e]={}});var G=je;var sn=a.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"]),Pt=e=>{let t={},r,n,o;return e&&e.split(`
2
- `).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&sn[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};var Dt=Symbol("internals");function se(e){return e&&String(e).trim().toLowerCase()}function Ae(e){return e===!1||e==null?e:a.isArray(e)?e.map(Ae):String(e)}function an(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}var cn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ze(e,t,r,n,o){if(a.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!a.isString(t)){if(a.isString(n))return t.indexOf(n)!==-1;if(a.isRegExp(n))return n.test(t)}}function ln(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function un(e,t){let r=a.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,i,s){return this[n].call(this,t,o,i,s)},configurable:!0})})}var X=class{constructor(t){t&&this.set(t)}set(t,r,n){let o=this;function i(c,m,u){let l=se(m);if(!l)throw new Error("header name must be a non-empty string");let h=a.findKey(o,l);(!h||o[h]===void 0||u===!0||u===void 0&&o[h]!==!1)&&(o[h||m]=Ae(c))}let s=(c,m)=>a.forEach(c,(u,l)=>i(u,l,m));if(a.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(a.isString(t)&&(t=t.trim())&&!cn(t))s(Pt(t),r);else if(a.isObject(t)&&a.isIterable(t)){let c={},m,u;for(let l of t){if(!a.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[u=l[0]]=(m=c[u])?a.isArray(m)?[...m,l[1]]:[m,l[1]]:l[1]}s(c,r)}else t!=null&&i(r,t,n);return this}get(t,r){if(t=se(t),t){let n=a.findKey(this,t);if(n){let o=this[n];if(!r)return o;if(r===!0)return an(o);if(a.isFunction(r))return r.call(this,o,n);if(a.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=se(t),t){let n=a.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||ze(this,this[n],n,r)))}return!1}delete(t,r){let n=this,o=!1;function i(s){if(s=se(s),s){let c=a.findKey(n,s);c&&(!r||ze(n,n[c],c,r))&&(delete n[c],o=!0)}}return a.isArray(t)?t.forEach(i):i(t),o}clear(t){let r=Object.keys(this),n=r.length,o=!1;for(;n--;){let i=r[n];(!t||ze(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){let r=this,n={};return a.forEach(this,(o,i)=>{let s=a.findKey(n,i);if(s){r[s]=Ae(o),delete r[i];return}let c=t?ln(i):String(i).trim();c!==i&&delete r[i],r[c]=Ae(o),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return a.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&a.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){let n=(this[Dt]=this[Dt]={accessors:{}}).accessors,o=this.prototype;function i(s){let c=se(s);n[c]||(un(o,s),n[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};X.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(X.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});a.freezeMethods(X);var S=X;function ie(e,t){let r=this||G,n=t||r,o=S.from(n.headers),i=n.data;return a.forEach(e,function(c){i=c.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ae(e){return!!(e&&e.__CANCEL__)}function Ft(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}a.inherits(Ft,g,{__CANCEL__:!0});var N=Ft;function ce(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function We(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fn(e,t){e=e||10;let r=new Array(e),n=new Array(e),o=0,i=0,s;return t=t!==void 0?t:1e3,function(m){let u=Date.now(),l=n[i];s||(s=u),r[o]=m,n[o]=u;let h=i,y=0;for(;h!==o;)y+=r[h++],h=h%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;let x=l&&u-l;return x?Math.round(y*1e3/x):void 0}}var Ut=fn;function dn(e,t){let r=0,n=1e3/t,o,i,s=(u,l=Date.now())=>{r=l,o=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{let l=Date.now(),h=l-r;h>=n?s(u,l):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-h)))},()=>o&&s(o)]}var Nt=dn;var Q=(e,t,r=3)=>{let n=0,o=Ut(50,250);return Nt(i=>{let s=i.loaded,c=i.lengthComputable?i.total:void 0,m=s-n,u=o(m),l=s<=c;n=s;let h={loaded:s,total:c,progress:c?s/c:void 0,bytes:m,rate:u||void 0,estimated:u&&c&&l?(c-s)/u:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},r)},$e=(e,t)=>{let r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Je=e=>(...t)=>a.asap(()=>e(...t));var kt=w.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,w.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(w.origin),w.navigator&&/(msie|trident)/i.test(w.navigator.userAgent)):()=>!0;var Bt=w.hasStandardBrowserEnv?{write(e,t,r,n,o,i,s){if(typeof document>"u")return;let c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),a.isString(n)&&c.push(`path=${n}`),a.isString(o)&&c.push(`domain=${o}`),i===!0&&c.push("secure"),a.isString(s)&&c.push(`SameSite=${s}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;let t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ve(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ke(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function le(e,t,r){let n=!Ve(t);return e&&(n||r==!1)?Ke(e,t):t}var Mt=e=>e instanceof S?{...e}:e;function D(e,t){t=t||{};let r={};function n(u,l,h,y){return a.isPlainObject(u)&&a.isPlainObject(l)?a.merge.call({caseless:y},u,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function o(u,l,h,y){if(a.isUndefined(l)){if(!a.isUndefined(u))return n(void 0,u,h,y)}else return n(u,l,h,y)}function i(u,l){if(!a.isUndefined(l))return n(void 0,l)}function s(u,l){if(a.isUndefined(l)){if(!a.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function c(u,l,h){if(h in t)return n(u,l);if(h in e)return n(void 0,u)}let m={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:c,headers:(u,l,h)=>o(Mt(u),Mt(l),h,!0)};return a.forEach(Object.keys({...e,...t}),function(l){let h=m[l]||o,y=h(e[l],t[l],l);a.isUndefined(y)&&h!==c||(r[l]=y)}),r}var Se=e=>{let t=D({},e),{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:c}=t;if(t.headers=s=S.from(s),t.url=oe(le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(r)){if(w.hasStandardBrowserEnv||w.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(a.isFunction(r.getHeaders)){let m=r.getHeaders(),u=["content-type","content-length"];Object.entries(m).forEach(([l,h])=>{u.includes(l.toLowerCase())&&s.set(l,h)})}}if(w.hasStandardBrowserEnv&&(n&&a.isFunction(n)&&(n=n(t)),n||n!==!1&&kt(t.url))){let m=o&&i&&Bt.read(i);m&&s.set(o,m)}return t};var pn=typeof XMLHttpRequest<"u",Ht=pn&&function(e){return new Promise(function(r,n){let o=Se(e),i=o.data,s=S.from(o.headers).normalize(),{responseType:c,onUploadProgress:m,onDownloadProgress:u}=o,l,h,y,x,d;function f(){x&&x(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function E(){if(!p)return;let b=S.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),L={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:b,config:e,request:p};ce(function(C){r(C),f()},function(C){n(C),f()},L),p=null}"onloadend"in p?p.onloadend=E:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(E)},p.onabort=function(){p&&(n(new g("Request aborted",g.ECONNABORTED,e,p)),p=null)},p.onerror=function(R){let L=R&&R.message?R.message:"Network Error",M=new g(L,g.ERR_NETWORK,e,p);M.event=R||null,n(M),p=null},p.ontimeout=function(){let R=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",L=o.transitional||ve;o.timeoutErrorMessage&&(R=o.timeoutErrorMessage),n(new g(R,L.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,p)),p=null},i===void 0&&s.setContentType(null),"setRequestHeader"in p&&a.forEach(s.toJSON(),function(R,L){p.setRequestHeader(L,R)}),a.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),c&&c!=="json"&&(p.responseType=o.responseType),u&&([y,d]=Q(u,!0),p.addEventListener("progress",y)),m&&p.upload&&([h,x]=Q(m),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",x)),(o.cancelToken||o.signal)&&(l=b=>{p&&(n(!b||b.type?new N(null,e,p):b),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));let v=We(o.url);if(v&&w.protocols.indexOf(v)===-1){n(new g("Unsupported protocol "+v+":",g.ERR_BAD_REQUEST,e));return}p.send(i||null)})};var mn=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o,i=function(u){if(!o){o=!0,c();let l=u instanceof Error?u:this.reason;n.abort(l instanceof g?l:new N(l instanceof Error?l.message:l))}},s=t&&setTimeout(()=>{s=null,i(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t),c=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));let{signal:m}=n;return m.unsubscribe=()=>a.asap(c),m}},It=mn;var hn=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},gn=async function*(e,t){for await(let r of yn(e))yield*hn(r,t)},yn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Ge=(e,t,r,n)=>{let o=gn(e,t),i=0,s,c=m=>{s||(s=!0,n&&n(m))};return new ReadableStream({async pull(m){try{let{done:u,value:l}=await o.next();if(u){c(),m.close();return}let h=l.byteLength;if(r){let y=i+=h;r(y)}m.enqueue(new Uint8Array(l))}catch(u){throw c(u),u}},cancel(m){return c(m),o.return()}},{highWaterMark:2})};var qt=64*1024,{isFunction:Te}=a,En=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:jt,TextEncoder:zt}=a.global,Wt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},bn=e=>{e=a.merge.call({skipUndefined:!0},En,e);let{fetch:t,Request:r,Response:n}=e,o=t?Te(t):typeof fetch=="function",i=Te(r),s=Te(n);if(!o)return!1;let c=o&&Te(jt),m=o&&(typeof zt=="function"?(d=>f=>d.encode(f))(new zt):async d=>new Uint8Array(await new r(d).arrayBuffer())),u=i&&c&&Wt(()=>{let d=!1,f=new r(w.origin,{body:new jt,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!f}),l=s&&c&&Wt(()=>a.isReadableStream(new n("").body)),h={stream:l&&(d=>d.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!h[d]&&(h[d]=(f,p)=>{let E=f&&f[d];if(E)return E.call(f);throw new g(`Response type '${d}' is not supported`,g.ERR_NOT_SUPPORT,p)})});let y=async d=>{if(d==null)return 0;if(a.isBlob(d))return d.size;if(a.isSpecCompliantForm(d))return(await new r(w.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(a.isArrayBufferView(d)||a.isArrayBuffer(d))return d.byteLength;if(a.isURLSearchParams(d)&&(d=d+""),a.isString(d))return(await m(d)).byteLength},x=async(d,f)=>{let p=a.toFiniteNumber(d.getContentLength());return p??y(f)};return async d=>{let{url:f,method:p,data:E,signal:v,cancelToken:b,timeout:R,onDownloadProgress:L,onUploadProgress:M,responseType:C,headers:_,withCredentials:F="same-origin",fetchOptions:pe}=Se(d),at=t||fetch;C=C?(C+"").toLowerCase():"text";let me=It([v,b&&b.toAbortSignal()],R),Z=null,j=me&&me.unsubscribe&&(()=>{me.unsubscribe()}),ct;try{if(M&&u&&p!=="get"&&p!=="head"&&(ct=await x(_,E))!==0){let I=new r(f,{method:"POST",body:E,duplex:"half"}),$;if(a.isFormData(E)&&($=I.headers.get("content-type"))&&_.setContentType($),I.body){let[De,he]=$e(ct,Q(Je(M)));E=Ge(I.body,qt,De,he)}}a.isString(F)||(F=F?"include":"omit");let U=i&&"credentials"in r.prototype,lt={...pe,signal:me,method:p.toUpperCase(),headers:_.normalize().toJSON(),body:E,duplex:"half",credentials:U?F:void 0};Z=i&&new r(f,lt);let H=await(i?at(Z,pe):at(f,lt)),ut=l&&(C==="stream"||C==="response");if(l&&(L||ut&&j)){let I={};["status","statusText","headers"].forEach(ft=>{I[ft]=H[ft]});let $=a.toFiniteNumber(H.headers.get("content-length")),[De,he]=L&&$e($,Q(Je(L),!0))||[];H=new n(Ge(H.body,qt,De,()=>{he&&he(),j&&j()}),I)}C=C||"text";let ir=await h[a.findKey(h,C)||"text"](H,d);return!ut&&j&&j(),await new Promise((I,$)=>{ce(I,$,{data:ir,headers:S.from(H.headers),status:H.status,statusText:H.statusText,config:d,request:Z})})}catch(U){throw j&&j(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,d,Z),{cause:U.cause||U}):g.from(U,U&&U.code,d,Z)}}},xn=new Map,Xe=e=>{let t=e&&e.env||{},{fetch:r,Request:n,Response:o}=t,i=[n,o,r],s=i.length,c=s,m,u,l=xn;for(;c--;)m=i[c],u=l.get(m),u===void 0&&l.set(m,u=c?new Map:bn(t)),l=u;return u},Ms=Xe();var Qe={http:xe,xhr:Ht,fetch:{get:Xe}};a.forEach(Qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var $t=e=>`- ${e}`,vn=e=>a.isFunction(e)||e===null||e===!1;function Rn(e,t){e=a.isArray(e)?e:[e];let{length:r}=e,n,o,i={};for(let s=0;s<r;s++){n=e[s];let c;if(o=n,!vn(n)&&(o=Qe[(c=String(n)).toLowerCase()],o===void 0))throw new g(`Unknown adapter '${c}'`);if(o&&(a.isFunction(o)||(o=o.get(t))))break;i[c||"#"+s]=o}if(!o){let s=Object.entries(i).map(([m,u])=>`adapter ${m} `+(u===!1?"is not supported by the environment":"is not available in the build")),c=r?s.length>1?`since :
4
- `+s.map($t).join(`
5
- `):" "+$t(s[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}var Ce={getAdapter:Rn,adapters:Qe};function Ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new N(null,e)}function Oe(e){return Ye(e),e.headers=S.from(e.headers),e.data=ie.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ce.getAdapter(e.adapter||G.adapter,e)(e).then(function(n){return Ye(e),n.data=ie.call(e,e.transformResponse,n),n.headers=S.from(n.headers),n},function(n){return ae(n)||(Ye(e),n&&n.response&&(n.response.data=ie.call(e,e.transformResponse,n.response),n.response.headers=S.from(n.response.headers))),Promise.reject(n)})}var Le="1.13.2";var _e={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{_e[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var Jt={};_e.transitional=function(t,r,n){function o(i,s){return"[Axios v"+Le+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,c)=>{if(t===!1)throw new g(o(s," has been removed"+(r?" in "+r:"")),g.ERR_DEPRECATED);return r&&!Jt[s]&&(Jt[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,c):!0}};_e.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function An(e,t,r){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),o=n.length;for(;o-- >0;){let i=n[o],s=t[i];if(s){let c=e[i],m=c===void 0||s(c,i,e);if(m!==!0)throw new g("option "+i+" must be "+m,g.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new g("Unknown option "+i,g.ERR_BAD_OPTION)}}var ue={assertOptions:An,validators:_e};var k=ue.validators,Y=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Be,response:new Be}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;let i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
- `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=D(this.defaults,r);let{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&ue.assertOptions(n,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean)},!1),o!=null&&(a.isFunction(o)?r.paramsSerializer={serialize:o}:ue.assertOptions(o,{encode:k.function,serialize:k.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ue.assertOptions(r,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&a.merge(i.common,i[r.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=S.concat(s,i);let c=[],m=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(m=m&&f.synchronous,c.unshift(f.fulfilled,f.rejected))});let u=[];this.interceptors.response.forEach(function(f){u.push(f.fulfilled,f.rejected)});let l,h=0,y;if(!m){let d=[Oe.bind(this),void 0];for(d.unshift(...c),d.push(...u),y=d.length,l=Promise.resolve(r);h<y;)l=l.then(d[h++],d[h++]);return l}y=c.length;let x=r;for(;h<y;){let d=c[h++],f=c[h++];try{x=d(x)}catch(p){f.call(this,p);break}}try{l=Oe.call(this,x)}catch(d){return Promise.reject(d)}for(h=0,y=u.length;h<y;)l=l.then(u[h++],u[h++]);return l}getUri(t){t=D(this.defaults,t);let r=le(t.baseURL,t.url,t.allowAbsoluteUrls);return oe(r,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){Y.prototype[t]=function(r,n){return this.request(D(n||{},{method:t,url:r,data:(n||{}).data}))}});a.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,c){return this.request(D(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Y.prototype[t]=r(),Y.prototype[t+"Form"]=r(!0)});var fe=Y;var Ze=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});let n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i,s=new Promise(c=>{n.subscribe(c),i=c}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,c){n.reason||(n.reason=new N(i,s,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e(function(o){t=o}),cancel:t}}},Vt=Ze;function et(e){return function(r){return e.apply(null,r)}}function tt(e){return a.isObject(e)&&e.isAxiosError===!0}var rt={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(rt).forEach(([e,t])=>{rt[t]=e});var Kt=rt;function Gt(e){let t=new fe(e),r=ee(fe.prototype.request,t);return a.extend(r,fe.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return Gt(D(e,o))},r}var A=Gt(G);A.Axios=fe;A.CanceledError=N;A.CancelToken=Vt;A.isCancel=ae;A.VERSION=Le;A.toFormData=q;A.AxiosError=g;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=et;A.isAxiosError=tt;A.mergeConfig=D;A.AxiosHeaders=S;A.formToJSON=e=>Re(a.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Ce.getAdapter;A.HttpStatusCode=Kt;A.default=A;var Pe=A;var{Axios:Ni,AxiosError:ki,CanceledError:Bi,isCancel:Mi,CancelToken:Hi,VERSION:Ii,all:qi,Cancel:ji,isAxiosError:zi,spread:Wi,toFormData:$i,AxiosHeaders:Ji,HttpStatusCode:Vi,formToJSON:Ki,getAdapter:Gi,mergeConfig:Xi}=Pe;var nt=localStorage.getItem("api-mode"),Sn="http://127.0.0.1:8787",Tn="https://assembled-brands-dev.crystal-e8a.workers.dev",B={apiBaseUrl:nt==="local"?Sn:Tn,apiVersion:"/api/v1",accessTokenPersistStrategy:"cookie",TOKEN_NAME_IN_STORAGE:"accessToken",TOKEN_TYPE:"Bearer",REQUEST_HEADER_AUTH_KEY:"Authorization"},W=(e,t=!1)=>{let r="";nt==="local"&&!t?r=`/dev${e}`:nt==="remote-dev"&&!t?r=`/dev${e}`:r=`/${e}`,window.location.assign(r)};var Cn=(e,t,r)=>{let n=new Date;n.setTime(n.getTime()+r*24*60*60*1e3);let o="expires="+n.toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; ${o}; path=/`},ot=e=>{let t=document.cookie.split("; ");for(let r of t){let[n,o]=r.split("=");if(n===e)return decodeURIComponent(o)}return null},st=e=>{Cn(e,"",-1)},Xt=()=>{let e=ot("accessToken");return e||W("/login?error=unauthorized",!1),e},Qt=()=>{st("accessToken"),W("/login?error=logged-out",!1)};var On=e=>{let t=B.accessTokenPersistStrategy;if(t==="localStorage"||t==="sessionStorage"||t==="cookie"){let n="";t==="localStorage"&&(n=localStorage.getItem(B.TOKEN_NAME_IN_STORAGE)||""),t==="sessionStorage"&&(n=sessionStorage.getItem(B.TOKEN_NAME_IN_STORAGE)||""),t==="cookie"&&(n=ot(B.TOKEN_NAME_IN_STORAGE)||""),n&&(e.headers[B.REQUEST_HEADER_AUTH_KEY]=`${B.TOKEN_TYPE} ${n}`)}let r=localStorage.getItem("team_id");return r&&(e.headers["X-Team-Id"]=r),e},Yt=On;var Ln=[401,419,440],_n=e=>{let{response:t}=e;if(window.location.pathname.includes("/login"))return Promise.reject(e);t&&Ln.includes(t.status)&&(st("accessToken"),W("/login?error=unauthorized",!1))},Zt=_n;var it=Pe.create({timeout:6e4,baseURL:B.apiBaseUrl+B.apiVersion});it.interceptors.request.use(e=>Yt(e),e=>Promise.reject(e));it.interceptors.response.use(e=>e,e=>(Zt(e),Promise.reject(e)));var er=it;var Pn={fetchDataWithAxios(e){return new Promise((t,r)=>{er(e).then(n=>{t(n.data)}).catch(n=>{let o="An unknown error occurred";if(n.response&&n.response.data){let i=n.response.data;typeof i.message=="string"?o=i.message:typeof i.error=="string"?o=i.error:o=JSON.stringify(i)}else n.message&&(o=n.message);r({...n,message:o})})})}},de=Pn;var tr=e=>de.fetchDataWithAxios({url:"/asset",method:"post",data:e});var rr=e=>de.fetchDataWithAxios({url:"/financial-wizard/document",method:"post",data:e}),nr=()=>de.fetchDataWithAxios({url:"/financial-wizard/progress",method:"get"});var T=(e,t=document)=>t.querySelector(e);var or=async()=>{try{let e=await nr(),t=e?.percentage||0,r=T('[dev-target="progress-percentage-fill"]'),n=T('[dev-target="progress-percentage-label"]'),o=T('[dev-target="logout"]');if(!r||!n||!o){console.error('Ensure [dev-target="progress-percentage-fill"], [dev-target="progress-percentage-label"], and [dev-target="logout"] are present.');return}return r.style.width=`${t}%`,n.textContent=`Progress ${t}%`,o.addEventListener("click",()=>{Qt()}),e}catch(e){console.error("Failed to load financial wizard progress:",e)}},sr=()=>{if(!T('[dev-target="sidebar-menu"]')){console.error('Ensure [dev-target="sidebar-menu"] is present.');return}let t=window.location.pathname,n={"/dev/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/dev/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/dev/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/dev/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/dev/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/dev/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"},"/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"}}[t];if(n){document.querySelectorAll('[dev-attr="nav"]').forEach(s=>{s.classList.remove("is-active"),s.classList.remove("is-active-financial")});let i=T(`[dev-target="${n.nav_attr}"]`);i&&i.classList.add(n.nav_class)}};var Dn=async()=>{sr(),Xt();let e=await or(),t=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],r=document.querySelector('[dev-target="accounts-inventory-reports-form"]');if(!r){console.error('Accounts & Inventory form not found. Element: [dev-target="accounts-inventory-reports-form"] not found');return}let n=T('[dev-target="monthly-inventory-upload-box"]',r),o=T('[dev-target="monthly-inventory-input"]',r),i=T('[dev-target="balance-sheet-helper"]',r),s=T('[dev-target="accounts-receivable-upload-box"]',r),c=T('[dev-target="accounts-receivable-input"]',r),m=T('[dev-target="income-statement-helper"]',r),u=T('[dev-target="accounts-payable-upload-box"]',r),l=T('[dev-target="accounts-payable-input"]',r),h=T('[dev-target="income-forecast-helper"]',r),y=T('[dev-target="submit-button"]',r);if(!n||!o||!i){console.error('Ensure [dev-target="monthly-inventory-upload-box"] and [dev-target="monthly-inventory-input"] and [dev-target="balance-sheet-helper"] are present.');return}if(!s||!c||!m){console.error('Ensure [dev-target="accounts-receivable-upload-box"] and [dev-target="accounts-receivable-input"] and [dev-target="income-statement-helper"] are present.');return}if(!u||!l||!h){console.error('Ensure [dev-target="accounts-payable-upload-box"] and [dev-target="accounts-payable-input"] and [dev-target="income-forecast-helper"] are present.');return}if(!y){console.error('Ensure [dev-target="submit-button"] is present.');return}let x=(f,p)=>{if(f.files&&f.files.length>0){let E=f.files[0];if(!t.includes(E.type)){f.value="",p.textContent="Invalid file type. Please upload Excel (.xls or .xlsx) files only",p.classList.add("is-error");return}p.textContent=E.name,p.classList.remove("is-error")}else p.textContent="",p.classList.remove("is-error")};n&&o&&i&&(n.addEventListener("click",()=>o.click()),n.addEventListener("dragover",f=>{f.preventDefault(),n.classList.add("drag")}),n.addEventListener("dragleave",()=>{n.classList.remove("drag")}),n.addEventListener("drop",f=>{f.preventDefault(),n.classList.remove("drag"),f.dataTransfer&&f.dataTransfer.files.length>0&&(o.files=f.dataTransfer.files,x(o,i),o.dispatchEvent(new Event("change",{bubbles:!0})))}),o.addEventListener("change",()=>{x(o,i)})),s&&c&&m&&(s.addEventListener("click",()=>c.click()),s.addEventListener("dragover",f=>{f.preventDefault(),s.classList.add("drag")}),s.addEventListener("dragleave",()=>{s.classList.remove("drag")}),s.addEventListener("drop",f=>{f.preventDefault(),s.classList.remove("drag"),f.dataTransfer&&f.dataTransfer.files.length>0&&(c.files=f.dataTransfer.files,x(c,m),c.dispatchEvent(new Event("change",{bubbles:!0})))}),c.addEventListener("change",()=>{x(c,m)})),u&&l&&h&&(u.addEventListener("click",()=>l.click()),u.addEventListener("dragover",f=>{f.preventDefault(),u.classList.add("drag")}),u.addEventListener("dragleave",()=>{u.classList.remove("drag")}),u.addEventListener("drop",f=>{f.preventDefault(),u.classList.remove("drag"),f.dataTransfer&&f.dataTransfer.files.length>0&&(l.files=f.dataTransfer.files,x(l,h),l.dispatchEvent(new Event("change",{bubbles:!0})))}),l.addEventListener("change",()=>{x(l,h)}));let d=async(f,p)=>{if(!t.includes(f.type))throw new Error("Invalid file type. Please upload Excel (.xls or .xlsx) files only");let E={fileName:f.name,contentType:f.type,assetType:"document",fileSize:f.size,duration:0},v=await tr(E),b=v.asset.id,{presignedUrl:R}=v;if(!R)throw new Error("Presigned URL not received from server");await new Promise((M,C)=>{let _=new XMLHttpRequest;_.upload.addEventListener("progress",F=>{if(F.lengthComputable){let pe=Math.round(F.loaded/F.total*100);console.log(`Upload progress: ${pe}%`)}}),_.addEventListener("load",()=>{_.status>=200&&_.status<300?M():C(new Error("Failed to upload file to S3"))}),_.addEventListener("error",F=>{console.error(F),C(new Error("Network error during upload"))}),_.open("PUT",R),_.setRequestHeader("Content-Type",f.type),_.send(f)}),await rr({page:"accounts-inventory",document_type:p,asset_id:b})};if(r.addEventListener("submit",async f=>{f.preventDefault(),f.stopPropagation();let p=()=>{n?.classList.remove("is-error"),s?.classList.remove("is-error"),u?.classList.remove("is-error"),i?.classList.remove("is-error"),m?.classList.remove("is-error"),h?.classList.remove("is-error"),y.classList.remove("is-error"),y.value="UPLOAD DOCUMENTS"};o?.addEventListener("change",p,{once:!0}),c?.addEventListener("change",p,{once:!0}),l?.addEventListener("change",p,{once:!0});let E=[];if(o?.files&&o.files[0]){let b=o.files[0];t.includes(b.type)?E.push({file:b,documentType:"monthly_inventory_report"}):i?.classList.add("is-error")}if(c?.files&&c.files[0]){let b=c.files[0];t.includes(b.type)?E.push({file:b,documentType:"accounts_receivable_aging"}):m?.classList.add("is-error")}if(l?.files&&l.files[0]){let b=l.files[0];t.includes(b.type)?E.push({file:b,documentType:"accounts_payable_aging"}):h?.classList.add("is-error")}if(o?.files&&o.files[0]&&!t.includes(o.files[0].type)||c?.files&&c.files[0]&&!t.includes(c.files[0].type)||l?.files&&l.files[0]&&!t.includes(l.files[0].type)){y.classList.add("is-error"),y.value="Please upload only Excel (.xls or .xlsx) files";return}if(E.length===0){y.classList.add("is-error"),y.value="Please select at least one file to upload";return}try{y.disabled=!0,y.value="Uploading...",await Promise.all(E.map(({file:b,documentType:R})=>d(b,R))),y.classList.add("is-success"),y.value="Documents uploaded successfully!",o&&(o.value=""),c&&(c.value=""),l&&(l.value=""),i&&(i.textContent="",i.classList.remove("is-error")),m&&(m.textContent="",m.classList.remove("is-error")),h&&(h.textContent="",h.classList.remove("is-error")),setTimeout(()=>{y.classList.remove("is-success"),y.value="UPLOAD DOCUMENTS",y.disabled=!1,W("/finance-docs-ecommerce-performance")},900)}catch(b){let{message:R}=b;console.error(R),y.classList.add("is-error"),y.value=R||"There was a problem uploading the documents",y.disabled=!1}}),e?.accounts_inventory){let f=e.accounts_inventory.find(v=>v.document_type==="monthly_inventory_report");f&&(i.textContent=f.asset_name||"");let p=e.accounts_inventory.find(v=>v.document_type==="accounts_receivable_aging");p&&(m.textContent=p.asset_name||"");let E=e.accounts_inventory.find(v=>v.document_type==="accounts_payable_aging");E&&(h.textContent=E.asset_name||"")}};window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{try{Dn()}catch(e){console.error(e)}});
1
+ var cr=Object.defineProperty;var lr=(e,t)=>{for(var r in t)cr(e,r,{get:t[r],enumerable:!0})};function re(e,t){return function(){return e.apply(t,arguments)}}var{toString:ur}=Object.prototype,{getPrototypeOf:Be}=Object,{iterator:Ee,toStringTag:dt}=Symbol,xe=(e=>t=>{let r=ur.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),D=e=>(e=e.toLowerCase(),t=>xe(t)===e),be=e=>t=>typeof t===e,{isArray:G}=Array,K=be("undefined");function ne(e){return e!==null&&!K(e)&&e.constructor!==null&&!K(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var pt=D("ArrayBuffer");function fr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&pt(e.buffer),t}var dr=be("string"),O=be("function"),mt=be("number"),oe=e=>e!==null&&typeof e=="object",pr=e=>e===!0||e===!1,ye=e=>{if(xe(e)!=="object")return!1;let t=Be(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dt in e)&&!(Ee in e)},mr=e=>{if(!oe(e)||ne(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},hr=D("Date"),gr=D("File"),yr=D("Blob"),Er=D("FileList"),xr=e=>oe(e)&&O(e.pipe),br=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||O(e.append)&&((t=xe(e))==="formdata"||t==="object"&&O(e.toString)&&e.toString()==="[object FormData]"))},Rr=D("URLSearchParams"),[wr,vr,Ar,Sr]=["ReadableStream","Request","Response","Headers"].map(D),Tr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function se(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),G(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(ne(e))return;let s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length,c;for(n=0;n<i;n++)c=s[n],t.call(null,e[c],c,e)}}function ht(e,t){if(ne(e))return null;t=t.toLowerCase();let r=Object.keys(e),n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}var W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gt=e=>!K(e)&&e!==W;function Fe(){let{caseless:e,skipUndefined:t}=gt(this)&&this||{},r={},n=(o,s)=>{let i=e&&ht(r,s)||s;ye(r[i])&&ye(o)?r[i]=Fe(r[i],o):ye(o)?r[i]=Fe({},o):G(o)?r[i]=o.slice():(!t||!K(o))&&(r[i]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&se(arguments[o],n);return r}var Cr=(e,t,r,{allOwnKeys:n}={})=>(se(t,(o,s)=>{r&&O(o)?e[s]=re(o,r):e[s]=o},{allOwnKeys:n}),e),Or=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lr=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Pr=(e,t,r,n)=>{let o,s,i,c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!n||n(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=r!==!1&&Be(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Dr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},_r=e=>{if(!e)return null;if(G(e))return e;let t=e.length;if(!mt(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Ur=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Be(Uint8Array)),Fr=(e,t)=>{let n=(e&&e[Ee]).call(e),o;for(;(o=n.next())&&!o.done;){let s=o.value;t.call(e,s[0],s[1])}},Br=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Nr=D("HTMLFormElement"),kr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),ft=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ir=D("RegExp"),yt=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};se(r,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(n[s]=i||o)}),Object.defineProperties(e,n)},Mr=e=>{yt(e,(t,r)=>{if(O(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(O(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Hr=(e,t)=>{let r={},n=o=>{o.forEach(s=>{r[s]=!0})};return G(e)?n(e):n(String(e).split(t)),r},qr=()=>{},jr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Wr(e){return!!(e&&O(e.append)&&e[dt]==="FormData"&&e[Ee])}var zr=e=>{let t=new Array(10),r=(n,o)=>{if(oe(n)){if(t.indexOf(n)>=0)return;if(ne(n))return n;if(!("toJSON"in n)){t[o]=n;let s=G(n)?[]:{};return se(n,(i,c)=>{let m=r(i,o+1);!K(m)&&(s[c]=m)}),t[o]=void 0,s}}return n};return r(e,0)},$r=D("AsyncFunction"),Vr=e=>e&&(oe(e)||O(e))&&O(e.then)&&O(e.catch),Et=((e,t)=>e?setImmediate:t?((r,n)=>(W.addEventListener("message",({source:o,data:s})=>{o===W&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),W.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",O(W.postMessage)),Jr=typeof queueMicrotask<"u"?queueMicrotask.bind(W):typeof process<"u"&&process.nextTick||Et,Kr=e=>e!=null&&O(e[Ee]),a={isArray:G,isArrayBuffer:pt,isBuffer:ne,isFormData:br,isArrayBufferView:fr,isString:dr,isNumber:mt,isBoolean:pr,isObject:oe,isPlainObject:ye,isEmptyObject:mr,isReadableStream:wr,isRequest:vr,isResponse:Ar,isHeaders:Sr,isUndefined:K,isDate:hr,isFile:gr,isBlob:yr,isRegExp:Ir,isFunction:O,isStream:xr,isURLSearchParams:Rr,isTypedArray:Ur,isFileList:Er,forEach:se,merge:Fe,extend:Cr,trim:Tr,stripBOM:Or,inherits:Lr,toFlatObject:Pr,kindOf:xe,kindOfTest:D,endsWith:Dr,toArray:_r,forEachEntry:Fr,matchAll:Br,isHTMLForm:Nr,hasOwnProperty:ft,hasOwnProp:ft,reduceDescriptors:yt,freezeMethods:Mr,toObjectSet:Hr,toCamelCase:kr,noop:qr,toFiniteNumber:jr,findKey:ht,global:W,isContextDefined:gt,isSpecCompliantForm:Wr,toJSONObject:zr,isAsyncFn:$r,isThenable:Vr,setImmediate:Et,asap:Jr,isIterable:Kr};function X(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}a.inherits(X,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:a.toJSONObject(this.config),code:this.code,status:this.status}}});var xt=X.prototype,bt={};["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=>{bt[e]={value:e}});Object.defineProperties(X,bt);Object.defineProperty(xt,"isAxiosError",{value:!0});X.from=(e,t,r,n,o,s)=>{let i=Object.create(xt);a.toFlatObject(e,i,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");let c=e&&e.message?e.message:"Error",m=t==null&&e?e.code:t;return X.call(i,c,m,r,n,o),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",s&&Object.assign(i,s),i};var g=X;var Re=null;function Ne(e){return a.isPlainObject(e)||a.isArray(e)}function wt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Rt(e,t,r){return e?e.concat(t).map(function(o,s){return o=wt(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function Gr(e){return a.isArray(e)&&!e.some(Ne)}var Xr=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function Yr(e,t,r){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new(Re||FormData),r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!a.isUndefined(p[f])});let n=r.metaTokens,o=r.visitor||l,s=r.dots,i=r.indexes,m=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(a.isBoolean(d))return d.toString();if(!m&&a.isBlob(d))throw new g("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?m&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,f,p){let E=d;if(d&&!p&&typeof d=="object"){if(a.endsWith(f,"{}"))f=n?f:f.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&Gr(d)||(a.isFileList(d)||a.endsWith(f,"[]"))&&(E=a.toArray(d)))return f=wt(f),E.forEach(function(x,v){!(a.isUndefined(x)||x===null)&&t.append(i===!0?Rt([f],v,s):i===null?f:f+"[]",u(x))}),!1}return Ne(d)?!0:(t.append(Rt(p,f,s),u(d)),!1)}let h=[],y=Object.assign(Xr,{defaultVisitor:l,convertValue:u,isVisitable:Ne});function b(d,f){if(!a.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+f.join("."));h.push(d),a.forEach(d,function(E,w){(!(a.isUndefined(E)||E===null)&&o.call(t,E,a.isString(w)?w.trim():w,f,y))===!0&&b(E,f?f.concat(w):[w])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return b(e),t}var q=Yr;function vt(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function At(e,t){this._pairs=[],e&&q(e,this,t)}var St=At.prototype;St.append=function(t,r){this._pairs.push([t,r])};St.toString=function(t){let r=t?function(n){return t.call(this,n,vt)}:vt;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};var we=At;function Qr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ie(e,t,r){if(!t)return e;let n=r&&r.encode||Qr;a.isFunction(r)&&(r={serialize:r});let o=r&&r.serialize,s;if(o?s=o(t,r):s=a.isURLSearchParams(t)?t.toString():new we(t,r).toString(n),s){let i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}var ke=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(n){n!==null&&t(n)})}},Ie=ke;var ve={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Tt=typeof URLSearchParams<"u"?URLSearchParams:we;var Ct=typeof FormData<"u"?FormData:null;var Ot=typeof Blob<"u"?Blob:null;var Lt={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Ct,Blob:Ot},protocols:["http","https","file","blob","url","data"]};var qe={};lr(qe,{hasBrowserEnv:()=>He,hasStandardBrowserEnv:()=>Zr,hasStandardBrowserWebWorkerEnv:()=>en,navigator:()=>Me,origin:()=>tn});var He=typeof window<"u"&&typeof document<"u",Me=typeof navigator=="object"&&navigator||void 0,Zr=He&&(!Me||["ReactNative","NativeScript","NS"].indexOf(Me.product)<0),en=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tn=He&&window.location.href||"http://localhost";var R={...qe,...Lt};function je(e,t){return q(e,new R.classes.URLSearchParams,{visitor:function(r,n,o,s){return R.isNode&&a.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function rn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nn(e){let t={},r=Object.keys(e),n,o=r.length,s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function on(e){function t(r,n,o,s){let i=r[s++];if(i==="__proto__")return!0;let c=Number.isFinite(+i),m=s>=r.length;return i=!i&&a.isArray(o)?o.length:i,m?(a.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!c):((!o[i]||!a.isObject(o[i]))&&(o[i]=[]),t(r,n,o[i],s)&&a.isArray(o[i])&&(o[i]=nn(o[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){let r={};return a.forEachEntry(e,(n,o)=>{t(rn(n),o,r,0)}),r}return null}var Ae=on;function sn(e,t,r){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var We={transitional:ve,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=a.isObject(t);if(s&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return o?JSON.stringify(Ae(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return je(t,this.formSerializer).toString();if((c=a.isFileList(t))||n.indexOf("multipart/form-data")>-1){let m=this.env&&this.env.FormData;return q(c?{"files[]":t}:t,m&&new m,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),sn(t)):t}],transformResponse:[function(t){let r=this.transitional||We.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(n&&!this.responseType||o)){let i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(i)throw c.name==="SyntaxError"?g.from(c,g.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:R.classes.FormData,Blob:R.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{We.headers[e]={}});var Y=We;var an=a.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"]),Pt=e=>{let t={},r,n,o;return e&&e.split(`
2
+ `).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&an[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};var Dt=Symbol("internals");function ae(e){return e&&String(e).trim().toLowerCase()}function Se(e){return e===!1||e==null?e:a.isArray(e)?e.map(Se):String(e)}function cn(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}var ln=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ze(e,t,r,n,o){if(a.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!a.isString(t)){if(a.isString(n))return t.indexOf(n)!==-1;if(a.isRegExp(n))return n.test(t)}}function un(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function fn(e,t){let r=a.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,s,i){return this[n].call(this,t,o,s,i)},configurable:!0})})}var Q=class{constructor(t){t&&this.set(t)}set(t,r,n){let o=this;function s(c,m,u){let l=ae(m);if(!l)throw new Error("header name must be a non-empty string");let h=a.findKey(o,l);(!h||o[h]===void 0||u===!0||u===void 0&&o[h]!==!1)&&(o[h||m]=Se(c))}let i=(c,m)=>a.forEach(c,(u,l)=>s(u,l,m));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(a.isString(t)&&(t=t.trim())&&!ln(t))i(Pt(t),r);else if(a.isObject(t)&&a.isIterable(t)){let c={},m,u;for(let l of t){if(!a.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[u=l[0]]=(m=c[u])?a.isArray(m)?[...m,l[1]]:[m,l[1]]:l[1]}i(c,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=ae(t),t){let n=a.findKey(this,t);if(n){let o=this[n];if(!r)return o;if(r===!0)return cn(o);if(a.isFunction(r))return r.call(this,o,n);if(a.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ae(t),t){let n=a.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||ze(this,this[n],n,r)))}return!1}delete(t,r){let n=this,o=!1;function s(i){if(i=ae(i),i){let c=a.findKey(n,i);c&&(!r||ze(n,n[c],c,r))&&(delete n[c],o=!0)}}return a.isArray(t)?t.forEach(s):s(t),o}clear(t){let r=Object.keys(this),n=r.length,o=!1;for(;n--;){let s=r[n];(!t||ze(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){let r=this,n={};return a.forEach(this,(o,s)=>{let i=a.findKey(n,s);if(i){r[i]=Se(o),delete r[s];return}let c=t?un(s):String(s).trim();c!==s&&delete r[s],r[c]=Se(o),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return a.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&a.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){let n=(this[Dt]=this[Dt]={accessors:{}}).accessors,o=this.prototype;function s(i){let c=ae(i);n[c]||(fn(o,i),n[c]=!0)}return a.isArray(t)?t.forEach(s):s(t),this}};Q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(Q.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});a.freezeMethods(Q);var S=Q;function ce(e,t){let r=this||Y,n=t||r,o=S.from(n.headers),s=n.data;return a.forEach(e,function(c){s=c.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function le(e){return!!(e&&e.__CANCEL__)}function _t(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}a.inherits(_t,g,{__CANCEL__:!0});var F=_t;function ue(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function $e(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dn(e,t){e=e||10;let r=new Array(e),n=new Array(e),o=0,s=0,i;return t=t!==void 0?t:1e3,function(m){let u=Date.now(),l=n[s];i||(i=u),r[o]=m,n[o]=u;let h=s,y=0;for(;h!==o;)y+=r[h++],h=h%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-i<t)return;let b=l&&u-l;return b?Math.round(y*1e3/b):void 0}}var Ut=dn;function pn(e,t){let r=0,n=1e3/t,o,s,i=(u,l=Date.now())=>{r=l,o=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{let l=Date.now(),h=l-r;h>=n?i(u,l):(o=u,s||(s=setTimeout(()=>{s=null,i(o)},n-h)))},()=>o&&i(o)]}var Ft=pn;var Z=(e,t,r=3)=>{let n=0,o=Ut(50,250);return Ft(s=>{let i=s.loaded,c=s.lengthComputable?s.total:void 0,m=i-n,u=o(m),l=i<=c;n=i;let h={loaded:i,total:c,progress:c?i/c:void 0,bytes:m,rate:u||void 0,estimated:u&&c&&l?(c-i)/u:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},r)},Ve=(e,t)=>{let r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Je=e=>(...t)=>a.asap(()=>e(...t));var Bt=R.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,R.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(R.origin),R.navigator&&/(msie|trident)/i.test(R.navigator.userAgent)):()=>!0;var Nt=R.hasStandardBrowserEnv?{write(e,t,r,n,o,s,i){if(typeof document>"u")return;let c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),a.isString(n)&&c.push(`path=${n}`),a.isString(o)&&c.push(`domain=${o}`),s===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;let t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ke(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ge(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function fe(e,t,r){let n=!Ke(t);return e&&(n||r==!1)?Ge(e,t):t}var kt=e=>e instanceof S?{...e}:e;function _(e,t){t=t||{};let r={};function n(u,l,h,y){return a.isPlainObject(u)&&a.isPlainObject(l)?a.merge.call({caseless:y},u,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function o(u,l,h,y){if(a.isUndefined(l)){if(!a.isUndefined(u))return n(void 0,u,h,y)}else return n(u,l,h,y)}function s(u,l){if(!a.isUndefined(l))return n(void 0,l)}function i(u,l){if(a.isUndefined(l)){if(!a.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function c(u,l,h){if(h in t)return n(u,l);if(h in e)return n(void 0,u)}let m={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(u,l,h)=>o(kt(u),kt(l),h,!0)};return a.forEach(Object.keys({...e,...t}),function(l){let h=m[l]||o,y=h(e[l],t[l],l);a.isUndefined(y)&&h!==c||(r[l]=y)}),r}var Te=e=>{let t=_({},e),{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:c}=t;if(t.headers=i=S.from(i),t.url=ie(fe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(r)){if(R.hasStandardBrowserEnv||R.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(a.isFunction(r.getHeaders)){let m=r.getHeaders(),u=["content-type","content-length"];Object.entries(m).forEach(([l,h])=>{u.includes(l.toLowerCase())&&i.set(l,h)})}}if(R.hasStandardBrowserEnv&&(n&&a.isFunction(n)&&(n=n(t)),n||n!==!1&&Bt(t.url))){let m=o&&s&&Nt.read(s);m&&i.set(o,m)}return t};var mn=typeof XMLHttpRequest<"u",It=mn&&function(e){return new Promise(function(r,n){let o=Te(e),s=o.data,i=S.from(o.headers).normalize(),{responseType:c,onUploadProgress:m,onDownloadProgress:u}=o,l,h,y,b,d;function f(){b&&b(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function E(){if(!p)return;let x=S.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),L={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:x,config:e,request:p};ue(function(C){r(C),f()},function(C){n(C),f()},L),p=null}"onloadend"in p?p.onloadend=E:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(E)},p.onabort=function(){p&&(n(new g("Request aborted",g.ECONNABORTED,e,p)),p=null)},p.onerror=function(v){let L=v&&v.message?v.message:"Network Error",k=new g(L,g.ERR_NETWORK,e,p);k.event=v||null,n(k),p=null},p.ontimeout=function(){let v=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",L=o.transitional||ve;o.timeoutErrorMessage&&(v=o.timeoutErrorMessage),n(new g(v,L.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,p)),p=null},s===void 0&&i.setContentType(null),"setRequestHeader"in p&&a.forEach(i.toJSON(),function(v,L){p.setRequestHeader(L,v)}),a.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),c&&c!=="json"&&(p.responseType=o.responseType),u&&([y,d]=Z(u,!0),p.addEventListener("progress",y)),m&&p.upload&&([h,b]=Z(m),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(l=x=>{p&&(n(!x||x.type?new F(null,e,p):x),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));let w=$e(o.url);if(w&&R.protocols.indexOf(w)===-1){n(new g("Unsupported protocol "+w+":",g.ERR_BAD_REQUEST,e));return}p.send(s||null)})};var hn=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o,s=function(u){if(!o){o=!0,c();let l=u instanceof Error?u:this.reason;n.abort(l instanceof g?l:new F(l instanceof Error?l.message:l))}},i=t&&setTimeout(()=>{i=null,s(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t),c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));let{signal:m}=n;return m.unsubscribe=()=>a.asap(c),m}},Mt=hn;var gn=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},yn=async function*(e,t){for await(let r of En(e))yield*gn(r,t)},En=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Xe=(e,t,r,n)=>{let o=yn(e,t),s=0,i,c=m=>{i||(i=!0,n&&n(m))};return new ReadableStream({async pull(m){try{let{done:u,value:l}=await o.next();if(u){c(),m.close();return}let h=l.byteLength;if(r){let y=s+=h;r(y)}m.enqueue(new Uint8Array(l))}catch(u){throw c(u),u}},cancel(m){return c(m),o.return()}},{highWaterMark:2})};var Ht=64*1024,{isFunction:Ce}=a,xn=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:qt,TextEncoder:jt}=a.global,Wt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},bn=e=>{e=a.merge.call({skipUndefined:!0},xn,e);let{fetch:t,Request:r,Response:n}=e,o=t?Ce(t):typeof fetch=="function",s=Ce(r),i=Ce(n);if(!o)return!1;let c=o&&Ce(qt),m=o&&(typeof jt=="function"?(d=>f=>d.encode(f))(new jt):async d=>new Uint8Array(await new r(d).arrayBuffer())),u=s&&c&&Wt(()=>{let d=!1,f=new r(R.origin,{body:new qt,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!f}),l=i&&c&&Wt(()=>a.isReadableStream(new n("").body)),h={stream:l&&(d=>d.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!h[d]&&(h[d]=(f,p)=>{let E=f&&f[d];if(E)return E.call(f);throw new g(`Response type '${d}' is not supported`,g.ERR_NOT_SUPPORT,p)})});let y=async d=>{if(d==null)return 0;if(a.isBlob(d))return d.size;if(a.isSpecCompliantForm(d))return(await new r(R.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(a.isArrayBufferView(d)||a.isArrayBuffer(d))return d.byteLength;if(a.isURLSearchParams(d)&&(d=d+""),a.isString(d))return(await m(d)).byteLength},b=async(d,f)=>{let p=a.toFiniteNumber(d.getContentLength());return p??y(f)};return async d=>{let{url:f,method:p,data:E,signal:w,cancelToken:x,timeout:v,onDownloadProgress:L,onUploadProgress:k,responseType:C,headers:V,withCredentials:P="same-origin",fetchOptions:I}=Te(d),me=t||fetch;C=C?(C+"").toLowerCase():"text";let he=Mt([w,x&&x.toAbortSignal()],v),te=null,j=he&&he.unsubscribe&&(()=>{he.unsubscribe()}),at;try{if(k&&u&&p!=="get"&&p!=="head"&&(at=await b(V,E))!==0){let H=new r(f,{method:"POST",body:E,duplex:"half"}),J;if(a.isFormData(E)&&(J=H.headers.get("content-type"))&&V.setContentType(J),H.body){let[Ue,ge]=Ve(at,Z(Je(k)));E=Xe(H.body,Ht,Ue,ge)}}a.isString(P)||(P=P?"include":"omit");let U=s&&"credentials"in r.prototype,ct={...I,signal:he,method:p.toUpperCase(),headers:V.normalize().toJSON(),body:E,duplex:"half",credentials:U?P:void 0};te=s&&new r(f,ct);let M=await(s?me(te,I):me(f,ct)),lt=l&&(C==="stream"||C==="response");if(l&&(L||lt&&j)){let H={};["status","statusText","headers"].forEach(ut=>{H[ut]=M[ut]});let J=a.toFiniteNumber(M.headers.get("content-length")),[Ue,ge]=L&&Ve(J,Z(Je(L),!0))||[];M=new n(Xe(M.body,Ht,Ue,()=>{ge&&ge(),j&&j()}),H)}C=C||"text";let ar=await h[a.findKey(h,C)||"text"](M,d);return!lt&&j&&j(),await new Promise((H,J)=>{ue(H,J,{data:ar,headers:S.from(M.headers),status:M.status,statusText:M.statusText,config:d,request:te})})}catch(U){throw j&&j(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,d,te),{cause:U.cause||U}):g.from(U,U&&U.code,d,te)}}},Rn=new Map,Ye=e=>{let t=e&&e.env||{},{fetch:r,Request:n,Response:o}=t,s=[n,o,r],i=s.length,c=i,m,u,l=Rn;for(;c--;)m=s[c],u=l.get(m),u===void 0&&l.set(m,u=c?new Map:bn(t)),l=u;return u},Hs=Ye();var Qe={http:Re,xhr:It,fetch:{get:Ye}};a.forEach(Qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var zt=e=>`- ${e}`,vn=e=>a.isFunction(e)||e===null||e===!1;function An(e,t){e=a.isArray(e)?e:[e];let{length:r}=e,n,o,s={};for(let i=0;i<r;i++){n=e[i];let c;if(o=n,!vn(n)&&(o=Qe[(c=String(n)).toLowerCase()],o===void 0))throw new g(`Unknown adapter '${c}'`);if(o&&(a.isFunction(o)||(o=o.get(t))))break;s[c||"#"+i]=o}if(!o){let i=Object.entries(s).map(([m,u])=>`adapter ${m} `+(u===!1?"is not supported by the environment":"is not available in the build")),c=r?i.length>1?`since :
4
+ `+i.map(zt).join(`
5
+ `):" "+zt(i[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}var Oe={getAdapter:An,adapters:Qe};function Ze(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new F(null,e)}function Le(e){return Ze(e),e.headers=S.from(e.headers),e.data=ce.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Oe.getAdapter(e.adapter||Y.adapter,e)(e).then(function(n){return Ze(e),n.data=ce.call(e,e.transformResponse,n),n.headers=S.from(n.headers),n},function(n){return le(n)||(Ze(e),n&&n.response&&(n.response.data=ce.call(e,e.transformResponse,n.response),n.response.headers=S.from(n.response.headers))),Promise.reject(n)})}var Pe="1.13.2";var De={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{De[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var $t={};De.transitional=function(t,r,n){function o(s,i){return"[Axios v"+Pe+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,c)=>{if(t===!1)throw new g(o(i," has been removed"+(r?" in "+r:"")),g.ERR_DEPRECATED);return r&&!$t[i]&&($t[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,c):!0}};De.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Sn(e,t,r){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),o=n.length;for(;o-- >0;){let s=n[o],i=t[s];if(i){let c=e[s],m=c===void 0||i(c,s,e);if(m!==!0)throw new g("option "+s+" must be "+m,g.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new g("Unknown option "+s,g.ERR_BAD_OPTION)}}var de={assertOptions:Sn,validators:De};var B=de.validators,ee=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ie,response:new Ie}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;let s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
+ `+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=_(this.defaults,r);let{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&de.assertOptions(n,{silentJSONParsing:B.transitional(B.boolean),forcedJSONParsing:B.transitional(B.boolean),clarifyTimeoutError:B.transitional(B.boolean)},!1),o!=null&&(a.isFunction(o)?r.paramsSerializer={serialize:o}:de.assertOptions(o,{encode:B.function,serialize:B.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),de.assertOptions(r,{baseUrl:B.spelling("baseURL"),withXsrfToken:B.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&a.merge(s.common,s[r.method]);s&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete s[d]}),r.headers=S.concat(i,s);let c=[],m=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(m=m&&f.synchronous,c.unshift(f.fulfilled,f.rejected))});let u=[];this.interceptors.response.forEach(function(f){u.push(f.fulfilled,f.rejected)});let l,h=0,y;if(!m){let d=[Le.bind(this),void 0];for(d.unshift(...c),d.push(...u),y=d.length,l=Promise.resolve(r);h<y;)l=l.then(d[h++],d[h++]);return l}y=c.length;let b=r;for(;h<y;){let d=c[h++],f=c[h++];try{b=d(b)}catch(p){f.call(this,p);break}}try{l=Le.call(this,b)}catch(d){return Promise.reject(d)}for(h=0,y=u.length;h<y;)l=l.then(u[h++],u[h++]);return l}getUri(t){t=_(this.defaults,t);let r=fe(t.baseURL,t.url,t.allowAbsoluteUrls);return ie(r,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(r,n){return this.request(_(n||{},{method:t,url:r,data:(n||{}).data}))}});a.forEach(["post","put","patch"],function(t){function r(n){return function(s,i,c){return this.request(_(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}ee.prototype[t]=r(),ee.prototype[t+"Form"]=r(!0)});var pe=ee;var et=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s,i=new Promise(c=>{n.subscribe(c),s=c}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},t(function(s,i,c){n.reason||(n.reason=new F(s,i,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e(function(o){t=o}),cancel:t}}},Vt=et;function tt(e){return function(r){return e.apply(null,r)}}function rt(e){return a.isObject(e)&&e.isAxiosError===!0}var nt={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(nt).forEach(([e,t])=>{nt[t]=e});var Jt=nt;function Kt(e){let t=new pe(e),r=re(pe.prototype.request,t);return a.extend(r,pe.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return Kt(_(e,o))},r}var A=Kt(Y);A.Axios=pe;A.CanceledError=F;A.CancelToken=Vt;A.isCancel=le;A.VERSION=Pe;A.toFormData=q;A.AxiosError=g;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=tt;A.isAxiosError=rt;A.mergeConfig=_;A.AxiosHeaders=S;A.formToJSON=e=>Ae(a.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Oe.getAdapter;A.HttpStatusCode=Jt;A.default=A;var _e=A;var{Axios:ki,AxiosError:Ii,CanceledError:Mi,isCancel:Hi,CancelToken:qi,VERSION:ji,all:Wi,Cancel:zi,isAxiosError:$i,spread:Vi,toFormData:Ji,AxiosHeaders:Ki,HttpStatusCode:Gi,formToJSON:Xi,getAdapter:Yi,mergeConfig:Qi}=_e;var Tn=localStorage.getItem("api-mode"),Cn="http://127.0.0.1:8787",On="https://assembled-brands-dev.crystal-e8a.workers.dev",N={apiBaseUrl:Tn==="local"?Cn:On,apiVersion:"/api/v1",accessTokenPersistStrategy:"cookie",TOKEN_NAME_IN_STORAGE:"accessToken",TOKEN_TYPE:"Bearer",REQUEST_HEADER_AUTH_KEY:"Authorization"},z=e=>{if(!e){console.error("navigateToPath: path is empty or undefined");return}let t=e.replace(/^\/+/,""),r=t;r=`dev/${t}`;let n=`${window.location.origin}/${r}`;window.location.assign(n)};var Ln=(e,t,r)=>{let n=new Date;n.setTime(n.getTime()+r*24*60*60*1e3);let o="expires="+n.toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; ${o}; path=/`},ot=e=>{let t=document.cookie.split("; ");for(let r of t){let[n,o]=r.split("=");if(n===e)return decodeURIComponent(o)}return null},st=e=>{Ln(e,"",-1)},Gt=()=>{let e=ot("accessToken");return e||z("/login?error=unauthorized"),e},Xt=()=>{st("accessToken"),z("/login?error=logged-out")};var Pn=e=>{let t=N.accessTokenPersistStrategy;if(t==="localStorage"||t==="sessionStorage"||t==="cookie"){let n="";t==="localStorage"&&(n=localStorage.getItem(N.TOKEN_NAME_IN_STORAGE)||""),t==="sessionStorage"&&(n=sessionStorage.getItem(N.TOKEN_NAME_IN_STORAGE)||""),t==="cookie"&&(n=ot(N.TOKEN_NAME_IN_STORAGE)||""),n&&(e.headers[N.REQUEST_HEADER_AUTH_KEY]=`${N.TOKEN_TYPE} ${n}`)}let r=localStorage.getItem("team_id");return r&&(e.headers["X-Team-Id"]=r),e},Yt=Pn;var Dn=[401,419,440],_n=e=>{let{response:t}=e;if(window.location.pathname.includes("/login"))return Promise.reject(e);t&&Dn.includes(t.status)&&(st("accessToken"),z("/login?error=unauthorized"))},Qt=_n;var it=_e.create({timeout:6e4,baseURL:N.apiBaseUrl+N.apiVersion});it.interceptors.request.use(e=>Yt(e),e=>Promise.reject(e));it.interceptors.response.use(e=>e,e=>(Qt(e),Promise.reject(e)));var Zt=it;var Un={fetchDataWithAxios(e){return new Promise((t,r)=>{Zt(e).then(n=>{t(n.data)}).catch(n=>{let o="An unknown error occurred";if(n.response&&n.response.data){let s=n.response.data;typeof s.message=="string"?o=s.message:typeof s.error=="string"?o=s.error:o=JSON.stringify(s)}else n.message&&(o=n.message);r({...n,message:o})})})}},$=Un;var er=e=>$.fetchDataWithAxios({url:"/asset",method:"post",data:e});var tr=e=>$.fetchDataWithAxios({url:"/financial-wizard/document",method:"post",data:e}),rr=()=>$.fetchDataWithAxios({url:"/financial-wizard/progress",method:"get"});async function nr(){return $.fetchDataWithAxios({url:"/user/me",method:"get"})}var T=(e,t=document)=>t.querySelector(e);var or=async()=>{try{let[e,t]=await Promise.all([rr(),nr()]),r=e?.percentage||0,n=T('[dev-target="progress-percentage-fill"]'),o=T('[dev-target="progress-percentage-label"]'),s=T('[dev-target="user-name"]'),i=T('[dev-target="user-email"]'),c=T('[dev-target="logout"]');if(!n||!o||!c||!s||!i){console.error('Ensure [dev-target="progress-percentage-fill"], [dev-target="progress-percentage-label"], [dev-target="user-name"], [dev-target="user-email"], and [dev-target="logout"] are present.');return}return n.style.width=`${r}%`,o.textContent=`Progress ${r}%`,c.addEventListener("click",()=>{Xt()}),s.innerText=e.business?.legal_name||(t.first_name||"Full")+" "+(t.last_name||"Name"),i.innerText=e.business?.email||t.email||"hello@company.com",e}catch(e){console.error("Failed to load financial wizard progress:",e)}},sr=()=>{if(!T('[dev-target="sidebar-menu"]')){console.error('Ensure [dev-target="sidebar-menu"] is present.');return}let t=window.location.pathname,n={"/dev/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/dev/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/dev/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/dev/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/dev/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/dev/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"},"/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"}}[t];if(n){document.querySelectorAll('[dev-attr="nav"]').forEach(i=>{i.classList.remove("is-active"),i.classList.remove("is-active-financial")});let s=T(`[dev-target="${n.nav_attr}"]`);s&&s.classList.add(n.nav_class)}},ir=e=>new Promise((t,r)=>{let n=new FileReader;n.onload=()=>{let s=n.result.split(",");t(s.length>1?s[1]:s[0])},n.onerror=()=>r(new Error("Failed to read file as base64")),n.readAsDataURL(e)});var Fn=async()=>{sr(),Gt();let e=await or(),t=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],r=document.querySelector('[dev-target="accounts-inventory-reports-form"]');if(!r){console.error('Accounts & Inventory form not found. Element: [dev-target="accounts-inventory-reports-form"] not found');return}let n=T('[dev-target="monthly-inventory-upload-box"]',r),o=T('[dev-target="monthly-inventory-input"]',r),s=T('[dev-target="balance-sheet-helper"]',r),i=T('[dev-target="accounts-receivable-upload-box"]',r),c=T('[dev-target="accounts-receivable-input"]',r),m=T('[dev-target="income-statement-helper"]',r),u=T('[dev-target="accounts-payable-upload-box"]',r),l=T('[dev-target="accounts-payable-input"]',r),h=T('[dev-target="income-forecast-helper"]',r),y=T('[dev-target="submit-button"]',r);if(!n||!o||!s){console.error('Ensure [dev-target="monthly-inventory-upload-box"] and [dev-target="monthly-inventory-input"] and [dev-target="balance-sheet-helper"] are present.');return}if(!i||!c||!m){console.error('Ensure [dev-target="accounts-receivable-upload-box"] and [dev-target="accounts-receivable-input"] and [dev-target="income-statement-helper"] are present.');return}if(!u||!l||!h){console.error('Ensure [dev-target="accounts-payable-upload-box"] and [dev-target="accounts-payable-input"] and [dev-target="income-forecast-helper"] are present.');return}if(!y){console.error('Ensure [dev-target="submit-button"] is present.');return}let b=(f,p)=>{if(f.files&&f.files.length>0){let E=f.files[0];if(!t.includes(E.type)){f.value="",p.textContent="Invalid file type. Please upload Excel (.xls or .xlsx) files only",p.classList.add("is-error");return}p.textContent=E.name,p.classList.remove("is-error")}else p.textContent="",p.classList.remove("is-error")};n&&o&&s&&(n.addEventListener("click",()=>o.click()),n.addEventListener("dragover",f=>{f.preventDefault(),n.classList.add("drag")}),n.addEventListener("dragleave",()=>{n.classList.remove("drag")}),n.addEventListener("drop",f=>{f.preventDefault(),n.classList.remove("drag"),f.dataTransfer&&f.dataTransfer.files.length>0&&(o.files=f.dataTransfer.files,b(o,s),o.dispatchEvent(new Event("change",{bubbles:!0})))}),o.addEventListener("change",()=>{b(o,s)})),i&&c&&m&&(i.addEventListener("click",()=>c.click()),i.addEventListener("dragover",f=>{f.preventDefault(),i.classList.add("drag")}),i.addEventListener("dragleave",()=>{i.classList.remove("drag")}),i.addEventListener("drop",f=>{f.preventDefault(),i.classList.remove("drag"),f.dataTransfer&&f.dataTransfer.files.length>0&&(c.files=f.dataTransfer.files,b(c,m),c.dispatchEvent(new Event("change",{bubbles:!0})))}),c.addEventListener("change",()=>{b(c,m)})),u&&l&&h&&(u.addEventListener("click",()=>l.click()),u.addEventListener("dragover",f=>{f.preventDefault(),u.classList.add("drag")}),u.addEventListener("dragleave",()=>{u.classList.remove("drag")}),u.addEventListener("drop",f=>{f.preventDefault(),u.classList.remove("drag"),f.dataTransfer&&f.dataTransfer.files.length>0&&(l.files=f.dataTransfer.files,b(l,h),l.dispatchEvent(new Event("change",{bubbles:!0})))}),l.addEventListener("change",()=>{b(l,h)}));let d=async(f,p)=>{if(!t.includes(f.type))throw new Error("Invalid file type. Please upload Excel (.xls or .xlsx) files only");let E={fileName:f.name,contentType:f.type,assetType:"document",fileSize:f.size,duration:0},w=await er(E),x=w.asset.id,{presignedUrl:v}=w;if(!v)throw new Error("Presigned URL not received from server");await new Promise((C,V)=>{let P=new XMLHttpRequest;P.upload.addEventListener("progress",I=>{if(I.lengthComputable){let me=Math.round(I.loaded/I.total*100);console.log(`Upload progress: ${me}%`)}}),P.addEventListener("load",()=>{P.status>=200&&P.status<300?C():V(new Error("Failed to upload file to S3"))}),P.addEventListener("error",I=>{console.error(I),V(new Error("Network error during upload"))}),P.open("PUT",v),P.setRequestHeader("Content-Type",f.type),P.send(f)});let L=await ir(f),k={page:"accounts-inventory",document_type:p,asset_id:x,file_data:L,file_name:f.name,file_mime_type:f.type};await tr(k)};if(r.addEventListener("submit",async f=>{f.preventDefault(),f.stopPropagation();let p=()=>{n?.classList.remove("is-error"),i?.classList.remove("is-error"),u?.classList.remove("is-error"),s?.classList.remove("is-error"),m?.classList.remove("is-error"),h?.classList.remove("is-error"),y.classList.remove("is-error"),y.value="UPLOAD DOCUMENTS"};o?.addEventListener("change",p,{once:!0}),c?.addEventListener("change",p,{once:!0}),l?.addEventListener("change",p,{once:!0});let E=[];if(o?.files&&o.files[0]){let x=o.files[0];t.includes(x.type)?E.push({file:x,documentType:"monthly_inventory_report"}):s?.classList.add("is-error")}if(c?.files&&c.files[0]){let x=c.files[0];t.includes(x.type)?E.push({file:x,documentType:"accounts_receivable_aging"}):m?.classList.add("is-error")}if(l?.files&&l.files[0]){let x=l.files[0];t.includes(x.type)?E.push({file:x,documentType:"accounts_payable_aging"}):h?.classList.add("is-error")}if(o?.files&&o.files[0]&&!t.includes(o.files[0].type)||c?.files&&c.files[0]&&!t.includes(c.files[0].type)||l?.files&&l.files[0]&&!t.includes(l.files[0].type)){y.classList.add("is-error"),y.value="Please upload only Excel (.xls or .xlsx) files";return}if(E.length===0){y.classList.add("is-error"),y.value="Please select at least one file to upload";return}try{y.disabled=!0,y.value="Uploading...",await Promise.all(E.map(({file:x,documentType:v})=>d(x,v))),y.classList.add("is-success"),y.value="Documents uploaded successfully!",o&&(o.value=""),c&&(c.value=""),l&&(l.value=""),s&&(s.textContent="",s.classList.remove("is-error")),m&&(m.textContent="",m.classList.remove("is-error")),h&&(h.textContent="",h.classList.remove("is-error")),setTimeout(()=>{y.classList.remove("is-success"),y.value="UPLOAD DOCUMENTS",y.disabled=!1,z("/finance-docs-ecommerce-performance")},900)}catch(x){let{message:v}=x;console.error(v),y.classList.add("is-error"),y.value=v||"There was a problem uploading the documents",y.disabled=!1}}),e?.accounts_inventory){let f=e.accounts_inventory.find(w=>w.document_type==="monthly_inventory_report");f&&(s.textContent=f.asset_name||"");let p=e.accounts_inventory.find(w=>w.document_type==="accounts_receivable_aging");p&&(m.textContent=p.asset_name||"");let E=e.accounts_inventory.find(w=>w.document_type==="accounts_payable_aging");E&&(h.textContent=E.asset_name||"")}};window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{try{Fn()}catch(e){console.error(e)}});