@wix/cli-app 1.1.19 → 1.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/build/CreateVersionCommand-SW4ZOQ6N.js +4 -0
  2. package/build/{CreateVersionCommand-3UL6NYDF.js.map → CreateVersionCommand-SW4ZOQ6N.js.map} +1 -1
  3. package/build/DevCommand-5ZXJQCYA.js +4 -0
  4. package/build/DevCommand-5ZXJQCYA.js.map +1 -0
  5. package/build/{GenerateCommand-YW37BTUB.js → GenerateCommand-IJSMXTIA.js} +12 -12
  6. package/build/GenerateCommand-IJSMXTIA.js.map +1 -0
  7. package/build/PreviewCommand-2MM4267L.js +4 -0
  8. package/build/{ServeCommand-YRMZVHZN.js → ServeCommand-QOKAYFJP.js} +2 -2
  9. package/build/build-FJY4BC54.js +4 -0
  10. package/build/build-FJY4BC54.js.map +1 -0
  11. package/build/chunk-3VQX7LRS.js +4 -0
  12. package/build/chunk-3VQX7LRS.js.map +1 -0
  13. package/build/chunk-423K4EW3.js +4 -0
  14. package/build/{chunk-FMEEFVFZ.js → chunk-5OTJBADY.js} +2 -2
  15. package/build/{chunk-PWKG7UKK.js → chunk-ALZJFJ23.js} +2 -2
  16. package/build/chunk-ALZJFJ23.js.map +1 -0
  17. package/build/{chunk-4VOJ4MBF.js → chunk-BMK5ZXHB.js} +2 -2
  18. package/build/chunk-C632XAQG.js +23 -0
  19. package/build/{chunk-L47BPWKS.js.map → chunk-C632XAQG.js.map} +1 -1
  20. package/build/{chunk-POJEX3XJ.js → chunk-CTWRW76F.js} +36 -36
  21. package/build/chunk-CTWRW76F.js.map +1 -0
  22. package/build/{chunk-TPV6MPZ4.js → chunk-ESE4L44D.js} +2 -2
  23. package/build/{chunk-RJKCVYVO.js → chunk-F2ZEWDAK.js} +4 -4
  24. package/build/{chunk-RJKCVYVO.js.map → chunk-F2ZEWDAK.js.map} +1 -1
  25. package/build/chunk-INHSYB3J.js +4 -0
  26. package/build/chunk-INHSYB3J.js.map +1 -0
  27. package/build/{chunk-MNS7PUKJ.js → chunk-LNZPUJZM.js} +2 -2
  28. package/build/chunk-LNZPUJZM.js.map +1 -0
  29. package/build/{chunk-YE7MFP76.js → chunk-MZN364Q6.js} +2 -2
  30. package/build/chunk-MZN364Q6.js.map +1 -0
  31. package/build/{chunk-EVTSTCPY.js → chunk-N5OCWMLI.js} +2 -2
  32. package/build/{chunk-EL4LLNE3.js → chunk-PCBMS46R.js} +1 -1
  33. package/build/{chunk-EL4LLNE3.js.map → chunk-PCBMS46R.js.map} +1 -1
  34. package/build/{chunk-6U7WFIFR.js → chunk-PYEFXRM2.js} +3 -3
  35. package/build/{chunk-QOQRQIMF.js → chunk-R2DHQREZ.js} +2 -2
  36. package/build/chunk-RIDNK3X3.js +4 -0
  37. package/build/chunk-RIDNK3X3.js.map +1 -0
  38. package/build/{chunk-QLWXUOAT.js → chunk-RPZCQEPB.js} +2 -2
  39. package/build/chunk-SARV44FW.js +6 -0
  40. package/build/chunk-SARV44FW.js.map +1 -0
  41. package/build/chunk-TTTQ7SZK.js +4 -0
  42. package/build/chunk-TTTQ7SZK.js.map +1 -0
  43. package/build/{chunk-V35F6N6Y.js → chunk-XTLXT6QW.js} +2 -2
  44. package/build/{chunk-LKXDY7ME.js → chunk-YKE3BZS3.js} +8 -8
  45. package/build/chunk-YKE3BZS3.js.map +1 -0
  46. package/build/{devtools-WDPQJNQZ.js → devtools-FITZMLEV.js} +1 -1
  47. package/build/devtools-FITZMLEV.js.map +1 -0
  48. package/build/{esm-MUZJUC5Q.js → esm-IHGGGJ6T.js} +2 -2
  49. package/build/{esm-MUZJUC5Q.js.map → esm-IHGGGJ6T.js.map} +1 -1
  50. package/build/index.js +2 -2
  51. package/build/preview-4GL6ALWD.js +4 -0
  52. package/build/{preview-3ZAXKZ4E.js.map → preview-4GL6ALWD.js.map} +1 -1
  53. package/build/{render-command-SBXRR4MG.js → render-command-32GXLYY2.js} +2 -2
  54. package/build/{types.impl-V4PI7Z6L.js → types.impl-L2DPGJ77.js} +2 -2
  55. package/package.json +9 -6
  56. package/templates/custom-element/element.tsx.ejs +1 -1
  57. package/templates/custom-element/panel.tsx.ejs +7 -9
  58. package/build/CreateVersionCommand-3UL6NYDF.js +0 -4
  59. package/build/DevCommand-GD7XT72H.js +0 -4
  60. package/build/DevCommand-GD7XT72H.js.map +0 -1
  61. package/build/GenerateCommand-YW37BTUB.js.map +0 -1
  62. package/build/PreviewCommand-HDEZ6LT3.js +0 -4
  63. package/build/build-FJMITZHU.js +0 -4
  64. package/build/build-FJMITZHU.js.map +0 -1
  65. package/build/chunk-56GO226U.js +0 -4
  66. package/build/chunk-56GO226U.js.map +0 -1
  67. package/build/chunk-CXTD4ANR.js +0 -4
  68. package/build/chunk-I4ARVL5S.js +0 -6
  69. package/build/chunk-I4ARVL5S.js.map +0 -1
  70. package/build/chunk-KF76KJSL.js +0 -4
  71. package/build/chunk-KF76KJSL.js.map +0 -1
  72. package/build/chunk-L47BPWKS.js +0 -23
  73. package/build/chunk-LINHFSVS.js +0 -4
  74. package/build/chunk-LINHFSVS.js.map +0 -1
  75. package/build/chunk-LKXDY7ME.js.map +0 -1
  76. package/build/chunk-MNS7PUKJ.js.map +0 -1
  77. package/build/chunk-POJEX3XJ.js.map +0 -1
  78. package/build/chunk-PWKG7UKK.js.map +0 -1
  79. package/build/chunk-YE7MFP76.js.map +0 -1
  80. package/build/devtools-WDPQJNQZ.js.map +0 -1
  81. package/build/preview-3ZAXKZ4E.js +0 -4
  82. /package/build/{PreviewCommand-HDEZ6LT3.js.map → PreviewCommand-2MM4267L.js.map} +0 -0
  83. /package/build/{ServeCommand-YRMZVHZN.js.map → ServeCommand-QOKAYFJP.js.map} +0 -0
  84. /package/build/{chunk-CXTD4ANR.js.map → chunk-423K4EW3.js.map} +0 -0
  85. /package/build/{chunk-FMEEFVFZ.js.map → chunk-5OTJBADY.js.map} +0 -0
  86. /package/build/{chunk-4VOJ4MBF.js.map → chunk-BMK5ZXHB.js.map} +0 -0
  87. /package/build/{chunk-TPV6MPZ4.js.map → chunk-ESE4L44D.js.map} +0 -0
  88. /package/build/{chunk-EVTSTCPY.js.map → chunk-N5OCWMLI.js.map} +0 -0
  89. /package/build/{chunk-6U7WFIFR.js.map → chunk-PYEFXRM2.js.map} +0 -0
  90. /package/build/{chunk-QOQRQIMF.js.map → chunk-R2DHQREZ.js.map} +0 -0
  91. /package/build/{chunk-QLWXUOAT.js.map → chunk-RPZCQEPB.js.map} +0 -0
  92. /package/build/{chunk-V35F6N6Y.js.map → chunk-XTLXT6QW.js.map} +0 -0
  93. /package/build/{render-command-SBXRR4MG.js.map → render-command-32GXLYY2.js.map} +0 -0
  94. /package/build/{types.impl-V4PI7Z6L.js.map → types.impl-L2DPGJ77.js.map} +0 -0
@@ -1,11 +1,11 @@
1
1
  import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
