@wix/cli-app 1.1.17 → 1.1.18
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/build/{CreateVersionCommand-F7A6HDJI.js → CreateVersionCommand-CHX2UWME.js} +2 -2
- package/build/{DevCommand-KHV22E2S.js → DevCommand-TKHJTH22.js} +2 -2
- package/build/{GenerateCommand-46EMTVWN.js → GenerateCommand-PIRMS3PT.js} +2 -2
- package/build/PreviewCommand-2DQ252RA.js +4 -0
- package/build/{ServeCommand-Z5NQEEE5.js → ServeCommand-XTHWLUDT.js} +2 -2
- package/build/{build-WOV3ZNZF.js → build-QLE4H4H2.js} +2 -2
- package/build/{chunk-RWN7XXN6.js → chunk-3L5LQKB7.js} +2 -2
- package/build/{chunk-PSXIV7FJ.js → chunk-5XZSJPLU.js} +2 -2
- package/build/{chunk-4NIGEF2O.js → chunk-6OPLPT2G.js} +33 -33
- package/build/chunk-6OPLPT2G.js.map +1 -0
- package/build/chunk-6R3ZFQVO.js +27 -0
- package/build/chunk-6R3ZFQVO.js.map +1 -0
- package/build/chunk-7JJKVPKL.js +6 -0
- package/build/chunk-7JJKVPKL.js.map +1 -0
- package/build/{chunk-G7NSXRI7.js → chunk-BGSKNKJF.js} +2 -2
- package/build/{chunk-RYS7G2PY.js → chunk-BKNV2B7T.js} +2 -2
- package/build/{chunk-GHVN7KTY.js → chunk-HLCGKBPK.js} +2 -2
- package/build/{chunk-GHVN7KTY.js.map → chunk-HLCGKBPK.js.map} +1 -1
- package/build/{chunk-ZIVYB6TM.js → chunk-O4DV7EH5.js} +2 -2
- package/build/{chunk-QW5H4VGJ.js → chunk-PE3RXVKE.js} +2 -2
- package/build/{chunk-JIUANWPO.js → chunk-PYBYLDJB.js} +2 -2
- package/build/{chunk-3EQ4ZYU2.js → chunk-QBIV5U5A.js} +2 -2
- package/build/{chunk-7TOOBLT6.js → chunk-RCDIKBVN.js} +2 -2
- package/build/{chunk-LT3WXWI5.js → chunk-RDIPEKL2.js} +2 -2
- package/build/{chunk-CUWQRNQL.js → chunk-SIP7BHV7.js} +2 -2
- package/build/{chunk-KK4X6NH5.js → chunk-TBT2V5T7.js} +2 -2
- package/build/{chunk-KK4X6NH5.js.map → chunk-TBT2V5T7.js.map} +1 -1
- package/build/{chunk-EH27FYQH.js → chunk-UQ7NP6NA.js} +2 -2
- package/build/chunk-XHPVJXDY.js +73 -0
- package/build/{chunk-YWJFUO7I.js.map → chunk-XHPVJXDY.js.map} +1 -1
- package/build/{chunk-7IB3ZF3I.js → chunk-XYNUUMC2.js} +2 -2
- package/build/{esm-CECOC7V2.js → esm-QEHFRL6L.js} +3 -3
- package/build/esm-QEHFRL6L.js.map +1 -0
- package/build/index.js +2 -2
- package/build/{preview-FV7ZP3YC.js → preview-LQ6YX5QD.js} +2 -2
- package/build/{render-command-JEBHYUZV.js → render-command-PDPDZKND.js} +2 -2
- package/package.json +5 -5
- package/build/PreviewCommand-XX7TWOJR.js +0 -4
- package/build/chunk-4NIGEF2O.js.map +0 -1
- package/build/chunk-62RRZRN6.js +0 -6
- package/build/chunk-62RRZRN6.js.map +0 -1
- package/build/chunk-LW6PZKOJ.js +0 -27
- package/build/chunk-LW6PZKOJ.js.map +0 -1
- package/build/chunk-YWJFUO7I.js +0 -73
- package/build/esm-CECOC7V2.js.map +0 -1
- /package/build/{CreateVersionCommand-F7A6HDJI.js.map → CreateVersionCommand-CHX2UWME.js.map} +0 -0
- /package/build/{DevCommand-KHV22E2S.js.map → DevCommand-TKHJTH22.js.map} +0 -0
- /package/build/{GenerateCommand-46EMTVWN.js.map → GenerateCommand-PIRMS3PT.js.map} +0 -0
- /package/build/{PreviewCommand-XX7TWOJR.js.map → PreviewCommand-2DQ252RA.js.map} +0 -0
- /package/build/{ServeCommand-Z5NQEEE5.js.map → ServeCommand-XTHWLUDT.js.map} +0 -0
- /package/build/{build-WOV3ZNZF.js.map → build-QLE4H4H2.js.map} +0 -0
- /package/build/{chunk-RWN7XXN6.js.map → chunk-3L5LQKB7.js.map} +0 -0
- /package/build/{chunk-PSXIV7FJ.js.map → chunk-5XZSJPLU.js.map} +0 -0
- /package/build/{chunk-G7NSXRI7.js.map → chunk-BGSKNKJF.js.map} +0 -0
- /package/build/{chunk-RYS7G2PY.js.map → chunk-BKNV2B7T.js.map} +0 -0
- /package/build/{chunk-ZIVYB6TM.js.map → chunk-O4DV7EH5.js.map} +0 -0
- /package/build/{chunk-QW5H4VGJ.js.map → chunk-PE3RXVKE.js.map} +0 -0
- /package/build/{chunk-JIUANWPO.js.map → chunk-PYBYLDJB.js.map} +0 -0
- /package/build/{chunk-3EQ4ZYU2.js.map → chunk-QBIV5U5A.js.map} +0 -0
- /package/build/{chunk-7TOOBLT6.js.map → chunk-RCDIKBVN.js.map} +0 -0
- /package/build/{chunk-LT3WXWI5.js.map → chunk-RDIPEKL2.js.map} +0 -0
- /package/build/{chunk-CUWQRNQL.js.map → chunk-SIP7BHV7.js.map} +0 -0
- /package/build/{chunk-EH27FYQH.js.map → chunk-UQ7NP6NA.js.map} +0 -0
- /package/build/{chunk-7IB3ZF3I.js.map → chunk-XYNUUMC2.js.map} +0 -0
- /package/build/{preview-FV7ZP3YC.js.map → preview-LQ6YX5QD.js.map} +0 -0
- /package/build/{render-command-JEBHYUZV.js.map → render-command-PDPDZKND.js.map} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
+
const require = _createRequire(import.meta.url);
|
|
3
|
+
import{A as Se,D as Ho,a as ut,b as ct,d as ee,e as Ce,f as ko,g as _,l as Do,q as Qt,r as Lo,s as er,t as dt,u as Uo,w as Te,x as Mo}from"./chunk-6OPLPT2G.js";import{a as Xt,d as No,e as Io,f as Zt}from"./chunk-XHPVJXDY.js";import{a as me,c as j,d as Q,f as qo,g as Po,h as C,i as be}from"./chunk-7JJKVPKL.js";import{a as N,b as J,c as x,d as Ro,e as W,f as Ae,g as l,h as s}from"./chunk-HFDLXX7R.js";var He=x(G=>{"use strict";s();Object.defineProperty(G,"__esModule",{value:!0});G.ORIGINAL_PROTOCOL_HEADER=G.ORIGINAL_HOST_HEADER=G.ORIGINAL_URL_HEADER=G.SSR_PROTOCOL=G.SSR_HOST=G.NO_SCENARIO_FOUND=void 0;G.NO_SCENARIO_FOUND="NO_SCENARIO_FOUND";G.SSR_HOST="www.wix.com";G.SSR_PROTOCOL="http";G.ORIGINAL_URL_HEADER="x-wix-metro-original-url";G.ORIGINAL_HOST_HEADER="x-wix-metro-original-host";G.ORIGINAL_PROTOCOL_HEADER="x-wix-metro-original-protocol"});function Jo(){if(typeof document=="object")return document}function he(){return typeof self=="object"?self:global}var je=J(()=>{"use strict";s()});function Go(t){let e=Na(t);return e?e.split("=")[1]:""}function Pa(){let t=Jo();return t&&t.cookie?decodeURIComponent(t.cookie).split(";"):[]}function Na(t){return Pa().filter(e=>t===e.split("=")[0].trim())[0]}var $o=J(()=>{"use strict";s();je()});function zo(){let t=Go(Ia);return{[ka]:t}}var Ia,ka,Wo=J(()=>{"use strict";s();$o();Ia="XSRF-TOKEN",ka="x-xsrf-token"});function Vo(){let t=La();return{[Da]:t}}function La(){let t=he();return t&&t.commonConfig&&typeof t.commonConfig.brand=="string"?t.commonConfig.brand:""}var Da,Ko=J(()=>{"use strict";s();je();Da="x-wix-brand"});function Yo(){return Ma()||Ua()||Ha()}function Ua(){let t=he();if(t&&t.Wix&&t.Wix.Utils&&typeof t.Wix.Utils._getConsentPolicyHeader=="function")return t.Wix.Utils._getConsentPolicyHeader()}function Ma(){let t=he();if(t&&t.consentPolicyManager&&typeof t.consentPolicyManager._getConsentPolicyHeader=="function")return t.consentPolicyManager._getConsentPolicyHeader()}function Ha(){return{}}var Xo=J(()=>{"use strict";s();je()});function Zo(t){return{authorization:t}}var Qo=J(()=>{"use strict";s()});function en(){return ja()?!!process.env.TEAMCITY_VERSION||!!process.env.BUILDKITE:!1}function ja(){return typeof process<"u"&&process.versions?.node!=null}var tn=J(()=>{"use strict";s()});function rn(t){let e=process.env.ARTIFACT_ID??process.env.APP_NAME??"";return{"X-Wix-Client-Artifact-Id":t??(en()?"":e)}}var on=J(()=>{"use strict";s();tn()});function $a(){let e=he()?.commonConfig;if(!e)return null;let r={},o=!1;return Object.keys(e).forEach(n=>{let i=Ga[n];i?(r[i]=e[n],o=!0):Ba.indexOf(n)<0&&typeof e[n]!="function"&&(r[n]=e[n],o=!0)}),o?r:null}var Ba,Ja,Ga,nn,sn=J(()=>{"use strict";s();je();Ba=["consentPolicy","consentPolicyHeader"],Ja="commonConfig",Ga={bsi:"BSI"};nn=()=>{let t=$a(),e=t?JSON.stringify(t):"";return{[Ja]:encodeURIComponent(e)}}});var an=x((lt,Be)=>{"use strict";s();(function(t){var e=typeof lt=="object"&<,r=typeof Be=="object"&&Be&&Be.exports==e&&Be,o=typeof global=="object"&&global;(o.global===o||o.window===o)&&(t=o);var n=function(m){this.message=m};n.prototype=new Error,n.prototype.name="InvalidCharacterError";var i=function(m){throw new n(m)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,c=function(m){m=String(m).replace(d,"");var y=m.length;y%4==0&&(m=m.replace(/==?$/,""),y=m.length),(y%4==1||/[^+a-zA-Z0-9/]/.test(m))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var A=0,w,b,R="",M=-1;++M<y;)b=a.indexOf(m.charAt(M)),w=A%4?w*64+b:b,A++%4&&(R+=String.fromCharCode(255&w>>(-2*A&6)));return R},g=function(m){m=String(m),/[^\0-\xFF]/.test(m)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var y=m.length%3,A="",w=-1,b,R,M,P,O=m.length-y;++w<O;)b=m.charCodeAt(w)<<16,R=m.charCodeAt(++w)<<8,M=m.charCodeAt(++w),P=b+R+M,A+=a.charAt(P>>18&63)+a.charAt(P>>12&63)+a.charAt(P>>6&63)+a.charAt(P&63);return y==2?(b=m.charCodeAt(w)<<8,R=m.charCodeAt(++w),P=b+R,A+=a.charAt(P>>10)+a.charAt(P>>4&63)+a.charAt(P<<2&63)+"="):y==1&&(P=m.charCodeAt(w),A+=a.charAt(P>>2)+a.charAt(P<<4&63)+"=="),A},p={encode:g,decode:c,version:"1.0.0"};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define(function(){return p});else if(e&&!e.nodeType)if(r)r.exports=p;else for(var h in p)p.hasOwnProperty(h)&&(e[h]=p[h]);else t.base64=p})(lt)});function cn({lang:t,locale:e,isPrimaryLanguage:r,signedInstance:o}){if(Wa({lang:t,locale:e,isPrimaryLanguage:r})){let n=Va(o);if(n!==void 0)return{[za]:[t,e,r?.toString(),n].join("|")}}return{}}function Wa({lang:t,locale:e,isPrimaryLanguage:r}){return t&&e&&/^(true|false)$/.test(r?.toString()||"")}function Va(t){try{let e=t?.startsWith("wixcode")?t?.split(".")[2]:t?.split(".")[1];if(e)return JSON.parse(un.default.decode(e)).instanceId}catch{}}var un,za,dn=J(()=>{"use strict";s();un=W(an()),za="x-wix-linguist"});var Je,ln=J(()=>{"use strict";s();Je=class extends Error{constructor(e,r,o){super(`WixHeadersValidationError: expected ${r} to be ${e} but got ${JSON.stringify(o)}`)}}});function pn(t,e){if(typeof e!="boolean")throw new Je("boolean",t,e)}function fn(t,e){if(typeof e!="string")throw new Je("string",t,e)}var mn=J(()=>{"use strict";s();ln()});var hn={};Ro(hn,{createHeaders:()=>Ka});function Ka(t={}){t={csrf:!0,signedInstance:"",...t},Ya(t);let e=[Vo(),Yo(),Zo(t.signedInstance),rn(t.artifactId),nn(),cn({signedInstance:t.signedInstance,...t.multilingualOptions})];return t.csrf&&e.push(zo()),e.filter(r=>Object.values(r).every(o=>o)).reduce((r,o)=>({...r,...o}),{})}function Ya(t){pn("opts.csrf",t.csrf),fn("opts.signedInstance",t.signedInstance)}var vn=J(()=>{"use strict";s();Wo();Ko();Xo();Qo();on();sn();dn();mn()});var or=x(de=>{"use strict";s();Object.defineProperty(de,"__esModule",{value:!0});de.isNode=de.isWebWorker=de.isBrowser=void 0;function Xa(){return typeof window<"u"}de.isBrowser=Xa;function Za(){var t;return typeof self=="object"&&((t=self?.constructor)===null||t===void 0?void 0:t.name)==="DedicatedWorkerGlobalScope"}de.isWebWorker=Za;function Qa(){var t;return typeof process<"u"&&((t=process==null?void 0:process.versions)===null||t===void 0?void 0:t.node)!=null}de.isNode=Qa});var pt=x(S=>{"use strict";s();Object.defineProperty(S,"__esModule",{value:!0});S.toSearchQueryParams=S.shouldAllowUnmocked=S.isHttpMockServerEnabled=S.getGlobalConfig=S.changeHost=S.extractHost=S.extractProtocol=S.resolveProtocol=S.resolveHost=S.extractProp=S.silent=S.isAbsoluteUrl=void 0;var gn=He(),nr=or();function eu(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return/(^https?:)|(^\/\/)/.test(t)}S.isAbsoluteUrl=eu;async function tu(t){try{await t()}catch{}}S.silent=tu;function ru(t,e){return e.split(".").filter(r=>r).reduce((r,o)=>r[o],t)}S.extractProp=ru;function ou(t){return t.baseURL?xn(t.baseURL):t.isSSR?gn.SSR_HOST:typeof self<"u"&&self.location?self.location.host:""}S.resolveHost=ou;function nu(t){return t.baseURL?yn(t.baseURL):t.isSSR?gn.SSR_PROTOCOL:typeof self<"u"&&self.location?self.location.protocol:""}S.resolveProtocol=nu;function yn(t){try{return new URL(t).protocol}catch{return _n(t).protocol}}S.extractProtocol=yn;function xn(t){let e;try{e=new URL(t)}catch{e=new URL(`http:${t}`)}try{return e.host}catch{return _n(t).host}}S.extractHost=xn;function _n(t){let e=new RegExp("^(.*:)//([A-Za-z0-9-.]+)(:[0-9]+)?(.*)$");try{let r=e.exec(t);return{protocol:r[1],host:r[2]}}catch{return{protocol:"http:",host:""}}}function su(t,e){let r;try{r=new URL(t),r.host=e,r.protocol="http"}catch{r=new URL(`http://${e}`),r.pathname=t}return r.toString()}S.changeHost=su;function sr(){let t={httpMockServer:{enabled:!1}},e;if((0,nr.isNode)()&&process.env.HTTP_CLIENT_GLOBAL_CONFIG)try{e=JSON.parse(process.env.HTTP_CLIENT_GLOBAL_CONFIG)}catch{}return e||((0,nr.isBrowser)()?e=window._httpClientGlobalConfig:(0,nr.isWebWorker)()),e||t}S.getGlobalConfig=sr;function iu(){return sr().httpMockServer.enabled}S.isHttpMockServerEnabled=iu;function au(){return sr().httpMockServer.allowUnmocked}S.shouldAllowUnmocked=au;function uu(t){return Object.entries(t).map(([e,r])=>`${e}=${encodeURIComponent(r)}`).flat().join("&")}S.toSearchQueryParams=uu});var wn=x((Jp,cu)=>{cu.exports=["wix.com","editorx.com","wix-code.com","wixapps.net","wixprod.net"]});var ft=x(le=>{"use strict";s();Object.defineProperty(le,"__esModule",{value:!0});le.isWixDomain=le.composeHeaders=le.requestIdOrEmptyString=void 0;var du=(ct(),Ae(ut)),lu=(vn(),Ae(hn)),An=pt(),pu=du.__importDefault(wn());function fu(t){var e;return((e=t?.headers)===null||e===void 0?void 0:e["x-wix-request-id"])||""}le.requestIdOrEmptyString=fu;var mu=({url:t,disableWixHeaders:e,wixHeadersOpts:r})=>!e&&bn(t)?(0,lu.createHeaders)(r):{};le.composeHeaders=mu;function bn(t){if(!(0,An.isAbsoluteUrl)(t))return!0;let r=`.${(0,An.extractHost)(t)}`;return!!pu.default.find(n=>r.endsWith(`.${n}`))}le.isWixDomain=bn});var ir=x(ie=>{"use strict";s();Object.defineProperty(ie,"__esModule",{value:!0});ie.createHttpError=ie.HttpError=ie.axiosErrorFields=void 0;var hu=ft();ie.axiosErrorFields=["code","config","request","response","toJSON","__CANCEL__"];var mt=class t extends Error{constructor(e){super(e.message),this.isWixHttpError=!0,Object.setPrototypeOf(this,t.prototype),ie.axiosErrorFields.forEach(r=>{this[r]=e[r]})}get requestId(){return(0,hu.requestIdOrEmptyString)(this.response)}};ie.HttpError=mt;function vu(...t){return new mt(...t)}ie.createHttpError=vu});var ar=x((Vp,Cn)=>{"use strict";s();Cn.exports=function(e,r){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(r,n)}}});var B=x((Yp,On)=>{"use strict";s();var gu=ar(),ve=Object.prototype.toString;function dr(t){return ve.call(t)==="[object Array]"}function ur(t){return typeof t>"u"}function yu(t){return t!==null&&!ur(t)&&t.constructor!==null&&!ur(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function xu(t){return ve.call(t)==="[object ArrayBuffer]"}function _u(t){return typeof FormData<"u"&&t instanceof FormData}function wu(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function Au(t){return typeof t=="string"}function bu(t){return typeof t=="number"}function Tn(t){return t!==null&&typeof t=="object"}function ht(t){if(ve.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Cu(t){return ve.call(t)==="[object Date]"}function Tu(t){return ve.call(t)==="[object File]"}function Su(t){return ve.call(t)==="[object Blob]"}function Sn(t){return ve.call(t)==="[object Function]"}function Ou(t){return Tn(t)&&Sn(t.pipe)}function Eu(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function Fu(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Ru(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function lr(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),dr(t))for(var r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.call(null,t[n],n,t)}function cr(){var t={};function e(n,i){ht(t[i])&&ht(n)?t[i]=cr(t[i],n):ht(n)?t[i]=cr({},n):dr(n)?t[i]=n.slice():t[i]=n}for(var r=0,o=arguments.length;r<o;r++)lr(arguments[r],e);return t}function qu(t,e,r){return lr(e,function(n,i){r&&typeof n=="function"?t[i]=gu(n,r):t[i]=n}),t}function Pu(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}On.exports={isArray:dr,isArrayBuffer:xu,isBuffer:yu,isFormData:_u,isArrayBufferView:wu,isString:Au,isNumber:bu,isObject:Tn,isPlainObject:ht,isUndefined:ur,isDate:Cu,isFile:Tu,isBlob:Su,isFunction:Sn,isStream:Ou,isURLSearchParams:Eu,isStandardBrowserEnv:Ru,forEach:lr,merge:cr,extend:qu,trim:Fu,stripBOM:Pu}});var vt=x((Zp,En)=>{"use strict";s();En.exports=function(e,r,o,n,i){return e.config=r,o&&(e.code=o),e.request=n,e.response=i,e.isAxiosError=!0,e.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:this.config,code:this.code}},e}});var gt=x((ef,Fn)=>{"use strict";s();var Nu=vt();Fn.exports=function(e,r,o,n,i){var a=new Error(e);return Nu(a,r,o,n,i)}});var pr=x((rf,Rn)=>{"use strict";s();var Iu=gt();Rn.exports=function(e,r,o){var n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):r(Iu("Request failed with status code "+o.status,o.config,null,o.request,o))}});var Pn=x((nf,qn)=>{"use strict";s();qn.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var In=x((af,Nn)=>{"use strict";s();Nn.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var fr=x((cf,kn)=>{"use strict";s();var ku=Pn(),Du=In();kn.exports=function(e,r){return e&&!ku(r)?Du(e,r):r}});var yt=x((lf,Ln)=>{"use strict";s();var Oe=B();function Dn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}Ln.exports=function(e,r,o){if(!r)return e;var n;if(o)n=o(r);else if(Oe.isURLSearchParams(r))n=r.toString();else{var i=[];Oe.forEach(r,function(c,g){c===null||typeof c>"u"||(Oe.isArray(c)?g=g+"[]":c=[c],Oe.forEach(c,function(h){Oe.isDate(h)?h=h.toISOString():Oe.isObject(h)&&(h=JSON.stringify(h)),i.push(Dn(g)+"="+Dn(h))}))}),n=i.join("&")}if(n){var a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}});var Mn=x((ff,Un)=>{"use strict";s();var Ee=1e3,Fe=Ee*60,Re=Fe*60,ge=Re*24,Lu=ge*7,Uu=ge*365.25;Un.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Mu(t);if(r==="number"&&isFinite(t))return e.long?ju(t):Hu(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Mu(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*Uu;case"weeks":case"week":case"w":return r*Lu;case"days":case"day":case"d":return r*ge;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Re;case"minutes":case"minute":case"mins":case"min":case"m":return r*Fe;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ee;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Hu(t){var e=Math.abs(t);return e>=ge?Math.round(t/ge)+"d":e>=Re?Math.round(t/Re)+"h":e>=Fe?Math.round(t/Fe)+"m":e>=Ee?Math.round(t/Ee)+"s":t+"ms"}function ju(t){var e=Math.abs(t);return e>=ge?xt(t,e,ge,"day"):e>=Re?xt(t,e,Re,"hour"):e>=Fe?xt(t,e,Fe,"minute"):e>=Ee?xt(t,e,Ee,"second"):t+" ms"}function xt(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var mr=x((hf,Hn)=>{"use strict";s();function Bu(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=Mn(),r.destroy=g,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let h=0;for(let m=0;m<p.length;m++)h=(h<<5)-h+p.charCodeAt(m),h|=0;return r.colors[Math.abs(h)%r.colors.length]}r.selectColor=e;function r(p){let h,m=null,y,A;function w(...b){if(!w.enabled)return;let R=w,M=Number(new Date),P=M-(h||M);R.diff=P,R.prev=h,R.curr=M,h=M,b[0]=r.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let O=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(we,ot)=>{if(we==="%%")return"%";O++;let ue=r.formatters[ot];if(typeof ue=="function"){let nt=b[O];we=ue.call(R,nt),b.splice(O,1),O--}return we}),r.formatArgs.call(R,b),(R.log||r.log).apply(R,b)}return w.namespace=p,w.useColors=r.useColors(),w.color=r.selectColor(p),w.extend=o,w.destroy=r.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(y!==r.namespaces&&(y=r.namespaces,A=r.enabled(p)),A),set:b=>{m=b}}),typeof r.init=="function"&&r.init(w),w}function o(p,h){let m=r(this.namespace+(typeof h>"u"?":":h)+p);return m.log=this.log,m}function n(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let h,m=(typeof p=="string"?p:"").split(/[\s,]+/),y=m.length;for(h=0;h<y;h++)m[h]&&(p=m[h].replace(/\*/g,".*?"),p[0]==="-"?r.skips.push(new RegExp("^"+p.slice(1)+"$")):r.names.push(new RegExp("^"+p+"$")))}function i(){let p=[...r.names.map(d),...r.skips.map(d).map(h=>"-"+h)].join(",");return r.enable(""),p}function a(p){if(p[p.length-1]==="*")return!0;let h,m;for(h=0,m=r.skips.length;h<m;h++)if(r.skips[h].test(p))return!1;for(h=0,m=r.names.length;h<m;h++)if(r.names[h].test(p))return!0;return!1}function d(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}function c(p){return p instanceof Error?p.stack||p.message:p}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Hn.exports=Bu});var jn=x((V,_t)=>{"use strict";s();V.formatArgs=Gu;V.save=$u;V.load=zu;V.useColors=Ju;V.storage=Wu();V.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();V.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Ju(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Gu(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+_t.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),t.splice(o,0,e)}V.log=console.debug||console.log||(()=>{});function $u(t){try{t?V.storage.setItem("debug",t):V.storage.removeItem("debug")}catch{}}function zu(){let t;try{t=V.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Wu(){try{return localStorage}catch{}}_t.exports=mr()(V);var{formatters:Vu}=_t.exports;Vu.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Jn={};Ro(Jn,{createSupportsColor:()=>hr,default:()=>ec});import vr from"node:process";import Ku from"node:os";import Bn from"node:tty";function Y(t,e=vr.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",o=e.indexOf(r+t),n=e.indexOf("--");return o!==-1&&(n===-1||o<n)}function Yu(){if("FORCE_COLOR"in E)return E.FORCE_COLOR==="true"?1:E.FORCE_COLOR==="false"?0:E.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(E.FORCE_COLOR,10),3)}function Xu(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Zu(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let o=Yu();o!==void 0&&(wt=o);let n=r?wt:o;if(n===0)return 0;if(r){if(Y("color=16m")||Y("color=full")||Y("color=truecolor"))return 3;if(Y("color=256"))return 2}if(t&&!e&&n===void 0)return 0;let i=n||0;if(E.TERM==="dumb")return i;if(vr.platform==="win32"){let a=Ku.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in E)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(a=>a in E)||E.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in E)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(E.TEAMCITY_VERSION)?1:0;if("TF_BUILD"in E&&"AGENT_NAME"in E)return 1;if(E.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in E){let a=Number.parseInt((E.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(E.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(E.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(E.TERM)||"COLORTERM"in E?1:i}function hr(t,e={}){let r=Zu(t,{streamIsTTY:t&&t.isTTY,...e});return Xu(r)}var E,wt,Qu,ec,Gn=J(()=>{"use strict";s();({env:E}=vr);Y("no-color")||Y("no-colors")||Y("color=false")||Y("color=never")?wt=0:(Y("color")||Y("colors")||Y("color=true")||Y("color=always"))&&(wt=1);Qu={stdout:hr({isTTY:Bn.isatty(1)}),stderr:hr({isTTY:Bn.isatty(2)})},ec=Qu});var zn=x((I,bt)=>{"use strict";s();var tc=N("tty"),At=N("util");I.init=uc;I.log=sc;I.formatArgs=oc;I.save=ic;I.load=ac;I.useColors=rc;I.destroy=At.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");I.colors=[6,2,3,4,5,1];try{let t=(Gn(),Ae(Jn));t&&(t.stderr||t).level>=2&&(I.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}I.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,i)=>i.toUpperCase()),o=process.env[e];return/^(yes|on|true|enabled)$/i.test(o)?o=!0:/^(no|off|false|disabled)$/i.test(o)?o=!1:o==="null"?o=null:o=Number(o),t[r]=o,t},{});function rc(){return"colors"in I.inspectOpts?!!I.inspectOpts.colors:tc.isatty(process.stderr.fd)}function oc(t){let{namespace:e,useColors:r}=this;if(r){let o=this.color,n="\x1B[3"+(o<8?o:"8;5;"+o),i=` ${n};1m${e} \x1B[0m`;t[0]=i+t[0].split(`
|
|
4
|
+
`).join(`
|
|
5
|
+
`+i),t.push(n+"m+"+bt.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=nc()+e+" "+t[0]}function nc(){return I.inspectOpts.hideDate?"":new Date().toISOString()+" "}function sc(...t){return process.stderr.write(At.format(...t)+`
|
|
6
|
+
`)}function ic(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function ac(){return process.env.DEBUG}function uc(t){t.inspectOpts={};let e=Object.keys(I.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=I.inspectOpts[e[r]]}bt.exports=mr()(I);var{formatters:$n}=bt.exports;$n.o=function(t){return this.inspectOpts.colors=this.useColors,At.inspect(t,this.inspectOpts).split(`
|
|
7
|
+
`).map(e=>e.trim()).join(" ")};$n.O=function(t){return this.inspectOpts.colors=this.useColors,At.inspect(t,this.inspectOpts)}});var Wn=x((bf,gr)=>{"use strict";s();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?gr.exports=jn():gr.exports=zn()});var Kn=x((Tf,Vn)=>{"use strict";s();var Ge;Vn.exports=function(){if(!Ge){try{Ge=Wn()("follow-redirects")}catch{}typeof Ge!="function"&&(Ge=function(){})}Ge.apply(null,arguments)}});var Rr=x((Of,Fr)=>{"use strict";s();var We=N("url"),$e=We.URL,cc=N("http"),dc=N("https"),Ar=N("stream").Writable,br=N("assert"),Yn=Kn(),Cr=!1;try{br(new $e)}catch(t){Cr=t.code==="ERR_INVALID_URL"}var lc=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Tr=["abort","aborted","connect","error","socket","timeout"],Sr=Object.create(null);Tr.forEach(function(t){Sr[t]=function(e,r,o){this._redirectable.emit(t,e,r,o)}});var xr=Ve("ERR_INVALID_URL","Invalid URL",TypeError),_r=Ve("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),pc=Ve("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",_r),fc=Ve("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),mc=Ve("ERR_STREAM_WRITE_AFTER_END","write after end"),hc=Ar.prototype.destroy||Zn;function $(t,e){Ar.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(o){try{r._processResponse(o)}catch(n){r.emit("error",n instanceof _r?n:new _r({cause:n}))}},this._performRequest()}$.prototype=Object.create(Ar.prototype);$.prototype.abort=function(){Er(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};$.prototype.destroy=function(t){return Er(this._currentRequest,t),hc.call(this,t),this};$.prototype.write=function(t,e,r){if(this._ending)throw new mc;if(!ye(t)&&!yc(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(ze(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new fc),this.abort())};$.prototype.end=function(t,e,r){if(ze(t)?(r=t,t=e=null):ze(e)&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var o=this,n=this._currentRequest;this.write(t,e,function(){o._ended=!0,n.end(null,null,r)}),this._ending=!0}};$.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};$.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};$.prototype.setTimeout=function(t,e){var r=this;function o(a){a.setTimeout(t),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}function n(a){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),i()},t),o(a)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",n)}return e&&this.on("timeout",e),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",o),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){$.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty($.prototype,t,{get:function(){return this._currentRequest[t]}})});$.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};$.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var o=this._currentRequest=e.request(this._options,this._onNativeResponse);o._redirectable=this;for(var n of Tr)o.on(n,Sr[n]);if(this._currentUrl=/^\//.test(this._options.path)?We.format(this._options):this._options.path,this._isRedirect){var i=0,a=this,d=this._requestBodyBuffers;(function c(g){if(o===a._currentRequest)if(g)a.emit("error",g);else if(i<d.length){var p=d[i++];o.finished||o.write(p.data,p.encoding,c)}else a._ended&&o.end()})()}};$.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(Er(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new pc;var o,n=this._options.beforeRedirect;n&&(o=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var i=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],yr(/^content-/i,this._options.headers));var a=yr(/^host$/i,this._options.headers),d=Or(this._currentUrl),c=a||d.host,g=/^\w+:/.test(r)?this._currentUrl:We.format(Object.assign(d,{host:c})),p=vc(r,g);if(Yn("redirecting to",p.href),this._isRedirect=!0,wr(p,this._options),(p.protocol!==d.protocol&&p.protocol!=="https:"||p.host!==c&&!gc(p.host,c))&&yr(/^(?:authorization|cookie)$/i,this._options.headers),ze(n)){var h={headers:t.headers,statusCode:e},m={url:g,method:i,headers:o};n(this._options,h,m),this._sanitizeOptions(this._options)}this._performRequest()};function Xn(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(o){var n=o+":",i=r[n]=t[o],a=e[o]=Object.create(i);function d(g,p,h){return xc(g)?g=wr(g):ye(g)?g=wr(Or(g)):(h=p,p=Qn(g),g={protocol:n}),ze(p)&&(h=p,p=null),p=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},g,p),p.nativeProtocols=r,!ye(p.host)&&!ye(p.hostname)&&(p.hostname="::1"),br.equal(p.protocol,n,"protocol mismatch"),Yn("options",p),new $(p,h)}function c(g,p,h){var m=a.request(g,p,h);return m.end(),m}Object.defineProperties(a,{request:{value:d,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function Zn(){}function Or(t){var e;if(Cr)e=new $e(t);else if(e=Qn(We.parse(t)),!ye(e.protocol))throw new xr({input:t});return e}function vc(t,e){return Cr?new $e(t,e):Or(We.resolve(e,t))}function Qn(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new xr({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new xr({input:t.href||t});return t}function wr(t,e){var r=e||{};for(var o of lc)r[o]=t[o];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function yr(t,e){var r;for(var o in e)t.test(o)&&(r=e[o],delete e[o]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Ve(t,e,r){function o(n){Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return o.prototype=new(r||Error),Object.defineProperties(o.prototype,{constructor:{value:o,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),o}function Er(t,e){for(var r of Tr)t.removeListener(r,Sr[r]);t.on("error",Zn),t.destroy(e)}function gc(t,e){br(ye(t)&&ye(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function ye(t){return typeof t=="string"||t instanceof String}function ze(t){return typeof t=="function"}function yc(t){return typeof t=="object"&&"length"in t}function xc(t){return $e&&t instanceof $e}Fr.exports=Xn({http:cc,https:dc});Fr.exports.wrap=Xn});var qr=x((Ff,_c)=>{_c.exports={name:"axios",version:"0.21.4",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]}});var Tt=x((Rf,ns)=>{"use strict";s();var Ke=B(),es=pr(),wc=fr(),Ac=yt(),bc=N("http"),Cc=N("https"),Tc=Rr().http,Sc=Rr().https,ts=N("url"),Oc=N("zlib"),Ec=qr(),Ct=gt(),Pr=vt(),rs=/https:?/;function os(t,e,r){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=r,e.auth){var o=Buffer.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+o}t.beforeRedirect=function(i){i.headers.host=i.host,os(i,e,i.href)}}ns.exports=function(e){return new Promise(function(o,n){var i=function(T){o(T)},a=function(T){n(T)},d=e.data,c=e.headers;if("User-Agent"in c||"user-agent"in c?!c["User-Agent"]&&!c["user-agent"]&&(delete c["User-Agent"],delete c["user-agent"]):c["User-Agent"]="axios/"+Ec.version,d&&!Ke.isStream(d)){if(!Buffer.isBuffer(d))if(Ke.isArrayBuffer(d))d=Buffer.from(new Uint8Array(d));else if(Ke.isString(d))d=Buffer.from(d,"utf-8");else return a(Ct("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=d.length}var g=void 0;if(e.auth){var p=e.auth.username||"",h=e.auth.password||"";g=p+":"+h}var m=wc(e.baseURL,e.url),y=ts.parse(m),A=y.protocol||"http:";if(!g&&y.auth){var w=y.auth.split(":"),b=w[0]||"",R=w[1]||"";g=b+":"+R}g&&delete c.Authorization;var M=rs.test(A),P=M?e.httpsAgent:e.httpAgent,O={path:Ac(y.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:P,agents:{http:e.httpAgent,https:e.httpsAgent},auth:g};e.socketPath?O.socketPath=e.socketPath:(O.hostname=y.hostname,O.port=y.port);var Z=e.proxy;if(!Z&&Z!==!1){var we=A.slice(0,-1)+"_proxy",ot=process.env[we]||process.env[we.toUpperCase()];if(ot){var ue=ts.parse(ot),nt=process.env.no_proxy||process.env.NO_PROXY,Co=!0;if(nt){var ba=nt.split(",").map(function(T){return T.trim()});Co=!ba.some(function(T){return T?T==="*"||T[0]==="."&&y.hostname.substr(y.hostname.length-T.length)===T?!0:y.hostname===T:!1})}if(Co&&(Z={host:ue.hostname,port:ue.port,protocol:ue.protocol},ue.auth)){var To=ue.auth.split(":");Z.auth={username:To[0],password:To[1]}}}}Z&&(O.headers.host=y.hostname+(y.port?":"+y.port:""),os(O,Z,A+"//"+y.hostname+(y.port?":"+y.port:"")+O.path));var st,So=M&&(Z?rs.test(Z.protocol):!0);e.transport?st=e.transport:e.maxRedirects===0?st=So?Cc:bc:(e.maxRedirects&&(O.maxRedirects=e.maxRedirects),st=So?Sc:Tc),e.maxBodyLength>-1&&(O.maxBodyLength=e.maxBodyLength);var H=st.request(O,function(T){if(!H.aborted){var fe=T,it=T.req||H;if(T.statusCode!==204&&it.method!=="HEAD"&&e.decompress!==!1)switch(T.headers["content-encoding"]){case"gzip":case"compress":case"deflate":fe=fe.pipe(Oc.createUnzip()),delete T.headers["content-encoding"];break}var at={status:T.statusCode,statusText:T.statusMessage,headers:T.headers,config:e,request:it};if(e.responseType==="stream")at.data=fe,es(i,a,at);else{var Oo=[],Eo=0;fe.on("data",function(oe){Oo.push(oe),Eo+=oe.length,e.maxContentLength>-1&&Eo>e.maxContentLength&&(fe.destroy(),a(Ct("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,it)))}),fe.on("error",function(oe){H.aborted||a(Pr(oe,e,null,it))}),fe.on("end",function(){var oe=Buffer.concat(Oo);e.responseType!=="arraybuffer"&&(oe=oe.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(oe=Ke.stripBOM(oe))),at.data=oe,es(i,a,at)})}}});if(H.on("error",function(T){H.aborted&&T.code!=="ERR_FR_TOO_MANY_REDIRECTS"||a(Pr(T,e,null,H))}),e.timeout){var Yt=parseInt(e.timeout,10);if(isNaN(Yt)){a(Ct("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",H));return}H.setTimeout(Yt,function(){H.abort(),a(Ct("timeout of "+Yt+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",H))})}e.cancelToken&&e.cancelToken.promise.then(function(T){H.aborted||(H.abort(),a(T))}),Ke.isStream(d)?d.on("error",function(T){a(Pr(T,e,null,H))}).pipe(H):H.end(d)})}});var is=x((Pf,ss)=>{"use strict";s();var Fc=B();function St(){this.handlers=[]}St.prototype.use=function(e,r,o){return this.handlers.push({fulfilled:e,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1};St.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};St.prototype.forEach=function(e){Fc.forEach(this.handlers,function(o){o!==null&&e(o)})};ss.exports=St});var us=x((If,as)=>{"use strict";s();var Rc=B();as.exports=function(e,r){Rc.forEach(e,function(n,i){i!==r&&i.toUpperCase()===r.toUpperCase()&&(e[r]=n,delete e[i])})}});var ds=x((Df,cs)=>{"use strict";s();var Ot=B();cs.exports=Ot.isStandardBrowserEnv()?function(){return{write:function(r,o,n,i,a,d){var c=[];c.push(r+"="+encodeURIComponent(o)),Ot.isNumber(n)&&c.push("expires="+new Date(n).toGMTString()),Ot.isString(i)&&c.push("path="+i),Ot.isString(a)&&c.push("domain="+a),d===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var ps=x((Uf,ls)=>{"use strict";s();var Nr=B(),qc=["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"];ls.exports=function(e){var r={},o,n,i;return e&&Nr.forEach(e.split(`
|
|
8
|
+
`),function(d){if(i=d.indexOf(":"),o=Nr.trim(d.substr(0,i)).toLowerCase(),n=Nr.trim(d.substr(i+1)),o){if(r[o]&&qc.indexOf(o)>=0)return;o==="set-cookie"?r[o]=(r[o]?r[o]:[]).concat([n]):r[o]=r[o]?r[o]+", "+n:n}}),r}});var hs=x((Hf,ms)=>{"use strict";s();var fs=B();ms.exports=fs.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function n(i){var a=i;return e&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=n(window.location.href),function(a){var d=fs.isString(a)?n(a):a;return d.protocol===o.protocol&&d.host===o.host}}():function(){return function(){return!0}}()});var kr=x((Bf,vs)=>{"use strict";s();var Et=B(),Pc=pr(),Nc=ds(),Ic=yt(),kc=fr(),Dc=ps(),Lc=hs(),Ir=gt();vs.exports=function(e){return new Promise(function(o,n){var i=e.data,a=e.headers,d=e.responseType;Et.isFormData(i)&&delete a["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(g+":"+p)}var h=kc(e.baseURL,e.url);c.open(e.method.toUpperCase(),Ic(h,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function m(){if(c){var A="getAllResponseHeaders"in c?Dc(c.getAllResponseHeaders()):null,w=!d||d==="text"||d==="json"?c.responseText:c.response,b={data:w,status:c.status,statusText:c.statusText,headers:A,config:e,request:c};Pc(o,n,b),c=null}}if("onloadend"in c?c.onloadend=m:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(m)},c.onabort=function(){c&&(n(Ir("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){n(Ir("Network Error",e,null,c)),c=null},c.ontimeout=function(){var w="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),n(Ir(w,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Et.isStandardBrowserEnv()){var y=(e.withCredentials||Lc(h))&&e.xsrfCookieName?Nc.read(e.xsrfCookieName):void 0;y&&(a[e.xsrfHeaderName]=y)}"setRequestHeader"in c&&Et.forEach(a,function(w,b){typeof i>"u"&&b.toLowerCase()==="content-type"?delete a[b]:c.setRequestHeader(b,w)}),Et.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),d&&d!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(w){c&&(c.abort(),n(w),c=null)}),i||(i=null),c.send(i)})}});var Rt=x((Gf,xs)=>{"use strict";s();var k=B(),gs=us(),Uc=vt(),Mc={"Content-Type":"application/x-www-form-urlencoded"};function ys(t,e){!k.isUndefined(t)&&k.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function Hc(){var t;return typeof XMLHttpRequest<"u"?t=kr():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=Tt()),t}function jc(t,e,r){if(k.isString(t))try{return(e||JSON.parse)(t),k.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(t)}var Ft={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Hc(),transformRequest:[function(e,r){return gs(r,"Accept"),gs(r,"Content-Type"),k.isFormData(e)||k.isArrayBuffer(e)||k.isBuffer(e)||k.isStream(e)||k.isFile(e)||k.isBlob(e)?e:k.isArrayBufferView(e)?e.buffer:k.isURLSearchParams(e)?(ys(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):k.isObject(e)||r&&r["Content-Type"]==="application/json"?(ys(r,"application/json"),jc(e)):e}],transformResponse:[function(e){var r=this.transitional,o=r&&r.silentJSONParsing,n=r&&r.forcedJSONParsing,i=!o&&this.responseType==="json";if(i||n&&k.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(i)throw a.name==="SyntaxError"?Uc(a,this,"E_JSON_PARSE"):a}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Ft.headers={common:{Accept:"application/json, text/plain, */*"}};k.forEach(["delete","get","head"],function(e){Ft.headers[e]={}});k.forEach(["post","put","patch"],function(e){Ft.headers[e]=k.merge(Mc)});xs.exports=Ft});var ws=x((zf,_s)=>{"use strict";s();var Bc=B(),Jc=Rt();_s.exports=function(e,r,o){var n=this||Jc;return Bc.forEach(o,function(a){e=a.call(n,e,r)}),e}});var Dr=x((Vf,As)=>{"use strict";s();As.exports=function(e){return!!(e&&e.__CANCEL__)}});var Ts=x((Yf,Cs)=>{"use strict";s();var bs=B(),Lr=ws(),Gc=Dr(),$c=Rt();function Ur(t){t.cancelToken&&t.cancelToken.throwIfRequested()}Cs.exports=function(e){Ur(e),e.headers=e.headers||{},e.data=Lr.call(e,e.data,e.headers,e.transformRequest),e.headers=bs.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),bs.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var r=e.adapter||$c.adapter;return r(e).then(function(n){return Ur(e),n.data=Lr.call(e,n.data,n.headers,e.transformResponse),n},function(n){return Gc(n)||(Ur(e),n&&n.response&&(n.response.data=Lr.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})}});var Mr=x((Zf,Ss)=>{"use strict";s();var U=B();Ss.exports=function(e,r){r=r||{};var o={},n=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],d=["validateStatus"];function c(m,y){return U.isPlainObject(m)&&U.isPlainObject(y)?U.merge(m,y):U.isPlainObject(y)?U.merge({},y):U.isArray(y)?y.slice():y}function g(m){U.isUndefined(r[m])?U.isUndefined(e[m])||(o[m]=c(void 0,e[m])):o[m]=c(e[m],r[m])}U.forEach(n,function(y){U.isUndefined(r[y])||(o[y]=c(void 0,r[y]))}),U.forEach(i,g),U.forEach(a,function(y){U.isUndefined(r[y])?U.isUndefined(e[y])||(o[y]=c(void 0,e[y])):o[y]=c(void 0,r[y])}),U.forEach(d,function(y){y in r?o[y]=c(e[y],r[y]):y in e&&(o[y]=c(void 0,e[y]))});var p=n.concat(i).concat(a).concat(d),h=Object.keys(e).concat(Object.keys(r)).filter(function(y){return p.indexOf(y)===-1});return U.forEach(h,g),o}});var qs=x((em,Rs)=>{"use strict";s();var Es=qr(),Hr={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Hr[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});var Os={},zc=Es.version.split(".");function Fs(t,e){for(var r=e?e.split("."):zc,o=t.split("."),n=0;n<3;n++){if(r[n]>o[n])return!0;if(r[n]<o[n])return!1}return!1}Hr.transitional=function(e,r,o){var n=r&&Fs(r);function i(a,d){return"[Axios v"+Es.version+"] Transitional option '"+a+"'"+d+(o?". "+o:"")}return function(a,d,c){if(e===!1)throw new Error(i(d," has been removed in "+r));return n&&!Os[d]&&(Os[d]=!0,console.warn(i(d," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,d,c):!0}};function Wc(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var o=Object.keys(t),n=o.length;n-- >0;){var i=o[n],a=e[i];if(a){var d=t[i],c=d===void 0||a(d,i,t);if(c!==!0)throw new TypeError("option "+i+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+i)}}Rs.exports={isOlderVersion:Fs,assertOptions:Wc,validators:Hr}});var Ls=x((rm,Ds)=>{"use strict";s();var Is=B(),Vc=yt(),Ps=is(),Ns=Ts(),qt=Mr(),ks=qs(),qe=ks.validators;function Ye(t){this.defaults=t,this.interceptors={request:new Ps,response:new Ps}}Ye.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=qt(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&ks.assertOptions(r,{silentJSONParsing:qe.transitional(qe.boolean,"1.0.0"),forcedJSONParsing:qe.transitional(qe.boolean,"1.0.0"),clarifyTimeoutError:qe.transitional(qe.boolean,"1.0.0")},!1);var o=[],n=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(e)===!1||(n=n&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});var i=[];this.interceptors.response.forEach(function(m){i.push(m.fulfilled,m.rejected)});var a;if(!n){var d=[Ns,void 0];for(Array.prototype.unshift.apply(d,o),d=d.concat(i),a=Promise.resolve(e);d.length;)a=a.then(d.shift(),d.shift());return a}for(var c=e;o.length;){var g=o.shift(),p=o.shift();try{c=g(c)}catch(h){p(h);break}}try{a=Ns(c)}catch(h){return Promise.reject(h)}for(;i.length;)a=a.then(i.shift(),i.shift());return a};Ye.prototype.getUri=function(e){return e=qt(this.defaults,e),Vc(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Is.forEach(["delete","get","head","options"],function(e){Ye.prototype[e]=function(r,o){return this.request(qt(o||{},{method:e,url:r,data:(o||{}).data}))}});Is.forEach(["post","put","patch"],function(e){Ye.prototype[e]=function(r,o,n){return this.request(qt(n||{},{method:e,url:r,data:o}))}});Ds.exports=Ye});var Br=x((nm,Us)=>{"use strict";s();function jr(t){this.message=t}jr.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};jr.prototype.__CANCEL__=!0;Us.exports=jr});var Hs=x((im,Ms)=>{"use strict";s();var Kc=Br();function Pt(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var r=this;t(function(n){r.reason||(r.reason=new Kc(n),e(r.reason))})}Pt.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Pt.source=function(){var e,r=new Pt(function(n){e=n});return{token:r,cancel:e}};Ms.exports=Pt});var Bs=x((um,js)=>{"use strict";s();js.exports=function(e){return function(o){return e.apply(null,o)}}});var Gs=x((dm,Js)=>{"use strict";s();Js.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Ws=x((pm,Jr)=>{"use strict";s();var $s=B(),Yc=ar(),Nt=Ls(),Xc=Mr(),Zc=Rt();function zs(t){var e=new Nt(t),r=Yc(Nt.prototype.request,e);return $s.extend(r,Nt.prototype,e),$s.extend(r,e),r}var te=zs(Zc);te.Axios=Nt;te.create=function(e){return zs(Xc(te.defaults,e))};te.Cancel=Br();te.CancelToken=Hs();te.isCancel=Dr();te.all=function(e){return Promise.all(e)};te.spread=Bs();te.isAxiosError=Gs();Jr.exports=te;Jr.exports.default=te});var Ks=x((mm,Vs)=>{"use strict";s();Vs.exports=Ws()});var Ys=x(ae=>{"use strict";s();Object.defineProperty(ae,"__esModule",{value:!0});ae.getUrlHeaders=ae.buildAllHeaders=ae.buildOptions=void 0;var Gr=He(),Qc=ft(),Pe=pt(),ed=({requestOptions:t,urlObject:e,headers:r,globalConfig:o={httpMockServer:{enabled:!1}}})=>{let{url:n,params:i}=t;if(i&&typeof i!="object")throw new Error("Search params must be an object");let a=od(n,o);return Object.assign(Object.assign(Object.assign({},t),a),{headers:r})};ae.buildOptions=ed;var td=(t,e,r={httpMockServer:{enabled:!1}},o)=>{let{url:n,disableWixHeaders:i,headers:a}=t,d=(0,Qc.composeHeaders)({url:n,disableWixHeaders:i,wixHeadersOpts:e}),c=(0,ae.getUrlHeaders)(r,t,o);return Object.assign(Object.assign(Object.assign({},d),sd(a)),c)};ae.buildAllHeaders=td;var rd=(t,e,r)=>{let{url:o,params:n}=e,{host:i,protocol:a}=r;return t.httpMockServer.enabled?{[Gr.ORIGINAL_URL_HEADER]:nd(o,n),[Gr.ORIGINAL_HOST_HEADER]:(0,Pe.isAbsoluteUrl)(o)?(0,Pe.extractHost)(o):i,[Gr.ORIGINAL_PROTOCOL_HEADER]:(0,Pe.isAbsoluteUrl)(o)?(0,Pe.extractProtocol)(o):a}:{}};ae.getUrlHeaders=rd;function od(t,e){if(e.httpMockServer.enabled){let r=new URL(e.httpMockServer.mockServerUrl);return{url:(0,Pe.changeHost)(t,r.host)}}return{}}function nd(t,e){let{pathname:r,searchParams:o}=new URL(t,"http://unused.com");if(e=e||o,e){let n=(0,Pe.toSearchQueryParams)(e)||e.toString(),i=n?`?${n}`:"";return`${r}${i}`}return r}function sd(t){return t=t||{},Object.keys(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[o.toLowerCase()]:t[o]}),{})}});var ei=x(Ie=>{"use strict";s();Object.defineProperty(Ie,"__esModule",{value:!0});Ie.createHttpClient=Ie.HttpClient=void 0;var Zs=(ct(),Ae(ut)),Xe=Zs.__importDefault(Ks()),id=Zs.__importDefault(kr()),$r=He(),Qs=or(),ad=ir(),Xs=ft(),It=Ys(),ne=pt(),Ne=class{constructor(e={}){this.opts=e,this.opts=ud(this.opts),this.client=Xe.default.create(this.opts),this.flags={sanitizerPocEnabled:pd()}}static isHttpError(e){return!!e?.isWixHttpError}async request(e,r){var o,n;let i=(0,ne.resolveHost)(this.opts),d={protocol:(0,ne.resolveProtocol)(this.opts),host:i},c=typeof e=="function"?e({isSSR:this.opts.isSSR,host:i}):e,g=r?.signedInstance||await((n=(o=this.opts).getAppToken)===null||n===void 0?void 0:n.call(o))||"",p=this.getHeaders(c,g,d),h=(0,It.buildOptions)({requestOptions:c,urlObject:d,headers:p,globalConfig:(0,ne.getGlobalConfig)()});this.opts.isSSR&&(h.baseURL=this.opts.baseURL?this.opts.baseURL:`${$r.SSR_PROTOCOL}://${$r.SSR_HOST}`);try{let m=await this.client.request(h).catch(y=>this.maybeFallbackRequest(y,c,d,g));return this.transformResponse(m,c)}catch(m){this.handleRequestError(m,h)}}async get(e,r){let o=Object.assign(Object.assign({},r),{url:e,method:"GET"});return this.request(o)}async delete(e,r){let o=Object.assign(Object.assign({},r),{url:e,method:"DELETE"});return this.request(o)}async head(e,r){let o=Object.assign(Object.assign({},r),{url:e,method:"HEAD"});return this.request(o)}async options(e,r){let o=Object.assign(Object.assign({},r),{url:e,method:"OPTIONS"});return this.request(o)}async post(e,r,o){let n=Object.assign(Object.assign({},o),{url:e,data:r,method:"POST"});return this.request(n)}async put(e,r,o){let n=Object.assign(Object.assign({},o),{url:e,data:r,method:"PUT"});return this.request(n)}async patch(e,r,o){let n=Object.assign(Object.assign({},o),{url:e,data:r,method:"PATCH"});return this.request(n)}get CancelToken(){return Xe.default.CancelToken}get isCancel(){return Xe.default.isCancel}getHeaders(e,r,o){if(typeof this.opts.createHeaders=="function")return this.getCustomHeaders(e,r,o);let n={signedInstance:r,artifactId:this.opts.artifactId,csrf:!1,multilingualOptions:this.opts.multilingualOptions};return(0,It.buildAllHeaders)(e,n,(0,ne.getGlobalConfig)(),o)}getCustomHeaders(e,r,o){let{url:n}=e,i=r&&(0,Xs.isWixDomain)(n)?{authorization:r}:{},a=this.opts.createHeaders(),d=(0,It.getUrlHeaders)((0,ne.getGlobalConfig)(),e,o);return Object.assign(Object.assign(Object.assign({},d),a),i)}handleRequestError(e,r){let o=(0,ad.createHttpError)(e);throw(0,ne.silent)(()=>{var n;return(n=r.onError)===null||n===void 0?void 0:n.call(r,o)}),o}maybeFallbackRequest(e,r,o,n){var i,a,d;if((0,ne.isHttpMockServerEnabled)()&&(0,ne.shouldAllowUnmocked)()&&((i=e.response)===null||i===void 0?void 0:i.status)===404&&((d=(a=e.response)===null||a===void 0?void 0:a.data)===null||d===void 0?void 0:d.msg)===$r.NO_SCENARIO_FOUND){let g=this.getHeaders(r,n,o),p=(0,It.buildOptions)({requestOptions:r,urlObject:o,headers:g});return this.client.request(p)}throw e}transformResponse(e,r){let o=(0,Xs.requestIdOrEmptyString)(e),n=dd(e,r,this.flags);return Object.assign(Object.assign({},e),{data:n,requestId:o})}};Ie.HttpClient=Ne;Ne.CancelToken=Xe.default.CancelToken;Ne.isCancel=Xe.default.isCancel;function ud(t){let e=t.adapter;return e||(e=id.default,(0,Qs.isNode)()&&(e=cd())),Object.assign({adapter:e,isSSR:!1},t)}function cd(){return typeof __webpack_require__=="function"?__non_webpack_require__("axios/lib/adapters/http"):Tt()}function dd(t,e,r){let o=ld(t,r);if(e._pickResponseBody&&(o=(0,ne.extractProp)(t.data,e._pickResponseBody)),e._logs){let n=(0,ne.extractProp)(t.data,e._logs);n?.length&&n.map(i=>console.log(...i))}return o}function ld(t,e){try{if(e.sanitizerPocEnabled){let r=performance.now(),o=new Sanitizer;if(t.headers["content-type"].includes("application/json")){console.log("[+] JSON Response detected, sanitizing data");let n=function(a){try{return Object.keys(a).forEach(d=>{typeof a[d]=="string"?a[d]=o.sanitizeFor("span",a[d]).innerHTML:typeof a[d]=="object"&&(a[d]=n(a[d]))}),a}catch(d){console.log(d)}},i=performance.now();return console.log(`Time taken: ${i-r} milliseconds.`),n(t.data)}}}catch(r){console.log("[+] Sanitizer API not supported: %o",r)}return t.data}function pd(){var t;try{return(0,Qs.isBrowser)()&&new URLSearchParams(((t=window?.location)===null||t===void 0?void 0:t.hash)||"").get("sanitizerPOC")==="true"}catch{return!1}}function fd(...t){return new Ne(...t)}Ie.createHttpClient=fd});var ti=x(ke=>{"use strict";s();Object.defineProperty(ke,"__esModule",{value:!0});ke.HttpClient=ke.createHttpClient=void 0;var md=(ct(),Ae(ut)),hd=md.__importDefault(Tt()),vd=ei(),kt=class extends vd.HttpClient{constructor(e={}){super(Object.assign({adapter:hd.default},e))}};ke.HttpClient=kt;function gd(...t){return new kt(...t)}ke.createHttpClient=gd});var oi=x(ri=>{"use strict";s();Object.defineProperty(ri,"__esModule",{value:!0})});var Dt=x(D=>{"use strict";s();Object.defineProperty(D,"__esModule",{value:!0});D.HttpClient=D.createHttpClient=D.HttpError=D.createHttpError=D.ORIGINAL_URL_HEADER=D.ORIGINAL_PROTOCOL_HEADER=D.ORIGINAL_HOST_HEADER=void 0;var yd=(ct(),Ae(ut)),zr=He();Object.defineProperty(D,"ORIGINAL_HOST_HEADER",{enumerable:!0,get:function(){return zr.ORIGINAL_HOST_HEADER}});Object.defineProperty(D,"ORIGINAL_PROTOCOL_HEADER",{enumerable:!0,get:function(){return zr.ORIGINAL_PROTOCOL_HEADER}});Object.defineProperty(D,"ORIGINAL_URL_HEADER",{enumerable:!0,get:function(){return zr.ORIGINAL_URL_HEADER}});var ni=ir();Object.defineProperty(D,"createHttpError",{enumerable:!0,get:function(){return ni.createHttpError}});Object.defineProperty(D,"HttpError",{enumerable:!0,get:function(){return ni.HttpError}});var si=ti();Object.defineProperty(D,"createHttpClient",{enumerable:!0,get:function(){return si.createHttpClient}});Object.defineProperty(D,"HttpClient",{enumerable:!0,get:function(){return si.HttpClient}});yd.__exportStar(oi(),D)});var mi=x((eh,fi)=>{"use strict";s();function X(t,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}fi.exports=X;X.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};X.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};X.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},r),this._options.unref&&this._timer.unref(),!0};X.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};X.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)};X.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)};X.prototype.start=X.prototype.try;X.prototype.errors=function(){return this._errors};X.prototype.attempts=function(){return this._attempts};X.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,r=0,o=0;o<this._errors.length;o++){var n=this._errors[o],i=n.message,a=(t[i]||0)+1;t[i]=a,a>=r&&(e=n,r=a)}return e}});var hi=x(_e=>{"use strict";s();var Pd=mi();_e.operation=function(t){var e=_e.timeouts(t);return new Pd(e,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};_e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],n=0;n<e.retries;n++)o.push(this.createTimeout(n,e));return t&&t.forever&&!o.length&&o.push(this.createTimeout(n,e)),o.sort(function(i,a){return i-a}),o};_e.createTimeout=function(t,e){var r=e.randomize?Math.random()+1:1,o=Math.round(r*Math.max(e.minTimeout,1)*Math.pow(e.factor,t));return o=Math.min(o,e.maxTimeout),o};_e.wrap=function(t,e,r){if(e instanceof Array&&(r=e,e=null),!r){r=[];for(var o in t)typeof t[o]=="function"&&r.push(o)}for(var n=0;n<r.length;n++){var i=r[n],a=t[i];t[i]=function(c){var g=_e.operation(e),p=Array.prototype.slice.call(arguments,1),h=p.pop();p.push(function(m){g.retry(m)||(m&&(arguments[0]=g.mainError()),h.apply(this,arguments))}),g.attempt(function(){c.apply(t,p)})}.bind(t,a),t[i].options=e}}});var gi=x((nh,vi)=>{"use strict";s();vi.exports=hi()});var yo=x((mg,Xi)=>{"use strict";s();var Yi=N("fs"),go;function Sl(){try{return Yi.statSync("/.dockerenv"),!0}catch{return!1}}function Ol(){try{return Yi.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Xi.exports=()=>(go===void 0&&(go=Sl()||Ol()),go)});var ea=x((vg,xo)=>{"use strict";s();var El=N("os"),Fl=N("fs"),Zi=yo(),Qi=()=>{if(process.platform!=="linux")return!1;if(El.release().toLowerCase().includes("microsoft"))return!Zi();try{return Fl.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Zi():!1}catch{return!1}};process.env.__IS_WSL_TEST__?xo.exports=Qi:xo.exports=Qi()});var ra=x((yg,ta)=>{"use strict";s();ta.exports=(t,e,r)=>{let o=n=>Object.defineProperty(t,e,{value:n,enumerable:!0,writable:!0});return Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){let n=r();return o(n),n},set(n){o(n)}}),t}});var ca=x((_g,ua)=>{"use strict";s();var Rl=N("path"),ql=N("child_process"),{promises:$t,constants:aa}=N("fs"),Gt=ea(),Pl=yo(),wo=ra(),oa=Rl.join(l,"xdg-open"),{platform:Me,arch:na}=process,Nl=()=>{try{return $t.statSync("/run/.containerenv"),!0}catch{return!1}},_o;function Il(){return _o===void 0&&(_o=Nl()||Pl()),_o}var kl=(()=>{let t="/mnt/",e;return async function(){if(e)return e;let r="/etc/wsl.conf",o=!1;try{await $t.access(r,aa.F_OK),o=!0}catch{}if(!o)return t;let n=await $t.readFile(r,{encoding:"utf8"}),i=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(n);return i?(e=i.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):t}})(),sa=async(t,e)=>{let r;for(let o of t)try{return await e(o)}catch(n){r=n}throw r},zt=async t=>{if(t={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...t},Array.isArray(t.app))return sa(t.app,d=>zt({...t,app:d}));let{name:e,arguments:r=[]}=t.app||{};if(r=[...r],Array.isArray(e))return sa(e,d=>zt({...t,app:{name:d,arguments:r}}));let o,n=[],i={};if(Me==="darwin")o="open",t.wait&&n.push("--wait-apps"),t.background&&n.push("--background"),t.newInstance&&n.push("--new"),e&&n.push("-a",e);else if(Me==="win32"||Gt&&!Il()&&!e){let d=await kl();o=Gt?`${d}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,n.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Gt||(i.windowsVerbatimArguments=!0);let c=["Start"];t.wait&&c.push("-Wait"),e?(c.push(`"\`"${e}\`""`,"-ArgumentList"),t.target&&r.unshift(t.target)):t.target&&c.push(`"${t.target}"`),r.length>0&&(r=r.map(g=>`"\`"${g}\`""`),c.push(r.join(","))),t.target=Buffer.from(c.join(" "),"utf16le").toString("base64")}else{if(e)o=e;else{let d=!l||l==="/",c=!1;try{await $t.access(oa,aa.X_OK),c=!0}catch{}o=process.versions.electron||Me==="android"||d||!c?"xdg-open":oa}r.length>0&&n.push(...r),t.wait||(i.stdio="ignore",i.detached=!0)}t.target&&n.push(t.target),Me==="darwin"&&r.length>0&&n.push("--args",...r);let a=ql.spawn(o,n,i);return t.wait?new Promise((d,c)=>{a.once("error",c),a.once("close",g=>{if(!t.allowNonzeroExitCode&&g>0){c(new Error(`Exited with code ${g}`));return}d(a)})}):(a.unref(),a)},Ao=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `target`");return zt({...e,target:t})},Dl=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `name`");let{arguments:r=[]}=e||{};if(r!=null&&!Array.isArray(r))throw new TypeError("Expected `appArguments` as Array type");return zt({...e,app:{name:t,arguments:r}})};function ia(t){if(typeof t=="string"||Array.isArray(t))return t;let{[na]:e}=t;if(!e)throw new Error(`${na} is not supported`);return e}function bo({[Me]:t},{wsl:e}){if(e&&Gt)return ia(e);if(!t)throw new Error(`${Me} is not supported`);return ia(t)}var Wt={};wo(Wt,"chrome",()=>bo({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));wo(Wt,"firefox",()=>bo({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));wo(Wt,"edge",()=>bo({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Ao.apps=Wt;Ao.openApp=Dl;ua.exports=Ao});s();import Ca,{createContext as Ta,useContext as Sa}from"react";var jo=Ta(null),Oa=function({children:t,value:e}){return Ca.createElement(jo.Provider,{value:e},t)},tr=()=>{let t=Sa(jo);if(t===null)throw new Error("useBiLogger() cannot be used without an <BiProvider>");return t};s();s();import Ea,{createContext as Fa,useContext as Ra}from"react";var Bo=Fa(null),qa=t=>Ea.createElement(Bo.Provider,{...t}),rr=()=>{let t=Ra(Bo);if(t===null)throw new Error("useErrorReporter() cannot be used without an <ErrorReporterProvider>");return t};s();s();var ii=W(Dt(),1),xd={backoffice:"https://manage.wix.com",editor:"https://editor.wix.com",code:"https://code.wix.com",general:"https://www.wix.com",standalone:void 0};function Lt({getAppToken:t,createHeaders:e,type:r}){return(0,ii.createHttpClient)({baseURL:xd[r],...r!=="standalone"?{getAppToken:t}:{},createHeaders:()=>({...e?.(),"X-XSRF-TOKEN":"nocheck",Cookie:"XSRF-TOKEN=nocheck","User-Agent":"wix-cli"})})}s();var ai=W(Dt(),1);function Wr(t){return ai.HttpClient.isHttpError(t)}s();import{createElement as Fd,useMemo as Rd}from"react";s();var Yr=W(me(),1);import u from"react";s();function Ut(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function ui(){return typeof WeakMap<"u"?new WeakMap:_d()}function _d(){return{add:Ut,delete:Ut,get:Ut,set:Ut,has:function(t){return!1}}}var wd=Object.prototype.hasOwnProperty,Kr=function(t,e){return wd.call(t,e)};function Vr(t,e){for(var r in e)Kr(e,r)&&(t[r]=e[r]);return t}var Ad=/^[ \t]*(?:\r\n|\r|\n)/,bd=/(?:\r\n|\r|\n)[ \t]*$/,Cd=/^(?:[\r\n]|$)/,Td=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,Sd=/^[ \t]*[\r\n][ \t\r\n]*$/;function ci(t,e,r){var o=0,n=t[0].match(Td);n&&(o=n[1].length);var i="(\\r\\n|\\r|\\n).{0,"+o+"}",a=new RegExp(i,"g");e&&(t=t.slice(1));var d=r.newline,c=r.trimLeadingNewline,g=r.trimTrailingNewline,p=typeof d=="string",h=t.length,m=t.map(function(y,A){return y=y.replace(a,"$1"),A===0&&c&&(y=y.replace(Ad,"")),A===h-1&&g&&(y=y.replace(bd,"")),p&&(y=y.replace(/\r\n|\n|\r/g,function(w){return d})),y});return m}function Od(t,e){for(var r="",o=0,n=t.length;o<n;o++)r+=t[o],o<n-1&&(r+=e[o]);return r}function Ed(t){return Kr(t,"raw")&&Kr(t,"length")}function di(t){var e=ui(),r=ui();function o(i){for(var a=[],d=1;d<arguments.length;d++)a[d-1]=arguments[d];if(Ed(i)){var c=i,g=(a[0]===o||a[0]===re)&&Sd.test(c[0])&&Cd.test(c[1]),p=g?r:e,h=p.get(c);if(h||(h=ci(c,g,t),p.set(c,h)),a.length===0)return h[0];var m=Od(h,g?a.slice(1):a);return m}else return di(Vr(Vr({},t),i||{}))}var n=Vr(o,{string:function(i){return ci([i],!1,t)[0]}});return n}var re=di({trimLeadingNewline:!0,trimTrailingNewline:!0});if(typeof module<"u")try{module.exports=re,Object.defineProperty(re,"__esModule",{value:!0}),re.default=re,re.outdent=re}catch{}s();import xe from"react";var v=({message:t,explanation:e,hint:r})=>xe.createElement(ee,{flexDirection:"column"},xe.createElement(Qt,{type:"error"},t),e&&xe.createElement(Qt,{type:"warning"},e),r&&xe.createElement(ee,{paddingTop:1,columnGap:1},xe.createElement(Do,null),typeof r=="string"?xe.createElement(_,null,r):r)),q=({message:t,explanation:e,hint:r})=>xe.createElement(v,{message:t,explanation:e,hint:r??"This is probably a temporary system error and has been logged. Try again shortly."});function pi(t){return(0,Yr.match)(t,{UnknownFailure:({error:e})=>()=>u.createElement(u.Fragment,null,u.createElement(_,{skin:"error"},"Oh no, seems like the CLI encountered an unexpected error:"),e instanceof Error?u.createElement(_,{skin:"error"},e.message):u.createElement(_,null,JSON.stringify(e))),FailedToGetDeviceCode:()=>()=>u.createElement(q,{message:"An error occured while logging in: Failed to issue a login device code"}),FailedToGetAuthToken:()=>()=>u.createElement(q,{message:"An error occured while logging in: Failed to issue refresh token"}),FailedToRefreshTokenForSite:()=>()=>u.createElement(q,{message:"An error occured while logging in: Failed to issue refresh token for site"}),FailedToRenewAuthToken:()=>()=>u.createElement(q,{message:"Failed to renew access token."}),FailedToRenewAuthTokenSiteNotFound:({siteId:e})=>()=>u.createElement(v,{message:`Authenticate failed, your configured development site (${e}) could not be accessed`,hint:"Make sure the site exists and you still have access to it"}),FailedToRenewAuthTokenRefreshTokenRevoked:()=>()=>u.createElement(v,{message:"Failed to renew access token: refresh token has been revoked",hint:"Please login again to get a new refresh token"}),FailedToRevokeRefreshToken:({email:e})=>()=>u.createElement(q,{message:"An error occured while trying to logout: Failed to revoke refresh token!",explanation:`Wix CLI is still logged in to account ${e}`}),FailedToFetchPackageJson:()=>()=>u.createElement(q,{message:"Failed to fetch package data."}),LatestVersionOfCreateAppRequired:({currentVersion:e,latestVersion:r,updateCommand:o})=>()=>u.createElement(v,{message:u.createElement(u.Fragment,null,"Generating a Wix App is only supported using the latest version (",r,") of ",u.createElement(_,{bold:!0},"@wix/create-app")," (current:"," ",e,")"),hint:u.createElement(_,null,"Make sure you are using the following command:",u.createElement(Ce,null),u.createElement(_,{bold:!0},o),u.createElement(Ce,null),"If the problem persists, try clearing your package manager's cache")}),EmptyDirectoryRequiredAppGeneration:({folder:e})=>()=>u.createElement(v,{message:u.createElement(u.Fragment,null,"Generating a Wix App requires an empty directory but"," ",u.createElement(_,{bold:!0},e)," already exists and isn't empty"),hint:u.createElement(_,null,"Choose a different project name or delete the existing"," ",u.createElement(_,{bold:!0},e)," folder")}),InvalidNewPackageName:({packageName:e,validations:r})=>()=>u.createElement(v,{message:u.createElement(u.Fragment,null,"Generating a Wix App requires a valid npm package name for the generated ",u.createElement(_,{bold:!0},"package.json")," ",u.createElement(Ce,null),"The name ",u.createElement(_,{bold:!0},e)," failed the following validations:",u.createElement(Ce,null),r.map((o,n)=>u.createElement(_,{key:n},u.createElement(Ce,null),"- ",o))),hint:"Choose a different project name that follows the validations above"}),SiteSelectorTimedout:()=>()=>u.createElement(v,{message:"Waiting for application installation timed out."}),TypeErrorInvalidUrl:()=>()=>u.createElement(v,{message:"Invalid assets URL."}),UnsupportedPackageManager:({packageManagerName:e})=>()=>u.createElement(v,{message:"Generating a Wix App requires the usage of a supported package manager",hint:`Expected Yarn or NPM but ${e?`got ${e}`:"failed to detect a package manager"}`}),UnsupportedPackageManagerWorkspaces:({packageManagerName:e})=>()=>u.createElement(v,{message:`Generating a Wix App inside ${e} workspaces is not supported`}),FailedToGetDeveloperApps:()=>()=>u.createElement(q,{message:"Failed to get the list of your applications"}),FailedToCreateDevCenterApp:()=>()=>u.createElement(q,{message:"Failed to register your application in Wix Dev Center"}),SitePermissionDenied:({siteId:e})=>()=>u.createElement(v,{message:`You don't have permissions to site ${e}`}),AppPermissionDenied:({appId:e})=>()=>u.createElement(v,{message:`You don't have permissions to application ${e}`}),FailedToUpdateTelemetryConfig:()=>()=>u.createElement(v,{message:"Failed to change telemetry preferences"}),FailedToInstallPackage:({packageName:e,cause:r})=>{let o=L(r);return()=>u.createElement(v,{message:`Failed to install npm package ${e}. Cause: ${o}`})},FailedToResolveNpmDependencies:()=>()=>u.createElement(q,{message:"Failed to resolve npm dependencies"}),FailedToInstallPackages:({cause:e})=>{let r=L(e);return()=>u.createElement(v,{message:`Failed to install npm packages. Cause: ${r}`})},FailedMigrationToAnyNpm:()=>()=>u.createElement(v,{message:u.createElement(u.Fragment,null,"Could not start the migration process"),hint:u.createElement(_,null,"Make sure that your package.json does not have packages installed outside of dev dependencies")}),DeprecatedVersion:({currentVersion:e})=>()=>u.createElement(v,{message:u.createElement(u.Fragment,null,`Your version of the Wix CLI (${e}) is`,u.createElement(_,{bold:!0}," deprecated"),"."),hint:"Please update to the latest version to continue"}),FailedToUninstallPackage:({packageName:e,cause:r})=>{let o=L(r);return()=>u.createElement(v,{message:`Failed to uninstall npm package ${e}. Cause: ${o}`})},FailedToSyncToRevision:({revision:e})=>()=>u.createElement(v,{message:`Failed to sync the local project to revision ${e}`}),FailedToCreateVersion:()=>()=>u.createElement(v,{message:"Wix CLI failed to create version for your app"}),FailedToReadCache:({path:e})=>()=>u.createElement(v,{message:`Failed to read cache file at ${e}.`}),FailedToWriteCache:({path:e})=>()=>u.createElement(v,{message:`Failed to write cache file at ${e}.`}),UploadApplicationFailed:()=>()=>u.createElement(v,{message:"Failed to upload the application"}),BuiltProjectNeeded:()=>()=>u.createElement(v,{message:"Can not find build output, please execute `wix app build` to build your app before proceeding"}),UnsupportedWixInstallCommand:()=>()=>u.createElement(v,{message:"`wix install` is not supported now. Please use `wix install <package-name>`"}),WixUninstallMissingPackageName:()=>()=>u.createElement(v,{message:"Please specify a package name"}),FailedToReadJson:({filePath:e,cause:r})=>{let o=L(r);return()=>u.createElement(v,{message:`Failed to read ${e}. Cause: ${o}`})},InvalidJsonFile:({filePath:e,cause:r})=>{let o=L(r);return()=>u.createElement(v,{message:`Invalid JSON file located at ${e}. Cause: ${o}`})},FailedToWriteWixLock:()=>()=>u.createElement(v,{message:"Failed to write 'wix.lock'"}),InvalidVeloConfigJson:({configFilename:e,cause:r})=>{let o=L(r);return()=>u.createElement(v,{message:`Invalid ${e}, make sure it's configured correctly. Cause: ${o}`})},DashboardPageConfigNotFound:({configPath:e})=>()=>u.createElement(v,{message:`Dashboard page config not found at ${e}`}),EmbeddedScriptConfigNotFound:({configPath:e})=>()=>u.createElement(v,{message:`Embedded script config not found at ${e}`}),CustomElementConfigNotFound:({configPath:e})=>()=>u.createElement(v,{message:`Custom element config not found at ${e}`}),NoExtensionsFound:()=>()=>u.createElement(v,{message:"Your project doesn't seem to have any extensions.",explanation:"Extensions are the building blocks of your app.",hint:"Make sure it is configured properly, or read our documentation (\u200Bhttps://wix.to/b7o4Ml0) to start developing your first extension."}),NoPagesDirectoryFound:({srcDir:e})=>()=>u.createElement(v,{message:u.createElement(u.Fragment,null,"No ",u.createElement(_,{bold:!0},"pages")," directory was found under"," ",u.createElement(_,{bold:!0},e),"."),hint:u.createElement(_,null,"Consider re-cloning the project repository or creating a"," ",u.createElement(_,{bold:!0},"pages")," directory under ",u.createElement(_,{bold:!0},e),".")}),DashboardPluginConfigNotFound:({configPath:e})=>()=>u.createElement(v,{message:`Dashboard plugin config not found at ${e}`}),DashboardMenuPluginConfigNotFound:({configPath:e})=>()=>u.createElement(v,{message:`Dashboard menu plugin config not found at ${e}`}),DashboardModalConfigNotFound:({configPath:e})=>()=>u.createElement(v,{message:`Dashboard modal config not found at ${e}`}),InvalidConfigSchemaError:({configPath:e,zodError:r})=>()=>u.createElement(v,{message:re`
|
|
9
|
+
Invalid configuration found at \`${e}\`:
|
|
10
|
+
The following errors were found:
|
|
11
|
+
${r.errors.map(li).join(`
|
|
12
|
+
`)}`,hint:"Fix the errors above for your configurations to be applied successfully."}),InvalidParamsOverrideSchemaError:({paramsOverridePath:e,zodError:r})=>()=>u.createElement(v,{message:re`
|
|
13
|
+
Invalid params override found at \`${e}\`:
|
|
14
|
+
The following errors were found:
|
|
15
|
+
${r.errors.map(li).join(`
|
|
16
|
+
`)}`,hint:"Fix the errors above for your params override to be applied successfully."}),PermissionDenied:()=>()=>u.createElement(v,{message:"Forbidden operation. Missing permissions"}),FailedToReadProjectFiles:({cause:e})=>{let r=L(e);return()=>u.createElement(v,{message:`Failed to read source files: make sure you have an 'src' folder and that it's readable. Cause: ${r}`})},FailedToCreateVersionForSubmittedApp:()=>()=>u.createElement(v,{message:"Cannot create a new application version because the app has an active marketplace submission",hint:"You will be able continue creating versions when your submission is approved or retracted"}),GridAppFilesMaxLengthExcceeded:({maxSizeViolationsData:e,filePaths:r})=>{let o="Found one or more project files that are bigger than the allowed limit";return e?.files?.length&&(o+=` (${e.expectedSize}KB): ${e.files.map(n=>`${r[n.fileIndex]} (${n.receivedSize}KB)`).join(", ")}`),()=>u.createElement(v,{message:o})},GridAppFailedToUpdateFiles:()=>()=>u.createElement(v,{message:re`
|
|
17
|
+
Failed to update files.
|
|
18
|
+
Failed to sync changes from local files to the Dev Editor
|
|
19
|
+
Still watching local files and will continue to sync changes...
|
|
20
|
+
`}),FailedToWatchFiles:({cause:e})=>{let r=L(e);return()=>u.createElement(v,{message:`Failed to watch files. Cause: ${r}`})},FailedToCreateGridApp:({error:e})=>()=>u.createElement(v,{message:"Failed to create an isolated environment.",explanation:e}),DeviceCodeTimedOut:()=>()=>u.createElement(v,{message:"The device code has not been approved in the time allocated, please start the login process again."}),DuplicateComponentIdsError:({issues:e})=>{let r=({issue:n})=>{let i=a=>(0,Yr.match)(a,{page:()=>"page",plugin:()=>"plugin","menu-plugin":()=>"menu plugin","sidebar-category":()=>"sidebar category","embedded-script":()=>"embedded script","custom-element":()=>"custom element",modal:()=>"modal"});return u.createElement(ee,{flexDirection:"column"},u.createElement(_,null,u.createElement(_,{bold:!0},"Duplicate ID: "),n.id),u.createElement(_,{bold:!0},"Extensions:"),n.components.map(({name:a,path:d,type:c})=>u.createElement(_,{key:d},"[",i(c),"] ",a," (",d,")")),u.createElement(_,null,u.createElement(_,{bold:!0},"Possible GUID: "),n.suggestedId))},o=u.createElement(ee,{flexDirection:"column",rowGap:1},u.createElement(_,null,"You can use the provided suggested GUIDs as the ID of the newly created extension."),e.map(n=>u.createElement(r,{issue:n,key:n.id})));return()=>u.createElement(v,{message:"Found multiple extensions with the same id, this might happen if you copy paste folders.",hint:o})},FailedToGetPackageDetails:()=>()=>u.createElement(v,{message:"Failed to get package info."}),InvalidCreateAppResponse:()=>()=>u.createElement(v,{message:"`createApp` returned an invalid response."}),InvalidDeployAppResponse:()=>()=>u.createElement(v,{message:"Got unexpected response from server. Make sure you are running a supported version of the Velo CLI."}),InvalidGetDeploymentResponse:()=>()=>u.createElement(v,{message:"Got unexpected response from server. Please try again later.."}),FailedToGetPagesDiff:()=>()=>u.createElement(v,{message:"Failed to request pages diff."}),InvalidViteBuildOutput:()=>()=>u.createElement(v,{message:"Invalid vite build output"}),ViteModuleBundleNotFound:()=>()=>u.createElement(v,{message:"Could not find module bundle in vite build output"}),ViteFileNotFoundInOutput:({fileName:e})=>()=>u.createElement(v,{message:`Could not find ${e} in vite build output`}),FailedToCreatePresignedUrl:()=>()=>u.createElement(v,{message:"Failed to create a presigned upload url"}),FailedToUploadApplicationFiles:()=>()=>u.createElement(v,{message:"Failed to upload the application files"}),FailedToVerifyDeployment:()=>()=>u.createElement(v,{message:"Deployment was not finished within the desired timeframe, please try again later."}),FailedToGetUserInfo:()=>()=>u.createElement(v,{message:"Failed to get user information."}),FailedToGetMyAccount:()=>()=>u.createElement(q,{message:"Failed to get account information."}),FailedToCreateDevelopmentSite:()=>()=>u.createElement(v,{message:"Failed to create a Development Site"}),FailedToGetDevelopmentSites:()=>()=>u.createElement(v,{message:"Failed to request development sites."}),FailedToGetDevelopmentSitesLimit:()=>()=>u.createElement(v,{message:"Failed to request development sites limit."}),FailedToGetRequiredApps:()=>()=>u.createElement(v,{message:"Failed to get app required apps."}),FailedToGetMarketListing:()=>()=>u.createElement(v,{message:"Failed to get market listing."}),FailedToAddRequiredApp:()=>()=>u.createElement(v,{message:"Failed to add required app."}),FailedToQuerySites:()=>()=>u.createElement(v,{message:"Failed to request sites list."}),FailedToGetSite:()=>()=>u.createElement(v,{message:"Failed to get information about your configured Development Site"}),FailedToDeploySite:()=>()=>u.createElement(v,{message:"Failed to deploy site."}),FailedToPublishDeployment:()=>()=>u.createElement(q,{message:"Failed to publish site."}),FailedToSaveDevelopmentSite:({path:e})=>()=>u.createElement(v,{message:"Failed to save the current development site.",hint:`Make sure the \`${e}\` file has proper permissions and is accessible`}),FailedToBuildApp:()=>()=>u.createElement(v,{message:"Failed to build the application.",hint:"Please check the build output for more information"}),FailedToCheckIfAppInstalled:()=>()=>u.createElement(v,{message:"Failed to fetch site installation details"}),FailedToInitializeGitRepo:({cause:e})=>{let r=L(e);return()=>u.createElement(v,{message:`Failed to initialize git repo. Cause: ${r}`})},FailedToInstallDependencies:({cause:e})=>{let r=L(e);return()=>u.createElement(v,{message:`Failed to install dependencies. Cause: ${r}`})},FailedToCommitChanges:({cause:e})=>{let r=L(e);return()=>u.createElement(v,{message:`Failed to commit changes. Cause: ${r}`})},FailedToDeleteAuthData:({cause:e})=>{let r=L(e);return()=>u.createElement(v,{message:`Failed to delete auth data: ${r}`})},FailedToDeleteLegacyAuthData:({cause:e})=>{let r=L(e);return()=>u.createElement(v,{message:`Failed to delete legacy auth data: ${r}`})},FailedToSaveAuthData:({cause:e})=>{let r=L(e);return()=>u.createElement(v,{message:`Failed to save auth data: ${r}`})},FailedToSaveApiKeyAuthData:({cause:e})=>{let r=L(e);return()=>u.createElement(v,{message:`Failed to save api key auth data: ${r}`})},FailedToWriteJson:({filePath:e,cause:r})=>{let o=L(r);return()=>u.createElement(v,{message:`Failed to write JSON at path: ${e}. Cause: ${o}`})},TemplatePathNotFound:({templatePath:e})=>()=>u.createElement(v,{message:`Template path not found: ${e}`,hint:"Make sure the template path exists in the remote repository"}),FailedToCloneRepo:({cause:e})=>{let r=L(e);return()=>u.createElement(v,{message:`Failed to clone repo: ${r}`,hint:"Make sure the Git URL is correct and that your local Git is configured properly to access the remote repository"})},InvalidGitUrl:({url:e})=>()=>u.createElement(v,{message:`Invalid Git URL: ${e}`,hint:"Make sure the Git URL is in the correct format"}),AuthenticationRequired:()=>()=>u.createElement(v,{message:"You have to already be logged in to run this command."}),SiteConfiguredRequired:()=>()=>u.createElement(v,{message:"You must configure the development site before running this command, or provide a site-id in the command options."}),FailedAddingPackageToWorkspace:()=>()=>u.createElement(v,{message:"Could not add package to the workspaces configuration. Please add it as instructed by your package manager.",hint:u.createElement(_,null,"Full error can be found in ",u.createElement(_,{bold:!0},"wix-error.log"))}),FailedToGenerateSelfsignedCertificate:()=>()=>u.createElement(v,{message:"Failed to generate a Selfsigned certificate for development."}),NonInteractiveTerminal:()=>()=>u.createElement(v,{message:"This command is not supported in non-interactive terminals. Please run the command in an interactive terminal (TTY)."}),FailedToResolveViteOrigin:()=>()=>u.createElement(v,{message:"Failed to resolve the base url for CSS asset urls"}),FailedToCreateAppRelease:()=>()=>u.createElement(q,{message:"Failed to create an app configuration in dev center."}),FailedToUpdateAppRelease:()=>()=>u.createElement(q,{message:"Failed to update an app configuration in dev center."}),FailedToCheckDeprecatedStatus:()=>()=>u.createElement(q,{message:"Failed to check cli version deprecated status."}),FailedToGetResolveNpmDependenciesResult:()=>()=>u.createElement(q,{message:"Failed to resolve Wix's lockfile."}),CliAppVersionMismatch:({cliVersion:e,cliAppVersion:r})=>()=>u.createElement(v,{message:u.createElement(_,null,"The versions of ",u.createElement(_,{bold:!0},"@wix/cli")," (",e,") and"," ",u.createElement(_,{bold:!0},"@wix/cli-app")," (",r,") dependencies do not match"),hint:u.createElement(_,null,"Align their versions in your ",u.createElement(_,{bold:!0},"package.json")," and re-install dependencies")}),FailedToGetAppValidity:()=>()=>u.createElement(v,{message:"Failed to get validation status for app version from dev center"}),InvalidDashboardPageRoute:({route:e,errorMessage:r})=>()=>u.createElement(v,{message:`Invalid dashboard page route: ${e}`,hint:r}),InvalidEmbeddedScriptFolder:({path:e,errorMessage:r})=>()=>u.createElement(v,{message:`Invalid embedded script folder: ${e}`,hint:r}),InvalidEmbeddedScriptTemplate:({templateFilename:e,errorMessage:r})=>()=>u.createElement(v,{message:`Invalid embedded script template in ${e}`,hint:r}),InvalidCustomElementTagName:({tagName:e,errorMessage:r})=>()=>u.createElement(v,{message:u.createElement(_,null,"We use name of folder as tagName for your custom element. Unfortunately, ",u.createElement(_,{bold:!0},e)," is invalid tagName. Reason: ",r),hint:u.createElement(_,null,"You can find rules for tagName here:"," ",u.createElement(_,{bold:!0},"https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names"))}),FailedToCreateSiteOverride:()=>()=>u.createElement(q,{message:"Failed to create site override configuration"}),FailedToGetPipelineErrorInfo:()=>()=>u.createElement(q,{message:"Failed to get error details"}),FailedToGetDeploymentStatus:()=>()=>u.createElement(q,{message:"Failed to get deployment status"})})}function L(t){return t instanceof Error?t.message:JSON.stringify(t)}function li(t){let e=t.path.join(".");return e?`- \`${e}\`: ${t.message}`:`- ${t.message}`}var Xr=({error:t,systemErrorOverride:e})=>Rd(()=>{let r=Po(t);return qo(r)&&e?e:Fd(pi(r.cliCode))},[t,e]);s();import Aa from"react";s();import{createContext as qd}from"react";var Mt=qd(null);s();s();s();var xi=W(gi(),1),Nd=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed"]),Zr=class extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}},Id=(t,e,r)=>{let o=r.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=o,t},kd=t=>Nd.has(t),yi=t=>globalThis.DOMException===void 0?new Error(t):new DOMException(t);async function Ze(t,e){return new Promise((r,o)=>{e={onFailedAttempt(){},retries:10,...e};let n=xi.default.operation(e);n.attempt(async i=>{try{r(await t(i))}catch(a){if(!(a instanceof Error)){o(new TypeError(`Non-error was thrown: "${a}". You should only throw errors.`));return}if(a instanceof Zr)n.stop(),o(a.originalError);else if(a instanceof TypeError&&!kd(a.message))n.stop(),o(a);else{Id(a,i,e);try{await e.onFailedAttempt(a)}catch(d){o(d);return}n.retry(a)||o(n.mainError())}}}),e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",()=>{n.stop();let i=e.signal.reason===void 0?yi("The operation was aborted."):e.signal.reason;o(i instanceof Error?i:yi(i))},{once:!0})})}s();s();s();s();function _i(t=""){let[e,r]=Dd(t);return r?{schemaName:r,schemaType:e}:{schemaName:e}}var Dd=t=>t.split("#");s();s();function wi(t,e,r,o){let n=t;for(let i of e.split(".")){if(!n)return r;n=n[i]}return`${n}${o}`}var Ld="_",Ud=["wix.com","editorx.com"],Md=["42.wixprod.net","uw2-edt-1.wixprod.net"],Hd="dev.wix-code.com",jd=/{(.*)}/,Bd=new RegExp(`\\.(${Ud.join("|")})$`),Jd=new RegExp(`\\.(${Md.join("|")})$`),Gd=new RegExp(`.*\\.${Hd}$`);function Ht(t){let e=Wd(t.host),r=Kd(e,t.domainToMappings),o=$d(t.protoPath,t.data||{});return Yd(o,r)}function $d(t,e){return t.split("/").map(r=>zd(r,e)).join("/")}function zd(t,e){let r=t.match(jd)||[],o=r[1];if(o){let n=t.replace(r[0],"");return wi(e,o,t,n)}return t}function Wd(t){return Vd(t).replace(Bd,"._base_domain_").replace(Jd,"._api_base_domain_").replace(Gd,"*.dev.wix-code.com")}function Vd(t){return t.replace("create.editorx.com","editor.editorx.com")}function Kd(t,e){let r=e[t]||e[Ld];return!r&&Xd(t)?e[Zd]:r}function Yd(t,e){let r=e?.find(o=>t.startsWith(o.destPath));return r?r.srcPath+t.slice(r.destPath.length):t}function Xd(t){return!!t.match(/\._base_domain_$/)}var Zd="www._base_domain_";s();function Ai(t,e=""){let r={};return Object.entries(t).forEach(([o,n])=>{let i=n!==null&&typeof n=="object"&&!Array.isArray(n),a=Qd(e,o);if(i){let d=Ai(n,a);Object.assign(r,d)}else r[a]=n}),r}function Qd(t,e){return`${t}${t?".":""}${e}`}function jt(t){let e=Ai(t);return Object.entries(e).reduce((r,[o,n])=>((Array.isArray(n)?n:[n]).forEach(a=>{a!=null&&r.append(o,a)}),r),new URLSearchParams)}s();s();var F;(function(t){t[t.TO_JSON=0]="TO_JSON",t[t.FROM_JSON=1]="FROM_JSON"})(F||(F={}));s();function bi(t,e={},r){return function(n={},i){return typeof n=="string"?n:a(t,n);function a(p,h){let m={};return[null,void 0].includes(h)?h:(Object.entries(h).forEach(([y,A])=>{let w=p[y],{schemaName:b,schemaType:R}=_i(w),M=R==="Map",P=c(b)?.checkRepetable?.(A)??Array.isArray(A),O;P?O=A.map(Z=>d(Z,b)):M?O=g(A,b):O=d(A,b),m[y]=O}),m)}function d(p,h){if(!h)return p;let m=e[h];if(c(h))return c(h).transform(p);if(m)return a(m,p);throw new Error(`${h} is neither schema nor serializable type`)}function c(p){return r[p]?.[i]}function g(p,h){return Object.entries(p).reduce((m,[y,A])=>(m[y]=d(A,h),m),{})}}}s();s();var Ci={types:["google.protobuf.Timestamp"],[F.TO_JSON]:{transform:t=>t?.toISOString()},[F.FROM_JSON]:{transform:t=>t?new Date(t):void 0}};s();var Ti={types:["google.protobuf.FieldMask"],[F.TO_JSON]:{transform:t=>t.join(","),checkRepetable:t=>t.some(e=>Array.isArray(e))},[F.FROM_JSON]:{transform:t=>typeof t=="object"?t.paths:t.split(",")}};s();var Si={types:["google.protobuf.BytesValue","BYTES"],[F.TO_JSON]:{transform:t=>{let e=t.reduce((r,o)=>r+String.fromCharCode(o),"");return btoa(e)}},[F.FROM_JSON]:{transform:t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0))}};s();var Oi={types:["google.protobuf.Duration"],[F.TO_JSON]:{transform:({seconds:t="0",nanos:e=0})=>{let r="";return e!==0&&(r=`.${e.toString().padStart(9,"0")}`),`${t}${r}s`}},[F.FROM_JSON]:{transform:t=>{let[e,r]=t.substring(0,t.length-1).split(".");return{seconds:e,nanos:el(r)}}}};function el(t){let e=0;if(t!==void 0){let r=3-t.length/3;e=parseInt(t,10)*Math.pow(1e3,r)}return e}s();var Ei={types:["FLOAT","DOUBLE","google.protobuf.FloatValue","google.protobuf.DoubleValue"],[F.TO_JSON]:{transform:t=>isFinite(t)?t:t.toString()},[F.FROM_JSON]:{transform:t=>t==="NaN"?NaN:t==="Infinity"?1/0:t==="-Infinity"?-1/0:t}};var Fi=[Ci,Ti,Si,Oi,Ei];s();function Ri(t){return t.reduce((e,r)=>{let o=r.types.reduce((n,i)=>({...n,[i]:r}),{});return{...e,...o}},{})}var tl=Ri([...Fi]);function se(t,e={}){let r=bi(t,e,tl);return{fromJSON(o){let n=rl(o)||o;return r(n,F.FROM_JSON)},toJSON(o){return r(o,F.TO_JSON)}}}function rl(t){try{return JSON.parse(t)}catch{}}var ol={dateCreated:"google.protobuf.Timestamp",dateUpdated:"google.protobuf.Timestamp"},nl={account:"_account"};var sl={};function il(t){var e={"api._api_base_domain_":[{srcPath:"/account-server",destPath:""}],"www._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"manage._base_domain_":[{srcPath:"/_api/account-server",destPath:""},{srcPath:"/account-server",destPath:""}],"premium._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"editor._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"blocks._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"create.editorx":[{srcPath:"/_api/account-server",destPath:""}],"bo._base_domain_":[{srcPath:"/account-server",destPath:""}],"wixbo.ai":[{srcPath:"/account-server",destPath:""}],"www.wixapis.com":[{srcPath:"/accounts",destPath:""}],"users._base_domain_":[{srcPath:"/_api/account-server",destPath:""}],"*.dev.wix-code.com":[{srcPath:"/_api/account-server",destPath:""}]};return Ht(Object.assign(t,{domainToMappings:e}))}function qi(t){var e=se(sl,{}),r=e.toJSON,o=e.fromJSON,n=se(nl,{_account:ol}).fromJSON;function i(a){var d=a.host,c=r(t),g={entityFqdn:"wix.identity.account.v2.account",method:"GET",methodFqn:"com.wixpress.account.api.AccountService.getMyAccount",url:il({protoPath:"/v1/accounts/my_account",data:c,host:d}),params:jt(c),transformResponse:n};return g}return i.fromReq=o,i.__isAmbassador=!0,i}s();var al={},ul={};var cl={body:"BYTES"},dl={body:"BYTES"},ll={},pl={};function Qr(t){var e={"manage._base_domain_":[{srcPath:"/oauth2",destPath:"/v1/oauth"}],"www.wixapis.com":[{srcPath:"/oauth2",destPath:"/v1/oauth"},{srcPath:"/oauth2/token_info",destPath:"/v1/token_info"}],"users._base_domain_":[{srcPath:"/v1/oauth/device/verify",destPath:"/v1/oauth/device/verify"},{srcPath:"/v1/oauth/manage/user-code",destPath:"/v1/oauth/manage/user-code"}],_:[{srcPath:"/_api/oauth2",destPath:"/v1/oauth"}]};return Ht(Object.assign(t,{domainToMappings:e}))}function eo(t){var e=se(cl,{}),r=e.toJSON,o=e.fromJSON,n=se(dl,{}).fromJSON;function i(a){var d=a.host,c=r(t),g={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.Token",url:Qr({protoPath:"/v1/oauth/token",data:c,host:d}),data:c,transformResponse:n};return g}return i.fromReq=o,i.__isAmbassador=!0,i}function Pi(t){var e=se(al,{}),r=e.toJSON,o=e.fromJSON,n=se(ul,{}).fromJSON;function i(a){var d=a.host,c=r(t),g={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"GET",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.DeviceCode",url:Qr({protoPath:"/v1/oauth/device/code",data:c,host:d}),params:jt(c),transformResponse:n};return g}return i.fromReq=o,i.__isAmbassador=!0,i}function Ni(t){var e=se(ll,{}),r=e.toJSON,o=e.fromJSON,n=se(pl,{}).fromJSON;function i(a){var d=a.host,c=r(t),g={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.RevokeRefreshToken",url:Qr({protoPath:"/v1/oauth/revoke",data:c,host:d}),data:c,transformResponse:n};return g}return i.fromReq=o,i.__isAmbassador=!0,i}var De=W(me(),1);s();var Ii=C.object({deviceCode:C.string(),verificationUri:C.string().url(),userCode:C.string(),expiresIn:C.number()}),to=C.object({access_token:C.string(),refresh_token:C.string(),expires_in:C.number()}).transform(t=>({accessToken:t.access_token,refreshToken:t.refresh_token,expiresIn:t.expires_in})),ro=C.object({userId:C.string().uuid(),email:C.string().email()}),ki=C.object({account:C.object({slug:C.string(),accountId:C.string().uuid(),accountOwner:C.string().uuid()})}),Di=C.object({accessToken:C.string(),refreshToken:C.string(),expiresIn:C.number(),issuedAt:C.number()}),Li=Di.extend({userInfo:ro}),fl=C.object({token:C.string(),accountId:C.string().uuid(),userInfo:C.object({userId:C.string().uuid(),email:C.string()})});var{FailedToGetAuthToken:ml,FailedToGetDeviceCode:hl,FailedToRenewAuthToken:vl,FailedToRenewAuthTokenSiteNotFound:gl,FailedToRevokeRefreshToken:yl}=Q,oo="6f95cec8-3e98-48b9-b4e5-1fb92fcd9973",Ui=()=>Math.floor(Date.now()/1e3),Qe=class extends Error{},Bt=(0,De.variant)({TokenRenewed:(0,De.payload)(),RefreshTokenRevoked:(0,De.fields)()}),no=class{constructor(e){this.httpClient=e;let{minRetryTimeout:r}=be();this.retryOptions={retries:3,minTimeout:r,maxTimeout:3*1e3}}retryOptions;async requestDeviceCode(e={}){try{let{data:r}=await Ze(()=>this.httpClient.request(Pi({...e,clientId:oo})),this.retryOptions);return Ii.parse(r)}catch(r){throw new j({code:hl(),cause:r})}}async createToken(e){try{let r={clientId:oo,grantType:"urn:ietf:params:oauth:grant-type:device_code",scope:"offline_access",...e},{data:o}=await Ze(()=>this.httpClient.request(eo(r)),this.retryOptions);return{...to.parse(o),issuedAt:Ui()}}catch(r){throw Wr(r)&&(r.response?.data?.message==="Device code is not yet verified"||r.response?.data?.error==="authorization_pending")?new Qe("Device code is not yet verified."):new j({code:ml(),cause:r})}}async renewToken(e){try{let r={clientId:oo,grantType:"refresh_token",...e},{data:o}=await Ze(()=>this.httpClient.request(eo(r)),this.retryOptions),n=to.parse(o);return Bt.TokenRenewed({...n,issuedAt:Ui()})}catch(r){if(Wr(r)){if(r.response?.status===400&&r.response?.data?.error==="invalid_grant")return Bt.RefreshTokenRevoked({cause:r});if(e.siteId&&r.response?.status===404&&r.response?.data?.details?.applicationError?.code==="SITE_NOT_FOUND")throw new j({code:gl({siteId:e.siteId}),cause:r})}throw new j({code:vl(),cause:r})}}async revokeRefreshToken(e,{email:r}){try{let{data:o}=await this.httpClient.request(Ni(e));return o}catch(o){throw new j({code:yl({email:r}),info:{email:r},cause:o})}}async userInfo({accessToken:e}){try{let r=Lt({type:"backoffice",getAppToken:async()=>e}),{data:o}=await r.get("/_serverless/wix-cli-userinfo/userinfo");return ro.parse(o)}catch(r){throw new j({code:Q.FailedToGetUserInfo(),cause:r})}}async getMyAccount({token:e}){try{let r=Lt({type:"backoffice",getAppToken:async()=>e}),{data:o}=await r.request(qi({}));return ki.parse(o).account}catch(r){throw new j({code:Q.FailedToGetMyAccount(),cause:r})}}},Le=new no(Lt({type:"backoffice"}));s();import{unlink as xl,rm as _l}from"node:fs/promises";import{resolve as Jt}from"node:path";var K=W(me(),1);function Mi(){return Jt(Xt(),"auth.json")}function io(){return Jt(Xt(),"auth")}function Hi(){return Jt(io(),"account.json")}function wl(t){return Jt(io(),`${t}.json`)}var Iv=(0,K.variant)({Authenticated:(0,K.payload)(),Unauthenticated:{}});var so=(0,K.variant)({Authenticated:(0,K.fields)(),Unauthenticated:{},Expired:(0,K.fields)()});async function ji(){let t=Hi();if(!await Zt(t))return so.Unauthenticated();let e=await Io(t),r=Li.parse(e);return co(r)?so.Authenticated(r):so.Expired(r)}var kv=(0,K.variant)({Authenticated:(0,K.fields)(),Unauthenticated:{},Expired:(0,K.fields)()});async function ao(t,e){try{let r=e?wl(e):Hi();await No(r,t)}catch(r){throw new j({code:Q.FailedToSaveAuthData({cause:r}),cause:r})}}async function Bi(){try{await _l(io(),{recursive:!0,force:!0})}catch(t){throw new j({code:Q.FailedToDeleteAuthData({cause:t}),cause:t})}await uo()&&await Al()}async function Al(){try{await xl(Mi())}catch(t){throw new j({code:Q.FailedToDeleteLegacyAuthData({cause:t}),cause:t})}}async function uo(){return Zt(Mi())}function co(t){let e=Math.floor(Date.now()/1e3),r=10*60,o=t.expiresIn-r;return t.issuedAt+o>e}s();s();s();var lo=class{value;next;constructor(e){this.value=e}},et=class{#e;#t;#r;constructor(){this.clear()}enqueue(e){let r=new lo(e);this.#e?(this.#t.next=r,this.#t=r):(this.#e=r,this.#t=r),this.#r++}dequeue(){let e=this.#e;if(e)return this.#e=this.#e.next,this.#r--,e.value}clear(){this.#e=void 0,this.#t=void 0,this.#r=0}get size(){return this.#r}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}};function po(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new et,r=0,o=()=>{r--,e.size>0&&e.dequeue()()},n=async(d,c,g)=>{r++;let p=(async()=>d(...g))();c(p);try{await p}catch{}o()},i=(d,c,g)=>{e.enqueue(n.bind(void 0,d,c,g)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},a=(d,...c)=>new Promise(g=>{i(d,g,c)});return Object.defineProperties(a,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),a}var pe=W(me(),1);s();s();var Ue=class extends Error{constructor(e){super(e),this.name="TimeoutError"}},fo=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},Ji=t=>globalThis.DOMException===void 0?new fo(t):new DOMException(t),Gi=t=>{let e=t.reason===void 0?Ji("This operation was aborted."):t.reason;return e instanceof Error?e:Ji(e)};function mo(t,e){let{milliseconds:r,fallback:o,message:n,customTimers:i={setTimeout,clearTimeout}}=e,a,c=new Promise((g,p)=>{if(typeof r!="number"||Math.sign(r)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(e.signal){let{signal:m}=e;m.aborted&&p(Gi(m)),m.addEventListener("abort",()=>{p(Gi(m))})}if(r===Number.POSITIVE_INFINITY){t.then(g,p);return}let h=new Ue;a=i.setTimeout.call(void 0,()=>{if(o){try{g(o())}catch(m){p(m)}return}typeof t.cancel=="function"&&t.cancel(),n===!1?g():n instanceof Error?p(n):(h.message=n??`Promise timed out after ${r} milliseconds`,p(h))},r),(async()=>{try{g(await t)}catch(m){p(m)}})()}).finally(()=>{c.clear()});return c.clear=()=>{i.clearTimeout.call(void 0,a),a=void 0},c}var ho=Symbol("resolveValue");async function tt(t,e={}){let{interval:r=20,timeout:o=Number.POSITIVE_INFINITY,before:n=!0}=e,i,a=!1,d=new Promise((c,g)=>{let p=async()=>{try{let h=await t();if(typeof h=="object"&&h[ho])c(h[ho]);else{if(typeof h!="boolean")throw new TypeError("Expected condition to return a boolean");h===!0?c():a||(i=setTimeout(p,r))}}catch(h){g(h)}};n?p():i=setTimeout(p,r)});if(o===Number.POSITIVE_INFINITY)return d;try{return await mo(d,typeof o=="number"?{milliseconds:o}:o)}finally{a=!0,clearTimeout(i)}}tt.resolveWith=t=>({[ho]:t});var $i=t=>1e3*t;async function bl({deviceCode:t,expiresIn:e},{signal:r}){try{let o=await tt(async()=>{try{let a=await Le.createToken({deviceCode:t});return tt.resolveWith(a)}catch(a){if(a instanceof Qe)return!1;throw a}},{interval:be().waitForLoginInterval??$i(3),timeout:{milliseconds:$i(e),signal:r}}),n=await Le.userInfo({accessToken:o.accessToken}),i={...o,userInfo:n};return await Bi(),await ao(i),i}catch(o){throw o instanceof Ue?new j({code:Q.DeviceCodeTimedOut()}):o}}async function Wi({refreshToken:t,userInfo:e}){let r=await Le.renewToken({refreshToken:t});return(0,pe.isType)(r,Bt.TokenRenewed)&&await ao({...r.payload,userInfo:e}),r}async function Cl(){let t=await ji();return(0,pe.match)(t,{Authenticated:e=>e,Unauthenticated:()=>null,Expired:async e=>{let r=await Wi(e);return(0,pe.match)(r,{TokenRenewed:({payload:o})=>({...o,userInfo:e.userInfo}),RefreshTokenRevoked:(0,pe.constant)(null)})}})}function zi({userInfo:t,...e}){let r=po(1),o={...e};return{getAccessToken:()=>r(async()=>{if(co(o))return o.accessToken;let n=await Wi({...o,userInfo:t});return(0,pe.match)(n,{TokenRenewed:({payload:i})=>(o=i,o.accessToken),RefreshTokenRevoked:({cause:i})=>{throw new j({code:Q.FailedToRenewAuthTokenRefreshTokenRevoked(),cause:i})}})}),getRefreshToken:()=>o.refreshToken,userInfo:t}}var rt={async isLoggedIn(){let t=await Cl();return t?zi(t):null},async login({deviceCode:t,signal:e}){let r=await bl(t,{signal:e});return zi(r)}};s();var _a=W(me(),1);import Kt from"react";s();import ha from"react";s();function ig(t){return{evid:5200,src:11,endpoint:"wix-cli",params:t}}function ag(t){return{evid:5201,src:11,endpoint:"wix-cli",params:t}}function ug(t){return{evid:5208,src:11,endpoint:"wix-cli",params:t}}function cg(t){return{evid:5209,src:11,endpoint:"wix-cli",params:t}}function dg(t){return{evid:5210,src:11,endpoint:"wix-cli",params:t}}function Vi(t){return{evid:5211,src:11,endpoint:"wix-cli",params:t}}function vo(t){return{evid:5212,src:11,endpoint:"wix-cli",params:t}}var va=W(me(),1);var Ki={"login.instructions_title":"Authorize the CLI to access your Wix account:","login.instructions_details":`1. Copy this code to the clipboard: <0>{code}</0>
|
|
21
|
+
2. Press <1/> to connect to <2/> then paste the code`,"login.legacy_auth_notice":"We implemented a new and more secure login method. You'll need to re-login to continue using the CLI.","login.error_opening_browser":"Failed to open browser, please try opening <0/> manually."};s();import z,{useState as Ll}from"react";s();var pa=W(ca(),1);s();var da=W(Dt(),1);async function la(t,e){await(0,da.createHttpClient)().post(t,void 0,{params:{url:e}})}async function fa(t){let{userBrowserTestEndpoint:e}=be();e?await la(e,t):await(0,pa.default)(t,{background:!0})}var ma=({userCode:t,verificationUri:e})=>{let{reportError:r}=rr(),[o,n]=Ll(null);return ko((i,a)=>{a.return&&fa(e).catch(d=>{r(d),n(d)})}),z.createElement(z.Fragment,null,z.createElement(Se,{i18nKey:"login.instructions_title"}),z.createElement(ee,{flexDirection:"column",marginTop:1,marginBottom:1,marginLeft:2},z.createElement(Se,{i18nKey:"login.instructions_details",components:[z.createElement(_,{skin:"legacyBlue"}),z.createElement(Lo,{value:"enter"}),z.createElement(er,{url:e})],values:{code:t}})),o&&z.createElement(z.Fragment,null,z.createElement(ee,{flexDirection:"column",marginBottom:1},z.createElement(Xr,{error:o})),z.createElement(Se,{i18nKey:"login.error_opening_browser",components:[z.createElement(er,{url:e})]})))};var ga=({loginFn:t,onLogin:e,onError:r})=>{let o=tr();function n(d){o.report(vo({isSuccess:!1,...d instanceof Error?{errorType:d.name}:{errorType:"unknown",errorMessage:JSON.stringify(d)}})),r(d)}let i=Mo(async({signal:d},c)=>{try{let g=await t({deviceCode:c,signal:d});o.report(vo({isSuccess:!0})),e(g)}catch(g){n(g)}}),{status:a}=Te(async()=>(o.report(Vi({})),Le.requestDeviceCode()),[],{onSuccess:d=>{i.execute(d)},onError:n});return(0,va.match)(a,{Error:()=>null,Loading:()=>ha.createElement(dt,null),Success:({result:{userCode:d,verificationUri:c}})=>ha.createElement(ma,{userCode:d,verificationUri:c})})};s();var ya=W(me(),1);import Vt from"react";var xa=({children:t})=>{let{status:e}=Te(uo,[],{onError:()=>{}});return(0,ya.match)(e,{Error:()=>null,Loading:()=>null,Success:({result:r})=>Vt.createElement(Vt.Fragment,null,r&&Vt.createElement(ee,{marginBottom:1},Vt.createElement(Se,{i18nKey:"login.legacy_auth_notice"})),t)})};var wa=({authStrategy:{login:t,isLoggedIn:e},onLogin:r,onError:o,children:n})=>{let{status:i,merge:a}=Te(e,[],{onSuccess:d=>{d&&r(d)},onError:o});return(0,_a.match)(i,{Loading:()=>Kt.createElement(dt,null),Error:()=>null,Success:({result:d})=>d===null?Kt.createElement(Ho,{messages:Ki},Kt.createElement(xa,null,Kt.createElement(ga,{loginFn:t,onLogin:c=>{a({result:c}),r(c)},onError:o}))):n(d)})};var Ul=({children:t,onError:e,onLogin:r})=>{let o=Uo();return Aa.createElement(wa,{authStrategy:rt,onLogin:({userInfo:n})=>r?.(n),onError:e??o},({getAccessToken:n,getRequestHeaders:i,userInfo:a})=>Aa.createElement(Mt.Provider,{value:{getAccessToken:n,getRequestHeaders:i,userInfo:a}},t))};s();s();import{useContext as Ml}from"react";function Hl(){let t=Ml(Mt);if(!t)throw new Error("useAuth() cannot be used without an <AuthProvider>");return t}var{isLoggedIn:hy}=rt;export{Ze as a,Ht as b,jt as c,se as d,Dt as e,Lt as f,Wr as g,Ue as h,tt as i,Hl as j,Oa as k,tr as l,ig as m,ag as n,ug as o,cg as p,dg as q,fa as r,Xr as s,qa as t,rr as u,Ul as v,hy as w};
|
|
22
|
+
/*! Bundled license information:
|
|
23
|
+
|
|
24
|
+
base-64/base64.js:
|
|
25
|
+
(*! https://mths.be/base64 v1.0.0 by @mathias | MIT license *)
|
|
26
|
+
*/
|
|
27
|
+
//# sourceMappingURL=chunk-6R3ZFQVO.js.map
|