@wix/cli-app 1.1.14 → 1.1.16
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-EKTXL4HX.js +4 -0
- package/build/{CreateVersionCommand-BDPN3PCU.js.map → CreateVersionCommand-EKTXL4HX.js.map} +1 -1
- package/build/DevCommand-F4JNOQD3.js +4 -0
- package/build/{DevCommand-MZNQFQQK.js.map → DevCommand-F4JNOQD3.js.map} +1 -1
- package/build/GenerateCommand-UOXXMOFE.js +99 -0
- package/build/{GenerateCommand-GD5HZZQR.js.map → GenerateCommand-UOXXMOFE.js.map} +1 -1
- package/build/PreviewCommand-5SJI24RE.js +4 -0
- package/build/PreviewCommand-5SJI24RE.js.map +1 -0
- package/build/ServeCommand-SCDZSOGW.js +4 -0
- package/build/{ServeCommand-FW2FYLQU.js.map → ServeCommand-SCDZSOGW.js.map} +1 -1
- package/build/build-QKFFY6BT.js +4 -0
- package/build/{build-I6KUDQRX.js.map → build-QKFFY6BT.js.map} +1 -1
- package/build/chunk-62RRZRN6.js +6 -0
- package/build/chunk-62RRZRN6.js.map +1 -0
- package/build/{chunk-KZ5AQZHX.js → chunk-6VY5XPWN.js} +2 -2
- package/build/chunk-C6CRDQAM.js +4 -0
- package/build/chunk-F3L55KWK.js +4 -0
- package/build/{chunk-OMVHSBST.js.map → chunk-F3L55KWK.js.map} +1 -1
- package/build/chunk-HFEDL4QC.js +73 -0
- package/build/chunk-HFEDL4QC.js.map +1 -0
- package/build/chunk-J7GQKX36.js +4 -0
- package/build/{chunk-HZIZXN3F.js.map → chunk-J7GQKX36.js.map} +1 -1
- package/build/chunk-JRUKA4BX.js +4 -0
- package/build/{chunk-ADPHGQLQ.js.map → chunk-JRUKA4BX.js.map} +1 -1
- package/build/chunk-KDEP6ACN.js +4 -0
- package/build/{chunk-VKLHCMXH.js.map → chunk-KDEP6ACN.js.map} +1 -1
- package/build/chunk-KOTYDSCW.js +4 -0
- package/build/{chunk-ET3UG47O.js.map → chunk-KOTYDSCW.js.map} +1 -1
- package/build/{chunk-ZGFYYRQO.js → chunk-N6MHPAL7.js} +2 -2
- package/build/{chunk-ZGFYYRQO.js.map → chunk-N6MHPAL7.js.map} +1 -1
- package/build/chunk-NCLWI32Y.js +4 -0
- package/build/{chunk-RANVKLXM.js.map → chunk-NCLWI32Y.js.map} +1 -1
- package/build/{chunk-RHURHBSO.js → chunk-OQ2EIA5Y.js} +2 -2
- package/build/chunk-PBVA37S6.js +4 -0
- package/build/{chunk-FJVNH2R2.js.map → chunk-PBVA37S6.js.map} +1 -1
- package/build/chunk-RZD2Z3NM.js +4 -0
- package/build/chunk-RZD2Z3NM.js.map +1 -0
- package/build/chunk-TXD4M2YS.js +27 -0
- package/build/chunk-TXD4M2YS.js.map +1 -0
- package/build/chunk-V4D26EXO.js +87 -0
- package/build/chunk-V4D26EXO.js.map +1 -0
- package/build/chunk-VPVMEECP.js +23 -0
- package/build/{chunk-CQOGOYYY.js.map → chunk-VPVMEECP.js.map} +1 -1
- package/build/{chunk-RVYKFFVG.js → chunk-YYYCYGWT.js} +2 -2
- package/build/{chunk-RVYKFFVG.js.map → chunk-YYYCYGWT.js.map} +1 -1
- package/build/{chunk-OG3PMZHA.js → chunk-ZHOPW26J.js} +2 -2
- package/build/esm-GVPPSDDL.js +352 -0
- package/build/esm-GVPPSDDL.js.map +1 -0
- package/build/index.js +22 -1
- package/build/index.js.map +1 -1
- package/build/preview-WCMD3SX5.js +4 -0
- package/build/{preview-LPAYZBA2.js.map → preview-WCMD3SX5.js.map} +1 -1
- package/build/render-command-S4HOHZ67.js +4 -0
- package/build/{render-command-BHZU4MZU.js.map → render-command-S4HOHZ67.js.map} +1 -1
- package/package.json +3 -3
- package/templates/dashboard-plugin/plugin.tsx.ejs +1 -1
- package/build/CreateVersionCommand-BDPN3PCU.js +0 -4
- package/build/DevCommand-MZNQFQQK.js +0 -4
- package/build/GenerateCommand-GD5HZZQR.js +0 -99
- package/build/PreviewCommand-4V5HLV2C.js +0 -4
- package/build/PreviewCommand-4V5HLV2C.js.map +0 -1
- package/build/ServeCommand-FW2FYLQU.js +0 -4
- package/build/build-I6KUDQRX.js +0 -4
- package/build/chunk-ADPHGQLQ.js +0 -4
- package/build/chunk-CQOGOYYY.js +0 -23
- package/build/chunk-ET3UG47O.js +0 -4
- package/build/chunk-FJVNH2R2.js +0 -4
- package/build/chunk-HZIZXN3F.js +0 -4
- package/build/chunk-L6Z5LUAF.js +0 -25
- package/build/chunk-L6Z5LUAF.js.map +0 -1
- package/build/chunk-MRFJNNDD.js +0 -75
- package/build/chunk-MRFJNNDD.js.map +0 -1
- package/build/chunk-OMVHSBST.js +0 -4
- package/build/chunk-Q72ID43B.js +0 -4
- package/build/chunk-RANVKLXM.js +0 -4
- package/build/chunk-RW7A77Z2.js +0 -4
- package/build/chunk-RW7A77Z2.js.map +0 -1
- package/build/chunk-VKLHCMXH.js +0 -4
- package/build/chunk-XBWZVJAS.js +0 -108
- package/build/chunk-XBWZVJAS.js.map +0 -1
- package/build/preview-LPAYZBA2.js +0 -4
- package/build/render-command-BHZU4MZU.js +0 -4
- /package/build/{chunk-KZ5AQZHX.js.map → chunk-6VY5XPWN.js.map} +0 -0
- /package/build/{chunk-Q72ID43B.js.map → chunk-C6CRDQAM.js.map} +0 -0
- /package/build/{chunk-RHURHBSO.js.map → chunk-OQ2EIA5Y.js.map} +0 -0
- /package/build/{chunk-OG3PMZHA.js.map → chunk-ZHOPW26J.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 Mo,a as ut,b as ct,d as te,e as Ce,f as Io,g as _,l as ko,q as Zt,r as Do,s as Qt,t as lt,u as Lo,w as Te,x as Uo}from"./chunk-V4D26EXO.js";import{a as Yt,e as Po,f as No,g as Xt}from"./chunk-HFEDL4QC.js";import{a as me,c as j,d as ee,f as Ro,g as qo,h as C,i as be}from"./chunk-62RRZRN6.js";import{a as N,b as G,c as x,d as Fo,e as V,f as Ae,g as d,h as s}from"./chunk-HFDLXX7R.js";var Me=x($=>{"use strict";s();Object.defineProperty($,"__esModule",{value:!0});$.ORIGINAL_PROTOCOL_HEADER=$.ORIGINAL_HOST_HEADER=$.ORIGINAL_URL_HEADER=$.SSR_PROTOCOL=$.SSR_HOST=$.NO_SCENARIO_FOUND=void 0;$.NO_SCENARIO_FOUND="NO_SCENARIO_FOUND";$.SSR_HOST="www.wix.com";$.SSR_PROTOCOL="http";$.ORIGINAL_URL_HEADER="x-wix-metro-original-url";$.ORIGINAL_HOST_HEADER="x-wix-metro-original-host";$.ORIGINAL_PROTOCOL_HEADER="x-wix-metro-original-protocol"});function Bo(){if(typeof document=="object")return document}function he(){return typeof self=="object"?self:global}var He=G(()=>{"use strict";s()});function Jo(t){let e=Ia(t);return e?e.split("=")[1]:""}function Na(){let t=Bo();return t&&t.cookie?decodeURIComponent(t.cookie).split(";"):[]}function Ia(t){return Na().filter(e=>t===e.split("=")[0].trim())[0]}var Go=G(()=>{"use strict";s();He()});function $o(){let t=Jo(ka);return{[Da]:t}}var ka,Da,zo=G(()=>{"use strict";s();Go();ka="XSRF-TOKEN",Da="x-xsrf-token"});function Wo(){let t=Ua();return{[La]:t}}function Ua(){let t=he();return t&&t.commonConfig&&typeof t.commonConfig.brand=="string"?t.commonConfig.brand:""}var La,Vo=G(()=>{"use strict";s();He();La="x-wix-brand"});function Ko(){return Ha()||Ma()||ja()}function Ma(){let t=he();if(t&&t.Wix&&t.Wix.Utils&&typeof t.Wix.Utils._getConsentPolicyHeader=="function")return t.Wix.Utils._getConsentPolicyHeader()}function Ha(){let t=he();if(t&&t.consentPolicyManager&&typeof t.consentPolicyManager._getConsentPolicyHeader=="function")return t.consentPolicyManager._getConsentPolicyHeader()}function ja(){return{}}var Yo=G(()=>{"use strict";s();He()});function Xo(t){return{authorization:t}}var Zo=G(()=>{"use strict";s()});function Qo(){return Ba()?!!process.env.TEAMCITY_VERSION||!!process.env.BUILDKITE:!1}function Ba(){return typeof process<"u"&&process.versions?.node!=null}var en=G(()=>{"use strict";s()});function tn(t){let e=process.env.ARTIFACT_ID??process.env.APP_NAME??"";return{"X-Wix-Client-Artifact-Id":t??(Qo()?"":e)}}var rn=G(()=>{"use strict";s();en()});function za(){let e=he()?.commonConfig;if(!e)return null;let r={},o=!1;return Object.keys(e).forEach(n=>{let i=$a[n];i?(r[i]=e[n],o=!0):Ja.indexOf(n)<0&&typeof e[n]!="function"&&(r[n]=e[n],o=!0)}),o?r:null}var Ja,Ga,$a,on,nn=G(()=>{"use strict";s();He();Ja=["consentPolicy","consentPolicyHeader"],Ga="commonConfig",$a={bsi:"BSI"};on=()=>{let t=za(),e=t?JSON.stringify(t):"";return{[Ga]:encodeURIComponent(e)}}});var sn=x((dt,je)=>{"use strict";s();(function(t){var e=typeof dt=="object"&&dt,r=typeof je=="object"&&je&&je.exports==e&&je,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+/",l=/[\t\n\f\r ]/g,c=function(m){m=String(m).replace(l,"");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},v=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:v,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})(dt)});function un({lang:t,locale:e,isPrimaryLanguage:r,signedInstance:o}){if(Va({lang:t,locale:e,isPrimaryLanguage:r})){let n=Ka(o);if(n!==void 0)return{[Wa]:[t,e,r?.toString(),n].join("|")}}return{}}function Va({lang:t,locale:e,isPrimaryLanguage:r}){return t&&e&&/^(true|false)$/.test(r?.toString()||"")}function Ka(t){try{let e=t?.startsWith("wixcode")?t?.split(".")[2]:t?.split(".")[1];if(e)return JSON.parse(an.default.decode(e)).instanceId}catch{}}var an,Wa,cn=G(()=>{"use strict";s();an=V(sn()),Wa="x-wix-linguist"});var Be,ln=G(()=>{"use strict";s();Be=class extends Error{constructor(e,r,o){super(`WixHeadersValidationError: expected ${r} to be ${e} but got ${JSON.stringify(o)}`)}}});function dn(t,e){if(typeof e!="boolean")throw new Be("boolean",t,e)}function pn(t,e){if(typeof e!="string")throw new Be("string",t,e)}var fn=G(()=>{"use strict";s();ln()});var mn={};Fo(mn,{createHeaders:()=>Ya});function Ya(t={}){t={csrf:!0,signedInstance:"",...t},Xa(t);let e=[Wo(),Ko(),Xo(t.signedInstance),tn(t.artifactId),on(),un({signedInstance:t.signedInstance,...t.multilingualOptions})];return t.csrf&&e.push($o()),e.filter(r=>Object.values(r).every(o=>o)).reduce((r,o)=>({...r,...o}),{})}function Xa(t){dn("opts.csrf",t.csrf),pn("opts.signedInstance",t.signedInstance)}var hn=G(()=>{"use strict";s();zo();Vo();Yo();Zo();rn();nn();cn();fn()});var rr=x(de=>{"use strict";s();Object.defineProperty(de,"__esModule",{value:!0});de.isNode=de.isWebWorker=de.isBrowser=void 0;function Za(){return typeof window<"u"}de.isBrowser=Za;function Qa(){var t;return typeof self=="object"&&((t=self?.constructor)===null||t===void 0?void 0:t.name)==="DedicatedWorkerGlobalScope"}de.isWebWorker=Qa;function eu(){var t;return typeof process<"u"&&((t=process==null?void 0:process.versions)===null||t===void 0?void 0:t.node)!=null}de.isNode=eu});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=Me(),or=rr();function tu(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return/(^https?:)|(^\/\/)/.test(t)}S.isAbsoluteUrl=tu;async function ru(t){try{await t()}catch{}}S.silent=ru;function ou(t,e){return e.split(".").filter(r=>r).reduce((r,o)=>r[o],t)}S.extractProp=ou;function nu(t){return t.baseURL?yn(t.baseURL):t.isSSR?gn.SSR_HOST:typeof self<"u"&&self.location?self.location.host:""}S.resolveHost=nu;function su(t){return t.baseURL?vn(t.baseURL):t.isSSR?gn.SSR_PROTOCOL:typeof self<"u"&&self.location?self.location.protocol:""}S.resolveProtocol=su;function vn(t){try{return new URL(t).protocol}catch{return xn(t).protocol}}S.extractProtocol=vn;function yn(t){let e;try{e=new URL(t)}catch{e=new URL(`http:${t}`)}try{return e.host}catch{return xn(t).host}}S.extractHost=yn;function xn(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 iu(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=iu;function nr(){let t={httpMockServer:{enabled:!1}},e;if((0,or.isNode)()&&process.env.HTTP_CLIENT_GLOBAL_CONFIG)try{e=JSON.parse(process.env.HTTP_CLIENT_GLOBAL_CONFIG)}catch{}return e||((0,or.isBrowser)()?e=window._httpClientGlobalConfig:(0,or.isWebWorker)()),e||t}S.getGlobalConfig=nr;function au(){return nr().httpMockServer.enabled}S.isHttpMockServerEnabled=au;function uu(){return nr().httpMockServer.allowUnmocked}S.shouldAllowUnmocked=uu;function cu(t){return Object.entries(t).map(([e,r])=>`${e}=${encodeURIComponent(r)}`).flat().join("&")}S.toSearchQueryParams=cu});var _n=x((Gp,lu)=>{lu.exports=["wix.com","editorx.com","wix-code.com","wixapps.net","wixprod.net"]});var ft=x(pe=>{"use strict";s();Object.defineProperty(pe,"__esModule",{value:!0});pe.isWixDomain=pe.composeHeaders=pe.requestIdOrEmptyString=void 0;var du=(ct(),Ae(ut)),pu=(hn(),Ae(mn)),wn=pt(),fu=du.__importDefault(_n());function mu(t){var e;return((e=t?.headers)===null||e===void 0?void 0:e["x-wix-request-id"])||""}pe.requestIdOrEmptyString=mu;var hu=({url:t,disableWixHeaders:e,wixHeadersOpts:r})=>!e&&An(t)?(0,pu.createHeaders)(r):{};pe.composeHeaders=hu;function An(t){if(!(0,wn.isAbsoluteUrl)(t))return!0;let r=`.${(0,wn.extractHost)(t)}`;return!!fu.default.find(n=>r.endsWith(`.${n}`))}pe.isWixDomain=An});var sr=x(ae=>{"use strict";s();Object.defineProperty(ae,"__esModule",{value:!0});ae.createHttpError=ae.HttpError=ae.axiosErrorFields=void 0;var gu=ft();ae.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),ae.axiosErrorFields.forEach(r=>{this[r]=e[r]})}get requestId(){return(0,gu.requestIdOrEmptyString)(this.response)}};ae.HttpError=mt;function vu(...t){return new mt(...t)}ae.createHttpError=vu});var ir=x((Kp,bn)=>{"use strict";s();bn.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((Xp,Sn)=>{"use strict";s();var yu=ir(),ge=Object.prototype.toString;function cr(t){return ge.call(t)==="[object Array]"}function ar(t){return typeof t>"u"}function xu(t){return t!==null&&!ar(t)&&t.constructor!==null&&!ar(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function _u(t){return ge.call(t)==="[object ArrayBuffer]"}function wu(t){return typeof FormData<"u"&&t instanceof FormData}function Au(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function bu(t){return typeof t=="string"}function Cu(t){return typeof t=="number"}function Cn(t){return t!==null&&typeof t=="object"}function ht(t){if(ge.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Tu(t){return ge.call(t)==="[object Date]"}function Su(t){return ge.call(t)==="[object File]"}function Ou(t){return ge.call(t)==="[object Blob]"}function Tn(t){return ge.call(t)==="[object Function]"}function Eu(t){return Cn(t)&&Tn(t.pipe)}function Fu(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function Ru(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function qu(){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]),cr(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 ur(){var t={};function e(n,i){ht(t[i])&&ht(n)?t[i]=ur(t[i],n):ht(n)?t[i]=ur({},n):cr(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 Pu(t,e,r){return lr(e,function(n,i){r&&typeof n=="function"?t[i]=yu(n,r):t[i]=n}),t}function Nu(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}Sn.exports={isArray:cr,isArrayBuffer:_u,isBuffer:xu,isFormData:wu,isArrayBufferView:Au,isString:bu,isNumber:Cu,isObject:Cn,isPlainObject:ht,isUndefined:ar,isDate:Tu,isFile:Su,isBlob:Ou,isFunction:Tn,isStream:Eu,isURLSearchParams:Fu,isStandardBrowserEnv:qu,forEach:lr,merge:ur,extend:Pu,trim:Ru,stripBOM:Nu}});var gt=x((Qp,On)=>{"use strict";s();On.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 vt=x((tf,En)=>{"use strict";s();var Iu=gt();En.exports=function(e,r,o,n,i){var a=new Error(e);return Iu(a,r,o,n,i)}});var dr=x((of,Fn)=>{"use strict";s();var ku=vt();Fn.exports=function(e,r,o){var n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):r(ku("Request failed with status code "+o.status,o.config,null,o.request,o))}});var qn=x((sf,Rn)=>{"use strict";s();Rn.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Nn=x((uf,Pn)=>{"use strict";s();Pn.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var pr=x((lf,In)=>{"use strict";s();var Du=qn(),Lu=Nn();In.exports=function(e,r){return e&&!Du(r)?Lu(e,r):r}});var yt=x((pf,Dn)=>{"use strict";s();var Oe=B();function kn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}Dn.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,v){c===null||typeof c>"u"||(Oe.isArray(c)?v=v+"[]":c=[c],Oe.forEach(c,function(h){Oe.isDate(h)?h=h.toISOString():Oe.isObject(h)&&(h=JSON.stringify(h)),i.push(kn(v)+"="+kn(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 Un=x((mf,Ln)=>{"use strict";s();var Ee=1e3,Fe=Ee*60,Re=Fe*60,ve=Re*24,Uu=ve*7,Mu=ve*365.25;Ln.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Hu(t);if(r==="number"&&isFinite(t))return e.long?Bu(t):ju(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Hu(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*Mu;case"weeks":case"week":case"w":return r*Uu;case"days":case"day":case"d":return r*ve;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 ju(t){var e=Math.abs(t);return e>=ve?Math.round(t/ve)+"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 Bu(t){var e=Math.abs(t);return e>=ve?xt(t,e,ve,"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 fr=x((gf,Mn)=>{"use strict";s();function Ju(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=Un(),r.destroy=v,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 ce=r.formatters[ot];if(typeof ce=="function"){let nt=b[O];we=ce.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(l),...r.skips.map(l).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 l(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}function c(p){return p instanceof Error?p.stack||p.message:p}function v(){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}Mn.exports=Ju});var Hn=x((K,_t)=>{"use strict";s();K.formatArgs=$u;K.save=zu;K.load=Wu;K.useColors=Gu;K.storage=Vu();K.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`."))}})();K.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 Gu(){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 $u(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)}K.log=console.debug||console.log||(()=>{});function zu(t){try{t?K.storage.setItem("debug",t):K.storage.removeItem("debug")}catch{}}function Wu(){let t;try{t=K.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Vu(){try{return localStorage}catch{}}_t.exports=fr()(K);var{formatters:Ku}=_t.exports;Ku.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Bn={};Fo(Bn,{createSupportsColor:()=>mr,default:()=>tc});import hr from"node:process";import Yu from"node:os";import jn from"node:tty";function X(t,e=hr.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",o=e.indexOf(r+t),n=e.indexOf("--");return o!==-1&&(n===-1||o<n)}function Xu(){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 Zu(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Qu(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let o=Xu();o!==void 0&&(wt=o);let n=r?wt:o;if(n===0)return 0;if(r){if(X("color=16m")||X("color=full")||X("color=truecolor"))return 3;if(X("color=256"))return 2}if(t&&!e&&n===void 0)return 0;let i=n||0;if(E.TERM==="dumb")return i;if(hr.platform==="win32"){let a=Yu.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 mr(t,e={}){let r=Qu(t,{streamIsTTY:t&&t.isTTY,...e});return Zu(r)}var E,wt,ec,tc,Jn=G(()=>{"use strict";s();({env:E}=hr);X("no-color")||X("no-colors")||X("color=false")||X("color=never")?wt=0:(X("color")||X("colors")||X("color=true")||X("color=always"))&&(wt=1);ec={stdout:mr({isTTY:jn.isatty(1)}),stderr:mr({isTTY:jn.isatty(2)})},tc=ec});var $n=x((I,bt)=>{"use strict";s();var rc=N("tty"),At=N("util");I.init=cc;I.log=ic;I.formatArgs=nc;I.save=ac;I.load=uc;I.useColors=oc;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=(Jn(),Ae(Bn));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 oc(){return"colors"in I.inspectOpts?!!I.inspectOpts.colors:rc.isatty(process.stderr.fd)}function nc(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]=sc()+e+" "+t[0]}function sc(){return I.inspectOpts.hideDate?"":new Date().toISOString()+" "}function ic(...t){return process.stderr.write(At.format(...t)+`
|
|
6
|
+
`)}function ac(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function uc(){return process.env.DEBUG}function cc(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=fr()(I);var{formatters:Gn}=bt.exports;Gn.o=function(t){return this.inspectOpts.colors=this.useColors,At.inspect(t,this.inspectOpts).split(`
|
|
7
|
+
`).map(e=>e.trim()).join(" ")};Gn.O=function(t){return this.inspectOpts.colors=this.useColors,At.inspect(t,this.inspectOpts)}});var zn=x((Cf,gr)=>{"use strict";s();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?gr.exports=Hn():gr.exports=$n()});var Vn=x((Sf,Wn)=>{"use strict";s();var Je;Wn.exports=function(){if(!Je){try{Je=zn()("follow-redirects")}catch{}typeof Je!="function"&&(Je=function(){})}Je.apply(null,arguments)}});var Fr=x((Ef,Er)=>{"use strict";s();var ze=N("url"),Ge=ze.URL,lc=N("http"),dc=N("https"),wr=N("stream").Writable,Ar=N("assert"),Kn=Vn(),br=!1;try{Ar(new Ge)}catch(t){br=t.code==="ERR_INVALID_URL"}var pc=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Cr=["abort","aborted","connect","error","socket","timeout"],Tr=Object.create(null);Cr.forEach(function(t){Tr[t]=function(e,r,o){this._redirectable.emit(t,e,r,o)}});var yr=We("ERR_INVALID_URL","Invalid URL",TypeError),xr=We("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),fc=We("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",xr),mc=We("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),hc=We("ERR_STREAM_WRITE_AFTER_END","write after end"),gc=wr.prototype.destroy||Xn;function z(t,e){wr.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 xr?n:new xr({cause:n}))}},this._performRequest()}z.prototype=Object.create(wr.prototype);z.prototype.abort=function(){Or(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};z.prototype.destroy=function(t){return Or(this._currentRequest,t),gc.call(this,t),this};z.prototype.write=function(t,e,r){if(this._ending)throw new hc;if(!ye(t)&&!xc(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if($e(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 mc),this.abort())};z.prototype.end=function(t,e,r){if($e(t)?(r=t,t=e=null):$e(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}};z.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};z.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};z.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){z.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(z.prototype,t,{get:function(){return this._currentRequest[t]}})});z.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))}};z.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 Cr)o.on(n,Tr[n]);if(this._currentUrl=/^\//.test(this._options.path)?ze.format(this._options):this._options.path,this._isRedirect){var i=0,a=this,l=this._requestBodyBuffers;(function c(v){if(o===a._currentRequest)if(v)a.emit("error",v);else if(i<l.length){var p=l[i++];o.finished||o.write(p.data,p.encoding,c)}else a._ended&&o.end()})()}};z.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(Or(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new fc;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=[],vr(/^content-/i,this._options.headers));var a=vr(/^host$/i,this._options.headers),l=Sr(this._currentUrl),c=a||l.host,v=/^\w+:/.test(r)?this._currentUrl:ze.format(Object.assign(l,{host:c})),p=vc(r,v);if(Kn("redirecting to",p.href),this._isRedirect=!0,_r(p,this._options),(p.protocol!==l.protocol&&p.protocol!=="https:"||p.host!==c&&!yc(p.host,c))&&vr(/^(?:authorization|cookie)$/i,this._options.headers),$e(n)){var h={headers:t.headers,statusCode:e},m={url:v,method:i,headers:o};n(this._options,h,m),this._sanitizeOptions(this._options)}this._performRequest()};function Yn(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 l(v,p,h){return _c(v)?v=_r(v):ye(v)?v=_r(Sr(v)):(h=p,p=Zn(v),v={protocol:n}),$e(p)&&(h=p,p=null),p=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},v,p),p.nativeProtocols=r,!ye(p.host)&&!ye(p.hostname)&&(p.hostname="::1"),Ar.equal(p.protocol,n,"protocol mismatch"),Kn("options",p),new z(p,h)}function c(v,p,h){var m=a.request(v,p,h);return m.end(),m}Object.defineProperties(a,{request:{value:l,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function Xn(){}function Sr(t){var e;if(br)e=new Ge(t);else if(e=Zn(ze.parse(t)),!ye(e.protocol))throw new yr({input:t});return e}function vc(t,e){return br?new Ge(t,e):Sr(ze.resolve(e,t))}function Zn(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new yr({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new yr({input:t.href||t});return t}function _r(t,e){var r=e||{};for(var o of pc)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 vr(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 We(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 Or(t,e){for(var r of Cr)t.removeListener(r,Tr[r]);t.on("error",Xn),t.destroy(e)}function yc(t,e){Ar(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 $e(t){return typeof t=="function"}function xc(t){return typeof t=="object"&&"length"in t}function _c(t){return Ge&&t instanceof Ge}Er.exports=Yn({http:lc,https:dc});Er.exports.wrap=Yn});var Rr=x((Rf,wc)=>{wc.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((qf,os)=>{"use strict";s();var Ve=B(),Qn=dr(),Ac=pr(),bc=yt(),Cc=N("http"),Tc=N("https"),Sc=Fr().http,Oc=Fr().https,es=N("url"),Ec=N("zlib"),Fc=Rr(),Ct=vt(),qr=gt(),ts=/https:?/;function rs(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,rs(i,e,i.href)}}os.exports=function(e){return new Promise(function(o,n){var i=function(T){o(T)},a=function(T){n(T)},l=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/"+Fc.version,l&&!Ve.isStream(l)){if(!Buffer.isBuffer(l))if(Ve.isArrayBuffer(l))l=Buffer.from(new Uint8Array(l));else if(Ve.isString(l))l=Buffer.from(l,"utf-8");else return a(Ct("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=l.length}var v=void 0;if(e.auth){var p=e.auth.username||"",h=e.auth.password||"";v=p+":"+h}var m=Ac(e.baseURL,e.url),y=es.parse(m),A=y.protocol||"http:";if(!v&&y.auth){var w=y.auth.split(":"),b=w[0]||"",R=w[1]||"";v=b+":"+R}v&&delete c.Authorization;var M=ts.test(A),P=M?e.httpsAgent:e.httpAgent,O={path:bc(y.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:P,agents:{http:e.httpAgent,https:e.httpsAgent},auth:v};e.socketPath?O.socketPath=e.socketPath:(O.hostname=y.hostname,O.port=y.port);var Q=e.proxy;if(!Q&&Q!==!1){var we=A.slice(0,-1)+"_proxy",ot=process.env[we]||process.env[we.toUpperCase()];if(ot){var ce=es.parse(ot),nt=process.env.no_proxy||process.env.NO_PROXY,bo=!0;if(nt){var Ca=nt.split(",").map(function(T){return T.trim()});bo=!Ca.some(function(T){return T?T==="*"||T[0]==="."&&y.hostname.substr(y.hostname.length-T.length)===T?!0:y.hostname===T:!1})}if(bo&&(Q={host:ce.hostname,port:ce.port,protocol:ce.protocol},ce.auth)){var Co=ce.auth.split(":");Q.auth={username:Co[0],password:Co[1]}}}}Q&&(O.headers.host=y.hostname+(y.port?":"+y.port:""),rs(O,Q,A+"//"+y.hostname+(y.port?":"+y.port:"")+O.path));var st,To=M&&(Q?ts.test(Q.protocol):!0);e.transport?st=e.transport:e.maxRedirects===0?st=To?Tc:Cc:(e.maxRedirects&&(O.maxRedirects=e.maxRedirects),st=To?Oc:Sc),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(Ec.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,Qn(i,a,at);else{var So=[],Oo=0;fe.on("data",function(ne){So.push(ne),Oo+=ne.length,e.maxContentLength>-1&&Oo>e.maxContentLength&&(fe.destroy(),a(Ct("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,it)))}),fe.on("error",function(ne){H.aborted||a(qr(ne,e,null,it))}),fe.on("end",function(){var ne=Buffer.concat(So);e.responseType!=="arraybuffer"&&(ne=ne.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(ne=Ve.stripBOM(ne))),at.data=ne,Qn(i,a,at)})}}});if(H.on("error",function(T){H.aborted&&T.code!=="ERR_FR_TOO_MANY_REDIRECTS"||a(qr(T,e,null,H))}),e.timeout){var Kt=parseInt(e.timeout,10);if(isNaN(Kt)){a(Ct("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",H));return}H.setTimeout(Kt,function(){H.abort(),a(Ct("timeout of "+Kt+"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))}),Ve.isStream(l)?l.on("error",function(T){a(qr(T,e,null,H))}).pipe(H):H.end(l)})}});var ss=x((Nf,ns)=>{"use strict";s();var Rc=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){Rc.forEach(this.handlers,function(o){o!==null&&e(o)})};ns.exports=St});var as=x((kf,is)=>{"use strict";s();var qc=B();is.exports=function(e,r){qc.forEach(e,function(n,i){i!==r&&i.toUpperCase()===r.toUpperCase()&&(e[r]=n,delete e[i])})}});var cs=x((Lf,us)=>{"use strict";s();var Ot=B();us.exports=Ot.isStandardBrowserEnv()?function(){return{write:function(r,o,n,i,a,l){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),l===!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 ds=x((Mf,ls)=>{"use strict";s();var Pr=B(),Pc=["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&&Pr.forEach(e.split(`
|
|
8
|
+
`),function(l){if(i=l.indexOf(":"),o=Pr.trim(l.substr(0,i)).toLowerCase(),n=Pr.trim(l.substr(i+1)),o){if(r[o]&&Pc.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 ms=x((jf,fs)=>{"use strict";s();var ps=B();fs.exports=ps.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 l=ps.isString(a)?n(a):a;return l.protocol===o.protocol&&l.host===o.host}}():function(){return function(){return!0}}()});var Ir=x((Jf,hs)=>{"use strict";s();var Et=B(),Nc=dr(),Ic=cs(),kc=yt(),Dc=pr(),Lc=ds(),Uc=ms(),Nr=vt();hs.exports=function(e){return new Promise(function(o,n){var i=e.data,a=e.headers,l=e.responseType;Et.isFormData(i)&&delete a["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(v+":"+p)}var h=Dc(e.baseURL,e.url);c.open(e.method.toUpperCase(),kc(h,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function m(){if(c){var A="getAllResponseHeaders"in c?Lc(c.getAllResponseHeaders()):null,w=!l||l==="text"||l==="json"?c.responseText:c.response,b={data:w,status:c.status,statusText:c.statusText,headers:A,config:e,request:c};Nc(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(Nr("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){n(Nr("Network Error",e,null,c)),c=null},c.ontimeout=function(){var w="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),n(Nr(w,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Et.isStandardBrowserEnv()){var y=(e.withCredentials||Uc(h))&&e.xsrfCookieName?Ic.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),l&&l!=="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(($f,ys)=>{"use strict";s();var k=B(),gs=as(),Mc=gt(),Hc={"Content-Type":"application/x-www-form-urlencoded"};function vs(t,e){!k.isUndefined(t)&&k.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function jc(){var t;return typeof XMLHttpRequest<"u"?t=Ir():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=Tt()),t}function Bc(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:jc(),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)?(vs(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):k.isObject(e)||r&&r["Content-Type"]==="application/json"?(vs(r,"application/json"),Bc(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"?Mc(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(Hc)});ys.exports=Ft});var _s=x((Wf,xs)=>{"use strict";s();var Jc=B(),Gc=Rt();xs.exports=function(e,r,o){var n=this||Gc;return Jc.forEach(o,function(a){e=a.call(n,e,r)}),e}});var kr=x((Kf,ws)=>{"use strict";s();ws.exports=function(e){return!!(e&&e.__CANCEL__)}});var Cs=x((Xf,bs)=>{"use strict";s();var As=B(),Dr=_s(),$c=kr(),zc=Rt();function Lr(t){t.cancelToken&&t.cancelToken.throwIfRequested()}bs.exports=function(e){Lr(e),e.headers=e.headers||{},e.data=Dr.call(e,e.data,e.headers,e.transformRequest),e.headers=As.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),As.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var r=e.adapter||zc.adapter;return r(e).then(function(n){return Lr(e),n.data=Dr.call(e,n.data,n.headers,e.transformResponse),n},function(n){return $c(n)||(Lr(e),n&&n.response&&(n.response.data=Dr.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})}});var Ur=x((Qf,Ts)=>{"use strict";s();var U=B();Ts.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"],l=["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 v(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,v),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(l,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(l),h=Object.keys(e).concat(Object.keys(r)).filter(function(y){return p.indexOf(y)===-1});return U.forEach(h,v),o}});var Rs=x((tm,Fs)=>{"use strict";s();var Os=Rr(),Mr={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Mr[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});var Ss={},Wc=Os.version.split(".");function Es(t,e){for(var r=e?e.split("."):Wc,o=t.split("."),n=0;n<3;n++){if(r[n]>o[n])return!0;if(r[n]<o[n])return!1}return!1}Mr.transitional=function(e,r,o){var n=r&&Es(r);function i(a,l){return"[Axios v"+Os.version+"] Transitional option '"+a+"'"+l+(o?". "+o:"")}return function(a,l,c){if(e===!1)throw new Error(i(l," has been removed in "+r));return n&&!Ss[l]&&(Ss[l]=!0,console.warn(i(l," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,l,c):!0}};function Vc(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 l=t[i],c=l===void 0||a(l,i,t);if(c!==!0)throw new TypeError("option "+i+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+i)}}Fs.exports={isOlderVersion:Es,assertOptions:Vc,validators:Mr}});var Ds=x((om,ks)=>{"use strict";s();var Ns=B(),Kc=yt(),qs=ss(),Ps=Cs(),qt=Ur(),Is=Rs(),qe=Is.validators;function Ke(t){this.defaults=t,this.interceptors={request:new qs,response:new qs}}Ke.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&&Is.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 l=[Ps,void 0];for(Array.prototype.unshift.apply(l,o),l=l.concat(i),a=Promise.resolve(e);l.length;)a=a.then(l.shift(),l.shift());return a}for(var c=e;o.length;){var v=o.shift(),p=o.shift();try{c=v(c)}catch(h){p(h);break}}try{a=Ps(c)}catch(h){return Promise.reject(h)}for(;i.length;)a=a.then(i.shift(),i.shift());return a};Ke.prototype.getUri=function(e){return e=qt(this.defaults,e),Kc(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Ns.forEach(["delete","get","head","options"],function(e){Ke.prototype[e]=function(r,o){return this.request(qt(o||{},{method:e,url:r,data:(o||{}).data}))}});Ns.forEach(["post","put","patch"],function(e){Ke.prototype[e]=function(r,o,n){return this.request(qt(n||{},{method:e,url:r,data:o}))}});ks.exports=Ke});var jr=x((sm,Ls)=>{"use strict";s();function Hr(t){this.message=t}Hr.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Hr.prototype.__CANCEL__=!0;Ls.exports=Hr});var Ms=x((am,Us)=>{"use strict";s();var Yc=jr();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 Yc(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}};Us.exports=Pt});var js=x((cm,Hs)=>{"use strict";s();Hs.exports=function(e){return function(o){return e.apply(null,o)}}});var Js=x((dm,Bs)=>{"use strict";s();Bs.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var zs=x((fm,Br)=>{"use strict";s();var Gs=B(),Xc=ir(),Nt=Ds(),Zc=Ur(),Qc=Rt();function $s(t){var e=new Nt(t),r=Xc(Nt.prototype.request,e);return Gs.extend(r,Nt.prototype,e),Gs.extend(r,e),r}var re=$s(Qc);re.Axios=Nt;re.create=function(e){return $s(Zc(re.defaults,e))};re.Cancel=jr();re.CancelToken=Ms();re.isCancel=kr();re.all=function(e){return Promise.all(e)};re.spread=js();re.isAxiosError=Js();Br.exports=re;Br.exports.default=re});var Vs=x((hm,Ws)=>{"use strict";s();Ws.exports=zs()});var Ks=x(ue=>{"use strict";s();Object.defineProperty(ue,"__esModule",{value:!0});ue.getUrlHeaders=ue.buildAllHeaders=ue.buildOptions=void 0;var Jr=Me(),el=ft(),Pe=pt(),tl=({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=nl(n,o);return Object.assign(Object.assign(Object.assign({},t),a),{headers:r})};ue.buildOptions=tl;var rl=(t,e,r={httpMockServer:{enabled:!1}},o)=>{let{url:n,disableWixHeaders:i,headers:a}=t,l=(0,el.composeHeaders)({url:n,disableWixHeaders:i,wixHeadersOpts:e}),c=(0,ue.getUrlHeaders)(r,t,o);return Object.assign(Object.assign(Object.assign({},l),il(a)),c)};ue.buildAllHeaders=rl;var ol=(t,e,r)=>{let{url:o,params:n}=e,{host:i,protocol:a}=r;return t.httpMockServer.enabled?{[Jr.ORIGINAL_URL_HEADER]:sl(o,n),[Jr.ORIGINAL_HOST_HEADER]:(0,Pe.isAbsoluteUrl)(o)?(0,Pe.extractHost)(o):i,[Jr.ORIGINAL_PROTOCOL_HEADER]:(0,Pe.isAbsoluteUrl)(o)?(0,Pe.extractProtocol)(o):a}:{}};ue.getUrlHeaders=ol;function nl(t,e){if(e.httpMockServer.enabled){let r=new URL(e.httpMockServer.mockServerUrl);return{url:(0,Pe.changeHost)(t,r.host)}}return{}}function sl(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 il(t){return t=t||{},Object.keys(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[o.toLowerCase()]:t[o]}),{})}});var Qs=x(Ie=>{"use strict";s();Object.defineProperty(Ie,"__esModule",{value:!0});Ie.createHttpClient=Ie.HttpClient=void 0;var Xs=(ct(),Ae(ut)),Ye=Xs.__importDefault(Vs()),al=Xs.__importDefault(Ir()),Gr=Me(),Zs=rr(),ul=sr(),Ys=ft(),It=Ks(),se=pt(),Ne=class{constructor(e={}){this.opts=e,this.opts=cl(this.opts),this.client=Ye.default.create(this.opts),this.flags={sanitizerPocEnabled:fl()}}static isHttpError(e){return!!e?.isWixHttpError}async request(e,r){var o,n;let i=(0,se.resolveHost)(this.opts),l={protocol:(0,se.resolveProtocol)(this.opts),host:i},c=typeof e=="function"?e({isSSR:this.opts.isSSR,host:i}):e,v=r?.signedInstance||await((n=(o=this.opts).getAppToken)===null||n===void 0?void 0:n.call(o))||"",p=this.getHeaders(c,v,l),h=(0,It.buildOptions)({requestOptions:c,urlObject:l,headers:p,globalConfig:(0,se.getGlobalConfig)()});this.opts.isSSR&&(h.baseURL=this.opts.baseURL?this.opts.baseURL:`${Gr.SSR_PROTOCOL}://${Gr.SSR_HOST}`);try{let m=await this.client.request(h).catch(y=>this.maybeFallbackRequest(y,c,l,v));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 Ye.default.CancelToken}get isCancel(){return Ye.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,se.getGlobalConfig)(),o)}getCustomHeaders(e,r,o){let{url:n}=e,i=r&&(0,Ys.isWixDomain)(n)?{authorization:r}:{},a=this.opts.createHeaders(),l=(0,It.getUrlHeaders)((0,se.getGlobalConfig)(),e,o);return Object.assign(Object.assign(Object.assign({},l),a),i)}handleRequestError(e,r){let o=(0,ul.createHttpError)(e);throw(0,se.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,l;if((0,se.isHttpMockServerEnabled)()&&(0,se.shouldAllowUnmocked)()&&((i=e.response)===null||i===void 0?void 0:i.status)===404&&((l=(a=e.response)===null||a===void 0?void 0:a.data)===null||l===void 0?void 0:l.msg)===Gr.NO_SCENARIO_FOUND){let v=this.getHeaders(r,n,o),p=(0,It.buildOptions)({requestOptions:r,urlObject:o,headers:v});return this.client.request(p)}throw e}transformResponse(e,r){let o=(0,Ys.requestIdOrEmptyString)(e),n=dl(e,r,this.flags);return Object.assign(Object.assign({},e),{data:n,requestId:o})}};Ie.HttpClient=Ne;Ne.CancelToken=Ye.default.CancelToken;Ne.isCancel=Ye.default.isCancel;function cl(t){let e=t.adapter;return e||(e=al.default,(0,Zs.isNode)()&&(e=ll())),Object.assign({adapter:e,isSSR:!1},t)}function ll(){return typeof __webpack_require__=="function"?__non_webpack_require__("axios/lib/adapters/http"):Tt()}function dl(t,e,r){let o=pl(t,r);if(e._pickResponseBody&&(o=(0,se.extractProp)(t.data,e._pickResponseBody)),e._logs){let n=(0,se.extractProp)(t.data,e._logs);n?.length&&n.map(i=>console.log(...i))}return o}function pl(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(l=>{typeof a[l]=="string"?a[l]=o.sanitizeFor("span",a[l]).innerHTML:typeof a[l]=="object"&&(a[l]=n(a[l]))}),a}catch(l){console.log(l)}},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 fl(){var t;try{return(0,Zs.isBrowser)()&&new URLSearchParams(((t=window?.location)===null||t===void 0?void 0:t.hash)||"").get("sanitizerPOC")==="true"}catch{return!1}}function ml(...t){return new Ne(...t)}Ie.createHttpClient=ml});var ei=x(ke=>{"use strict";s();Object.defineProperty(ke,"__esModule",{value:!0});ke.HttpClient=ke.createHttpClient=void 0;var hl=(ct(),Ae(ut)),gl=hl.__importDefault(Tt()),vl=Qs(),kt=class extends vl.HttpClient{constructor(e={}){super(Object.assign({adapter:gl.default},e))}};ke.HttpClient=kt;function yl(...t){return new kt(...t)}ke.createHttpClient=yl});var ri=x(ti=>{"use strict";s();Object.defineProperty(ti,"__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 xl=(ct(),Ae(ut)),$r=Me();Object.defineProperty(D,"ORIGINAL_HOST_HEADER",{enumerable:!0,get:function(){return $r.ORIGINAL_HOST_HEADER}});Object.defineProperty(D,"ORIGINAL_PROTOCOL_HEADER",{enumerable:!0,get:function(){return $r.ORIGINAL_PROTOCOL_HEADER}});Object.defineProperty(D,"ORIGINAL_URL_HEADER",{enumerable:!0,get:function(){return $r.ORIGINAL_URL_HEADER}});var oi=sr();Object.defineProperty(D,"createHttpError",{enumerable:!0,get:function(){return oi.createHttpError}});Object.defineProperty(D,"HttpError",{enumerable:!0,get:function(){return oi.HttpError}});var ni=ei();Object.defineProperty(D,"createHttpClient",{enumerable:!0,get:function(){return ni.createHttpClient}});Object.defineProperty(D,"HttpClient",{enumerable:!0,get:function(){return ni.HttpClient}});xl.__exportStar(ri(),D)});var fi=x((th,pi)=>{"use strict";s();function Z(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))}pi.exports=Z;Z.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};Z.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};Z.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};Z.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)};Z.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)};Z.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)};Z.prototype.start=Z.prototype.try;Z.prototype.errors=function(){return this._errors};Z.prototype.attempts=function(){return this._attempts};Z.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 mi=x(_e=>{"use strict";s();var Nl=fi();_e.operation=function(t){var e=_e.timeouts(t);return new Nl(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 v=_e.operation(e),p=Array.prototype.slice.call(arguments,1),h=p.pop();p.push(function(m){v.retry(m)||(m&&(arguments[0]=v.mainError()),h.apply(this,arguments))}),v.attempt(function(){c.apply(t,p)})}.bind(t,a),t[i].options=e}}});var gi=x((sh,hi)=>{"use strict";s();hi.exports=mi()});var vo=x((hv,Zi)=>{"use strict";s();var Xi=N("fs"),go;function Od(){try{return Xi.statSync("/.dockerenv"),!0}catch{return!1}}function Ed(){try{return Xi.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Zi.exports=()=>(go===void 0&&(go=Od()||Ed()),go)});var ta=x((vv,yo)=>{"use strict";s();var Fd=N("os"),Rd=N("fs"),Qi=vo(),ea=()=>{if(process.platform!=="linux")return!1;if(Fd.release().toLowerCase().includes("microsoft"))return!Qi();try{return Rd.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Qi():!1}catch{return!1}};process.env.__IS_WSL_TEST__?yo.exports=ea:yo.exports=ea()});var oa=x((xv,ra)=>{"use strict";s();ra.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 la=x((wv,ca)=>{"use strict";s();var qd=N("path"),Pd=N("child_process"),{promises:Gt,constants:ua}=N("fs"),Jt=ta(),Nd=vo(),_o=oa(),na=qd.join(d,"xdg-open"),{platform:Ue,arch:sa}=process,Id=()=>{try{return Gt.statSync("/run/.containerenv"),!0}catch{return!1}},xo;function kd(){return xo===void 0&&(xo=Id()||Nd()),xo}var Dd=(()=>{let t="/mnt/",e;return async function(){if(e)return e;let r="/etc/wsl.conf",o=!1;try{await Gt.access(r,ua.F_OK),o=!0}catch{}if(!o)return t;let n=await Gt.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}})(),ia=async(t,e)=>{let r;for(let o of t)try{return await e(o)}catch(n){r=n}throw r},$t=async t=>{if(t={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...t},Array.isArray(t.app))return ia(t.app,l=>$t({...t,app:l}));let{name:e,arguments:r=[]}=t.app||{};if(r=[...r],Array.isArray(e))return ia(e,l=>$t({...t,app:{name:l,arguments:r}}));let o,n=[],i={};if(Ue==="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(Ue==="win32"||Jt&&!kd()&&!e){let l=await Dd();o=Jt?`${l}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,n.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Jt||(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(v=>`"\`"${v}\`""`),c.push(r.join(","))),t.target=Buffer.from(c.join(" "),"utf16le").toString("base64")}else{if(e)o=e;else{let l=!d||d==="/",c=!1;try{await Gt.access(na,ua.X_OK),c=!0}catch{}o=process.versions.electron||Ue==="android"||l||!c?"xdg-open":na}r.length>0&&n.push(...r),t.wait||(i.stdio="ignore",i.detached=!0)}t.target&&n.push(t.target),Ue==="darwin"&&r.length>0&&n.push("--args",...r);let a=Pd.spawn(o,n,i);return t.wait?new Promise((l,c)=>{a.once("error",c),a.once("close",v=>{if(!t.allowNonzeroExitCode&&v>0){c(new Error(`Exited with code ${v}`));return}l(a)})}):(a.unref(),a)},wo=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `target`");return $t({...e,target:t})},Ld=(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 $t({...e,app:{name:t,arguments:r}})};function aa(t){if(typeof t=="string"||Array.isArray(t))return t;let{[sa]:e}=t;if(!e)throw new Error(`${sa} is not supported`);return e}function Ao({[Ue]:t},{wsl:e}){if(e&&Jt)return aa(e);if(!t)throw new Error(`${Ue} is not supported`);return aa(t)}var zt={};_o(zt,"chrome",()=>Ao({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"]}}));_o(zt,"firefox",()=>Ao({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));_o(zt,"edge",()=>Ao({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));wo.apps=zt;wo.openApp=Ld;ca.exports=wo});s();import Ta,{createContext as Sa,useContext as Oa}from"react";var Ho=Sa(null),Ea=function({children:t,value:e}){return Ta.createElement(Ho.Provider,{value:e},t)},er=()=>{let t=Oa(Ho);if(t===null)throw new Error("useBiLogger() cannot be used without an <BiProvider>");return t};s();s();import Fa,{createContext as Ra,useContext as qa}from"react";var jo=Ra(null),Pa=t=>Fa.createElement(jo.Provider,{...t}),tr=()=>{let t=qa(jo);if(t===null)throw new Error("useErrorReporter() cannot be used without an <ErrorReporterProvider>");return t};s();s();var si=V(Dt(),1),_l={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,si.createHttpClient)({baseURL:_l[r],...r!=="standalone"?{getAppToken:t}:{},createHeaders:()=>({...e?.(),"X-XSRF-TOKEN":"nocheck",Cookie:"XSRF-TOKEN=nocheck","User-Agent":"wix-cli"})})}s();var ii=V(Dt(),1);function zr(t){return ii.HttpClient.isHttpError(t)}s();import{createElement as Rl,useMemo as ql}from"react";s();var Kr=V(me(),1);import u from"react";s();function Ut(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function ai(){return typeof WeakMap<"u"?new WeakMap:wl()}function wl(){return{add:Ut,delete:Ut,get:Ut,set:Ut,has:function(t){return!1}}}var Al=Object.prototype.hasOwnProperty,Vr=function(t,e){return Al.call(t,e)};function Wr(t,e){for(var r in e)Vr(e,r)&&(t[r]=e[r]);return t}var bl=/^[ \t]*(?:\r\n|\r|\n)/,Cl=/(?:\r\n|\r|\n)[ \t]*$/,Tl=/^(?:[\r\n]|$)/,Sl=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,Ol=/^[ \t]*[\r\n][ \t\r\n]*$/;function ui(t,e,r){var o=0,n=t[0].match(Sl);n&&(o=n[1].length);var i="(\\r\\n|\\r|\\n).{0,"+o+"}",a=new RegExp(i,"g");e&&(t=t.slice(1));var l=r.newline,c=r.trimLeadingNewline,v=r.trimTrailingNewline,p=typeof l=="string",h=t.length,m=t.map(function(y,A){return y=y.replace(a,"$1"),A===0&&c&&(y=y.replace(bl,"")),A===h-1&&v&&(y=y.replace(Cl,"")),p&&(y=y.replace(/\r\n|\n|\r/g,function(w){return l})),y});return m}function El(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 Fl(t){return Vr(t,"raw")&&Vr(t,"length")}function ci(t){var e=ai(),r=ai();function o(i){for(var a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];if(Fl(i)){var c=i,v=(a[0]===o||a[0]===oe)&&Ol.test(c[0])&&Tl.test(c[1]),p=v?r:e,h=p.get(c);if(h||(h=ui(c,v,t),p.set(c,h)),a.length===0)return h[0];var m=El(h,v?a.slice(1):a);return m}else return ci(Wr(Wr({},t),i||{}))}var n=Wr(o,{string:function(i){return ui([i],!1,t)[0]}});return n}var oe=ci({trimLeadingNewline:!0,trimTrailingNewline:!0});if(typeof module<"u")try{module.exports=oe,Object.defineProperty(oe,"__esModule",{value:!0}),oe.default=oe,oe.outdent=oe}catch{}s();import xe from"react";var g=({message:t,explanation:e,hint:r})=>xe.createElement(te,{flexDirection:"column"},xe.createElement(Zt,{type:"error"},t),e&&xe.createElement(Zt,{type:"warning"},e),r&&xe.createElement(te,{paddingTop:1,columnGap:1},xe.createElement(ko,null),typeof r=="string"?xe.createElement(_,null,r):r)),q=({message:t,explanation:e,hint:r})=>xe.createElement(g,{message:t,explanation:e,hint:r??"This is probably a temporary system error and has been logged. Try again shortly."});function di(t){return(0,Kr.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(g,{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"}),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(g,{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(g,{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(g,{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(g,{message:"Waiting for application installation timed out."}),TypeErrorInvalidUrl:()=>()=>u.createElement(g,{message:"Invalid assets URL."}),UnsupportedPackageManager:({packageManagerName:e})=>()=>u.createElement(g,{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(g,{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(g,{message:`You don't have permissions to site ${e}`}),AppPermissionDenied:({appId:e})=>()=>u.createElement(g,{message:`You don't have permissions to application ${e}`}),FailedToUpdateTelemetryConfig:()=>()=>u.createElement(g,{message:"Failed to change telemetry preferences"}),FailedToInstallPackage:({packageName:e,cause:r})=>{let o=L(r);return()=>u.createElement(g,{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(g,{message:`Failed to install npm packages. Cause: ${r}`})},FailedMigrationToAnyNpm:()=>()=>u.createElement(g,{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(g,{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(g,{message:`Failed to uninstall npm package ${e}. Cause: ${o}`})},FailedToSyncToRevision:({revision:e})=>()=>u.createElement(g,{message:`Failed to sync the local project to revision ${e}`}),FailedToCreateVersion:()=>()=>u.createElement(g,{message:"Wix CLI failed to create version for your app"}),FailedToReadCache:({path:e})=>()=>u.createElement(g,{message:`Failed to read cache file at ${e}.`}),FailedToWriteCache:({path:e})=>()=>u.createElement(g,{message:`Failed to write cache file at ${e}.`}),UploadApplicationFailed:()=>()=>u.createElement(g,{message:"Failed to upload the application"}),BuiltProjectNeeded:()=>()=>u.createElement(g,{message:"Can not find build output, please execute `wix app build` to build your app before proceeding"}),UnsupportedWixInstallCommand:()=>()=>u.createElement(g,{message:"`wix install` is not supported now. Please use `wix install <package-name>`"}),WixUninstallMissingPackageName:()=>()=>u.createElement(g,{message:"Please specify a package name"}),FailedToReadJson:({filePath:e,cause:r})=>{let o=L(r);return()=>u.createElement(g,{message:`Failed to read ${e}. Cause: ${o}`})},InvalidJsonFile:({filePath:e,cause:r})=>{let o=L(r);return()=>u.createElement(g,{message:`Invalid JSON file located at ${e}. Cause: ${o}`})},FailedToWriteWixLock:()=>()=>u.createElement(g,{message:"Failed to write 'wix.lock'"}),InvalidVeloConfigJson:({configFilename:e,cause:r})=>{let o=L(r);return()=>u.createElement(g,{message:`Invalid ${e}, make sure it's configured correctly. Cause: ${o}`})},DashboardPageConfigNotFound:({configPath:e})=>()=>u.createElement(g,{message:`Dashboard page config not found at ${e}`}),EmbeddedScriptConfigNotFound:({configPath:e})=>()=>u.createElement(g,{message:`Embedded script config not found at ${e}`}),CustomElementConfigNotFound:({configPath:e})=>()=>u.createElement(g,{message:`Custom element config not found at ${e}`}),NoExtensionsFound:()=>()=>u.createElement(g,{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(g,{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(g,{message:`Dashboard plugin config not found at ${e}`}),DashboardMenuPluginConfigNotFound:({configPath:e})=>()=>u.createElement(g,{message:`Dashboard menu plugin config not found at ${e}`}),DashboardModalConfigNotFound:({configPath:e})=>()=>u.createElement(g,{message:`Dashboard modal config not found at ${e}`}),InvalidConfigSchemaError:({configPath:e,zodError:r})=>()=>u.createElement(g,{message:oe`
|
|
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(g,{message:oe`
|
|
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(g,{message:"Forbidden operation. Missing permissions"}),FailedToReadProjectFiles:({cause:e})=>{let r=L(e);return()=>u.createElement(g,{message:`Failed to read source files: make sure you have an 'src' folder and that it's readable. Cause: ${r}`})},FailedToCreateVersionForSubmittedApp:()=>()=>u.createElement(g,{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(g,{message:o})},GridAppFailedToUpdateFiles:()=>()=>u.createElement(g,{message:oe`
|
|
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(g,{message:`Failed to watch files. Cause: ${r}`})},FailedToCreateGridApp:({error:e})=>()=>u.createElement(g,{message:"Failed to create an isolated environment.",explanation:e}),DeviceCodeTimedOut:()=>()=>u.createElement(g,{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,Kr.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(te,{flexDirection:"column"},u.createElement(_,null,u.createElement(_,{bold:!0},"Duplicate ID: "),n.id),u.createElement(_,{bold:!0},"Extensions:"),n.components.map(({name:a,path:l,type:c})=>u.createElement(_,{key:l},"[",i(c),"] ",a," (",l,")")),u.createElement(_,null,u.createElement(_,{bold:!0},"Possible GUID: "),n.suggestedId))},o=u.createElement(te,{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(g,{message:"Found multiple extensions with the same id, this might happen if you copy paste folders.",hint:o})},FailedToGetPackageDetails:()=>()=>u.createElement(g,{message:"Failed to get package info."}),InvalidCreateAppResponse:()=>()=>u.createElement(g,{message:"`createApp` returned an invalid response."}),InvalidDeployAppResponse:()=>()=>u.createElement(g,{message:"Got unexpected response from server. Make sure you are running a supported version of the Velo CLI."}),InvalidGetDeploymentResponse:()=>()=>u.createElement(g,{message:"Got unexpected response from server. Please try again later.."}),FailedToGetPagesDiff:()=>()=>u.createElement(g,{message:"Failed to request pages diff."}),InvalidViteBuildOutput:()=>()=>u.createElement(g,{message:"Invalid vite build output"}),ViteModuleBundleNotFound:()=>()=>u.createElement(g,{message:"Could not find module bundle in vite build output"}),ViteFileNotFoundInOutput:({fileName:e})=>()=>u.createElement(g,{message:`Could not find ${e} in vite build output`}),FailedToCreatePresignedUrl:()=>()=>u.createElement(g,{message:"Failed to create a presigned upload url"}),FailedToUploadApplicationFiles:()=>()=>u.createElement(g,{message:"Failed to upload the application files"}),FailedToVerifyDeployment:()=>()=>u.createElement(g,{message:"Deployment was not finished within the desired timeframe, please try again later."}),FailedToGetUserInfo:()=>()=>u.createElement(g,{message:"Failed to get user information."}),FailedToGetMyAccount:()=>()=>u.createElement(q,{message:"Failed to get account information."}),FailedToCreateDevelopmentSite:()=>()=>u.createElement(g,{message:"Failed to create a Development Site"}),FailedToGetDevelopmentSites:()=>()=>u.createElement(g,{message:"Failed to request development sites."}),FailedToGetDevelopmentSitesLimit:()=>()=>u.createElement(g,{message:"Failed to request development sites limit."}),FailedToGetRequiredApps:()=>()=>u.createElement(g,{message:"Failed to get app required apps."}),FailedToGetMarketListing:()=>()=>u.createElement(g,{message:"Failed to get market listing."}),FailedToAddRequiredApp:()=>()=>u.createElement(g,{message:"Failed to add required app."}),FailedToQuerySites:()=>()=>u.createElement(g,{message:"Failed to request sites list."}),FailedToGetSite:()=>()=>u.createElement(g,{message:"Failed to get information about your configured Development Site"}),FailedToDeploySite:()=>()=>u.createElement(g,{message:"Failed to deploy site."}),FailedToPublishDeployment:()=>()=>u.createElement(q,{message:"Failed to publish site."}),FailedToSaveDevelopmentSite:({path:e})=>()=>u.createElement(g,{message:"Failed to save the current development site.",hint:`Make sure the \`${e}\` file has proper permissions and is accessible`}),FailedToBuildApp:()=>()=>u.createElement(g,{message:"Failed to build the application.",hint:"Please check the build output for more information"}),FailedToCheckIfAppInstalled:()=>()=>u.createElement(g,{message:"Failed to fetch site installation details"}),FailedToInitializeGitRepo:({cause:e})=>{let r=L(e);return()=>u.createElement(g,{message:`Failed to initialize git repo. Cause: ${r}`})},FailedToInstallDependencies:({cause:e})=>{let r=L(e);return()=>u.createElement(g,{message:`Failed to install dependencies. Cause: ${r}`})},FailedToCommitChanges:({cause:e})=>{let r=L(e);return()=>u.createElement(g,{message:`Failed to commit changes. Cause: ${r}`})},FailedToDeleteAuthData:({cause:e})=>{let r=L(e);return()=>u.createElement(g,{message:`Failed to delete auth data: ${r}`})},FailedToDeleteLegacyAuthData:({cause:e})=>{let r=L(e);return()=>u.createElement(g,{message:`Failed to delete legacy auth data: ${r}`})},FailedToSaveAuthData:({cause:e})=>{let r=L(e);return()=>u.createElement(g,{message:`Failed to save auth data: ${r}`})},FailedToSaveApiKeyAuthData:({cause:e})=>{let r=L(e);return()=>u.createElement(g,{message:`Failed to save api key auth data: ${r}`})},FailedToWriteJson:({filePath:e,cause:r})=>{let o=L(r);return()=>u.createElement(g,{message:`Failed to write JSON at path: ${e}. Cause: ${o}`})},TemplatePathNotFound:({templatePath:e})=>()=>u.createElement(g,{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(g,{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(g,{message:`Invalid Git URL: ${e}`,hint:"Make sure the Git URL is in the correct format"}),AuthenticationRequired:()=>()=>u.createElement(g,{message:"You have to already be logged in to run this command."}),SiteConfiguredRequired:()=>()=>u.createElement(g,{message:"You must configure the development site before running this command, or provide a site-id in the command options."}),FailedAddingPackageToWorkspace:()=>()=>u.createElement(g,{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(g,{message:"Failed to generate a Selfsigned certificate for development."}),NonInteractiveTerminal:()=>()=>u.createElement(g,{message:"This command is not supported in non-interactive terminals. Please run the command in an interactive terminal (TTY)."}),FailedToResolveViteOrigin:()=>()=>u.createElement(g,{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(g,{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(g,{message:"Failed to get validation status for app version from dev center"}),InvalidDashboardPageRoute:({route:e,errorMessage:r})=>()=>u.createElement(g,{message:`Invalid dashboard page route: ${e}`,hint:r}),InvalidEmbeddedScriptFolder:({path:e,errorMessage:r})=>()=>u.createElement(g,{message:`Invalid embedded script folder: ${e}`,hint:r}),InvalidEmbeddedScriptTemplate:({templateFilename:e,errorMessage:r})=>()=>u.createElement(g,{message:`Invalid embedded script template in ${e}`,hint:r}),InvalidCustomElementTagName:({tagName:e,errorMessage:r})=>()=>u.createElement(g,{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 Yr=({error:t,systemErrorOverride:e})=>ql(()=>{let r=qo(t);return Ro(r)&&e?e:Rl(di(r.cliCode))},[t,e]);s();import ba from"react";s();import{createContext as Pl}from"react";var Mt=Pl(null);s();s();s();var yi=V(gi(),1),Il=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed"]),Xr=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}},kl=(t,e,r)=>{let o=r.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=o,t},Dl=t=>Il.has(t),vi=t=>globalThis.DOMException===void 0?new Error(t):new DOMException(t);async function Xe(t,e){return new Promise((r,o)=>{e={onFailedAttempt(){},retries:10,...e};let n=yi.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 Xr)n.stop(),o(a.originalError);else if(a instanceof TypeError&&!Dl(a.message))n.stop(),o(a);else{kl(a,i,e);try{await e.onFailedAttempt(a)}catch(l){o(l);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?vi("The operation was aborted."):e.signal.reason;o(i instanceof Error?i:vi(i))},{once:!0})})}s();s();s();s();function xi(t=""){let[e,r]=Ll(t);return r?{schemaName:r,schemaType:e}:{schemaName:e}}var Ll=t=>t.split("#");s();s();function _i(t,e,r,o){let n=t;for(let i of e.split(".")){if(!n)return r;n=n[i]}return`${n}${o}`}var Ul="_",Ml=["wix.com","editorx.com"],Hl=["42.wixprod.net","uw2-edt-1.wixprod.net"],jl="dev.wix-code.com",Bl=/{(.*)}/,Jl=new RegExp(`\\.(${Ml.join("|")})$`),Gl=new RegExp(`\\.(${Hl.join("|")})$`),$l=new RegExp(`.*\\.${jl}$`);function Ht(t){let e=Vl(t.host),r=Yl(e,t.domainToMappings),o=zl(t.protoPath,t.data||{});return Xl(o,r)}function zl(t,e){return t.split("/").map(r=>Wl(r,e)).join("/")}function Wl(t,e){let r=t.match(Bl)||[],o=r[1];if(o){let n=t.replace(r[0],"");return _i(e,o,t,n)}return t}function Vl(t){return Kl(t).replace(Jl,"._base_domain_").replace(Gl,"._api_base_domain_").replace($l,"*.dev.wix-code.com")}function Kl(t){return t.replace("create.editorx.com","editor.editorx.com")}function Yl(t,e){let r=e[t]||e[Ul];return!r&&Zl(t)?e[Ql]:r}function Xl(t,e){let r=e?.find(o=>t.startsWith(o.destPath));return r?r.srcPath+t.slice(r.destPath.length):t}function Zl(t){return!!t.match(/\._base_domain_$/)}var Ql="www._base_domain_";s();function wi(t,e=""){let r={};return Object.entries(t).forEach(([o,n])=>{let i=n!==null&&typeof n=="object"&&!Array.isArray(n),a=ed(e,o);if(i){let l=wi(n,a);Object.assign(r,l)}else r[a]=n}),r}function ed(t,e){return`${t}${t?".":""}${e}`}function jt(t){let e=wi(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 Ai(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}=xi(w),M=R==="Map",P=c(b)?.checkRepetable?.(A)??Array.isArray(A),O;P?O=A.map(Q=>l(Q,b)):M?O=v(A,b):O=l(A,b),m[y]=O}),m)}function l(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 v(p,h){return Object.entries(p).reduce((m,[y,A])=>(m[y]=l(A,h),m),{})}}}s();s();var bi={types:["google.protobuf.Timestamp"],[F.TO_JSON]:{transform:t=>t?.toISOString()},[F.FROM_JSON]:{transform:t=>t?new Date(t):void 0}};s();var Ci={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 Ti={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 Si={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:td(r)}}}};function td(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 Oi={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 Ei=[bi,Ci,Ti,Si,Oi];s();function Fi(t){return t.reduce((e,r)=>{let o=r.types.reduce((n,i)=>({...n,[i]:r}),{});return{...e,...o}},{})}var rd=Fi([...Ei]);function ie(t,e={}){let r=Ai(t,e,rd);return{fromJSON(o){let n=od(o)||o;return r(n,F.FROM_JSON)},toJSON(o){return r(o,F.TO_JSON)}}}function od(t){try{return JSON.parse(t)}catch{}}var nd={dateCreated:"google.protobuf.Timestamp",dateUpdated:"google.protobuf.Timestamp"},sd={account:"_account"};var id={};function ad(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 Ri(t){var e=ie(id,{}),r=e.toJSON,o=e.fromJSON,n=ie(sd,{_account:nd}).fromJSON;function i(a){var l=a.host,c=r(t),v={entityFqdn:"wix.identity.account.v2.account",method:"GET",methodFqn:"com.wixpress.account.api.AccountService.getMyAccount",url:ad({protoPath:"/v1/accounts/my_account",data:c,host:l}),params:jt(c),transformResponse:n};return v}return i.fromReq=o,i.__isAmbassador=!0,i}s();var ud={},cd={};var ld={body:"BYTES"},dd={body:"BYTES"},pd={},fd={};function Zr(t){var e={"manage._base_domain_":[{srcPath:"/oauth2",destPath:"/v1/oauth"}],"www.wixapis.com":[{srcPath:"/oauth2",destPath:"/v1/oauth"}],"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 Qr(t){var e=ie(ld,{}),r=e.toJSON,o=e.fromJSON,n=ie(dd,{}).fromJSON;function i(a){var l=a.host,c=r(t),v={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.Token",url:Zr({protoPath:"/v1/oauth/token",data:c,host:l}),data:c,transformResponse:n};return v}return i.fromReq=o,i.__isAmbassador=!0,i}function qi(t){var e=ie(ud,{}),r=e.toJSON,o=e.fromJSON,n=ie(cd,{}).fromJSON;function i(a){var l=a.host,c=r(t),v={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"GET",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.DeviceCode",url:Zr({protoPath:"/v1/oauth/device/code",data:c,host:l}),params:jt(c),transformResponse:n};return v}return i.fromReq=o,i.__isAmbassador=!0,i}function Pi(t){var e=ie(pd,{}),r=e.toJSON,o=e.fromJSON,n=ie(fd,{}).fromJSON;function i(a){var l=a.host,c=r(t),v={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.RevokeRefreshToken",url:Zr({protoPath:"/v1/oauth/revoke",data:c,host:l}),data:c,transformResponse:n};return v}return i.fromReq=o,i.__isAmbassador=!0,i}var Ze=V(me(),1);s();var Ni=C.object({deviceCode:C.string(),verificationUri:C.string().url(),userCode:C.string(),expiresIn:C.number()}),eo=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})),to=C.object({userId:C.string().uuid(),email:C.string().email()}),Ii=C.object({account:C.object({slug:C.string(),accountId:C.string().uuid(),accountOwner:C.string().uuid()})}),ki=C.object({accessToken:C.string(),refreshToken:C.string(),expiresIn:C.number(),issuedAt:C.number()}),Di=ki.extend({userInfo:to}),md=C.object({token:C.string(),accountId:C.string().uuid(),userInfo:C.object({userId:C.string().uuid(),email:C.string()})});var{FailedToGetAuthToken:hd,FailedToGetDeviceCode:gd,FailedToRenewAuthToken:vd,FailedToRenewAuthTokenSiteNotFound:yd,FailedToRevokeRefreshToken:xd}=ee,ro="6f95cec8-3e98-48b9-b4e5-1fb92fcd9973",Li=()=>Math.floor(Date.now()/1e3),Qe=class extends Error{},Ui=(0,Ze.variant)({TokenRenewed:(0,Ze.fields)(),RefreshTokenRevoked:(0,Ze.fields)()}),oo=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 Xe(()=>this.httpClient.request(qi({...e,clientId:ro})),this.retryOptions);return Ni.parse(r)}catch(r){throw new j({code:gd(),cause:r})}}async createToken(e){try{let r={clientId:ro,grantType:"urn:ietf:params:oauth:grant-type:device_code",scope:"offline_access",...e},{data:o}=await Xe(()=>this.httpClient.request(Qr(r)),this.retryOptions);return{...eo.parse(o),issuedAt:Li()}}catch(r){throw zr(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:hd(),cause:r})}}async renewToken(e){try{let r={clientId:ro,grantType:"refresh_token",...e},{data:o}=await Xe(()=>this.httpClient.request(Qr(r)),this.retryOptions),n=eo.parse(o);return Ui.TokenRenewed({...n,issuedAt:Li()})}catch(r){if(zr(r)){if(r.response?.status===400&&r.response?.data?.error==="invalid_grant")return Ui.RefreshTokenRevoked({cause:r,siteId:e.siteId});if(e.siteId&&r.response?.status===404&&r.response?.data?.details?.applicationError?.code==="SITE_NOT_FOUND")throw new j({code:yd({siteId:e.siteId}),cause:r})}throw new j({code:vd(),cause:r})}}async revokeRefreshToken(e,{email:r}){try{let{data:o}=await this.httpClient.request(Pi(e));return o}catch(o){throw new j({code:xd({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 to.parse(o)}catch(r){throw new j({code:ee.FailedToGetUserInfo(),cause:r})}}async getMyAccount({token:e}){try{let r=Lt({type:"backoffice",getAppToken:async()=>e}),{data:o}=await r.request(Ri({}));return Ii.parse(o).account}catch(r){throw new j({code:ee.FailedToGetMyAccount(),cause:r})}}},De=new oo(Lt({type:"backoffice"}));s();import{unlink as _d,rm as wd}from"node:fs/promises";import{resolve as Bt}from"node:path";var Y=V(me(),1);function Mi(){return Bt(Yt(),"auth.json")}function so(){return Bt(Yt(),"auth")}function Hi(){return Bt(so(),"account.json")}function Ad(t){return Bt(so(),`${t}.json`)}var kg=(0,Y.variant)({Authenticated:(0,Y.payload)(),Unauthenticated:{}});var no=(0,Y.variant)({Authenticated:(0,Y.fields)(),Unauthenticated:{},Expired:(0,Y.fields)()});async function ji(){let t=Hi();if(!await Xt(t))return no.Unauthenticated();let e=await No(t),r=Di.parse(e);return uo(r)?no.Authenticated(r):no.Expired(r)}var Dg=(0,Y.variant)({Authenticated:(0,Y.fields)(),Unauthenticated:{},Expired:(0,Y.fields)()});async function io(t,e){try{let r=e?Ad(e):Hi();await Po(r,t)}catch(r){throw new j({code:ee.FailedToSaveAuthData({cause:r}),cause:r})}}async function Bi(){try{await wd(so(),{recursive:!0,force:!0})}catch(t){throw new j({code:ee.FailedToDeleteAuthData({cause:t}),cause:t})}await ao()&&await bd()}async function bd(){try{await _d(Mi())}catch(t){throw new j({code:ee.FailedToDeleteLegacyAuthData({cause:t}),cause:t})}}async function ao(){return Xt(Mi())}function uo(t){let e=Math.floor(Date.now()/1e3),r=10*60,o=t.expiresIn-r;return t.issuedAt+o>e}s();s();s();var co=class{value;next;constructor(e){this.value=e}},et=class{#e;#t;#r;constructor(){this.clear()}enqueue(e){let r=new co(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 lo(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(l,c,v)=>{r++;let p=(async()=>l(...v))();c(p);try{await p}catch{}o()},i=(l,c,v)=>{e.enqueue(n.bind(void 0,l,c,v)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},a=(l,...c)=>new Promise(v=>{i(l,v,c)});return Object.defineProperties(a,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),a}var J=V(me(),1);s();s();var Le=class extends Error{constructor(e){super(e),this.name="TimeoutError"}},po=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},Ji=t=>globalThis.DOMException===void 0?new po(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 fo(t,e){let{milliseconds:r,fallback:o,message:n,customTimers:i={setTimeout,clearTimeout}}=e,a,c=new Promise((v,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(v,p);return}let h=new Le;a=i.setTimeout.call(void 0,()=>{if(o){try{v(o())}catch(m){p(m)}return}typeof t.cancel=="function"&&t.cancel(),n===!1?v():n instanceof Error?p(n):(h.message=n??`Promise timed out after ${r} milliseconds`,p(h))},r),(async()=>{try{v(await t)}catch(m){p(m)}})()}).finally(()=>{c.clear()});return c.clear=()=>{i.clearTimeout.call(void 0,a),a=void 0},c}var mo=Symbol("resolveValue");async function tt(t,e={}){let{interval:r=20,timeout:o=Number.POSITIVE_INFINITY,before:n=!0}=e,i,a=!1,l=new Promise((c,v)=>{let p=async()=>{try{let h=await t();if(typeof h=="object"&&h[mo])c(h[mo]);else{if(typeof h!="boolean")throw new TypeError("Expected condition to return a boolean");h===!0?c():a||(i=setTimeout(p,r))}}catch(h){v(h)}};n?p():i=setTimeout(p,r)});if(o===Number.POSITIVE_INFINITY)return l;try{return await fo(l,typeof o=="number"?{milliseconds:o}:o)}finally{a=!0,clearTimeout(i)}}tt.resolveWith=t=>({[mo]:t});var $i=t=>1e3*t;async function Cd({deviceCode:t,expiresIn:e},{signal:r}){try{let o=await tt(async()=>{try{let a=await De.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 De.userInfo({accessToken:o.accessToken}),i={...o,userInfo:n};return await Bi(),await io(i),i}catch(o){throw o instanceof Le?new j({code:ee.DeviceCodeTimedOut()}):o}}var zi=(0,J.variant)({Ok:(0,J.payload)(),Error:(0,J.fields)()});async function Vi({refreshToken:t,userInfo:e}){let r=await De.renewToken({refreshToken:t});return(0,J.match)(r,{TokenRenewed:async o=>{let n={userInfo:e,...o};return await io(n),zi.Ok(n)},RefreshTokenRevoked:({cause:o})=>zi.Error({cause:o})})}async function Td(){let t=await ji();return(0,J.match)(t,{Authenticated:e=>e,Unauthenticated:()=>null,Expired:async e=>{let r=await Vi(e);return(0,J.match)(r,{Ok:J.unpack,Error:(0,J.constant)(null)})}})}function Wi({userInfo:t,...e}){let r=lo(1),o={...e};return{getAccessToken:()=>r(async()=>{if(uo(o))return o.accessToken;let n=await Vi({...o,userInfo:t});return(0,J.match)(n,{Ok:({payload:i})=>(o=i,o.accessToken),Error:({cause:i})=>{throw new j({code:ee.FailedToRenewAuthToken(),cause:i})}})}),getRefreshToken:()=>o.refreshToken,userInfo:t}}var rt={async isLoggedIn(){let t=await Td();return t?Wi(t):null},async login({deviceCode:t,signal:e}){let r=await Cd(t,{signal:e});return Wi(r)}};s();var wa=V(me(),1);import Vt from"react";s();import ga from"react";s();function av(t){return{evid:5200,src:11,endpoint:"wix-cli",params:t}}function uv(t){return{evid:5201,src:11,endpoint:"wix-cli",params:t}}function cv(t){return{evid:5208,src:11,endpoint:"wix-cli",params:t}}function lv(t){return{evid:5209,src:11,endpoint:"wix-cli",params:t}}function dv(t){return{evid:5210,src:11,endpoint:"wix-cli",params:t}}function Ki(t){return{evid:5211,src:11,endpoint:"wix-cli",params:t}}function ho(t){return{evid:5212,src:11,endpoint:"wix-cli",params:t}}var va=V(me(),1);var Yi={"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 W,{useState as Ud}from"react";s();var fa=V(la(),1);s();var da=V(Dt(),1);async function pa(t,e){await(0,da.createHttpClient)().post(t,void 0,{params:{url:e}})}async function ma(t){let{userBrowserTestEndpoint:e}=be();e?await pa(e,t):await(0,fa.default)(t,{background:!0})}var ha=({userCode:t,verificationUri:e})=>{let{reportError:r}=tr(),[o,n]=Ud(null);return Io((i,a)=>{a.return&&ma(e).catch(l=>{r(l),n(l)})}),W.createElement(W.Fragment,null,W.createElement(Se,{i18nKey:"login.instructions_title"}),W.createElement(te,{flexDirection:"column",marginTop:1,marginBottom:1,marginLeft:2},W.createElement(Se,{i18nKey:"login.instructions_details",components:[W.createElement(_,{skin:"legacyBlue"}),W.createElement(Do,{value:"enter"}),W.createElement(Qt,{url:e})],values:{code:t}})),o&&W.createElement(W.Fragment,null,W.createElement(te,{flexDirection:"column",marginBottom:1},W.createElement(Yr,{error:o})),W.createElement(Se,{i18nKey:"login.error_opening_browser",components:[W.createElement(Qt,{url:e})]})))};var ya=({loginFn:t,onLogin:e,onError:r})=>{let o=er();function n(l){o.report(ho({isSuccess:!1,...l instanceof Error?{errorType:l.name}:{errorType:"unknown",errorMessage:JSON.stringify(l)}})),r(l)}let i=Uo(async({signal:l},c)=>{try{let v=await t({deviceCode:c,signal:l});o.report(ho({isSuccess:!0})),e(v)}catch(v){n(v)}}),{status:a}=Te(async()=>(o.report(Ki({})),De.requestDeviceCode()),[],{onSuccess:l=>{i.execute(l)},onError:n});return(0,va.match)(a,{Error:()=>null,Loading:()=>ga.createElement(lt,null),Success:({result:{userCode:l,verificationUri:c}})=>ga.createElement(ha,{userCode:l,verificationUri:c})})};s();var xa=V(me(),1);import Wt from"react";var _a=({children:t})=>{let{status:e}=Te(ao,[],{onError:()=>{}});return(0,xa.match)(e,{Error:()=>null,Loading:()=>null,Success:({result:r})=>Wt.createElement(Wt.Fragment,null,r&&Wt.createElement(te,{marginBottom:1},Wt.createElement(Se,{i18nKey:"login.legacy_auth_notice"})),t)})};var Aa=({authStrategy:{login:t,isLoggedIn:e},onLogin:r,onError:o,children:n})=>{let{status:i,merge:a}=Te(e,[],{onSuccess:l=>{l&&r(l)},onError:o});return(0,wa.match)(i,{Loading:()=>Vt.createElement(lt,null),Error:()=>null,Success:({result:l})=>l===null?Vt.createElement(Mo,{messages:Yi},Vt.createElement(_a,null,Vt.createElement(ya,{loginFn:t,onLogin:c=>{a({result:c}),r(c)},onError:o}))):n(l)})};var Md=({children:t,onError:e,onLogin:r})=>{let o=Lo();return ba.createElement(Aa,{authStrategy:rt,onLogin:({userInfo:n})=>r?.(n),onError:e??o},({getAccessToken:n,getRequestHeaders:i,userInfo:a})=>ba.createElement(Mt.Provider,{value:{getAccessToken:n,getRequestHeaders:i,userInfo:a}},t))};s();s();import{useContext as Hd}from"react";function jd(){let t=Hd(Mt);if(!t)throw new Error("useAuth() cannot be used without an <AuthProvider>");return t}var{isLoggedIn:gy}=rt;export{Xe as a,Ht as b,jt as c,ie as d,Dt as e,Lt as f,zr as g,Le as h,tt as i,jd as j,Ea as k,er as l,av as m,uv as n,cv as o,lv as p,dv as q,ma as r,Yr as s,Pa as t,tr as u,Md as v,gy 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-TXD4M2YS.js.map
|