- import{B as Fe,E as $o,a as ft,b as mt,d as ee,e as ye,f as Ho,g as _,l as jo,r as ir,s as Bo,t as ur,u as gt,v as Jo,x as Ee,y as Go}from"./chunk-6U7WFIFR.js";import{a as nr,d as sr,e as ar,f as ht}from"./chunk-RJKCVYVO.js";import{a as le,c as P,d as $,f as Lo,g as Mo,h as C,i as Oe}from"./chunk-I4ARVL5S.js";import{a as k,b as J,c as x,d as Uo,e as G,f as Se,g as l,h as s}from"./chunk-V4TR6DCM.js";var Be=x(z=>{"use strict";s();Object.defineProperty(z,"__esModule",{value:!0});z.ORIGINAL_PROTOCOL_HEADER=z.ORIGINAL_HOST_HEADER=z.ORIGINAL_URL_HEADER=z.SSR_PROTOCOL=z.SSR_HOST=z.NO_SCENARIO_FOUND=void 0;z.NO_SCENARIO_FOUND="NO_SCENARIO_FOUND";z.SSR_HOST="www.wix.com";z.SSR_PROTOCOL="http";z.ORIGINAL_URL_HEADER="x-wix-metro-original-url";z.ORIGINAL_HOST_HEADER="x-wix-metro-original-host";z.ORIGINAL_PROTOCOL_HEADER="x-wix-metro-original-protocol"});function Vo(){if(typeof document=="object")return document}function xe(){return typeof self=="object"?self:global}var Je=J(()=>{"use strict";s()});function Ko(t){let e=Ki(t);return e?e.split("=")[1]:""}function Vi(){let t=Vo();return t&&t.cookie?decodeURIComponent(t.cookie).split(";"):[]}function Ki(t){return Vi().filter(e=>t===e.split("=")[0].trim())[0]}var Yo=J(()=>{"use strict";s();Je()});function Xo(){let t=Ko(Yi);return{[Xi]:t}}var Yi,Xi,Zo=J(()=>{"use strict";s();Yo();Yi="XSRF-TOKEN",Xi="x-xsrf-token"});function Qo(){let t=Qi();return{[Zi]:t}}function Qi(){let t=xe();return t&&t.commonConfig&&typeof t.commonConfig.brand=="string"?t.commonConfig.brand:""}var Zi,en=J(()=>{"use strict";s();Je();Zi="x-wix-brand"});function tn(){return tu()||eu()||ru()}function eu(){let t=xe();if(t&&t.Wix&&t.Wix.Utils&&typeof t.Wix.Utils._getConsentPolicyHeader=="function")return t.Wix.Utils._getConsentPolicyHeader()}function tu(){let t=xe();if(t&&t.consentPolicyManager&&typeof t.consentPolicyManager._getConsentPolicyHeader=="function")return t.consentPolicyManager._getConsentPolicyHeader()}function ru(){return{}}var rn=J(()=>{"use strict";s();Je()});function on(t){return{authorization:t}}var nn=J(()=>{"use strict";s()});function sn(){return ou()?!!process.env.TEAMCITY_VERSION||!!process.env.BUILDKITE:!1}function ou(){return typeof process<"u"&&process.versions?.node!=null}var an=J(()=>{"use strict";s()});function un(t){let e=process.env.ARTIFACT_ID??process.env.APP_NAME??"";return{"X-Wix-Client-Artifact-Id":t??(sn()?"":e)}}var cn=J(()=>{"use strict";s();an()});function iu(){let e=xe()?.commonConfig;if(!e)return null;let r={},o=!1;return Object.keys(e).forEach(n=>{let a=au[n];a?(r[a]=e[n],o=!0):nu.indexOf(n)<0&&typeof e[n]!="function"&&(r[n]=e[n],o=!0)}),o?r:null}var nu,su,au,dn,ln=J(()=>{"use strict";s();Je();nu=["consentPolicy","consentPolicyHeader"],su="commonConfig",au={bsi:"BSI"};dn=()=>{let t=iu(),e=t?JSON.stringify(t):"";return{[su]:encodeURIComponent(e)}}});var pn=x((vt,Ge)=>{"use strict";s();(function(t){var e=typeof vt=="object"&&vt,r=typeof Ge=="object"&&Ge&&Ge.exports==e&&Ge,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 a=function(m){throw new n(m)},i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,c=function(m){m=String(m).replace(d,"");var y=m.length;y%4==0&&(m=m.replace(/==?$/,""),y=m.length),(y%4==1||/[^+a-zA-Z0-9/]/.test(m))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var A=0,w,b,q="",H=-1;++H<y;)b=i.indexOf(m.charAt(H)),w=A%4?w*64+b:b,A++%4&&(q+=String.fromCharCode(255&w>>(-2*A&6)));return q},v=function(m){m=String(m),/[^\0-\xFF]/.test(m)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var y=m.length%3,A="",w=-1,b,q,H,I,O=m.length-y;++w<O;)b=m.charCodeAt(w)<<16,q=m.charCodeAt(++w)<<8,H=m.charCodeAt(++w),I=b+q+H,A+=i.charAt(I>>18&63)+i.charAt(I>>12&63)+i.charAt(I>>6&63)+i.charAt(I&63);return y==2?(b=m.charCodeAt(w)<<8,q=m.charCodeAt(++w),I=b+q,A+=i.charAt(I>>10)+i.charAt(I>>4&63)+i.charAt(I<<2&63)+"="):y==1&&(I=m.charCodeAt(w),A+=i.charAt(I>>2)+i.charAt(I<<4&63)+"=="),A},f={encode:v,decode:c,version:"1.0.0"};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define(function(){return f});else if(e&&!e.nodeType)if(r)r.exports=f;else for(var g in f)f.hasOwnProperty(g)&&(e[g]=f[g]);else t.base64=f})(vt)});function mn({lang:t,locale:e,isPrimaryLanguage:r,signedInstance:o}){if(cu({lang:t,locale:e,isPrimaryLanguage:r})){let n=du(o);if(n!==void 0)return{[uu]:[t,e,r?.toString(),n].join("|")}}return{}}function cu({lang:t,locale:e,isPrimaryLanguage:r}){return t&&e&&/^(true|false)$/.test(r?.toString()||"")}function du(t){try{let e=t?.startsWith("wixcode")?t?.split(".")[2]:t?.split(".")[1];if(e)return JSON.parse(fn.default.decode(e)).instanceId}catch{}}var fn,uu,hn=J(()=>{"use strict";s();fn=G(pn()),uu="x-wix-linguist"});var $e,gn=J(()=>{"use strict";s();$e=class extends Error{constructor(e,r,o){super(`WixHeadersValidationError: expected ${r} to be ${e} but got ${JSON.stringify(o)}`)}}});function vn(t,e){if(typeof e!="boolean")throw new $e("boolean",t,e)}function yn(t,e){if(typeof e!="string")throw new $e("string",t,e)}var xn=J(()=>{"use strict";s();gn()});var _n={};Uo(_n,{createHeaders:()=>lu});function lu(t={}){t={csrf:!0,signedInstance:"",...t},pu(t);let e=[Qo(),tn(),on(t.signedInstance),un(t.artifactId),dn(),mn({signedInstance:t.signedInstance,...t.multilingualOptions})];return t.csrf&&e.push(Xo()),e.filter(r=>Object.values(r).every(o=>o)).reduce((r,o)=>({...r,...o}),{})}function pu(t){vn("opts.csrf",t.csrf),yn("opts.signedInstance",t.signedInstance)}var wn=J(()=>{"use strict";s();Zo();en();rn();nn();cn();ln();hn();xn()});var lr=x(pe=>{"use strict";s();Object.defineProperty(pe,"__esModule",{value:!0});pe.isNode=pe.isWebWorker=pe.isBrowser=void 0;function fu(){return typeof window<"u"}pe.isBrowser=fu;function mu(){var t;return typeof self=="object"&&((t=self?.constructor)===null||t===void 0?void 0:t.name)==="DedicatedWorkerGlobalScope"}pe.isWebWorker=mu;function hu(){var t;return typeof process<"u"&&((t=process==null?void 0:process.versions)===null||t===void 0?void 0:t.node)!=null}pe.isNode=hu});var yt=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 An=Be(),pr=lr();function gu(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return/(^https?:)|(^\/\/)/.test(t)}S.isAbsoluteUrl=gu;async function vu(t){try{await t()}catch{}}S.silent=vu;function yu(t,e){return e.split(".").filter(r=>r).reduce((r,o)=>r[o],t)}S.extractProp=yu;function xu(t){return t.baseURL?Cn(t.baseURL):t.isSSR?An.SSR_HOST:typeof self<"u"&&self.location?self.location.host:""}S.resolveHost=xu;function _u(t){return t.baseURL?bn(t.baseURL):t.isSSR?An.SSR_PROTOCOL:typeof self<"u"&&self.location?self.location.protocol:""}S.resolveProtocol=_u;function bn(t){try{return new URL(t).protocol}catch{return Tn(t).protocol}}S.extractProtocol=bn;function Cn(t){let e;try{e=new URL(t)}catch{e=new URL(`http:${t}`)}try{return e.host}catch{return Tn(t).host}}S.extractHost=Cn;function Tn(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 wu(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=wu;function fr(){let t={httpMockServer:{enabled:!1}},e;if((0,pr.isNode)()&&process.env.HTTP_CLIENT_GLOBAL_CONFIG)try{e=JSON.parse(process.env.HTTP_CLIENT_GLOBAL_CONFIG)}catch{}return e||((0,pr.isBrowser)()?e=window._httpClientGlobalConfig:(0,pr.isWebWorker)()),e||t}S.getGlobalConfig=fr;function Au(){return fr().httpMockServer.enabled}S.isHttpMockServerEnabled=Au;function bu(){return fr().httpMockServer.allowUnmocked}S.shouldAllowUnmocked=bu;function Cu(t){return Object.entries(t).map(([e,r])=>`${e}=${encodeURIComponent(r)}`).flat().join("&")}S.toSearchQueryParams=Cu});var Sn=x((ff,Tu)=>{Tu.exports=["wix.com","editorx.com","wix-code.com","wixapps.net","wixprod.net"]});var xt=x(fe=>{"use strict";s();Object.defineProperty(fe,"__esModule",{value:!0});fe.isWixDomain=fe.composeHeaders=fe.requestIdOrEmptyString=void 0;var Su=(mt(),Se(ft)),Ou=(wn(),Se(_n)),On=yt(),Eu=Su.__importDefault(Sn());function Fu(t){var e;return((e=t?.headers)===null||e===void 0?void 0:e["x-wix-request-id"])||""}fe.requestIdOrEmptyString=Fu;var Ru=({url:t,disableWixHeaders:e,wixHeadersOpts:r})=>!e&&En(t)?(0,Ou.createHeaders)(r):{};fe.composeHeaders=Ru;function En(t){if(!(0,On.isAbsoluteUrl)(t))return!0;let r=`.${(0,On.extractHost)(t)}`;return!!Eu.default.find(n=>r.endsWith(`.${n}`))}fe.isWixDomain=En});var mr=x(ie=>{"use strict";s();Object.defineProperty(ie,"__esModule",{value:!0});ie.createHttpError=ie.HttpError=ie.axiosErrorFields=void 0;var qu=xt();ie.axiosErrorFields=["code","config","request","response","toJSON","__CANCEL__"];var _t=class t extends Error{constructor(e){super(e.message),this.isWixHttpError=!0,Object.setPrototypeOf(this,t.prototype),ie.axiosErrorFields.forEach(r=>{this[r]=e[r]})}get requestId(){return(0,qu.requestIdOrEmptyString)(this.response)}};ie.HttpError=_t;function Pu(...t){return new _t(...t)}ie.createHttpError=Pu});var hr=x((yf,Fn)=>{"use strict";s();Fn.exports=function(e,r){return function(){for(var n=new Array(arguments.length),a=0;a<n.length;a++)n[a]=arguments[a];return e.apply(r,n)}}});var B=x((_f,Pn)=>{"use strict";s();var Nu=hr(),_e=Object.prototype.toString;function yr(t){return _e.call(t)==="[object Array]"}function gr(t){return typeof t>"u"}function Iu(t){return t!==null&&!gr(t)&&t.constructor!==null&&!gr(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ku(t){return _e.call(t)==="[object ArrayBuffer]"}function Du(t){return typeof FormData<"u"&&t instanceof FormData}function Uu(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function Lu(t){return typeof t=="string"}function Mu(t){return typeof t=="number"}function Rn(t){return t!==null&&typeof t=="object"}function wt(t){if(_e.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Hu(t){return _e.call(t)==="[object Date]"}function ju(t){return _e.call(t)==="[object File]"}function Bu(t){return _e.call(t)==="[object Blob]"}function qn(t){return _e.call(t)==="[object Function]"}function Ju(t){return Rn(t)&&qn(t.pipe)}function Gu(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function $u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function zu(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function xr(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),yr(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 vr(){var t={};function e(n,a){wt(t[a])&&wt(n)?t[a]=vr(t[a],n):wt(n)?t[a]=vr({},n):yr(n)?t[a]=n.slice():t[a]=n}for(var r=0,o=arguments.length;r<o;r++)xr(arguments[r],e);return t}function Wu(t,e,r){return xr(e,function(n,a){r&&typeof n=="function"?t[a]=Nu(n,r):t[a]=n}),t}function Vu(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}Pn.exports={isArray:yr,isArrayBuffer:ku,isBuffer:Iu,isFormData:Du,isArrayBufferView:Uu,isString:Lu,isNumber:Mu,isObject:Rn,isPlainObject:wt,isUndefined:gr,isDate:Hu,isFile:ju,isBlob:Bu,isFunction:qn,isStream:Ju,isURLSearchParams:Gu,isStandardBrowserEnv:zu,forEach:xr,merge:vr,extend:Wu,trim:$u,stripBOM:Vu}});var At=x((Af,Nn)=>{"use strict";s();Nn.exports=function(e,r,o,n,a){return e.config=r,o&&(e.code=o),e.request=n,e.response=a,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 bt=x((Cf,In)=>{"use strict";s();var Ku=At();In.exports=function(e,r,o,n,a){var i=new Error(e);return Ku(i,r,o,n,a)}});var _r=x((Sf,kn)=>{"use strict";s();var Yu=bt();kn.exports=function(e,r,o){var n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):r(Yu("Request failed with status code "+o.status,o.config,null,o.request,o))}});var Un=x((Ef,Dn)=>{"use strict";s();Dn.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Mn=x((Rf,Ln)=>{"use strict";s();Ln.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var wr=x((Pf,Hn)=>{"use strict";s();var Xu=Un(),Zu=Mn();Hn.exports=function(e,r){return e&&!Xu(r)?Zu(e,r):r}});var Ct=x((If,Bn)=>{"use strict";s();var Re=B();function jn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}Bn.exports=function(e,r,o){if(!r)return e;var n;if(o)n=o(r);else if(Re.isURLSearchParams(r))n=r.toString();else{var a=[];Re.forEach(r,function(c,v){c===null||typeof c>"u"||(Re.isArray(c)?v=v+"[]":c=[c],Re.forEach(c,function(g){Re.isDate(g)?g=g.toISOString():Re.isObject(g)&&(g=JSON.stringify(g)),a.push(jn(v)+"="+jn(g))}))}),n=a.join("&")}if(n){var i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}});var Gn=x((Df,Jn)=>{"use strict";s();var qe=1e3,Pe=qe*60,Ne=Pe*60,we=Ne*24,Qu=we*7,ec=we*365.25;Jn.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return tc(t);if(r==="number"&&isFinite(t))return e.long?oc(t):rc(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function tc(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*ec;case"weeks":case"week":case"w":return r*Qu;case"days":case"day":case"d":return r*we;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ne;case"minutes":case"minute":case"mins":case"min":case"m":return r*Pe;case"seconds":case"second":case"secs":case"sec":case"s":return r*qe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function rc(t){var e=Math.abs(t);return e>=we?Math.round(t/we)+"d":e>=Ne?Math.round(t/Ne)+"h":e>=Pe?Math.round(t/Pe)+"m":e>=qe?Math.round(t/qe)+"s":t+"ms"}function oc(t){var e=Math.abs(t);return e>=we?Tt(t,e,we,"day"):e>=Ne?Tt(t,e,Ne,"hour"):e>=Pe?Tt(t,e,Pe,"minute"):e>=qe?Tt(t,e,qe,"second"):t+" ms"}function Tt(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var Ar=x((Lf,$n)=>{"use strict";s();function nc(t){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=n,r.enabled=i,r.humanize=Gn(),r.destroy=v,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let g=0;for(let m=0;m<f.length;m++)g=(g<<5)-g+f.charCodeAt(m),g|=0;return r.colors[Math.abs(g)%r.colors.length]}r.selectColor=e;function r(f){let g,m=null,y,A;function w(...b){if(!w.enabled)return;let q=w,H=Number(new Date),I=H-(g||H);q.diff=I,q.prev=g,q.curr=H,g=H,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,(Te,ut)=>{if(Te==="%%")return"%";O++;let ce=r.formatters[ut];if(typeof ce=="function"){let ct=b[O];Te=ce.call(q,ct),b.splice(O,1),O--}return Te}),r.formatArgs.call(q,b),(q.log||r.log).apply(q,b)}return w.namespace=f,w.useColors=r.useColors(),w.color=r.selectColor(f),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(f)),A),set:b=>{m=b}}),typeof r.init=="function"&&r.init(w),w}function o(f,g){let m=r(this.namespace+(typeof g>"u"?":":g)+f);return m.log=this.log,m}function n(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let g,m=(typeof f=="string"?f:"").split(/[\s,]+/),y=m.length;for(g=0;g<y;g++)m[g]&&(f=m[g].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.slice(1)+"$")):r.names.push(new RegExp("^"+f+"$")))}function a(){let f=[...r.names.map(d),...r.skips.map(d).map(g=>"-"+g)].join(",");return r.enable(""),f}function i(f){if(f[f.length-1]==="*")return!0;let g,m;for(g=0,m=r.skips.length;g<m;g++)if(r.skips[g].test(f))return!1;for(g=0,m=r.names.length;g<m;g++)if(r.names[g].test(f))return!0;return!1}function d(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}function c(f){return f instanceof Error?f.stack||f.message:f}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}$n.exports=nc});var zn=x((K,St)=>{"use strict";s();K.formatArgs=ac;K.save=ic;K.load=uc;K.useColors=sc;K.storage=cc();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 sc(){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 ac(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+St.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 ic(t){try{t?K.storage.setItem("debug",t):K.storage.removeItem("debug")}catch{}}function uc(){let t;try{t=K.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function cc(){try{return localStorage}catch{}}St.exports=Ar()(K);var{formatters:dc}=St.exports;dc.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Vn={};Uo(Vn,{createSupportsColor:()=>br,default:()=>gc});import Cr from"node:process";import lc from"node:os";import Wn from"node:tty";function X(t,e=Cr.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",o=e.indexOf(r+t),n=e.indexOf("--");return o!==-1&&(n===-1||o<n)}function pc(){if("FORCE_COLOR"in F)return F.FORCE_COLOR==="true"?1:F.FORCE_COLOR==="false"?0:F.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(F.FORCE_COLOR,10),3)}function fc(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function mc(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let o=pc();o!==void 0&&(Ot=o);let n=r?Ot: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 a=n||0;if(F.TERM==="dumb")return a;if(Cr.platform==="win32"){let i=lc.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in F)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(i=>i in F)||F.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in F)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(F.TEAMCITY_VERSION)?1:0;if("TF_BUILD"in F&&"AGENT_NAME"in F)return 1;if(F.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in F){let i=Number.parseInt((F.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(F.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(F.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(F.TERM)||"COLORTERM"in F?1:a}function br(t,e={}){let r=mc(t,{streamIsTTY:t&&t.isTTY,...e});return fc(r)}var F,Ot,hc,gc,Kn=J(()=>{"use strict";s();({env:F}=Cr);X("no-color")||X("no-colors")||X("color=false")||X("color=never")?Ot=0:(X("color")||X("colors")||X("color=true")||X("color=always"))&&(Ot=1);hc={stdout:br({isTTY:Wn.isatty(1)}),stderr:br({isTTY:Wn.isatty(2)})},gc=hc});var Xn=x((D,Ft)=>{"use strict";s();var vc=k("tty"),Et=k("util");D.init=Cc;D.log=wc;D.formatArgs=xc;D.save=Ac;D.load=bc;D.useColors=yc;D.destroy=Et.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");D.colors=[6,2,3,4,5,1];try{let t=(Kn(),Se(Vn));t&&(t.stderr||t).level>=2&&(D.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{}D.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,a)=>a.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 yc(){return"colors"in D.inspectOpts?!!D.inspectOpts.colors:vc.isatty(process.stderr.fd)}function xc(t){let{namespace:e,useColors:r}=this;if(r){let o=this.color,n="\x1B[3"+(o<8?o:"8;5;"+o),a=` ${n};1m${e} \x1B[0m`;t[0]=a+t[0].split(`
3
+ import{B as Fe,E as $o,a as ft,b as mt,d as ee,e as ye,f as Ho,g as _,l as Bo,r as ir,s as jo,t as ur,u as gt,v as Jo,x as Ee,y as Go}from"./chunk-PYEFXRM2.js";import{a as nr,d as sr,e as ar,f as ht}from"./chunk-F2ZEWDAK.js";import{a as le,c as P,d as $,f as Lo,g as Mo,h as C,i as Oe}from"./chunk-SARV44FW.js";import{a as D,b as J,c as x,d as Uo,e as G,f as Se,g as l,h as s}from"./chunk-V4TR6DCM.js";var je=x(z=>{"use strict";s();Object.defineProperty(z,"__esModule",{value:!0});z.ORIGINAL_PROTOCOL_HEADER=z.ORIGINAL_HOST_HEADER=z.ORIGINAL_URL_HEADER=z.SSR_PROTOCOL=z.SSR_HOST=z.NO_SCENARIO_FOUND=void 0;z.NO_SCENARIO_FOUND="NO_SCENARIO_FOUND";z.SSR_HOST="www.wix.com";z.SSR_PROTOCOL="http";z.ORIGINAL_URL_HEADER="x-wix-metro-original-url";z.ORIGINAL_HOST_HEADER="x-wix-metro-original-host";z.ORIGINAL_PROTOCOL_HEADER="x-wix-metro-original-protocol"});function Vo(){if(typeof document=="object")return document}function xe(){return typeof self=="object"?self:global}var Je=J(()=>{"use strict";s()});function Ko(t){let e=Ki(t);return e?e.split("=")[1]:""}function Vi(){let t=Vo();return t&&t.cookie?decodeURIComponent(t.cookie).split(";"):[]}function Ki(t){return Vi().filter(e=>t===e.split("=")[0].trim())[0]}var Yo=J(()=>{"use strict";s();Je()});function Xo(){let t=Ko(Yi);return{[Xi]:t}}var Yi,Xi,Zo=J(()=>{"use strict";s();Yo();Yi="XSRF-TOKEN",Xi="x-xsrf-token"});function Qo(){let t=Qi();return{[Zi]:t}}function Qi(){let t=xe();return t&&t.commonConfig&&typeof t.commonConfig.brand=="string"?t.commonConfig.brand:""}var Zi,en=J(()=>{"use strict";s();Je();Zi="x-wix-brand"});function tn(){return tu()||eu()||ru()}function eu(){let t=xe();if(t&&t.Wix&&t.Wix.Utils&&typeof t.Wix.Utils._getConsentPolicyHeader=="function")return t.Wix.Utils._getConsentPolicyHeader()}function tu(){let t=xe();if(t&&t.consentPolicyManager&&typeof t.consentPolicyManager._getConsentPolicyHeader=="function")return t.consentPolicyManager._getConsentPolicyHeader()}function ru(){return{}}var rn=J(()=>{"use strict";s();Je()});function on(t){return{authorization:t}}var nn=J(()=>{"use strict";s()});function sn(){return ou()?!!process.env.TEAMCITY_VERSION||!!process.env.BUILDKITE:!1}function ou(){return typeof process<"u"&&process.versions?.node!=null}var an=J(()=>{"use strict";s()});function un(t){let e=process.env.ARTIFACT_ID??process.env.APP_NAME??"";return{"X-Wix-Client-Artifact-Id":t??(sn()?"":e)}}var cn=J(()=>{"use strict";s();an()});function iu(){let e=xe()?.commonConfig;if(!e)return null;let r={},o=!1;return Object.keys(e).forEach(n=>{let a=au[n];a?(r[a]=e[n],o=!0):nu.indexOf(n)<0&&typeof e[n]!="function"&&(r[n]=e[n],o=!0)}),o?r:null}var nu,su,au,dn,ln=J(()=>{"use strict";s();Je();nu=["consentPolicy","consentPolicyHeader"],su="commonConfig",au={bsi:"BSI"};dn=()=>{let t=iu(),e=t?JSON.stringify(t):"";return{[su]:encodeURIComponent(e)}}});var pn=x((vt,Ge)=>{"use strict";s();(function(t){var e=typeof vt=="object"&&vt,r=typeof Ge=="object"&&Ge&&Ge.exports==e&&Ge,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 a=function(m){throw new n(m)},i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,c=function(m){m=String(m).replace(d,"");var y=m.length;y%4==0&&(m=m.replace(/==?$/,""),y=m.length),(y%4==1||/[^+a-zA-Z0-9/]/.test(m))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var A=0,w,b,q="",H=-1;++H<y;)b=i.indexOf(m.charAt(H)),w=A%4?w*64+b:b,A++%4&&(q+=String.fromCharCode(255&w>>(-2*A&6)));return q},v=function(m){m=String(m),/[^\0-\xFF]/.test(m)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var y=m.length%3,A="",w=-1,b,q,H,I,E=m.length-y;++w<E;)b=m.charCodeAt(w)<<16,q=m.charCodeAt(++w)<<8,H=m.charCodeAt(++w),I=b+q+H,A+=i.charAt(I>>18&63)+i.charAt(I>>12&63)+i.charAt(I>>6&63)+i.charAt(I&63);return y==2?(b=m.charCodeAt(w)<<8,q=m.charCodeAt(++w),I=b+q,A+=i.charAt(I>>10)+i.charAt(I>>4&63)+i.charAt(I<<2&63)+"="):y==1&&(I=m.charCodeAt(w),A+=i.charAt(I>>2)+i.charAt(I<<4&63)+"=="),A},f={encode:v,decode:c,version:"1.0.0"};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define(function(){return f});else if(e&&!e.nodeType)if(r)r.exports=f;else for(var g in f)f.hasOwnProperty(g)&&(e[g]=f[g]);else t.base64=f})(vt)});function mn({lang:t,locale:e,isPrimaryLanguage:r,signedInstance:o}){if(cu({lang:t,locale:e,isPrimaryLanguage:r})){let n=du(o);if(n!==void 0)return{[uu]:[t,e,r?.toString(),n].join("|")}}return{}}function cu({lang:t,locale:e,isPrimaryLanguage:r}){return t&&e&&/^(true|false)$/.test(r?.toString()||"")}function du(t){try{let e=t?.startsWith("wixcode")?t?.split(".")[2]:t?.split(".")[1];if(e)return JSON.parse(fn.default.decode(e)).instanceId}catch{}}var fn,uu,hn=J(()=>{"use strict";s();fn=G(pn()),uu="x-wix-linguist"});var $e,gn=J(()=>{"use strict";s();$e=class extends Error{constructor(e,r,o){super(`WixHeadersValidationError: expected ${r} to be ${e} but got ${JSON.stringify(o)}`)}}});function vn(t,e){if(typeof e!="boolean")throw new $e("boolean",t,e)}function yn(t,e){if(typeof e!="string")throw new $e("string",t,e)}var xn=J(()=>{"use strict";s();gn()});var _n={};Uo(_n,{createHeaders:()=>lu});function lu(t={}){t={csrf:!0,signedInstance:"",...t},pu(t);let e=[Qo(),tn(),on(t.signedInstance),un(t.artifactId),dn(),mn({signedInstance:t.signedInstance,...t.multilingualOptions})];return t.csrf&&e.push(Xo()),e.filter(r=>Object.values(r).every(o=>o)).reduce((r,o)=>({...r,...o}),{})}function pu(t){vn("opts.csrf",t.csrf),yn("opts.signedInstance",t.signedInstance)}var wn=J(()=>{"use strict";s();Zo();en();rn();nn();cn();ln();hn();xn()});var lr=x(pe=>{"use strict";s();Object.defineProperty(pe,"__esModule",{value:!0});pe.isNode=pe.isWebWorker=pe.isBrowser=void 0;function fu(){return typeof window<"u"}pe.isBrowser=fu;function mu(){var t;return typeof self=="object"&&((t=self?.constructor)===null||t===void 0?void 0:t.name)==="DedicatedWorkerGlobalScope"}pe.isWebWorker=mu;function hu(){var t;return typeof process<"u"&&((t=process==null?void 0:process.versions)===null||t===void 0?void 0:t.node)!=null}pe.isNode=hu});var yt=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 An=je(),pr=lr();function gu(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return/(^https?:)|(^\/\/)/.test(t)}S.isAbsoluteUrl=gu;async function vu(t){try{await t()}catch{}}S.silent=vu;function yu(t,e){return e.split(".").filter(r=>r).reduce((r,o)=>r[o],t)}S.extractProp=yu;function xu(t){return t.baseURL?Cn(t.baseURL):t.isSSR?An.SSR_HOST:typeof self<"u"&&self.location?self.location.host:""}S.resolveHost=xu;function _u(t){return t.baseURL?bn(t.baseURL):t.isSSR?An.SSR_PROTOCOL:typeof self<"u"&&self.location?self.location.protocol:""}S.resolveProtocol=_u;function bn(t){try{return new URL(t).protocol}catch{return Tn(t).protocol}}S.extractProtocol=bn;function Cn(t){let e;try{e=new URL(t)}catch{e=new URL(`http:${t}`)}try{return e.host}catch{return Tn(t).host}}S.extractHost=Cn;function Tn(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 wu(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=wu;function fr(){let t={httpMockServer:{enabled:!1}},e;if((0,pr.isNode)()&&process.env.HTTP_CLIENT_GLOBAL_CONFIG)try{e=JSON.parse(process.env.HTTP_CLIENT_GLOBAL_CONFIG)}catch{}return e||((0,pr.isBrowser)()?e=window._httpClientGlobalConfig:(0,pr.isWebWorker)()),e||t}S.getGlobalConfig=fr;function Au(){return fr().httpMockServer.enabled}S.isHttpMockServerEnabled=Au;function bu(){return fr().httpMockServer.allowUnmocked}S.shouldAllowUnmocked=bu;function Cu(t){return Object.entries(t).map(([e,r])=>`${e}=${encodeURIComponent(r)}`).flat().join("&")}S.toSearchQueryParams=Cu});var Sn=x((ff,Tu)=>{Tu.exports=["wix.com","editorx.com","wix-code.com","wixapps.net","wixprod.net"]});var xt=x(fe=>{"use strict";s();Object.defineProperty(fe,"__esModule",{value:!0});fe.isWixDomain=fe.composeHeaders=fe.requestIdOrEmptyString=void 0;var Su=(mt(),Se(ft)),Ou=(wn(),Se(_n)),On=yt(),Eu=Su.__importDefault(Sn());function Fu(t){var e;return((e=t?.headers)===null||e===void 0?void 0:e["x-wix-request-id"])||""}fe.requestIdOrEmptyString=Fu;var Ru=({url:t,disableWixHeaders:e,wixHeadersOpts:r})=>!e&&En(t)?(0,Ou.createHeaders)(r):{};fe.composeHeaders=Ru;function En(t){if(!(0,On.isAbsoluteUrl)(t))return!0;let r=`.${(0,On.extractHost)(t)}`;return!!Eu.default.find(n=>r.endsWith(`.${n}`))}fe.isWixDomain=En});var mr=x(ie=>{"use strict";s();Object.defineProperty(ie,"__esModule",{value:!0});ie.createHttpError=ie.HttpError=ie.axiosErrorFields=void 0;var qu=xt();ie.axiosErrorFields=["code","config","request","response","toJSON","__CANCEL__"];var _t=class t extends Error{constructor(e){super(e.message),this.isWixHttpError=!0,Object.setPrototypeOf(this,t.prototype),ie.axiosErrorFields.forEach(r=>{this[r]=e[r]})}get requestId(){return(0,qu.requestIdOrEmptyString)(this.response)}};ie.HttpError=_t;function Pu(...t){return new _t(...t)}ie.createHttpError=Pu});var hr=x((yf,Fn)=>{"use strict";s();Fn.exports=function(e,r){return function(){for(var n=new Array(arguments.length),a=0;a<n.length;a++)n[a]=arguments[a];return e.apply(r,n)}}});var j=x((_f,Pn)=>{"use strict";s();var Nu=hr(),_e=Object.prototype.toString;function yr(t){return _e.call(t)==="[object Array]"}function gr(t){return typeof t>"u"}function Iu(t){return t!==null&&!gr(t)&&t.constructor!==null&&!gr(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ku(t){return _e.call(t)==="[object ArrayBuffer]"}function Du(t){return typeof FormData<"u"&&t instanceof FormData}function Uu(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function Lu(t){return typeof t=="string"}function Mu(t){return typeof t=="number"}function Rn(t){return t!==null&&typeof t=="object"}function wt(t){if(_e.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Hu(t){return _e.call(t)==="[object Date]"}function Bu(t){return _e.call(t)==="[object File]"}function ju(t){return _e.call(t)==="[object Blob]"}function qn(t){return _e.call(t)==="[object Function]"}function Ju(t){return Rn(t)&&qn(t.pipe)}function Gu(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function $u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function zu(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function xr(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),yr(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 vr(){var t={};function e(n,a){wt(t[a])&&wt(n)?t[a]=vr(t[a],n):wt(n)?t[a]=vr({},n):yr(n)?t[a]=n.slice():t[a]=n}for(var r=0,o=arguments.length;r<o;r++)xr(arguments[r],e);return t}function Wu(t,e,r){return xr(e,function(n,a){r&&typeof n=="function"?t[a]=Nu(n,r):t[a]=n}),t}function Vu(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}Pn.exports={isArray:yr,isArrayBuffer:ku,isBuffer:Iu,isFormData:Du,isArrayBufferView:Uu,isString:Lu,isNumber:Mu,isObject:Rn,isPlainObject:wt,isUndefined:gr,isDate:Hu,isFile:Bu,isBlob:ju,isFunction:qn,isStream:Ju,isURLSearchParams:Gu,isStandardBrowserEnv:zu,forEach:xr,merge:vr,extend:Wu,trim:$u,stripBOM:Vu}});var At=x((Af,Nn)=>{"use strict";s();Nn.exports=function(e,r,o,n,a){return e.config=r,o&&(e.code=o),e.request=n,e.response=a,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 bt=x((Cf,In)=>{"use strict";s();var Ku=At();In.exports=function(e,r,o,n,a){var i=new Error(e);return Ku(i,r,o,n,a)}});var _r=x((Sf,kn)=>{"use strict";s();var Yu=bt();kn.exports=function(e,r,o){var n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):r(Yu("Request failed with status code "+o.status,o.config,null,o.request,o))}});var Un=x((Ef,Dn)=>{"use strict";s();Dn.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Mn=x((Rf,Ln)=>{"use strict";s();Ln.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var wr=x((Pf,Hn)=>{"use strict";s();var Xu=Un(),Zu=Mn();Hn.exports=function(e,r){return e&&!Xu(r)?Zu(e,r):r}});var Ct=x((If,jn)=>{"use strict";s();var Re=j();function Bn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}jn.exports=function(e,r,o){if(!r)return e;var n;if(o)n=o(r);else if(Re.isURLSearchParams(r))n=r.toString();else{var a=[];Re.forEach(r,function(c,v){c===null||typeof c>"u"||(Re.isArray(c)?v=v+"[]":c=[c],Re.forEach(c,function(g){Re.isDate(g)?g=g.toISOString():Re.isObject(g)&&(g=JSON.stringify(g)),a.push(Bn(v)+"="+Bn(g))}))}),n=a.join("&")}if(n){var i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}});var Gn=x((Df,Jn)=>{"use strict";s();var qe=1e3,Pe=qe*60,Ne=Pe*60,we=Ne*24,Qu=we*7,ec=we*365.25;Jn.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return tc(t);if(r==="number"&&isFinite(t))return e.long?oc(t):rc(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function tc(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*ec;case"weeks":case"week":case"w":return r*Qu;case"days":case"day":case"d":return r*we;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ne;case"minutes":case"minute":case"mins":case"min":case"m":return r*Pe;case"seconds":case"second":case"secs":case"sec":case"s":return r*qe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function rc(t){var e=Math.abs(t);return e>=we?Math.round(t/we)+"d":e>=Ne?Math.round(t/Ne)+"h":e>=Pe?Math.round(t/Pe)+"m":e>=qe?Math.round(t/qe)+"s":t+"ms"}function oc(t){var e=Math.abs(t);return e>=we?Tt(t,e,we,"day"):e>=Ne?Tt(t,e,Ne,"hour"):e>=Pe?Tt(t,e,Pe,"minute"):e>=qe?Tt(t,e,qe,"second"):t+" ms"}function Tt(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var Ar=x((Lf,$n)=>{"use strict";s();function nc(t){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=n,r.enabled=i,r.humanize=Gn(),r.destroy=v,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let g=0;for(let m=0;m<f.length;m++)g=(g<<5)-g+f.charCodeAt(m),g|=0;return r.colors[Math.abs(g)%r.colors.length]}r.selectColor=e;function r(f){let g,m=null,y,A;function w(...b){if(!w.enabled)return;let q=w,H=Number(new Date),I=H-(g||H);q.diff=I,q.prev=g,q.curr=H,g=H,b[0]=r.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let E=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(Te,ut)=>{if(Te==="%%")return"%";E++;let ce=r.formatters[ut];if(typeof ce=="function"){let ct=b[E];Te=ce.call(q,ct),b.splice(E,1),E--}return Te}),r.formatArgs.call(q,b),(q.log||r.log).apply(q,b)}return w.namespace=f,w.useColors=r.useColors(),w.color=r.selectColor(f),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(f)),A),set:b=>{m=b}}),typeof r.init=="function"&&r.init(w),w}function o(f,g){let m=r(this.namespace+(typeof g>"u"?":":g)+f);return m.log=this.log,m}function n(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let g,m=(typeof f=="string"?f:"").split(/[\s,]+/),y=m.length;for(g=0;g<y;g++)m[g]&&(f=m[g].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.slice(1)+"$")):r.names.push(new RegExp("^"+f+"$")))}function a(){let f=[...r.names.map(d),...r.skips.map(d).map(g=>"-"+g)].join(",");return r.enable(""),f}function i(f){if(f[f.length-1]==="*")return!0;let g,m;for(g=0,m=r.skips.length;g<m;g++)if(r.skips[g].test(f))return!1;for(g=0,m=r.names.length;g<m;g++)if(r.names[g].test(f))return!0;return!1}function d(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}function c(f){return f instanceof Error?f.stack||f.message:f}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}$n.exports=nc});var zn=x((K,St)=>{"use strict";s();K.formatArgs=ac;K.save=ic;K.load=uc;K.useColors=sc;K.storage=cc();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 sc(){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 ac(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+St.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 ic(t){try{t?K.storage.setItem("debug",t):K.storage.removeItem("debug")}catch{}}function uc(){let t;try{t=K.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function cc(){try{return localStorage}catch{}}St.exports=Ar()(K);var{formatters:dc}=St.exports;dc.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Vn={};Uo(Vn,{createSupportsColor:()=>br,default:()=>gc});import Cr from"node:process";import lc from"node:os";import Wn from"node:tty";function X(t,e=Cr.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",o=e.indexOf(r+t),n=e.indexOf("--");return o!==-1&&(n===-1||o<n)}function pc(){if("FORCE_COLOR"in F)return F.FORCE_COLOR==="true"?1:F.FORCE_COLOR==="false"?0:F.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(F.FORCE_COLOR,10),3)}function fc(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function mc(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let o=pc();o!==void 0&&(Ot=o);let n=r?Ot: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 a=n||0;if(F.TERM==="dumb")return a;if(Cr.platform==="win32"){let i=lc.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in F)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(i=>i in F)||F.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in F)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(F.TEAMCITY_VERSION)?1:0;if("TF_BUILD"in F&&"AGENT_NAME"in F)return 1;if(F.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in F){let i=Number.parseInt((F.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(F.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(F.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(F.TERM)||"COLORTERM"in F?1:a}function br(t,e={}){let r=mc(t,{streamIsTTY:t&&t.isTTY,...e});return fc(r)}var F,Ot,hc,gc,Kn=J(()=>{"use strict";s();({env:F}=Cr);X("no-color")||X("no-colors")||X("color=false")||X("color=never")?Ot=0:(X("color")||X("colors")||X("color=true")||X("color=always"))&&(Ot=1);hc={stdout:br({isTTY:Wn.isatty(1)}),stderr:br({isTTY:Wn.isatty(2)})},gc=hc});var Xn=x((k,Ft)=>{"use strict";s();var vc=D("tty"),Et=D("util");k.init=Cc;k.log=wc;k.formatArgs=xc;k.save=Ac;k.load=bc;k.useColors=yc;k.destroy=Et.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");k.colors=[6,2,3,4,5,1];try{let t=(Kn(),Se(Vn));t&&(t.stderr||t).level>=2&&(k.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{}k.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,a)=>a.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 yc(){return"colors"in k.inspectOpts?!!k.inspectOpts.colors:vc.isatty(process.stderr.fd)}function xc(t){let{namespace:e,useColors:r}=this;if(r){let o=this.color,n="\x1B[3"+(o<8?o:"8;5;"+o),a=` ${n};1m${e} \x1B[0m`;t[0]=a+t[0].split(`
4
4
  `).join(`
5
- `+a),t.push(n+"m+"+Ft.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=_c()+e+" "+t[0]}function _c(){return D.inspectOpts.hideDate?"":new Date().toISOString()+" "}function wc(...t){return process.stderr.write(Et.format(...t)+`
6
- `)}function Ac(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function bc(){return process.env.DEBUG}function Cc(t){t.inspectOpts={};let e=Object.keys(D.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=D.inspectOpts[e[r]]}Ft.exports=Ar()(D);var{formatters:Yn}=Ft.exports;Yn.o=function(t){return this.inspectOpts.colors=this.useColors,Et.inspect(t,this.inspectOpts).split(`
7
- `).map(e=>e.trim()).join(" ")};Yn.O=function(t){return this.inspectOpts.colors=this.useColors,Et.inspect(t,this.inspectOpts)}});var Zn=x((zf,Tr)=>{"use strict";s();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Tr.exports=zn():Tr.exports=Xn()});var es=x((Vf,Qn)=>{"use strict";s();var ze;Qn.exports=function(){if(!ze){try{ze=Zn()("follow-redirects")}catch{}typeof ze!="function"&&(ze=function(){})}ze.apply(null,arguments)}});var Lr=x((Yf,Ur)=>{"use strict";s();var Ke=k("url"),We=Ke.URL,Tc=k("http"),Sc=k("https"),Rr=k("stream").Writable,qr=k("assert"),ts=es(),Pr=!1;try{qr(new We)}catch(t){Pr=t.code==="ERR_INVALID_URL"}var Oc=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Nr=["abort","aborted","connect","error","socket","timeout"],Ir=Object.create(null);Nr.forEach(function(t){Ir[t]=function(e,r,o){this._redirectable.emit(t,e,r,o)}});var Or=Ye("ERR_INVALID_URL","Invalid URL",TypeError),Er=Ye("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Ec=Ye("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Er),Fc=Ye("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Rc=Ye("ERR_STREAM_WRITE_AFTER_END","write after end"),qc=Rr.prototype.destroy||os;function W(t,e){Rr.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 Er?n:new Er({cause:n}))}},this._performRequest()}W.prototype=Object.create(Rr.prototype);W.prototype.abort=function(){Dr(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};W.prototype.destroy=function(t){return Dr(this._currentRequest,t),qc.call(this,t),this};W.prototype.write=function(t,e,r){if(this._ending)throw new Rc;if(!Ae(t)&&!Ic(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Ve(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new Fc),this.abort())};W.prototype.end=function(t,e,r){if(Ve(t)?(r=t,t=e=null):Ve(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}};W.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};W.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};W.prototype.setTimeout=function(t,e){var r=this;function o(i){i.setTimeout(t),i.removeListener("timeout",i.destroy),i.addListener("timeout",i.destroy)}function n(i){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),a()},t),o(i)}function a(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",a),r.removeListener("error",a),r.removeListener("response",a),r.removeListener("close",a),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",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){W.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(W.prototype,t,{get:function(){return this._currentRequest[t]}})});W.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))}};W.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 Nr)o.on(n,Ir[n]);if(this._currentUrl=/^\//.test(this._options.path)?Ke.format(this._options):this._options.path,this._isRedirect){var a=0,i=this,d=this._requestBodyBuffers;(function c(v){if(o===i._currentRequest)if(v)i.emit("error",v);else if(a<d.length){var f=d[a++];o.finished||o.write(f.data,f.encoding,c)}else i._ended&&o.end()})()}};W.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(Dr(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Ec;var o,n=this._options.beforeRedirect;n&&(o=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var a=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=[],Sr(/^content-/i,this._options.headers));var i=Sr(/^host$/i,this._options.headers),d=kr(this._currentUrl),c=i||d.host,v=/^\w+:/.test(r)?this._currentUrl:Ke.format(Object.assign(d,{host:c})),f=Pc(r,v);if(ts("redirecting to",f.href),this._isRedirect=!0,Fr(f,this._options),(f.protocol!==d.protocol&&f.protocol!=="https:"||f.host!==c&&!Nc(f.host,c))&&Sr(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Ve(n)){var g={headers:t.headers,statusCode:e},m={url:v,method:a,headers:o};n(this._options,g,m),this._sanitizeOptions(this._options)}this._performRequest()};function rs(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(o){var n=o+":",a=r[n]=t[o],i=e[o]=Object.create(a);function d(v,f,g){return kc(v)?v=Fr(v):Ae(v)?v=Fr(kr(v)):(g=f,f=ns(v),v={protocol:n}),Ve(f)&&(g=f,f=null),f=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},v,f),f.nativeProtocols=r,!Ae(f.host)&&!Ae(f.hostname)&&(f.hostname="::1"),qr.equal(f.protocol,n,"protocol mismatch"),ts("options",f),new W(f,g)}function c(v,f,g){var m=i.request(v,f,g);return m.end(),m}Object.defineProperties(i,{request:{value:d,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function os(){}function kr(t){var e;if(Pr)e=new We(t);else if(e=ns(Ke.parse(t)),!Ae(e.protocol))throw new Or({input:t});return e}function Pc(t,e){return Pr?new We(t,e):kr(Ke.resolve(e,t))}function ns(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new Or({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new Or({input:t.href||t});return t}function Fr(t,e){var r=e||{};for(var o of Oc)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 Sr(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 Ye(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 Dr(t,e){for(var r of Nr)t.removeListener(r,Ir[r]);t.on("error",os),t.destroy(e)}function Nc(t,e){qr(Ae(t)&&Ae(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function Ae(t){return typeof t=="string"||t instanceof String}function Ve(t){return typeof t=="function"}function Ic(t){return typeof t=="object"&&"length"in t}function kc(t){return We&&t instanceof We}Ur.exports=rs({http:Tc,https:Sc});Ur.exports.wrap=rs});var Mr=x((Zf,Dc)=>{Dc.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 qt=x((Qf,cs)=>{"use strict";s();var Xe=B(),ss=_r(),Uc=wr(),Lc=Ct(),Mc=k("http"),Hc=k("https"),jc=Lr().http,Bc=Lr().https,as=k("url"),Jc=k("zlib"),Gc=Mr(),Rt=bt(),Hr=At(),is=/https:?/;function us(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(a){a.headers.host=a.host,us(a,e,a.href)}}cs.exports=function(e){return new Promise(function(o,n){var a=function(T){o(T)},i=function(T){n(T)},d=e.data,c=e.headers;if("User-Agent"in c||"user-agent"in c?!c["User-Agent"]&&!c["user-agent"]&&(delete c["User-Agent"],delete c["user-agent"]):c["User-Agent"]="axios/"+Gc.version,d&&!Xe.isStream(d)){if(!Buffer.isBuffer(d))if(Xe.isArrayBuffer(d))d=Buffer.from(new Uint8Array(d));else if(Xe.isString(d))d=Buffer.from(d,"utf-8");else return i(Rt("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=d.length}var v=void 0;if(e.auth){var f=e.auth.username||"",g=e.auth.password||"";v=f+":"+g}var m=Uc(e.baseURL,e.url),y=as.parse(m),A=y.protocol||"http:";if(!v&&y.auth){var w=y.auth.split(":"),b=w[0]||"",q=w[1]||"";v=b+":"+q}v&&delete c.Authorization;var H=is.test(A),I=H?e.httpsAgent:e.httpAgent,O={path:Lc(y.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:I,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 Te=A.slice(0,-1)+"_proxy",ut=process.env[Te]||process.env[Te.toUpperCase()];if(ut){var ce=as.parse(ut),ct=process.env.no_proxy||process.env.NO_PROXY,qo=!0;if(ct){var Mi=ct.split(",").map(function(T){return T.trim()});qo=!Mi.some(function(T){return T?T==="*"||T[0]==="."&&y.hostname.substr(y.hostname.length-T.length)===T?!0:y.hostname===T:!1})}if(qo&&(Q={host:ce.hostname,port:ce.port,protocol:ce.protocol},ce.auth)){var Po=ce.auth.split(":");Q.auth={username:Po[0],password:Po[1]}}}}Q&&(O.headers.host=y.hostname+(y.port?":"+y.port:""),us(O,Q,A+"//"+y.hostname+(y.port?":"+y.port:"")+O.path));var dt,No=H&&(Q?is.test(Q.protocol):!0);e.transport?dt=e.transport:e.maxRedirects===0?dt=No?Hc:Mc:(e.maxRedirects&&(O.maxRedirects=e.maxRedirects),dt=No?Bc:jc),e.maxBodyLength>-1&&(O.maxBodyLength=e.maxBodyLength);var j=dt.request(O,function(T){if(!j.aborted){var ve=T,lt=T.req||j;if(T.statusCode!==204&&lt.method!=="HEAD"&&e.decompress!==!1)switch(T.headers["content-encoding"]){case"gzip":case"compress":case"deflate":ve=ve.pipe(Jc.createUnzip()),delete T.headers["content-encoding"];break}var pt={status:T.statusCode,statusText:T.statusMessage,headers:T.headers,config:e,request:lt};if(e.responseType==="stream")pt.data=ve,ss(a,i,pt);else{var Io=[],ko=0;ve.on("data",function(oe){Io.push(oe),ko+=oe.length,e.maxContentLength>-1&&ko>e.maxContentLength&&(ve.destroy(),i(Rt("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,lt)))}),ve.on("error",function(oe){j.aborted||i(Hr(oe,e,null,lt))}),ve.on("end",function(){var oe=Buffer.concat(Io);e.responseType!=="arraybuffer"&&(oe=oe.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(oe=Xe.stripBOM(oe))),pt.data=oe,ss(a,i,pt)})}}});if(j.on("error",function(T){j.aborted&&T.code!=="ERR_FR_TOO_MANY_REDIRECTS"||i(Hr(T,e,null,j))}),e.timeout){var or=parseInt(e.timeout,10);if(isNaN(or)){i(Rt("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",j));return}j.setTimeout(or,function(){j.abort(),i(Rt("timeout of "+or+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",j))})}e.cancelToken&&e.cancelToken.promise.then(function(T){j.aborted||(j.abort(),i(T))}),Xe.isStream(d)?d.on("error",function(T){i(Hr(T,e,null,j))}).pipe(j):j.end(d)})}});var ls=x((tm,ds)=>{"use strict";s();var $c=B();function Pt(){this.handlers=[]}Pt.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};Pt.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Pt.prototype.forEach=function(e){$c.forEach(this.handlers,function(o){o!==null&&e(o)})};ds.exports=Pt});var fs=x((om,ps)=>{"use strict";s();var zc=B();ps.exports=function(e,r){zc.forEach(e,function(n,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(e[r]=n,delete e[a])})}});var hs=x((sm,ms)=>{"use strict";s();var Nt=B();ms.exports=Nt.isStandardBrowserEnv()?function(){return{write:function(r,o,n,a,i,d){var c=[];c.push(r+"="+encodeURIComponent(o)),Nt.isNumber(n)&&c.push("expires="+new Date(n).toGMTString()),Nt.isString(a)&&c.push("path="+a),Nt.isString(i)&&c.push("domain="+i),d===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var vs=x((im,gs)=>{"use strict";s();var jr=B(),Wc=["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"];gs.exports=function(e){var r={},o,n,a;return e&&jr.forEach(e.split(`
8
- `),function(d){if(a=d.indexOf(":"),o=jr.trim(d.substr(0,a)).toLowerCase(),n=jr.trim(d.substr(a+1)),o){if(r[o]&&Wc.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 _s=x((cm,xs)=>{"use strict";s();var ys=B();xs.exports=ys.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function n(a){var i=a;return e&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{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(i){var d=ys.isString(i)?n(i):i;return d.protocol===o.protocol&&d.host===o.host}}():function(){return function(){return!0}}()});var Jr=x((lm,ws)=>{"use strict";s();var It=B(),Vc=_r(),Kc=hs(),Yc=Ct(),Xc=wr(),Zc=vs(),Qc=_s(),Br=bt();ws.exports=function(e){return new Promise(function(o,n){var a=e.data,i=e.headers,d=e.responseType;It.isFormData(a)&&delete i["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(v+":"+f)}var g=Xc(e.baseURL,e.url);c.open(e.method.toUpperCase(),Yc(g,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function m(){if(c){var A="getAllResponseHeaders"in c?Zc(c.getAllResponseHeaders()):null,w=!d||d==="text"||d==="json"?c.responseText:c.response,b={data:w,status:c.status,statusText:c.statusText,headers:A,config:e,request:c};Vc(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(Br("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){n(Br("Network Error",e,null,c)),c=null},c.ontimeout=function(){var w="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),n(Br(w,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},It.isStandardBrowserEnv()){var y=(e.withCredentials||Qc(g))&&e.xsrfCookieName?Kc.read(e.xsrfCookieName):void 0;y&&(i[e.xsrfHeaderName]=y)}"setRequestHeader"in c&&It.forEach(i,function(w,b){typeof a>"u"&&b.toLowerCase()==="content-type"?delete i[b]:c.setRequestHeader(b,w)}),It.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),d&&d!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(w){c&&(c.abort(),n(w),c=null)}),a||(a=null),c.send(a)})}});var Dt=x((fm,Cs)=>{"use strict";s();var U=B(),As=fs(),ed=At(),td={"Content-Type":"application/x-www-form-urlencoded"};function bs(t,e){!U.isUndefined(t)&&U.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function rd(){var t;return typeof XMLHttpRequest<"u"?t=Jr():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=qt()),t}function od(t,e,r){if(U.isString(t))try{return(e||JSON.parse)(t),U.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(t)}var kt={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:rd(),transformRequest:[function(e,r){return As(r,"Accept"),As(r,"Content-Type"),U.isFormData(e)||U.isArrayBuffer(e)||U.isBuffer(e)||U.isStream(e)||U.isFile(e)||U.isBlob(e)?e:U.isArrayBufferView(e)?e.buffer:U.isURLSearchParams(e)?(bs(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):U.isObject(e)||r&&r["Content-Type"]==="application/json"?(bs(r,"application/json"),od(e)):e}],transformResponse:[function(e){var r=this.transitional,o=r&&r.silentJSONParsing,n=r&&r.forcedJSONParsing,a=!o&&this.responseType==="json";if(a||n&&U.isString(e)&&e.length)try{return JSON.parse(e)}catch(i){if(a)throw i.name==="SyntaxError"?ed(i,this,"E_JSON_PARSE"):i}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};kt.headers={common:{Accept:"application/json, text/plain, */*"}};U.forEach(["delete","get","head"],function(e){kt.headers[e]={}});U.forEach(["post","put","patch"],function(e){kt.headers[e]=U.merge(td)});Cs.exports=kt});var Ss=x((hm,Ts)=>{"use strict";s();var nd=B(),sd=Dt();Ts.exports=function(e,r,o){var n=this||sd;return nd.forEach(o,function(i){e=i.call(n,e,r)}),e}});var Gr=x((vm,Os)=>{"use strict";s();Os.exports=function(e){return!!(e&&e.__CANCEL__)}});var Rs=x((xm,Fs)=>{"use strict";s();var Es=B(),$r=Ss(),ad=Gr(),id=Dt();function zr(t){t.cancelToken&&t.cancelToken.throwIfRequested()}Fs.exports=function(e){zr(e),e.headers=e.headers||{},e.data=$r.call(e,e.data,e.headers,e.transformRequest),e.headers=Es.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Es.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var r=e.adapter||id.adapter;return r(e).then(function(n){return zr(e),n.data=$r.call(e,n.data,n.headers,e.transformResponse),n},function(n){return ad(n)||(zr(e),n&&n.response&&(n.response.data=$r.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})}});var Wr=x((wm,qs)=>{"use strict";s();var M=B();qs.exports=function(e,r){r=r||{};var o={},n=["url","method","data"],a=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],d=["validateStatus"];function c(m,y){return M.isPlainObject(m)&&M.isPlainObject(y)?M.merge(m,y):M.isPlainObject(y)?M.merge({},y):M.isArray(y)?y.slice():y}function v(m){M.isUndefined(r[m])?M.isUndefined(e[m])||(o[m]=c(void 0,e[m])):o[m]=c(e[m],r[m])}M.forEach(n,function(y){M.isUndefined(r[y])||(o[y]=c(void 0,r[y]))}),M.forEach(a,v),M.forEach(i,function(y){M.isUndefined(r[y])?M.isUndefined(e[y])||(o[y]=c(void 0,e[y])):o[y]=c(void 0,r[y])}),M.forEach(d,function(y){y in r?o[y]=c(e[y],r[y]):y in e&&(o[y]=c(void 0,e[y]))});var f=n.concat(a).concat(i).concat(d),g=Object.keys(e).concat(Object.keys(r)).filter(function(y){return f.indexOf(y)===-1});return M.forEach(g,v),o}});var Ds=x((bm,ks)=>{"use strict";s();var Ns=Mr(),Vr={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Vr[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});var Ps={},ud=Ns.version.split(".");function Is(t,e){for(var r=e?e.split("."):ud,o=t.split("."),n=0;n<3;n++){if(r[n]>o[n])return!0;if(r[n]<o[n])return!1}return!1}Vr.transitional=function(e,r,o){var n=r&&Is(r);function a(i,d){return"[Axios v"+Ns.version+"] Transitional option '"+i+"'"+d+(o?". "+o:"")}return function(i,d,c){if(e===!1)throw new Error(a(d," has been removed in "+r));return n&&!Ps[d]&&(Ps[d]=!0,console.warn(a(d," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,d,c):!0}};function cd(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 a=o[n],i=e[a];if(i){var d=t[a],c=d===void 0||i(d,a,t);if(c!==!0)throw new TypeError("option "+a+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+a)}}ks.exports={isOlderVersion:Is,assertOptions:cd,validators:Vr}});var Bs=x((Tm,js)=>{"use strict";s();var Ms=B(),dd=Ct(),Us=ls(),Ls=Rs(),Ut=Wr(),Hs=Ds(),Ie=Hs.validators;function Ze(t){this.defaults=t,this.interceptors={request:new Us,response:new Us}}Ze.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Ut(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&&Hs.assertOptions(r,{silentJSONParsing:Ie.transitional(Ie.boolean,"1.0.0"),forcedJSONParsing:Ie.transitional(Ie.boolean,"1.0.0"),clarifyTimeoutError:Ie.transitional(Ie.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 a=[];this.interceptors.response.forEach(function(m){a.push(m.fulfilled,m.rejected)});var i;if(!n){var d=[Ls,void 0];for(Array.prototype.unshift.apply(d,o),d=d.concat(a),i=Promise.resolve(e);d.length;)i=i.then(d.shift(),d.shift());return i}for(var c=e;o.length;){var v=o.shift(),f=o.shift();try{c=v(c)}catch(g){f(g);break}}try{i=Ls(c)}catch(g){return Promise.reject(g)}for(;a.length;)i=i.then(a.shift(),a.shift());return i};Ze.prototype.getUri=function(e){return e=Ut(this.defaults,e),dd(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Ms.forEach(["delete","get","head","options"],function(e){Ze.prototype[e]=function(r,o){return this.request(Ut(o||{},{method:e,url:r,data:(o||{}).data}))}});Ms.forEach(["post","put","patch"],function(e){Ze.prototype[e]=function(r,o,n){return this.request(Ut(n||{},{method:e,url:r,data:o}))}});js.exports=Ze});var Yr=x((Om,Js)=>{"use strict";s();function Kr(t){this.message=t}Kr.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Kr.prototype.__CANCEL__=!0;Js.exports=Kr});var $s=x((Fm,Gs)=>{"use strict";s();var ld=Yr();function Lt(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 ld(n),e(r.reason))})}Lt.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Lt.source=function(){var e,r=new Lt(function(n){e=n});return{token:r,cancel:e}};Gs.exports=Lt});var Ws=x((qm,zs)=>{"use strict";s();zs.exports=function(e){return function(o){return e.apply(null,o)}}});var Ks=x((Nm,Vs)=>{"use strict";s();Vs.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Zs=x((km,Xr)=>{"use strict";s();var Ys=B(),pd=hr(),Mt=Bs(),fd=Wr(),md=Dt();function Xs(t){var e=new Mt(t),r=pd(Mt.prototype.request,e);return Ys.extend(r,Mt.prototype,e),Ys.extend(r,e),r}var te=Xs(md);te.Axios=Mt;te.create=function(e){return Xs(fd(te.defaults,e))};te.Cancel=Yr();te.CancelToken=$s();te.isCancel=Gr();te.all=function(e){return Promise.all(e)};te.spread=Ws();te.isAxiosError=Ks();Xr.exports=te;Xr.exports.default=te});var ea=x((Um,Qs)=>{"use strict";s();Qs.exports=Zs()});var ta=x(ue=>{"use strict";s();Object.defineProperty(ue,"__esModule",{value:!0});ue.getUrlHeaders=ue.buildAllHeaders=ue.buildOptions=void 0;var Zr=Be(),hd=xt(),ke=yt(),gd=({requestOptions:t,urlObject:e,headers:r,globalConfig:o={httpMockServer:{enabled:!1}}})=>{let{url:n,params:a}=t;if(a&&typeof a!="object")throw new Error("Search params must be an object");let i=xd(n,o);return Object.assign(Object.assign(Object.assign({},t),i),{headers:r})};ue.buildOptions=gd;var vd=(t,e,r={httpMockServer:{enabled:!1}},o)=>{let{url:n,disableWixHeaders:a,headers:i}=t,d=(0,hd.composeHeaders)({url:n,disableWixHeaders:a,wixHeadersOpts:e}),c=(0,ue.getUrlHeaders)(r,t,o);return Object.assign(Object.assign(Object.assign({},d),wd(i)),c)};ue.buildAllHeaders=vd;var yd=(t,e,r)=>{let{url:o,params:n}=e,{host:a,protocol:i}=r;return t.httpMockServer.enabled?{[Zr.ORIGINAL_URL_HEADER]:_d(o,n),[Zr.ORIGINAL_HOST_HEADER]:(0,ke.isAbsoluteUrl)(o)?(0,ke.extractHost)(o):a,[Zr.ORIGINAL_PROTOCOL_HEADER]:(0,ke.isAbsoluteUrl)(o)?(0,ke.extractProtocol)(o):i}:{}};ue.getUrlHeaders=yd;function xd(t,e){if(e.httpMockServer.enabled){let r=new URL(e.httpMockServer.mockServerUrl);return{url:(0,ke.changeHost)(t,r.host)}}return{}}function _d(t,e){let{pathname:r,searchParams:o}=new URL(t,"http://unused.com");if(e=e||o,e){let n=(0,ke.toSearchQueryParams)(e)||e.toString(),a=n?`?${n}`:"";return`${r}${a}`}return r}function wd(t){return t=t||{},Object.keys(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[o.toLowerCase()]:t[o]}),{})}});var sa=x(Ue=>{"use strict";s();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.createHttpClient=Ue.HttpClient=void 0;var oa=(mt(),Se(ft)),Qe=oa.__importDefault(ea()),Ad=oa.__importDefault(Jr()),Qr=Be(),na=lr(),bd=mr(),ra=xt(),Ht=ta(),ne=yt(),De=class{constructor(e={}){this.opts=e,this.opts=Cd(this.opts),this.client=Qe.default.create(this.opts),this.flags={sanitizerPocEnabled:Ed()}}static isHttpError(e){return!!e?.isWixHttpError}async request(e,r){var o,n;let a=(0,ne.resolveHost)(this.opts),d={protocol:(0,ne.resolveProtocol)(this.opts),host:a},c=typeof e=="function"?e({isSSR:this.opts.isSSR,host:a}):e,v=r?.signedInstance||await((n=(o=this.opts).getAppToken)===null||n===void 0?void 0:n.call(o))||"",f=this.getHeaders(c,v,d),g=(0,Ht.buildOptions)({requestOptions:c,urlObject:d,headers:f,globalConfig:(0,ne.getGlobalConfig)()});this.opts.isSSR&&(g.baseURL=this.opts.baseURL?this.opts.baseURL:`${Qr.SSR_PROTOCOL}://${Qr.SSR_HOST}`);try{let m=await this.client.request(g).catch(y=>this.maybeFallbackRequest(y,c,d,v));return this.transformResponse(m,c)}catch(m){this.handleRequestError(m,g)}}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 Qe.default.CancelToken}get isCancel(){return Qe.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,Ht.buildAllHeaders)(e,n,(0,ne.getGlobalConfig)(),o)}getCustomHeaders(e,r,o){let{url:n}=e,a=r&&(0,ra.isWixDomain)(n)?{authorization:r}:{},i=this.opts.createHeaders(),d=(0,Ht.getUrlHeaders)((0,ne.getGlobalConfig)(),e,o);return Object.assign(Object.assign(Object.assign({},d),i),a)}handleRequestError(e,r){let o=(0,bd.createHttpError)(e);throw(0,ne.silent)(()=>{var n;return(n=r.onError)===null||n===void 0?void 0:n.call(r,o)}),o}maybeFallbackRequest(e,r,o,n){var a,i,d;if((0,ne.isHttpMockServerEnabled)()&&(0,ne.shouldAllowUnmocked)()&&((a=e.response)===null||a===void 0?void 0:a.status)===404&&((d=(i=e.response)===null||i===void 0?void 0:i.data)===null||d===void 0?void 0:d.msg)===Qr.NO_SCENARIO_FOUND){let v=this.getHeaders(r,n,o),f=(0,Ht.buildOptions)({requestOptions:r,urlObject:o,headers:v});return this.client.request(f)}throw e}transformResponse(e,r){let o=(0,ra.requestIdOrEmptyString)(e),n=Sd(e,r,this.flags);return Object.assign(Object.assign({},e),{data:n,requestId:o})}};Ue.HttpClient=De;De.CancelToken=Qe.default.CancelToken;De.isCancel=Qe.default.isCancel;function Cd(t){let e=t.adapter;return e||(e=Ad.default,(0,na.isNode)()&&(e=Td())),Object.assign({adapter:e,isSSR:!1},t)}function Td(){return typeof __webpack_require__=="function"?__non_webpack_require__("axios/lib/adapters/http"):qt()}function Sd(t,e,r){let o=Od(t,r);if(e._pickResponseBody&&(o=(0,ne.extractProp)(t.data,e._pickResponseBody)),e._logs){let n=(0,ne.extractProp)(t.data,e._logs);n?.length&&n.map(a=>console.log(...a))}return o}function Od(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(i){try{return Object.keys(i).forEach(d=>{typeof i[d]=="string"?i[d]=o.sanitizeFor("span",i[d]).innerHTML:typeof i[d]=="object"&&(i[d]=n(i[d]))}),i}catch(d){console.log(d)}},a=performance.now();return console.log(`Time taken: ${a-r} milliseconds.`),n(t.data)}}}catch(r){console.log("[+] Sanitizer API not supported: %o",r)}return t.data}function Ed(){var t;try{return(0,na.isBrowser)()&&new URLSearchParams(((t=window?.location)===null||t===void 0?void 0:t.hash)||"").get("sanitizerPOC")==="true"}catch{return!1}}function Fd(...t){return new De(...t)}Ue.createHttpClient=Fd});var aa=x(Le=>{"use strict";s();Object.defineProperty(Le,"__esModule",{value:!0});Le.HttpClient=Le.createHttpClient=void 0;var Rd=(mt(),Se(ft)),qd=Rd.__importDefault(qt()),Pd=sa(),jt=class extends Pd.HttpClient{constructor(e={}){super(Object.assign({adapter:qd.default},e))}};Le.HttpClient=jt;function Nd(...t){return new jt(...t)}Le.createHttpClient=Nd});var ua=x(ia=>{"use strict";s();Object.defineProperty(ia,"__esModule",{value:!0})});var Bt=x(L=>{"use strict";s();Object.defineProperty(L,"__esModule",{value:!0});L.HttpClient=L.createHttpClient=L.HttpError=L.createHttpError=L.ORIGINAL_URL_HEADER=L.ORIGINAL_PROTOCOL_HEADER=L.ORIGINAL_HOST_HEADER=void 0;var Id=(mt(),Se(ft)),eo=Be();Object.defineProperty(L,"ORIGINAL_HOST_HEADER",{enumerable:!0,get:function(){return eo.ORIGINAL_HOST_HEADER}});Object.defineProperty(L,"ORIGINAL_PROTOCOL_HEADER",{enumerable:!0,get:function(){return eo.ORIGINAL_PROTOCOL_HEADER}});Object.defineProperty(L,"ORIGINAL_URL_HEADER",{enumerable:!0,get:function(){return eo.ORIGINAL_URL_HEADER}});var ca=mr();Object.defineProperty(L,"createHttpError",{enumerable:!0,get:function(){return ca.createHttpError}});Object.defineProperty(L,"HttpError",{enumerable:!0,get:function(){return ca.HttpError}});var da=aa();Object.defineProperty(L,"createHttpClient",{enumerable:!0,get:function(){return da.createHttpClient}});Object.defineProperty(L,"HttpClient",{enumerable:!0,get:function(){return da.HttpClient}});Id.__exportStar(ua(),L)});var xa=x((Th,ya)=>{"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))}ya.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],a=n.message,i=(t[a]||0)+1;t[a]=i,i>=r&&(e=n,r=i)}return e}});var _a=x(Ce=>{"use strict";s();var Vd=xa();Ce.operation=function(t){var e=Ce.timeouts(t);return new Vd(e,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};Ce.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(a,i){return a-i}),o};Ce.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};Ce.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 a=r[n],i=t[a];t[a]=function(c){var v=Ce.operation(e),f=Array.prototype.slice.call(arguments,1),g=f.pop();f.push(function(m){v.retry(m)||(m&&(arguments[0]=v.mainError()),g.apply(this,arguments))}),v.attempt(function(){c.apply(t,f)})}.bind(t,i),t[a].options=e}}});var Aa=x((Fh,wa)=>{"use strict";s();wa.exports=_a()});var To=x((Kv,fi)=>{"use strict";s();var pi=k("fs"),Co;function Kl(){try{return pi.statSync("/.dockerenv"),!0}catch{return!1}}function Yl(){try{return pi.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}fi.exports=()=>(Co===void 0&&(Co=Kl()||Yl()),Co)});var gi=x((Xv,So)=>{"use strict";s();var Xl=k("os"),Zl=k("fs"),mi=To(),hi=()=>{if(process.platform!=="linux")return!1;if(Xl.release().toLowerCase().includes("microsoft"))return!mi();try{return Zl.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!mi():!1}catch{return!1}};process.env.__IS_WSL_TEST__?So.exports=hi:So.exports=hi()});var yi=x((Qv,vi)=>{"use strict";s();vi.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 Ti=x((ty,Ci)=>{"use strict";s();var Ql=k("path"),ep=k("child_process"),{promises:Zt,constants:bi}=k("fs"),Xt=gi(),tp=To(),Eo=yi(),xi=Ql.join(l,"xdg-open"),{platform:je,arch:_i}=process,rp=()=>{try{return Zt.statSync("/run/.containerenv"),!0}catch{return!1}},Oo;function op(){return Oo===void 0&&(Oo=rp()||tp()),Oo}var np=(()=>{let t="/mnt/",e;return async function(){if(e)return e;let r="/etc/wsl.conf",o=!1;try{await Zt.access(r,bi.F_OK),o=!0}catch{}if(!o)return t;let n=await Zt.readFile(r,{encoding:"utf8"}),a=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(n);return a?(e=a.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):t}})(),wi=async(t,e)=>{let r;for(let o of t)try{return await e(o)}catch(n){r=n}throw r},Qt=async t=>{if(t={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...t},Array.isArray(t.app))return wi(t.app,d=>Qt({...t,app:d}));let{name:e,arguments:r=[]}=t.app||{};if(r=[...r],Array.isArray(e))return wi(e,d=>Qt({...t,app:{name:d,arguments:r}}));let o,n=[],a={};if(je==="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(je==="win32"||Xt&&!op()&&!e){let d=await np();o=Xt?`${d}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,n.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Xt||(a.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 d=!l||l==="/",c=!1;try{await Zt.access(xi,bi.X_OK),c=!0}catch{}o=process.versions.electron||je==="android"||d||!c?"xdg-open":xi}r.length>0&&n.push(...r),t.wait||(a.stdio="ignore",a.detached=!0)}t.target&&n.push(t.target),je==="darwin"&&r.length>0&&n.push("--args",...r);let i=ep.spawn(o,n,a);return t.wait?new Promise((d,c)=>{i.once("error",c),i.once("close",v=>{if(!t.allowNonzeroExitCode&&v>0){c(new Error(`Exited with code ${v}`));return}d(i)})}):(i.unref(),i)},Fo=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `target`");return Qt({...e,target:t})},sp=(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 Qt({...e,app:{name:t,arguments:r}})};function Ai(t){if(typeof t=="string"||Array.isArray(t))return t;let{[_i]:e}=t;if(!e)throw new Error(`${_i} is not supported`);return e}function Ro({[je]:t},{wsl:e}){if(e&&Xt)return Ai(e);if(!t)throw new Error(`${je} is not supported`);return Ai(t)}var er={};Eo(er,"chrome",()=>Ro({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"]}}));Eo(er,"firefox",()=>Ro({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Eo(er,"edge",()=>Ro({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Fo.apps=er;Fo.openApp=sp;Ci.exports=Fo});s();import Hi,{createContext as ji,useContext as Bi}from"react";var zo=ji(null),Ji=function({children:t,value:e}){return Hi.createElement(zo.Provider,{value:e},t)},cr=()=>{let t=Bi(zo);if(t===null)throw new Error("useBiLogger() cannot be used without an <BiProvider>");return t};s();s();import Gi,{createContext as $i,useContext as zi}from"react";var Wo=$i(null),Wi=t=>Gi.createElement(Wo.Provider,{...t}),dr=()=>{let t=zi(Wo);if(t===null)throw new Error("useErrorReporter() cannot be used without an <ErrorReporterProvider>");return t};s();s();var pa=G(Bt(),1);s();var la=G(Bt(),1);function et(t){return la.HttpClient.isHttpError(t)}var kd={backoffice:"https://manage.wix.com",editor:"https://editor.wix.com",code:"https://code.wix.com",general:"https://www.wix.com",standalone:void 0};function me(t,e){return(...r)=>e.apply(t,r).catch(o=>{throw et(o)&&!t.isCancel(o)&&!o.response?new P({code:$.NetworkError({cause:o}),cause:o,info:{code:o.code}}):o})}function Jt({getAppToken:t,createHeaders:e,type:r}){let o=(0,pa.createHttpClient)({baseURL:kd[r],...r!=="standalone"?{getAppToken:t}:{},createHeaders:()=>({...e?.(),"X-XSRF-TOKEN":"nocheck",Cookie:"XSRF-TOKEN=nocheck","User-Agent":"wix-cli"})});return{...o,request:me(o,o.request),get:me(o,o.get),delete:me(o,o.delete),head:me(o,o.head),options:me(o,o.options),post:me(o,o.post),put:me(o,o.put),patch:me(o,o.patch)}}s();import{createElement as $d,useMemo as zd}from"react";s();var oo=G(le(),1);import u from"react";s();function Gt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function fa(){return typeof WeakMap<"u"?new WeakMap:Dd()}function Dd(){return{add:Gt,delete:Gt,get:Gt,set:Gt,has:function(t){return!1}}}var Ud=Object.prototype.hasOwnProperty,ro=function(t,e){return Ud.call(t,e)};function to(t,e){for(var r in e)ro(e,r)&&(t[r]=e[r]);return t}var Ld=/^[ \t]*(?:\r\n|\r|\n)/,Md=/(?:\r\n|\r|\n)[ \t]*$/,Hd=/^(?:[\r\n]|$)/,jd=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,Bd=/^[ \t]*[\r\n][ \t\r\n]*$/;function ma(t,e,r){var o=0,n=t[0].match(jd);n&&(o=n[1].length);var a="(\\r\\n|\\r|\\n).{0,"+o+"}",i=new RegExp(a,"g");e&&(t=t.slice(1));var d=r.newline,c=r.trimLeadingNewline,v=r.trimTrailingNewline,f=typeof d=="string",g=t.length,m=t.map(function(y,A){return y=y.replace(i,"$1"),A===0&&c&&(y=y.replace(Ld,"")),A===g-1&&v&&(y=y.replace(Md,"")),f&&(y=y.replace(/\r\n|\n|\r/g,function(w){return d})),y});return m}function Jd(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 Gd(t){return ro(t,"raw")&&ro(t,"length")}function ha(t){var e=fa(),r=fa();function o(a){for(var i=[],d=1;d<arguments.length;d++)i[d-1]=arguments[d];if(Gd(a)){var c=a,v=(i[0]===o||i[0]===re)&&Bd.test(c[0])&&Hd.test(c[1]),f=v?r:e,g=f.get(c);if(g||(g=ma(c,v,t),f.set(c,g)),i.length===0)return g[0];var m=Jd(g,v?i.slice(1):i);return m}else return ha(to(to({},t),a||{}))}var n=to(o,{string:function(a){return ma([a],!1,t)[0]}});return n}var re=ha({trimLeadingNewline:!0,trimTrailingNewline:!0});if(typeof module<"u")try{module.exports=re,Object.defineProperty(re,"__esModule",{value:!0}),re.default=re,re.outdent=re}catch{}s();import be from"react";var h=({message:t,explanation:e,hint:r})=>be.createElement(ee,{flexDirection:"column"},be.createElement(ir,{type:"error"},t),e&&be.createElement(ir,{type:"warning"},e),r&&be.createElement(ee,{paddingTop:1,columnGap:1},be.createElement(jo,null),typeof r=="string"?be.createElement(_,null,r):r)),E=({message:t,explanation:e,hint:r})=>be.createElement(h,{message:t,explanation:e,hint:r??"This is probably a temporary system error and has been logged. Try again shortly."});function va(t){return(0,oo.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(E,{message:"An error occured while logging in: Failed to issue a login device code"}),FailedToGetAuthToken:()=>()=>u.createElement(E,{message:"An error occured while logging in: Failed to issue refresh token"}),FailedToRefreshTokenForSite:()=>()=>u.createElement(E,{message:"An error occured while logging in: Failed to issue refresh token for site"}),FailedToRenewAuthToken:()=>()=>u.createElement(E,{message:"Failed to renew access token."}),FailedToRenewAuthTokenSiteNotFound:({siteId:e})=>()=>u.createElement(h,{message:`Authenticate failed, your configured development site (${e}) could not be accessed`,hint:"Make sure the site exists and you still have access to it"}),FailedToRenewAuthTokenRefreshTokenRevoked:()=>()=>u.createElement(h,{message:"Failed to renew access token: refresh token has been revoked",hint:"Please login again to get a new refresh token"}),FailedToRevokeRefreshToken:({email:e})=>()=>u.createElement(E,{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(E,{message:"Failed to fetch package data."}),LatestVersionOfCreateAppRequired:({currentVersion:e,latestVersion:r,updateCommand:o})=>()=>u.createElement(h,{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(ye,null),u.createElement(_,{bold:!0},o),u.createElement(ye,null),"If the problem persists, try clearing your package manager's cache")}),EmptyDirectoryRequiredAppGeneration:({folder:e})=>()=>u.createElement(h,{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(h,{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(ye,null),"The name ",u.createElement(_,{bold:!0},e)," failed the following validations:",u.createElement(ye,null),r.map((o,n)=>u.createElement(_,{key:n},u.createElement(ye,null),"- ",o))),hint:"Choose a different project name that follows the validations above"}),SiteSelectorTimedout:()=>()=>u.createElement(h,{message:"Waiting for application installation timed out."}),TypeErrorInvalidUrl:()=>()=>u.createElement(h,{message:"Invalid assets URL."}),UnsupportedPackageManager:({packageManagerName:e})=>()=>u.createElement(h,{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(h,{message:`Generating a Wix App inside ${e} workspaces is not supported`}),FailedToGetDeveloperApps:()=>()=>u.createElement(E,{message:"Failed to get the list of your applications"}),FailedToCreateDevCenterApp:()=>()=>u.createElement(E,{message:"Failed to register your application in Wix Dev Center"}),FailedToCreateTunnel:()=>()=>u.createElement(h,{message:"Failed to create tunnel"}),FailedToDeleteTunnel:()=>()=>u.createElement(h,{message:"Failed to delete tunnel"}),SitePermissionDenied:({siteId:e})=>()=>u.createElement(h,{message:`You don't have permissions to site ${e}`}),AppPermissionDenied:({appId:e})=>()=>u.createElement(h,{message:`You don't have permissions to application ${e}`}),FailedToUpdateTelemetryConfig:()=>()=>u.createElement(h,{message:"Failed to change telemetry preferences"}),FailedToInstallPackage:({packageName:e,cause:r})=>{let o=N(r);return()=>u.createElement(h,{message:`Failed to install npm package ${e}. Cause: ${o}`})},FailedToResolveNpmDependencies:()=>()=>u.createElement(E,{message:"Failed to resolve npm dependencies"}),FailedToInstallPackages:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to install npm packages. Cause: ${r}`})},FailedMigrationToAnyNpm:()=>()=>u.createElement(h,{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(h,{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=N(r);return()=>u.createElement(h,{message:`Failed to uninstall npm package ${e}. Cause: ${o}`})},FailedToSyncToRevision:({revision:e})=>()=>u.createElement(h,{message:`Failed to sync the local project to revision ${e}`}),FailedToCreateVersion:()=>()=>u.createElement(h,{message:"Wix CLI failed to create version for your app"}),FailedToReadCache:({path:e})=>()=>u.createElement(h,{message:`Failed to read cache file at ${e}.`}),FailedToWriteCache:({path:e})=>()=>u.createElement(h,{message:`Failed to write cache file at ${e}.`}),UploadApplicationFailed:()=>()=>u.createElement(h,{message:"Failed to upload the application"}),BuiltProjectNeeded:()=>()=>u.createElement(h,{message:"Can not find build output, please execute `wix app build` to build your app before proceeding"}),UnsupportedWixInstallCommand:()=>()=>u.createElement(h,{message:"`wix install` is not supported now. Please use `wix install <package-name>`"}),WixUninstallMissingPackageName:()=>()=>u.createElement(h,{message:"Please specify a package name"}),FailedToReadJson:({filePath:e,cause:r})=>{let o=N(r);return()=>u.createElement(h,{message:`Failed to read ${e}. Cause: ${o}`})},InvalidJsonFile:({filePath:e,cause:r})=>{let o=N(r);return()=>u.createElement(h,{message:`Invalid JSON file located at ${e}. Cause: ${o}`})},FailedToWriteWixLock:()=>()=>u.createElement(h,{message:"Failed to write 'wix.lock'"}),InvalidVeloConfigJson:({configFilename:e,cause:r})=>{let o=N(r);return()=>u.createElement(h,{message:`Invalid ${e}, make sure it's configured correctly. Cause: ${o}`})},DashboardPageConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Dashboard page config not found at ${e}`}),EmbeddedScriptConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Embedded script config not found at ${e}`}),CustomElementConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Custom element config not found at ${e}`}),NoExtensionsFound:()=>()=>u.createElement(h,{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(h,{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(h,{message:`Dashboard plugin config not found at ${e}`}),DashboardMenuPluginConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Dashboard menu plugin config not found at ${e}`}),ServicePluginConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Service plugin config not found at ${e}`}),DashboardModalConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Dashboard modal config not found at ${e}`}),InvalidConfigSchemaError:({configPath:e,zodError:r})=>()=>u.createElement(h,{message:re`
5
+ `+a),t.push(n+"m+"+Ft.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=_c()+e+" "+t[0]}function _c(){return k.inspectOpts.hideDate?"":new Date().toISOString()+" "}function wc(...t){return process.stderr.write(Et.formatWithOptions(k.inspectOpts,...t)+`
6
+ `)}function Ac(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function bc(){return process.env.DEBUG}function Cc(t){t.inspectOpts={};let e=Object.keys(k.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=k.inspectOpts[e[r]]}Ft.exports=Ar()(k);var{formatters:Yn}=Ft.exports;Yn.o=function(t){return this.inspectOpts.colors=this.useColors,Et.inspect(t,this.inspectOpts).split(`
7
+ `).map(e=>e.trim()).join(" ")};Yn.O=function(t){return this.inspectOpts.colors=this.useColors,Et.inspect(t,this.inspectOpts)}});var Zn=x((zf,Tr)=>{"use strict";s();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Tr.exports=zn():Tr.exports=Xn()});var es=x((Vf,Qn)=>{"use strict";s();var ze;Qn.exports=function(){if(!ze){try{ze=Zn()("follow-redirects")}catch{}typeof ze!="function"&&(ze=function(){})}ze.apply(null,arguments)}});var Lr=x((Yf,Ur)=>{"use strict";s();var Ke=D("url"),We=Ke.URL,Tc=D("http"),Sc=D("https"),Rr=D("stream").Writable,qr=D("assert"),ts=es(),Pr=!1;try{qr(new We)}catch(t){Pr=t.code==="ERR_INVALID_URL"}var Oc=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Nr=["abort","aborted","connect","error","socket","timeout"],Ir=Object.create(null);Nr.forEach(function(t){Ir[t]=function(e,r,o){this._redirectable.emit(t,e,r,o)}});var Or=Ye("ERR_INVALID_URL","Invalid URL",TypeError),Er=Ye("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Ec=Ye("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Er),Fc=Ye("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Rc=Ye("ERR_STREAM_WRITE_AFTER_END","write after end"),qc=Rr.prototype.destroy||os;function W(t,e){Rr.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 Er?n:new Er({cause:n}))}},this._performRequest()}W.prototype=Object.create(Rr.prototype);W.prototype.abort=function(){Dr(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};W.prototype.destroy=function(t){return Dr(this._currentRequest,t),qc.call(this,t),this};W.prototype.write=function(t,e,r){if(this._ending)throw new Rc;if(!Ae(t)&&!Ic(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Ve(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new Fc),this.abort())};W.prototype.end=function(t,e,r){if(Ve(t)?(r=t,t=e=null):Ve(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}};W.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};W.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};W.prototype.setTimeout=function(t,e){var r=this;function o(i){i.setTimeout(t),i.removeListener("timeout",i.destroy),i.addListener("timeout",i.destroy)}function n(i){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),a()},t),o(i)}function a(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",a),r.removeListener("error",a),r.removeListener("response",a),r.removeListener("close",a),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",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){W.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(W.prototype,t,{get:function(){return this._currentRequest[t]}})});W.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))}};W.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 Nr)o.on(n,Ir[n]);if(this._currentUrl=/^\//.test(this._options.path)?Ke.format(this._options):this._options.path,this._isRedirect){var a=0,i=this,d=this._requestBodyBuffers;(function c(v){if(o===i._currentRequest)if(v)i.emit("error",v);else if(a<d.length){var f=d[a++];o.finished||o.write(f.data,f.encoding,c)}else i._ended&&o.end()})()}};W.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(Dr(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Ec;var o,n=this._options.beforeRedirect;n&&(o=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var a=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=[],Sr(/^content-/i,this._options.headers));var i=Sr(/^host$/i,this._options.headers),d=kr(this._currentUrl),c=i||d.host,v=/^\w+:/.test(r)?this._currentUrl:Ke.format(Object.assign(d,{host:c})),f=Pc(r,v);if(ts("redirecting to",f.href),this._isRedirect=!0,Fr(f,this._options),(f.protocol!==d.protocol&&f.protocol!=="https:"||f.host!==c&&!Nc(f.host,c))&&Sr(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Ve(n)){var g={headers:t.headers,statusCode:e},m={url:v,method:a,headers:o};n(this._options,g,m),this._sanitizeOptions(this._options)}this._performRequest()};function rs(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(o){var n=o+":",a=r[n]=t[o],i=e[o]=Object.create(a);function d(v,f,g){return kc(v)?v=Fr(v):Ae(v)?v=Fr(kr(v)):(g=f,f=ns(v),v={protocol:n}),Ve(f)&&(g=f,f=null),f=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},v,f),f.nativeProtocols=r,!Ae(f.host)&&!Ae(f.hostname)&&(f.hostname="::1"),qr.equal(f.protocol,n,"protocol mismatch"),ts("options",f),new W(f,g)}function c(v,f,g){var m=i.request(v,f,g);return m.end(),m}Object.defineProperties(i,{request:{value:d,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function os(){}function kr(t){var e;if(Pr)e=new We(t);else if(e=ns(Ke.parse(t)),!Ae(e.protocol))throw new Or({input:t});return e}function Pc(t,e){return Pr?new We(t,e):kr(Ke.resolve(e,t))}function ns(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new Or({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new Or({input:t.href||t});return t}function Fr(t,e){var r=e||{};for(var o of Oc)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 Sr(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 Ye(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 Dr(t,e){for(var r of Nr)t.removeListener(r,Ir[r]);t.on("error",os),t.destroy(e)}function Nc(t,e){qr(Ae(t)&&Ae(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function Ae(t){return typeof t=="string"||t instanceof String}function Ve(t){return typeof t=="function"}function Ic(t){return typeof t=="object"&&"length"in t}function kc(t){return We&&t instanceof We}Ur.exports=rs({http:Tc,https:Sc});Ur.exports.wrap=rs});var Mr=x((Zf,Dc)=>{Dc.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 qt=x((Qf,cs)=>{"use strict";s();var Xe=j(),ss=_r(),Uc=wr(),Lc=Ct(),Mc=D("http"),Hc=D("https"),Bc=Lr().http,jc=Lr().https,as=D("url"),Jc=D("zlib"),Gc=Mr(),Rt=bt(),Hr=At(),is=/https:?/;function us(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(a){a.headers.host=a.host,us(a,e,a.href)}}cs.exports=function(e){return new Promise(function(o,n){var a=function(T){o(T)},i=function(T){n(T)},d=e.data,c=e.headers;if("User-Agent"in c||"user-agent"in c?!c["User-Agent"]&&!c["user-agent"]&&(delete c["User-Agent"],delete c["user-agent"]):c["User-Agent"]="axios/"+Gc.version,d&&!Xe.isStream(d)){if(!Buffer.isBuffer(d))if(Xe.isArrayBuffer(d))d=Buffer.from(new Uint8Array(d));else if(Xe.isString(d))d=Buffer.from(d,"utf-8");else return i(Rt("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=d.length}var v=void 0;if(e.auth){var f=e.auth.username||"",g=e.auth.password||"";v=f+":"+g}var m=Uc(e.baseURL,e.url),y=as.parse(m),A=y.protocol||"http:";if(!v&&y.auth){var w=y.auth.split(":"),b=w[0]||"",q=w[1]||"";v=b+":"+q}v&&delete c.Authorization;var H=is.test(A),I=H?e.httpsAgent:e.httpAgent,E={path:Lc(y.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:I,agents:{http:e.httpAgent,https:e.httpsAgent},auth:v};e.socketPath?E.socketPath=e.socketPath:(E.hostname=y.hostname,E.port=y.port);var Q=e.proxy;if(!Q&&Q!==!1){var Te=A.slice(0,-1)+"_proxy",ut=process.env[Te]||process.env[Te.toUpperCase()];if(ut){var ce=as.parse(ut),ct=process.env.no_proxy||process.env.NO_PROXY,qo=!0;if(ct){var Mi=ct.split(",").map(function(T){return T.trim()});qo=!Mi.some(function(T){return T?T==="*"||T[0]==="."&&y.hostname.substr(y.hostname.length-T.length)===T?!0:y.hostname===T:!1})}if(qo&&(Q={host:ce.hostname,port:ce.port,protocol:ce.protocol},ce.auth)){var Po=ce.auth.split(":");Q.auth={username:Po[0],password:Po[1]}}}}Q&&(E.headers.host=y.hostname+(y.port?":"+y.port:""),us(E,Q,A+"//"+y.hostname+(y.port?":"+y.port:"")+E.path));var dt,No=H&&(Q?is.test(Q.protocol):!0);e.transport?dt=e.transport:e.maxRedirects===0?dt=No?Hc:Mc:(e.maxRedirects&&(E.maxRedirects=e.maxRedirects),dt=No?jc:Bc),e.maxBodyLength>-1&&(E.maxBodyLength=e.maxBodyLength);var B=dt.request(E,function(T){if(!B.aborted){var ve=T,lt=T.req||B;if(T.statusCode!==204&&lt.method!=="HEAD"&&e.decompress!==!1)switch(T.headers["content-encoding"]){case"gzip":case"compress":case"deflate":ve=ve.pipe(Jc.createUnzip()),delete T.headers["content-encoding"];break}var pt={status:T.statusCode,statusText:T.statusMessage,headers:T.headers,config:e,request:lt};if(e.responseType==="stream")pt.data=ve,ss(a,i,pt);else{var Io=[],ko=0;ve.on("data",function(oe){Io.push(oe),ko+=oe.length,e.maxContentLength>-1&&ko>e.maxContentLength&&(ve.destroy(),i(Rt("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,lt)))}),ve.on("error",function(oe){B.aborted||i(Hr(oe,e,null,lt))}),ve.on("end",function(){var oe=Buffer.concat(Io);e.responseType!=="arraybuffer"&&(oe=oe.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(oe=Xe.stripBOM(oe))),pt.data=oe,ss(a,i,pt)})}}});if(B.on("error",function(T){B.aborted&&T.code!=="ERR_FR_TOO_MANY_REDIRECTS"||i(Hr(T,e,null,B))}),e.timeout){var or=parseInt(e.timeout,10);if(isNaN(or)){i(Rt("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",B));return}B.setTimeout(or,function(){B.abort(),i(Rt("timeout of "+or+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",B))})}e.cancelToken&&e.cancelToken.promise.then(function(T){B.aborted||(B.abort(),i(T))}),Xe.isStream(d)?d.on("error",function(T){i(Hr(T,e,null,B))}).pipe(B):B.end(d)})}});var ls=x((tm,ds)=>{"use strict";s();var $c=j();function Pt(){this.handlers=[]}Pt.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};Pt.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Pt.prototype.forEach=function(e){$c.forEach(this.handlers,function(o){o!==null&&e(o)})};ds.exports=Pt});var fs=x((om,ps)=>{"use strict";s();var zc=j();ps.exports=function(e,r){zc.forEach(e,function(n,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(e[r]=n,delete e[a])})}});var hs=x((sm,ms)=>{"use strict";s();var Nt=j();ms.exports=Nt.isStandardBrowserEnv()?function(){return{write:function(r,o,n,a,i,d){var c=[];c.push(r+"="+encodeURIComponent(o)),Nt.isNumber(n)&&c.push("expires="+new Date(n).toGMTString()),Nt.isString(a)&&c.push("path="+a),Nt.isString(i)&&c.push("domain="+i),d===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var vs=x((im,gs)=>{"use strict";s();var Br=j(),Wc=["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"];gs.exports=function(e){var r={},o,n,a;return e&&Br.forEach(e.split(`
8
+ `),function(d){if(a=d.indexOf(":"),o=Br.trim(d.substr(0,a)).toLowerCase(),n=Br.trim(d.substr(a+1)),o){if(r[o]&&Wc.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 _s=x((cm,xs)=>{"use strict";s();var ys=j();xs.exports=ys.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function n(a){var i=a;return e&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{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(i){var d=ys.isString(i)?n(i):i;return d.protocol===o.protocol&&d.host===o.host}}():function(){return function(){return!0}}()});var Jr=x((lm,ws)=>{"use strict";s();var It=j(),Vc=_r(),Kc=hs(),Yc=Ct(),Xc=wr(),Zc=vs(),Qc=_s(),jr=bt();ws.exports=function(e){return new Promise(function(o,n){var a=e.data,i=e.headers,d=e.responseType;It.isFormData(a)&&delete i["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(v+":"+f)}var g=Xc(e.baseURL,e.url);c.open(e.method.toUpperCase(),Yc(g,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function m(){if(c){var A="getAllResponseHeaders"in c?Zc(c.getAllResponseHeaders()):null,w=!d||d==="text"||d==="json"?c.responseText:c.response,b={data:w,status:c.status,statusText:c.statusText,headers:A,config:e,request:c};Vc(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(jr("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){n(jr("Network Error",e,null,c)),c=null},c.ontimeout=function(){var w="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),n(jr(w,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},It.isStandardBrowserEnv()){var y=(e.withCredentials||Qc(g))&&e.xsrfCookieName?Kc.read(e.xsrfCookieName):void 0;y&&(i[e.xsrfHeaderName]=y)}"setRequestHeader"in c&&It.forEach(i,function(w,b){typeof a>"u"&&b.toLowerCase()==="content-type"?delete i[b]:c.setRequestHeader(b,w)}),It.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),d&&d!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(w){c&&(c.abort(),n(w),c=null)}),a||(a=null),c.send(a)})}});var Dt=x((fm,Cs)=>{"use strict";s();var U=j(),As=fs(),ed=At(),td={"Content-Type":"application/x-www-form-urlencoded"};function bs(t,e){!U.isUndefined(t)&&U.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function rd(){var t;return typeof XMLHttpRequest<"u"?t=Jr():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=qt()),t}function od(t,e,r){if(U.isString(t))try{return(e||JSON.parse)(t),U.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(t)}var kt={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:rd(),transformRequest:[function(e,r){return As(r,"Accept"),As(r,"Content-Type"),U.isFormData(e)||U.isArrayBuffer(e)||U.isBuffer(e)||U.isStream(e)||U.isFile(e)||U.isBlob(e)?e:U.isArrayBufferView(e)?e.buffer:U.isURLSearchParams(e)?(bs(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):U.isObject(e)||r&&r["Content-Type"]==="application/json"?(bs(r,"application/json"),od(e)):e}],transformResponse:[function(e){var r=this.transitional,o=r&&r.silentJSONParsing,n=r&&r.forcedJSONParsing,a=!o&&this.responseType==="json";if(a||n&&U.isString(e)&&e.length)try{return JSON.parse(e)}catch(i){if(a)throw i.name==="SyntaxError"?ed(i,this,"E_JSON_PARSE"):i}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};kt.headers={common:{Accept:"application/json, text/plain, */*"}};U.forEach(["delete","get","head"],function(e){kt.headers[e]={}});U.forEach(["post","put","patch"],function(e){kt.headers[e]=U.merge(td)});Cs.exports=kt});var Ss=x((hm,Ts)=>{"use strict";s();var nd=j(),sd=Dt();Ts.exports=function(e,r,o){var n=this||sd;return nd.forEach(o,function(i){e=i.call(n,e,r)}),e}});var Gr=x((vm,Os)=>{"use strict";s();Os.exports=function(e){return!!(e&&e.__CANCEL__)}});var Rs=x((xm,Fs)=>{"use strict";s();var Es=j(),$r=Ss(),ad=Gr(),id=Dt();function zr(t){t.cancelToken&&t.cancelToken.throwIfRequested()}Fs.exports=function(e){zr(e),e.headers=e.headers||{},e.data=$r.call(e,e.data,e.headers,e.transformRequest),e.headers=Es.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Es.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var r=e.adapter||id.adapter;return r(e).then(function(n){return zr(e),n.data=$r.call(e,n.data,n.headers,e.transformResponse),n},function(n){return ad(n)||(zr(e),n&&n.response&&(n.response.data=$r.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})}});var Wr=x((wm,qs)=>{"use strict";s();var M=j();qs.exports=function(e,r){r=r||{};var o={},n=["url","method","data"],a=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],d=["validateStatus"];function c(m,y){return M.isPlainObject(m)&&M.isPlainObject(y)?M.merge(m,y):M.isPlainObject(y)?M.merge({},y):M.isArray(y)?y.slice():y}function v(m){M.isUndefined(r[m])?M.isUndefined(e[m])||(o[m]=c(void 0,e[m])):o[m]=c(e[m],r[m])}M.forEach(n,function(y){M.isUndefined(r[y])||(o[y]=c(void 0,r[y]))}),M.forEach(a,v),M.forEach(i,function(y){M.isUndefined(r[y])?M.isUndefined(e[y])||(o[y]=c(void 0,e[y])):o[y]=c(void 0,r[y])}),M.forEach(d,function(y){y in r?o[y]=c(e[y],r[y]):y in e&&(o[y]=c(void 0,e[y]))});var f=n.concat(a).concat(i).concat(d),g=Object.keys(e).concat(Object.keys(r)).filter(function(y){return f.indexOf(y)===-1});return M.forEach(g,v),o}});var Ds=x((bm,ks)=>{"use strict";s();var Ns=Mr(),Vr={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Vr[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});var Ps={},ud=Ns.version.split(".");function Is(t,e){for(var r=e?e.split("."):ud,o=t.split("."),n=0;n<3;n++){if(r[n]>o[n])return!0;if(r[n]<o[n])return!1}return!1}Vr.transitional=function(e,r,o){var n=r&&Is(r);function a(i,d){return"[Axios v"+Ns.version+"] Transitional option '"+i+"'"+d+(o?". "+o:"")}return function(i,d,c){if(e===!1)throw new Error(a(d," has been removed in "+r));return n&&!Ps[d]&&(Ps[d]=!0,console.warn(a(d," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,d,c):!0}};function cd(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 a=o[n],i=e[a];if(i){var d=t[a],c=d===void 0||i(d,a,t);if(c!==!0)throw new TypeError("option "+a+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+a)}}ks.exports={isOlderVersion:Is,assertOptions:cd,validators:Vr}});var js=x((Tm,Bs)=>{"use strict";s();var Ms=j(),dd=Ct(),Us=ls(),Ls=Rs(),Ut=Wr(),Hs=Ds(),Ie=Hs.validators;function Ze(t){this.defaults=t,this.interceptors={request:new Us,response:new Us}}Ze.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Ut(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&&Hs.assertOptions(r,{silentJSONParsing:Ie.transitional(Ie.boolean,"1.0.0"),forcedJSONParsing:Ie.transitional(Ie.boolean,"1.0.0"),clarifyTimeoutError:Ie.transitional(Ie.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 a=[];this.interceptors.response.forEach(function(m){a.push(m.fulfilled,m.rejected)});var i;if(!n){var d=[Ls,void 0];for(Array.prototype.unshift.apply(d,o),d=d.concat(a),i=Promise.resolve(e);d.length;)i=i.then(d.shift(),d.shift());return i}for(var c=e;o.length;){var v=o.shift(),f=o.shift();try{c=v(c)}catch(g){f(g);break}}try{i=Ls(c)}catch(g){return Promise.reject(g)}for(;a.length;)i=i.then(a.shift(),a.shift());return i};Ze.prototype.getUri=function(e){return e=Ut(this.defaults,e),dd(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Ms.forEach(["delete","get","head","options"],function(e){Ze.prototype[e]=function(r,o){return this.request(Ut(o||{},{method:e,url:r,data:(o||{}).data}))}});Ms.forEach(["post","put","patch"],function(e){Ze.prototype[e]=function(r,o,n){return this.request(Ut(n||{},{method:e,url:r,data:o}))}});Bs.exports=Ze});var Yr=x((Om,Js)=>{"use strict";s();function Kr(t){this.message=t}Kr.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Kr.prototype.__CANCEL__=!0;Js.exports=Kr});var $s=x((Fm,Gs)=>{"use strict";s();var ld=Yr();function Lt(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 ld(n),e(r.reason))})}Lt.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Lt.source=function(){var e,r=new Lt(function(n){e=n});return{token:r,cancel:e}};Gs.exports=Lt});var Ws=x((qm,zs)=>{"use strict";s();zs.exports=function(e){return function(o){return e.apply(null,o)}}});var Ks=x((Nm,Vs)=>{"use strict";s();Vs.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Zs=x((km,Xr)=>{"use strict";s();var Ys=j(),pd=hr(),Mt=js(),fd=Wr(),md=Dt();function Xs(t){var e=new Mt(t),r=pd(Mt.prototype.request,e);return Ys.extend(r,Mt.prototype,e),Ys.extend(r,e),r}var te=Xs(md);te.Axios=Mt;te.create=function(e){return Xs(fd(te.defaults,e))};te.Cancel=Yr();te.CancelToken=$s();te.isCancel=Gr();te.all=function(e){return Promise.all(e)};te.spread=Ws();te.isAxiosError=Ks();Xr.exports=te;Xr.exports.default=te});var ea=x((Um,Qs)=>{"use strict";s();Qs.exports=Zs()});var ta=x(ue=>{"use strict";s();Object.defineProperty(ue,"__esModule",{value:!0});ue.getUrlHeaders=ue.buildAllHeaders=ue.buildOptions=void 0;var Zr=je(),hd=xt(),ke=yt(),gd=({requestOptions:t,urlObject:e,headers:r,globalConfig:o={httpMockServer:{enabled:!1}}})=>{let{url:n,params:a}=t;if(a&&typeof a!="object")throw new Error("Search params must be an object");let i=xd(n,o);return Object.assign(Object.assign(Object.assign({},t),i),{headers:r})};ue.buildOptions=gd;var vd=(t,e,r={httpMockServer:{enabled:!1}},o)=>{let{url:n,disableWixHeaders:a,headers:i}=t,d=(0,hd.composeHeaders)({url:n,disableWixHeaders:a,wixHeadersOpts:e}),c=(0,ue.getUrlHeaders)(r,t,o);return Object.assign(Object.assign(Object.assign({},d),wd(i)),c)};ue.buildAllHeaders=vd;var yd=(t,e,r)=>{let{url:o,params:n}=e,{host:a,protocol:i}=r;return t.httpMockServer.enabled?{[Zr.ORIGINAL_URL_HEADER]:_d(o,n),[Zr.ORIGINAL_HOST_HEADER]:(0,ke.isAbsoluteUrl)(o)?(0,ke.extractHost)(o):a,[Zr.ORIGINAL_PROTOCOL_HEADER]:(0,ke.isAbsoluteUrl)(o)?(0,ke.extractProtocol)(o):i}:{}};ue.getUrlHeaders=yd;function xd(t,e){if(e.httpMockServer.enabled){let r=new URL(e.httpMockServer.mockServerUrl);return{url:(0,ke.changeHost)(t,r.host)}}return{}}function _d(t,e){let{pathname:r,searchParams:o}=new URL(t,"http://unused.com");if(e=e||o,e){let n=(0,ke.toSearchQueryParams)(e)||e.toString(),a=n?`?${n}`:"";return`${r}${a}`}return r}function wd(t){return t=t||{},Object.keys(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[o.toLowerCase()]:t[o]}),{})}});var sa=x(Ue=>{"use strict";s();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.createHttpClient=Ue.HttpClient=void 0;var oa=(mt(),Se(ft)),Qe=oa.__importDefault(ea()),Ad=oa.__importDefault(Jr()),Qr=je(),na=lr(),bd=mr(),ra=xt(),Ht=ta(),ne=yt(),De=class{constructor(e={}){this.opts=e,this.opts=Cd(this.opts),this.client=Qe.default.create(this.opts),this.flags={sanitizerPocEnabled:Ed()}}static isHttpError(e){return!!e?.isWixHttpError}async request(e,r){var o,n;let a=(0,ne.resolveHost)(this.opts),d={protocol:(0,ne.resolveProtocol)(this.opts),host:a},c=typeof e=="function"?e({isSSR:this.opts.isSSR,host:a}):e,v=r?.signedInstance||await((n=(o=this.opts).getAppToken)===null||n===void 0?void 0:n.call(o))||"",f=this.getHeaders(c,v,d),g=(0,Ht.buildOptions)({requestOptions:c,urlObject:d,headers:f,globalConfig:(0,ne.getGlobalConfig)()});this.opts.isSSR&&(g.baseURL=this.opts.baseURL?this.opts.baseURL:`${Qr.SSR_PROTOCOL}://${Qr.SSR_HOST}`);try{let m=await this.client.request(g).catch(y=>this.maybeFallbackRequest(y,c,d,v));return this.transformResponse(m,c)}catch(m){this.handleRequestError(m,g)}}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 Qe.default.CancelToken}get isCancel(){return Qe.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,Ht.buildAllHeaders)(e,n,(0,ne.getGlobalConfig)(),o)}getCustomHeaders(e,r,o){let{url:n}=e,a=r&&(0,ra.isWixDomain)(n)?{authorization:r}:{},i=this.opts.createHeaders(),d=(0,Ht.getUrlHeaders)((0,ne.getGlobalConfig)(),e,o);return Object.assign(Object.assign(Object.assign({},d),i),a)}handleRequestError(e,r){let o=(0,bd.createHttpError)(e);throw(0,ne.silent)(()=>{var n;return(n=r.onError)===null||n===void 0?void 0:n.call(r,o)}),o}maybeFallbackRequest(e,r,o,n){var a,i,d;if((0,ne.isHttpMockServerEnabled)()&&(0,ne.shouldAllowUnmocked)()&&((a=e.response)===null||a===void 0?void 0:a.status)===404&&((d=(i=e.response)===null||i===void 0?void 0:i.data)===null||d===void 0?void 0:d.msg)===Qr.NO_SCENARIO_FOUND){let v=this.getHeaders(r,n,o),f=(0,Ht.buildOptions)({requestOptions:r,urlObject:o,headers:v});return this.client.request(f)}throw e}transformResponse(e,r){let o=(0,ra.requestIdOrEmptyString)(e),n=Sd(e,r,this.flags);return Object.assign(Object.assign({},e),{data:n,requestId:o})}};Ue.HttpClient=De;De.CancelToken=Qe.default.CancelToken;De.isCancel=Qe.default.isCancel;function Cd(t){let e=t.adapter;return e||(e=Ad.default,(0,na.isNode)()&&(e=Td())),Object.assign({adapter:e,isSSR:!1},t)}function Td(){return typeof __webpack_require__=="function"?__non_webpack_require__("axios/lib/adapters/http"):qt()}function Sd(t,e,r){let o=Od(t,r);if(e._pickResponseBody&&(o=(0,ne.extractProp)(t.data,e._pickResponseBody)),e._logs){let n=(0,ne.extractProp)(t.data,e._logs);n?.length&&n.map(a=>console.log(...a))}return o}function Od(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(i){try{return Object.keys(i).forEach(d=>{typeof i[d]=="string"?i[d]=o.sanitizeFor("span",i[d]).innerHTML:typeof i[d]=="object"&&(i[d]=n(i[d]))}),i}catch(d){console.log(d)}},a=performance.now();return console.log(`Time taken: ${a-r} milliseconds.`),n(t.data)}}}catch(r){console.log("[+] Sanitizer API not supported: %o",r)}return t.data}function Ed(){var t;try{return(0,na.isBrowser)()&&new URLSearchParams(((t=window?.location)===null||t===void 0?void 0:t.hash)||"").get("sanitizerPOC")==="true"}catch{return!1}}function Fd(...t){return new De(...t)}Ue.createHttpClient=Fd});var aa=x(Le=>{"use strict";s();Object.defineProperty(Le,"__esModule",{value:!0});Le.HttpClient=Le.createHttpClient=void 0;var Rd=(mt(),Se(ft)),qd=Rd.__importDefault(qt()),Pd=sa(),Bt=class extends Pd.HttpClient{constructor(e={}){super(Object.assign({adapter:qd.default},e))}};Le.HttpClient=Bt;function Nd(...t){return new Bt(...t)}Le.createHttpClient=Nd});var ua=x(ia=>{"use strict";s();Object.defineProperty(ia,"__esModule",{value:!0})});var jt=x(L=>{"use strict";s();Object.defineProperty(L,"__esModule",{value:!0});L.HttpClient=L.createHttpClient=L.HttpError=L.createHttpError=L.ORIGINAL_URL_HEADER=L.ORIGINAL_PROTOCOL_HEADER=L.ORIGINAL_HOST_HEADER=void 0;var Id=(mt(),Se(ft)),eo=je();Object.defineProperty(L,"ORIGINAL_HOST_HEADER",{enumerable:!0,get:function(){return eo.ORIGINAL_HOST_HEADER}});Object.defineProperty(L,"ORIGINAL_PROTOCOL_HEADER",{enumerable:!0,get:function(){return eo.ORIGINAL_PROTOCOL_HEADER}});Object.defineProperty(L,"ORIGINAL_URL_HEADER",{enumerable:!0,get:function(){return eo.ORIGINAL_URL_HEADER}});var ca=mr();Object.defineProperty(L,"createHttpError",{enumerable:!0,get:function(){return ca.createHttpError}});Object.defineProperty(L,"HttpError",{enumerable:!0,get:function(){return ca.HttpError}});var da=aa();Object.defineProperty(L,"createHttpClient",{enumerable:!0,get:function(){return da.createHttpClient}});Object.defineProperty(L,"HttpClient",{enumerable:!0,get:function(){return da.HttpClient}});Id.__exportStar(ua(),L)});var xa=x((Th,ya)=>{"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))}ya.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],a=n.message,i=(t[a]||0)+1;t[a]=i,i>=r&&(e=n,r=i)}return e}});var _a=x(Ce=>{"use strict";s();var Vd=xa();Ce.operation=function(t){var e=Ce.timeouts(t);return new Vd(e,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};Ce.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(a,i){return a-i}),o};Ce.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};Ce.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 a=r[n],i=t[a];t[a]=function(c){var v=Ce.operation(e),f=Array.prototype.slice.call(arguments,1),g=f.pop();f.push(function(m){v.retry(m)||(m&&(arguments[0]=v.mainError()),g.apply(this,arguments))}),v.attempt(function(){c.apply(t,f)})}.bind(t,i),t[a].options=e}}});var Aa=x((Fh,wa)=>{"use strict";s();wa.exports=_a()});var To=x((zv,fi)=>{"use strict";s();var pi=D("fs"),Co;function Kl(){try{return pi.statSync("/.dockerenv"),!0}catch{return!1}}function Yl(){try{return pi.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}fi.exports=()=>(Co===void 0&&(Co=Kl()||Yl()),Co)});var gi=x((Vv,So)=>{"use strict";s();var Xl=D("os"),Zl=D("fs"),mi=To(),hi=()=>{if(process.platform!=="linux")return!1;if(Xl.release().toLowerCase().includes("microsoft"))return!mi();try{return Zl.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!mi():!1}catch{return!1}};process.env.__IS_WSL_TEST__?So.exports=hi:So.exports=hi()});var yi=x((Yv,vi)=>{"use strict";s();vi.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 Ti=x((Zv,Ci)=>{"use strict";s();var Ql=D("path"),ep=D("child_process"),{promises:Zt,constants:bi}=D("fs"),Xt=gi(),tp=To(),Eo=yi(),xi=Ql.join(l,"xdg-open"),{platform:Be,arch:_i}=process,rp=()=>{try{return Zt.statSync("/run/.containerenv"),!0}catch{return!1}},Oo;function op(){return Oo===void 0&&(Oo=rp()||tp()),Oo}var np=(()=>{let t="/mnt/",e;return async function(){if(e)return e;let r="/etc/wsl.conf",o=!1;try{await Zt.access(r,bi.F_OK),o=!0}catch{}if(!o)return t;let n=await Zt.readFile(r,{encoding:"utf8"}),a=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(n);return a?(e=a.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):t}})(),wi=async(t,e)=>{let r;for(let o of t)try{return await e(o)}catch(n){r=n}throw r},Qt=async t=>{if(t={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...t},Array.isArray(t.app))return wi(t.app,d=>Qt({...t,app:d}));let{name:e,arguments:r=[]}=t.app||{};if(r=[...r],Array.isArray(e))return wi(e,d=>Qt({...t,app:{name:d,arguments:r}}));let o,n=[],a={};if(Be==="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(Be==="win32"||Xt&&!op()&&!e){let d=await np();o=Xt?`${d}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,n.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Xt||(a.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 d=!l||l==="/",c=!1;try{await Zt.access(xi,bi.X_OK),c=!0}catch{}o=process.versions.electron||Be==="android"||d||!c?"xdg-open":xi}r.length>0&&n.push(...r),t.wait||(a.stdio="ignore",a.detached=!0)}t.target&&n.push(t.target),Be==="darwin"&&r.length>0&&n.push("--args",...r);let i=ep.spawn(o,n,a);return t.wait?new Promise((d,c)=>{i.once("error",c),i.once("close",v=>{if(!t.allowNonzeroExitCode&&v>0){c(new Error(`Exited with code ${v}`));return}d(i)})}):(i.unref(),i)},Fo=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `target`");return Qt({...e,target:t})},sp=(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 Qt({...e,app:{name:t,arguments:r}})};function Ai(t){if(typeof t=="string"||Array.isArray(t))return t;let{[_i]:e}=t;if(!e)throw new Error(`${_i} is not supported`);return e}function Ro({[Be]:t},{wsl:e}){if(e&&Xt)return Ai(e);if(!t)throw new Error(`${Be} is not supported`);return Ai(t)}var er={};Eo(er,"chrome",()=>Ro({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"]}}));Eo(er,"firefox",()=>Ro({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Eo(er,"edge",()=>Ro({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Fo.apps=er;Fo.openApp=sp;Ci.exports=Fo});s();import Hi,{createContext as Bi,useContext as ji}from"react";var zo=Bi(null),Ji=function({children:t,value:e}){return Hi.createElement(zo.Provider,{value:e},t)},cr=()=>{let t=ji(zo);if(t===null)throw new Error("useBiLogger() cannot be used without an <BiProvider>");return t};s();s();import Gi,{createContext as $i,useContext as zi}from"react";var Wo=$i(null),Wi=t=>Gi.createElement(Wo.Provider,{...t}),dr=()=>{let t=zi(Wo);if(t===null)throw new Error("useErrorReporter() cannot be used without an <ErrorReporterProvider>");return t};s();s();var pa=G(jt(),1);s();var la=G(jt(),1);function et(t){return la.HttpClient.isHttpError(t)}var kd={backoffice:"https://manage.wix.com",editor:"https://editor.wix.com",code:"https://code.wix.com",general:"https://www.wix.com",standalone:void 0};function me(t,e){return(...r)=>e.apply(t,r).catch(o=>{throw et(o)&&!t.isCancel(o)&&!o.response?new P({code:$.NetworkError({cause:o}),cause:o,info:{code:o.code}}):o})}function Jt({getAppToken:t,createHeaders:e,type:r}){let o=(0,pa.createHttpClient)({baseURL:kd[r],...r!=="standalone"?{getAppToken:t}:{},createHeaders:()=>({...e?.(),"X-XSRF-TOKEN":"nocheck",Cookie:"XSRF-TOKEN=nocheck","User-Agent":"wix-cli"})});return{...o,request:me(o,o.request),get:me(o,o.get),delete:me(o,o.delete),head:me(o,o.head),options:me(o,o.options),post:me(o,o.post),put:me(o,o.put),patch:me(o,o.patch)}}s();import{createElement as $d,useMemo as zd}from"react";s();var oo=G(le(),1);import u from"react";s();function Gt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function fa(){return typeof WeakMap<"u"?new WeakMap:Dd()}function Dd(){return{add:Gt,delete:Gt,get:Gt,set:Gt,has:function(t){return!1}}}var Ud=Object.prototype.hasOwnProperty,ro=function(t,e){return Ud.call(t,e)};function to(t,e){for(var r in e)ro(e,r)&&(t[r]=e[r]);return t}var Ld=/^[ \t]*(?:\r\n|\r|\n)/,Md=/(?:\r\n|\r|\n)[ \t]*$/,Hd=/^(?:[\r\n]|$)/,Bd=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,jd=/^[ \t]*[\r\n][ \t\r\n]*$/;function ma(t,e,r){var o=0,n=t[0].match(Bd);n&&(o=n[1].length);var a="(\\r\\n|\\r|\\n).{0,"+o+"}",i=new RegExp(a,"g");e&&(t=t.slice(1));var d=r.newline,c=r.trimLeadingNewline,v=r.trimTrailingNewline,f=typeof d=="string",g=t.length,m=t.map(function(y,A){return y=y.replace(i,"$1"),A===0&&c&&(y=y.replace(Ld,"")),A===g-1&&v&&(y=y.replace(Md,"")),f&&(y=y.replace(/\r\n|\n|\r/g,function(w){return d})),y});return m}function Jd(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 Gd(t){return ro(t,"raw")&&ro(t,"length")}function ha(t){var e=fa(),r=fa();function o(a){for(var i=[],d=1;d<arguments.length;d++)i[d-1]=arguments[d];if(Gd(a)){var c=a,v=(i[0]===o||i[0]===re)&&jd.test(c[0])&&Hd.test(c[1]),f=v?r:e,g=f.get(c);if(g||(g=ma(c,v,t),f.set(c,g)),i.length===0)return g[0];var m=Jd(g,v?i.slice(1):i);return m}else return ha(to(to({},t),a||{}))}var n=to(o,{string:function(a){return ma([a],!1,t)[0]}});return n}var re=ha({trimLeadingNewline:!0,trimTrailingNewline:!0});if(typeof module<"u")try{module.exports=re,Object.defineProperty(re,"__esModule",{value:!0}),re.default=re,re.outdent=re}catch{}s();import be from"react";var h=({message:t,explanation:e,hint:r})=>be.createElement(ee,{flexDirection:"column"},be.createElement(ir,{type:"error"},t),e&&be.createElement(ir,{type:"warning"},e),r&&be.createElement(ee,{paddingTop:1,columnGap:1},be.createElement(Bo,null),typeof r=="string"?be.createElement(_,null,r):r)),O=({message:t,explanation:e,hint:r})=>be.createElement(h,{message:t,explanation:e,hint:r??"This is probably a temporary system error and has been logged. Try again shortly."});function va(t){return(0,oo.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(O,{message:"An error occured while logging in: Failed to issue a login device code"}),FailedToGetAuthToken:()=>()=>u.createElement(O,{message:"An error occured while logging in: Failed to issue refresh token"}),FailedToRefreshTokenForSite:()=>()=>u.createElement(O,{message:"An error occured while logging in: Failed to issue refresh token for site"}),FailedToRenewAuthToken:()=>()=>u.createElement(O,{message:"Failed to renew access token."}),FailedToRenewAuthTokenSiteNotFound:({siteId:e})=>()=>u.createElement(h,{message:`Authenticate failed, your configured development site (${e}) could not be accessed`,hint:"Make sure the site exists and you still have access to it"}),FailedToRenewAuthTokenRefreshTokenRevoked:()=>()=>u.createElement(h,{message:"Failed to renew access token: refresh token has been revoked",hint:"Please login again to get a new refresh token"}),FailedToRevokeRefreshToken:({email:e})=>()=>u.createElement(O,{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(O,{message:"Failed to fetch package data."}),LatestVersionOfCreateAppRequired:({currentVersion:e,latestVersion:r,updateCommand:o})=>()=>u.createElement(h,{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(ye,null),u.createElement(_,{bold:!0},o),u.createElement(ye,null),"If the problem persists, try clearing your package manager's cache")}),EmptyDirectoryRequiredAppGeneration:({folder:e})=>()=>u.createElement(h,{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(h,{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(ye,null),"The name ",u.createElement(_,{bold:!0},e)," failed the following validations:",u.createElement(ye,null),r.map((o,n)=>u.createElement(_,{key:n},u.createElement(ye,null),"- ",o))),hint:"Choose a different project name that follows the validations above"}),SiteSelectorTimedout:()=>()=>u.createElement(h,{message:"Waiting for application installation timed out."}),TypeErrorInvalidUrl:()=>()=>u.createElement(h,{message:"Invalid assets URL."}),UnsupportedPackageManager:({packageManagerName:e})=>()=>u.createElement(h,{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(h,{message:`Generating a Wix App inside ${e} workspaces is not supported`}),FailedToGetDeveloperApps:()=>()=>u.createElement(O,{message:"Failed to get the list of your applications"}),FailedToCreateDevCenterApp:()=>()=>u.createElement(O,{message:"Failed to register your application in Wix Dev Center"}),FailedToCreateTunnel:()=>()=>u.createElement(h,{message:"Failed to create tunnel"}),FailedToDeleteTunnel:()=>()=>u.createElement(h,{message:"Failed to delete tunnel"}),SitePermissionDenied:({siteId:e})=>()=>u.createElement(h,{message:`You don't have permissions to site ${e}`}),AppPermissionDenied:({appId:e})=>()=>u.createElement(h,{message:`You don't have permissions to application ${e}`}),FailedToUpdateTelemetryConfig:()=>()=>u.createElement(h,{message:"Failed to change telemetry preferences"}),FailedToInstallPackage:({packageName:e,cause:r})=>{let o=N(r);return()=>u.createElement(h,{message:`Failed to install npm package ${e}. Cause: ${o}`})},FailedToResolveNpmDependencies:()=>()=>u.createElement(O,{message:"Failed to resolve npm dependencies"}),FailedToInstallPackages:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to install npm packages. Cause: ${r}`})},FailedMigrationToAnyNpm:()=>()=>u.createElement(h,{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(h,{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=N(r);return()=>u.createElement(h,{message:`Failed to uninstall npm package ${e}. Cause: ${o}`})},FailedToSyncToRevision:({revision:e})=>()=>u.createElement(h,{message:`Failed to sync the local project to revision ${e}`}),FailedToCreateVersion:()=>()=>u.createElement(h,{message:"Wix CLI failed to create version for your app"}),FailedToReadCache:({path:e})=>()=>u.createElement(h,{message:`Failed to read cache file at ${e}.`}),FailedToWriteCache:({path:e})=>()=>u.createElement(h,{message:`Failed to write cache file at ${e}.`}),UploadApplicationFailed:()=>()=>u.createElement(h,{message:"Failed to upload the application"}),BuiltProjectNeeded:()=>()=>u.createElement(h,{message:"Can not find build output, please execute `wix app build` to build your app before proceeding"}),WixUninstallMissingPackageName:()=>()=>u.createElement(h,{message:"Please specify a package name"}),FailedToReadJson:({filePath:e,cause:r})=>{let o=N(r);return()=>u.createElement(h,{message:`Failed to read ${e}. Cause: ${o}`})},InvalidJsonFile:({filePath:e,cause:r})=>{let o=N(r);return()=>u.createElement(h,{message:`Invalid JSON file located at ${e}. Cause: ${o}`})},FailedToWriteWixLock:()=>()=>u.createElement(h,{message:"Failed to write 'wix.lock'"}),InvalidVeloConfigJson:({configFilename:e,cause:r})=>{let o=N(r);return()=>u.createElement(h,{message:`Invalid ${e}, make sure it's configured correctly. Cause: ${o}`})},DashboardPageConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Dashboard page config not found at ${e}`}),EmbeddedScriptConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Embedded script config not found at ${e}`}),CustomElementConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Custom element config not found at ${e}`}),NoExtensionsFound:()=>()=>u.createElement(h,{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(h,{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(h,{message:`Dashboard plugin config not found at ${e}`}),DashboardMenuPluginConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Dashboard menu plugin config not found at ${e}`}),ServicePluginConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Service plugin config not found at ${e}`}),DashboardModalConfigNotFound:({configPath:e})=>()=>u.createElement(h,{message:`Dashboard modal config not found at ${e}`}),InvalidConfigSchemaError:({configPath:e,zodError:r})=>()=>u.createElement(h,{message:re`
9
9
  Invalid configuration found at \`${e}\`:
10
10
  The following errors were found:
11
11
  ${r.errors.map(ga).join(`
@@ -17,11 +17,11 @@ import{B as Fe,E as $o,a as ft,b as mt,d as ee,e as ye,f as Ho,g as _,l as jo,r
17
17
  Failed to update files.
18
18
  Failed to sync changes from local files to the Dev Editor
19
19
  Still watching local files and will continue to sync changes...
20
- `}),FailedToWatchFiles:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to watch files. Cause: ${r}`})},FailedToCreateGridApp:({error:e})=>()=>u.createElement(h,{message:"Failed to create an isolated environment.",explanation:e}),DeviceCodeTimedOut:()=>()=>u.createElement(h,{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 a=i=>(0,oo.match)(i,{page:()=>"page",plugin:()=>"plugin","menu-plugin":()=>"menu plugin","sidebar-category":()=>"sidebar category","embedded-script":()=>"embedded script","custom-element":()=>"custom element",modal:()=>"modal"});return u.createElement(ee,{flexDirection:"column"},u.createElement(_,null,u.createElement(_,{bold:!0},"Duplicate ID: "),n.id),u.createElement(_,{bold:!0},"Extensions:"),n.components.map(({name:i,path:d,type:c})=>u.createElement(_,{key:d},"[",a(c),"] ",i," (",d,")")),u.createElement(_,null,u.createElement(_,{bold:!0},"Possible GUID: "),n.suggestedId))},o=u.createElement(ee,{flexDirection:"column",rowGap:1},u.createElement(_,null,"You can use the provided suggested GUIDs as the ID of the newly created extension."),e.map(n=>u.createElement(r,{issue:n,key:n.id})));return()=>u.createElement(h,{message:"Found multiple extensions with the same id, this might happen if you copy paste folders.",hint:o})},FailedToGetPackageDetails:()=>()=>u.createElement(h,{message:"Failed to get package info."}),InvalidResponseData:()=>()=>u.createElement(E,{message:"Got unexpected response from server."}),InvalidCreateAppResponse:()=>()=>u.createElement(h,{message:"`createApp` returned an invalid response."}),InvalidDeployAppResponse:()=>()=>u.createElement(h,{message:"Got unexpected response from server. Make sure you are running a supported version of the Velo CLI."}),InvalidGetDeploymentResponse:()=>()=>u.createElement(h,{message:"Got unexpected response from server. Please try again later.."}),FailedToGetPagesDiff:()=>()=>u.createElement(h,{message:"Failed to request pages diff."}),InvalidViteBuildOutput:()=>()=>u.createElement(h,{message:"Invalid vite build output"}),ViteModuleBundleNotFound:()=>()=>u.createElement(h,{message:"Could not find module bundle in vite build output"}),ViteFileNotFoundInOutput:({fileName:e})=>()=>u.createElement(h,{message:`Could not find ${e} in vite build output`}),FailedToCreatePresignedUrl:()=>()=>u.createElement(h,{message:"Failed to create a presigned upload url"}),FailedToUploadApplicationFiles:()=>()=>u.createElement(h,{message:"Failed to upload the application files"}),FailedToVerifyDeployment:()=>()=>u.createElement(h,{message:"Deployment was not finished within the desired timeframe, please try again later."}),FailedToGetUserInfo:()=>()=>u.createElement(h,{message:"Failed to get user information."}),FailedToGetMyAccount:()=>()=>u.createElement(E,{message:"Failed to get account information."}),FailedToCreateDevelopmentSite:()=>()=>u.createElement(h,{message:"Failed to create a Development Site"}),FailedToGetDevelopmentSites:()=>()=>u.createElement(h,{message:"Failed to request development sites."}),FailedToGetDevelopmentSitesLimit:()=>()=>u.createElement(h,{message:"Failed to request development sites limit."}),FailedToGetRequiredApps:()=>()=>u.createElement(h,{message:"Failed to get app required apps."}),FailedToGetMarketListing:()=>()=>u.createElement(h,{message:"Failed to get market listing."}),FailedToAddRequiredApp:()=>()=>u.createElement(h,{message:"Failed to add required app."}),FailedToQuerySites:()=>()=>u.createElement(h,{message:"Failed to request sites list."}),FailedToGetSite:()=>()=>u.createElement(h,{message:"Failed to get information about your configured Development Site"}),FailedToDeploySite:()=>()=>u.createElement(h,{message:"Failed to deploy site."}),FailedToPublishDeployment:()=>()=>u.createElement(E,{message:"Failed to publish site."}),FailedToSaveDevelopmentSite:({path:e})=>()=>u.createElement(h,{message:"Failed to save the current development site.",hint:`Make sure the \`${e}\` file has proper permissions and is accessible`}),FailedToBuildApp:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:u.createElement(u.Fragment,null,"Failed to build the application.",u.createElement(ye,null),r),hint:"Please check the build output for more information"})},FailedToCheckIfAppInstalled:()=>()=>u.createElement(h,{message:"Failed to fetch site installation details"}),FailedToInitializeGitRepo:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to initialize git repo. Cause: ${r}`})},FailedToInstallDependencies:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to install dependencies. Cause: ${r}`})},FailedToCommitChanges:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to commit changes. Cause: ${r}`})},FailedToDeleteAuthData:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to delete auth data: ${r}`})},FailedToDeleteLegacyAuthData:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to delete legacy auth data: ${r}`})},FailedToSaveAuthData:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to save auth data: ${r}`})},FailedToSaveApiKeyAuthData:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to save api key auth data: ${r}`})},FailedToWriteJson:({filePath:e,cause:r})=>{let o=N(r);return()=>u.createElement(h,{message:`Failed to write JSON at path: ${e}. Cause: ${o}`})},TemplatePathNotFound:({templatePath:e})=>()=>u.createElement(h,{message:`Template path not found: ${e}`,hint:"Make sure the template path exists in the remote repository"}),FailedToCloneRepo:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{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(h,{message:`Invalid Git URL: ${e}`,hint:"Make sure the Git URL is in the correct format"}),AuthenticationRequired:()=>()=>u.createElement(h,{message:"You have to already be logged in to run this command."}),SiteConfiguredRequired:()=>()=>u.createElement(h,{message:"You must configure the development site before running this command, or provide a site-id in the command options."}),FailedAddingPackageToWorkspace:()=>()=>u.createElement(h,{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(h,{message:"Failed to generate a Selfsigned certificate for development."}),NonInteractiveTerminal:()=>()=>u.createElement(h,{message:"This command is not supported in non-interactive terminals. Please run the command in an interactive terminal (TTY)."}),FailedToResolveViteOrigin:()=>()=>u.createElement(h,{message:"Failed to resolve the base url for CSS asset urls"}),FailedToCreateAppRelease:()=>()=>u.createElement(E,{message:"Failed to create an app configuration in dev center."}),FailedToUpdateAppRelease:()=>()=>u.createElement(E,{message:"Failed to update an app configuration in dev center."}),FailedToCheckDeprecatedStatus:()=>()=>u.createElement(E,{message:"Failed to check cli version deprecated status."}),FailedToGetResolveNpmDependenciesResult:()=>()=>u.createElement(E,{message:"Failed to resolve Wix's lockfile."}),CliAppVersionMismatch:({cliVersion:e,cliAppVersion:r})=>()=>u.createElement(h,{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(E,{message:"Failed to get validation status for app version from dev center"}),InvalidDashboardPageRoute:({route:e,errorMessage:r})=>()=>u.createElement(h,{message:`Invalid dashboard page route: ${e}`,hint:r}),InvalidEmbeddedScriptFolder:({path:e,errorMessage:r})=>()=>u.createElement(h,{message:`Invalid embedded script folder: ${e}`,hint:r}),InvalidEmbeddedScriptTemplate:({templateFilename:e,errorMessage:r})=>()=>u.createElement(h,{message:`Invalid embedded script template in ${e}`,hint:r}),InvalidCustomElementTagName:({tagName:e,errorMessage:r})=>()=>u.createElement(h,{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(E,{message:"Failed to create site override configuration"}),FailedToGetPipelineErrorInfo:()=>()=>u.createElement(E,{message:"Failed to get error details"}),FailedToGetDeploymentStatus:()=>()=>u.createElement(E,{message:"Failed to get deployment status"}),NetworkError:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Network error occurred. Cause: ${r}`,hint:"Make sure you have an active internet connection and try again shortly."})}})}function N(t){return t instanceof Error?t.message:JSON.stringify(t)}function ga(t){let e=t.path.join(".");return e?`- \`${e}\`: ${t.message}`:`- ${t.message}`}var no=({error:t,systemErrorOverride:e})=>zd(()=>{let r=Mo(t);return Lo(r)&&e?e:$d(va(r.cliCode))},[t,e]);s();import Li from"react";s();import{createContext as Wd}from"react";var $t=Wd(null);s();s();var oi=G(le(),1);s();s();var Ca=G(Aa(),1),Kd=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed"]),so=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}},Yd=(t,e,r)=>{let o=r.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=o,t},Xd=t=>Kd.has(t),ba=t=>globalThis.DOMException===void 0?new Error(t):new DOMException(t);async function tt(t,e){return new Promise((r,o)=>{e={onFailedAttempt(){},retries:10,...e};let n=Ca.default.operation(e);n.attempt(async a=>{try{r(await t(a))}catch(i){if(!(i instanceof Error)){o(new TypeError(`Non-error was thrown: "${i}". You should only throw errors.`));return}if(i instanceof so)n.stop(),o(i.originalError);else if(i instanceof TypeError&&!Xd(i.message))n.stop(),o(i);else{Yd(i,a,e);try{await e.onFailedAttempt(i)}catch(d){o(d);return}n.retry(i)||o(n.mainError())}}}),e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",()=>{n.stop();let a=e.signal.reason===void 0?ba("The operation was aborted."):e.signal.reason;o(a instanceof Error?a:ba(a))},{once:!0})})}s();s();s();s();function Ta(t=""){let[e,r]=Zd(t);return r?{schemaName:r,schemaType:e}:{schemaName:e}}var Zd=t=>t.split("#");s();s();function Sa(t,e,r,o){let n=t;for(let a of e.split(".")){if(!n)return r;n=n[a]}return`${n}${o}`}var Qd="_",el=["wix.com","editorx.com"],tl=["42.wixprod.net","uw2-edt-1.wixprod.net"],rl="dev.wix-code.com",ol=/{(.*)}/,nl=new RegExp(`\\.(${el.join("|")})$`),sl=new RegExp(`\\.(${tl.join("|")})$`),al=new RegExp(`.*\\.${rl}$`);function zt(t){let e=cl(t.host),r=ll(e,t.domainToMappings),o=il(t.protoPath,t.data||{});return pl(o,r)}function il(t,e){return t.split("/").map(r=>ul(r,e)).join("/")}function ul(t,e){let r=t.match(ol)||[],o=r[1];if(o){let n=t.replace(r[0],"");return Sa(e,o,t,n)}return t}function cl(t){return dl(t).replace(nl,"._base_domain_").replace(sl,"._api_base_domain_").replace(al,"*.dev.wix-code.com")}function dl(t){return t.replace("create.editorx.com","editor.editorx.com")}function ll(t,e){let r=e[t]||e[Qd];return!r&&fl(t)?e[ml]:r}function pl(t,e){let r=e?.find(o=>t.startsWith(o.destPath));return r?r.srcPath+t.slice(r.destPath.length):t}function fl(t){return!!t.match(/\._base_domain_$/)}var ml="www._base_domain_";s();s();var ao=typeof Buffer=="function",Jh=typeof TextDecoder=="function"?new TextDecoder:void 0,Oa=typeof TextEncoder=="function"?new TextEncoder:void 0,hl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",rt=Array.prototype.slice.call(hl),Gh=(t=>{let e={};return t.forEach((r,o)=>e[r]=o),e})(rt);var se=String.fromCharCode.bind(String),$h=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),gl=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_");var vl=t=>{let e,r,o,n,a="",i=t.length%3;for(let d=0;d<t.length;){if((r=t.charCodeAt(d++))>255||(o=t.charCodeAt(d++))>255||(n=t.charCodeAt(d++))>255)throw new TypeError("invalid character found");e=r<<16|o<<8|n,a+=rt[e>>18&63]+rt[e>>12&63]+rt[e>>6&63]+rt[e&63]}return i?a.slice(0,i-3)+"===".substring(i):a},Fa=typeof btoa=="function"?t=>btoa(t):ao?t=>Buffer.from(t,"binary").toString("base64"):vl,yl=ao?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let o=0,n=t.length;o<n;o+=4096)r.push(se.apply(null,t.subarray(o,o+4096)));return Fa(r.join(""))};var xl=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?se(192|e>>>6)+se(128|e&63):se(224|e>>>12&15)+se(128|e>>>6&63)+se(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return se(240|e>>>18&7)+se(128|e>>>12&63)+se(128|e>>>6&63)+se(128|e&63)}},_l=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,wl=t=>t.replace(_l,xl),Ea=ao?t=>Buffer.from(t,"utf8").toString("base64"):Oa?t=>yl(Oa.encode(t)):t=>Fa(wl(t)),Ra=(t,e=!1)=>e?gl(Ea(t)):Ea(t);function qa(t,e=""){let r={};return Object.entries(t).forEach(([o,n])=>{let a=n!==null&&typeof n=="object"&&!Array.isArray(n),i=Al(e,o);if(a){let d=qa(n,i);Object.assign(r,d)}else r[i]=n}),r}function Al(t,e){return`${t}${t?".":""}${e}`}function Wt(t,e){let r=qa(t),o=Object.entries(r).reduce((n,[a,i])=>((Array.isArray(i)?i:[i]).forEach(c=>{c!=null&&n.append(a,c)}),n),new URLSearchParams);return e&&o.append(".r",Ra(JSON.stringify(t),!0)),o}s();s();var R;(function(t){t[t.TO_JSON=0]="TO_JSON",t[t.FROM_JSON=1]="FROM_JSON"})(R||(R={}));s();function Pa(t,e={},r){return function(n={},a){return typeof n=="string"?n:i(t,n);function i(f,g){let m={};return[null,void 0].includes(g)?g:(Object.entries(g).forEach(([y,A])=>{let w=f[y],{schemaName:b,schemaType:q}=Ta(w),H=q==="Map",I=c(b)?.checkRepetable?.(A)??Array.isArray(A),O;I?O=A.map(Q=>d(Q,b)):H?O=v(A,b):O=d(A,b),m[y]=O}),m)}function d(f,g){if(!g)return f;let m=e[g];if(c(g))return c(g).transform(f);if(m)return i(m,f);throw new Error(`${g} is neither schema nor serializable type`)}function c(f){return r[f]?.[a]}function v(f,g){return Object.entries(f).reduce((m,[y,A])=>(m[y]=d(A,g),m),{})}}}s();s();var Na={types:["google.protobuf.Timestamp"],[R.TO_JSON]:{transform:t=>t?.toISOString()},[R.FROM_JSON]:{transform:t=>t?new Date(t):void 0}};s();var Ia={types:["google.protobuf.FieldMask"],[R.TO_JSON]:{transform:t=>t.join(","),checkRepetable:t=>t.some(e=>Array.isArray(e))},[R.FROM_JSON]:{transform:t=>typeof t=="object"?t.paths:t.split(",")}};s();var ka={types:["google.protobuf.BytesValue","BYTES"],[R.TO_JSON]:{transform:t=>{let e=t.reduce((r,o)=>r+String.fromCharCode(o),"");return btoa(e)}},[R.FROM_JSON]:{transform:t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0))}};s();var Da={types:["google.protobuf.Duration"],[R.TO_JSON]:{transform:({seconds:t="0",nanos:e=0})=>{let r="";return e!==0&&(r=`.${e.toString().padStart(9,"0")}`),`${t}${r}s`}},[R.FROM_JSON]:{transform:t=>{let[e,r]=t.substring(0,t.length-1).split(".");return{seconds:e,nanos:bl(r)}}}};function bl(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 Ua={types:["FLOAT","DOUBLE","google.protobuf.FloatValue","google.protobuf.DoubleValue"],[R.TO_JSON]:{transform:t=>isFinite(t)?t:t.toString()},[R.FROM_JSON]:{transform:t=>t==="NaN"?NaN:t==="Infinity"?1/0:t==="-Infinity"?-1/0:t}};var La=[Na,Ia,ka,Da,Ua];s();function Ma(t){return t.reduce((e,r)=>{let o=r.types.reduce((n,a)=>({...n,[a]:r}),{});return{...e,...o}},{})}var Cl=Ma([...La]);function ae(t,e={}){let r=Pa(t,e,Cl);return{fromJSON(o){let n=Tl(o)||o;return r(n,R.FROM_JSON)},toJSON(o){return r(o,R.TO_JSON)}}}function Tl(t){try{return JSON.parse(t)}catch{}}var Sl={dateCreated:"google.protobuf.Timestamp",dateUpdated:"google.protobuf.Timestamp"},Ol={account:"_account"};var El={};function Fl(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 zt(Object.assign(t,{domainToMappings:e}))}function Ha(t){var e=ae(El,{}),r=e.toJSON,o=e.fromJSON,n=ae(Ol,{_account:Sl}).fromJSON;function a(i){var d=i.host,c=r(t),v={entityFqdn:"wix.identity.account.v2.account",method:"GET",methodFqn:"com.wixpress.account.api.AccountService.getMyAccount",url:Fl({protoPath:"/v1/accounts/my_account",data:c,host:d}),params:Wt(c),transformResponse:n};return v}return a.fromReq=o,a.__isAmbassador=!0,a}s();var Rl={},ql={};var Pl={body:"BYTES"},Nl={body:"BYTES"},Il={},kl={};function io(t){var e={"manage._base_domain_":[{srcPath:"/oauth2",destPath:"/v1/oauth"}],"www.wixapis.com":[{srcPath:"/oauth2",destPath:"/v1/oauth"},{srcPath:"/oauth2/token_info",destPath:"/v1/token_info"}],"users._base_domain_":[{srcPath:"/v1/oauth/device/verify",destPath:"/v1/oauth/device/verify"},{srcPath:"/v1/oauth/manage/user-code",destPath:"/v1/oauth/manage/user-code"},{srcPath:"/v2/oauth/device/verify",destPath:"/v2/oauth/device/verify"}],_:[{srcPath:"/_api/oauth2",destPath:"/v1/oauth"}]};return zt(Object.assign(t,{domainToMappings:e}))}function uo(t){var e=ae(Pl,{}),r=e.toJSON,o=e.fromJSON,n=ae(Nl,{}).fromJSON;function a(i){var d=i.host,c=r(t),v={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.Token",url:io({protoPath:"/v1/oauth/token",data:c,host:d}),data:c,transformResponse:n};return v}return a.fromReq=o,a.__isAmbassador=!0,a}function ja(t){var e=ae(Rl,{}),r=e.toJSON,o=e.fromJSON,n=ae(ql,{}).fromJSON;function a(i){var d=i.host,c=r(t),v={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"GET",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.DeviceCode",url:io({protoPath:"/v1/oauth/device/code",data:c,host:d}),params:Wt(c),transformResponse:n};return v}return a.fromReq=o,a.__isAmbassador=!0,a}function Ba(t){var e=ae(Il,{}),r=e.toJSON,o=e.fromJSON,n=ae(kl,{}).fromJSON;function a(i){var d=i.host,c=r(t),v={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.RevokeRefreshToken",url:io({protoPath:"/v1/oauth/revoke",data:c,host:d}),data:c,transformResponse:n};return v}return a.fromReq=o,a.__isAmbassador=!0,a}var Me=G(le(),1);s();var Ja=C.object({deviceCode:C.string(),verificationUri:C.string().url(),userCode:C.string(),expiresIn:C.number()}),co=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})),lo=C.object({userId:C.string().uuid(),email:C.string().email()}),Ga=C.object({account:C.object({slug:C.string(),accountId:C.string().uuid(),accountOwner:C.string().uuid()})}),$a=C.object({accessToken:C.string(),refreshToken:C.string(),expiresIn:C.number(),issuedAt:C.number()}),za=$a.extend({userInfo:lo}),Wa=C.object({token:C.string(),accountId:C.string().uuid(),userInfo:C.object({userId:C.string().uuid(),email:C.string()})});var{InvalidResponseData:Dl,FailedToGetAuthToken:Ul,FailedToGetDeviceCode:Ll,FailedToRenewAuthToken:Ml,FailedToRenewAuthTokenSiteNotFound:Hl,FailedToRevokeRefreshToken:jl}=$,po="6f95cec8-3e98-48b9-b4e5-1fb92fcd9973",Va=()=>Math.floor(Date.now()/1e3),ot=class extends Error{},Vt=(0,Me.variant)({TokenRenewed:(0,Me.payload)(),RefreshTokenRevoked:(0,Me.fields)()}),fo=class{constructor(e){this.httpClient=e;let{minRetryTimeout:r}=Oe();this.retryOptions={retries:3,minTimeout:r,maxTimeout:3*1e3}}retryOptions;async requestDeviceCode(e={}){try{let{data:r}=await tt(()=>this.httpClient.request(ja({...e,clientId:po})),this.retryOptions);return Ja.parse(r)}catch(r){throw new P({code:Ll(),cause:r})}}async createToken(e){try{let r={clientId:po,grantType:"urn:ietf:params:oauth:grant-type:device_code",scope:"offline_access",...e};return{...await tt(async()=>{let{data:n,requestId:a}=await this.httpClient.request(uo(r)),i=co.safeParse(n);if(i.success)return i.data;throw new P({code:Dl(),cause:i.error,info:{requestId:a,data:n}})},this.retryOptions),issuedAt:Va()}}catch(r){throw et(r)&&(r.response?.data?.message==="Device code is not yet verified"||r.response?.data?.error==="authorization_pending")?new ot("Device code is not yet verified."):new P({code:Ul(),cause:r})}}async renewToken(e){try{let r={clientId:po,grantType:"refresh_token",...e},{data:o}=await tt(()=>this.httpClient.request(uo(r)),this.retryOptions),n=co.parse(o);return Vt.TokenRenewed({...n,issuedAt:Va()})}catch(r){if(et(r)){if(r.response?.status===400&&r.response?.data?.error==="invalid_grant")return Vt.RefreshTokenRevoked({cause:r});if(e.siteId&&r.response?.status===404&&r.response?.data?.details?.applicationError?.code==="SITE_NOT_FOUND")throw new P({code:Hl({siteId:e.siteId}),cause:r})}throw new P({code:Ml(),cause:r})}}async revokeRefreshToken(e,{email:r}){try{let{data:o}=await this.httpClient.request(Ba(e));return o}catch(o){throw new P({code:jl({email:r}),info:{email:r},cause:o})}}async userInfo({accessToken:e}){try{let r=Jt({type:"backoffice",getAppToken:async()=>e}),{data:o}=await r.get("/_serverless/wix-cli-userinfo/userinfo");return lo.parse(o)}catch(r){throw new P({code:$.FailedToGetUserInfo(),cause:r})}}async getMyAccount({token:e}){try{let r=Jt({type:"backoffice",getAppToken:async()=>e}),{data:o}=await r.request(Ha({}));return Ga.parse(o).account}catch(r){throw new P({code:$.FailedToGetMyAccount(),cause:r})}}},he=new fo(Jt({type:"backoffice"}));s();import{unlink as Bl,rm as Jl}from"node:fs/promises";import{resolve as nt}from"node:path";var Y=G(le(),1);function Ya(){return nt(nr(),"auth.json")}function Kt(){return nt(nr(),"auth")}function Xa(){return nt(Kt(),"api-key.json")}function Za(){return nt(Kt(),"account.json")}function Gl(t){return nt(Kt(),`${t}.json`)}var Ka=(0,Y.variant)({Authenticated:(0,Y.payload)(),Unauthenticated:{}});async function Qa(){let t=Xa();if(!await ht(t))return Ka.Unauthenticated();let e=await ar(t),r=Wa.parse(e);return Ka.Authenticated(r)}async function ei(t){try{let e=Xa();await sr(e,t)}catch(e){throw new P({code:$.FailedToSaveApiKeyAuthData({cause:e}),cause:e})}}var mo=(0,Y.variant)({Authenticated:(0,Y.fields)(),Unauthenticated:{},Expired:(0,Y.fields)()});async function ti(){let t=Za();if(!await ht(t))return mo.Unauthenticated();let e=await ar(t),r=za.parse(e);return vo(r)?mo.Authenticated(r):mo.Expired(r)}var lv=(0,Y.variant)({Authenticated:(0,Y.fields)(),Unauthenticated:{},Expired:(0,Y.fields)()});async function ho(t,e){try{let r=e?Gl(e):Za();await sr(r,t)}catch(r){throw new P({code:$.FailedToSaveAuthData({cause:r}),cause:r})}}async function Yt(){try{await Jl(Kt(),{recursive:!0,force:!0})}catch(t){throw new P({code:$.FailedToDeleteAuthData({cause:t}),cause:t})}await go()&&await $l()}async function $l(){try{await Bl(Ya())}catch(t){throw new P({code:$.FailedToDeleteLegacyAuthData({cause:t}),cause:t})}}async function go(){return ht(Ya())}function vo(t){let e=Math.floor(Date.now()/1e3),r=10*60,o=t.expiresIn-r;return t.issuedAt+o>e}function ri({authData:{token:t,accountId:e,userInfo:r},siteId:o}){return{getAccessToken:async()=>t,getRefreshToken:()=>{throw new Error("API key auth does not support refresh tokens")},getRequestHeaders:()=>({"wix-account-id":e,...o&&{"wix-site-id":o}}),userInfo:r}}var ni={async isLoggedIn({siteId:t}={}){let e=await Qa();return(0,oi.match)(e,{Authenticated:({payload:r})=>ri({authData:r,siteId:t}),Unauthenticated:()=>null})},async login({token:t}){let{accountId:e,accountOwner:r,slug:o}=await he.getMyAccount({token:t}),n={token:t,accountId:e,userInfo:{userId:r,email:o}};return await Yt(),await ei(n),ri({authData:n})}};s();s();s();var yo=class{value;next;constructor(e){this.value=e}},st=class{#e;#t;#r;constructor(){this.clear()}enqueue(e){let r=new yo(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 xo(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 st,r=0,o=()=>{r--,e.size>0&&e.dequeue()()},n=async(d,c,v)=>{r++;let f=(async()=>d(...v))();c(f);try{await f}catch{}o()},a=(d,c,v)=>{e.enqueue(n.bind(void 0,d,c,v)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},i=(d,...c)=>new Promise(v=>{a(d,v,c)});return Object.defineProperties(i,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),i}var ge=G(le(),1);s();s();var He=class extends Error{constructor(e){super(e),this.name="TimeoutError"}},_o=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},si=t=>globalThis.DOMException===void 0?new _o(t):new DOMException(t),ai=t=>{let e=t.reason===void 0?si("This operation was aborted."):t.reason;return e instanceof Error?e:si(e)};function wo(t,e){let{milliseconds:r,fallback:o,message:n,customTimers:a={setTimeout,clearTimeout}}=e,i,c=new Promise((v,f)=>{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&&f(ai(m)),m.addEventListener("abort",()=>{f(ai(m))})}if(r===Number.POSITIVE_INFINITY){t.then(v,f);return}let g=new He;i=a.setTimeout.call(void 0,()=>{if(o){try{v(o())}catch(m){f(m)}return}typeof t.cancel=="function"&&t.cancel(),n===!1?v():n instanceof Error?f(n):(g.message=n??`Promise timed out after ${r} milliseconds`,f(g))},r),(async()=>{try{v(await t)}catch(m){f(m)}})()}).finally(()=>{c.clear()});return c.clear=()=>{a.clearTimeout.call(void 0,i),i=void 0},c}var Ao=Symbol("resolveValue");async function at(t,e={}){let{interval:r=20,timeout:o=Number.POSITIVE_INFINITY,before:n=!0}=e,a,i=!1,d=new Promise((c,v)=>{let f=async()=>{try{let g=await t();if(typeof g=="object"&&g[Ao])c(g[Ao]);else{if(typeof g!="boolean")throw new TypeError("Expected condition to return a boolean");g===!0?c():i||(a=setTimeout(f,r))}}catch(g){v(g)}};n?f():a=setTimeout(f,r)});if(o===Number.POSITIVE_INFINITY)return d;try{return await wo(d,typeof o=="number"?{milliseconds:o}:o)}finally{i=!0,clearTimeout(a)}}at.resolveWith=t=>({[Ao]:t});var ii=t=>1e3*t;async function zl({deviceCode:t,expiresIn:e},{signal:r}){try{let o=await at(async()=>{try{let i=await he.createToken({deviceCode:t});return at.resolveWith(i)}catch(i){if(i instanceof ot)return!1;throw i}},{interval:Oe().waitForLoginInterval??ii(3),timeout:{milliseconds:ii(e),signal:r}}),n=await he.userInfo({accessToken:o.accessToken}),a={...o,userInfo:n};return await Yt(),await ho(a),a}catch(o){throw o instanceof He?new P({code:$.DeviceCodeTimedOut()}):o}}async function ci({refreshToken:t,userInfo:e}){let r=await he.renewToken({refreshToken:t});return(0,ge.isType)(r,Vt.TokenRenewed)&&await ho({...r.payload,userInfo:e}),r}async function Wl(){let t=await ti();return(0,ge.match)(t,{Authenticated:e=>e,Unauthenticated:()=>null,Expired:async e=>{let r=await ci(e);return(0,ge.match)(r,{TokenRenewed:({payload:o})=>({...o,userInfo:e.userInfo}),RefreshTokenRevoked:(0,ge.constant)(null)})}})}function ui({userInfo:t,...e}){let r=xo(1),o={...e};return{getAccessToken:()=>r(async()=>{if(vo(o))return o.accessToken;let n=await ci({...o,userInfo:t});return(0,ge.match)(n,{TokenRenewed:({payload:a})=>(o=a,o.accessToken),RefreshTokenRevoked:({cause:a})=>{throw new P({code:$.FailedToRenewAuthTokenRefreshTokenRevoked(),cause:a})}})}),getRefreshToken:()=>o.refreshToken,userInfo:t}}var it={async isLoggedIn(){let t=await ni.isLoggedIn();if(t)return t;let e=await Wl();return e?ui(e):null},async login({deviceCode:t,signal:e}){let r=await zl(t,{signal:e});return ui(r)}};s();var Di=G(le(),1);import rr from"react";s();import qi from"react";s();function jv(t){return{evid:5200,src:11,endpoint:"wix-cli",params:t}}function Bv(t){return{evid:5201,src:11,endpoint:"wix-cli",params:t}}function Jv(t){return{evid:5208,src:11,endpoint:"wix-cli",params:t}}function Gv(t){return{evid:5209,src:11,endpoint:"wix-cli",params:t}}function $v(t){return{evid:5210,src:11,endpoint:"wix-cli",params:t}}function di(t){return{evid:5211,src:11,endpoint:"wix-cli",params:t}}function bo(t){return{evid:5212,src:11,endpoint:"wix-cli",params:t}}var Pi=G(le(),1);var li={"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 V,{useState as ap}from"react";s();var Ei=G(Ti(),1);s();var Si=G(Bt(),1);async function Oi(t,e){await(0,Si.createHttpClient)().post(t,void 0,{params:{url:e}})}async function Fi(t){let{userBrowserTestEndpoint:e}=Oe();e?await Oi(e,t):await(0,Ei.default)(t,{background:!0})}var Ri=({userCode:t,verificationUri:e})=>{let{reportError:r}=dr(),[o,n]=ap(null);return Ho((a,i)=>{i.return&&Fi(e).catch(d=>{r(d),n(d)})}),V.createElement(V.Fragment,null,V.createElement(Fe,{i18nKey:"login.instructions_title"}),V.createElement(ee,{flexDirection:"column",marginTop:1,marginBottom:1,marginLeft:2},V.createElement(Fe,{i18nKey:"login.instructions_details",components:[V.createElement(_,{skin:"legacyBlue"}),V.createElement(Bo,{value:"enter"}),V.createElement(ur,{url:e})],values:{code:t}})),o&&V.createElement(V.Fragment,null,V.createElement(ee,{flexDirection:"column",marginBottom:1},V.createElement(no,{error:o})),V.createElement(Fe,{i18nKey:"login.error_opening_browser",components:[V.createElement(ur,{url:e})]})))};var Ni=({loginFn:t,onLogin:e,onError:r})=>{let o=cr();function n(d){o.report(bo({isSuccess:!1,...d instanceof Error?{errorType:d.name}:{errorType:"unknown",errorMessage:JSON.stringify(d)}})),r(d)}let a=Go(async({signal:d},c)=>{try{let v=await t({deviceCode:c,signal:d});o.report(bo({isSuccess:!0})),e(v)}catch(v){n(v)}}),{status:i}=Ee(async()=>(o.report(di({})),he.requestDeviceCode()),[],{onSuccess:d=>{a.execute(d)},onError:n});return(0,Pi.match)(i,{Error:()=>null,Loading:()=>qi.createElement(gt,null),Success:({result:{userCode:d,verificationUri:c}})=>qi.createElement(Ri,{userCode:d,verificationUri:c})})};s();var Ii=G(le(),1);import tr from"react";var ki=({children:t})=>{let{status:e}=Ee(go,[],{onError:()=>{}});return(0,Ii.match)(e,{Error:()=>null,Loading:()=>null,Success:({result:r})=>tr.createElement(tr.Fragment,null,r&&tr.createElement(ee,{marginBottom:1},tr.createElement(Fe,{i18nKey:"login.legacy_auth_notice"})),t)})};var Ui=({authStrategy:{login:t,isLoggedIn:e},onLogin:r,onError:o,children:n})=>{let{status:a,merge:i}=Ee(e,[],{onSuccess:d=>{d&&r(d)},onError:o});return(0,Di.match)(a,{Loading:()=>rr.createElement(gt,null),Error:()=>null,Success:({result:d})=>d===null?rr.createElement($o,{messages:li},rr.createElement(ki,null,rr.createElement(Ni,{loginFn:t,onLogin:c=>{i({result:c}),r(c)},onError:o}))):n(d)})};var ip=({children:t,onError:e,onLogin:r})=>{let o=Jo();return Li.createElement(Ui,{authStrategy:it,onLogin:({userInfo:n})=>r?.(n),onError:e??o},({getAccessToken:n,getRequestHeaders:a,userInfo:i})=>Li.createElement($t.Provider,{value:{getAccessToken:n,getRequestHeaders:a,userInfo:i}},t))};s();s();import{useContext as up}from"react";function cp(){let t=up($t);if(!t)throw new Error("useAuth() cannot be used without an <AuthProvider>");return t}var{isLoggedIn:Yy}=it;export{tt as a,zt as b,Wt as c,ae as d,Bt as e,et as f,Jt as g,He as h,at as i,cp as j,Ji as k,cr as l,jv as m,Bv as n,Jv as o,Gv as p,$v as q,Fi as r,no as s,Wi as t,dr as u,ip as v,Yy as w};
20
+ `}),FailedToWatchFiles:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to watch files. Cause: ${r}`})},FailedToCreateGridApp:({error:e})=>()=>u.createElement(h,{message:"Failed to create an isolated environment.",explanation:e}),DeviceCodeTimedOut:()=>()=>u.createElement(h,{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 a=i=>(0,oo.match)(i,{page:()=>"page",plugin:()=>"plugin","menu-plugin":()=>"menu plugin","sidebar-category":()=>"sidebar category","embedded-script":()=>"embedded script","custom-element":()=>"custom element",modal:()=>"modal"});return u.createElement(ee,{flexDirection:"column"},u.createElement(_,null,u.createElement(_,{bold:!0},"Duplicate ID: "),n.id),u.createElement(_,{bold:!0},"Extensions:"),n.components.map(({name:i,path:d,type:c})=>u.createElement(_,{key:d},"[",a(c),"] ",i," (",d,")")),u.createElement(_,null,u.createElement(_,{bold:!0},"Possible GUID: "),n.suggestedId))},o=u.createElement(ee,{flexDirection:"column",rowGap:1},u.createElement(_,null,"You can use the provided suggested GUIDs as the ID of the newly created extension."),e.map(n=>u.createElement(r,{issue:n,key:n.id})));return()=>u.createElement(h,{message:"Found multiple extensions with the same id, this might happen if you copy paste folders.",hint:o})},InvalidResponseData:()=>()=>u.createElement(O,{message:"Got unexpected response from server."}),InvalidCreateAppResponse:()=>()=>u.createElement(h,{message:"`createApp` returned an invalid response."}),InvalidDeployAppResponse:()=>()=>u.createElement(h,{message:"Got unexpected response from server. Make sure you are running a supported version of the Velo CLI."}),InvalidGetDeploymentResponse:()=>()=>u.createElement(h,{message:"Got unexpected response from server. Please try again later.."}),FailedToGetPagesDiff:()=>()=>u.createElement(h,{message:"Failed to request pages diff."}),InvalidViteBuildOutput:()=>()=>u.createElement(h,{message:"Invalid vite build output"}),ViteModuleBundleNotFound:()=>()=>u.createElement(h,{message:"Could not find module bundle in vite build output"}),ViteFileNotFoundInOutput:({fileName:e})=>()=>u.createElement(h,{message:`Could not find ${e} in vite build output`}),FailedToCreatePresignedUrl:()=>()=>u.createElement(h,{message:"Failed to create a presigned upload url"}),FailedToCreateBackendDeployment:()=>()=>u.createElement(h,{message:"Failed to create backend deployment"}),FailedToUpdateBackendDeployment:()=>()=>u.createElement(h,{message:"Failed to update backend deployment"}),FailedToGetBackendDeployment:()=>()=>u.createElement(h,{message:"Failed to get backend deployment"}),FailedToDeployBackend:()=>()=>u.createElement(h,{message:"Failed to deploy backend"}),FailedToUploadApplicationFiles:()=>()=>u.createElement(h,{message:"Failed to upload the application files"}),FailedToVerifyDeployment:()=>()=>u.createElement(h,{message:"Deployment was not finished within the desired timeframe, please try again later."}),FailedToGetUserInfo:()=>()=>u.createElement(h,{message:"Failed to get user information."}),FailedToGetMyAccount:()=>()=>u.createElement(O,{message:"Failed to get account information."}),FailedToCreateDevelopmentSite:()=>()=>u.createElement(h,{message:"Failed to create a Development Site"}),FailedToGetDevelopmentSites:()=>()=>u.createElement(h,{message:"Failed to request development sites."}),FailedToGetDevelopmentSitesLimit:()=>()=>u.createElement(h,{message:"Failed to request development sites limit."}),FailedToGetRequiredApps:()=>()=>u.createElement(h,{message:"Failed to get app required apps."}),FailedToGetMarketListing:()=>()=>u.createElement(h,{message:"Failed to get market listing."}),FailedToAddRequiredApp:()=>()=>u.createElement(h,{message:"Failed to add required app."}),FailedToQuerySites:()=>()=>u.createElement(h,{message:"Failed to request sites list."}),FailedToGetSite:()=>()=>u.createElement(h,{message:"Failed to get information about your configured Development Site"}),FailedToDeploySite:()=>()=>u.createElement(h,{message:"Failed to deploy site."}),FailedToPublishDeployment:()=>()=>u.createElement(O,{message:"Failed to publish site."}),FailedToSaveDevelopmentSite:({path:e})=>()=>u.createElement(h,{message:"Failed to save the current development site.",hint:`Make sure the \`${e}\` file has proper permissions and is accessible`}),FailedToBuildApp:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:u.createElement(u.Fragment,null,"Failed to build the application.",u.createElement(ye,null),r),hint:"Please check the build output for more information"})},FailedToCheckIfAppInstalled:()=>()=>u.createElement(h,{message:"Failed to fetch site installation details"}),FailedToInitializeGitRepo:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to initialize git repo. Cause: ${r}`})},FailedToInstallDependencies:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to install dependencies. Cause: ${r}`})},FailedToCommitChanges:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to commit changes. Cause: ${r}`})},FailedToDeleteAuthData:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to delete auth data: ${r}`})},FailedToDeleteLegacyAuthData:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to delete legacy auth data: ${r}`})},FailedToSaveAuthData:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to save auth data: ${r}`})},FailedToSaveApiKeyAuthData:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Failed to save api key auth data: ${r}`})},FailedToWriteJson:({filePath:e,cause:r})=>{let o=N(r);return()=>u.createElement(h,{message:`Failed to write JSON at path: ${e}. Cause: ${o}`})},TemplatePathNotFound:({templatePath:e})=>()=>u.createElement(h,{message:`Template path not found: ${e}`,hint:"Make sure the template path exists in the remote repository"}),FailedToCloneRepo:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{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(h,{message:`Invalid Git URL: ${e}`,hint:"Make sure the Git URL is in the correct format"}),AuthenticationRequired:()=>()=>u.createElement(h,{message:"You have to already be logged in to run this command."}),SiteConfiguredRequired:()=>()=>u.createElement(h,{message:"You must configure the development site before running this command, or provide a site-id in the command options."}),FailedAddingPackageToWorkspace:()=>()=>u.createElement(h,{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(h,{message:"Failed to generate a Selfsigned certificate for development."}),NonInteractiveTerminal:()=>()=>u.createElement(h,{message:"This command is not supported in non-interactive terminals. Please run the command in an interactive terminal (TTY)."}),FailedToResolveViteOrigin:()=>()=>u.createElement(h,{message:"Failed to resolve the base url for CSS asset urls"}),FailedToCreateAppRelease:()=>()=>u.createElement(O,{message:"Failed to create an app configuration in dev center."}),FailedToUpdateAppRelease:()=>()=>u.createElement(O,{message:"Failed to update an app configuration in dev center."}),FailedToCreateComponents:()=>()=>u.createElement(O,{message:"Failed to create components in dev center."}),FailedToCheckDeprecatedStatus:()=>()=>u.createElement(O,{message:"Failed to check cli version deprecated status."}),FailedToGetResolveNpmDependenciesResult:()=>()=>u.createElement(O,{message:"Failed to resolve Wix's lockfile."}),CliAppVersionMismatch:({cliVersion:e,cliAppVersion:r})=>()=>u.createElement(h,{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(O,{message:"Failed to get validation status for app version from dev center"}),InvalidDashboardPageRoute:({route:e,errorMessage:r})=>()=>u.createElement(h,{message:`Invalid dashboard page route: ${e}`,hint:r}),InvalidEmbeddedScriptFolder:({path:e,errorMessage:r})=>()=>u.createElement(h,{message:`Invalid embedded script folder: ${e}`,hint:r}),InvalidEmbeddedScriptTemplate:({templateFilename:e,errorMessage:r})=>()=>u.createElement(h,{message:`Invalid embedded script template in ${e}`,hint:r}),InvalidCustomElementTagName:({tagName:e,errorMessage:r})=>()=>u.createElement(h,{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(O,{message:"Failed to create site override configuration"}),FailedToGetPipelineErrorInfo:()=>()=>u.createElement(O,{message:"Failed to get error details"}),FailedToGetDeploymentStatus:()=>()=>u.createElement(O,{message:"Failed to get deployment status"}),NetworkError:({cause:e})=>{let r=N(e);return()=>u.createElement(h,{message:`Network error occurred. Cause: ${r}`,hint:"Make sure you have an active internet connection and try again shortly."})},FailedToGenerateAppMarketQueryParam:()=>()=>u.createElement(O,{message:"Failed to get generate appMarket query parameter"})})}function N(t){return t instanceof Error?t.message:JSON.stringify(t)}function ga(t){let e=t.path.join(".");return e?`- \`${e}\`: ${t.message}`:`- ${t.message}`}var no=({error:t,systemErrorOverride:e})=>zd(()=>{let r=Mo(t);return Lo(r)&&e?e:$d(va(r.cliCode))},[t,e]);s();import Li from"react";s();import{createContext as Wd}from"react";var $t=Wd(null);s();s();var oi=G(le(),1);s();s();var Ca=G(Aa(),1),Kd=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed"]),so=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}},Yd=(t,e,r)=>{let o=r.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=o,t},Xd=t=>Kd.has(t),ba=t=>globalThis.DOMException===void 0?new Error(t):new DOMException(t);async function tt(t,e){return new Promise((r,o)=>{e={onFailedAttempt(){},retries:10,...e};let n=Ca.default.operation(e);n.attempt(async a=>{try{r(await t(a))}catch(i){if(!(i instanceof Error)){o(new TypeError(`Non-error was thrown: "${i}". You should only throw errors.`));return}if(i instanceof so)n.stop(),o(i.originalError);else if(i instanceof TypeError&&!Xd(i.message))n.stop(),o(i);else{Yd(i,a,e);try{await e.onFailedAttempt(i)}catch(d){o(d);return}n.retry(i)||o(n.mainError())}}}),e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",()=>{n.stop();let a=e.signal.reason===void 0?ba("The operation was aborted."):e.signal.reason;o(a instanceof Error?a:ba(a))},{once:!0})})}s();s();s();s();function Ta(t=""){let[e,r]=Zd(t);return r?{schemaName:r,schemaType:e}:{schemaName:e}}var Zd=t=>t.split("#");s();s();function Sa(t,e,r,o){let n=t;for(let a of e.split(".")){if(!n)return r;n=n[a]}return`${n}${o}`}var Qd="_",el=["wix.com","editorx.com"],tl=["42.wixprod.net","uw2-edt-1.wixprod.net"],rl="dev.wix-code.com",ol=/{(.*)}/,nl=new RegExp(`\\.(${el.join("|")})$`),sl=new RegExp(`\\.(${tl.join("|")})$`),al=new RegExp(`.*\\.${rl}$`);function zt(t){let e=cl(t.host),r=ll(e,t.domainToMappings),o=il(t.protoPath,t.data||{});return pl(o,r)}function il(t,e){return t.split("/").map(r=>ul(r,e)).join("/")}function ul(t,e){let r=t.match(ol)||[],o=r[1];if(o){let n=t.replace(r[0],"");return Sa(e,o,t,n)}return t}function cl(t){return dl(t).replace(nl,"._base_domain_").replace(sl,"._api_base_domain_").replace(al,"*.dev.wix-code.com")}function dl(t){return t.replace("create.editorx.com","editor.editorx.com")}function ll(t,e){let r=e[t]||e[Qd];return!r&&fl(t)?e[ml]:r}function pl(t,e){let r=e?.find(o=>t.startsWith(o.destPath));return r?r.srcPath+t.slice(r.destPath.length):t}function fl(t){return!!t.match(/\._base_domain_$/)}var ml="www._base_domain_";s();s();var ao=typeof Buffer=="function",Jh=typeof TextDecoder=="function"?new TextDecoder:void 0,Oa=typeof TextEncoder=="function"?new TextEncoder:void 0,hl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",rt=Array.prototype.slice.call(hl),Gh=(t=>{let e={};return t.forEach((r,o)=>e[r]=o),e})(rt);var se=String.fromCharCode.bind(String),$h=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),gl=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_");var vl=t=>{let e,r,o,n,a="",i=t.length%3;for(let d=0;d<t.length;){if((r=t.charCodeAt(d++))>255||(o=t.charCodeAt(d++))>255||(n=t.charCodeAt(d++))>255)throw new TypeError("invalid character found");e=r<<16|o<<8|n,a+=rt[e>>18&63]+rt[e>>12&63]+rt[e>>6&63]+rt[e&63]}return i?a.slice(0,i-3)+"===".substring(i):a},Fa=typeof btoa=="function"?t=>btoa(t):ao?t=>Buffer.from(t,"binary").toString("base64"):vl,yl=ao?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let o=0,n=t.length;o<n;o+=4096)r.push(se.apply(null,t.subarray(o,o+4096)));return Fa(r.join(""))};var xl=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?se(192|e>>>6)+se(128|e&63):se(224|e>>>12&15)+se(128|e>>>6&63)+se(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return se(240|e>>>18&7)+se(128|e>>>12&63)+se(128|e>>>6&63)+se(128|e&63)}},_l=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,wl=t=>t.replace(_l,xl),Ea=ao?t=>Buffer.from(t,"utf8").toString("base64"):Oa?t=>yl(Oa.encode(t)):t=>Fa(wl(t)),Ra=(t,e=!1)=>e?gl(Ea(t)):Ea(t);function qa(t,e=""){let r={};return Object.entries(t).forEach(([o,n])=>{let a=n!==null&&typeof n=="object"&&!Array.isArray(n),i=Al(e,o);if(a){let d=qa(n,i);Object.assign(r,d)}else r[i]=n}),r}function Al(t,e){return`${t}${t?".":""}${e}`}function Wt(t,e){let r=qa(t),o=Object.entries(r).reduce((n,[a,i])=>((Array.isArray(i)?i:[i]).forEach(c=>{c!=null&&n.append(a,c)}),n),new URLSearchParams);return e&&o.append(".r",Ra(JSON.stringify(t),!0)),o}s();s();var R;(function(t){t[t.TO_JSON=0]="TO_JSON",t[t.FROM_JSON=1]="FROM_JSON"})(R||(R={}));s();function Pa(t,e={},r){return function(n={},a){return typeof n=="string"?n:i(t,n);function i(f,g){let m={};return[null,void 0].includes(g)?g:(Object.entries(g).forEach(([y,A])=>{let w=f[y],{schemaName:b,schemaType:q}=Ta(w),H=q==="Map",I=c(b)?.checkRepetable?.(A)??Array.isArray(A),E;I?E=A.map(Q=>d(Q,b)):H?E=v(A,b):E=d(A,b),m[y]=E}),m)}function d(f,g){if(!g)return f;let m=e[g];if(c(g))return c(g).transform(f);if(m)return i(m,f);throw new Error(`${g} is neither schema nor serializable type`)}function c(f){return r[f]?.[a]}function v(f,g){return Object.entries(f).reduce((m,[y,A])=>(m[y]=d(A,g),m),{})}}}s();s();var Na={types:["google.protobuf.Timestamp"],[R.TO_JSON]:{transform:t=>t?.toISOString()},[R.FROM_JSON]:{transform:t=>t?new Date(t):void 0}};s();var Ia={types:["google.protobuf.FieldMask"],[R.TO_JSON]:{transform:t=>t.join(","),checkRepetable:t=>t.some(e=>Array.isArray(e))},[R.FROM_JSON]:{transform:t=>typeof t=="object"?t.paths:t.split(",")}};s();var ka={types:["google.protobuf.BytesValue","BYTES"],[R.TO_JSON]:{transform:t=>{let e=t.reduce((r,o)=>r+String.fromCharCode(o),"");return btoa(e)}},[R.FROM_JSON]:{transform:t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0))}};s();var Da={types:["google.protobuf.Duration"],[R.TO_JSON]:{transform:({seconds:t="0",nanos:e=0})=>{let r="";return e!==0&&(r=`.${e.toString().padStart(9,"0")}`),`${t}${r}s`}},[R.FROM_JSON]:{transform:t=>{let[e,r]=t.substring(0,t.length-1).split(".");return{seconds:e,nanos:bl(r)}}}};function bl(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 Ua={types:["FLOAT","DOUBLE","google.protobuf.FloatValue","google.protobuf.DoubleValue"],[R.TO_JSON]:{transform:t=>isFinite(t)?t:t.toString()},[R.FROM_JSON]:{transform:t=>t==="NaN"?NaN:t==="Infinity"?1/0:t==="-Infinity"?-1/0:t}};var La=[Na,Ia,ka,Da,Ua];s();function Ma(t){return t.reduce((e,r)=>{let o=r.types.reduce((n,a)=>({...n,[a]:r}),{});return{...e,...o}},{})}var Cl=Ma([...La]);function ae(t,e={}){let r=Pa(t,e,Cl);return{fromJSON(o){let n=Tl(o)||o;return r(n,R.FROM_JSON)},toJSON(o){return r(o,R.TO_JSON)}}}function Tl(t){try{return JSON.parse(t)}catch{}}var Sl={dateCreated:"google.protobuf.Timestamp",dateUpdated:"google.protobuf.Timestamp"},Ol={account:"_account"};var El={};function Fl(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 zt(Object.assign(t,{domainToMappings:e}))}function Ha(t){var e=ae(El,{}),r=e.toJSON,o=e.fromJSON,n=ae(Ol,{_account:Sl}).fromJSON;function a(i){var d=i.host,c=r(t),v={entityFqdn:"wix.identity.account.v2.account",method:"GET",methodFqn:"com.wixpress.account.api.AccountService.getMyAccount",url:Fl({protoPath:"/v1/accounts/my_account",data:c,host:d}),params:Wt(c),transformResponse:n};return v}return a.fromReq=o,a.__isAmbassador=!0,a}s();var Rl={},ql={};var Pl={body:"BYTES"},Nl={body:"BYTES"},Il={},kl={};function io(t){var e={"manage._base_domain_":[{srcPath:"/oauth2",destPath:"/v1/oauth"}],"www.wixapis.com":[{srcPath:"/oauth2",destPath:"/v1/oauth"},{srcPath:"/oauth2/token_info",destPath:"/v1/token_info"}],"users._base_domain_":[{srcPath:"/v1/oauth/device/verify",destPath:"/v1/oauth/device/verify"},{srcPath:"/v1/oauth/manage/user-code",destPath:"/v1/oauth/manage/user-code"},{srcPath:"/v2/oauth/device/verify",destPath:"/v2/oauth/device/verify"}],_:[{srcPath:"/_api/oauth2",destPath:"/v1/oauth"}]};return zt(Object.assign(t,{domainToMappings:e}))}function uo(t){var e=ae(Pl,{}),r=e.toJSON,o=e.fromJSON,n=ae(Nl,{}).fromJSON;function a(i){var d=i.host,c=r(t),v={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.Token",url:io({protoPath:"/v1/oauth/token",data:c,host:d}),data:c,transformResponse:n};return v}return a.fromReq=o,a.__isAmbassador=!0,a}function Ba(t){var e=ae(Rl,{}),r=e.toJSON,o=e.fromJSON,n=ae(ql,{}).fromJSON;function a(i){var d=i.host,c=r(t),v={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"GET",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.DeviceCode",url:io({protoPath:"/v1/oauth/device/code",data:c,host:d}),params:Wt(c),transformResponse:n};return v}return a.fromReq=o,a.__isAmbassador=!0,a}function ja(t){var e=ae(Il,{}),r=e.toJSON,o=e.fromJSON,n=ae(kl,{}).fromJSON;function a(i){var d=i.host,c=r(t),v={entityFqdn:"wix.identity.oauth.v1.refresh_token",method:"POST",methodFqn:"wix.identity.oauth2.v1.Oauth2Ng.RevokeRefreshToken",url:io({protoPath:"/v1/oauth/revoke",data:c,host:d}),data:c,transformResponse:n};return v}return a.fromReq=o,a.__isAmbassador=!0,a}var Me=G(le(),1);s();var Ja=C.object({deviceCode:C.string(),verificationUri:C.string().url(),userCode:C.string(),expiresIn:C.number()}),co=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})),lo=C.object({userId:C.string().uuid(),email:C.string().email()}),Ga=C.object({account:C.object({slug:C.string(),accountId:C.string().uuid(),accountOwner:C.string().uuid()})}),$a=C.object({accessToken:C.string(),refreshToken:C.string(),expiresIn:C.number(),issuedAt:C.number()}),za=$a.extend({userInfo:lo}),Wa=C.object({token:C.string(),accountId:C.string().uuid(),userInfo:C.object({userId:C.string().uuid(),email:C.string()})});var{InvalidResponseData:Dl,FailedToGetAuthToken:Ul,FailedToGetDeviceCode:Ll,FailedToRenewAuthToken:Ml,FailedToRenewAuthTokenSiteNotFound:Hl,FailedToRevokeRefreshToken:Bl}=$,po="6f95cec8-3e98-48b9-b4e5-1fb92fcd9973",Va=()=>Math.floor(Date.now()/1e3),ot=class extends Error{},Vt=(0,Me.variant)({TokenRenewed:(0,Me.payload)(),RefreshTokenRevoked:(0,Me.fields)()}),fo=class{constructor(e){this.httpClient=e;let{minRetryTimeout:r}=Oe();this.retryOptions={retries:3,minTimeout:r,maxTimeout:3*1e3}}retryOptions;async requestDeviceCode(e={}){try{let{data:r}=await tt(()=>this.httpClient.request(Ba({...e,clientId:po})),this.retryOptions);return Ja.parse(r)}catch(r){throw new P({code:Ll(),cause:r})}}async createToken(e){try{let r={clientId:po,grantType:"urn:ietf:params:oauth:grant-type:device_code",scope:"offline_access",...e};return{...await tt(async()=>{let{data:n,requestId:a}=await this.httpClient.request(uo(r)),i=co.safeParse(n);if(i.success)return i.data;throw new P({code:Dl(),cause:i.error,info:{requestId:a,data:n}})},this.retryOptions),issuedAt:Va()}}catch(r){throw et(r)&&(r.response?.data?.message==="Device code is not yet verified"||r.response?.data?.error==="authorization_pending")?new ot("Device code is not yet verified."):new P({code:Ul(),cause:r})}}async renewToken(e){try{let r={clientId:po,grantType:"refresh_token",...e},{data:o}=await tt(()=>this.httpClient.request(uo(r)),this.retryOptions),n=co.parse(o);return Vt.TokenRenewed({...n,issuedAt:Va()})}catch(r){if(et(r)){if(r.response?.status===400&&r.response?.data?.error==="invalid_grant")return Vt.RefreshTokenRevoked({cause:r});if(e.siteId&&r.response?.status===404&&r.response?.data?.details?.applicationError?.code==="SITE_NOT_FOUND")throw new P({code:Hl({siteId:e.siteId}),cause:r})}throw new P({code:Ml(),cause:r})}}async revokeRefreshToken(e,{email:r}){try{let{data:o}=await this.httpClient.request(ja(e));return o}catch(o){throw new P({code:Bl({email:r}),info:{email:r},cause:o})}}async userInfo({accessToken:e}){try{let r=Jt({type:"backoffice",getAppToken:async()=>e}),{data:o}=await r.get("/_serverless/wix-cli-userinfo/userinfo");return lo.parse(o)}catch(r){throw new P({code:$.FailedToGetUserInfo(),cause:r})}}async getMyAccount({token:e}){try{let r=Jt({type:"backoffice",getAppToken:async()=>e}),{data:o}=await r.request(Ha({}));return Ga.parse(o).account}catch(r){throw new P({code:$.FailedToGetMyAccount(),cause:r})}}},he=new fo(Jt({type:"backoffice"}));s();import{unlink as jl,rm as Jl}from"node:fs/promises";import{resolve as nt}from"node:path";var Y=G(le(),1);function Ya(){return nt(nr(),"auth.json")}function Kt(){return nt(nr(),"auth")}function Xa(){return nt(Kt(),"api-key.json")}function Za(){return nt(Kt(),"account.json")}function Gl(t){return nt(Kt(),`${t}.json`)}var Ka=(0,Y.variant)({Authenticated:(0,Y.payload)(),Unauthenticated:{}});async function Qa(){let t=Xa();if(!await ht(t))return Ka.Unauthenticated();let e=await ar(t),r=Wa.parse(e);return Ka.Authenticated(r)}async function ei(t){try{let e=Xa();await sr(e,t)}catch(e){throw new P({code:$.FailedToSaveApiKeyAuthData({cause:e}),cause:e})}}var mo=(0,Y.variant)({Authenticated:(0,Y.fields)(),Unauthenticated:{},Expired:(0,Y.fields)()});async function ti(){let t=Za();if(!await ht(t))return mo.Unauthenticated();let e=await ar(t),r=za.parse(e);return vo(r)?mo.Authenticated(r):mo.Expired(r)}var lv=(0,Y.variant)({Authenticated:(0,Y.fields)(),Unauthenticated:{},Expired:(0,Y.fields)()});async function ho(t,e){try{let r=e?Gl(e):Za();await sr(r,t)}catch(r){throw new P({code:$.FailedToSaveAuthData({cause:r}),cause:r})}}async function Yt(){try{await Jl(Kt(),{recursive:!0,force:!0})}catch(t){throw new P({code:$.FailedToDeleteAuthData({cause:t}),cause:t})}await go()&&await $l()}async function $l(){try{await jl(Ya())}catch(t){throw new P({code:$.FailedToDeleteLegacyAuthData({cause:t}),cause:t})}}async function go(){return ht(Ya())}function vo(t){let e=Math.floor(Date.now()/1e3),r=10*60,o=t.expiresIn-r;return t.issuedAt+o>e}function ri({authData:{token:t,accountId:e,userInfo:r},siteId:o}){return{getAccessToken:async()=>t,getRefreshToken:()=>{throw new Error("API key auth does not support refresh tokens")},getRequestHeaders:()=>({"wix-account-id":e,...o&&{"wix-site-id":o}}),userInfo:r}}var ni={async isLoggedIn({siteId:t}={}){let e=await Qa();return(0,oi.match)(e,{Authenticated:({payload:r})=>ri({authData:r,siteId:t}),Unauthenticated:()=>null})},async login({token:t}){let{accountId:e,accountOwner:r,slug:o}=await he.getMyAccount({token:t}),n={token:t,accountId:e,userInfo:{userId:r,email:o}};return await Yt(),await ei(n),ri({authData:n})}};s();s();s();var yo=class{value;next;constructor(e){this.value=e}},st=class{#e;#t;#r;constructor(){this.clear()}enqueue(e){let r=new yo(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 xo(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 st,r=0,o=()=>{r--,e.size>0&&e.dequeue()()},n=async(d,c,v)=>{r++;let f=(async()=>d(...v))();c(f);try{await f}catch{}o()},a=(d,c,v)=>{e.enqueue(n.bind(void 0,d,c,v)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},i=(d,...c)=>new Promise(v=>{a(d,v,c)});return Object.defineProperties(i,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),i}var ge=G(le(),1);s();s();var He=class extends Error{constructor(e){super(e),this.name="TimeoutError"}},_o=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},si=t=>globalThis.DOMException===void 0?new _o(t):new DOMException(t),ai=t=>{let e=t.reason===void 0?si("This operation was aborted."):t.reason;return e instanceof Error?e:si(e)};function wo(t,e){let{milliseconds:r,fallback:o,message:n,customTimers:a={setTimeout,clearTimeout}}=e,i,c=new Promise((v,f)=>{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&&f(ai(m)),m.addEventListener("abort",()=>{f(ai(m))})}if(r===Number.POSITIVE_INFINITY){t.then(v,f);return}let g=new He;i=a.setTimeout.call(void 0,()=>{if(o){try{v(o())}catch(m){f(m)}return}typeof t.cancel=="function"&&t.cancel(),n===!1?v():n instanceof Error?f(n):(g.message=n??`Promise timed out after ${r} milliseconds`,f(g))},r),(async()=>{try{v(await t)}catch(m){f(m)}})()}).finally(()=>{c.clear()});return c.clear=()=>{a.clearTimeout.call(void 0,i),i=void 0},c}var Ao=Symbol("resolveValue");async function at(t,e={}){let{interval:r=20,timeout:o=Number.POSITIVE_INFINITY,before:n=!0}=e,a,i=!1,d=new Promise((c,v)=>{let f=async()=>{try{let g=await t();if(typeof g=="object"&&g[Ao])c(g[Ao]);else{if(typeof g!="boolean")throw new TypeError("Expected condition to return a boolean");g===!0?c():i||(a=setTimeout(f,r))}}catch(g){v(g)}};n?f():a=setTimeout(f,r)});if(o===Number.POSITIVE_INFINITY)return d;try{return await wo(d,typeof o=="number"?{milliseconds:o}:o)}finally{i=!0,clearTimeout(a)}}at.resolveWith=t=>({[Ao]:t});var ii=t=>1e3*t;async function zl({deviceCode:t,expiresIn:e},{signal:r}){try{let o=await at(async()=>{try{let i=await he.createToken({deviceCode:t});return at.resolveWith(i)}catch(i){if(i instanceof ot)return!1;throw i}},{interval:Oe().waitForLoginInterval??ii(3),timeout:{milliseconds:ii(e),signal:r}}),n=await he.userInfo({accessToken:o.accessToken}),a={...o,userInfo:n};return await Yt(),await ho(a),a}catch(o){throw o instanceof He?new P({code:$.DeviceCodeTimedOut()}):o}}async function ci({refreshToken:t,userInfo:e}){let r=await he.renewToken({refreshToken:t});return(0,ge.isType)(r,Vt.TokenRenewed)&&await ho({...r.payload,userInfo:e}),r}async function Wl(){let t=await ti();return(0,ge.match)(t,{Authenticated:e=>e,Unauthenticated:()=>null,Expired:async e=>{let r=await ci(e);return(0,ge.match)(r,{TokenRenewed:({payload:o})=>({...o,userInfo:e.userInfo}),RefreshTokenRevoked:(0,ge.constant)(null)})}})}function ui({userInfo:t,...e}){let r=xo(1),o={...e};return{getAccessToken:()=>r(async()=>{if(vo(o))return o.accessToken;let n=await ci({...o,userInfo:t});return(0,ge.match)(n,{TokenRenewed:({payload:a})=>(o=a,o.accessToken),RefreshTokenRevoked:({cause:a})=>{throw new P({code:$.FailedToRenewAuthTokenRefreshTokenRevoked(),cause:a})}})}),getRefreshToken:()=>o.refreshToken,userInfo:t}}var it={async isLoggedIn(){let t=await ni.isLoggedIn();if(t)return t;let e=await Wl();return e?ui(e):null},async login({deviceCode:t,signal:e}){let r=await zl(t,{signal:e});return ui(r)}};s();var Di=G(le(),1);import rr from"react";s();import qi from"react";s();function Bv(t){return{evid:5200,src:11,endpoint:"wix-cli",params:t}}function jv(t){return{evid:5201,src:11,endpoint:"wix-cli",params:t}}function di(t){return{evid:5211,src:11,endpoint:"wix-cli",params:t}}function bo(t){return{evid:5212,src:11,endpoint:"wix-cli",params:t}}var Pi=G(le(),1);var li={"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 V,{useState as ap}from"react";s();var Ei=G(Ti(),1);s();var Si=G(jt(),1);async function Oi(t,e){await(0,Si.createHttpClient)().post(t,void 0,{params:{url:e}})}async function Fi(t){let{userBrowserTestEndpoint:e}=Oe();e?await Oi(e,t):await(0,Ei.default)(t,{background:!0})}var Ri=({userCode:t,verificationUri:e})=>{let{reportError:r}=dr(),[o,n]=ap(null);return Ho((a,i)=>{i.return&&Fi(e).catch(d=>{r(d),n(d)})}),V.createElement(V.Fragment,null,V.createElement(Fe,{i18nKey:"login.instructions_title"}),V.createElement(ee,{flexDirection:"column",marginTop:1,marginBottom:1,marginLeft:2},V.createElement(Fe,{i18nKey:"login.instructions_details",components:[V.createElement(_,{skin:"legacyBlue"}),V.createElement(jo,{value:"enter"}),V.createElement(ur,{url:e})],values:{code:t}})),o&&V.createElement(V.Fragment,null,V.createElement(ee,{flexDirection:"column",marginBottom:1},V.createElement(no,{error:o})),V.createElement(Fe,{i18nKey:"login.error_opening_browser",components:[V.createElement(ur,{url:e})]})))};var Ni=({loginFn:t,onLogin:e,onError:r})=>{let o=cr();function n(d){o.report(bo({isSuccess:!1,...d instanceof Error?{errorType:d.name}:{errorType:"unknown",errorMessage:JSON.stringify(d)}})),r(d)}let a=Go(async({signal:d},c)=>{try{let v=await t({deviceCode:c,signal:d});o.report(bo({isSuccess:!0})),e(v)}catch(v){n(v)}}),{status:i}=Ee(async()=>(o.report(di({})),he.requestDeviceCode()),[],{onSuccess:d=>{a.execute(d)},onError:n});return(0,Pi.match)(i,{Error:()=>null,Loading:()=>qi.createElement(gt,null),Success:({result:{userCode:d,verificationUri:c}})=>qi.createElement(Ri,{userCode:d,verificationUri:c})})};s();var Ii=G(le(),1);import tr from"react";var ki=({children:t})=>{let{status:e}=Ee(go,[],{onError:()=>{}});return(0,Ii.match)(e,{Error:()=>null,Loading:()=>null,Success:({result:r})=>tr.createElement(tr.Fragment,null,r&&tr.createElement(ee,{marginBottom:1},tr.createElement(Fe,{i18nKey:"login.legacy_auth_notice"})),t)})};var Ui=({authStrategy:{login:t,isLoggedIn:e},onLogin:r,onError:o,children:n})=>{let{status:a,merge:i}=Ee(e,[],{onSuccess:d=>{d&&r(d)},onError:o});return(0,Di.match)(a,{Loading:()=>rr.createElement(gt,null),Error:()=>null,Success:({result:d})=>d===null?rr.createElement($o,{messages:li},rr.createElement(ki,null,rr.createElement(Ni,{loginFn:t,onLogin:c=>{i({result:c}),r(c)},onError:o}))):n(d)})};var ip=({children:t,onError:e,onLogin:r})=>{let o=Jo();return Li.createElement(Ui,{authStrategy:it,onLogin:({userInfo:n})=>r?.(n),onError:e??o},({getAccessToken:n,getRequestHeaders:a,userInfo:i})=>Li.createElement($t.Provider,{value:{getAccessToken:n,getRequestHeaders:a,userInfo:i}},t))};s();s();import{useContext as up}from"react";function cp(){let t=up($t);if(!t)throw new Error("useAuth() cannot be used without an <AuthProvider>");return t}var{isLoggedIn:Wy}=it;export{tt as a,zt as b,Wt as c,ae as d,jt as e,et as f,Jt as g,He as h,at as i,cp as j,Ji as k,cr as l,Bv as m,jv as n,Fi as o,no as p,Wi as q,dr as r,ip as s,Wy as t};
22
22
  /*! Bundled license information:
23
23
 
24
24
  base-64/base64.js:
25
25
  (*! https://mths.be/base64 v1.0.0 by @mathias | MIT license *)
26
26
  */
27
- //# sourceMappingURL=chunk-LKXDY7ME.js.map
27
+ //# sourceMappingURL=chunk-YKE3BZS3.js.map