@assembled-brands/frontend 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pages/account-recovery-complete/index.js +7 -7
- package/dist/pages/account-recovery-complete/index.js.map +2 -2
- package/dist/pages/account-recovery-initiate/index.js +6 -6
- package/dist/pages/account-recovery-initiate/index.js.map +2 -2
- package/dist/pages/account-setup-finish-verification/index.js +7 -7
- package/dist/pages/account-setup-finish-verification/index.js.map +2 -2
- package/dist/pages/claim-account/index.js +6 -6
- package/dist/pages/claim-account/index.js.map +2 -2
- package/dist/pages/cold-lead-register/index.js +6 -6
- package/dist/pages/cold-lead-register/index.js.map +2 -2
- package/dist/pages/finance-docs-accounts-inventory/index.js +6 -6
- package/dist/pages/finance-docs-accounts-inventory/index.js.map +2 -2
- package/dist/pages/finance-docs-ecommerce-performance/index.js +6 -6
- package/dist/pages/finance-docs-ecommerce-performance/index.js.map +2 -2
- package/dist/pages/finance-docs-financial-reports/index.js +6 -6
- package/dist/pages/finance-docs-financial-reports/index.js.map +2 -2
- package/dist/pages/finance-docs-team-ownership/index.js +6 -6
- package/dist/pages/finance-docs-team-ownership/index.js.map +2 -2
- package/dist/pages/financial-company-profile/index.js +6 -6
- package/dist/pages/financial-company-profile/index.js.map +2 -2
- package/dist/pages/financial-financial-overview/index.js +6 -6
- package/dist/pages/financial-financial-overview/index.js.map +2 -2
- package/dist/pages/invite-team-members/index.js +6 -6
- package/dist/pages/invite-team-members/index.js.map +2 -2
- package/dist/pages/login/index.js +7 -7
- package/dist/pages/login/index.js.map +2 -2
- package/dist/pages/onboarding-step-1/index.js +6 -6
- package/dist/pages/onboarding-step-1/index.js.map +2 -2
- package/dist/pages/onboarding-step-2/index.js +6 -6
- package/dist/pages/onboarding-step-2/index.js.map +2 -2
- package/dist/pages/onboarding-step-3/index.js +6 -6
- package/dist/pages/onboarding-step-3/index.js.map +2 -2
- package/dist/pages/team-acknowledge-invitation/index.js +6 -6
- package/dist/pages/team-acknowledge-invitation/index.js.map +2 -2
- package/dist/pages/team-members/index.js +6 -6
- package/dist/pages/team-members/index.js.map +2 -2
- 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:Ne}=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=Ne(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 Ue(){let{caseless:e,skipUndefined:t}=yt(this)&&this||{},r={},n=(o,i)=>{let s=e&>(r,i)||i;ge(r[s])&&ge(o)?r[s]=Ue(r[s],o):ge(o)?r[s]=Ue({},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&&Ne(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"&&Ne(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:Ue,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 ke(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(ke)}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 ke(d)?!0:(t.append(vt(p,f,i),u(d)),!1)}let h=[],y=Object.assign(Gr,{defaultVisitor:l,convertValue:u,isVisitable:ke});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 Be=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)})}},Me=Be;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 qe={};cr(qe,{hasBrowserEnv:()=>Ie,hasStandardBrowserEnv:()=>Yr,hasStandardBrowserWebWorkerEnv:()=>Zr,navigator:()=>He,origin:()=>en});var Ie=typeof window<"u"&&typeof document<"u",He=typeof navigator=="object"&&navigator||void 0,Yr=Ie&&(!He||["ReactNative","NativeScript","NS"].indexOf(He.product)<0),Zr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",en=Ie&&window.location.href||"http://localhost";var w={...qe,..._t};function je(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 ze={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 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 i||o?(r.setContentType("application/json",!1),on(t)):t}],transformResponse:[function(t){let r=this.transitional||ze.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=>{ze.headers[e]={}});var G=ze;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(
|
|
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 $e(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)},Je=(e,t)=>{let r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Ve=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 Ke(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ge(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function le(e,t,r){let n=!Ke(t);return e&&(n||r==!1)?Ge(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=$e(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()}},Xe=(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[Fe,he]=Je(ct,Q(Ve(M)));E=Xe(I.body,qt,Fe,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")),[Fe,he]=L&&Je($,Q(Ve(L),!0))||[];H=new n(Xe(H.body,qt,Fe,()=>{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,Qe=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},Hs=Qe();var Ye={http:xe,xhr:Ht,fetch:{get:Qe}};a.forEach(Ye,(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=Ye[(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
|
-
`+
|
|
5
|
-
`):" "
|
|
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 et=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=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 Kt=nt;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=tt;A.isAxiosError=rt;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:ki,AxiosError:Bi,CanceledError:Mi,isCancel:Hi,CancelToken:Ii,VERSION:qi,all:ji,Cancel:zi,isAxiosError:Wi,spread:$i,toFormData:Ji,AxiosHeaders:Vi,HttpStatusCode:Ki,formToJSON:Gi,getAdapter:Xi,mergeConfig:Qi}=Pe;var De=localStorage.getItem("api-mode"),Sn="http://127.0.0.1:8787",Tn="https://assembled-brands-dev.crystal-e8a.workers.dev",Cn="https://assembled-brands-prod.crystal-e8a.workers.dev",B={apiBaseUrl:De==="local"?Sn:De==="remote-dev"?Tn:Cn,apiVersion:"/api/v1",accessTokenPersistStrategy:"cookie",TOKEN_NAME_IN_STORAGE:"accessToken",TOKEN_TYPE:"Bearer",REQUEST_HEADER_AUTH_KEY:"Authorization"},W=(e,t=!1)=>{let r="";De==="local"&&!t?r=`/dev${e}`:De==="remote-dev"&&!t?r=`/dev${e}`:r=`/${e}`,window.location.assign(r)};var On=(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=>{On(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 Ln=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=Ln;var _n=[401,419,440],Pn=e=>{let{response:t}=e;if(window.location.pathname.includes("/login"))return Promise.reject(e);t&&_n.includes(t.status)&&(st("accessToken"),W("/login?error=unauthorized",!1))},Zt=Pn;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 Dn={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=Dn;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 Fn=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{Fn()}catch(e){console.error(e)}});
|
|
1
|
+
var ar=Object.defineProperty;var cr=(e,t)=>{for(var r in t)ar(e,r,{get:t[r],enumerable:!0})};function te(e,t){return function(){return e.apply(t,arguments)}}var{toString:lr}=Object.prototype,{getPrototypeOf:Ne}=Object,{iterator:Ee,toStringTag:dt}=Symbol,be=(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=>be(t)===e),xe=e=>t=>typeof t===e,{isArray:K}=Array,V=xe("undefined");function re(e){return e!==null&&!V(e)&&e.constructor!==null&&!V(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var pt=P("ArrayBuffer");function ur(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&pt(e.buffer),t}var fr=xe("string"),O=xe("function"),mt=xe("number"),ne=e=>e!==null&&typeof e=="object",dr=e=>e===!0||e===!1,ye=e=>{if(be(e)!=="object")return!1;let t=Ne(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dt in e)&&!(Ee in e)},pr=e=>{if(!ne(e)||re(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=>ne(e)&&O(e.pipe),br=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||O(e.append)&&((t=be(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 oe(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),K(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(re(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(re(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,gt=e=>!V(e)&&e!==z;function Ue(){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]=Ue(r[i],o):ye(o)?r[i]=Ue({},o):K(o)?r[i]=o.slice():(!t||!V(o))&&(r[i]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&oe(arguments[o],n);return r}var Tr=(e,t,r,{allOwnKeys:n}={})=>(oe(t,(o,s)=>{r&&O(o)?e[s]=te(o,r):e[s]=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,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&&Ne(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(K(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},Dr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ne(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])}},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}),ft=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Br=P("RegExp"),yt=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};oe(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 K(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[dt]==="FormData"&&e[Ee])}var zr=e=>{let t=new Array(10),r=(n,o)=>{if(ne(n)){if(t.indexOf(n)>=0)return;if(re(n))return n;if(!("toJSON"in n)){t[o]=n;let s=K(n)?[]:{};return oe(n,(i,c)=>{let m=r(i,o+1);!V(m)&&(s[c]=m)}),t[o]=void 0,s}}return n};return r(e,0)},Wr=P("AsyncFunction"),$r=e=>e&&(ne(e)||O(e))&&O(e.then)&&O(e.catch),Et=((e,t)=>e?setImmediate:t?((r,n)=>(z.addEventListener("message",({source:o,data:s})=>{o===z&&s===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||Et,Vr=e=>e!=null&&O(e[Ee]),a={isArray:K,isArrayBuffer:pt,isBuffer:re,isFormData:br,isArrayBufferView:ur,isString:fr,isNumber:mt,isBoolean:dr,isObject:ne,isPlainObject:ye,isEmptyObject:pr,isReadableStream:wr,isRequest:vr,isResponse:Rr,isHeaders:Ar,isUndefined:V,isDate:mr,isFile:hr,isBlob:gr,isRegExp:Br,isFunction:O,isStream:Er,isURLSearchParams:xr,isTypedArray:Dr,isFileList:yr,forEach:oe,merge:Ue,extend:Tr,trim:Sr,stripBOM:Cr,inherits:Or,toFlatObject:Lr,kindOf:be,kindOfTest:P,endsWith:_r,toArray:Pr,forEachEntry:Fr,matchAll:Ur,isHTMLForm:Nr,hasOwnProperty:ft,hasOwnProp:ft,reduceDescriptors:yt,freezeMethods:Mr,toObjectSet:Hr,toCamelCase:kr,noop:Ir,toFiniteNumber:qr,findKey:ht,global:z,isContextDefined:gt,isSpecCompliantForm:jr,toJSONObject:zr,isAsyncFn:Wr,isThenable:$r,setImmediate:Et,asap:Jr,isIterable:Vr};function G(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(G,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 bt=G.prototype,xt={};["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=>{xt[e]={value:e}});Object.defineProperties(G,xt);Object.defineProperty(bt,"isAxiosError",{value:!0});G.from=(e,t,r,n,o,s)=>{let i=Object.create(bt);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 G.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=G;var we=null;function ke(e){return a.isPlainObject(e)||a.isArray(e)}function vt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function wt(e,t,r){return e?e.concat(t).map(function(o,s){return o=vt(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function Kr(e){return a.isArray(e)&&!e.some(ke)}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(we||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)&&Kr(d)||(a.isFileList(d)||a.endsWith(f,"[]"))&&(E=a.toArray(d)))return f=vt(f),E.forEach(function(b,R){!(a.isUndefined(b)||b===null)&&t.append(i===!0?wt([f],R,s):i===null?f:f+"[]",u(b))}),!1}return ke(d)?!0:(t.append(wt(p,f,s),u(d)),!1)}let h=[],y=Object.assign(Gr,{defaultVisitor:l,convertValue:u,isVisitable:ke});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 Rt(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,Rt)}:Rt;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};var ve=At;function Qr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function se(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 ve(t,r).toString(n),s){let i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}var Be=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)})}},Me=Be;var Re={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Tt=typeof URLSearchParams<"u"?URLSearchParams:ve;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={};cr(qe,{hasBrowserEnv:()=>Ie,hasStandardBrowserEnv:()=>Yr,hasStandardBrowserWebWorkerEnv:()=>Zr,navigator:()=>He,origin:()=>en});var Ie=typeof window<"u"&&typeof document<"u",He=typeof navigator=="object"&&navigator||void 0,Yr=Ie&&(!He||["ReactNative","NativeScript","NS"].indexOf(He.product)<0),Zr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",en=Ie&&window.location.href||"http://localhost";var w={...qe,...Lt};function je(e,t){return q(e,new w.classes.URLSearchParams,{visitor:function(r,n,o,s){return w.isNode&&a.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.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,s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function nn(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]=rn(o[i])),!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 Ae=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 ze={transitional:Re,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),on(t)):t}],transformResponse:[function(t){let r=this.transitional||ze.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: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=>{ze.headers[e]={}});var X=ze;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"]),_t=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]&&sn[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};var Pt=Symbol("internals");function ie(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 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 We(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,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=ie(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())&&!cn(t))i(_t(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=ie(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=ie(t),t){let n=a.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||We(this,this[n],n,r)))}return!1}delete(t,r){let n=this,o=!1;function s(i){if(i=ie(i),i){let c=a.findKey(n,i);c&&(!r||We(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||We(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?ln(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[Pt]=this[Pt]={accessors:{}}).accessors,o=this.prototype;function s(i){let c=ie(i);n[c]||(un(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 ae(e,t){let r=this||X,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 ce(e){return!!(e&&e.__CANCEL__)}function Dt(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}a.inherits(Dt,g,{__CANCEL__:!0});var U=Dt;function le(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 fn(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 x=l&&u-l;return x?Math.round(y*1e3/x):void 0}}var Ft=fn;function dn(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 Ut=dn;var Y=(e,t,r=3)=>{let n=0,o=Ft(50,250);return Ut(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)},Je=(e,t)=>{let r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Ve=e=>(...t)=>a.asap(()=>e(...t));var Nt=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 kt=w.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 ue(e,t,r){let n=!Ke(t);return e&&(n||r==!1)?Ge(e,t):t}var Bt=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 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(Bt(u),Bt(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=D({},e),{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:c}=t;if(t.headers=i=S.from(i),t.url=se(ue(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(w.hasStandardBrowserEnv||w.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(w.hasStandardBrowserEnv&&(n&&a.isFunction(n)&&(n=n(t)),n||n!==!1&&Nt(t.url))){let m=o&&s&&kt.read(s);m&&i.set(o,m)}return t};var pn=typeof XMLHttpRequest<"u",Mt=pn&&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,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};le(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",B=new g(L,g.ERR_NETWORK,e,p);B.event=R||null,n(B),p=null},p.ontimeout=function(){let R=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",L=o.transitional||Re;o.timeoutErrorMessage&&(R=o.timeoutErrorMessage),n(new g(R,L.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,p)),p=null},s===void 0&&i.setContentType(null),"setRequestHeader"in p&&a.forEach(i.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]=Y(u,!0),p.addEventListener("progress",y)),m&&p.upload&&([h,x]=Y(m),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",x)),(o.cancelToken||o.signal)&&(l=b=>{p&&(n(!b||b.type?new U(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=$e(o.url);if(v&&w.protocols.indexOf(v)===-1){n(new g("Unsupported protocol "+v+":",g.ERR_BAD_REQUEST,e));return}p.send(s||null)})};var mn=(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 U(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}},Ht=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()}},Xe=(e,t,r,n)=>{let o=gn(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 It=64*1024,{isFunction:Ce}=a,En=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:qt,TextEncoder:jt}=a.global,zt=(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?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&&zt(()=>{let d=!1,f=new r(w.origin,{body:new qt,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!f}),l=i&&c&&zt(()=>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:B,responseType:C,headers:$,withCredentials:_="same-origin",fetchOptions:M}=Te(d),me=t||fetch;C=C?(C+"").toLowerCase():"text";let he=Ht([v,b&&b.toAbortSignal()],R),ee=null,j=he&&he.unsubscribe&&(()=>{he.unsubscribe()}),at;try{if(B&&u&&p!=="get"&&p!=="head"&&(at=await x($,E))!==0){let I=new r(f,{method:"POST",body:E,duplex:"half"}),J;if(a.isFormData(E)&&(J=I.headers.get("content-type"))&&$.setContentType(J),I.body){let[Fe,ge]=Je(at,Y(Ve(B)));E=Xe(I.body,It,Fe,ge)}}a.isString(_)||(_=_?"include":"omit");let F=s&&"credentials"in r.prototype,ct={...M,signal:he,method:p.toUpperCase(),headers:$.normalize().toJSON(),body:E,duplex:"half",credentials:F?_:void 0};ee=s&&new r(f,ct);let H=await(s?me(ee,M):me(f,ct)),lt=l&&(C==="stream"||C==="response");if(l&&(L||lt&&j)){let I={};["status","statusText","headers"].forEach(ut=>{I[ut]=H[ut]});let J=a.toFiniteNumber(H.headers.get("content-length")),[Fe,ge]=L&&Je(J,Y(Ve(L),!0))||[];H=new n(Xe(H.body,It,Fe,()=>{ge&&ge(),j&&j()}),I)}C=C||"text";let ir=await h[a.findKey(h,C)||"text"](H,d);return!lt&&j&&j(),await new Promise((I,J)=>{le(I,J,{data:ir,headers:S.from(H.headers),status:H.status,statusText:H.statusText,config:d,request:ee})})}catch(F){throw j&&j(),F&&F.name==="TypeError"&&/Load failed|fetch/i.test(F.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,d,ee),{cause:F.cause||F}):g.from(F,F&&F.code,d,ee)}}},xn=new Map,Qe=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=xn;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=Qe();var Ye={http:we,xhr:Mt,fetch:{get:Qe}};a.forEach(Ye,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Wt=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,s={};for(let i=0;i<r;i++){n=e[i];let c;if(o=n,!vn(n)&&(o=Ye[(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(Wt).join(`
|
|
5
|
+
`):" "+Wt(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:Rn,adapters:Ye};function Ze(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new U(null,e)}function Le(e){return Ze(e),e.headers=S.from(e.headers),e.data=ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Oe.getAdapter(e.adapter||X.adapter,e)(e).then(function(n){return Ze(e),n.data=ae.call(e,e.transformResponse,n),n.headers=S.from(n.headers),n},function(n){return ce(n)||(Ze(e),n&&n.response&&(n.response.data=ae.call(e,e.transformResponse,n.response),n.response.headers=S.from(n.response.headers))),Promise.reject(n)})}var _e="1.13.2";var Pe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Pe[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var $t={};Pe.transitional=function(t,r,n){function o(s,i){return"[Axios v"+_e+"] 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}};Pe.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 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 fe={assertOptions:An,validators:Pe};var N=fe.validators,Z=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Me,response:new Me}}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=D(this.defaults,r);let{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&fe.assertOptions(n,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean)},!1),o!=null&&(a.isFunction(o)?r.paramsSerializer={serialize:o}:fe.assertOptions(o,{encode:N.function,serialize:N.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),fe.assertOptions(r,{baseUrl:N.spelling("baseURL"),withXsrfToken:N.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 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=Le.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=ue(t.baseURL,t.url,t.allowAbsoluteUrls);return se(r,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){Z.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(s,i,c){return this.request(D(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Z.prototype[t]=r(),Z.prototype[t+"Form"]=r(!0)});var de=Z;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 U(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}}},Jt=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 Vt=nt;function Kt(e){let t=new de(e),r=te(de.prototype.request,t);return a.extend(r,de.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return Kt(D(e,o))},r}var A=Kt(X);A.Axios=de;A.CanceledError=U;A.CancelToken=Jt;A.isCancel=ce;A.VERSION=_e;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=D;A.AxiosHeaders=S;A.formToJSON=e=>Ae(a.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Oe.getAdapter;A.HttpStatusCode=Vt;A.default=A;var De=A;var{Axios:ki,AxiosError:Bi,CanceledError:Mi,isCancel:Hi,CancelToken:Ii,VERSION:qi,all:ji,Cancel:zi,isAxiosError:Wi,spread:$i,toFormData:Ji,AxiosHeaders:Vi,HttpStatusCode:Ki,formToJSON:Gi,getAdapter:Xi,mergeConfig:Qi}=De;var Sn=localStorage.getItem("api-mode"),Tn="http://127.0.0.1:8787",Cn="https://assembled-brands-dev.crystal-e8a.workers.dev",k={apiBaseUrl:Sn==="local"?Tn:Cn,apiVersion:"/api/v1",accessTokenPersistStrategy:"cookie",TOKEN_NAME_IN_STORAGE:"accessToken",TOKEN_TYPE:"Bearer",REQUEST_HEADER_AUTH_KEY:"Authorization"},W=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 On=(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=>{On(e,"",-1)},Gt=()=>{let e=ot("accessToken");return e||W("/login?error=unauthorized"),e},Xt=()=>{st("accessToken"),W("/login?error=logged-out")};var Ln=e=>{let t=k.accessTokenPersistStrategy;if(t==="localStorage"||t==="sessionStorage"||t==="cookie"){let n="";t==="localStorage"&&(n=localStorage.getItem(k.TOKEN_NAME_IN_STORAGE)||""),t==="sessionStorage"&&(n=sessionStorage.getItem(k.TOKEN_NAME_IN_STORAGE)||""),t==="cookie"&&(n=ot(k.TOKEN_NAME_IN_STORAGE)||""),n&&(e.headers[k.REQUEST_HEADER_AUTH_KEY]=`${k.TOKEN_TYPE} ${n}`)}let r=localStorage.getItem("team_id");return r&&(e.headers["X-Team-Id"]=r),e},Qt=Ln;var _n=[401,419,440],Pn=e=>{let{response:t}=e;if(window.location.pathname.includes("/login"))return Promise.reject(e);t&&_n.includes(t.status)&&(st("accessToken"),W("/login?error=unauthorized"))},Yt=Pn;var it=De.create({timeout:6e4,baseURL:k.apiBaseUrl+k.apiVersion});it.interceptors.request.use(e=>Qt(e),e=>Promise.reject(e));it.interceptors.response.use(e=>e,e=>(Yt(e),Promise.reject(e)));var Zt=it;var Dn={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})})})}},pe=Dn;var er=e=>pe.fetchDataWithAxios({url:"/asset",method:"post",data:e});var tr=e=>pe.fetchDataWithAxios({url:"/financial-wizard/document",method:"post",data:e}),rr=()=>pe.fetchDataWithAxios({url:"/financial-wizard/progress",method:"get"});var T=(e,t=document)=>t.querySelector(e);var nr=async()=>{try{let e=await rr(),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",()=>{Xt()}),e}catch(e){console.error("Failed to load financial wizard progress:",e)}},or=()=>{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)}},sr=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()=>{or(),Gt();let e=await nr(),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 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&&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,x(o,s),o.dispatchEvent(new Event("change",{bubbles:!0})))}),o.addEventListener("change",()=>{x(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,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 er(E),b=v.asset.id,{presignedUrl:R}=v;if(!R)throw new Error("Presigned URL not received from server");await new Promise((C,$)=>{let _=new XMLHttpRequest;_.upload.addEventListener("progress",M=>{if(M.lengthComputable){let me=Math.round(M.loaded/M.total*100);console.log(`Upload progress: ${me}%`)}}),_.addEventListener("load",()=>{_.status>=200&&_.status<300?C():$(new Error("Failed to upload file to S3"))}),_.addEventListener("error",M=>{console.error(M),$(new Error("Network error during upload"))}),_.open("PUT",R),_.setRequestHeader("Content-Type",f.type),_.send(f)});let L=await sr(f),B={page:"accounts-inventory",document_type:p,asset_id:b,file_data:L,file_name:f.name,file_mime_type:f.type};await tr(B)};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 b=o.files[0];t.includes(b.type)?E.push({file:b,documentType:"monthly_inventory_report"}):s?.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=""),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,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&&(s.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{Fn()}catch(e){console.error(e)}});
|