tt-minigame-ide-cli 2.0.8 → 2.0.10

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("form-data"),require("fs-extra"),require("deep-clone"),require("chalk"),require("ora"),require("semver-compare"),require("archiver"),require("easy-table"),require("fast-glob"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("unzipper"));else if("function"==typeof define&&define.amd)define(["form-data","fs-extra","deep-clone","chalk","ora","semver-compare","archiver","easy-table","fast-glob","folder-hash","clipboardy","qrcode","qrcode-terminal","unzipper"],t);else{var r="object"==typeof exports?t(require("form-data"),require("fs-extra"),require("deep-clone"),require("chalk"),require("ora"),require("semver-compare"),require("archiver"),require("easy-table"),require("fast-glob"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("unzipper")):t(e["form-data"],e["fs-extra"],e["deep-clone"],e.chalk,e.ora,e["semver-compare"],e.archiver,e["easy-table"],e["fast-glob"],e["folder-hash"],e.clipboardy,e.qrcode,e["qrcode-terminal"],e.unzipper);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(global,((__WEBPACK_EXTERNAL_MODULE__9258__,__WEBPACK_EXTERNAL_MODULE__9849__,__WEBPACK_EXTERNAL_MODULE__469__,__WEBPACK_EXTERNAL_MODULE__1606__,__WEBPACK_EXTERNAL_MODULE__8838__,__WEBPACK_EXTERNAL_MODULE__7086__,__WEBPACK_EXTERNAL_MODULE__3732__,__WEBPACK_EXTERNAL_MODULE__6883__,__WEBPACK_EXTERNAL_MODULE__9508__,__WEBPACK_EXTERNAL_MODULE__2896__,__WEBPACK_EXTERNAL_MODULE__1887__,__WEBPACK_EXTERNAL_MODULE__3727__,__WEBPACK_EXTERNAL_MODULE__4563__,__WEBPACK_EXTERNAL_MODULE__2541__)=>(()=>{var __webpack_modules__={5881:e=>{var t=1e3,r=60*t,n=60*r,o=24*n;function i(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,a){a=a||{};var s,u,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(i){var a=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===c&&isFinite(e))return a.long?(s=e,(u=Math.abs(s))>=o?i(s,u,o,"day"):u>=n?i(s,u,n,"hour"):u>=r?i(s,u,r,"minute"):u>=t?i(s,u,t,"second"):s+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=n?Math.round(e/n)+"h":i>=r?Math.round(e/r)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5130:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})(),t.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"],t.log=console.debug||console.log||(()=>{}),e.exports=r(7123)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7123:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,i,a=null;function s(...e){if(!s.enabled)return;const n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];r=i.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(5881),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},445:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(5130):e.exports=r(8414)},8414:(e,t,r)=>{const n=r(6224),o=r(3837);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(o.format(...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:o}=this;if(o){const t=this.color,o="[3"+(t<8?t:"8;5;"+t),i=` ${o};1m${n} `;r[0]=i+r[0].split("\n").join("\n"+i),r.push(o+"m+"+e.exports.humanize(this.diff)+"")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=o.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=r(7013);e&&(e.stderr||e).level>=2&&(t.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(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=r(7123)(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}},8137:e=>{"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)}},8223:function(e,t,r){e.exports=(r(2081),r(6113),function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(34)},function(e,t,r){var n=r(29)("wks"),o=r(33),i=r(2).Symbol,a="function"==typeof i;(e.exports=function(e){return n[e]||(n[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=n},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){var n=r(9);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){e.exports=!r(24)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(12),o=r(17);e.exports=r(4)?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t){var r=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(14);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports={}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){var n=r(3),o=r(26),i=r(32),a=Object.defineProperty;t.f=r(4)?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),o)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(42),o=r(15);e.exports=function(e){return n(o(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(9),o=r(2).document,i=n(o)&&n(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(12).f,o=r(8),i=r(1)("toStringTag");e.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t,r){var n=r(29)("keys"),o=r(33);e.exports=function(e){return n[e]||(n[e]=o(e))}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(11),o=r(1)("toStringTag"),i="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?r:i?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){var n=r(2),o=r(6),i=r(7),a=r(5),s="prototype",u=function(e,t,r){var c,l,f,p=e&u.F,d=e&u.G,h=e&u.S,_=e&u.P,v=e&u.B,E=e&u.W,m=d?o:o[t]||(o[t]={}),y=m[s],g=d?n:h?n[t]:(n[t]||{})[s];for(c in d&&(r=t),r)(l=!p&&g&&void 0!==g[c])&&c in m||(f=l?g[c]:r[c],m[c]=d&&"function"!=typeof g[c]?r[c]:v&&l?i(f,n):E&&g[c]==f?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[s]=e[s],t}(f):_&&"function"==typeof f?i(Function.call,f):f,_&&((m.virtual||(m.virtual={}))[c]=f,e&u.R&&y&&!y[c]&&a(y,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){e.exports=r(2).document&&document.documentElement},function(e,t,r){e.exports=!r(4)&&!r(24)((function(){return 7!=Object.defineProperty(r(16)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){"use strict";var n=r(28),o=r(23),i=r(57),a=r(5),s=r(8),u=r(10),c=r(45),l=r(18),f=r(52),p=r(1)("iterator"),d=!([].keys&&"next"in[].keys()),h="keys",_="values",v=function(){return this};e.exports=function(e,t,r,E,m,y,g){c(r,t,E);var b,O,A,w=function(e){if(!d&&e in P)return P[e];switch(e){case h:case _:return function(){return new r(this,e)}}return function(){return new r(this,e)}},I=t+" Iterator",C=m==_,S=!1,P=e.prototype,L=P[p]||P["@@iterator"]||m&&P[m],T=L||w(m),R=m?C?w("entries"):T:void 0,D="Array"==t&&P.entries||L;if(D&&(A=f(D.call(new e)))!==Object.prototype&&(l(A,I,!0),n||s(A,p)||a(A,p,v)),C&&L&&L.name!==_&&(S=!0,T=function(){return L.call(this)}),n&&!g||!d&&!S&&P[p]||a(P,p,T),u[t]=T,u[I]=v,m)if(b={values:C?T:w(_),keys:y?T:w(h),entries:R},g)for(O in b)O in P||i(P,O,b[O]);else o(o.P+o.F*(d||S),t,b);return b}},function(e,t){e.exports=!0},function(e,t,r){var n=r(2),o="__core-js_shared__",i=n[o]||(n[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,r){var n,o,i,a=r(7),s=r(41),u=r(25),c=r(16),l=r(2),f=l.process,p=l.setImmediate,d=l.clearImmediate,h=l.MessageChannel,_=0,v={},E="onreadystatechange",m=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},y=function(e){m.call(e.data)};p&&d||(p=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return v[++_]=function(){s("function"==typeof e?e:Function(e),t)},n(_),_},d=function(e){delete v[e]},"process"==r(11)(f)?n=function(e){f.nextTick(a(m,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=y,n=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(n=function(e){l.postMessage(e+"","*")},l.addEventListener("message",y,!1)):n=E in c("script")?function(e){u.appendChild(c("script"))[E]=function(){u.removeChild(this),m.call(e)}}:function(e){setTimeout(a(m,e,1),0)}),e.exports={set:p,clear:d}},function(e,t,r){var n=r(20),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t,r){var n=r(9);e.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){"use strict";function n(e){return(0,s.createHash)("sha256").update(e).digest("hex")}function o(e){switch(u){case"darwin":return e.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error("Unsupported platform: "+process.platform)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(r(35));t.machineIdSync=function(e){var t=o((0,a.execSync)(c[u]).toString());return e?t:n(t)},t.machineId=function(e){return new i.default((function(t,r){return(0,a.exec)(c[u],{},(function(i,a,s){if(i)return r(new Error("Error while obtaining machine id: "+i.stack));var u=o(a.toString());return t(e?u:n(u))}))}))};var a=r(70),s=r(71),u=process.platform,c={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(e,t,r){e.exports={default:r(36),__esModule:!0}},function(e,t,r){r(66),r(68),r(69),r(67),e.exports=r(6).Promise},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){var n=r(13),o=r(31),i=r(62);e.exports=function(e){return function(t,r,a){var s,u=n(t),c=o(u.length),l=i(a,c);if(e&&r!=r){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===r)return e||l||0;return!e&&-1}}},function(e,t,r){var n=r(7),o=r(44),i=r(43),a=r(3),s=r(31),u=r(64),c={},l={};t=e.exports=function(e,t,r,f,p){var d,h,_,v,E=p?function(){return e}:u(e),m=n(r,f,t?2:1),y=0;if("function"!=typeof E)throw TypeError(e+" is not iterable!");if(i(E)){for(d=s(e.length);d>y;y++)if((v=t?m(a(h=e[y])[0],h[1]):m(e[y]))===c||v===l)return v}else for(_=E.call(e);!(h=_.next()).done;)if((v=o(_,m,h.value,t))===c||v===l)return v},t.BREAK=c,t.RETURN=l},function(e,t){e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){var n=r(11);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){var n=r(10),o=r(1)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||i[o]===e)}},function(e,t,r){var n=r(3);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){"use strict";var n=r(49),o=r(17),i=r(18),a={};r(5)(a,r(1)("iterator"),(function(){return this})),e.exports=function(e,t,r){e.prototype=n(a,{next:o(1,r)}),i(e,t+" Iterator")}},function(e,t,r){var n=r(1)("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i=[7],a=i[n]();a.next=function(){return{done:r=!0}},i[n]=function(){return a},e(i)}catch(e){}return r}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){var n=r(2),o=r(30).set,i=n.MutationObserver||n.WebKitMutationObserver,a=n.process,s=n.Promise,u="process"==r(11)(a);e.exports=function(){var e,t,r,c=function(){var n,o;for(u&&(n=a.domain)&&n.exit();e;){o=e.fn,e=e.next;try{o()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(u)r=function(){a.nextTick(c)};else if(i){var l=!0,f=document.createTextNode("");new i(c).observe(f,{characterData:!0}),r=function(){f.data=l=!l}}else if(s&&s.resolve){var p=s.resolve();r=function(){p.then(c)}}else r=function(){o.call(n,c)};return function(n){var o={fn:n,next:void 0};t&&(t.next=o),e||(e=o,r()),t=o}}},function(e,t,r){var n=r(3),o=r(50),i=r(22),a=r(19)("IE_PROTO"),s=function(){},u="prototype",c=function(){var e,t=r(16)("iframe"),n=i.length;for(t.style.display="none",r(25).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c[u][i[n]];return c()};e.exports=Object.create||function(e,t){var r;return null!==e?(s[u]=n(e),r=new s,s[u]=null,r[a]=e):r=c(),void 0===t?r:o(r,t)}},function(e,t,r){var n=r(12),o=r(3),i=r(54);e.exports=r(4)?Object.defineProperties:function(e,t){o(e);for(var r,a=i(t),s=a.length,u=0;s>u;)n.f(e,r=a[u++],t[r]);return e}},function(e,t,r){var n=r(55),o=r(17),i=r(13),a=r(32),s=r(8),u=r(26),c=Object.getOwnPropertyDescriptor;t.f=r(4)?c:function(e,t){if(e=i(e),t=a(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return o(!n.f.call(e,t),e[t])}},function(e,t,r){var n=r(8),o=r(63),i=r(19)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,r){var n=r(8),o=r(13),i=r(39)(!1),a=r(19)("IE_PROTO");e.exports=function(e,t){var r,s=o(e),u=0,c=[];for(r in s)r!=a&&n(s,r)&&c.push(r);for(;t.length>u;)n(s,r=t[u++])&&(~i(c,r)||c.push(r));return c}},function(e,t,r){var n=r(53),o=r(22);e.exports=Object.keys||function(e){return n(e,o)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){var n=r(5);e.exports=function(e,t,r){for(var o in t)r&&e[o]?e[o]=t[o]:n(e,o,t[o]);return e}},function(e,t,r){e.exports=r(5)},function(e,t,r){var n=r(9),o=r(3),i=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=r(7)(Function.call,r(51).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return i(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:i}},function(e,t,r){"use strict";var n=r(2),o=r(6),i=r(12),a=r(4),s=r(1)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:n[e];a&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,r){var n=r(3),o=r(14),i=r(1)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||null==(r=n(a)[i])?t:o(r)}},function(e,t,r){var n=r(20),o=r(15);e.exports=function(e){return function(t,r){var i,a,s=String(o(t)),u=n(r),c=s.length;return u<0||u>=c?e?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):i:e?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(e,t,r){var n=r(20),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=n(e))<0?o(e+t,0):i(e,t)}},function(e,t,r){var n=r(15);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(21),o=r(1)("iterator"),i=r(10);e.exports=r(6).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[n(e)]}},function(e,t,r){"use strict";var n=r(37),o=r(47),i=r(10),a=r(13);e.exports=r(27)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])}),"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(e,t){},function(e,t,r){"use strict";var n,o,i,a=r(28),s=r(2),u=r(7),c=r(21),l=r(23),f=r(9),p=(r(3),r(14)),d=r(38),h=r(40),_=(r(58).set,r(60)),v=r(30).set,E=r(48)(),m="Promise",y=s.TypeError,g=s.process,b=s[m],O="process"==c(g=s.process),A=function(){},w=!!function(){try{var e=b.resolve(1),t=(e.constructor={})[r(1)("species")]=function(e){e(A,A)};return(O||"function"==typeof PromiseRejectionEvent)&&e.then(A)instanceof t}catch(e){}}(),I=function(e,t){return e===t||e===b&&t===i},C=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},S=function(e){return I(b,e)?new P(e):new o(e)},P=o=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw y("Bad Promise constructor");t=e,r=n})),this.resolve=p(t),this.reject=p(r)},L=function(e){try{e()}catch(e){return{error:e}}},T=function(e,t){if(!e._n){e._n=!0;var r=e._c;E((function(){for(var n=e._v,o=1==e._s,i=0,a=function(t){var r,i,a=o?t.ok:t.fail,s=t.resolve,u=t.reject,c=t.domain;try{a?(o||(2==e._h&&j(e),e._h=1),!0===a?r=n:(c&&c.enter(),r=a(n),c&&c.exit()),r===t.promise?u(y("Promise-chain cycle")):(i=C(r))?i.call(r,s,u):s(r)):u(n)}catch(e){u(e)}};r.length>i;)a(r[i++]);e._c=[],e._n=!1,t&&!e._h&&R(e)}))}},R=function(e){v.call(s,(function(){var t,r,n,o=e._v;if(D(e)&&(t=L((function(){O?g.emit("unhandledRejection",o,e):(r=s.onunhandledrejection)?r({promise:e,reason:o}):(n=s.console)&&n.error&&n.error("Unhandled promise rejection",o)})),e._h=O||D(e)?2:1),e._a=void 0,t)throw t.error}))},D=function(e){if(1==e._h)return!1;for(var t,r=e._a||e._c,n=0;r.length>n;)if((t=r[n++]).fail||!D(t.promise))return!1;return!0},j=function(e){v.call(s,(function(){var t;O?g.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),T(t,!0))},x=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw y("Promise can't be resolved itself");(t=C(e))?E((function(){var n={_w:r,_d:!1};try{t.call(e,u(x,n,1),u(N,n,1))}catch(e){N.call(n,e)}})):(r._v=e,r._s=1,T(r,!1))}catch(e){N.call({_w:r,_d:!1},e)}}};w||(b=function(e){d(this,b,m,"_h"),p(e),n.call(this);try{e(u(x,this,1),u(N,this,1))}catch(e){N.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(56)(b.prototype,{then:function(e,t){var r=S(_(this,b));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=O?g.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&T(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),P=function(){var e=new n;this.promise=e,this.resolve=u(x,e,1),this.reject=u(N,e,1)}),l(l.G+l.W+l.F*!w,{Promise:b}),r(18)(b,m),r(59)(m),i=r(6)[m],l(l.S+l.F*!w,m,{reject:function(e){var t=S(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(a||!w),m,{resolve:function(e){if(e instanceof b&&I(e.constructor,this))return e;var t=S(this);return(0,t.resolve)(e),t.promise}}),l(l.S+l.F*!(w&&r(46)((function(e){b.all(e).catch(A)}))),m,{all:function(e){var t=this,r=S(t),n=r.resolve,o=r.reject,i=L((function(){var r=[],i=0,a=1;h(e,!1,(function(e){var s=i++,u=!1;r.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,r[s]=e,--a||n(r))}),o)})),--a||n(r)}));return i&&o(i.error),r.promise},race:function(e){var t=this,r=S(t),n=r.reject,o=L((function(){h(e,!1,(function(e){t.resolve(e).then(r.resolve,n)}))}));return o&&n(o.error),r.promise}})},function(e,t,r){"use strict";var n=r(61)(!0);r(27)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})}))},function(e,t,r){r(65);for(var n=r(2),o=r(5),i=r(10),a=r(1)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=s[u],l=n[c],f=l&&l.prototype;f&&!f[a]&&o(f,a,c),i[c]=i.Array}},function(e,t){e.exports=r(2081)},function(e,t){e.exports=r(6113)}]))},3152:(e,t,r)=>{"use strict";var n=r(7310).parse,o={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},i=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function a(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}t.getProxyForUrl=function(e){var t="string"==typeof e?n(e):e||{},r=t.protocol,s=t.host,u=t.port;if("string"!=typeof s||!s||"string"!=typeof r)return"";if(r=r.split(":",1)[0],!function(e,t){var r=(a("npm_config_no_proxy")||a("no_proxy")).toLowerCase();return!r||"*"!==r&&r.split(/[,\s]/).every((function(r){if(!r)return!0;var n=r.match(/^(.+):(\d+)$/),o=n?n[1]:r,a=n?parseInt(n[2]):0;return!(!a||a===t)||(/^[.*]/.test(o)?("*"===o.charAt(0)&&(o=o.slice(1)),!i.call(e,o)):e!==o)}))}(s=s.replace(/:\d*$/,""),u=parseInt(u)||o[r]||0))return"";var c=a("npm_config_"+r+"_proxy")||a(r+"_proxy")||a("npm_config_proxy")||a("all_proxy");return c&&-1===c.indexOf("://")&&(c=r+"://"+c),c}},7013:(e,t,r)=>{"use strict";const n=r(2037),o=r(6224),i=r(8137),{env:a}=process;let s;function u(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e,t){if(0===s)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!t&&void 0===s)return 0;const r=s||0;if("dumb"===a.TERM)return r;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in a))||"codeship"===a.CI_NAME?1:r;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:r}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?s=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(s=1),"FORCE_COLOR"in a&&(s="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return u(c(e,e&&e.isTTY))},stdout:u(c(!0,o.isatty(1))),stderr:u(c(!0,o.isatty(2)))}},1681:(e,t,r)=>{e.exports=r(7955)},7955:(e,t,r)=>{"use strict";r(1808);var n,o=r(4404),i=r(3685),a=r(5687),s=r(2361),u=(r(9491),r(3837));function c(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||i.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,o){for(var i=f(r,n,o),a=0,s=t.requests.length;a<s;++a){var u=t.requests[a];if(u.host===i.host&&u.port===i.port)return t.requests.splice(a,1),void u.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function l(e,t){var r=this;c.prototype.createSocket.call(r,e,(function(n){var i=e.request.getHeader("host"),a=p({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):e.host}),s=o.connect(0,a);r.sockets[r.sockets.indexOf(n)]=s,t(s)}))}function f(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function p(e){for(var t=1,r=arguments.length;t<r;++t){var n=arguments[t];if("object"==typeof n)for(var o=Object.keys(n),i=0,a=o.length;i<a;++i){var s=o[i];void 0!==n[s]&&(e[s]=n[s])}}return e}t.httpOverHttp=function(e){var t=new c(e);return t.request=i.request,t},t.httpsOverHttp=function(e){var t=new c(e);return t.request=i.request,t.createSocket=l,t.defaultPort=443,t},t.httpOverHttps=function(e){var t=new c(e);return t.request=a.request,t},t.httpsOverHttps=function(e){var t=new c(e);return t.request=a.request,t.createSocket=l,t.defaultPort=443,t},u.inherits(c,s.EventEmitter),c.prototype.addRequest=function(e,t,r,n){var o=this,i=p({request:e},o.options,f(t,r,n));o.sockets.length>=this.maxSockets?o.requests.push(i):o.createSocket(i,(function(t){function r(){o.emit("free",t,i)}function n(e){o.removeSocket(t),t.removeListener("free",r),t.removeListener("close",n),t.removeListener("agentRemove",n)}t.on("free",r),t.on("close",n),t.on("agentRemove",n),e.onSocket(t)}))},c.prototype.createSocket=function(e,t){var r=this,o={};r.sockets.push(o);var i=p({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),n("making CONNECT request");var a=r.request(i);function s(i,s,u){var c;return a.removeAllListeners(),s.removeAllListeners(),200!==i.statusCode?(n("tunneling socket could not be established, statusCode=%d",i.statusCode),s.destroy(),(c=new Error("tunneling socket could not be established, statusCode="+i.statusCode)).code="ECONNRESET",e.request.emit("error",c),void r.removeSocket(o)):u.length>0?(n("got illegal response body from proxy"),s.destroy(),(c=new Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void r.removeSocket(o)):(n("tunneling connection has established"),r.sockets[r.sockets.indexOf(o)]=s,t(s))}a.useChunkedEncodingByDefault=!1,a.once("response",(function(e){e.upgrade=!0})),a.once("upgrade",(function(e,t,r){process.nextTick((function(){s(e,t,r)}))})),a.once("connect",s),a.once("error",(function(t){a.removeAllListeners(),n("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, cause="+t.message);i.code="ECONNRESET",e.request.emit("error",i),r.removeSocket(o)})),a.end()},c.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,(function(e){r.request.onSocket(e)}))}},n=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},t.debug=n},9698:(e,t,r)=>{var n;e.exports=function(){if(!n){try{n=r(445)("follow-redirects")}catch(e){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},4940:(e,t,r)=>{var n=r(7310),o=n.URL,i=r(3685),a=r(5687),s=r(2781).Writable,u=r(9491),c=r(9698),l=!1;try{u(new o)}catch(e){l="ERR_INVALID_URL"===e.code}var f=["auth","host","hostname","href","path","pathname","port","protocol","query","search"],p=["abort","aborted","connect","error","socket","timeout"],d=Object.create(null);p.forEach((function(e){d[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var h=S("ERR_INVALID_URL","Invalid URL",TypeError),_=S("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),v=S("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",_),E=S("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),m=S("ERR_STREAM_WRITE_AFTER_END","write after end"),y=s.prototype.destroy||O;function g(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){try{r._processResponse(e)}catch(e){r.emit("error",e instanceof _?e:new _({cause:e}))}},this._performRequest()}function b(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",a=r[i]=e[n],s=t[n]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,n,a){return o&&e instanceof o?e=I(e):L(e)?e=I(A(e)):(a=n,n=w(e),e={protocol:i}),T(n)&&(a=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,L(n.host)||L(n.hostname)||(n.hostname="::1"),u.equal(n.protocol,i,"protocol mismatch"),c("options",n),new g(n,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=s.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function O(){}function A(e){var t;if(l)t=new o(e);else if(!L((t=w(n.parse(e))).protocol))throw new h({input:e});return t}function w(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new h({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new h({input:e.href||e});return e}function I(e,t){var r=t||{};for(var n of f)r[n]=e[n];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 C(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function S(e,t,r){function n(r){Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function P(e,t){for(var r of p)e.removeListener(r,d[r]);e.on("error",O),e.destroy(t)}function L(e){return"string"==typeof e||e instanceof String}function T(e){return"function"==typeof e}g.prototype=Object.create(s.prototype),g.prototype.abort=function(){P(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},g.prototype.destroy=function(e){return P(this._currentRequest,e),y.call(this,e),this},g.prototype.write=function(e,t,r){if(this._ending)throw new m;if(!(L(e)||"object"==typeof(n=e)&&"length"in n))throw new TypeError("data should be a string, Buffer or Uint8Array");var n;T(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new E),this.abort()):r&&r()},g.prototype.end=function(e,t,r){if(T(e)?(r=e,e=t=null):T(t)&&(r=t,t=null),e){var n=this,o=this._currentRequest;this.write(e,t,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},g.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},g.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},g.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),i()}),e),n(t)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){g.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(g.prototype,e,{get:function(){return this._currentRequest[e]}})})),g.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},g.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(o._redirectable=this,p))o.on(i,d[i]);if(this._currentUrl=/^\//.test(this._options.path)?n.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,u=this._requestBodyBuffers;!function e(t){if(o===s._currentRequest)if(t)s.emit("error",t);else if(a<u.length){var r=u[a++];o.finished||o.write(r.data,r.encoding,e)}else s._ended&&o.end()}()}},g.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r,i=e.headers.location;if(!i||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(P(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new v;var a=this._options.beforeRedirect;a&&(r=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],C(/^content-/i,this._options.headers));var f,p,d=C(/^host$/i,this._options.headers),h=A(this._currentUrl),_=d||h.host,E=/^\w+:/.test(i)?this._currentUrl:n.format(Object.assign(h,{host:_})),m=(f=i,p=E,l?new o(f,p):A(n.resolve(p,f)));if(c("redirecting to",m.href),this._isRedirect=!0,I(m,this._options),(m.protocol!==h.protocol&&"https:"!==m.protocol||m.host!==_&&!function(e,t){u(L(e)&&L(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(m.host,_))&&C(/^(?:authorization|cookie)$/i,this._options.headers),T(a)){var y={headers:e.headers,statusCode:t},g={url:E,method:s,headers:r};a(this._options,y,g),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=b({http:i,https:a}),e.exports.wrap=b},2747:function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QRCodeError=t.SchemaError=t.CompileError=t.UploadError=t.CompressError=t.PackageSizeError=t.ProjectError=t.HashError=t.MetaError=t.LoginError=t.IDE_ERROR_LEVEL=void 0,t.IDE_ERROR_LEVEL={p0:"p0",p1:"p1",p2:"p2",p3:"p3"};var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Login Error",t}return n(t,e),t}(Error);t.LoginError=o;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Meta Error",t}return n(t,e),t}(Error);t.MetaError=i;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Hash Error",t}return n(t,e),t}(Error);t.HashError=a;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Project Error",t}return n(t,e),t}(Error);t.ProjectError=s;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="PackageSize Error",t}return n(t,e),t}(Error);t.PackageSizeError=u;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Compress Error",t}return n(t,e),t}(Error);t.CompressError=c;var l=function(e){function t(t,r){void 0===r&&(r=-1);var n=e.call(this,t)||this;return n.name="Upload Error",n.code=r,n}return n(t,e),t}(Error);t.UploadError=l;var f=function(e){function t(t,r,n){void 0===r&&(r=""),void 0===n&&(n=0);var o=e.call(this,t)||this;return o.name="Compile Error",o.errLink=r,o.code=n,o}return n(t,e),t}(Error);t.CompileError=f;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Schema Error",t}return n(t,e),t}(Error);t.SchemaError=p;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="QRCode Error",t}return n(t,e),t}(Error);t.QRCodeError=d},2139:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FRONT_PAGE_EVENT=t.IDE_PERFORMANCE_EVENTS=t.IDE_TIMELINE_NAMES=t.IDE_MODULES=t.SLARDAR_EVENT=void 0;var o=r(8039);t.SLARDAR_EVENT=n(n(n({},o.UPDATE_SLARDAR_EVENTS),o.UPDATE_SLARDAR_EVENTS_TECH),{VELA_CLICK_PREVIEW:"VELA_CLICK_PREVIEW",VELA_PREVIEW_FAIL:"VELA_PREVIEW_FAIL",VELA_CLICK_UPLOAD:"VELA_CLICK_UPLOAD",UPLOAD_VERSION_FOCUS:"UPLOAD_VERSION_FOCUS",UPLOAD_VERSION_ERROR:"UPLOAD_VERSION_ERROR",VELA_UPLOAD_FAIL:"VELA_UPLOAD_FAIL",VELA_SHOW_INIT_VIEW_TIME:"VELA_SHOW_INIT_VIEW_TIME",VELA_PREVIEW_TIME:"VELA_PREVIEW_TIME",VELA_UPLOAD_TIME:"VELA_UPLOAD_TIME",VELA_COMPILE_FIRST_END:"VELA_COMPILE_FIRST_END",VELA_COMPILE_TIME:"VELA_COMPILE_TIME",IDE_COMPILE_PERFORMANCE:"IDE_COMPILE_PERFORMANCE",IDE_COMPILE_RESULT:"IDE_COMPILE_RESULT",VELA_SIMULATOR_RENDER_TIME:"VELA_SIMULATOR_RENDER_TIME",VELA_SIMULATOR_FIRST_RENDER_SUCCESS:"VELA_SIMULATOR_FIRST_RENDER_SUCCESS",VELA_AUDIT_SCORE:"VELA_AUDIT_SCORE",MENU_BAR_DEBUG_SETTING_SAVE:"MENU_BAR_DEBUG_SETTING_SAVE",MENU_BAR_DEBUG_SETTING_SAVE_FAIL:"MENU_BAR_DEBUG_SETTING_SAVE_FAIL",MENU_BAR_DEBUG_APPLY_TEST_TMA:"MENU_BAR_DEBUG_APPLY_TEST_TMA",MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL:"MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL",MENU_BAR_DEBUG_APPLY_BOE:"MENU_BAR_DEBUG_APPLY_BOE",MENU_BAR_DEBUG_APPLY_BOE_FAIL:"MENU_BAR_DEBUG_APPLY_BOE_FAIL",MENU_BAR_DEBUG_APPLY_PPE:"MENU_BAR_DEBUG_APPLY_PPE",MENU_BAR_DEBUG_APPLY_PPE_FAIL:"MENU_BAR_DEBUG_APPLY_PPE_FAIL",VELA_POST_MESSAGE_LIST:"VELA_POST_MESSAGE_LIST",VELA_POST_MESSAGE_LIST_FAIL:"VELA_POST_MESSAGE_LIST_FAIL",VELA_AVATAR_LOGOUT:"VELA_AVATAR_LOGOUT",VELA_AVATAR_LOGOUT_FAIL:"VELA_AVATAR_LOGOUT_FAIL",VELA_CLEAR_ALL_SESSION:"VELA_CLEAR_ALL_SESSION",VELA_CLEAR_ALL_SESSION_FAIL:"VELA_CLEAR_ALL_SESSION_FAIL",VELA_CLEAR_DATA_SESSION:"VELA_CLEAR_DATA_SESSION",VELA_CLEAR_DATA_SESSION_FAIL:"VELA_CLEAR_DATA_SESSION_FAIL",VELA_CLEAR_LOGIN_SESSION:"VELA_CLEAR_LOGIN_SESSION",VELA_CLEAR_LOGIN_SESSION_FAIL:"VELA_CLEAR_LOGIN_SESSION_FAIL",VELA_CLEAR_AUTH_SESSION:"VELA_CLEAR_AUTH_SESSION",VELA_CLEAR_AUTH_SESSION_FAIL:"VELA_CLEAR_AUTH_SESSION_FAIL",VELA_ADD_COMPILE_MODE:"VELA_ADD_COMPILE_MODE",VELA_ADD_COMPILE_MODE_FAIL:"VELA_ADD_COMPILE_MODE_FAIL",VELA_COMPILE:"VELA_COMPILE",VELA_COMPILE_FAIL:"VELA_COMPILE_FAIL",VELA_CHANGE_COMPILE_MODE:"VELA_CHANGE_COMPILE_MODE",VELA_CHANGE_COMPILE_MODE_FAIL:"VELA_CHANGE_COMPILE_MODE_FAIL",VELA_SELECT_SDK:"VELA_SELECT_SDK",VELA_SELECT_SDK_FAIL:"VELA_SELECT_SDK_FAIL",VELA_CLICK_CONVERT_TOOL:"VELA_CLICK_CONVERT_TOOL",VELA_CONVERT_EMIT:"VELA_CONVERT_EMIT",VELA_OPEN_PROJECT_FROM_CONVERT_TOOL:"VELA_OPEN_PROJECT_FROM_CONVERT_TOOL",VELA_BUILD_NPM:"VELA_BUILD_NPM",VELA_BUILD_NPM_FAIL:"VELA_BUILD_NPM_FAIL",PACKAGE_SIZE:"PACKAGE_SIZE",UPLOAD_SUCCESS_EVENT:"UPLOAD_SUCCESS_EVENT",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL",IDE_GET_SDK_LIST_FAIL:"IDE_GET_SDK_LIST_FAIL",IDE_REQUEST_START:"IDE_REQUEST_START",IDE_REQUEST_FAIL:"IDE_REQUEST_FAIL",IDE_COLOR_THEME:"IDE_COLOR_THEME",IDE_CODE_WINDOW_ERROR:"IDE_CODE_WINDOW_ERROR",IDE_HELP_DEVELOPER_COMMUNITY:"IDE_HELP_DEVELOPER_COMMUNITY",IDE_MESSAGE_EXPAND_CLICK:"IDE_MESSAGE_EXPAND_CLICK",IDE_MODULE_CLICK:"IDE_MODULE_CLICK",IDE_MODULE_USAGE:"IDE_MODULE_USAGE",IDE_MODULE_LOADTIME:"IDE_MODULE_LOADTIME",IDE_MODULE_PERFORMANCE:"IDE_MODULE_PERFORMANCE",IDE_PERFORMANCE:"IDE_PERFORMANCE",IDE_DEVICE_INFO_DISPLAY:"IDE_DEVICE_INFO_DISPLAY",IDE_DEVICE_INFO_CPU:"IDE_DEVICE_INFO_CPU",IDE_DEVICE_INFO_OS:"IDE_DEVICE_INFO_OS",IDE_SIMULATOR_LOAD_TIME:"IDE_SIMULATOR_LOAD_TIME",IDE_MENU_CLICK:"IDE_MENU_CLICK",IDE_LANGUAGE:"IDE_LANGUAGE",IDE_ROOM_SERVICE_TRACE:"IDE_ROOM_SERVICE_TRACE",IDE_UPDATE_STEP_ERROR:"IDE_UPDATE_STEP_ERROR",IDE_SCENE_START:"IDE_SCENE_START",IDE_SCENE_END:"IDE_SCENE_END",IDE_APPID_SELECT:"IDE_APPID_SELECT",IDE_APPID_CHANGE:"IDE_APPID_CHANGE",IDE_FMP_BREAKDOWN:"IDE_FMP_BREAKDOWN",IDE_JS_LONG_TASK:"IDE_JS_LONG_TASK",IDE_INP_INFO:"IDE_INP_INFO",IDE_LOW_FPS:"IDE_LOW_FPS",IDE_LOW_MEMORY:"IDE_LOW_MEMORY",IDE_FETCH_ADMIN_XCONFIG_TMAR:"IDE_FETCH_ADMIN_XCONFIG_TMAR",IDE_BIG_PACKAGESIZE_CHECK:"IDE_BIG_PACKAGESIZE_CHECK",IDE_WORKBENCH_WILL_RENDER:"IDE_WORKBENCH_WILL_RENDER",IDE_WORKBENCH_RENDERED:"IDE_WORKBENCH_RENDERED",IDE_CODE_WINDOW_NUM:"IDE_CODE_WINDOW_NUM",IDE_NEW_CODE_WINDOW:"IDE_NEW_CODE_WINDOW",IDE_DETAIL_PANEL_OPENED:"IDE_DETAIL_PANEL_OPENED",IDE_DETAIL_PANEL_CLOSED:"IDE_DETAIL_PANEL_CLOSED",IDE_SETTING_PAGE_SHOW:"IDE_SETTING_PAGE_SHOW",IDE_SETTING_PAGE_OPERATION:"IDE_SETTING_PAGE_OPERATION",IDE_SETTING_CHANGE_LITE_MODE:"IDE_SETTING_CHANGE_LITE_MODE:",IDE_MODULE_CLICK_AUTH_REG:"IDE_MODULE_CLICK_AUTH_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_REG:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL:"IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC",IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS:"IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS",IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY:"IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY",IDE_MODULE_AUTH_SCAN_QRCODE:"IDE_MODULE_AUTH_SCAN_QRCODE",IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON:"IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON",IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE",IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",IDE_FRONTPAGE_PM_LIST:"IDE_FRONTPAGE_PM_LIST",CREATE_PROGRAM:"CREATE_PROGRAM",IDE_WXTOTT_ERROR:"IDE_WXTOTT_ERROR",IDE_SCENE_USER_OPERATE:"IDE_SCENE_USER_OPERATE",IDE_TEMPLATE_HOVER:"IDE_TEMPLATE_HOVER",IDE_TEMPLATE_DETAIL:"IDE_TEMPLATE_DETAIL",IDE_TEMPLATE_ERROR:"IDE_TEMPLATE_ERROR",IDE_TEMPLATE_DOWNLOAD:"IDE_TEMPLATE_DOWNLOAD",IDE_QUICK_JS_ERROR:"IDE_QUICK_JS_ERROR",IDE_REMOTE_DEBUG_CONNECTION_QUALITY:"IDE_REMOTE_DEBUG_CONNECTION_QUALITY",IDE_LOCAL_COMPILE_TRACE:"IDE_LOCAL_COMPILE_TRACE",IDE_REMOTE_DEBUG_EXCEPTION:"IDE_REMOTE_DEBUG_EXCEPTION",IDE_MODULE_AUTH_FORCE_LOGOUT:"IDE_MODULE_AUTH_FORCE_LOGOUT",IDE_CANVAS_WEBGL_CONTEXT_ENABLE:"IDE_CANVAS_WEBGL_CONTEXT_ENABLE",IDE_LOGIN_DATA_FORMAT:"IDE_LOGIN_DATA_FORMAT",IDE_IS_ENCRYPTION_AVAILABLE:"IDE_IS_ENCRYPTION_AVAILABLE",IDE_ADD_COMPILE_MODE:"IDE_ADD_COMPILE_MODE",IDE_DECODE_QRCODE:"IDE_DECODE_QRCODE",IDE_DECODE_URL:"IDE_DECODE_URL",IDE_MAIN_HELPER_FORK_TIME:"IDE_MAIN_HELPER_FORK_TIME",IDE_MAIN_HELPER_ERROR:"IDE_MAIN_HELPER_ERROR",IDE_INSTALL_PATH:"IDE_INSTALL_PATH",IDE_SWITCH_WORKBENCH_MODE:"IDE_SWITCH_WORKBENCH_MODE",IDE_TOGGLE_REMOTE_VIEW:"IDE_TOGGLE_REMOTE_VIEW",IDE_SIMULATOR_PAUSE_MINIAPP:"IDE_SIMULATOR_PAUSE_MINIAPP",IDE_SIMULATOR_REFRESH_MINIAPP:"IDE_SIMULATOR_REFRESH_MINIAPP",IDE_SIMULATOR_REFRESH:"IDE_SIMULATOR_REFRESH",IDE_SIMULATOR_CLICK_LITE_BANNER:"IDE_SIMULATOR_CLICK_LITE_BANNER",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER",IDE_LITE_NOTICE_MODAL_SHOW:"IDE_LITE_NOTICE_MODAL_SHOW",IDE_LITE_NOTICE_MODAL_CLICK:"IDE_LITE_NOTICE_MODAL_CLICK",IDE_WB_SCENE_START:"IDE_WB_SCENE_START",IDE_WB_SCENE_END:"IDE_WB_SCENE_END",IDE_GECKO_ERROR:"IDE_GECKO_ERROR",PUCK_COMPILE_ERROR:"PUCK_COMPILE_ERROR",IDE_DEVTOOLS_PANEL_INIT:"IDE_DEVTOOLS_PANEL_INIT",IDE_DEVTOOLS_SENSORS_PANEL_USAGE:"IDE_DEVTOOLS_SENSORS_PANEL_USAGE",IDE_FRONT_PAGE_CLICK_SETTINGS:"IDE_FRONT_PAGE_CLICK_SETTINGS",IDE_AI_OPEN:"IDE_AI_OPEN",IDE_AI_QUESTION:"IDE_AI_QUESTION",IDE_AI_FEEDBACK:"IDE_AI_FEEDBACK",IDE_AI_OPEN_LINK:"IDE_AI_OPEN_LINK",IDE_DETAIL_CONFIG_ITEM_CLICK:"IDE_DETAIL_CONFIG_ITEM_CLICK",IDE_WORKBENCH_VIEW_STATUS:"IDE_WORKBENCH_VIEW_STATUS",IDE_POWER_EVENT:"IDE_POWER_EVENT",IDE_TASK_PERFORMANCE:"IDE_TASK_PERFORMANCE",IDE_EXCEPTION_RECORD:"IDE_EXCEPTION_RECORD",IDE_PROXY_ERROR_TRACE:"IDE_PROXY_ERROR_TRACE",IDE_EDITOR_RESOLVE_SNIPPET:"IDE_EDITOR_RESOLVE_SNIPPET",IDE_EDITOR_SNIPPET_CREATION:"IDE_EDITOR_SNIPPET_CREATION",IDE_EDITOR_REFERENCE:"IDE_EDITOR_REFERENCE",IDE_EDITOR_COMPLETION_SHOW:"IDE_EDITOR_COMPLETION_SHOW",IDE_MAIN_HELPER_FORK:"IDE_MAIN_HELPER_FORK",IDE_MAIN_HELPER_SPAWN:"IDE_MAIN_HELPER_SPAWN",IDE_MAIN_HELPER_READY:"IDE_MAIN_HELPER_READY"}),t.IDE_MODULES={LOGIN:"LOGIN",MESSAGE:"MESSAGE",SIMULATOR:"SIMULATOR",SIMULATOR_USAGE:"SIMULATOR_USAGE",DEVTOOL:"DEVTOOL",DEVTOOL_USAGE:"DEVTOOL_USAGE",REFRESH:"REFRESH",CLEAR_CACHE:"CLEAR_CACHE",COMPILE_ORDINARY:"COMPILE_ORDINARY",SELF_COMPILE_MODE:"SELF_COMPILE_MODE",COMPILE:"COMPILE",PREVIEW:"PREVIEW",REMOTE_DEBUG:"REMOTE_DEBUG",UPLOAD:"UPLOAD",SIGN_CHECK:"SIGN_CHECK",INTELLIGENCE:"INTELLIGENCE",AI:"AI",SHARE_PROJECT:"SHARE_PROJECT",PROJECT_MANAGE:"PROJECT_MANAGE",PROJECT_DETAIL:"PROJECT_DETAIL",CHECK_THIRD_PART_MINIAPP:"CHECK_THIRD_PART_MINIAPP",NPM_FUNCTION:"NPM_FUNCTION",EDITOR:"EDITOR",WORKBENCH:"WORKBENCH",SETTING:"SETTING",AVATAR:"AVATAR",UPDATE:"UPDATE",EDITOR_SAVE:"EDITOR_SAVE",MAIN_HELPER:"MAIN_HELPER"},t.IDE_TIMELINE_NAMES=n(n({},t.IDE_MODULES),{SIMULATOR_FIRST_LOADING_END:"SIMULATOR_FIRST_LOADING_END",SIMULATOR_LOADING:"SIMULATOR_LOADING",LOCAL_COMPILE:"LOCAL_COMPILE"}),t.IDE_PERFORMANCE_EVENTS={projectmanageCreated:"performance:projectmanageCreated",projectmanageReady:"performance:projectmanageReady",openProject:"performance:openProject",editorReady:"performance:editorReady",workbenchReady:"performance:workbenchReady",simulatorReady:"performance:simulatorReady",simulatorFirstLoadingEnd:"performance:simulatorFirstLoadingEnd",compilePartialEnd:"performance:compilePartialEnd",previewStart:"performance:previewStart",previewCodeReady:"performance:previewCodeReady",uploadStart:"performance:uploadStart",uploadEnd:"performance:uploadEnd",shareStart:"performance:shareStart",shareEnd:"performance:shareEnd",remoteDebugStart:"performance:remoteDebugStart",remoteDebugCodeReady:"performance:remoteDebugCodeReady"},t.FRONT_PAGE_EVENT={VELA_CAPTCHA_REQUEST:"VELA_CAPTCHA_REQUEST",VELA_CAPTCHA_FAIL:"VELA_CAPTCHA_FAIL",VELA_PHONE_CAPTCHA_REQUEST:"VELA_PHONE_CAPTCHA_REQUEST",VELA_PHONE_CAPTCHA_FAIL:"VELA_PHONE_CAPTCHA_FAIL",VELA_PHONE_LOGIN_REQUEST:"VELA_PHONE_LOGIN_REQUEST",VELA_PHONE_LOGIN_FAIL:"VELA_PHONE_LOGIN_FAIL",VELA_MAIL_LOGIN_REQUEST:"VELA_MAIL_LOGIN_REQUEST",VELA_MAIL_LOGIN_FAIL:"VELA_MAIL_LOGIN_FAIL",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_CHECK_EXIST_PROJECT_FAIL:"VELA_CHECK_EXIST_PROJECT_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_CHECK_TEMPLATE_FAIL:"VELA_CHECK_TEMPLATE_FAIL",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_DELETE_PROJECT_FAIL:"VELA_DELETE_PROJECT_FAIL",VELA_IMPORT_PROJECT:"VELA_IMPORT_PROJECT",VELA_IMPORT_PROJECT_FAIL:"VELA_IMPORT_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL:"VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL"}},5833:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompilerPlugin=void 0,(t.CompilerPlugin||(t.CompilerPlugin={})).TYPESCRIPT="typescript"},8039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_SLARDAR_EVENTS_TECH=t.UPDATE_SLARDAR_EVENTS=void 0,t.UPDATE_SLARDAR_EVENTS={IDE_LAUNCH:"IDE_LAUNCH",IDE_UPGRADE_SUGGGEST_POP:"IDE_UPGRADE_SUGGGEST_POP",IDE_UPGRADE_SUGGGEST_POP_CLOSE:"IDE_UPGRADE_SUGGGEST_POP_CLOSE",IDE_UPGRADE_SUGGGEST_POP_NO:"IDE_UPGRADE_SUGGGEST_POP_NO",IDE_UPGRADE_SUGGGEST_POP_YES:"IDE_UPGRADE_SUGGGEST_POP_YES",IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL:"IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL",IDE_UPGRADE_ICON:"IDE_UPGRADE_ICON",IDE_UPGRADE_ICON_CLOSE:"IDE_UPGRADE_ICON_CLOSE",IDE_UPGRADE_ICON_RESTART:"IDE_UPGRADE_ICON_RESTART",IDE_UPGRADE_ICON_VIEWDETAIL:"IDE_UPGRADE_ICON_VIEWDETAIL",IDE_FULLUPGRADE_POP:"IDE_FULLUPGRADE_POP",IDE_FULLUPGRADE_POP_CLOSE:"IDE_FULLUPGRADE_POP_CLOSE",IDE_FULLUPGRADE_POP_NO:"IDE_FULLUPGRADE_POP_NO",IDE_FULLUPGRADE_POP_YESBACK:"IDE_FULLUPGRADE_POP_YESBACK",IDE_FULLUPGRADE_POP_YESONCE:"IDE_FULLUPGRADE_POP_YESONCE",IDE_FULLUPGRADE_POP_VIEWDETAIL:"IDE_FULLUPGRADE_POP_VIEWDETAIL"},t.UPDATE_SLARDAR_EVENTS_TECH={IDE_LOADER_IO_ERROR:"IDE_LOADER_IO_ERROR",IDE_LOADER_INSTALL_RECOVER_ERROR:"IDE_LOADER_INSTALL_RECOVER_ERROR",IDE_LOADER_START_FROM_ENTRY:"IDE_LOADER_START_FROM_ENTRY",IDE_LAUNCH_FAIL:"IDE_LAUNCH_FAIL"}},1061:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},u=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AppJSON=void 0;var l=s(r(9849)),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.__isGame=!1,t}return o(t,e),t.from=function(e){return u(this,void 0,void 0,(function(){var r,n;return c(this,(function(o){switch(o.label){case 0:return[4,l.readJson(e)];case 1:return r=o.sent(),(n=new t(r,e)).__isGame=e.endsWith("game.json"),[2,n]}}))}))},Object.defineProperty(t.prototype,"isGame",{get:function(){return this.__isGame},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subPackages",{get:function(){var e=this.__raw,t=e.subPackages,r=e.subpackages;return t||(void 0===r?[]:r)},enumerable:!1,configurable:!0}),t}(r(4169).JSONContainer);t.AppJSON=f},3652:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},u=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtJSON=void 0;var l=s(r(9849)),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.from=function(e){return u(this,void 0,void 0,(function(){return c(this,(function(r){switch(r.label){case 0:return[4,l.readJson(e)];case 1:return[2,new t(r.sent(),e)]}}))}))},t}(r(4169).JSONContainer);t.ExtJSON=f},4169:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.JSONContainer=void 0;var u=i(r(9849)),c=function(){function e(e,t){this.__raw=e,this.path=t}return Object.defineProperty(e.prototype,"rawJSON",{get:function(){return this.__raw},enumerable:!1,configurable:!0}),e.prototype.getKey=function(e,t){var r;return null!==(r=this.__raw[e])&&void 0!==r?r:t},e.prototype.update=function(e,t,r){return void 0===r&&(r=!1),a(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return this.__raw[e]=t,r?[4,u.writeJson(this.path,this.__raw,{spaces:2})]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},e}();t.JSONContainer=c},8559:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},u=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},l=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},f=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectConfig=t.PrivateState=t.getOriginAppid=t.isTestAppid=t.getIDEAppTechType=t.setIDEAppTechType=t.PROJECT_TYPE_MAP=t.DEFAULT_PROJECT_CONFIG=t.setEnvFunctionForProject=void 0;var d=s(r(9849)),h=s(r(1017)),_=r(1061),v=r(3652),E=r(4169),m=r(5833),y=r(7992),g=p(r(6503)),b=p(r(7921)),O=p(r(772)),A=p(r(3122)),w=p(r(298)),I=p(r(1395)),C=p(r(8337)),S=p(r(5513)),P=function(){return y.defaultEnv};t.setEnvFunctionForProject=function(e){P=e};var L={MICROAPP:"tt07e3715e98c9aac0",MICROGAME:"tt975be1e608633d4202",get TOYBOX(){return"boe"===P().env.type?"tte05d96e07f3bdfe710":"tt3c174aaaa32e0eb810"}};t.DEFAULT_PROJECT_CONFIG={appid:"testappId",projectname:"默认小程序名",setting:{urlCheck:!0,es6:!0,postcss:!0,minified:!0,newFeature:!0},scripts:{afterOpen:"",beforeCompile:""}},t.PROJECT_TYPE_MAP={microapp:"app",microgame:"game",toybox:"toybox"};var T="";t.setIDEAppTechType=function(e){T=e},t.getIDEAppTechType=function(){return T};var R,D="testappid";function j(e,t){return void 0===t&&(t="app"),e.toLocaleLowerCase()===D?(null==T?void 0:T.includes("microapp"))?L.MICROAPP:(null==T?void 0:T.includes("toybox"))?L.TOYBOX:(null==T?void 0:T.includes("microgame"))?L.MICROGAME:"app"===t?L.MICROAPP:L.MICROGAME:e}t.isTestAppid=function(e){return Boolean(e)&&(e===L.MICROAPP||e===L.MICROGAME||e===L.TOYBOX||e.toLowerCase()===D)},t.getOriginAppid=j,function(e){e.ALWAYS="ALWAYS",e.NORMAL="NORMAL"}(R=t.PrivateState||(t.PrivateState={}));var N=function(e){function r(t){var r=t.rawJson,n=t.filepath,o=t.privateConfigPath,i=t.projectPath,a=t.publicJson,s=t.privateJson,u=e.call(this,r,n)||this;return u.projectPath=i,u.privateConfigPath=o,u.publicJson=a,u.privateJson=s,u._enablePrivateConfig=!1,u}return o(r,e),r.getKeyPath=function(){return r._keyPath||(r._keyPath=r.generateList(r.PRIVATE_CONFIG_KEYS)),r._keyPath},r.getKeyPathList=function(){return r.getKeyPath().map((function(e){return e[0]}))},r.generateList=function(e,t){return void 0===t&&(t=""),(0,g.default)(e,(function(e,n,o){var i,a=t?t+"."+o:o;return"string"==typeof(i=n)&&Object.values(R).includes(i)?e.push([a,n]):e.push.apply(e,f([],l(r.generateList(n,a)),!1)),e}),[])},r.from=function(e){return u(this,void 0,void 0,(function(){var t,n,o,i,a,s,u;return c(this,(function(c){switch(c.label){case 0:return t=h.join(e,"project.config.json"),n=h.join(e,"project.private.config.json"),o=d.readJsonSync(t),[4,(i=new r({rawJson:o,filepath:t,projectPath:e,publicJson:o,privateJson:{},privateConfigPath:n})).detectProjectType()];case 1:if("app"===c.sent()){a={};try{s=d.readJSONSync(n),(0,A.default)(s)&&(0,w.default)(s).length>0&&(a=s)}catch(e){}u=this.getMergedConfig(o,a),i.enablePrivateConfig(u,a)}return[2,i]}}))}))},r.fromJson=function(e,t){return new r({rawJson:e,filepath:h.join(t,"project.config.json"),projectPath:t,publicJson:e,privateJson:{},privateConfigPath:h.join(t,"project.private.config.json")})},r.getMergedConfig=function(e,t){var r,n=!0===(null!==(r=t.disablePrivate)&&void 0!==r?r:e.disablePrivate),o=(0,b.default)(e);return this.getKeyPath().forEach((function(e){if(e[1]===R.ALWAYS||!n){var r=(0,O.default)(t,e[0]);void 0!==r&&(0,S.default)(o,e[0],r)}})),o},r.prototype.update=function(t,n,o){var i;return u(this,void 0,void 0,(function(){var a,s,u,l,f,p,h;return c(this,(function(c){switch(c.label){case 0:return this._enablePrivateConfig&&!0===(null!==(i=this.privateJson.disablePrivate)&&void 0!==i?i:this.publicJson.disablePrivate)?[4,e.prototype.update.call(this,t,n,o)]:[3,2];case 1:return c.sent(),[2];case 2:return a=r.getKeyPathList(),s=(0,C.default)(((p={})[t]=n,p),a),u=(0,w.default)(s).length>0,l=(0,I.default)(((h={})[t]=n,h),a),f=(0,w.default)(l).length>0,(0,S.default)(this.__raw,t,n),u&&(0,S.default)(this.privateJson,t,s[t]),f&&(0,S.default)(this.publicJson,t,l[t]),o?f?[4,d.writeJSON(this.path,this.publicJson,{spaces:2})]:[3,4]:[3,7];case 3:c.sent(),c.label=4;case 4:return u?[4,d.ensureFile(this.privateConfigPath)]:[3,7];case 5:return c.sent(),[4,d.writeJson(this.privateConfigPath,this.privateJson,{spaces:2})];case 6:c.sent(),c.label=7;case 7:return[2]}}))}))},r.prototype.enablePrivateConfig=function(e,t){this.privateJson=t,this.__raw=e,this._enablePrivateConfig=!0},r.prototype.getPublicRawJSON=function(){return this.publicJson},r.prototype.getPrivateRawJSON=function(){return this.privateJson},r.prototype.getAppid=function(){var e="";return this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),j(e)},r.prototype.getRealAppid=function(){return u(this,void 0,void 0,(function(){var e,t,r,n;return c(this,(function(o){switch(o.label){case 0:return e="",this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),t=j,r=[e],T?(n=void 0,[3,3]):[3,1];case 1:return[4,this.detectProjectType()];case 2:n=o.sent(),o.label=3;case 3:return[2,e=t.apply(void 0,r.concat([n]))]}}))}))},r.prototype.getSetting=function(){var e;return null!==(e=this.__raw.setting)&&void 0!==e?e:t.DEFAULT_PROJECT_CONFIG.setting},r.prototype.getProjectName=function(){var e;return null!==(e=this.__raw.projectname)&&void 0!==e?e:""},r.prototype.getScripts=function(){var e;return null!==(e=this.__raw.scripts)&&void 0!==e?e:{afterOpen:"",beforeCompile:""}},r.prototype.getConditionData=function(e){var t,r;return null!==(r=null===(t=this.__raw.condition)||void 0===t?void 0:t[e])&&void 0!==r?r:{current:-1,list:[]}},r.prototype.getAutoCompileSetting=function(){var e;return!1!==(null===(e=this.__raw.setting)||void 0===e?void 0:e.autoCompile)},r.prototype.getCompileHotReloadSetting=function(){var e,t=null===(e=this.__raw.setting)||void 0===e?void 0:e.compileHotReLoad,r="native"===this.__raw.douyinProjectType;return t||void 0===t&&r},r.prototype.getNativeCompileSetting=function(){var e;return!1!==(null===(e=this.__raw.setting)||void 0===e?void 0:e.nativeCompile)},r.prototype.getLocalPluginsSetting=function(){var e,t;return null!==(t=null===(e=this.__raw.setting)||void 0===e?void 0:e.localPlugins)&&void 0!==t&&t},r.prototype.getAfterOpenScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.afterOpen},r.prototype.getBeforeCompileScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.beforeCompile},r.prototype.getSkipDomainCheck=function(){var e,t,r;return!(null===(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.urlCheck)||void 0===r||r)},r.prototype.getPreviewHotRestartCache=function(){var e,t,r;return null!==(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.IDEPreviewHotRestartCache)&&void 0!==r&&r},r.prototype.getMiniprogramRoot=function(){var e,t;return null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.miniprogramRoot)&&void 0!==t?t:"./"},r.prototype.getBigPackageSizeSupport=function(){var e,t,r;return null!==(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.bigPackageSizeSupport)&&void 0!==r&&r},r.prototype.detectProjectType=function(e){return u(this,void 0,void 0,(function(){var t;return c(this,(function(r){switch(r.label){case 0:return[4,this.getProjectType()];case 1:return t=r.sent(),[2,e?e===t:t]}}))}))},r.prototype.getProjectType=function(){return u(this,void 0,void 0,(function(){var e,r,n,o,i,a,s,u;return c(this,(function(c){switch(c.label){case 0:return(null==T?void 0:T.includes("microapp"))?[2,"app"]:(null==T?void 0:T.includes("unity"))||(null==T?void 0:T.includes("microgame"))||(null==T?void 0:T.includes("toybox"))?[2,"game"]:this.__raw.ttProjectType?[2,t.PROJECT_TYPE_MAP[this.__raw.ttProjectType]]:(e=this.getMiniprogramRoot(),r=h.join(this.projectPath,e,"app.json"),n=r.replace("app.json","app.ts"),o=r.replace("app.json","app.js"),[4,Promise.all([d.pathExists(r),d.pathExists(o),d.pathExists(n)])]);case 1:if(i=c.sent(),this.useTypeScript()){if(i[0]&&(i[1]||i[2]))return[2,"app"]}else if(i[0]&&i[1])return[2,"app"];return a=r.replace("app.json","game.json"),s=a.replace("game.json","game.js"),[4,Promise.all([d.pathExists(a),d.pathExists(s)])];case 2:if((u=c.sent())[0]&&u[1])return[2,"game"];throw new Error("[ProjectConfig]Bad Project Type")}}))}))},r.prototype.getAppJSON=function(){return u(this,void 0,void 0,(function(){var e,t;return c(this,(function(r){switch(r.label){case 0:return[4,this.detectProjectType("app")];case 1:return e=r.sent()?"app.json":"game.json",t=h.join(this.projectPath,this.getMiniprogramRoot(),e),[4,_.AppJSON.from(t)];case 2:return[2,r.sent()]}}))}))},r.prototype.getExtJSON=function(){return u(this,void 0,void 0,(function(){var e;return c(this,(function(t){switch(t.label){case 0:return e=h.join(this.projectPath,this.getMiniprogramRoot(),"ext.json"),[4,v.ExtJSON.from(e)];case 1:return[2,t.sent()]}}))}))},r.prototype.useTypeScript=function(){var e,t,r;return!!Array.isArray(null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.useCompilerPlugins)&&(null===(r=this.__raw.setting)||void 0===r?void 0:r.useCompilerPlugins.includes(m.CompilerPlugin.TYPESCRIPT))},r.PRIVATE_CONFIG_KEYS={disablePrivate:R.ALWAYS,setting:{urlCheck:R.NORMAL,mockLogin:R.NORMAL,autoPush:R.NORMAL,bigPackageSizeSupport:R.NORMAL,autoCompile:R.NORMAL,compileHotReLoad:R.NORMAL,nativeCompile:R.NORMAL,IDEPreviewHotRestartCache:R.NORMAL},condition:R.NORMAL},r}(E.JSONContainer);t.ProjectConfig=N},6912:function(e,t,r){"use strict";var n,o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultPerfConfigSettings=t.skipReport=t.startTime=t.PROCESS_TYPE=t.compareCacheTriggerCount=t.getModuleUseCache=t.setModuleUseCache=t.timelineMap=t.moduleEventCacheMap=t.getPathname=t.getHref=t.commonParams2Context=t.BID=t.getSystemMemory=t.getCPUModel=void 0;var a=i(r(2037)),s="";function u(){try{return s||(s=a.default.cpus()[0].model)}catch(e){return s="none"}}t.getCPUModel=u;var c="";function l(){try{return c||(c=Math.round(a.default.totalmem()/1024/1024/1024).toString())}catch(e){return c="none"}}function f(e,r,n){t.moduleEventCacheMap[e][r]=n}function p(e,r){var n=t.moduleEventCacheMap[e];return n[r]||(n[r]={count:0,triggerNum:0}),n[r]}t.getSystemMemory=l,t.BID="electron_12345",t.commonParams2Context=function(e,t,r,n){var o,i,a,s,c,f,p,d,h,_,v,E,m,y;return{user_id:String(null!==(o=null==e?void 0:e.userId)&&void 0!==o?o:""),name:null!==(i=null==e?void 0:e.username)&&void 0!==i?i:"",device_id:null==e?void 0:e.deviceId,ide_version:null==e?void 0:e.ideVersion,os_version:null==e?void 0:e.osVersion,os_platform:null==e?void 0:e.osPlatform,dev_app_id:null!=t?t:"",ext_app_id:null!=n?n:"",tech_type:null!=r?r:"",ide_version_number:null!==(s=null===(a=null==e?void 0:e.ideVersionNumber)||void 0===a?void 0:a.toString())&&void 0!==s?s:"",ide_env:null!==(c=null==e?void 0:e.env)&&void 0!==c?c:"",branch:null!==(f=null==e?void 0:e.branch)&&void 0!==f?f:"",build_id:null!==(p=null==e?void 0:e.buildId)&&void 0!==p?p:"",buildId:null!==(d=null==e?void 0:e.buildId)&&void 0!==d?d:"",arch:null===process||void 0===process?void 0:process.arch,ide_version_int:null!==(h=null==e?void 0:e.ideVersionNumber)&&void 0!==h?h:0,is_sandbox:null!==(_=e.isSandbox)&&void 0!==_?_:"0",frameworkType:null!==(v=null==e?void 0:e.frameworkType)&&void 0!==v?v:"",workbench_mode:null!==(E=e.workbenchMode)&&void 0!==E?E:"",e2e_scene:null!==(y=null===(m=null===process||void 0===process?void 0:process.env)||void 0===m?void 0:m.IDE_E2E_SCENE)&&void 0!==y?y:"",cpu_model:u(),system_memory:l()}},t.getHref=function(){try{return window.location.href}catch(e){return""}},t.getPathname=function(){try{return window.location.pathname.split("/dist")[1]}catch(e){return""}},t.moduleEventCacheMap={click:{},call:{}},t.timelineMap=new Map,t.setModuleUseCache=f,t.getModuleUseCache=p,t.compareCacheTriggerCount=function(e,t,r,n,i){var a;if(void 0===i&&(i=Date.now()),1===r)return!0;var s=p(e,t),u=s.startTime,c=void 0===u?0:u,l=s.triggerNum,d=Number(l)+1;if(d<r)return f(e,t,o(o({},s),{triggerNum:d,startTime:null!==(a=s.startTime)&&void 0!==a?a:i})),!1;var h=n&&i-c>n;return f(e,t,o(o({},s),{startTime:h?i:void 0,triggerNum:h?1:0})),!h},t.PROCESS_TYPE={main:"main",renderer:"renderer"},t.startTime=Date.now(),t.skipReport="development"===(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.NODE_ENV),t.defaultPerfConfigSettings={disabled:!0,fps:{below:20,belowCount:3,maxReporterCount:10},interval:{duration:100,blockFactor:5,reportThreshold:6,longTaskDuration:2e3,longTaskDurationMain:800,maxReporterCount:10},memory:{freePercent:10,free:2097152,duration:1e4,maxReporterCount:10,winUsePowershell:!1},disabledHref:[],disabledMain:!1,ideUsageCollectInterval:3e5,disabledJsonWorker:!1}},4084:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.reportTeaImmediately=t.clearTeaEvents=t.reportTea=t.makeEvent=t.registerDevLogger=void 0;var u=s(r(4088)),c=r(6912),l=u.default.create({baseURL:"https://mcs.snssdk.com",timeout:1e4,headers:{"Content-Type":"application/json"}}),f=console.info;function p(e,t,r){return void 0===r&&(r=Date.now()),{event:e,params:JSON.stringify(t),time:Math.floor(r/1e3)}}t.registerDevLogger=function(e){f=e},t.makeEvent=p;var d,h,_=function(){function e(e,t,r){var n=this;void 0===t&&(t=1e3),void 0===r&&(r=50),this._events=[],this.reporterAll=function(){0!==n._events.length&&(n.reporter(a([],i(n._events),!1)),n.clear())},this.add=function(e,t,r){if(n._events.push(p(e,t,r)),n._events.length>=n.cacheLimit)return n.reporterAll();n.timerId||(n.timerId=setTimeout((function(){n.timerId=void 0,n.reporterAll()}),n.cacheDurationLimit))},this.clear=function(){n._events=[]},this.reporter=e,this.cacheDurationLimit=t,this.cacheLimit=r}return Object.defineProperty(e.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),e}();function v(e){var t;return!h&&(null==e?void 0:e.deviceId)&&(h={user:{user_unique_id:e.deviceId},header:{app_id:1733,app_version:e.ideVersion,headers:JSON.stringify({app_full_version:e.ideVersion}),os_name:e.osPlatform,os_version:e.osVersion,custom:{cli_name:null!==(t=e.cliName)&&void 0!==t?t:""}},verbose:1}),h}t.reportTea=function(e,t,r,i){var a=this;void 0===r&&(r={}),d||(d=new _((function(e){return n(a,void 0,void 0,(function(){var r,n,i;return o(this,(function(o){switch(o.label){case 0:if(r=Object.assign({},v(t),{events:e}),c.skipReport)return null==f||f("[skip report tea]events "+(null===(i=r.events)||void 0===i?void 0:i.length)+": ",r.events),[2];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.post("/v1/json",r)];case 2:return o.sent(),[3,4];case 3:throw n=o.sent(),console.error("上报数据出错",n),Error("Tea report error, "+((null==n?void 0:n.message)||String(n)));case 4:return[2]}}))}))}))),d.add(e,r,i)},t.clearTeaEvents=function(){null==d||d.reporterAll()},t.reportTeaImmediately=function(e,t){var r,n=t.map((function(e){return p(e.event,e.params)})),o=Object.assign({},v(e),{events:n});c.skipReport?null==f||f("[skip report tea immediately]events "+(null===(r=o.events)||void 0===r?void 0:r.length)+": ",o.events):l.post("/v1/json",o).catch((function(e){console.error("上报数据出错",e)}))}},4415:function(e,t){"use strict";var r=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function n(e){return e.endsWith("/")?e:e.concat("/")}Object.defineProperty(t,"__esModule",{value:!0}),t.ensureEndSlash=t.formatSize=t.normalizeSize=void 0,t.normalizeSize=function(e){var t=e.__APP__,o=void 0===t?0:t,i=r(e,["__APP__"]),a={main:{path:"main",size:o},sub:[],total:o};return Object.keys(i).forEach((function(e){var t,r=i[e];null===(t=a.sub)||void 0===t||t.push({path:n(e),size:r}),a.total=a.total+r})),a},t.formatSize=function(e){return e>1048576?(e/1024/1024).toFixed(2)+"MB":e>1024?(e/1024).toFixed(1)+"KB":e+"B"},t.ensureEndSlash=n},7992:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setBoeMap=t.setJestMock=t.setSlardarInstance=t.setEnvFunction=t.defaultEnv=t.AxiosInstance=void 0;var a=i(r(4088)),s=r(2139),u=new Map;u.set(/https:\/\/microapp.bytedance.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),u.set(/https:\/\/developer.toutiao.com\/api\/apps\/v3\/meta(.*)/,"http://developer.toutiao.com.boe-gateway.byted.org/api/apps/v3/meta$1"),u.set(/https:\/\/developer.toutiao.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),u.set(/https:\/\/open-sandbox.douyin.com\/(.*)/,"http://open-sandbox-boe.bytedance.net/$1"),u.set(/https:\/\/developer.open-douyin.com\/(.*)/,"https://dy-open-platform-boe.bytedance.net/$1"),u.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/user\/tp_info)/,"http://developer-boe.toutiao.com/$1"),u.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/.*)/,"http://developer-boe.toutiao.com/$1"),u.set(/https:\/\/starkgame.zijieapi.com\/(.*)/,"http://starkpublish.bytedance.net/$1");var c=["https://ma.zijieapi.com/api/apps/xconfig_meta"];t.setBoeMap=function(e,t){u.set(e,t)};var l={env:{type:"online",channel:""},proxy:{host:null,port:null}};t.defaultEnv=l;var f=function(){return l},p={reportRequestError:function(){},reportCustomEvent:function(){}},d=[function(e){var t,r,i;if(null===(i=e.headers)||void 0===i?void 0:i.online)return e;var a=f().env,s="boe"===a.type,l=a.channel;if(!s)return e;try{for(var p=n(u),d=p.next();!d.done;d=p.next()){var h=o(d.value,2),_=h[0],v=h[1];if(e.url&&_.test(e.url)&&!c.includes(e.url)){e.url=e.url.replace(_,v);break}}}catch(e){t={error:e}}finally{try{d&&!d.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}return l&&e.headers&&!e.headers["ignore-channel"]&&(e.headers["X-TT-ENV"]=l),e},function(e){var t;if(null===(t=e.headers)||void 0===t?void 0:t.online)return e;var r=f().env,n="ppe"===r.type,o=r.channel;return n&&e&&e.headers&&(e.headers["X-USE-PPE"]=1),n&&e.headers&&o&&!e.headers["ignore-channel"]&&(e.headers["X-TT-ENV"]=o),e}],h=a.default.create({adapter:"http",timeout:6e4});t.AxiosInstance=h,h.interceptors.request.use((function(e){var t,n;null==p||p.reportCustomEvent(s.SLARDAR_EVENT.IDE_REQUEST_START,void 0,{url:null!==(t=null==e?void 0:e.url)&&void 0!==t?t:""});var o=f().proxy;return o.host?(null===(n=e.url)||void 0===n?void 0:n.startsWith("https://"))?(e.httpsAgent=r(1681).httpsOverHttp({proxy:{host:o.host,port:o.port},rejectUnauthorized:!1}),e.proxy=!1):e.proxy={host:o.host,port:o.port?+o.port:80}:(null==o?void 0:o.host)&&o.port||(e.proxy=!1),d.forEach((function(t){return t(e)})),e}),(function(e){return null==p||p.reportRequestError({url:null==e?void 0:e.url,statusMessage:String(e),caller:"interceptors.request.error"}),Promise.reject(e)})),h.interceptors.response.use((function(e){var t,r,n,o,i,a,s,u,c,l,f,d,h;return null===e.config.validateStatus||e.status>=200&&e.status<300||null==p||p.reportRequestError({url:null!==(r=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:null===(n=null==e?void 0:e.request)||void 0===n?void 0:n.url,ttLogId:String(null!==(a=null===(i=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.headers)||void 0===i?void 0:i["x-tt-logid"])&&void 0!==a?a:null===(s=null==e?void 0:e.headers)||void 0===s?void 0:s["x-tt-logid"]),statusCode:null==e?void 0:e.status,statusMessage:null==e?void 0:e.statusText,caller:"interceptors.response"}),process.env.isIDE&&console.info("[request] ",null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.url,"x-tt-logid",null!==(h=null!==(f=null===(l=null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.headers)||void 0===l?void 0:l["x-tt-logid"])&&void 0!==f?f:null===(d=e.headers)||void 0===d?void 0:d["x-tt-logid"])&&void 0!==h?h:""),e}),(function(e){var t,r,n,o,i,a,s,u,c,l,d,h,_,v,E;return console.info("[error request proxy]",f().proxy),null==p||p.reportRequestError({url:null!==(i=null!==(r=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:null===(o=null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.config)||void 0===o?void 0:o.url)&&void 0!==i?i:null===(a=null==e?void 0:e.request)||void 0===a?void 0:a.url,statusCode:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.status,statusMessage:String(e),ttLogId:null!==(_=null!==(l=null===(c=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.headers)||void 0===c?void 0:c["x-tt-logid"])&&void 0!==l?l:null===(h=null===(d=null==e?void 0:e.response)||void 0===d?void 0:d.headers)||void 0===h?void 0:h["x-tt-logid"])&&void 0!==_?_:null===(E=null===(v=null==e?void 0:e.request)||void 0===v?void 0:v.headers)||void 0===E?void 0:E["x-tt-logid"],caller:"interceptors.response.error"}),Promise.reject(e)})),h.interceptors.request.use((function(e){return e.headers&&!e.headers.ignoreReferer&&(e.headers.Referer="developer.toutiao.com"),e})),t.setEnvFunction=function(e){f=e},t.setSlardarInstance=function(e){p=e},t.setJestMock=function(e){Object.entries(e).forEach((function(e){var t=o(e,2),r=t[0],n=t[1];h[r]=n}))}},9251:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setAppConfig=t.getToken=void 0;var u,c=a(r(9849)),l=s(r(1017)),f=r(4263),p=s(r(8366)),d=l.default.join((0,f.getCliDefaultStoragePath)(),"appConfig.json");function h(){var e;try{var t=c.readJsonSync(d);e=(0,f.isObject)(t)?t:{}}catch(t){e={}}return e}t.getToken=function(e){var t;return u||(u=h()),null===(t=u[e])||void 0===t?void 0:t.token},t.setAppConfig=function(e){e.appid?(0,f.isObject)(e.config)?(c.ensureFileSync(d),(u=h())[e.appid]=n(n({},(0,f.isObject)(u[e.appid])?u[e.appid]:{}),e.config),c.writeJSONSync(d,u)):p.default.error("Config must be an object."):p.default.error("Appid is required to set app config.")}},9345:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.audit=t.getAuditHostsList=void 0;var s=r(7992),u=a(r(9258)),c=r(1728),l=r(5796);function f(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,u,l,f;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,f={},[4,(0,c.getLogInfoHeaders)(t)];case 1:f.headers=i.sent(),r=f,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://microapp.bytedance.com/platform_api/v1/app/"+t+"/code_manager/versions",r)];case 3:return n=i.sent(),o=n.data||{},a=o.error,u=o.message,l=o.data,a?[2,{success:!1,msg:u||"Get host failed,please check if your appid is valid",data:l}]:[2,{success:!0,msg:"",data:l}];case 4:return[2,{success:!1,msg:i.sent().message,data:null}];case 5:return[2]}}))}))}function p(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,u,l,f;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,f={},[4,(0,c.getLogInfoHeaders)(t)];case 1:f.headers=i.sent(),r=f,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://microapp.bytedance.com/platform_api/app/publish/v2/"+t+"/audit/host",r)];case 3:return n=i.sent(),o=n.data||{},a=o.error,u=o.message,l=o.data,a?[2,{success:!1,msg:u||"Get host failed,please check if your appid is valid",hostList:{},preHost:[]}]:l.hostList||l.preHost?[2,{success:!0,hostList:l.hostList,preHost:l.preHost}]:[2,{success:!1,msg:"You do not have permission to audit app",hostList:{},preHost:[]}];case 4:return[2,{success:!1,msg:i.sent().message,hostList:{},preHost:[]}];case 5:return[2]}}))}))}function d(e,t){return o(this,void 0,void 0,(function(){var r,o,a,l,f,p,d;return i(this,(function(i){switch(i.label){case 0:for(a in r="https://microapp.bytedance.com/api/v2/app/"+t+"/audit",o=new u.default,e)o.append(a,e[a]);return d={},f=[{}],[4,(0,c.getLogInfoHeaders)(t)];case 1:d.headers=n.apply(void 0,[n.apply(void 0,f.concat([i.sent()])),o.getHeaders()]),l=d,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.put(r,o,l)];case 3:if((p=i.sent()).data&&0===p.data.error)return[2,void 0];throw new Error(p.data.message);case 4:throw i.sent();case 5:return[2]}}))}))}t.getAuditHostsList=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o;return i(this,(function(i){switch(i.label){case 0:return[4,p({appid:e.appid})];case 1:if(t=i.sent(),r=t.success,n=t.msg,o=t.hostList,r)return[2,Object.keys(o)];throw new Error(n)}}))}))},t.audit=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,s,u;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,r=e.host,n=e.autoPublish,o=e.channel,[4,f({appid:t})];case 1:return a=i.sent(),s=a.success,u=a.msg,[4,(0,l.checkChannel)(t,o)];case 2:if(i.sent(),!s)throw new Error(u);return[4,d({auto_publish:n?1:0,host_chosen:r.toString(),notifyContent:"",test_report:"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1",versionTag:JSON.stringify({Tag:o})},t)];case 3:return i.sent(),[2]}}))}))}},2893:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getConfig=t.setConfig=void 0;var s=r(7992),u=r(8559),c=a(r(469)),l=i(r(9849)),f=i(r(1017)),p=r(7310),d=a(r(8366)),h=r(4263),_=(0,h.getCliDefaultStoragePath)(),v=f.join(_,"config.json"),E={proxy:null,tempFilePath:null,storagePath:_,url:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/microapp/make_schema",compileProgress:"https://microapp.bytedance.com/api/v1/app/${appid}/compile_progress",preview:"https://developer.toutiao.com/api/v2/app/${appid}/preview",upload:"https://developer.toutiao.com/api/v2/app/${appid}/testing",check:"https://developer.toutiao.com/api/developer/ide/v1/microapp/query_check_progress",emailLogin:"https://developer.toutiao.com/passport/web/email/login/",mobileLogin:"https://developer.toutiao.com/passport/web/sms_login/",sendLoginCode:"https://developer.toutiao.com/passport/web/send_code/",getUserInfo:"https://microapp.bytedance.com/platform_api/v1/app/microappadmincomm/getUserInfo"},interactGameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/v1/compile_progress",preview:"https://developer.toutiao.com/api/developer/ide/v1/preview",upload:"https://developer.toutiao.com/api/developer/ide/v1/testing"},microgameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/microgame/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/microgame/v1/compile_progress?appid=",preview:"https://developer.toutiao.com/api/developer/ide/microgame/v1/preview?appid=",upload:"https://developer.toutiao.com/api/developer/ide/microgame/v1/testing?appid=",versionInfo:"https://developer.toutiao.com/api/developer/ide/microgame/v1/versions?appid=",sizeLimit:"https://developer.toutiao.com/api/developer/ide/microgame/v1/get_package_size_limit?appid="},env:{type:"online",channel:""},allowReportEvent:!0},m=(0,c.default)(E);if((0,h.isCli)()&&(l.existsSync(v)?((m=l.readJSONSync(v)).url.emailLogin=E.url.emailLogin,m.url.mobileLogin=E.url.mobileLogin,m.url.sendLoginCode=E.url.sendLoginCode,m.url.getUserInfo=E.url.getUserInfo):(l.ensureFileSync(v),l.writeJsonSync(v,E))),!(0,h.isIDE)()){var y=function(){var e=m.proxy,t=e?new p.URL(e):null;return{env:m.env,proxy:{host:t?t.hostname:null,port:t?t.port:null}}};(0,s.setEnvFunction)(y),(0,u.setEnvFunctionForProject)(y)}t.setConfig=function(e,t){if(void 0===t&&(t=!1),t)m=(0,c.default)(E),d.default.info("setConfig "+JSON.stringify(E,null,2));else{for(var r in e)"object"==typeof e[r]?m[r]=Object.assign(m[r],(0,c.default)(e[r])):m[r]=(0,c.default)(e[r]);d.default.info("setConfig "+JSON.stringify(e))}(0,h.isCli)()&&l.writeJsonSync(v,m)},t.getConfig=function(){return Object.assign({},m)}},2173:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProject=void 0;var c=r(7992),l=i(r(9849)),f=i(r(1017)),p=u(r(2541)),d=r(2696),h=u(r(8366)),_=r(4263);function v(e,t){return a(this,void 0,void 0,(function(){var r=this;return s(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,o){return a(r,void 0,void 0,(function(){var r,i;return s(this,(function(a){switch(a.label){case 0:return r=f.join(t,"template.zip"),i=l.createWriteStream(r),[4,c.AxiosInstance.get(e,{responseType:"stream"})];case 1:return a.sent().data.pipe(i),i.on("finish",(function(){l.createReadStream(r).pipe(p.default.Extract({path:t})).on("close",(function(){l.unlinkSync(r),n()})).on("error",(function(e){l.unlinkSync(r),o(e)}))})).on("error",(function(e){o(e)})),[2]}}))}))}))];case 1:return[2,n.sent()]}}))}))}t.createProject=function(e){return a(this,void 0,void 0,(function(){var t,r,n,o,i,a;return s(this,(function(s){switch(s.label){case 0:return t=e.projectName,r=e.force,n=e.template,(o=e.type)||(o="js"),(i=e.targetDir)||(i=f.resolve(process.cwd(),t||".")),l.existsSync(i)?r?[4,l.remove(i)]:[3,2]:[3,3];case 1:return s.sent(),h.default.info("Remove "+i),[3,3];case 2:throw new Error(i+" Exist");case 3:return l.ensureDirSync(i),"rich"!==n?[3,5]:(a="js"===o?d.TEMPLATE_DOWNLOAD_URL:d.TS_TEMPLATE_DOWNLOAD_URL,h.default.info("⚙️ Installing template. This might take a while...."),[4,v(a,i)]);case 4:return s.sent(),[3,8];case 5:return"empty"!==n?[3,8]:[4,l.copy(f.join((0,_.getPackageRoot)(),"./templates/"+("js"===o?"empty":"empty-ts")),i)];case 6:return s.sent(),[4,(0,_.createProjectConfigFile)(t,i,"ts"===o)];case 7:s.sent(),s.label=8;case 8:return h.default.info("🎉 Successfully created project "+t),[2]}}))}))}},4113:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.logout=t.checkSession=t.loginByPhone=t.sendVerificationCodeToPhone=t.loginByEmail=void 0;var s=r(2747),u=r(7992),c=a(r(3477)),l=r(1728),f=a(r(8366)),p=r(4263),d=r(2893),h=r(8066),_={aid:1365};function v(e){return o(this,void 0,void 0,(function(){var t,r,o,a,s,l,f;return i(this,(function(i){switch(i.label){case 0:t=e.type,r=e.params,o=(0,d.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,u.AxiosInstance.post("mobile"===t?o.url.mobileLogin:o.url.emailLogin,c.default.stringify(n(n({},_),r)),{headers:{"content-type":"application/x-www-form-urlencoded","ignore-channel":!0}})];case 2:return a=i.sent(),s=a.data,l=a.headers,[2,{success:f="success"===s.message,cookies:l["set-cookie"],msg:f?"":s.data.description||"Login failed, please try again",userId:s.data.user_id_str}];case 3:return[2,{success:!1,msg:i.sent().message,cookies:null,userId:""}];case 4:return[2]}}))}))}function E(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a;return i(this,(function(i){switch(i.label){case 0:return t=(0,d.getConfig)(),e?[3,2]:[4,(0,l.getUserCookies)()];case 1:e=i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,u.AxiosInstance.get(t.url.getUserInfo,{params:{},headers:{Cookie:e}})];case 3:return r=i.sent().data,n=!r.error,o=void 0,n&&(a=r.data,o={username:a.name||"",avatar:a.avatar||"",developerId:a.developerId||"",mobile:a.mobile||"",email:a.email||"",auditStatus:a.auditStatus||0,uid:a.uId}),[2,{success:n,userData:o,msg:n?"":"Login fail, please try later"}];case 4:return[2,{success:!1,msg:i.sent().message}];case 5:return[2]}}))}))}function m(e){return o(this,void 0,void 0,(function(){var t,r,o;return i(this,(function(i){switch(i.label){case 0:t=(0,d.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,u.AxiosInstance.get(t.url.sendLoginCode,{params:n(n({},_),{type:24,mobile:e}),headers:{"User-Agent":"bytedanceide"}})];case 2:return r=i.sent().data,[2,{success:o="success"===r.message,msg:o?"":"Get verification code fail, please try later"}];case 3:return[2,{success:!1,msg:i.sent().message}];case 4:return[2]}}))}))}t.loginByEmail=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,u,c,f,d,_,m;return i(this,(function(i){switch(i.label){case 0:return t=e.email,r=e.password,n=e.dontSaveCookie,(0,p.validateEmail)(t),[4,v({type:"email",params:{mix_mode:1,email:(0,p.mixEncode)(t),password:(0,p.mixEncode)(r)}})];case 1:if(o=i.sent(),a=o.success,u=o.msg,c=o.cookies,f=o.userId,!a||!c)throw new s.LoginError(u);return[4,E(c)];case 2:if(d=i.sent(),_=d.success,m=d.msg,!_)throw new s.LoginError(m);return n||(0,l.saveUserCookies)(c,f),h.CliMonitor.updateCommonParams({userId:f}),[2,c]}}))}))},t.sendVerificationCodeToPhone=function(e){return o(this,void 0,void 0,(function(){var t,r;return i(this,(function(n){switch(n.label){case 0:return t=e.phoneNumber,(0,p.validatePhoneNumber)(t),[4,m(t)];case 1:if(!(r=n.sent()).success)throw new s.LoginError(r.msg);return[2]}}))}))},t.loginByPhone=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,u,c,f,d,_,m;return i(this,(function(i){switch(i.label){case 0:return t=e.phoneNumber,r=e.code,n=e.dontSaveCookie,(0,p.validatePhoneNumber)(t),(0,p.validateVerificationCode)(r),[4,v({type:"mobile",params:{mobile:t,code:r}})];case 1:if(o=i.sent(),a=o.success,u=o.msg,c=o.cookies,f=o.userId,!a||!c)throw new s.LoginError(u);return[4,E(c)];case 2:if(d=i.sent(),_=d.success,m=d.msg,!_)throw new s.LoginError(m);return n||(0,l.saveUserCookies)(c,f),h.CliMonitor.updateCommonParams({userId:f}),[2,c]}}))}))},t.checkSession=function(){return o(this,void 0,void 0,(function(){var e,t,r,n,o,a;return i(this,(function(i){switch(i.label){case 0:e={isValid:!1,errMsg:null,username:void 0},i.label=1;case 1:return i.trys.push([1,3,,4]),[4,E()];case 2:return t=i.sent(),r=t.success,n=t.msg,o=t.userData,e.isValid=r,e.errMsg=n,e.username=null==o?void 0:o.username,[3,4];case 3:return a=i.sent(),e.errMsg=a.message,[3,4];case 4:return e.isValid?f.default.info("✅ 已登录(Logged in with "+e.username+")"):f.default.info("❌ 未登录(Not logged in, reason: "+e.errMsg+")"),[2,e]}}))}))},t.logout=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return(0,l.removeUserCookies)(),h.CliMonitor.updateCommonParams({userId:""}),f.default.info("✅ Logout success"),[2]}))}))}},3077:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAppVersions=t.fetchMeta=t.isRealToyId=t.getMeta=void 0;var i=r(2747),a=r(7992),s=r(1728),u=r(4263);function c(e){var t=e.appid,r=e.isGame,u=void 0!==r&&r;return n(this,void 0,void 0,(function(){var e,r,n,c;return o(this,(function(o){switch(o.label){case 0:return e=function(e){return"https://developer.toutiao.com/api/apps/v3/meta?appid="+e+"&aid=13&version=current&ttcode=OVCNW/U0UREwv0sHdY9Rm16vBgGrCQIBOWurUCmJ1H6d/2XHLKeOYTYfEJIEeC0AOCwBZAR2j34C4tFN7Nqfq9tHVEpM4OuJM2b8qz0INtUs1qLhKFOtnGa9/Ey0WW86GGocJk074eP72MMhzNmePzaTQzXwn/eqEq4GHwyF2Tg=&aid=1365"}(t),[4,(0,s.getLogInfoHeaders)(t)];case 1:return r=o.sent(),n={},u&&(e="https://developer.toutiao.com/api/developer/ide/v1/version_info",n.app_id=t,n.stage="current"),[4,a.AxiosInstance.get(e,{headers:r,params:n})];case 2:return(c=o.sent().data).error&&0!==c.error||c.code&&0!==c.code?[4,Promise.reject(new i.MetaError(c.data))]:[3,4];case 3:return[2,o.sent()];case 4:return[2,c]}}))}))}t.getMeta=function(e){var t,r;return n(this,void 0,void 0,(function(){var n,i,a,s;return o(this,(function(o){switch(o.label){case 0:return n=e.appid,i=e.isGame,a=void 0!==i&&i,(0,u.validateAppId)(n),[4,c(e)];case 1:return s=o.sent(),a?[2,{version:null===(t=s.data)||void 0===t?void 0:t.current_version}]:[2,{version:null===(r=s.data)||void 0===r?void 0:r.version}]}}))}))},t.isRealToyId=function(e){return n(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return[4,c({appid:e})];case 1:return[2,!!(t=r.sent().data)&&16===t.tech_type]}}))}))},t.fetchMeta=c,t.getAppVersions=function(e){return n(this,void 0,void 0,(function(){var t,r;return o(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,(0,s.getLogInfoHeaders)(e)];case 1:return t=n.sent(),[4,a.AxiosInstance.get("https://developer.toutiao.com/api/developer/ide/v1/microapp/versions",{headers:t,params:{app_id:e}})];case 2:return(r=n.sent().data).code&&0!==r.code?[4,Promise.reject(new i.MetaError(r.msg))]:[3,4];case 3:return[2,n.sent()];case 4:return[2,r.data];case 5:return n.sent(),[2,{audit_version:"0.0.0"}];case 6:return[2]}}))}))}},5787:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.projectToQRCode=t.upload=t.preview=void 0;var p=r(2747),d=r(7992),h=f(r(9258)),_=a(r(9849)),v=a(r(1017)),E=f(r(7086)),m=r(7312),y=r(9396),g=r(1728),b=f(r(8366)),O=r(5879),A=r(4486),w=r(4263),I=r(2893),C=r(5834),S=r(1017),P=r(9428),L=f(r(9508)),T=(0,w.getCliDefaultStoragePath)(),R=v.join(T,"preview.json"),D={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default"},j={preview:D,debug:D};if((0,w.isCli)())if(_.existsSync(R))try{j=_.readJSONSync(R)}catch(e){}else _.ensureFileSync(R),_.writeJsonSync(R,j);function N(e){var t,r,o,i;return s(this,void 0,void 0,(function(){var a,s,c,l,f,v,E,b,O,A,w,C,P,L,T,R,D,j,N,x,M,U,k,F;return u(this,(function(u){switch(u.label){case 0:return a=e.devAppid,s=e.projectPath,c=e.type,l=e.uploadVersion,f=e.uploadChangeLog,v=e.uploadNeedUploadSourcemap,E=e.localCompileVersion,b=e.extraCheckInfoJson,A=new h.default,[4,(0,y.getSizeLimitConfig)(a)];case 1:return w=u.sent(),C=1024*w.subTotal*1024,[4,(0,m.folderToZipStream)(s,{whiteList:[],useTypeScript:!1},!0,C)];case 2:return P=u.sent(),L=(0,I.getConfig)(),T=d.AxiosInstance.put,"preview"===c?O=L.microgameUrl.preview+a:(O=L.microgameUrl.upload+a,A.append("version",l),A.append("intro",f),A.append("need_upload_sourcemap",String(!!v)),A.append("extra_check_info_json",b)),[4,_.readJson((0,S.join)(s,"game.json"))];case 3:return R=u.sent(),D=null!==(t=R.subPackages)&&void 0!==t?t:R.subpackages,A.append("subpackage",String(Boolean(null==D?void 0:D.length))),A.append("local_compile_version",null!=E?E:"4.0.4-rc.17.ide.2.cli"),A.append("source",P,{filename:"source.zip"}),M=T,U=[O,A],k={},F={},[4,(0,g.getUserCookies)()];case 4:return[4,M.apply(void 0,U.concat([(k.headers=n.apply(void 0,[(F.Cookie=u.sent(),F),A.getHeaders()]),k.maxBodyLength=C,k)]))];case 5:if(j=u.sent(),N=j.data,x=j.headers,0===N.error||0===N.code)return[2,{metrics:null!==(r=N.performance_metrics)&&void 0!==r?r:{},logId:null!==(o=null==x?void 0:x["x-tt-logid"])&&void 0!==o?o:""}];throw new p.UploadError(null!==(i=N.message)&&void 0!==i?i:N.msg,N.error)}}))}))}function x(e){return s(this,void 0,void 0,(function(){var t,r,n,o;return u(this,(function(i){switch(i.label){case 0:return n={},o={},[4,(0,g.getUserCookies)()];case 1:return n.headers=(o.Cookie=i.sent(),o),t=n,r=(0,I.getConfig)().microgameUrl.compileProgress+e,[4,d.AxiosInstance.get(r,t).then((function(e){var t,r,n,o=e.data||{},i=o.error,a=o.status,s=o.message;return 1===i?{success:!1,done:!1,error:i,msg:s,errLink:null!==(t=e.data.err_link)&&void 0!==t?t:"",passJson:{}}:{success:!0,done:0===i&&2===a,error:i,msg:"",metrics:null!==(r=e.data.performance_metrics)&&void 0!==r?r:{},errLink:null!==(n=e.data.err_link)&&void 0!==n?n:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,i.sent()]}}))}))}function M(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=setInterval((function(){return s(t,void 0,void 0,(function(){var t,i,a,s,c,l,f,d,h;return u(this,(function(u){switch(u.label){case 0:return[4,x(e)];case 1:return t=u.sent(),i=t.success,a=t.msg,s=t.error,c=t.errLink,l=t.metrics,f=t.done,d=t.passJson,i||(clearInterval(o),h=new p.CompileError(a,c,s),n(h)),f&&(clearInterval(o),r({metrics:null!=l?l:{},passJson:d})),[2]}}))}))}),1e3)}))];case 1:return[2,r.sent()]}}))}))}function U(e,t){return s(this,void 0,void 0,(function(){var r,n,o,i,a,s,l,f,p;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),r=["**/*.js"],[4,(0,L.default)(r,{cwd:t,onlyFiles:!0,ignore:["**/node_modules/**"]})];case 1:n=u.sent(),o=[],i=function(r){var n=v.join(t,r);try{_.readFileSync(n,"utf-8").split("\n").forEach((function(t,n){t.includes(e)&&o.push(r+":"+(n+1))}))}catch(e){console.error("[precheck/code search] 文件读取错误",e)}};try{for(a=c(n),s=a.next();!s.done;s=a.next())l=s.value,i(l)}catch(e){f={error:e}}finally{try{s&&!s.done&&(p=a.return)&&p.call(a)}finally{if(f)throw f.error}}return[2,o];case 2:return u.sent(),[2,[]];case 3:return[2]}}))}))}function k(e){var t,r,o,i,a,f,_=e.appid,v=e.extraCheckInfoJson,E=e.zipStream,m=e.updateStatus,y=e.setCheckResult,b=e.projectPath,O=e.isNewPlatform;return s(this,void 0,void 0,(function(){var e,s,A,w,I,C,S,P,L,T,R,D,j,N,x,M,k,F,G,V,B,H,Z,q,z;return u(this,(function(u){switch(u.label){case 0:if(e=new h.default,v)return[3,11];if(!b)return[3,9];s=[["side_bar","navigateToScene"],["add_short_cut","addShortcut"],["subscribe_message","requestSubscribeMessage"],["aweme_pay","openAwemeCustomerService"],["normal_pay","requestGamePayment"],["interstitial_ad","createInterstitialAd"],["reward_video_ad","createRewardedVideoAd"]],A={code_use:{}},u.label=1;case 1:u.trys.push([1,6,7,8]),w=c(s),I=w.next(),u.label=2;case 2:return I.done?[3,5]:(C=l(I.value,2),S=C[0],[4,U(C[1],b)]);case 3:P=u.sent(),A.code_use[S]={use:P.length>0,path:P},u.label=4;case 4:return I=w.next(),[3,2];case 5:return[3,8];case 6:return L=u.sent(),F={error:L},[3,8];case 7:try{I&&!I.done&&(G=w.return)&&G.call(w)}finally{if(F)throw F.error}return[7];case 8:return e.append("extra_check_info_json",JSON.stringify(A)),[3,10];case 9:return[2,!1];case 10:return[3,12];case 11:e.append("extra_check_info_json",v),u.label=12;case 12:return E&&e.append("source",E,{filename:"source.zip"}),D=(R=d.AxiosInstance).request,V={url:"https://developer.toutiao.com/api/developer/ide/microgame/v1/check",method:"put",data:e,params:{appid:_}},B={},[4,(0,g.getUserCookies)()];case 13:return[4,D.apply(R,[(V.headers=n.apply(void 0,[(B.Cookie=u.sent(),B),e.getHeaders()]),V)])];case 14:if(4===(T=u.sent().data).status){console.error("预检审核失败,失败原因");try{for(j=c(null!==(t=T.data.check_list)&&void 0!==t?t:[]),N=j.next();!N.done;N=j.next())4===(null==(k=N.value)?void 0:k.status)&&console.error("error: ",null==k?void 0:k.message),3===(null==k?void 0:k.status)&&console.info("warning: ",null==k?void 0:k.message)}catch(e){H={error:e}}finally{try{N&&!N.done&&(Z=j.return)&&Z.call(j)}finally{if(H)throw H.error}}return null==O||O(null!==(r=null==T?void 0:T.is_game_migrate)&&void 0!==r&&r),null==m||m({upload:1,check:T.data.check_list?T.status:2,compile:1}),null==y||y({status:T.data.check_list?T.status:2,result:null!==(o=T.data.check_list)&&void 0!==o?o:[]}),[2,!1]}if(3===T.status)try{for(x=c(null!==(i=T.data.check_list)&&void 0!==i?i:[]),M=x.next();!M.done;M=x.next())3===(null==(k=M.value)?void 0:k.status)&&console.info("warning: ",null==k?void 0:k.message)}catch(e){q={error:e}}finally{try{M&&!M.done&&(z=x.return)&&z.call(x)}finally{if(q)throw q.error}}else if(0===T.status)throw new p.UploadError(T.message);return null==O||O(null!==(a=null==T?void 0:T.is_game_migrate)&&void 0!==a&&a),null==m||m({upload:1,check:T.data.check_list?T.status:2,compile:1}),null==y||y({status:T.data.check_list?T.status:2,result:null!==(f=T.data.check_list)&&void 0!==f?f:[]}),[2,!0]}}))}))}function F(e){var t,r,n;return s(this,void 0,void 0,(function(){var o,i,a,s,c,l,f,d,h,v,m,g,I,S,L,T,x,U,F,G,V,B,H,Z,q,z,W,J,K,X,Q;return u(this,(function(u){switch(u.label){case 0:return o={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},i=e.project,a=e.page,s=e.qrcode,c=e.cache,l=e.uploadOptions,f=e.extraInfoJson,d=e.localCompileVersion,h=e.ideConfig,v=e.debug,m=e.uploadCache,g=e.supportSourcemap,I=e.enableHotRestartCache,S=e.setCheckResult,L=e.updateStatus,T=e.isNewPlatform,x=i.path,[4,(0,P.getProjectHash)(x,!0).catch((function(){return""}))];case 1:return U=u.sent(),F=l?"upload":"preview",G=!1,B=j[V=v?"debug":"preview"]||D,c&&((0,w.isCli)()||(null==h?void 0:h.previewScene)===B.previewScene)&&U&&B.hash===U&&B.shortUrl&&B.expireTime>Date.now()/1e3?(o.shortUrl=B.shortUrl,o.expireTime=B.expireTime,o.originSchema=B.originSchema,o.useCache=!0,b.default.info("项目文件无变动,使用缓存"),G=!0,[3,15]):[3,2];case 2:return(0,O.addNodeToMetrics)(o.metrics,"compileCreate"),[4,(0,y.getAppId)(x)];case 3:return H=u.sent(),[4,(0,y.validateAppId)(H)];case 4:return u.sent(),(0,O.addFieldToMetrics)(o.metrics,"appId",H),Z=b.default.loading("正在准备上传..."),m&&U&&B.hash===U&&B.shortUrl&&B.expireTime>Date.now()/1e3?[3,12]:[4,(0,y.verifyPkgSize)(x)];case 5:if(q=u.sent())throw new p.ProjectError(q);return"upload"!==F||(0,w.isIDE)()?[3,7]:[4,(0,C.getMeta)(H)];case 6:if((z=u.sent())&&l&&1===(0,E.default)(z,l.version))throw new p.UploadError(l.version+" is smaller than "+z+"(online version)");u.label=7;case 7:return"upload"!==F?[3,9]:[4,k({appid:H,extraCheckInfoJson:null!==(t=null==l?void 0:l.extraCheckInfoJson)&&void 0!==t?t:"",updateStatus:L,setCheckResult:S,projectPath:x,isNewPlatform:T})];case 8:if(!u.sent()){if((0,w.isCli)())throw new p.UploadError("审核预检失败");return[2]}u.label=9;case 9:return Z.text="正在上传中...",(0,O.addNodeToMetrics)(o.metrics,"IDERequest"),[4,N({devAppid:H,projectPath:x,type:F,uploadChangeLog:null==l?void 0:l.changeLog,uploadVersion:null==l?void 0:l.version,uploadNeedUploadSourcemap:null==l?void 0:l.needUploadSourcemap,extraCheckInfoJson:null!==(r=null==l?void 0:l.extraCheckInfoJson)&&void 0!==r?r:"",extraInfoJson:f,localCompileVersion:d,supportSourcemap:g})];case 10:return W=u.sent(),(0,O.addFieldToMetrics)(o.metrics,"logId",W.logId),Z.text="查询编译进度中...",[4,M(H)];case 11:J=u.sent(),o.metrics=(0,O.mergeMetrics)(o.metrics,W.metrics,J.metrics),o.passJson=J.passJson,(0,O.addNodeToMetrics)(o.metrics,"IDEReceiveResponse"),u.label=12;case 12:return null===(null==s?void 0:s.format)?[3,14]:(Z.text="生成二维码中...",[4,(0,A.makeSchema)({devAppid:H,extAppid:"",startPage:a.path,query:a.query,scene:a.scene,bdpLog:{launch_from:a.launchFrom,location:a.location},headers:{},ideConfig:h,qrcodeQuery:null==v?void 0:v.query,referrerInfo:a.referrerInfo,hotRestartHash:I&&U?U:"",type:F})]);case 13:K=u.sent(),o.shortUrl=K.shortUrl,o.expireTime=K.expireTime,o.originSchema=K.originSchema,u.label=14;case 14:(0,O.addNodeToMetrics)(o.metrics,"compileClose"),Z.stop(),u.label=15;case 15:return"imageFile"!==(null==s?void 0:s.format)?[3,18]:s.output?[4,(0,A.toQRCodeFile)(o.shortUrl,s.output)]:[3,17];case 16:X=u.sent(),o.qrcodeFilePath=X,b.default.info("二维码图片已存储到 "+X),u.label=17;case 17:return[3,21];case 18:return"imageSVG"!==(null==s?void 0:s.format)?[3,21]:G&&B.qrcodeSVG?(o.qrcodeSVG=B.qrcodeSVG,[3,21]):[3,19];case 19:return Q=o,[4,(0,A.toQRCodeSVG)(o.shortUrl)];case 20:Q.qrcodeSVG=u.sent(),u.label=21;case 21:return function(e,t){j[t]=e,(0,w.isCli)()&&_.writeJsonSync(R,j)}({shortUrl:o.shortUrl,expireTime:o.expireTime,originSchema:o.originSchema,hash:U,previewScene:null!==(n=null==h?void 0:h.previewScene)&&void 0!==n?n:"default",qrcodeSVG:o.qrcodeSVG},V),[2,o]}}))}))}t.preview=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,F(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t,r;return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,F({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"",launchFrom:"",location:""},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap,extraCheckInfoJson:null!==(r=e.extraCheckInfoJson)&&void 0!==r?r:""},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig,setCheckResult:null==e?void 0:e.setCheckResult,updateStatus:null==e?void 0:e.updateStatus,isNewPlatform:null==e?void 0:e.isNewPlatform})];case 1:return[2,n.sent()]}}))}))},t.projectToQRCode=F},3098:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5787),t),o(r(9396),t),o(r(5834),t),o(r(7838),t)},5834:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getMicroappInfo=t.getMeta=void 0;var a=r(2747),s=r(7992),u=r(2893),c=r(1728),l=i(r(7086));t.getMeta=function(e){return n(void 0,void 0,void 0,(function(){var t,r,n,i,f;return o(this,(function(o){switch(o.label){case 0:return t=(0,u.getConfig)().microgameUrl.versionInfo+e,f={},[4,(0,c.getUserCookies)()];case 1:return f.Cookie=o.sent(),r=f,[4,s.AxiosInstance.get(t,{headers:r})];case 2:return(n=o.sent().data).error&&0!==n.error||n.error&&0!==n.code?[4,Promise.reject(new a.MetaError(n.message))]:[3,4];case 3:return[2,o.sent()];case 4:return[2,(i=[n.audit_version,n.gray_version,n.online_version].filter(Boolean).sort(l.default))[i.length-1]]}}))}))},t.getMicroappInfo=function(e){return n(void 0,void 0,void 0,(function(){var t,r,n,i,a,u,l;return o(this,(function(o){switch(o.label){case 0:return n={},[4,(0,c.getUserCookies)()];case 1:return n.Cookie=o.sent(),t=n,[4,(0,s.AxiosInstance)({url:"https://developer.open-douyin.com/bff_api/app/setting/v2/"+e+"/microappinfoservice/getMicroappInfo",params:{appId:e},headers:t,timeout:2e4})];case 2:return r=o.sent(),[2,null!==(l=null===(u=null===(a=null===(i=r.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.appInfo)||void 0===u?void 0:u.techType)&&void 0!==l?l:null]}}))}))}},7838:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.unityCli=void 0;var s=r(7992),u=a(r(9258)),c=r(1728),l=a(r(9849)),f=a(r(1017)),p=r(5834),d=a(r(7086)),h=["0","1","2","3","4","5"],_={0:"队列中",1:"任务已被占用,待执行",2:"构建IL2CPP动态库中",3:"IL2CPP动态库构建完成",4:"从TOS下载文件",5:"打包WebGL",6:"Apk分包",7:"上传文件到TOS",8:"修改sc-config meta配置",9:"发布版本到抖音开放平台",99:"环境准备完成,等待执行",100:"发布成功","-1":"发布失败","-2":"IL2CPP动态库构建失败","-4":"TOS文件下载失败","-5":"打包WebGL失败","-6":"Apk分包","-7":"上传文件到TOS失败","-8":"修改sc-config meta配置失败","-9":"发布版本到抖音开放平台失败","-99":"环境准备失败","-100":"发布超时",uploadError:"",uploadFailed:"发布失败",defaultText:"任务准备中"},v=function(e){return o(void 0,void 0,void 0,(function(){var t,r,o;return i(this,(function(i){switch(i.label){case 0:return[4,l.default.readJSON(f.default.join(e,"project.config.json"))];case 1:if(!(t=i.sent()).unity)throw new Error("project.config.json 中没有 unity 字段");return[2,n({appid:null!==(r=null==t?void 0:t.appid)&&void 0!==r?r:""},null!==(o=null==t?void 0:t.unity)&&void 0!==o?o:{})]}}))}))},E=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,l.default.readJSON(f.default.join(e,"game.json"))];case 1:return[2,t.sent()]}}))}))},m=function(e){var t=e.type,r=e.appid,n=e.uid;return o(void 0,void 0,void 0,(function(){var e,o,a,u,c;return i(this,(function(i){switch(i.label){case 0:e=3,i.label=1;case 1:if(!(e>0))return[3,6];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://starkgame.zijieapi.com/api/stark_publish/get_version",{params:{uid:n,appid:r,version_type:t}})];case 3:return o=i.sent(),[2,null!==(c=null===(u=null===(a=o.data)||void 0===a?void 0:a.result)||void 0===u?void 0:u[t])&&void 0!==c?c:{ctime:"",version:""}];case 4:return i.sent(),e--,[3,5];case 5:return[3,1];case 6:return[2,{ctime:"",version:""}]}}))}))},y=function(e){var t=e.projectPath,r=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,n,o;return i(this,(function(i){switch(i.label){case 0:return(e=(0,c.getUserId)())||r?[4,v(t)]:(console.info("请先登录"),[2]);case 1:return n=i.sent(),o=n.appid,[4,m({uid:null!=r?r:parseInt(e),appid:o,type:"latest"})];case 2:return[2,i.sent()]}}))}))},g=function(e){var t=e.projectPath,r=e.version,a=e.publishDesc,f=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,o,p,d,_,m,y,g,b,O,w,I;return i(this,(function(i){switch(i.label){case 0:return(e=(0,c.getUserId)())||f?[4,v(t)]:(console.info("请先登录"),[2]);case 1:return o=i.sent(),p=o.appid,d=o.publishType,_=o.unityEngineVersion,[4,E(t)];case 2:return m=i.sent(),[4,A(p)];case 3:if(!i.sent())throw new Error("appid: "+p+"为非unity小游戏");if(!_)throw new Error("unityEngineVersion为必填字段,请修改project.config.json后重试");switch((y=new u.default).append("uid",null!=f?f:parseInt(e)),y.append("app_id",p),y.append("version",r),y.append("publish_type",d),y.append("unity_engine_version",_),y.append("publish_desc",null!=a?a:""),y.append("orientation","portrait"===m.deviceOrientation?"0":"1"),y.append("menu_btn_style","light"===m.menuButtonStyle?"1":"0"),""+d){case"0":g=l.default.createReadStream(o.build.native.il2cpp),y.append("il2cpp_source_file",g,{filename:"il2cpp_source_file.zip"}),b=l.default.createReadStream(o.build.native.apk),y.append("apk_file",b,{filename:"apk_file.apk"});break;case"1":I=l.default.createReadStream(o.build.webgl),y.append("webgl_file",I,{filename:"webgl_file.zip"}),g=l.default.createReadStream(o.build.native.il2cpp),y.append("il2cpp_source_file",g,{filename:"il2cpp_source_file.zip"}),b=l.default.createReadStream(o.build.native.apk),y.append("apk_file",b,{filename:"apk_file.apk"});break;case"2":case"3":O=l.default.createReadStream(o.build.webgl),y.append("webgl_file",O,{filename:"webgl_file.zip"});break;case"4":w=l.default.createReadStream(o.build.instantGame),y.append("ig_file",w,{filename:"ig_file.json"});break;case"5":w=l.default.createReadStream(o.build.instantGame),y.append("ig_file",w,{filename:"ig_file.json"}),I=l.default.createReadStream(o.build.webgl),y.append("webgl_file",I,{filename:"webgl_file.zip"});break;default:throw new Error("Publish type must be in ["+h.join(",")+"]")}return[4,s.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/submit",method:"post",data:y,headers:n({},y.getHeaders()),timeout:18e5})];case 4:return[2,i.sent().data]}}))}))},b=function(e){var t=e.projectPath,r=e.version,n=e.updateStatus,a=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,u,l,f,p;return i(this,(function(d){switch(d.label){case 0:return(e=(0,c.getUserId)())||a?[4,v(t)]:(console.info("请先登录"),[2]);case 1:return u=d.sent(),l=u.appid,f=function(){return s.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/query",method:"post",data:JSON.stringify({uid:""+(null!=a?a:e),app_id:l,version:r}),headers:{"Content-Type":"application/json"}})},p=function(){return new Promise((function(e){var t=setInterval((function(){return o(void 0,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:return[4,f()];case 1:return r=o.sent(),null==n||n(r.data.result.status),100===r.data.result.status?(clearInterval(t),e(!0)):0===r.data.result.status||(""+r.data.result.status).startsWith("-")&&(clearInterval(t),e(!1),console.info("发布失败")),[2]}}))}))}),1e3)}))},[4,p()];case 2:return d.sent(),[2]}}))}))},O=function(e){var t=e.projectPath,r=e.version,n=e.publishDesc,a=e.updateStatus,s=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,g({projectPath:t,version:r,publishDesc:n,ideUid:s})];case 1:return 0!==(null==(e=i.sent())?void 0:e.code)?(_.uploadError=null!==(u=e.message)&&void 0!==u?u:"",a("uploadError"),[2]):[3,3];case 2:return o=i.sent(),_.uploadError=null!==(c=o.message)&&void 0!==c?c:"发布失败",a("uploadError"),[2];case 3:return[4,b({projectPath:t,version:r,updateStatus:a,ideUid:s})];case 4:return i.sent(),[2]}}))}))},A=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return[4,(0,p.getMicroappInfo)(e)];case 1:return 7===(t=r.sent())?[2,!0]:null===t?[2,null]:[2,!1]}}))}))},w=function(e){return o(void 0,void 0,void 0,(function(){var t,r,n,o,a,s,u,c,l,f,p,d;return i(this,(function(i){switch(i.label){case 0:if(!e)throw new Error("unityConfig is empty");switch(t=e.publishType,r=e.build,""+t){case"0":return[3,1];case"1":return[3,4];case"2":case"3":return[3,8];case"4":return[3,10];case"5":return[3,12]}return[3,15];case 1:return C(null!==(o=null===(n=null==r?void 0:r.native)||void 0===n?void 0:n.apk)&&void 0!==o?o:""),[4,I(null===(a=null==r?void 0:r.native)||void 0===a?void 0:a.il2cpp,"il2cpp产物文件不存在")];case 2:return i.sent(),[4,I(null===(s=null==r?void 0:r.native)||void 0===s?void 0:s.apk,"apk产物文件不存在")];case 3:case 7:case 9:case 11:case 14:return i.sent(),[3,16];case 4:return C(null!==(c=null===(u=null==r?void 0:r.native)||void 0===u?void 0:u.apk)&&void 0!==c?c:""),[4,I(null===(l=null==r?void 0:r.native)||void 0===l?void 0:l.il2cpp,"il2cpp产物文件不存在")];case 5:return i.sent(),[4,I(null===(f=null==r?void 0:r.native)||void 0===f?void 0:f.apk,"apk产物文件不存在")];case 6:case 13:return i.sent(),[4,I(null==r?void 0:r.webgl,"webgl产物文件不存在")];case 8:return[4,I(null==r?void 0:r.webgl,"webgl产物文件不存在")];case 10:return S(null!==(p=null==r?void 0:r.instantGame)&&void 0!==p?p:""),[4,I(null==r?void 0:r.instantGame,"instant game产物文件不存在")];case 12:return S(null!==(d=null==r?void 0:r.instantGame)&&void 0!==d?d:""),[4,I(null==r?void 0:r.instantGame,"instant game产物文件不存在")];case 15:throw new Error("Publish type must be in ["+h.join(",")+"]");case 16:return[2]}}))}))},I=function(e,t){return o(void 0,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,l.default.pathExists(null!=e?e:"")];case 1:if(!r.sent())throw new Error(null!=t?t:"文件不存在");return[2,!0]}}))}))},C=function(e){if(".apk"!==f.default.extname(e))throw new Error("请上传apk文件")},S=function(e){if(".json"!==f.default.extname(e))throw new Error("请上传json文件")},P=function(e,t){return-1===(0,d.default)(e,t)};t.unityCli={getVersions:function(e){var t=e.projectPath,r=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,n,o,a,s,u;return i(this,(function(i){switch(i.label){case 0:return(e=(0,c.getUserId)())||r?[4,v(t)]:(console.info("请先登录"),[2]);case 1:n=i.sent(),o=n.appid,a={},i.label=2;case 2:return i.trys.push([2,4,,5]),[4,m({uid:null!=r?r:parseInt(e),appid:o,type:"current"})];case 3:return s=i.sent(),Object.assign(a,{current:s}),[3,5];case 4:return i.sent(),[3,5];case 5:return i.trys.push([5,7,,8]),[4,m({uid:null!=r?r:parseInt(e),appid:o,type:"latest"})];case 6:return u=i.sent(),Object.assign(a,{latest:u}),[3,8];case 7:return i.sent(),[3,8];case 8:return[2,a]}}))}))},getLatestVersion:y,preview:function(e){var t=e.projectPath,r=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,n,o,a,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),(e=(0,c.getUserId)())||r?[4,v(t)]:(console.info("请先登录"),[2]);case 1:return n=i.sent(),o=n.appid,[4,s.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/make_qrcode",method:"post",data:JSON.stringify({uid:null!=r?r:parseInt(e),appid:o,version_type:"latest"}),headers:{"content-type":"application/json"},responseType:"arraybuffer"})];case 2:return a=i.sent(),[2,"data:image/png;base64,"+Buffer.from(a.data).toString("base64")];case 3:return u=i.sent(),console.info("【Error】:",u),[2,null];case 4:return[2]}}))}))},upload:g,queryProgress:b,uploadAndQueryProgress:O,validateFiles:w,validateAppId:A,validateVersion:P,PROGRESS:_,isUnity:function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,v(e)];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))},unityUpload:function(e){return o(void 0,void 0,void 0,(function(){var t,r,n,o,a,s,u,c;return i(this,(function(i){switch(i.label){case 0:return t=e.projectPath,r=e.version,n=e.publishType,o=e.deviceOrientation,n?[4,l.default.readJSON(f.default.join(t,"project.config.json"))]:[3,3];case 1:return(null==(a=i.sent())?void 0:a.unity)?(a.unity.publishType=n,[4,l.default.writeJSON(f.default.join(t,"project.config.json"),a)]):[3,3];case 2:i.sent(),i.label=3;case 3:return o?[4,l.default.readJSON(f.default.join(t,"game.json"))]:[3,6];case 4:return(null==(s=i.sent())?void 0:s.deviceOrientation)?(s.deviceOrientation=o,[4,l.default.writeJSON(f.default.join(t,"game.json"),s)]):[3,6];case 5:i.sent(),i.label=6;case 6:return[4,v(t)];case 7:return u=i.sent(),[4,w(u)];case 8:return i.sent(),[4,A(u.appid)];case 9:if(!i.sent())throw new Error("appid: "+u.appid+"为非unity小游戏");return[4,y({projectPath:t})];case 10:if(c=i.sent(),!P(c.version,r))throw new Error("版本号必须大于最新版本号"+c.version);return[4,O(e)];case 11:return i.sent(),[2]}}))}))}}},155:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getPathByteSize=t.getDirByteSize=t.getFileByteSize=t.byte2Mb=t.mb2Byte=void 0;var a=i(r(7147)),s=i(r(9508));t.mb2Byte=function(e){return 1024*e*1024},t.byte2Mb=function(e,t){return void 0===t&&(t=4),Number((e/1024/1024).toFixed(t))},t.getFileByteSize=function(e){return a.default.statSync(e).size},t.getDirByteSize=function(e,r,i){return void 0===r&&(r=[]),void 0===i&&(i=[]),n(void 0,void 0,void 0,(function(){var n;return o(this,(function(o){switch(o.label){case 0:return[4,(0,s.default)(i,{cwd:e,ignore:r,absolute:!0,dot:!0})];case 1:return n=o.sent(),[4,Promise.all(n.map((function(e){return(0,t.getFileByteSize)(e)})))];case 2:return[2,o.sent().reduce((function(e,t){return e+t}),0)]}}))}))},t.getPathByteSize=function(e,r,n){return void 0===r&&(r=[]),void 0===n&&(n=["**"]),a.default.statSync(e).isDirectory()?(0,t.getDirByteSize)(e,r,n):(0,t.getFileByteSize)(e)}},9396:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateAppId=t.getAppId=t.checkAppId=t.checkUCAppId=t.compressZip=t.getDirHash=t.verifyPkgSize=t.getSizeLimitConfig=t.PKG_HASH_IGNORE_LIST=t.PKG_SIZE_IGNORE_GLOBS=void 0;var c=u(r(3732)),l=r(2896),f=u(r(9849)),p=u(r(1017)),d=r(2747),h=r(155),_=r(3077),v=r(9882),E=r(7992),m=r(1728),y=r(2893);t.PKG_SIZE_IGNORE_GLOBS=["**/.*","**/.*/**/*","**/node_modules/**","**/**.js.map"],t.PKG_HASH_IGNORE_LIST=[".*","node_modules"],t.getSizeLimitConfig=function(e){return o(void 0,void 0,void 0,(function(){var t,r,o,a,s,u,c;return i(this,(function(i){switch(i.label){case 0:return t={normalTotal:16,subMain:4,subPkg:20,subTotal:20,openData:4},a=(o=E.AxiosInstance).get,s=[""+(0,y.getConfig)().microgameUrl.sizeLimit+e],u={},c={},[4,(0,m.getUserCookies)()];case 1:return[4,a.apply(o,s.concat([(u.headers=(c.Cookie=i.sent(),c),u)]))];case 2:if(0!==(r=i.sent().data).err_no)throw new Error(null==r?void 0:r.err_msg);return[2,n(n({},t),r.limit)]}}))}))};var g=function(e,t,r){return e+"大小为:"+t+"MB,超过 "+r+"MB。"};t.verifyPkgSize=function(e){return o(void 0,void 0,void 0,(function(){var r,n,o,s,u,c,l,d,_,E,m,y,b,O,A,w,I;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),[4,f.default.readJson(p.default.join(e,"game.json"))];case 1:return r=i.sent(),n=r.openDataContext,o=null!==(I=r.subPackages)&&void 0!==I?I:r.subpackages,[4,(0,t.getAppId)(e)];case 2:return s=i.sent(),[4,(0,t.getSizeLimitConfig)(s)];case 3:return u=i.sent(),c=[],n?[4,(0,h.getPathByteSize)(p.default.join(e,n),t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0))]:[3,5];case 4:return d=i.sent(),[3,6];case 5:d=0,i.label=6;case 6:return(l=d)>(0,h.mb2Byte)(u.openData)&&c.push(g("小游戏开放数据域文件",(0,h.byte2Mb)(l),u.openData)),_=!(null==o?void 0:o.length),E=_?u.normalTotal:u.subTotal,[4,(0,h.getPathByteSize)(e,t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0))];case 7:return(m=i.sent())>(0,h.mb2Byte)(E)&&c.push(g("小游戏包",(0,h.byte2Mb)(m),E)),_?[2,c.length?c.join("\n")+"\n请调整包大小再进行上传":""]:[4,Promise.all(o.map((function(r){var n=p.default.join(e,r.root);return(0,h.getPathByteSize)(n,t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0))})))];case 8:return y=i.sent(),b=y.map((function(e,t){return[o[t],e]})).filter((function(e){var t=a(e,2);return t[0],t[1]>(0,h.mb2Byte)(u.subPkg)})),b.length>0&&c.push(b.map((function(e){return a(e,1)[0].name})).join("、")+" 子包大小为:"+b.map((function(e){var t=a(e,2),r=(t[0],t[1]);return(0,h.byte2Mb)(r)+"MB"})).join("、")+",超过 "+u.subPkg+"MB。"),O=y.reduce((function(e,t){return e+t}),0),(A=m-l-O)>(0,h.mb2Byte)(u.subMain)&&c.push(g("小游戏分包主包",(0,h.byte2Mb)(A),u.subMain)),[2,c.length?c.join("\n")+"\n请调整包大小再进行上传":""];case 9:return[2,(w=i.sent())instanceof Error?w.message:String(w)];case 10:return[2]}}))}))},t.getDirHash=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,(0,l.hashElement)(e,{encoding:"hex",folders:{exclude:t.PKG_HASH_IGNORE_LIST}})];case 1:return[2,r.sent().hash]}}))}))},t.compressZip=function(e,r,n){return void 0===n&&(n=[]),new Promise((function(u,l){return o(this,void 0,void 0,(function(){var o,d,h;return i(this,(function(i){switch(i.label){case 0:return o=p.default.resolve(r,p.default.basename(e)+".zip"),d=f.default.createWriteStream(o),h=(0,c.default)("zip",{zlib:{level:9}}),d.on("close",(function(){return u(o)})),h.on("error",(function(e){return console.error("压缩失败:",e),l(e)})),h.pipe(d),h.glob("**/*",{cwd:e,ignore:s(s([],a(t.PKG_SIZE_IGNORE_GLOBS),!1),a(n),!1)},{}),[4,h.finalize()];case 1:return i.sent(),[2]}}))}))}))},t.checkUCAppId=function(e){return/^tt[0-9a-f]{16}(07)$/.test(e)},t.checkAppId=function(e){return/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e)},t.getAppId=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return[4,f.default.readJson(p.default.join(e,"project.config.json"))];case 1:return"testappid"===(t=r.sent()).appid.toLocaleLowerCase()?[2,"tt975be1e608633d4202"]:[2,t.appid]}}))}))},t.validateAppId=function(e){return o(void 0,void 0,void 0,(function(){var r,n;return i(this,(function(o){switch(o.label){case 0:if((0,t.checkUCAppId)(e))throw r="当前小游戏 AppId 为 "+e+",为Unity&UE小游戏 AppId, 不支持该类型小游戏",new d.ProjectError(r);if(!(0,t.checkAppId)(e))throw new d.ProjectError("请使用正确的 AppId");return[4,(0,_.fetchMeta)({appid:e})];case 1:if((n=o.sent().data)&&2!==n.tech_type)throw new d.ProjectError("请使用小游戏的 AppId");return[2]}}))}))}},8733:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t},__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildNpm=void 0;var fs_extra_1=__webpack_require__(9849),path=__importStar(__webpack_require__(1017));function buildNpm(options){return __awaiter(this,void 0,void 0,(function(){var cwd,_a,projectPath,packNpm;return __generator(this,(function(_b){switch(_b.label){case 0:return cwd=process.cwd(),_a=options.projectPath,projectPath=void 0===_a?cwd:_a,path.isAbsolute(projectPath)||(projectPath=path.resolve(cwd,projectPath)),[4,Promise.all([(0,fs_extra_1.access)(path.resolve(projectPath,"package.json")),(0,fs_extra_1.access)(path.resolve(projectPath,"node_modules"))])];case 1:return _b.sent(),packNpm=eval("require")("@tt-miniprogram/ext-pack").packNpm,[4,new Promise((function(e){packNpm({rootPath:projectPath,isWatch:!1},(function(t,r){e(t?{success:!1,reason:t.message||t.toString()}:{success:!0,reason:r})}))}))];case 2:return[2,_b.sent()]}}))}))}exports.buildNpm=buildNpm},7239:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(r(2081)),u=i(r(9849)),c=i(r(1017)),l=r(8066),f=r(2696),p=a(r(8366)),d=r(4263),h=l.CliMonitor.getInstance({cliVersion:"2.0.8",cliName:"tt-minigame-ide-cli"});t.default=function(e,t){var r=e.projectPath,n=e.mode,o=e.type;c.isAbsolute(r)||(r=c.join(process.cwd(),r));var i=!1;try{u.accessSync(r),i=!0}catch(e){p.default.error('The "projectPath" not exist. [path=%s]',r)}var a=(0,d.isMac)()?"open":"start";t&&(a="export BYTEDANCE_IDE_REMOTE_PORT="+t+" && "+a);var _="";i?(p.default.info("Open project. [path=%s]",r),_+="path="+r+"&project-type="+o,"full"!==n&&"lite"!==n||(p.default.info("mode=%s",n),_+="&mode="+n)):p.default.info("Open IDE");var v=a+" "+f.IDE_SCHEMA+"?"+encodeURIComponent(_);return new Promise((function(e,t){s.exec(v,(function(r){r?(p.default.error("Open IDE failed. [err=%o]",r),t(r)):(p.default.info("Open IDE success"),"lite"===n&&h.report(l.CLI_EVENTS.IDE_LITE_MODE_ENTER,{from:"cli"}),e())}))}))}},7312:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},c=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.prettyProjectSize=t.folderToZipStream=t.verifySubPackageSize=t.getProjectSize=t.getFolderSize=void 0;var f=r(2747),p=r(4415),d=l(r(3732)),h=l(r(6883)),_=l(r(9508)),v=i(r(1017)),E=r(4263),m=l(r(9849)),y=r(9882);function g(e,t,r,n,o){return void 0===r&&(r={}),a(this,void 0,void 0,(function(){var i,a,l,p,d,h,g,b,O,A,w;return s(this,(function(s){switch(s.label){case 0:i=r.ignore,a=void 0===i?[]:i,s.label=1;case 1:return s.trys.push([1,6,,7]),[4,m.default.lstat(e)];case 2:if((l=s.sent().isFile())&&!e.endsWith(".js"))throw new Error("subPackage root should be a valid js or a directory");return p=l?v.resolve(e,"../"):e,d=_.default.convertPathToPattern(p),h=_.default.convertPathToPattern(e),[4,(0,_.default)(l?h:(0,y.getWhiteList)(n),{cwd:d,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(a.map((function(e){return(0,E.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})];case 3:return g=s.sent(),(null==o?void 0:o.length)>0?(o=o.filter(E.isGameFileValid),[4,(0,_.default)(o,{cwd:d,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(a.map((function(e){return(0,E.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})]):[3,5];case 4:b=(b=s.sent()).filter((function(e){return y.ALLOWED_MICROGAME_EXTS_REG.test(e.path)&&e.path.startsWith(d)})),g.push.apply(g,c([],u(b),!1)),s.label=5;case 5:return O=new Map,g.forEach((function(e){O.set(e.path,e)})),A=0,O.forEach((function(e,r){!t&&r.endsWith(".ts")||t&&r.endsWith(".js")&&O.has(r.replace(/\.js$/,".ts"))||(A+=e.stats?e.stats.size:0)})),[2,A];case 6:throw w=s.sent(),new f.ProjectError(w.toString());case 7:return[2]}}))}))}function b(e,t){return void 0===t&&(t=!1),a(this,void 0,void 0,(function(){var r,n,o,i,u,c,l,f,d,h,_,y,b=this;return s(this,(function(O){switch(O.label){case 0:return v.isAbsolute(e)||(e=v.join(process.cwd(),e)),[4,(0,E.getProjectConfig)(e)];case 1:return[4,(r=O.sent()).getAppJSON()];case 2:return n=O.sent().rawJSON,o={main:void 0,sub:[],openData:void 0,total:0},i=0,u=v.join(e,r.getMiniprogramRoot()),c=n.subPackages||n.subpackages||[],l=r.useTypeScript(),f=Array.isArray(n.gameFiles)?n.gameFiles:[],[4,g(u,l,{ignore:c.map((function(e){var t=v.join(u,e.root);return m.default.lstatSync(t).isFile()?t:v.join(t,"**")}))},t,f)];case 3:return d=O.sent(),Array.isArray(c)&&c.length>0?(h=c.reduce((function(e,t){return!t.root||e.includes(t.root)||e.push(t.root),e}),[]),[4,Promise.all(h.map((function(e){return a(b,void 0,void 0,(function(){var r;return s(this,(function(n){switch(n.label){case 0:return[4,g(v.join(u,e),l,{},t)];case 1:return r=n.sent(),[2,{path:(0,p.ensureEndSlash)(e),size:r}]}}))}))})))]):[3,5];case 4:_=O.sent(),i+=_.reduce((function(e,t){return e+t.size}),0),o.sub=_,O.label=5;case 5:return t&&n.openDataContext?[4,g(v.join(u,n.openDataContext),l,{},t)]:[3,7];case 6:y=O.sent(),o.openData={path:(0,p.ensureEndSlash)(n.openDataContext),size:y},i+=y,d-=y,O.label=7;case 7:return o.total=i+d,o.main={path:u,size:d},[2,o]}}))}))}t.getFolderSize=g,t.getProjectSize=b,t.verifySubPackageSize=function(e,t){return a(this,void 0,void 0,(function(){var r,n,o,i,a,u,c,l,d,h;return s(this,(function(s){switch(s.label){case 0:return[4,e.getAppJSON()];case 1:r=s.sent(),n=r.isGame,o=e.projectPath,i={mainMax:4194304,subMax:2097152,totalMax:16777216},"preview"===t&&e.getBigPackageSizeSupport()&&(i.mainMax=8388608,i.subMax=4194304,i.totalMax=25165824),n&&(i.mainMax=1/0,i.subMax=1/0,i.totalMax=20971520),a=[],s.label=2;case 2:return s.trys.push([2,4,,7]),[4,b(o,n)];case 3:return u=s.sent(),[3,7];case 4:return c=s.sent(),console.error("获取包体积失败",c),[4,(0,E.sleep)(1e3)];case 5:return s.sent(),[4,b(o,n)];case 6:return u=s.sent(),[3,7];case 7:if(!u)throw Error("获取包体积失败");if(u.total>i.totalMax&&a.push("项目源码包大小 "+(0,p.formatSize)(u.total)+",超过 "+(0,p.formatSize)(i.totalMax)+"。"),(u.sub.length>0||u.openData)&&(l=u.main,d=u.sub,h=u.openData,l.size>i.mainMax&&a.push("主包大小为 "+(0,p.formatSize)(l.size)+",超过 "+(0,p.formatSize)(i.mainMax)+"。"),null==d||d.forEach((function(e){e.size>i.subMax&&a.push(e.path+" 子包大小为 "+(0,p.formatSize)(e.size)+", 超过 "+(0,p.formatSize)(i.subMax)+"。")})),(null==h?void 0:h.size)>i.subMax&&a.push("开放数据域大小为 "+(0,p.formatSize)(h.size)+", 超过 "+(0,p.formatSize)(i.subMax)+"。")),a.length>0)throw new f.PackageSizeError(a.join("\n")+"\n可点击【查看解决方案】查看包体积优化方案,修改后重试。");return[2]}}))}))};var O=new Map;t.folderToZipStream=function(e,t,r,n){var o=t.whiteList,i=void 0===o?[]:o,l=t.useTypeScript;return void 0===n&&(n=E.HIGH_WATER_MARK),a(this,void 0,void 0,(function(){var t,o,p,h,m,g=this;return s(this,(function(b){switch(b.label){case 0:return t=function(){return a(g,void 0,void 0,(function(){var t,o,a,p,h,m,g,b,O;return s(this,(function(s){switch(s.label){case 0:return t=(0,d.default)("zip",{highWaterMark:n,statConcurrency:(0,E.maxConcurrency)()}),o=(0,y.getWhiteList)(r).concat(i),[4,(0,_.default)(o,{cwd:e,stats:!1,dot:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})];case 1:return a=s.sent(),r?[3,6]:[4,(0,E.getProjectConfig)(e)];case 2:return p=s.sent(),h=v.join(e,p.getMiniprogramRoot()),[4,p.getAppJSON()];case 3:return[4,s.sent().getKey("gameFiles")];case 4:return m=null!==(O=s.sent())&&void 0!==O?O:[],Array.isArray(m)&&m.length>0?(m=m.filter(E.isGameFileValid),[4,(0,_.default)(m,{cwd:h,dot:!1,stats:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})]):[3,6];case 5:g=(g=s.sent()).filter((function(e){return y.ALLOWED_MICROGAME_EXTS_REG.test(e)&&!e.startsWith("..")})),a.push.apply(a,c([],u(g),!1)),s.label=6;case 6:return(b=new Set(a)).forEach((function(r){l&&r.endsWith(".js")&&b.has(r.replace(/\.js$/,".ts"))||!l&&r.endsWith(".ts")||t.file(v.join(e,r),{name:r})})),t.on("warning",(function(e){if("ENOENT"!==e.code)throw new f.CompressError(e.message);console.warn("archiver with error "+e.message)})).on("error",(function(e){throw new f.CompressError(e.message)})),[4,t.finalize()];case 7:return s.sent(),[2,t]}}))}))},(o=O.get(e))?[4,o]:[3,2];case 1:b.sent(),b.label=2;case 2:p=t(),O.set(e,p),b.label=3;case 3:return b.trys.push([3,5,,6]),[4,p];case 4:return h=b.sent(),O.delete(e),[2,h];case 5:throw m=b.sent(),O.delete(e),m;case 6:return[2]}}))}))},t.prettyProjectSize=function(e){var t=e.total,r=e.main,n=e.sub,o=e.openData,i=[["主包",r.size]];null==n||n.sort((function(e,t){return t.size-e.size})).forEach((function(e){i.push([e.path,e.size])})),o&&i.push(["开放数据文件夹("+o.path+")",o.size]);var a=new h.default;return i.forEach((function(e){a.cell("路径",e[0]),a.cell("体积",(0,p.formatSize)(e[1]),h.default.leftPadder(" ")),a.newRow()})),a.total("体积",{reduce:function(e,r,n,o){return t},printer:function(e,r){return"总体积:"+(0,p.formatSize)(t)}}),a.toString()}},5796:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},l=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.projectToQRCode=t.upload=t.preview=t.checkProjectMatchAppid=t.checkChannel=void 0;var p=r(2747),d=r(7992),h=f(r(9258)),_=a(r(9849)),v=a(r(1017)),E=f(r(7086)),m=r(7312),y=r(5138),g=r(9428),b=r(1728),O=f(r(8366)),A=r(5879),w=r(4486),I=r(4263),C=r(2893),S=r(3077);function P(e,t){if(!e)throw new Error("请检查 url 配置是否正常");return e.replace(/\$\{appid\}/g,t)}var L=(0,I.getCliDefaultStoragePath)(),T=v.join(L,"preview.json"),R={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default",page:{}};if((0,I.isCli)())if(_.existsSync(T))try{R=_.readJSONSync(T)}catch(e){}else _.ensureFileSync(T),_.writeJsonSync(T,R);function D(e){var t,r,o;return s(this,void 0,void 0,(function(){var i,a,s,c,l,f,_,v,E,y,g,O,A,w,S,L,T,R,D,N,x,M,U,k,F,G,V,B,H,Z;return u(this,(function(u){switch(u.label){case 0:return i=e.devAppid,a=e.extAppid,s=e.projectPath,c=e.type,l=e.uploadVersion,f=e.uploadChangeLog,_=e.uploadNeedUploadSourcemap,v=e.uploadNeedCheck,E=e.extraCheckInfoJson,y=e.localCompileVersion,g=e.extraInfoJson,O=e.interactGame,A=e.supportSourcemap,w=e.useTypeScript,S=e.channel,T=new h.default,R=i,D="",O||"upload"!==c?[3,2]:[4,j(i,S)];case 1:u.sent(),u.label=2;case 2:return[4,(0,m.folderToZipStream)(s,{whiteList:O?["**/*"]:_?["**/*.map"]:void 0,useTypeScript:w},!1)];case 3:return N=u.sent(),x=(0,C.getConfig)(),M=d.AxiosInstance.put,O?[3,4]:("preview"===c?(a&&(R=a,D="?devappid="+i),L=P(x.url.preview,R)+D):(L=P(x.url.upload,R),T.append("version",l),T.append("intro",f),T.append("need_upload_sourcemap",String(!!_)),T.append("need_check",String(!!v)),T.append("extra_check_info_json",E),S&&T.append("tag",S)),T.append("source",N,{filename:"source.zip"}),T.append("local_compile_version",null!=y?y:"4.0.0-cli"),g&&T.append("extra_info_json",g),[3,6]);case 4:return M=d.AxiosInstance.post,T.append("app_id",R),T.append("tech_type",16),[4,(0,I.getMD5Stream)(N)];case 5:U=u.sent(),T.append("src_md5",U.__md5),T.append("src",U,{filename:"src.zip"}),"preview"===c?(L=x.interactGameUrl.preview,T.append("extra_json",g)):(L=x.interactGameUrl.upload,T.append("version",l),T.append("intro",f),T.append("extra_json",g)),u.label=6;case 6:return A&&T.append("is_debug","1"),V=M,B=[L,T],Z={},H=[{}],[4,(0,b.getLogInfoHeaders)(i)];case 7:return[4,V.apply(void 0,B.concat([(Z.headers=n.apply(void 0,[n.apply(void 0,H.concat([u.sent()])),T.getHeaders()]),Z.maxBodyLength=33554432,Z)]))];case 8:if(k=u.sent(),F=k.data,G=k.headers,0===F.error||0===F.code)return[2,{metrics:null!==(t=F.performance_metrics)&&void 0!==t?t:{},logId:null!==(r=null==G?void 0:G["x-tt-logid"])&&void 0!==r?r:""}];throw new p.UploadError(null!==(o=F.message)&&void 0!==o?o:F.msg,F.error)}}))}))}function j(e,t){return s(this,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:if(!t)return[2];if(!/^[1-9]\d*$/.test(t))throw new p.UploadError("通道只能是大于0的整数");return[4,N(e)];case 1:if((r=n.sent().limit_num)&&Number(t)>=r)throw new p.UploadError("通道不能大于 "+(r-1));return[4,B(e)];case 2:if(n.sent())throw new p.UploadError("沙盒小程序不支持通道");return[2]}}))}))}function N(e){return s(this,void 0,void 0,(function(){var t,r,n;return u(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),n={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return n.headers=o.sent(),t=n,[4,d.AxiosInstance.get("https://microapp.bytedance.com/api/developer/ide/v1/microapp/get_exist_test_version?app_id="+e,t)];case 2:if(0===(r=o.sent()).data.code)return[2,r.data.data];throw new Error(r.data.msg);case 3:throw o.sent(),new Error("获取通道限制失败");case 4:return[2]}}))}))}function x(e,t,r,n){return void 0===n&&(n=!1),s(this,void 0,void 0,(function(){var o,i,a,s,c;return u(this,(function(u){switch(u.label){case 0:return c={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return c.headers=u.sent(),o=c,i=e,a="","",r&&t&&(i=t,a="?devappid="+e),s=n?(0,C.getConfig)().interactGameUrl.compileProgress+"?app_id="+e+"&stage="+(r?"preview":"latest"):P((0,C.getConfig)().url.compileProgress,i)+a,[4,d.AxiosInstance.get(s,o).then((function(e){var t,r,o,i,a,s,u,c,l,f,p=e.data||{},d=p.error,h=p.status,_=p.message;return n&&(d=null===(t=e.data)||void 0===t?void 0:t.code,h=null===(o=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===o?void 0:o.status,_=null!==(s=null===(a=null===(i=e.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.msg)&&void 0!==s?s:null===(u=e.data)||void 0===u?void 0:u.msg),1===d||n&&(1===h||0!==d)?{success:!1,done:!1,error:d,msg:_,errLink:null!==(c=e.data.err_link)&&void 0!==c?c:"",passJson:{}}:{success:!0,done:0===d&&2===h,error:d,msg:"",metrics:null!==(l=e.data.performance_metrics)&&void 0!==l?l:{},errLink:null!==(f=e.data.err_link)&&void 0!==f?f:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,u.sent()]}}))}))}function M(e,t,r,n){return void 0===n&&(n=!1),s(this,void 0,void 0,(function(){var o=this;return u(this,(function(i){switch(i.label){case 0:return[4,new Promise((function(i,a){var c=setInterval((function(){return s(o,void 0,void 0,(function(){var o,s,l,f,d,h,_,v,E;return u(this,(function(u){switch(u.label){case 0:return[4,x(e,t,r,n)];case 1:return o=u.sent(),s=o.success,l=o.msg,f=o.error,d=o.errLink,h=o.metrics,_=o.done,v=o.passJson,s||(clearInterval(c),E=new p.CompileError(l,d,f),a(E)),_&&(clearInterval(c),i({metrics:null!=h?h:{},passJson:v})),[2]}}))}))}),1e3)}))];case 1:return[2,i.sent()]}}))}))}function U(e){return s(this,void 0,void 0,(function(){var t,r,n;return u(this,(function(o){switch(o.label){case 0:return n={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return n.headers=o.sent(),t=n,r=(0,C.getConfig)().url.check+"?app_id="+e,[4,d.AxiosInstance.get(r,t).then((function(e){var t,r,n,o,i=e.data||{},a=i.code,s=i.err_msg;if(0!==a)return{success:!1,done:!1,error:a,msg:s,status:1};var u=null===(r=null===(t=e.data)||void 0===t?void 0:t.data)||void 0===r?void 0:r.status;return{success:!0,done:2===u||3===u,error:a,msg:"",status:u,result:(null===(o=null===(n=e.data)||void 0===n?void 0:n.data)||void 0===o?void 0:o.check_list)||[]}})).catch((function(e){return{success:!1,error:-1,msg:e.message,status:1,done:!1}}))];case 2:return[2,o.sent()]}}))}))}function k(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=setInterval((function(){return s(t,void 0,void 0,(function(){var t,i,a,s,c,l,f;return u(this,(function(u){switch(u.label){case 0:return[4,U(e)];case 1:return t=u.sent(),i=t.success,a=t.msg,s=t.done,c=t.status,l=t.result,f=void 0===l?[]:l,i||(clearInterval(o),n({msg:a})),s&&(clearInterval(o),r({status:c,result:f})),[2]}}))}))}),1e3)}))];case 1:return[2,r.sent()]}}))}))}function F(e,t){return void 0===t&&(t=e.getAppid()),s(this,void 0,void 0,(function(){var r,n,o;return u(this,(function(i){switch(i.label){case 0:return[4,Promise.all([e.detectProjectType("game"),(0,S.isRealToyId)(t)])];case 1:if(r=c.apply(void 0,[i.sent(),2]),n=r[0],o=r[1],!n&&o)throw new p.ProjectError('当前项目为小程序项目,但是 "'+t+'" 属于小玩法 ID。');if(n&&!o)throw new p.ProjectError('当前项目为小玩法项目,但是 "'+t+'" 属于小程序 ID。');return[2]}}))}))}function G(e,t){var r,n;if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o=o.filter((function(t){return void 0!==e[t]})),i=i.filter((function(e){return void 0!==t[e]})),o.length!==i.length)return!1;try{for(var a=l(o),s=a.next();!s.done;s=a.next()){var u=s.value;if(!i.includes(u)||!G(e[u],t[u]))return!1}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!0}function V(e,t){var r;return void 0===t&&(t=5e3),s(this,void 0,void 0,(function(){var n,o,i,a,s,c,l,f,d,h,v,b,C,P,L,j,N,x,U,V,B,H,Z,q,z,W,J,K,X,Q,Y,$,ee,te,re;return u(this,(function(u){switch(u.label){case 0:return n={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},o=e.project,i=e.page,a=e.qrcode,s=e.cache,c=e.uploadOptions,l=e.extraInfoJson,f=e.localCompileVersion,d=e.ideConfig,h=e.debug,v=e.uploadCache,b=e.interactGame,C=e.supportSourcemap,P=e.enableHotRestartCache,L=e.penetrateMapJson,j=e.updateStatus,N=e.setCheckResult,x=e.traceVersion,U=o.path,V="",v||s?[4,(0,g.getProjectHash)(U,!1,t)]:[3,2];case 1:V=u.sent(),u.label=2;case 2:return B=c?"upload":"preview",H=!1,s&&((0,I.isCli)()||(null==d?void 0:d.previewScene)===R.previewScene)&&V&&R.hash===V&&R.shortUrl&&R.expireTime>Date.now()/1e3&&G(i,R.page)?(n.shortUrl=R.shortUrl,n.expireTime=R.expireTime,n.originSchema=R.originSchema,n.useCache=!0,O.default.info("项目文件无变动,使用缓存"),H=!0,[3,19]):[3,3];case 3:return(0,A.addNodeToMetrics)(n.metrics,"compileCreate"),[4,(0,I.getProjectConfig)(U)];case 4:return[4,(Z=u.sent()).getRealAppid()];case 5:return q=u.sent(),(0,I.validateAppId)(q),[4,F(Z,q)];case 6:return u.sent(),(0,A.addFieldToMetrics)(n.metrics,"appId",q),z=null,"preview"!==B?[3,8]:[4,(0,y.detectValidExtApp)(q,U)];case 7:if((W=u.sent()).invalidReason||(z=W.ext.extAppid),W.invalidReason&&W.invalidReason.reason!==y.INVALID_EXTAPP_REASON.EXT_DISABLED&&W.invalidReason.reason!==y.INVALID_EXTAPP_REASON.INVALID_EXT_JSON)throw new p.ProjectError('当前 ext.json "extEnable" 为 true,但是由于三方配置异常,当前工程仍为普通小程序工程,错误原因是:'+W.invalidReason.errMsg);u.label=8;case 8:return J=O.default.loading("正在准备上传..."),v&&V&&R.hash===V&&R.shortUrl&&R.expireTime>Date.now()/1e3?[3,16]:[4,(0,m.verifySubPackageSize)(Z,B)];case 9:return u.sent(),"upload"!==B||b||(0,I.isIDE)()?[3,11]:[4,(0,S.getAppVersions)(q)];case 10:if(K=u.sent().audit_version,c.version||(c.version=(0,I.getNextVersion)(K),O.default.info("\nThe default version is "+c.version+".")),K&&c&&1===(0,E.default)(K,c.version))throw new p.UploadError(c.version+" is smaller than "+K+"(pre order version)");u.label=11;case 11:return X={upload:1,check:1,compile:1},J.text="正在上传中...",null==j||j(X),(0,A.addNodeToMetrics)(n.metrics,"IDERequest"),[4,D({devAppid:q,extAppid:z,projectPath:U,type:B,uploadChangeLog:null==c?void 0:c.changeLog,uploadVersion:null==c?void 0:c.version,uploadNeedUploadSourcemap:null==c?void 0:c.needUploadSourcemap,uploadNeedCheck:null==c?void 0:c.needUploadCheck,extraCheckInfoJson:null==c?void 0:c.extraCheckInfoJson,extraInfoJson:l,localCompileVersion:f,interactGame:b,supportSourcemap:C,useTypeScript:Z.useTypeScript(),channel:null==c?void 0:c.channel})];case 12:return Q=u.sent(),X.upload=2,null==j||j(X),(0,A.addFieldToMetrics)(n.metrics,"logId",Q.logId),(null==c?void 0:c.needUploadCheck)?(J.text="查询预检进度中...",[4,k(q)]):[3,14];case 13:Y=u.sent(),X.check=Y.status,null==j||j(X),null==N||N(Y),u.label=14;case 14:return J.text="查询编译进度中...",[4,M(q,z,"preview"===B,!!b)];case 15:$=u.sent(),X.compile=2,null==j||j(X),n.metrics=(0,A.mergeMetrics)(n.metrics,Q.metrics,$.metrics),n.passJson=$.passJson,(0,A.addNodeToMetrics)(n.metrics,"IDEReceiveResponse"),u.label=16;case 16:return null===(null==a?void 0:a.format)?[3,18]:(J.text="生成二维码中...",[4,(0,w.makeSchema)({devAppid:q,extAppid:z,startPage:i.path,query:i.query,scene:i.scene,bdpLog:{launch_from:i.launchFrom,location:i.location},headers:{},ideConfig:d,qrcodeQuery:null==h?void 0:h.query,referrerInfo:i.referrerInfo,hotRestartHash:P&&V?V:"",type:B,penetrateMapJson:L,traceVersion:x,isInteractGame:!!b})]);case 17:ee=u.sent(),n.shortUrl=ee.shortUrl,n.expireTime=ee.expireTime,n.originSchema=ee.originSchema,u.label=18;case 18:(0,A.addNodeToMetrics)(n.metrics,"compileClose"),J.stop(),u.label=19;case 19:return"imageFile"!==(null==a?void 0:a.format)?[3,22]:a.output?[4,(0,w.toQRCodeFile)(n.shortUrl,a.output)]:[3,21];case 20:te=u.sent(),n.qrcodeFilePath=te,O.default.info("二维码图片已存储到 "+te),u.label=21;case 21:return[3,25];case 22:return"imageSVG"!==(null==a?void 0:a.format)?[3,25]:H&&R.qrcodeSVG?(n.qrcodeSVG=R.qrcodeSVG,[3,25]):[3,23];case 23:return re=n,[4,(0,w.toQRCodeSVG)(n.shortUrl)];case 24:re.qrcodeSVG=u.sent(),u.label=25;case 25:return function(e){R=e,(0,I.isCli)()&&_.writeJsonSync(T,R)}({shortUrl:n.shortUrl,expireTime:n.expireTime,originSchema:n.originSchema,hash:V,previewScene:null!==(r=null==d?void 0:d.previewScene)&&void 0!==r?r:"default",qrcodeSVG:n.qrcodeSVG,page:i}),[2,n]}}))}))}function B(e){var t,r,o;return s(this,void 0,void 0,(function(){var i,a,s,c;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),a=d.AxiosInstance,c={url:"https://developer.open-douyin.com/bff_api/app/setting/v2/"+e+"/microappinfoservice/getMicroappInfo",params:{appId:e}},s=[{}],[4,(0,b.getLogInfoHeaders)(e)];case 1:return[4,a.apply(void 0,[(c.headers=n.apply(void 0,s.concat([u.sent()])),c.timeout=2e4,c)])];case 2:return i=u.sent(),[2,(null===(o=null===(r=null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.data)||void 0===r?void 0:r.appInfo)||void 0===o?void 0:o.isSandboxApp)||!1];case 3:return u.sent(),[2,!1];case 4:return[2]}}))}))}t.checkChannel=j,t.checkProjectMatchAppid=F,t.preview=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,V(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t;return s(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,V({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"990001",launchFrom:"scan",location:"qr_code"},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap,needUploadCheck:!!e.needUploadCheck,extraCheckInfoJson:JSON.stringify({}),channel:e.channel},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig,interactGame:e.interactGame,penetrateMapJson:e.penetrateMapJson})];case 1:return[2,r.sent()]}}))}))},t.projectToQRCode=V},5138:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.detectValidExtApp=t.INVALID_EXTAPP_REASON=void 0;var a,s=r(8559),u=r(7992),c=r(1728),l=i(r(8366)),f=r(2747);!function(e){e[e.INVALID_APPID_META=0]="INVALID_APPID_META",e[e.INVALID_EXTAPPID=1]="INVALID_EXTAPPID",e[e.EXT_DISABLED=2]="EXT_DISABLED",e[e.INVALID_EXT_JSON=3]="INVALID_EXT_JSON",e[e.INVALID_AUTH=4]="INVALID_AUTH",e[e.NULL=5]="NULL"}(a=t.INVALID_EXTAPP_REASON||(t.INVALID_EXTAPP_REASON={}));var p=function(){function e(){this._thirdPartyMetaMap={}}return e.prototype.getThirdPartyMeta=function(e){var t,r,i,a;return n(this,void 0,void 0,(function(){var n,s,p,d,h,_;return o(this,(function(o){switch(o.label){case 0:return this._thirdPartyMetaMap[e]?[2,this._thirdPartyMetaMap[e]]:(n={isThirdPartyApp:!1,thirdPartyName:""},[4,(0,c.getLogInfoHeaders)(e)]);case 1:s=o.sent(),p="https://microapp.bytedance.com/api/v1/app/"+e+"/meta",d={headers:s},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.AxiosInstance.get(p,d)];case 3:return h=o.sent().data,this._thirdPartyMetaMap[e]={isThirdPartyApp:h.data.is_thirdparty_dev,thirdPartyName:h.data.thirdparty.name},[3,5];case 4:if(_=o.sent(),401===(null===(t=_.response)||void 0===t?void 0:t.status))throw new f.LoginError(null!==(a=null===(i=null===(r=_.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.message)&&void 0!==a?a:"尚未登录");return l.default.error("getThirdPartyMeta",_),[2,n];case 5:return[2,this._thirdPartyMetaMap[e]]}}))}))},e.prototype.checkExtAppIdAuth=function(e,t){var r,i,a,s;return n(this,void 0,void 0,(function(){var n,p,d,h;return o(this,(function(o){switch(o.label){case 0:return n="https://microapp.bytedance.com/api/thirdparty/validate_ext_appid?dev_appid="+e+"&ext_appid="+t,[4,(0,c.getLogInfoHeaders)(e)];case 1:p=o.sent(),d={headers:p},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.AxiosInstance.get(n,d)];case 3:return[2,0===o.sent().data.error];case 4:if(h=o.sent(),401===(null===(r=h.response)||void 0===r?void 0:r.status))throw new f.LoginError(null!==(s=null===(a=null===(i=h.response)||void 0===i?void 0:i.data)||void 0===a?void 0:a.message)&&void 0!==s?s:"尚未登录");return l.default.error("checkExtAppIdAuth",h),[2,!1];case 5:return[2]}}))}))},e.prototype.getExtData=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,s.ProjectConfig.from(e)];case 1:return[4,t.sent().getExtJSON()];case 2:return[2,t.sent().rawJSON];case 3:return t.sent(),[2,null];case 4:return[2]}}))}))},e.prototype.detectValidExtApp=function(e,t){return n(this,void 0,void 0,(function(){var r,n,i,s,u;return o(this,(function(o){switch(o.label){case 0:return r={invalidReason:null,ext:null,thirdPartyName:null},[4,this.getExtData(t)];case 1:return(n=o.sent())?n.extEnable?n.extAppid?[4,this.getThirdPartyMeta(e)]:(r.invalidReason={reason:a.INVALID_EXTAPPID,errMsg:"ext.json 中 extAppid 异常"},[2,r]):(r.invalidReason={reason:a.EXT_DISABLED,errMsg:"ext.json 中 extEnable 为 false"},[2,r]):(r.invalidReason={reason:a.INVALID_EXT_JSON,errMsg:"请检查项目根目录 ext.json 是否存在或者格式是否正确"},[2,r]);case 2:return i=o.sent(),s=i.isThirdPartyApp,u=i.thirdPartyName,s?[4,this.checkExtAppIdAuth(e,n.extAppid)]:(r.invalidReason={reason:a.INVALID_APPID_META,errMsg:"当前 appid 获取不到第三方平台信息,请检查当前 appId 是否可以合法预览并且正常关联第三方平台"},[2,r]);case 3:return o.sent()?(r.ext=n,r.thirdPartyName=u,[2,r]):(r.invalidReason={reason:a.INVALID_AUTH,errMsg:"当前 AppID 没有资质开发对应的第三方小程序,请检查 project.config.json 中的 “appid” 字段以及 ext.json 中的 “extAppid” 字段是否填写正确"},[2,r])}}))}))},e.Instance=new e,e}();t.detectValidExtApp=p.Instance.detectValidExtApp.bind(p.Instance)},8956:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setProjectHashFn=t.getProjectHash=t.microgame=t.folderToZipStream=t.setAppConfig=t.makeSchema=t.INVALID_EXTAPP_REASON=t.checkProjectMatchAppid=t.verifySubPackageSize=t.getProjectSize=t.detectValidExtApp=t.getConfig=t.setCookieFn=t.projectToQRCode=t.upload=t.preview=t.buildNpm=t.getAuditHostsList=t.audit=t.checkSession=t.sendVerificationCodeToPhone=t.logout=t.loginByPhone=t.loginByEmail=t.create=t.setConfig=t.open=void 0;var l=r(9345);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return l.audit}}),Object.defineProperty(t,"getAuditHostsList",{enumerable:!0,get:function(){return l.getAuditHostsList}});var f=r(2893);Object.defineProperty(t,"getConfig",{enumerable:!0,get:function(){return f.getConfig}}),Object.defineProperty(t,"setConfig",{enumerable:!0,get:function(){return f.setConfig}});var p=r(2173);Object.defineProperty(t,"create",{enumerable:!0,get:function(){return p.createProject}});var d=r(4113);Object.defineProperty(t,"checkSession",{enumerable:!0,get:function(){return d.checkSession}}),Object.defineProperty(t,"loginByEmail",{enumerable:!0,get:function(){return d.loginByEmail}}),Object.defineProperty(t,"loginByPhone",{enumerable:!0,get:function(){return d.loginByPhone}}),Object.defineProperty(t,"logout",{enumerable:!0,get:function(){return d.logout}}),Object.defineProperty(t,"sendVerificationCodeToPhone",{enumerable:!0,get:function(){return d.sendVerificationCodeToPhone}});var h=r(8733),_=c(r(7239)),v=r(7312);Object.defineProperty(t,"getProjectSize",{enumerable:!0,get:function(){return v.getProjectSize}}),Object.defineProperty(t,"verifySubPackageSize",{enumerable:!0,get:function(){return v.verifySubPackageSize}});var E=r(5796);Object.defineProperty(t,"checkProjectMatchAppid",{enumerable:!0,get:function(){return E.checkProjectMatchAppid}}),Object.defineProperty(t,"preview",{enumerable:!0,get:function(){return E.preview}}),Object.defineProperty(t,"projectToQRCode",{enumerable:!0,get:function(){return E.projectToQRCode}});var m=r(5138);Object.defineProperty(t,"detectValidExtApp",{enumerable:!0,get:function(){return m.detectValidExtApp}}),Object.defineProperty(t,"INVALID_EXTAPP_REASON",{enumerable:!0,get:function(){return m.INVALID_EXTAPP_REASON}});var y=r(1728);Object.defineProperty(t,"setCookieFn",{enumerable:!0,get:function(){return y.setCookieFn}});var g=r(4486);Object.defineProperty(t,"makeSchema",{enumerable:!0,get:function(){return g.makeSchema}});var b=r(8066),O=r(9251);Object.defineProperty(t,"setAppConfig",{enumerable:!0,get:function(){return O.setAppConfig}}),t.open=function(e){return s(this,void 0,void 0,(function(){var t,r;return u(this,(function(n){switch(n.label){case 0:return t=e.project,r=e.remotePort,[4,(0,_.default)({projectPath:t.path,mode:t.mode,type:"microapp"},r)];case 1:return[2,n.sent()]}}))}))},t.buildNpm=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(r){switch(r.label){case 0:return t=e.project,[4,(0,h.buildNpm)({projectPath:t.path})];case 1:return[2,r.sent()]}}))}))},t.upload=function(e){var t,r;return s(this,void 0,void 0,(function(){var n;return u(this,(function(o){switch(o.label){case 0:return I.reportCommandCall("upload"),[4,(0,E.upload)(e)];case 1:return n=o.sent(),I.report(b.CLI_EVENTS.IDE_CLI_UPLOAD_SUCCESS,{appid:(null===(t=n.metrics)||void 0===t?void 0:t.appId)||"",logid:(null===(r=n.metrics)||void 0===r?void 0:r.logId)||""}),[2,n]}}))}))},i(r(3077),t);var A=r(7312);Object.defineProperty(t,"folderToZipStream",{enumerable:!0,get:function(){return A.folderToZipStream}}),i(r(5879),t),t.microgame=a(r(3098));var w=r(9428);Object.defineProperty(t,"getProjectHash",{enumerable:!0,get:function(){return w.getProjectHash}}),Object.defineProperty(t,"setProjectHashFn",{enumerable:!0,get:function(){return w.setProjectHashFn}});var I=b.CliMonitor.getInstance({cliVersion:"2.0.8",cliName:"tt-minigame-ide-cli"});I.report(b.CLI_EVENTS.IDE_CLI_LAUNCH)},7145:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CliMonitor=void 0;var i=r(4084),a=o(r(2037)),s=r(8223),u=r(2893),c=r(4122),l=r(4263),f=r(1728),p="";function d(){if(!p)try{p=(0,s.machineIdSync)(!0)}catch(e){console.error(e)}return p}var h=function(){function e(e){this._didReportLaunch=!1;var t=e.cliVersion,r=e.cliName;"true"!==process.env.isIDE?(this._commonParams={ideVersion:t,deviceId:d(),osPlatform:a.default.platform(),osVersion:a.default.release(),cliName:r},this._commonData={userId:(0,f.getUserId)(),username:""}):(this._commonParams={ideVersion:t,deviceId:"",osPlatform:a.default.platform(),osVersion:a.default.release(),cliName:r},this._commonData={userId:"",username:""})}return e.updateCommonParams=function(e){this._instance._commonData=Object.assign(this._instance._commonData,e)},e.getInstance=function(t){return this._instance||(this._instance=new e(t)),this._instance},e.prototype.shouldReport=function(e){return!(!1===(0,u.getConfig)().allowReportEvent||"true"===process.env.isIDE||e===c.CLI_EVENTS.IDE_CLI_LAUNCH&&this._didReportLaunch||"no"===process.env.ALLOW_REPORT_EVENT)},e.prototype.report=function(e,t){void 0===t&&(t={}),this.shouldReport(e)&&(e===c.CLI_EVENTS.IDE_CLI_LAUNCH&&(this._didReportLaunch=!0,t.scene=(0,l.isCli)()?"cli":"require"),(0,i.reportTeaImmediately)(this._commonParams,[{event:e,params:n(n({},t),this._commonData)}]))},e.prototype.reportCommandCall=function(e){this.report("IDE_CLI_COMMAND_CALL",{command_name:e})},e}();t.CliMonitor=h},4122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=void 0,t.CLI_EVENTS={IDE_CLI_LAUNCH:"IDE_CLI_LAUNCH",IDE_CLI_COMMAND_CALL:"IDE_CLI_COMMAND_CALL",IDE_CLI_PREVIEW_SUCCESS:"IDE_CLI_PREVIEW_SUCCESS",IDE_CLI_PREVIEW_FAIL:"IDE_CLI_PREVIEW_FAIL",IDE_CLI_UPLOAD_SUCCESS:"IDE_CLI_UPLOAD_SUCCESS",IDE_CLI_UPLOAD_FAIL:"IDE_CLI_UPLOAD_FAIL",IDE_CLI_ERROR:"IDE_CLI_ERROR",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER"}},8066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=t.CliMonitor=void 0;var n=r(7145);Object.defineProperty(t,"CliMonitor",{enumerable:!0,get:function(){return n.CliMonitor}});var o=r(4122);Object.defineProperty(t,"CLI_EVENTS",{enumerable:!0,get:function(){return o.CLI_EVENTS}})},2696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TS_TEMPLATE_DOWNLOAD_URL=t.TEMPLATE_DOWNLOAD_URL=t.IDE_SCHEMA=void 0,t.IDE_SCHEMA="bytedanceide:",t.TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master.zip",t.TS_TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master-ts.zip"},1728:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.getLogInfoHeaders=t.setCookieFn=t.removeUserCookies=t.saveUserCookies=t.getUserId=t.getUserCookies=void 0;var c=i(r(9849)),l=i(r(1017)),f=r(2893),p=r(4263),d=r(9251),h="",_="";function v(){var e=(0,f.getConfig)();return l.join(e.storagePath,".cookies")}t.getUserCookies=function(){return a(void 0,void 0,void 0,(function(){var e,t;return s(this,(function(r){if(h)return[2,h];try{return[2,h=null!==(t=null===(e=c.readFileSync(v(),"utf-8").split("\n")[0])||void 0===e?void 0:e.trim())&&void 0!==t?t:""]}catch(e){throw h="",new Error("检测到本地无 Cookie,请重新登录")}return[2]}))}))},t.getUserId=function(){var e,t;if(_)return _;try{_=null!==(t=null===(e=c.readFileSync(v(),"utf-8").split("\n")[1])||void 0===e?void 0:e.trim())&&void 0!==t?t:""}catch(e){_=""}return _},t.saveUserCookies=function(e,t){if(_=t,e&&!(e.length<1)){var r=v();c.ensureFileSync(r),h=function(e){void 0===e&&(e=[]);var t=function(e){return void 0===e&&(e=[]),e.map((function(e){var t={name:"",value:""};return e.split("; ").reduce((function(e,t,r){var n=u(t.split("="),2),o=n[0],i=n[1];return 0===r?(e.name=o,e.value=i,e):(e[o]=i,e)}),t),t}))}(e);return function(e,t,r){void 0===t&&(t="sessionid_microapp"),void 0===r&&(r="sessionid_dy_open");var n=function(e,t){return void 0===t&&(t="sessionid_microapp"),e.find((function(e){return e.name===t}))}(e,t);return e.concat([Object.assign({},n,{name:"sessionid"}),Object.assign({},n,{name:r})])}(t)}(e).map((function(e){return e.name+"="+e.value})).join(";");var n=h+"\n"+t;c.writeFileSync(l.join(r),n)}},t.removeUserCookies=function(){h="",_="";try{c.removeSync(v())}catch(e){if("ENOENT"===e.code)return;throw e}},t.setCookieFn=function(e){t.getUserCookies=e},t.getLogInfoHeaders=function(e){return a(void 0,void 0,void 0,(function(){var r,n,o;return s(this,(function(i){switch(i.label){case 0:if((0,p.isIDE)()||!(r=(0,d.getToken)(e)))return[3,5];if(!r)return[3,5];n=void 0,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,t.getUserCookies)()];case 2:return n=i.sent(),[3,4];case 3:return i.sent(),n="",[3,4];case 4:return[2,{"x-cli-token":r,"x-cli-appid":e,Cookie:n}];case 5:return o={},[4,(0,t.getUserCookies)()];case 6:return[2,(o.Cookie=i.sent(),o)]}}))}))}},9428:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.setProjectHashFn=t.getProjectHash=void 0;var i=r(2896),a=r(2747),s=r(4263),u=r(9882);t.getProjectHash=function(e,t,r){return n(void 0,void 0,void 0,(function(){var r,n;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=(0,s.isMac)()?(0,u.getWhiteList)(t):(0,u.getWhiteList)(t).map((function(e){return"*".concat(e.slice(3))})),[4,(0,i.hashElement)(".",e,{encoding:"hex",folders:{exclude:[".*","node_modules"]},files:{include:r,matchBasename:!1,matchPath:!0}})];case 1:return[2,o.sent().hash];case 2:throw n=o.sent(),new a.HashError("获取工程文件夹 hash 失败:"+n.toString());case 3:return[2]}}))}))},t.setProjectHashFn=function(e){return n(this,void 0,void 0,(function(){var r=this;return o(this,(function(i){return t.getProjectHash=function(t,i,a){return void 0===a&&(a=5e3),n(r,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r){var n=setTimeout((function(){console.info("[hash project timeout]"),r("")}),a);e(t,i,a).then((function(e){clearTimeout(n),r(e)})).catch((function(){clearTimeout(n),r("")}))}))];case 1:return[2,r.sent()]}}))}))},[2]}))}))}},8366:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(1606)),s=i(r(8838)),u=r(3837),c=r(4263),l=function(){function e(){}return e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.loading=function(e){return{color:"green",text:e,stop:function(){}}},e.prototype.stopLoading=function(){},e}(),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l),p=null,d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.info(a.default.green(u.format.apply(null,e)))},t.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.warn(a.default.yellow(u.format.apply(null,e)))},t.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error(a.default.red(u.format.apply(null,e)))},t.prototype.loading=function(e){return p=(0,s.default)({text:e,interval:80}).start()},t.prototype.stopLoading=function(){p&&(p.stop(),p=null)},t}(l),h=(0,c.isCli)()?new d:new f;t.default=h},5879:function(e,t){"use strict";var r=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Metrics=t.mergeMetrics=t.addFieldToMetrics=t.addNodeToMetrics=void 0,t.addNodeToMetrics=function(e,t){e.nodes||(e.nodes=[]),e.nodes.push({node:t,timestamp:Date.now()})},t.addFieldToMetrics=function(e,t,r){"nodes"!==t&&void 0!==r&&(e[t]=r)},t.mergeMetrics=function(){for(var e,t,a,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];var c={nodes:[]};try{for(var l=n(s.filter(Boolean)),f=l.next();!f.done;f=l.next()){var p=f.value,d=p.nodes,h=r(p,["nodes"]);for(var _ in(a=c.nodes).push.apply(a,i([],o(null!=d?d:[]),!1)),h)void 0!==h[_]&&null!==h[_]&&(c[_]=h[_])}}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}return c};var a=function(){function e(){this.nodes=[],this.tags={}}return e.prototype.addNode=function(e,t){return void 0===t&&(t=Date.now()),this.nodes.push({node:e,timestamp:t}),this},e.prototype.updateField=function(e,t){return void 0!==t?this.tags[e]=t:delete this.tags[e],this},e.prototype.merge=function(){for(var e,t,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];try{for(var a=n(o.filter(Boolean)),s=a.next();!s.done;s=a.next()){var u=s.value,c=u.nodes,l=r(u,["nodes"]);for(var f in this.nodes=this.nodes.concat(c),l)void 0!==l[f]&&(this.tags[f]=l[f])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this},e.prototype.settle=function(e){void 0===e&&(e=!1);var t=Object.assign({},this.tags);return t.nodes=this.nodes,e&&this.clear(),t},e.prototype.clear=function(){return this.nodes=[],this.tags={},this},e}();t.Metrics=a},4486:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateTerminalQrCode=t.toQRCodeFile=t.toQRCodeSVG=t.makeSchema=void 0;var l=r(2747),f=r(7992),p=c(r(1887)),d=c(r(1017)),h=c(r(3727)),_=a(r(4563)),v=r(2893),E=r(1728),m=c(r(8366)),y=r(4263);t.makeSchema=function(e){var t=this;return new Promise((function(r,o){return s(t,void 0,void 0,(function(){var t,i,a,s,c,p,d,h,_,m,g,b,O,A,w,I,C,S,P,L,T,R,D,j,N,x,M,U,k;return u(this,(function(u){switch(u.label){case 0:return t=e.devAppid,i=e.extAppid,a=e.startPage,s=e.query,c=e.scene,p=e.bdpLog,d=e.qrcodeQuery,h=e.headers,_=e.ideConfig,m=e.isInteractGame,g=e.referrerInfo,b=e.hotRestartHash,O=e.type,A=e.penetrateMapJson,w=e.traceVersion,I=(0,v.getConfig)().url.makeSchema,C={},i&&(C={devappid:t}),[4,(0,E.getLogInfoHeaders)(t)];case 1:S=u.sent(),P=a?a+"?"+s:"",L={skip_domain_check:!!(null==_?void 0:_.skipDomainCheck),inspect_platform:null!==(j=null==_?void 0:_.inspectPlatform)&&void 0!==j?j:"all",ide_version:null==_?void 0:_.ideVersion,ide_os:null==_?void 0:_.ideOS,ide_device_id:null==_?void 0:_.ideDid,ide_user_id:null==_?void 0:_.ideUid,iOS_debug_version:+(null==_?void 0:_.iOSDebugVersion),connect_type:null==_?void 0:_.connectType,local_debug:String(null==_?void 0:_.localDebug),dycloud_config:{call_container:null!==(x=null===(N=null==_?void 0:_.dycloudConfig)||void 0===N?void 0:N.callContainer)&&void 0!==x?x:null,websocket:null!==(U=null===(M=null==_?void 0:_.dycloudConfig)||void 0===M?void 0:M.websocket)&&void 0!==U?U:null},extra_info:null!==(k=null==_?void 0:_.extraInfo)&&void 0!==k?k:{}},(null==_?void 0:_.isSandbox)&&Object.assign(L,{is_sandbox:!0,random_key:_.randomKey,account_name:_.accountName,app_id:_.appId,app_name:_.appName,expire_time:_.expireTime}),T={start_page:encodeURIComponent(P),query:null!=s?s:"",scene:""+c,bdp_log:JSON.stringify(p),penetrate_map_json:JSON.stringify(null!=A?A:n({referer_info:g,ide_inspect_version:6,trace_version:w,ide_live_debug:"live"===(null==_?void 0:_.previewScene),ide_config:L},b&&{hot_restart_version:b}))},d&&Object.assign(T,d),m&&(I=(0,v.getConfig)().interactGameUrl.makeSchema),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,f.AxiosInstance.post(I,n(n({app_id:i||t,stage:"upload"===O?"latest":"preview"},C),{schema_params:T}),{headers:Object.assign(S,h)})];case 3:return R=u.sent(),(0,y.isIDE)()&&console.info("makeSchema result",R),0===R.data.code?((0,y.isIDE)()&&console.info("makeSchema",R.data.data),r({originSchema:m?R.data.data.schema_v2:R.data.data.origin_schema,shortUrl:R.data.data.short_url,expireTime:+R.data.data.expire_time})):o(new l.SchemaError(R.data.msg)),[3,5];case 4:return D=u.sent(),o(new l.SchemaError(D.toString())),[3,5];case 5:return[2]}}))}))}))},t.toQRCodeSVG=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(r){switch(r.label){case 0:return r.trys.push([0,1,,3]),[2,h.default.toString(e,{type:"svg",margin:0,color:{light:"#00000000"}})];case 1:return t=r.sent(),[4,Promise.reject(new l.QRCodeError(t.toString()))];case 2:return[2,r.sent()];case 3:return[2]}}))}))},t.toQRCodeFile=function(e,t){return s(this,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:d.default.isAbsolute(t)||(t=d.default.resolve(process.cwd(),t)),n.label=1;case 1:return n.trys.push([1,3,,5]),[4,h.default.toFile(t,e,{color:{light:"#0000"}})];case 2:return n.sent(),[2,t];case 3:return r=n.sent(),[4,Promise.reject(new l.QRCodeError(r.toString()))];case 4:return[2,n.sent()];case 5:return[2]}}))}))},t.generateTerminalQrCode=function(e,t){_.generate(e,{small:t.small});var r="";t.copy&&(p.default.writeSync(e),r="(已拷贝到剪贴板)"),t.small&&m.default.warn("small QR Code may not work in some environments"),m.default.info("二维码信息:"+e+" "+r)}},4263:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=t.isObject=t.isGameFileValid=t.getNextVersion=t.getMD5Stream=t.getAppJson=t.getProjectConfig=t.getAppid=t.getCliDefaultStoragePath=t.clearConsole=t.mixEncode=t.validateAppId=t.validateEmail=t.validateVerificationCode=t.validatePhoneNumber=t.getPackageRoot=t.createProjectConfigFile=t.cleanArgs=t.maxConcurrency=t.isIDE=t.isMiniGameCli=t.isCli=t.isMac=t.HIGH_WATER_MARK=void 0;var c=r(2747),l=r(8559),f=u(r(6113)),p=i(r(9849)),d=i(r(2037)),h=i(r(1017)),_=i(r(4521)),v=r(2781);function E(){return"true"===process.env.isMiniGameCli}t.HIGH_WATER_MARK=33554432,t.isMac=function(){return"darwin"===process.platform},t.isCli=function(){return"true"===process.env.isCli},t.isMiniGameCli=E,t.isIDE=function(){return"true"===process.env.isIDE};var m=1;function y(e){if(!/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e))throw new c.ProjectError('AppId "'+e+'" is not valid')}t.maxConcurrency=function(){return m||(m=d.cpus().length),m},t.cleanArgs=function(e){return e.options.reduce((function(t,r){var n=r.long.replace(/^--/,"").replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}));return"function"!=typeof e[n]&&void 0!==e[n]&&(t[n]=e[n]),t}),{})},t.createProjectConfigFile=function(e,t,r){return void 0===r&&(r=!1),a(this,void 0,void 0,(function(){var n,o;return s(this,(function(i){switch(i.label){case 0:return n='{\n "setting": {\n "urlCheck": true,\n "es6": true,\n "postcss": true,\n "minified": true,\n "newFeature": true,\n "useCompilerPlugins": ['+(r?'"typescript"':"")+']\n },\n "miniprogramRoot": "./",\n "appid": "testappId",\n "projectname": "'+e+'"\n }',o=h.resolve(t,"project.config.json"),[4,p.writeFile(o,n)];case 1:return[2,i.sent()]}}))}))},t.getPackageRoot=function(){return h.join(__dirname,"..")},t.validatePhoneNumber=function(e){if(!/^1[3-9]\d{9}$/.test(e))throw new c.LoginError('PhoneNumber "'+e+'" is invalid')},t.validateVerificationCode=function(e){if(!/^\d{4}$/.test(e))throw new c.LoginError('VerificationCode "'+e+'" is invalid')},t.validateEmail=function(e){if(!/^([A-Za-z0-9_\-.])+@([A-Za-z0-9_\-.])+\.([A-Za-z]{2,4})$/.test(e))throw new c.LoginError('Email "'+e+'" is invalid')},t.validateAppId=y,t.mixEncode=function(e){for(var t=e.toString(),r=[],n=0,o=t.length;n<o;n++)r.push(t.charCodeAt(n));return r.map((function(e){return(5^e).toString(16)})).join("")},t.clearConsole=function(e){if(process.stdout.isTTY){var t="\n".repeat(process.stdout.rows);console.log(t),_.cursorTo(process.stdout,0,0),_.clearScreenDown(process.stdout),e&&console.log(e)}},t.getCliDefaultStoragePath=function(){var e=E()?".tmg-cli/":".tma-cli/";return h.join(d.homedir(),e)},t.getAppid=function(e){var t=e.getAppid();return y(t),t},t.getProjectConfig=function(e){return a(this,void 0,void 0,(function(){var t;return s(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,4]),[4,l.ProjectConfig.from(e)];case 1:case 3:return[2,r.sent()];case 2:return t=r.sent(),[4,Promise.reject(new c.ProjectError('Parsing "project.config.json" with error. '+t.toString()))];case 4:return[2]}}))}))},t.getAppJson=function(e,t,r){return a(this,void 0,void 0,(function(){var n,o,i,a;return s(this,(function(s){switch(s.label){case 0:n=(r?"game":"app")+".json",s.label=1;case 1:return s.trys.push([1,3,,5]),o=e.getMiniprogramRoot(),i=h.join(t,o,n),[4,p.readJSON(i)];case 2:return[2,s.sent()];case 3:return a=s.sent(),[4,Promise.reject(new c.ProjectError('Parsing "'+n+'" file with error. '+a.toString()))];case 4:return[2,s.sent()];case 5:return[2]}}))}))},t.getMD5Stream=function(e){return a(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=f.default.createHash("md5"),i=new v.Transform({writableHighWaterMark:t.HIGH_WATER_MARK,readableHighWaterMark:t.HIGH_WATER_MARK,transform:function(e,t,r){o.update(e),r(null,e)}});i.__md5="",e.pipe(i),e.on("end",(function(){i.__md5=o.digest("hex"),r(i)})).on("error",(function(e){n(new c.CompressError("MD5 calculation failed "+e.message))}))}))];case 1:return[2,r.sent()]}}))}))},t.getNextVersion=function(e){try{var t=e.match(/\d+/g);return t[2]=(parseInt(t[2])+1).toString(),t.join(".")}catch(e){return"0.0.1"}},t.isGameFileValid=function(e){return!(".."===e||/\.\.(\\|\/)/.test(e)||/(\\|\/)\.\./.test(e))},t.isObject=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)},t.sleep=function(e){return new Promise((function(t){setTimeout((function(){t(null)}),e)}))}},9882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWhiteList=t.ALLOWED_MICROGAME_EXTS_REG=void 0;var n=r(4263),o=Object.freeze(["**/*.json","**/*.js","**/*.png","**/*.jpg","**/*.jpeg","**/*.gif","**/*.svg","**/*.cer","**/*.mp3","**/*.aac","**/*.m4a","**/*.mp4","**/*.wav","**/*.flac","**/*.ape","**/*.ogg","**/*.wma","**/*.midi","**/*.ogv","**/*.webm","**/*.mkv","**/*.ttc","**/*.ttf","**/*.woff","**/*.otf","**/*.obj","**/*.dae","**/*.fbx","**/*.mtl","**/*.stl","**/*.3ds","**/*.pvr","**/*.plist","**/*.fnt","**/*.gz","**/*.ccz","**/*.bmp","**/*.atlas","**/*.swf","**/*.ani","**/*.part","**/*.proto","**/*.bin","**/*.sk","**/*.mipmaps","**/*.txt","**/*.zip","**/*.tt","**/*.map","**/*.silk","**/*.dbbin","**/*.dbmv","**/*.etc","**/*.lmat","**/*.lm","**/*.ls","**/*.lh","**/*.lani","**/*.lav","**/*.lsani","**/*.ltc","**/*.xml","**/*.pkm","**/*.scene","**/*.csv","**/*.prefab","**/*.mesh","**/*.wasm","**/*.wasm.br"]);t.ALLOWED_MICROGAME_EXTS_REG=new RegExp("\\.("+o.map((function(e){return e.match(/\.([^.]+)$/)[1]})).join("|")+")$");var i=Object.freeze(["**/*.js","**/*.json","**/*.sjs","**/*.ts","**/*.ttml","**/*.ttss","**/*.wxml","**/*.wxs","**/*.wxss","**/*.sk","**/*.md","**/*.aac","**/*.bmp","**/*.br","**/*.cer","**/*.eot","**/*.gif","**/*.jpeg","**/*.jpg","**/*.m4a","**/*.mp3","**/*.mp4","**/*.ogg","**/*.otf","**/*.png","**/*.silk","**/*.svg","**/*.ttf","**/*.wasm","**/*.wav","**/*.webp","**/*.woff","**/*.wxs","**/*.wasm.br","**/*.heic"]);t.getWhiteList=function(e){return void 0===e&&(e=!1),(0,n.isCli)()?(0,n.isMiniGameCli)()?o:i:e?o:i}},3607:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.open=t.upload=t.preview=t.logout=t.setConfig=t.buildNpm=t.checkSession=t.loginByPhone=t.loginByEmail=void 0;var a=r(8956),s=i(r(7239)),u=a.microgame.preview,c=a.microgame.upload;t.preview=u,t.upload=c;var l=r(8956);Object.defineProperty(t,"loginByEmail",{enumerable:!0,get:function(){return l.loginByEmail}}),Object.defineProperty(t,"loginByPhone",{enumerable:!0,get:function(){return l.loginByPhone}}),Object.defineProperty(t,"checkSession",{enumerable:!0,get:function(){return l.checkSession}}),Object.defineProperty(t,"buildNpm",{enumerable:!0,get:function(){return l.buildNpm}}),Object.defineProperty(t,"setConfig",{enumerable:!0,get:function(){return l.setConfig}}),Object.defineProperty(t,"logout",{enumerable:!0,get:function(){return l.logout}}),t.open=function(e){return n(this,void 0,void 0,(function(){var t,r;return o(this,(function(n){switch(n.label){case 0:return t=e.project,r=e.remotePort,[4,(0,s.default)({projectPath:t.path,mode:t.mode,type:"microgame"},r)];case 1:return[2,n.sent()]}}))}))}},9491:e=>{"use strict";e.exports=require("assert")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},3477:e=>{"use strict";e.exports=require("querystring")},4521:e=>{"use strict";e.exports=require("readline")},2781:e=>{"use strict";e.exports=require("stream")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},3732:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__3732__},1606:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1606__},1887:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1887__},469:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__469__},6883:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6883__},9508:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9508__},2896:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__2896__},9258:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9258__},9849:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9849__},8838:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__8838__},3727:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__3727__},4563:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__4563__},7086:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__7086__},2541:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__2541__},4088:(e,t,r)=>{"use strict";const n=r(9258),o=r(7310),i=r(3152),a=r(3685),s=r(5687),u=r(3837),c=r(4940),l=r(9796),f=r(2781),p=r(2361);function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const h=d(n),_=d(o),v=d(a),E=d(s),m=d(u),y=d(c),g=d(l),b=d(f),O=d(p);function A(e,t){return function(){return e.apply(t,arguments)}}const{toString:w}=Object.prototype,{getPrototypeOf:I}=Object,C=(S=Object.create(null),e=>{const t=w.call(e);return S[t]||(S[t]=t.slice(8,-1).toLowerCase())});var S;const P=e=>(e=e.toLowerCase(),t=>C(t)===e),L=e=>t=>typeof t===e,{isArray:T}=Array,R=L("undefined"),D=P("ArrayBuffer"),j=L("string"),N=L("function"),x=L("number"),M=e=>null!==e&&"object"==typeof e,U=e=>{if("object"!==C(e))return!1;const t=I(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},k=P("Date"),F=P("File"),G=P("Blob"),V=P("FileList"),B=P("URLSearchParams");function H(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),T(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function Z(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,z=e=>!R(e)&&e!==q,W=(J="undefined"!=typeof Uint8Array&&I(Uint8Array),e=>J&&e instanceof J);var J;const K=P("HTMLFormElement"),X=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Q=P("RegExp"),Y=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};H(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},$="abcdefghijklmnopqrstuvwxyz",ee="0123456789",te={DIGIT:ee,ALPHA:$,ALPHA_DIGIT:$+$.toUpperCase()+ee},re=P("AsyncFunction"),ne={isArray:T,isArrayBuffer:D,isBuffer:function(e){return null!==e&&!R(e)&&null!==e.constructor&&!R(e.constructor)&&N(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||N(e.append)&&("formdata"===(t=C(e))||"object"===t&&N(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&D(e.buffer),t},isString:j,isNumber:x,isBoolean:e=>!0===e||!1===e,isObject:M,isPlainObject:U,isUndefined:R,isDate:k,isFile:F,isBlob:G,isRegExp:Q,isFunction:N,isStream:e=>M(e)&&N(e.pipe),isURLSearchParams:B,isTypedArray:W,isFileList:V,forEach:H,merge:function e(){const{caseless:t}=z(this)&&this||{},r={},n=(n,o)=>{const i=t&&Z(r,o)||o;U(r[i])&&U(n)?r[i]=e(r[i],n):U(n)?r[i]=e({},n):T(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&H(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(H(t,((t,n)=>{r&&N(t)?e[n]=A(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&I(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:C,kindOfTest:P,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(T(e))return e;let t=e.length;if(!x(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:K,hasOwnProperty:X,hasOwnProp:X,reduceDescriptors:Y,freezeMethods:e=>{Y(e,((t,r)=>{if(N(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];N(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return T(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Z,global:q,isContextDefined:z,ALPHABET:te,generateString:(e=16,t=te.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&N(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(M(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=T(e)?[]:{};return H(e,((e,t)=>{const i=r(e,n+1);!R(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:re,isThenable:e=>e&&(M(e)||N(e))&&N(e.then)&&N(e.catch)};function oe(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}ne.inherits(oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ne.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ie=oe.prototype,ae={};function se(e){return ne.isPlainObject(e)||ne.isArray(e)}function ue(e){return ne.endsWith(e,"[]")?e.slice(0,-2):e}function ce(e,t,r){return e?e.concat(t).map((function(e,t){return e=ue(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ae[e]={value:e}})),Object.defineProperties(oe,ae),Object.defineProperty(ie,"isAxiosError",{value:!0}),oe.from=(e,t,r,n,o,i)=>{const a=Object.create(ie);return ne.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),oe.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const le=ne.toFlatObject(ne,{},null,(function(e){return/^is[A-Z]/.test(e)}));function fe(e,t,r){if(!ne.isObject(e))throw new TypeError("target must be an object");t=t||new(h.default||FormData);const n=(r=ne.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ne.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ne.isSpecCompliantForm(t);if(!ne.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(ne.isDate(e))return e.toISOString();if(!s&&ne.isBlob(e))throw new oe("Blob is not supported. Use a Buffer instead.");return ne.isArrayBuffer(e)||ne.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(ne.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ne.isArray(e)&&function(e){return ne.isArray(e)&&!e.some(se)}(e)||(ne.isFileList(e)||ne.endsWith(r,"[]"))&&(s=ne.toArray(e)))return r=ue(r),s.forEach((function(e,n){!ne.isUndefined(e)&&null!==e&&t.append(!0===a?ce([r],n,i):null===a?r:r+"[]",u(e))})),!1;return!!se(e)||(t.append(ce(o,r,i),u(e)),!1)}const l=[],f=Object.assign(le,{defaultVisitor:c,convertValue:u,isVisitable:se});if(!ne.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ne.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),ne.forEach(r,(function(r,i){!0===(!(ne.isUndefined(r)||null===r)&&o.call(t,r,ne.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function pe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function de(e,t){this._pairs=[],e&&fe(e,this,t)}const he=de.prototype;function _e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ve(e,t,r){if(!t)return e;const n=r&&r.encode||_e,o=r&&r.serialize;let i;if(i=o?o(t,r):ne.isURLSearchParams(t)?t.toString():new de(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}he.append=function(e,t){this._pairs.push([e,t])},he.toString=function(e){const t=e?function(t){return e.call(this,t,pe)}:pe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Ee=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ne.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ye={isNode:!0,classes:{URLSearchParams:_.default.URLSearchParams,FormData:h.default,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]},ge="undefined"!=typeof window&&"undefined"!=typeof document,be=(Oe="undefined"!=typeof navigator&&navigator.product,ge&&["ReactNative","NativeScript","NS"].indexOf(Oe)<0);var Oe;const Ae="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,we={...Object.freeze({__proto__:null,hasBrowserEnv:ge,hasStandardBrowserWebWorkerEnv:Ae,hasStandardBrowserEnv:be}),...ye};function Ie(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;return i=!i&&ne.isArray(n)?n.length:i,s?(ne.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&ne.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&ne.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a)}if(ne.isFormData(e)&&ne.isFunction(e.entries)){const r={};return ne.forEachEntry(e,((e,n)=>{t(function(e){return ne.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Ce={transitional:me,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=ne.isObject(e);if(o&&ne.isHTMLForm(e)&&(e=new FormData(e)),ne.isFormData(e))return n&&n?JSON.stringify(Ie(e)):e;if(ne.isArrayBuffer(e)||ne.isBuffer(e)||ne.isStream(e)||ne.isFile(e)||ne.isBlob(e))return e;if(ne.isArrayBufferView(e))return e.buffer;if(ne.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return fe(e,new we.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return we.isNode&&ne.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=ne.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return fe(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(ne.isString(e))try{return(0,JSON.parse)(e),ne.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ce.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&ne.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw oe.from(e,oe.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:we.classes.FormData,Blob:we.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ne.forEach(["delete","get","head","post","put","patch"],(e=>{Ce.headers[e]={}}));const Se=Ce,Pe=ne.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Le=Symbol("internals");function Te(e){return e&&String(e).trim().toLowerCase()}function Re(e){return!1===e||null==e?e:ne.isArray(e)?e.map(Re):String(e)}function De(e,t,r,n,o){return ne.isFunction(n)?n.call(this,t,r):(o&&(t=r),ne.isString(t)?ne.isString(n)?-1!==t.indexOf(n):ne.isRegExp(n)?n.test(t):void 0:void 0)}class je{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Te(t);if(!o)throw new Error("header name must be a non-empty string");const i=ne.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Re(e))}const i=(e,t)=>ne.forEach(e,((e,r)=>o(e,r,t)));return ne.isPlainObject(e)||e instanceof this.constructor?i(e,t):ne.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Pe[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&o(t,e,r),this}get(e,t){if(e=Te(e)){const r=ne.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(ne.isFunction(t))return t.call(this,e,r);if(ne.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Te(e)){const r=ne.findKey(this,e);return!(!r||void 0===this[r]||t&&!De(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Te(e)){const o=ne.findKey(r,e);!o||t&&!De(0,r[o],o,t)||(delete r[o],n=!0)}}return ne.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!De(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return ne.forEach(this,((n,o)=>{const i=ne.findKey(r,o);if(i)return t[i]=Re(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Re(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ne.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&ne.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[Le]=this[Le]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Te(e);t[n]||(function(e,t){const r=ne.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return ne.isArray(e)?e.forEach(n):n(e),this}}je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ne.reduceDescriptors(je.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),ne.freezeMethods(je);const Ne=je;function xe(e,t){const r=this||Se,n=t||r,o=Ne.from(n.headers);let i=n.data;return ne.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Me(e){return!(!e||!e.__CANCEL__)}function Ue(e,t,r){oe.call(this,null==e?"canceled":e,oe.ERR_CANCELED,t,r),this.name="CanceledError"}function ke(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new oe("Request failed with status code "+r.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}function Fe(e,t){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}ne.inherits(Ue,oe,{__CANCEL__:!0});const Ge="1.6.5";function Ve(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const Be=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function He(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const u=Date.now(),c=n[a];o||(o=u),r[i]=s,n[i]=u;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o<t)return;const p=c&&u-c;return p?Math.round(1e3*f/p):void 0}}const Ze=Symbol("internals");class qe extends b.default.Transform{constructor(e){super({readableHighWaterMark:(e=ne.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,t)=>!ne.isUndefined(t[e])))).chunkSize});const t=this,r=this[Ze]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},n=He(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",(e=>{"progress"===e&&(r.isCaptured||(r.isCaptured=!0))}));let o=0;r.updateProgress=function(e,t){let r=0;const n=1e3/t;let o=null;return function(t,i){const a=Date.now();if(t||a-r>n)return o&&(clearTimeout(o),o=null),r=a,e.apply(null,i);o||(o=setTimeout((()=>(o=null,r=Date.now(),e.apply(null,i))),n-(a-r)))}}((function(){const e=r.length,i=r.bytesSeen,a=i-o;if(!a||t.destroyed)return;const s=n(a);o=i,process.nextTick((()=>{t.emit("progress",{loaded:i,total:e,progress:e?i/e:void 0,bytes:a,rate:s||void 0,estimated:s&&e&&i<=e?(e-i)/s:void 0})}))}),r.ticksRate);const i=()=>{r.updateProgress(!0)};this.once("end",i),this.once("error",i)}_read(e){const t=this[Ze];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,r){const n=this,o=this[Ze],i=o.maxRate,a=this.readableHighWaterMark,s=o.timeWindow,u=i/(1e3/s),c=!1!==o.minChunkSize?Math.max(o.minChunkSize,.01*u):0,l=(e,t)=>{const r=Buffer.byteLength(e);let l,f=null,p=a,d=0;if(i){const e=Date.now();(!o.ts||(d=e-o.ts)>=s)&&(o.ts=e,l=u-o.bytes,o.bytes=l<0?-l:0,d=0),l=u-o.bytes}if(i){if(l<=0)return setTimeout((()=>{t(null,e)}),s-d);l<p&&(p=l)}p&&r>p&&r-p>c&&(f=e.subarray(p),e=e.subarray(0,p)),function(e,t){const r=Buffer.byteLength(e);o.bytesSeen+=r,o.bytes+=r,o.isCaptured&&o.updateProgress(),n.push(e)?process.nextTick(t):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(t)}}(e,f?()=>{process.nextTick(t,null,f)}:t)};l(e,(function e(t,n){if(t)return r(t);n?l(n,e):r(null)}))}setLength(e){return this[Ze].length=+e,this}}const ze=qe,{asyncIterator:We}=Symbol,Je=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[We]?yield*e[We]():yield e},Ke=ne.ALPHABET.ALPHA_DIGIT+"-_",Xe=new u.TextEncoder,Qe="\r\n",Ye=Xe.encode(Qe);class $e{constructor(e,t){const{escapeName:r}=this.constructor,n=ne.isString(t);let o=`Content-Disposition: form-data; name="${r(e)}"${!n&&t.name?`; filename="${r(t.name)}"`:""}${Qe}`;n?t=Xe.encode(String(t).replace(/\r?\n|\r\n?/g,Qe)):o+=`Content-Type: ${t.type||"application/octet-stream"}${Qe}`,this.headers=Xe.encode(o+Qe),this.contentLength=n?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;ne.isTypedArray(e)?yield e:yield*Je(e),yield Ye}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}class et extends b.default.Transform{__transform(e,t,r){this.push(e),r()}_transform(e,t,r){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,r)}}const tt=et,rt=(e,t)=>ne.isAsyncFn(e)?function(...r){const n=r.pop();e.apply(this,r).then((e=>{try{t?n(null,...t(e)):n(null,e)}catch(e){n(e)}}),n)}:e,nt={flush:g.default.constants.Z_SYNC_FLUSH,finishFlush:g.default.constants.Z_SYNC_FLUSH},ot={flush:g.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:g.default.constants.BROTLI_OPERATION_FLUSH},it=ne.isFunction(g.default.createBrotliDecompress),{http:at,https:st}=y.default,ut=/https:?/,ct=we.protocols.map((e=>e+":"));function lt(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function ft(e,t,r){let n=t;if(!n&&!1!==n){const e=i.getProxyForUrl(r);e&&(n=new URL(e))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));const t=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=n.hostname||n.host;e.hostname=t,e.host=t,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(e){ft(e,t,e.href)}}const pt=(e,t)=>(({address:e,family:t})=>{if(!ne.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})(ne.isObject(e)?e:{address:e,family:t}),dt=we.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];ne.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),ne.isString(n)&&a.push("path="+n),ne.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}},ht=we.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=ne.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function _t(e,t){let r=0;const n=He(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,u=n(s);r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const vt={http:function(e){return t=async function(t,r,n){let{data:o,lookup:i,family:a}=e;const{responseType:s,responseEncoding:u}=e,c=e.method.toUpperCase();let l,p,d=!1;if(i){const e=rt(i,(e=>ne.isArray(e)?e:[e]));i=(t,r,n)=>{e(t,r,((e,t,o)=>{if(e)return n(e);const i=ne.isArray(t)?t.map((e=>pt(e))):[pt(t,o)];r.all?n(e,i):n(e,i[0].address,i[0].family)}))}}const h=new O.default,_=()=>{e.cancelToken&&e.cancelToken.unsubscribe(y),e.signal&&e.signal.removeEventListener("abort",y),h.removeAllListeners()};function y(t){h.emit("abort",!t||t.type?new Ue(null,e,p):t)}n(((e,t)=>{l=!0,t&&(d=!0,_())})),h.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(y),e.signal&&(e.signal.aborted?y():e.signal.addEventListener("abort",y)));const A=Fe(e.baseURL,e.url),w=new URL(A,"http://localhost"),I=w.protocol||ct[0];if("data:"===I){let n;if("GET"!==c)return ke(t,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{n=function(e,t,r){const n=r&&r.Blob||we.classes.Blob,o=Ve(e);if(void 0===t&&n&&(t=!0),"data"===o){e=o.length?e.slice(o.length+1):e;const r=Be.exec(e);if(!r)throw new oe("Invalid URL",oe.ERR_INVALID_URL);const i=r[1],a=r[2],s=r[3],u=Buffer.from(decodeURIComponent(s),a?"base64":"utf8");if(t){if(!n)throw new oe("Blob is not supported",oe.ERR_NOT_SUPPORT);return new n([u],{type:i})}return u}throw new oe("Unsupported protocol "+o,oe.ERR_NOT_SUPPORT)}(e.url,"blob"===s,{Blob:e.env&&e.env.Blob})}catch(t){throw oe.from(t,oe.ERR_BAD_REQUEST,e)}return"text"===s?(n=n.toString(u),u&&"utf8"!==u||(n=ne.stripBOM(n))):"stream"===s&&(n=b.default.Readable.from(n)),ke(t,r,{data:n,status:200,statusText:"OK",headers:new Ne,config:e})}if(-1===ct.indexOf(I))return r(new oe("Unsupported protocol "+I,oe.ERR_BAD_REQUEST,e));const C=Ne.from(e.headers).normalize();C.set("User-Agent","axios/"+Ge,!1);const S=e.onDownloadProgress,P=e.onUploadProgress,L=e.maxRate;let T,R;if(ne.isSpecCompliantForm(o)){const e=C.getContentType(/boundary=([-_\w\d]{10,70})/i);o=((e,t,r)=>{const{tag:n="form-data-boundary",size:o=25,boundary:i=n+"-"+ne.generateString(o,Ke)}=r||{};if(!ne.isFormData(e))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");const a=Xe.encode("--"+i+Qe),s=Xe.encode("--"+i+"--"+Qe+Qe);let u=s.byteLength;const c=Array.from(e.entries()).map((([e,t])=>{const r=new $e(e,t);return u+=r.size,r}));u+=a.byteLength*c.length,u=ne.toFiniteNumber(u);const l={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(u)&&(l["Content-Length"]=u),t&&t(l),f.Readable.from(async function*(){for(const e of c)yield a,yield*e.encode();yield s}())})(o,(e=>{C.set(e)}),{tag:`axios-${Ge}-boundary`,boundary:e&&e[1]||void 0})}else if(ne.isFormData(o)&&ne.isFunction(o.getHeaders)){if(C.set(o.getHeaders()),!C.hasContentLength())try{const e=await m.default.promisify(o.getLength).call(o);Number.isFinite(e)&&e>=0&&C.setContentLength(e)}catch(e){}}else if(ne.isBlob(o))o.size&&C.setContentType(o.type||"application/octet-stream"),C.setContentLength(o.size||0),o=b.default.Readable.from(Je(o));else if(o&&!ne.isStream(o)){if(Buffer.isBuffer(o));else if(ne.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else{if(!ne.isString(o))return r(new oe("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",oe.ERR_BAD_REQUEST,e));o=Buffer.from(o,"utf-8")}if(C.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return r(new oe("Request body larger than maxBodyLength limit",oe.ERR_BAD_REQUEST,e))}const D=ne.toFiniteNumber(C.getContentLength());let j,N;ne.isArray(L)?(T=L[0],R=L[1]):T=R=L,o&&(P||T)&&(ne.isStream(o)||(o=b.default.Readable.from(o,{objectMode:!1})),o=b.default.pipeline([o,new ze({length:D,maxRate:ne.toFiniteNumber(T)})],ne.noop),P&&o.on("progress",(e=>{P(Object.assign(e,{upload:!0}))}))),e.auth&&(j=(e.auth.username||"")+":"+(e.auth.password||"")),!j&&w.username&&(j=w.username+":"+w.password),j&&C.delete("authorization");try{N=ve(w.pathname+w.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const n=new Error(t.message);return n.config=e,n.url=e.url,n.exists=!0,r(n)}C.set("Accept-Encoding","gzip, compress, deflate"+(it?", br":""),!1);const x={path:N,method:c,headers:C.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:j,protocol:I,family:a,beforeRedirect:lt,beforeRedirects:{}};let M;!ne.isUndefined(i)&&(x.lookup=i),e.socketPath?x.socketPath=e.socketPath:(x.hostname=w.hostname,x.port=w.port,ft(x,e.proxy,I+"//"+w.hostname+(w.port?":"+w.port:"")+x.path));const U=ut.test(x.protocol);if(x.agent=U?e.httpsAgent:e.httpAgent,e.transport?M=e.transport:0===e.maxRedirects?M=U?E.default:v.default:(e.maxRedirects&&(x.maxRedirects=e.maxRedirects),e.beforeRedirect&&(x.beforeRedirects.config=e.beforeRedirect),M=U?st:at),e.maxBodyLength>-1?x.maxBodyLength=e.maxBodyLength:x.maxBodyLength=1/0,e.insecureHTTPParser&&(x.insecureHTTPParser=e.insecureHTTPParser),p=M.request(x,(function(n){if(p.destroyed)return;const o=[n],i=+n.headers["content-length"];if(S){const e=new ze({length:ne.toFiniteNumber(i),maxRate:ne.toFiniteNumber(R)});S&&e.on("progress",(e=>{S(Object.assign(e,{download:!0}))})),o.push(e)}let a=n;const l=n.req||p;if(!1!==e.decompress&&n.headers["content-encoding"])switch("HEAD"!==c&&204!==n.statusCode||delete n.headers["content-encoding"],(n.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":o.push(g.default.createUnzip(nt)),delete n.headers["content-encoding"];break;case"deflate":o.push(new tt),o.push(g.default.createUnzip(nt)),delete n.headers["content-encoding"];break;case"br":it&&(o.push(g.default.createBrotliDecompress(ot)),delete n.headers["content-encoding"])}a=o.length>1?b.default.pipeline(o,ne.noop):o[0];const f=b.default.finished(a,(()=>{f(),_()})),v={status:n.statusCode,statusText:n.statusMessage,headers:new Ne(n.headers),config:e,request:l};if("stream"===s)v.data=a,ke(t,r,v);else{const n=[];let o=0;a.on("data",(function(t){n.push(t),o+=t.length,e.maxContentLength>-1&&o>e.maxContentLength&&(d=!0,a.destroy(),r(new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l)))})),a.on("aborted",(function(){if(d)return;const t=new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l);a.destroy(t),r(t)})),a.on("error",(function(t){p.destroyed||r(oe.from(t,null,e,l))})),a.on("end",(function(){try{let e=1===n.length?n[0]:Buffer.concat(n);"arraybuffer"!==s&&(e=e.toString(u),u&&"utf8"!==u||(e=ne.stripBOM(e))),v.data=e}catch(t){return r(oe.from(t,null,e,v.request,v))}ke(t,r,v)}))}h.once("abort",(e=>{a.destroyed||(a.emit("error",e),a.destroy())}))})),h.once("abort",(e=>{r(e),p.destroy(e)})),p.on("error",(function(t){r(oe.from(t,null,e,p))})),p.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void r(new oe("error trying to parse `config.timeout` to int",oe.ERR_BAD_OPTION_VALUE,e,p));p.setTimeout(t,(function(){if(l)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||me;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new oe(t,n.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,p)),y()}))}if(ne.isStream(o)){let t=!1,r=!1;o.on("end",(()=>{t=!0})),o.once("error",(e=>{r=!0,p.destroy(e)})),o.on("close",(()=>{t||r||y(new Ue("Request stream has been aborted",e,p))})),o.pipe(p)}else p.end(o)},new Promise(((e,r)=>{let n,o;const i=(e,t)=>{o||(o=!0,n&&n(e,t))},a=e=>{i(e,!0),r(e)};t((t=>{i(t),e(t)}),a,(e=>n=e)).catch(a)}));var t},xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const o=Ne.from(e.headers).normalize();let i,a,{responseType:s,withXSRFToken:u}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(ne.isFormData(n))if(we.hasStandardBrowserEnv||we.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(a=o.getContentType())){const[e,...t]=a?a.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const f=Fe(e.baseURL,e.url);function p(){if(!l)return;const n=Ne.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());ke((function(e){t(e),c()}),(function(e){r(e),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),ve(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=p:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(p)},l.onabort=function(){l&&(r(new oe("Request aborted",oe.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new oe("Network Error",oe.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||me;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new oe(t,n.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,l)),l=null},we.hasStandardBrowserEnv&&(u&&ne.isFunction(u)&&(u=u(e)),u||!1!==u&&ht(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&dt.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in l&&ne.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),ne.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&"json"!==s&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",_t(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",_t(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(r(!t||t.type?new Ue(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const d=Ve(f);d&&-1===we.protocols.indexOf(d)?r(new oe("Unsupported protocol "+d+":",oe.ERR_BAD_REQUEST,e)):l.send(n||null)}))}};ne.forEach(vt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Et=e=>`- ${e}`,mt=e=>ne.isFunction(e)||null===e||!1===e,yt=e=>{e=ne.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!mt(r)&&(n=vt[(t=String(r)).toLowerCase()],void 0===n))throw new oe(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new oe("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Et).join("\n"):" "+Et(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function gt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ue(null,e)}function bt(e){return gt(e),e.headers=Ne.from(e.headers),e.data=xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),yt(e.adapter||Se.adapter)(e).then((function(t){return gt(e),t.data=xe.call(e,e.transformResponse,t),t.headers=Ne.from(t.headers),t}),(function(t){return Me(t)||(gt(e),t&&t.response&&(t.response.data=xe.call(e,e.transformResponse,t.response),t.response.headers=Ne.from(t.response.headers))),Promise.reject(t)}))}const Ot=e=>e instanceof Ne?e.toJSON():e;function At(e,t){t=t||{};const r={};function n(e,t,r){return ne.isPlainObject(e)&&ne.isPlainObject(t)?ne.merge.call({caseless:r},e,t):ne.isPlainObject(t)?ne.merge({},t):ne.isArray(t)?t.slice():t}function o(e,t,r){return ne.isUndefined(t)?ne.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function i(e,t){if(!ne.isUndefined(t))return n(void 0,t)}function a(e,t){return ne.isUndefined(t)?ne.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>o(Ot(e),Ot(t),!0)};return ne.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=u[n]||o,a=i(e[n],t[n],n);ne.isUndefined(a)&&i!==s||(r[n]=a)})),r}const wt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{wt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const It={};wt.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new oe(n(o," has been removed"+(t?" in "+t:"")),oe.ERR_DEPRECATED);return t&&!It[o]&&(It[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};const Ct={assertOptions:function(e,t,r){if("object"!=typeof e)throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new oe("option "+i+" must be "+r,oe.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new oe("Unknown option "+i,oe.ERR_BAD_OPTION)}},validators:wt},St=Ct.validators;class Pt{constructor(e){this.defaults=e,this.interceptors={request:new Ee,response:new Ee}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=At(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Ct.assertOptions(r,{silentJSONParsing:St.transitional(St.boolean),forcedJSONParsing:St.transitional(St.boolean),clarifyTimeoutError:St.transitional(St.boolean)},!1),null!=n&&(ne.isFunction(n)?t.paramsSerializer={serialize:n}:Ct.assertOptions(n,{encode:St.function,serialize:St.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&ne.merge(o.common,o[t.method]);o&&ne.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ne.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,f=0;if(!s){const e=[bt.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);f<l;)c=c.then(e[f++],e[f++]);return c}l=a.length;let p=t;for(f=0;f<l;){const e=a[f++],t=a[f++];try{p=e(p)}catch(e){t.call(this,e);break}}try{c=bt.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,l=u.length;f<l;)c=c.then(u[f++],u[f++]);return c}getUri(e){return ve(Fe((e=At(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}ne.forEach(["delete","get","head","options"],(function(e){Pt.prototype[e]=function(t,r){return this.request(At(r||{},{method:e,url:t,data:(r||{}).data}))}})),ne.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(At(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Pt.prototype[e]=t(),Pt.prototype[e+"Form"]=t(!0)}));const Lt=Pt;class Tt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new Ue(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Tt((function(t){e=t})),cancel:e}}}const Rt=Tt,Dt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dt).forEach((([e,t])=>{Dt[t]=e}));const jt=Dt,Nt=function e(t){const r=new Lt(t),n=A(Lt.prototype.request,r);return ne.extend(n,Lt.prototype,r,{allOwnKeys:!0}),ne.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(At(t,r))},n}(Se);Nt.Axios=Lt,Nt.CanceledError=Ue,Nt.CancelToken=Rt,Nt.isCancel=Me,Nt.VERSION=Ge,Nt.toFormData=fe,Nt.AxiosError=oe,Nt.Cancel=Nt.CanceledError,Nt.all=function(e){return Promise.all(e)},Nt.spread=function(e){return function(t){return e.apply(null,t)}},Nt.isAxiosError=function(e){return ne.isObject(e)&&!0===e.isAxiosError},Nt.mergeConfig=At,Nt.AxiosHeaders=Ne,Nt.formToJSON=e=>Ie(ne.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=yt,Nt.HttpStatusCode=jt,Nt.default=Nt,e.exports=Nt},4649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(8804);const o=function(e,t){for(var r=e.length;r--;)if((0,n.Z)(e[r][0],t))return r;return-1};var i=Array.prototype.splice;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,r=o(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,r=o(t,e);return r<0?void 0:t[r][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var r=this.__data__,n=o(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};const s=a},8896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(5546),o=r(3221);const i=(0,n.Z)(o.Z,"Map")},3703:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});const n=(0,r(5546).Z)(Object,"create");var o=Object.prototype.hasOwnProperty;var i=Object.prototype.hasOwnProperty;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}a.prototype.clear=function(){this.__data__=n?n(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)},a.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this};const s=a;var u=r(4649),c=r(8896);const l=function(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map};function f(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}f.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(c.Z||u.Z),string:new s}},f.prototype.delete=function(e){var t=l(this,e).delete(e);return this.size-=t?1:0,t},f.prototype.get=function(e){return l(this,e).get(e)},f.prototype.has=function(e){return l(this,e).has(e)},f.prototype.set=function(e,t){var r=l(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};const p=f},6218:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(4649);var o=r(8896),i=r(3703);function a(e){var t=this.__data__=new n.Z(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new n.Z,this.size=0},a.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var r=this.__data__;if(r instanceof n.Z){var a=r.__data__;if(!o.Z||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i.Z(a)}return r.set(e,t),this.size=r.size,this};const s=a},187:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(3221).Z.Symbol},8282:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(3221).Z.Uint8Array},848:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(4248),o=r(7885),i=r(4975),a=r(6401),s=r(8127),u=Object.prototype.hasOwnProperty;const c=function(e,t){var r=(0,o.Z)(e),c=!r&&(0,n.Z)(e),l=!r&&!c&&(0,i.Z)(e),f=!r&&!c&&!l&&(0,s.Z)(e),p=r||c||l||f,d=p?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],h=d.length;for(var _ in e)!t&&!u.call(e,_)||p&&("length"==_||l&&("offset"==_||"parent"==_)||f&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||(0,a.Z)(_,h))||d.push(_);return d}},5598:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},5810:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},6299:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(905),o=r(8804),i=Object.prototype.hasOwnProperty;const a=function(e,t,r){var a=e[t];i.call(e,t)&&(0,o.Z)(a,r)&&(void 0!==r||t in e)||(0,n.Z)(e,t,r)}},905:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(5088);const o=function(e,t,r){"__proto__"==t&&n.Z?(0,n.Z)(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},7024:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Z});var n=r(6218);var o=r(6299),i=r(2436),a=r(298);var s=r(7477);var u=r(3221),c="object"==typeof exports&&exports&&!exports.nodeType&&exports,l=c&&"object"==typeof module&&module&&!module.nodeType&&module,f=l&&l.exports===c?u.Z.Buffer:void 0,p=f?f.allocUnsafe:void 0;var d=r(6808);var h=r(8390);var _=r(7245),v=r(9878),E=r(8649),m=Object.prototype.hasOwnProperty;var y=r(8282);const g=function(e){var t=new e.constructor(e.byteLength);return new y.Z(t).set(new y.Z(e)),t};var b=/\w*$/;var O=r(187),A=O.Z?O.Z.prototype:void 0,w=A?A.valueOf:void 0;const I=function(e,t,r){var n,o,i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return g(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var r=t?g(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var r=t?g(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,r);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new(o=e).constructor(o.source,b.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return n=e,w?Object(w.call(n)):{}}};var C=r(3122),S=Object.create;const P=function(){function e(){}return function(t){if(!(0,C.default)(t))return{};if(S)return S(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var L=r(9552),T=r(5441);var R=r(7885),D=r(4975),j=r(3391);var N=r(3225),x=r(7755),M=x.Z&&x.Z.isMap;const U=M?(0,N.Z)(M):function(e){return(0,j.Z)(e)&&"[object Map]"==(0,E.Z)(e)};var k=x.Z&&x.Z.isSet;const F=k?(0,N.Z)(k):function(e){return(0,j.Z)(e)&&"[object Set]"==(0,E.Z)(e)};var G="[object Arguments]",V="[object Function]",B="[object Object]",H={};H[G]=H["[object Array]"]=H["[object ArrayBuffer]"]=H["[object DataView]"]=H["[object Boolean]"]=H["[object Date]"]=H["[object Float32Array]"]=H["[object Float64Array]"]=H["[object Int8Array]"]=H["[object Int16Array]"]=H["[object Int32Array]"]=H["[object Map]"]=H["[object Number]"]=H[B]=H["[object RegExp]"]=H["[object Set]"]=H["[object String]"]=H["[object Symbol]"]=H["[object Uint8Array]"]=H["[object Uint8ClampedArray]"]=H["[object Uint16Array]"]=H["[object Uint32Array]"]=!0,H["[object Error]"]=H[V]=H["[object WeakMap]"]=!1;const Z=function e(t,r,u,c,l,f){var y,g=1&r,b=2&r,O=4&r;if(u&&(y=l?u(t,c,l,f):u(t)),void 0!==y)return y;if(!(0,C.default)(t))return t;var A=(0,R.Z)(t);if(A){if(y=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&m.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(t),!g)return function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(t,y)}else{var w=(0,E.Z)(t),S=w==V||"[object GeneratorFunction]"==w;if((0,D.Z)(t))return function(e,t){if(t)return e.slice();var r=e.length,n=p?p(r):new e.constructor(r);return e.copy(n),n}(t,g);if(w==B||w==G||S&&!l){if(y=b||S?{}:function(e){return"function"!=typeof e.constructor||(0,T.Z)(e)?{}:P((0,L.Z)(e))}(t),!g)return b?function(e,t){return(0,i.Z)(e,(0,h.Z)(e),t)}(t,function(e,t){return e&&(0,i.Z)(t,(0,s.Z)(t),e)}(y,t)):function(e,t){return(0,i.Z)(e,(0,d.Z)(e),t)}(t,function(e,t){return e&&(0,i.Z)(t,(0,a.default)(t),e)}(y,t))}else{if(!H[w])return l?t:{};y=I(t,w,g)}}f||(f=new n.Z);var j=f.get(t);if(j)return j;f.set(t,y),F(t)?t.forEach((function(n){y.add(e(n,r,u,n,t,f))})):U(t)&&t.forEach((function(n,o){y.set(o,e(n,r,u,o,t,f))}));var N=O?b?v.Z:_.Z:b?s.Z:a.default,x=A?void 0:N(t);return function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););}(x||t,(function(n,i){x&&(n=t[i=n]),(0,o.Z)(y,i,e(n,r,u,i,t,f))})),y}},9523:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(7653),o=r(7969);const i=function(e,t){for(var r=0,i=(t=(0,n.Z)(t,e)).length;null!=e&&r<i;)e=e[(0,o.Z)(t[r++])];return r&&r==i?e:void 0}},2938:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(5810),o=r(7885);const i=function(e,t,r){var i=t(e);return(0,o.Z)(e)?i:(0,n.Z)(i,r(e))}},9001:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(187),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n.Z?n.Z.toStringTag:void 0;var u=Object.prototype.toString;var c=n.Z?n.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}(e):function(e){return u.call(e)}(e)}},4187:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(6299),o=r(7653),i=r(6401),a=r(3122),s=r(7969);const u=function(e,t,r,u){if(!(0,a.default)(e))return e;for(var c=-1,l=(t=(0,o.Z)(t,e)).length,f=l-1,p=e;null!=p&&++c<l;){var d=(0,s.Z)(t[c]),h=r;if("__proto__"===d||"constructor"===d||"prototype"===d)return e;if(c!=f){var _=p[d];void 0===(h=u?u(_,d,p):void 0)&&(h=(0,a.default)(_)?_:(0,i.Z)(t[c+1])?[]:{})}(0,n.Z)(p,d,h),p=p[d]}return e}},3225:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return function(t){return e(t)}}},7653:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(7885),o=r(3502),i=r(3703);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(a.Cache||i.Z),r}a.Cache=i.Z;var s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g;const c=(l=a((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(s,(function(e,r,n,o){t.push(n?o.replace(u,"$1"):r||e)})),t}),(function(e){return 500===f.size&&f.clear(),e})),f=l.cache,l);var l,f,p=r(187),d=r(5598),h=r(2758),_=p.Z?p.Z.prototype:void 0,v=_?_.toString:void 0;const E=function e(t){if("string"==typeof t)return t;if((0,n.Z)(t))return(0,d.Z)(t,e)+"";if((0,h.Z)(t))return v?v.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r},m=function(e){return null==e?"":E(e)},y=function(e,t){return(0,n.Z)(e)?e:(0,o.Z)(e,t)?[e]:c(m(e))}},2436:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(6299),o=r(905);const i=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(r[c],e[c],c,r,e):void 0;void 0===l&&(l=e[c]),a?(0,o.Z)(r,c,l):(0,n.Z)(r,c,l)}return r}},5088:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(5546);const o=function(){try{var e=(0,n.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},1380:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(5810),o=r(187),i=r(4248),a=r(7885),s=o.Z?o.Z.isConcatSpreadable:void 0;const u=function(e){return(0,a.Z)(e)||(0,i.Z)(e)||!!(s&&e&&e[s])},c=function e(t,r,o,i,a){var s=-1,c=t.length;for(o||(o=u),a||(a=[]);++s<c;){var l=t[s];r>0&&o(l)?r>1?e(l,r-1,o,i,a):(0,n.Z)(a,l):i||(a[a.length]=l)}return a},l=function(e){return null!=e&&e.length?c(e,1):[]};var f=Math.max;var p=r(5088),d=r(9930);const h=p.Z?function(e,t){return(0,p.Z)(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:d.Z;var _=Date.now;const v=(E=h,m=0,y=0,function(){var e=_(),t=16-(e-y);if(y=e,t>0){if(++m>=800)return arguments[0]}else m=0;return E.apply(void 0,arguments)});var E,m,y;const g=function(e){return v(function(e,t,r){return t=f(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=f(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,s)}}(e,void 0,l),e+"")}},2168:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n="object"==typeof global&&global&&global.Object===Object&&global},7245:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(2938),o=r(6808),i=r(298);const a=function(e){return(0,n.Z)(e,i.default,o.Z)}},9878:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(2938),o=r(8390),i=r(7477);const a=function(e){return(0,n.Z)(e,i.Z,o.Z)}},5546:(e,t,r)=>{"use strict";r.d(t,{Z:()=>v});var n=r(8936);const o=r(3221).Z["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var s=r(3122),u=r(6682),c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,p=l.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const _=function(e){return!(!(0,s.default)(e)||(t=e,a&&a in t))&&((0,n.Z)(e)?h:c).test((0,u.Z)(e));var t},v=function(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return _(r)?r:void 0}},9552:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=(0,r(6048).Z)(Object.getPrototypeOf,Object)},6808:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(813),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const a=i?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}(i(e),(function(t){return o.call(e,t)})))}:n.Z},8390:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(5810),o=r(9552),i=r(6808),a=r(813);const s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,n.Z)(t,(0,i.Z)(e)),e=(0,o.Z)(e);return t}:a.Z},8649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>A});var n=r(5546),o=r(3221);const i=(0,n.Z)(o.Z,"DataView");var a=r(8896);const s=(0,n.Z)(o.Z,"Promise"),u=(0,n.Z)(o.Z,"Set"),c=(0,n.Z)(o.Z,"WeakMap");var l=r(9001),f=r(6682),p="[object Map]",d="[object Promise]",h="[object Set]",_="[object WeakMap]",v="[object DataView]",E=(0,f.Z)(i),m=(0,f.Z)(a.Z),y=(0,f.Z)(s),g=(0,f.Z)(u),b=(0,f.Z)(c),O=l.Z;(i&&O(new i(new ArrayBuffer(1)))!=v||a.Z&&O(new a.Z)!=p||s&&O(s.resolve())!=d||u&&O(new u)!=h||c&&O(new c)!=_)&&(O=function(e){var t=(0,l.Z)(e),r="[object Object]"==t?e.constructor:void 0,n=r?(0,f.Z)(r):"";if(n)switch(n){case E:return v;case m:return p;case y:return d;case g:return h;case b:return _}return t});const A=O},6401:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=/^(?:0|[1-9]\d*)$/;const o=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},3502:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(7885),o=r(2758),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const s=function(e,t){if((0,n.Z)(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!(0,o.Z)(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},5441:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=Object.prototype;const o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},7755:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(2168),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o&&n.Z.process;const s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}()},6048:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){return function(r){return e(t(r))}}},3221:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(2168),o="object"==typeof self&&self&&self.Object===Object&&self;const i=n.Z||o||Function("return this")()},7969:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(2758);const o=function(e){if("string"==typeof e||(0,n.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},6682:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=Function.prototype.toString;const o=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7921:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(7024);const o=function(e){return(0,n.Z)(e,5)}},8804:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){return e===t||e!=e&&t!=t}},772:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(9523);const o=function(e,t,r){var o=null==e?void 0:(0,n.Z)(e,t);return void 0===o?r:o}},3488:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});const n=function(e,t){return null!=e&&t in Object(e)};var o=r(7653),i=r(4248),a=r(7885),s=r(6401),u=r(1164),c=r(7969);const l=function(e,t){return null!=e&&function(e,t,r){for(var n=-1,l=(t=(0,o.Z)(t,e)).length,f=!1;++n<l;){var p=(0,c.Z)(t[n]);if(!(f=null!=e&&r(e,p)))break;e=e[p]}return f||++n!=l?f:!!(l=null==e?0:e.length)&&(0,u.Z)(l)&&(0,s.Z)(p,l)&&((0,a.Z)(e)||(0,i.Z)(e))}(e,t,n)}},9930:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return e}},4248:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(9001),o=r(3391);const i=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,n.Z)(e)};var a=Object.prototype,s=a.hasOwnProperty,u=a.propertyIsEnumerable;const c=i(function(){return arguments}())?i:function(e){return(0,o.Z)(e)&&s.call(e,"callee")&&!u.call(e,"callee")}},7885:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=Array.isArray},3282:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(8936),o=r(1164);const i=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,n.Z)(e)}},4975:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(3221);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?n.Z.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},8936:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9001),o=r(3122);const i=function(e){if(!(0,o.default)(e))return!1;var t=(0,n.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1164:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3122:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3391:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return null!=e&&"object"==typeof e}},2758:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9001),o=r(3391);const i=function(e){return"symbol"==typeof e||(0,o.Z)(e)&&"[object Symbol]"==(0,n.Z)(e)}},8127:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(9001),o=r(1164),i=r(3391),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=r(3225),u=r(7755),c=u.Z&&u.Z.isTypedArray;const l=c?(0,s.Z)(c):function(e){return(0,i.Z)(e)&&(0,o.Z)(e.length)&&!!a[(0,n.Z)(e)]}},298:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(848),o=r(5441);const i=(0,r(6048).Z)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;var s=r(3282);const u=function(e){return(0,s.Z)(e)?(0,n.Z)(e):function(e){if(!(0,o.Z)(e))return i(e);var t=[];for(var r in Object(e))a.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}},7477:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(848),o=r(3122),i=r(5441);var a=Object.prototype.hasOwnProperty;const s=function(e){if(!(0,o.default)(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=(0,i.Z)(e),r=[];for(var n in e)("constructor"!=n||!t&&a.call(e,n))&&r.push(n);return r};var u=r(3282);const c=function(e){return(0,u.Z)(e)?(0,n.Z)(e,!0):s(e)}},1395:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(5598),o=r(7024),i=r(7653);var a=r(9523);const s=function(e,t){return t.length<2?e:(0,a.Z)(e,function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}(t,0,-1))};var u=r(7969);const c=function(e,t){return t=(0,i.Z)(t,e),null==(e=s(e,t))||delete e[(0,u.Z)((r=t,n=null==r?0:r.length,n?r[n-1]:void 0))];var r,n};var l=r(2436),f=r(9001),p=r(9552),d=r(3391),h=Function.prototype,_=Object.prototype,v=h.toString,E=_.hasOwnProperty,m=v.call(Object);const y=function(e){return function(e){if(!(0,d.Z)(e)||"[object Object]"!=(0,f.Z)(e))return!1;var t=(0,p.Z)(e);if(null===t)return!0;var r=E.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&v.call(r)==m}(e)?void 0:e};var g=r(1380),b=r(9878);const O=(0,g.Z)((function(e,t){var r={};if(null==e)return r;var a=!1;t=(0,n.Z)(t,(function(t){return t=(0,i.Z)(t,e),a||(a=t.length>1),t})),(0,l.Z)(e,(0,b.Z)(e),r),a&&(r=(0,o.Z)(r,7,y));for(var s=t.length;s--;)c(r,t[s]);return r}))},8337:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(9523),o=r(4187),i=r(7653);var a=r(3488);const s=function(e,t){return function(e,t,r){for(var a=-1,s=t.length,u={};++a<s;){var c=t[a],l=(0,n.Z)(e,c);r(l,c)&&(0,o.Z)(u,(0,i.Z)(c,e),l)}return u}(e,t,(function(t,r){return(0,a.Z)(e,r)}))},u=(0,r(1380).Z)((function(e,t){return null==e?{}:s(e,t)}))},6503:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>J});const n=function(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r},o=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}return e};var i=r(298);var a=r(3282);const s=(u=function(e,t){return e&&o(e,t,i.default)},function(e,t){if(null==e)return e;if(!(0,a.Z)(e))return u(e,t);for(var r=e.length,n=-1,o=Object(e);++n<r&&!1!==t(o[n],n,o););return e});var u,c=r(6218),l=r(3703);function f(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new l.Z;++t<r;)this.add(e[t])}f.prototype.add=f.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},f.prototype.has=function(e){return this.__data__.has(e)};const p=f,d=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},h=function(e,t,r,n,o,i){var a=1&r,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,h=!0,_=2&r?new p:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var v=e[f],E=t[f];if(n)var m=a?n(E,v,f,t,e,i):n(v,E,f,e,t,i);if(void 0!==m){if(m)continue;h=!1;break}if(_){if(!d(t,(function(e,t){if(a=t,!_.has(a)&&(v===e||o(v,e,r,n,i)))return _.push(t);var a}))){h=!1;break}}else if(v!==E&&!o(v,E,r,n,i)){h=!1;break}}return i.delete(e),i.delete(t),h};var _=r(187),v=r(8282),E=r(8804);const m=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r},y=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r};var g=_.Z?_.Z.prototype:void 0,b=g?g.valueOf:void 0;var O=r(7245),A=Object.prototype.hasOwnProperty;var w=r(8649),I=r(7885),C=r(4975),S=r(8127),P="[object Arguments]",L="[object Array]",T="[object Object]",R=Object.prototype.hasOwnProperty;const D=function(e,t,r,n,o,i){var a=(0,I.Z)(e),s=(0,I.Z)(t),u=a?L:(0,w.Z)(e),l=s?L:(0,w.Z)(t),f=(u=u==P?T:u)==T,p=(l=l==P?T:l)==T,d=u==l;if(d&&(0,C.Z)(e)){if(!(0,C.Z)(t))return!1;a=!0,f=!1}if(d&&!f)return i||(i=new c.Z),a||(0,S.Z)(e)?h(e,t,r,n,o,i):function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new v.Z(e),new v.Z(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,E.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=m;case"[object Set]":var u=1&n;if(s||(s=y),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var l=h(s(e),s(t),n,o,i,a);return a.delete(e),l;case"[object Symbol]":if(b)return b.call(e)==b.call(t)}return!1}(e,t,u,r,n,o,i);if(!(1&r)){var _=f&&R.call(e,"__wrapped__"),g=p&&R.call(t,"__wrapped__");if(_||g){var D=_?e.value():e,j=g?t.value():t;return i||(i=new c.Z),o(D,j,r,n,i)}}return!!d&&(i||(i=new c.Z),function(e,t,r,n,o,i){var a=1&r,s=(0,O.Z)(e),u=s.length;if(u!=(0,O.Z)(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:A.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var _=e[l=s[c]],v=t[l];if(n)var E=a?n(v,_,l,t,e,i):n(_,v,l,e,t,i);if(!(void 0===E?_===v||o(_,v,r,n,i):E)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var m=e.constructor,y=t.constructor;m==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,r,n,o,i))};var j=r(3391);const N=function e(t,r,n,o,i){return t===r||(null==t||null==r||!(0,j.Z)(t)&&!(0,j.Z)(r)?t!=t&&r!=r:D(t,r,n,o,e,i))};var x=r(3122);const M=function(e){return e==e&&!(0,x.default)(e)},U=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}},k=function(e){var t=function(e){for(var t=(0,i.default)(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,M(o)]}return t}(e);return 1==t.length&&t[0][2]?U(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var u=(s=r[o])[0],l=e[u],f=s[1];if(a&&s[2]){if(void 0===l&&!(u in e))return!1}else{var p=new c.Z;if(n)var d=n(l,f,u,e,t,p);if(!(void 0===d?N(f,l,3,n,p):d))return!1}}return!0}(r,e,t)}};var F=r(772),G=r(3488),V=r(3502),B=r(7969);var H=r(9930);var Z=r(9523);const q=function(e){return(0,V.Z)(e)?(t=(0,B.Z)(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return(0,Z.Z)(t,e)}}(e);var t},z=function(e){return"function"==typeof e?e:null==e?H.Z:"object"==typeof e?(0,I.Z)(e)?(t=e[0],r=e[1],(0,V.Z)(t)&&M(r)?U((0,B.Z)(t),r):function(e){var n=(0,F.default)(e,t);return void 0===n&&n===r?(0,G.Z)(e,t):N(r,n,3)}):k(e):q(e);var t,r},W=function(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r},J=function(e,t,r){var o=(0,I.Z)(e)?n:W,i=arguments.length<3;return o(e,z(t),r,i,s)}},5513:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(4187);const o=function(e,t,r){return null==e?e:(0,n.Z)(e,t,r)}},813:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(){return[]}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(3607);return __webpack_exports__})()));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("form-data"),require("fs-extra"),require("deep-clone"),require("chalk"),require("ora"),require("semver-compare"),require("archiver"),require("easy-table"),require("fast-glob"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("unzipper"));else if("function"==typeof define&&define.amd)define(["form-data","fs-extra","deep-clone","chalk","ora","semver-compare","archiver","easy-table","fast-glob","folder-hash","clipboardy","qrcode","qrcode-terminal","unzipper"],t);else{var r="object"==typeof exports?t(require("form-data"),require("fs-extra"),require("deep-clone"),require("chalk"),require("ora"),require("semver-compare"),require("archiver"),require("easy-table"),require("fast-glob"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("unzipper")):t(e["form-data"],e["fs-extra"],e["deep-clone"],e.chalk,e.ora,e["semver-compare"],e.archiver,e["easy-table"],e["fast-glob"],e["folder-hash"],e.clipboardy,e.qrcode,e["qrcode-terminal"],e.unzipper);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(global,((__WEBPACK_EXTERNAL_MODULE__9258__,__WEBPACK_EXTERNAL_MODULE__9849__,__WEBPACK_EXTERNAL_MODULE__469__,__WEBPACK_EXTERNAL_MODULE__1606__,__WEBPACK_EXTERNAL_MODULE__8838__,__WEBPACK_EXTERNAL_MODULE__7086__,__WEBPACK_EXTERNAL_MODULE__3732__,__WEBPACK_EXTERNAL_MODULE__6883__,__WEBPACK_EXTERNAL_MODULE__9508__,__WEBPACK_EXTERNAL_MODULE__2896__,__WEBPACK_EXTERNAL_MODULE__1887__,__WEBPACK_EXTERNAL_MODULE__3727__,__WEBPACK_EXTERNAL_MODULE__4563__,__WEBPACK_EXTERNAL_MODULE__2541__)=>(()=>{var __webpack_modules__={5881:e=>{var t=1e3,r=60*t,n=60*r,o=24*n;function i(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,a){a=a||{};var s,u,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(i){var a=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===c&&isFinite(e))return a.long?(s=e,(u=Math.abs(s))>=o?i(s,u,o,"day"):u>=n?i(s,u,n,"hour"):u>=r?i(s,u,r,"minute"):u>=t?i(s,u,t,"second"):s+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=n?Math.round(e/n)+"h":i>=r?Math.round(e/r)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5130:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})(),t.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"],t.log=console.debug||console.log||(()=>{}),e.exports=r(7123)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7123:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,i,a=null;function s(...e){if(!s.enabled)return;const n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];r=i.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(5881),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},445:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(5130):e.exports=r(8414)},8414:(e,t,r)=>{const n=r(6224),o=r(3837);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(o.format(...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:o}=this;if(o){const t=this.color,o="[3"+(t<8?t:"8;5;"+t),i=` ${o};1m${n} `;r[0]=i+r[0].split("\n").join("\n"+i),r.push(o+"m+"+e.exports.humanize(this.diff)+"")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+n+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=o.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=r(7013);e&&(e.stderr||e).level>=2&&(t.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(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=r(7123)(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}},8137:e=>{"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)}},8223:function(e,t,r){e.exports=(r(2081),r(6113),function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(34)},function(e,t,r){var n=r(29)("wks"),o=r(33),i=r(2).Symbol,a="function"==typeof i;(e.exports=function(e){return n[e]||(n[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=n},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){var n=r(9);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){e.exports=!r(24)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(12),o=r(17);e.exports=r(4)?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t){var r=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(14);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports={}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){var n=r(3),o=r(26),i=r(32),a=Object.defineProperty;t.f=r(4)?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),o)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(42),o=r(15);e.exports=function(e){return n(o(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(9),o=r(2).document,i=n(o)&&n(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(12).f,o=r(8),i=r(1)("toStringTag");e.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t,r){var n=r(29)("keys"),o=r(33);e.exports=function(e){return n[e]||(n[e]=o(e))}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(11),o=r(1)("toStringTag"),i="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?r:i?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){var n=r(2),o=r(6),i=r(7),a=r(5),s="prototype",u=function(e,t,r){var c,l,p,f=e&u.F,d=e&u.G,h=e&u.S,_=e&u.P,v=e&u.B,E=e&u.W,m=d?o:o[t]||(o[t]={}),g=m[s],y=d?n:h?n[t]:(n[t]||{})[s];for(c in d&&(r=t),r)(l=!f&&y&&void 0!==y[c])&&c in m||(p=l?y[c]:r[c],m[c]=d&&"function"!=typeof y[c]?r[c]:v&&l?i(p,n):E&&y[c]==p?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[s]=e[s],t}(p):_&&"function"==typeof p?i(Function.call,p):p,_&&((m.virtual||(m.virtual={}))[c]=p,e&u.R&&g&&!g[c]&&a(g,c,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){e.exports=r(2).document&&document.documentElement},function(e,t,r){e.exports=!r(4)&&!r(24)((function(){return 7!=Object.defineProperty(r(16)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){"use strict";var n=r(28),o=r(23),i=r(57),a=r(5),s=r(8),u=r(10),c=r(45),l=r(18),p=r(52),f=r(1)("iterator"),d=!([].keys&&"next"in[].keys()),h="keys",_="values",v=function(){return this};e.exports=function(e,t,r,E,m,g,y){c(r,t,E);var b,A,O,w=function(e){if(!d&&e in P)return P[e];switch(e){case h:case _:return function(){return new r(this,e)}}return function(){return new r(this,e)}},C=t+" Iterator",S=m==_,I=!1,P=e.prototype,R=P[f]||P["@@iterator"]||m&&P[m],L=R||w(m),T=m?S?w("entries"):L:void 0,D="Array"==t&&P.entries||R;if(D&&(O=p(D.call(new e)))!==Object.prototype&&(l(O,C,!0),n||s(O,f)||a(O,f,v)),S&&R&&R.name!==_&&(I=!0,L=function(){return R.call(this)}),n&&!y||!d&&!I&&P[f]||a(P,f,L),u[t]=L,u[C]=v,m)if(b={values:S?L:w(_),keys:g?L:w(h),entries:T},y)for(A in b)A in P||i(P,A,b[A]);else o(o.P+o.F*(d||I),t,b);return b}},function(e,t){e.exports=!0},function(e,t,r){var n=r(2),o="__core-js_shared__",i=n[o]||(n[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,r){var n,o,i,a=r(7),s=r(41),u=r(25),c=r(16),l=r(2),p=l.process,f=l.setImmediate,d=l.clearImmediate,h=l.MessageChannel,_=0,v={},E="onreadystatechange",m=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},g=function(e){m.call(e.data)};f&&d||(f=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return v[++_]=function(){s("function"==typeof e?e:Function(e),t)},n(_),_},d=function(e){delete v[e]},"process"==r(11)(p)?n=function(e){p.nextTick(a(m,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=g,n=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(n=function(e){l.postMessage(e+"","*")},l.addEventListener("message",g,!1)):n=E in c("script")?function(e){u.appendChild(c("script"))[E]=function(){u.removeChild(this),m.call(e)}}:function(e){setTimeout(a(m,e,1),0)}),e.exports={set:f,clear:d}},function(e,t,r){var n=r(20),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t,r){var n=r(9);e.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){"use strict";function n(e){return(0,s.createHash)("sha256").update(e).digest("hex")}function o(e){switch(u){case"darwin":return e.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error("Unsupported platform: "+process.platform)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(r(35));t.machineIdSync=function(e){var t=o((0,a.execSync)(c[u]).toString());return e?t:n(t)},t.machineId=function(e){return new i.default((function(t,r){return(0,a.exec)(c[u],{},(function(i,a,s){if(i)return r(new Error("Error while obtaining machine id: "+i.stack));var u=o(a.toString());return t(e?u:n(u))}))}))};var a=r(70),s=r(71),u=process.platform,c={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(e,t,r){e.exports={default:r(36),__esModule:!0}},function(e,t,r){r(66),r(68),r(69),r(67),e.exports=r(6).Promise},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){var n=r(13),o=r(31),i=r(62);e.exports=function(e){return function(t,r,a){var s,u=n(t),c=o(u.length),l=i(a,c);if(e&&r!=r){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===r)return e||l||0;return!e&&-1}}},function(e,t,r){var n=r(7),o=r(44),i=r(43),a=r(3),s=r(31),u=r(64),c={},l={};t=e.exports=function(e,t,r,p,f){var d,h,_,v,E=f?function(){return e}:u(e),m=n(r,p,t?2:1),g=0;if("function"!=typeof E)throw TypeError(e+" is not iterable!");if(i(E)){for(d=s(e.length);d>g;g++)if((v=t?m(a(h=e[g])[0],h[1]):m(e[g]))===c||v===l)return v}else for(_=E.call(e);!(h=_.next()).done;)if((v=o(_,m,h.value,t))===c||v===l)return v},t.BREAK=c,t.RETURN=l},function(e,t){e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){var n=r(11);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){var n=r(10),o=r(1)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||i[o]===e)}},function(e,t,r){var n=r(3);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){"use strict";var n=r(49),o=r(17),i=r(18),a={};r(5)(a,r(1)("iterator"),(function(){return this})),e.exports=function(e,t,r){e.prototype=n(a,{next:o(1,r)}),i(e,t+" Iterator")}},function(e,t,r){var n=r(1)("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i=[7],a=i[n]();a.next=function(){return{done:r=!0}},i[n]=function(){return a},e(i)}catch(e){}return r}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){var n=r(2),o=r(30).set,i=n.MutationObserver||n.WebKitMutationObserver,a=n.process,s=n.Promise,u="process"==r(11)(a);e.exports=function(){var e,t,r,c=function(){var n,o;for(u&&(n=a.domain)&&n.exit();e;){o=e.fn,e=e.next;try{o()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(u)r=function(){a.nextTick(c)};else if(i){var l=!0,p=document.createTextNode("");new i(c).observe(p,{characterData:!0}),r=function(){p.data=l=!l}}else if(s&&s.resolve){var f=s.resolve();r=function(){f.then(c)}}else r=function(){o.call(n,c)};return function(n){var o={fn:n,next:void 0};t&&(t.next=o),e||(e=o,r()),t=o}}},function(e,t,r){var n=r(3),o=r(50),i=r(22),a=r(19)("IE_PROTO"),s=function(){},u="prototype",c=function(){var e,t=r(16)("iframe"),n=i.length;for(t.style.display="none",r(25).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c[u][i[n]];return c()};e.exports=Object.create||function(e,t){var r;return null!==e?(s[u]=n(e),r=new s,s[u]=null,r[a]=e):r=c(),void 0===t?r:o(r,t)}},function(e,t,r){var n=r(12),o=r(3),i=r(54);e.exports=r(4)?Object.defineProperties:function(e,t){o(e);for(var r,a=i(t),s=a.length,u=0;s>u;)n.f(e,r=a[u++],t[r]);return e}},function(e,t,r){var n=r(55),o=r(17),i=r(13),a=r(32),s=r(8),u=r(26),c=Object.getOwnPropertyDescriptor;t.f=r(4)?c:function(e,t){if(e=i(e),t=a(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return o(!n.f.call(e,t),e[t])}},function(e,t,r){var n=r(8),o=r(63),i=r(19)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,r){var n=r(8),o=r(13),i=r(39)(!1),a=r(19)("IE_PROTO");e.exports=function(e,t){var r,s=o(e),u=0,c=[];for(r in s)r!=a&&n(s,r)&&c.push(r);for(;t.length>u;)n(s,r=t[u++])&&(~i(c,r)||c.push(r));return c}},function(e,t,r){var n=r(53),o=r(22);e.exports=Object.keys||function(e){return n(e,o)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){var n=r(5);e.exports=function(e,t,r){for(var o in t)r&&e[o]?e[o]=t[o]:n(e,o,t[o]);return e}},function(e,t,r){e.exports=r(5)},function(e,t,r){var n=r(9),o=r(3),i=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=r(7)(Function.call,r(51).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return i(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:i}},function(e,t,r){"use strict";var n=r(2),o=r(6),i=r(12),a=r(4),s=r(1)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:n[e];a&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,r){var n=r(3),o=r(14),i=r(1)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||null==(r=n(a)[i])?t:o(r)}},function(e,t,r){var n=r(20),o=r(15);e.exports=function(e){return function(t,r){var i,a,s=String(o(t)),u=n(r),c=s.length;return u<0||u>=c?e?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):i:e?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(e,t,r){var n=r(20),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=n(e))<0?o(e+t,0):i(e,t)}},function(e,t,r){var n=r(15);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(21),o=r(1)("iterator"),i=r(10);e.exports=r(6).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[n(e)]}},function(e,t,r){"use strict";var n=r(37),o=r(47),i=r(10),a=r(13);e.exports=r(27)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])}),"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(e,t){},function(e,t,r){"use strict";var n,o,i,a=r(28),s=r(2),u=r(7),c=r(21),l=r(23),p=r(9),f=(r(3),r(14)),d=r(38),h=r(40),_=(r(58).set,r(60)),v=r(30).set,E=r(48)(),m="Promise",g=s.TypeError,y=s.process,b=s[m],A="process"==c(y=s.process),O=function(){},w=!!function(){try{var e=b.resolve(1),t=(e.constructor={})[r(1)("species")]=function(e){e(O,O)};return(A||"function"==typeof PromiseRejectionEvent)&&e.then(O)instanceof t}catch(e){}}(),C=function(e,t){return e===t||e===b&&t===i},S=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},I=function(e){return C(b,e)?new P(e):new o(e)},P=o=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw g("Bad Promise constructor");t=e,r=n})),this.resolve=f(t),this.reject=f(r)},R=function(e){try{e()}catch(e){return{error:e}}},L=function(e,t){if(!e._n){e._n=!0;var r=e._c;E((function(){for(var n=e._v,o=1==e._s,i=0,a=function(t){var r,i,a=o?t.ok:t.fail,s=t.resolve,u=t.reject,c=t.domain;try{a?(o||(2==e._h&&x(e),e._h=1),!0===a?r=n:(c&&c.enter(),r=a(n),c&&c.exit()),r===t.promise?u(g("Promise-chain cycle")):(i=S(r))?i.call(r,s,u):s(r)):u(n)}catch(e){u(e)}};r.length>i;)a(r[i++]);e._c=[],e._n=!1,t&&!e._h&&T(e)}))}},T=function(e){v.call(s,(function(){var t,r,n,o=e._v;if(D(e)&&(t=R((function(){A?y.emit("unhandledRejection",o,e):(r=s.onunhandledrejection)?r({promise:e,reason:o}):(n=s.console)&&n.error&&n.error("Unhandled promise rejection",o)})),e._h=A||D(e)?2:1),e._a=void 0,t)throw t.error}))},D=function(e){if(1==e._h)return!1;for(var t,r=e._a||e._c,n=0;r.length>n;)if((t=r[n++]).fail||!D(t.promise))return!1;return!0},x=function(e){v.call(s,(function(){var t;A?y.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),L(t,!0))},j=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw g("Promise can't be resolved itself");(t=S(e))?E((function(){var n={_w:r,_d:!1};try{t.call(e,u(j,n,1),u(N,n,1))}catch(e){N.call(n,e)}})):(r._v=e,r._s=1,L(r,!1))}catch(e){N.call({_w:r,_d:!1},e)}}};w||(b=function(e){d(this,b,m,"_h"),f(e),n.call(this);try{e(u(j,this,1),u(N,this,1))}catch(e){N.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(56)(b.prototype,{then:function(e,t){var r=I(_(this,b));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=A?y.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&L(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),P=function(){var e=new n;this.promise=e,this.resolve=u(j,e,1),this.reject=u(N,e,1)}),l(l.G+l.W+l.F*!w,{Promise:b}),r(18)(b,m),r(59)(m),i=r(6)[m],l(l.S+l.F*!w,m,{reject:function(e){var t=I(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(a||!w),m,{resolve:function(e){if(e instanceof b&&C(e.constructor,this))return e;var t=I(this);return(0,t.resolve)(e),t.promise}}),l(l.S+l.F*!(w&&r(46)((function(e){b.all(e).catch(O)}))),m,{all:function(e){var t=this,r=I(t),n=r.resolve,o=r.reject,i=R((function(){var r=[],i=0,a=1;h(e,!1,(function(e){var s=i++,u=!1;r.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,r[s]=e,--a||n(r))}),o)})),--a||n(r)}));return i&&o(i.error),r.promise},race:function(e){var t=this,r=I(t),n=r.reject,o=R((function(){h(e,!1,(function(e){t.resolve(e).then(r.resolve,n)}))}));return o&&n(o.error),r.promise}})},function(e,t,r){"use strict";var n=r(61)(!0);r(27)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})}))},function(e,t,r){r(65);for(var n=r(2),o=r(5),i=r(10),a=r(1)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=s[u],l=n[c],p=l&&l.prototype;p&&!p[a]&&o(p,a,c),i[c]=i.Array}},function(e,t){e.exports=r(2081)},function(e,t){e.exports=r(6113)}]))},4763:(e,t,r)=>{"use strict";e.exports=r(2595)},7411:(e,t,r)=>{"use strict";const n=r(1017),o="\\\\/",i=`[^${o}]`,a="\\.",s="\\/",u="[^/]",c=`(?:${s}|$)`,l=`(?:^|${s})`,p=`${a}{1,2}${c}`,f={DOT_LITERAL:a,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:u,END_ANCHOR:c,DOTS_SLASH:p,NO_DOT:`(?!${a})`,NO_DOTS:`(?!${l}${p})`,NO_DOT_SLASH:`(?!${a}{0,1}${c})`,NO_DOTS_SLASH:`(?!${p})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${u}*?`,START_ANCHOR:l},d={...f,SLASH_LITERAL:`[${o}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${a}{1,2}(?:[${o}]|$)`,NO_DOT:`(?!${a})`,NO_DOTS:`(?!(?:^|[${o}])${a}{1,2}(?:[${o}]|$))`,NO_DOT_SLASH:`(?!${a}{0,1}(?:[${o}]|$))`,NO_DOTS_SLASH:`(?!${a}{1,2}(?:[${o}]|$))`,QMARK_NO_DOT:`[^.${o}]`,START_ANCHOR:`(?:^|[${o}])`,END_ANCHOR:`(?:[${o}]|$)`};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:n.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?d:f}},2902:(e,t,r)=>{"use strict";const n=r(7411),o=r(3338),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:u,REPLACEMENTS:c}=n,l=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>o.escapeRegex(e))).join("..")}return r},p=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,f=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=c[e]||e;const r={...t},d="number"==typeof r.maxLength?Math.min(i,r.maxLength):i;let h=e.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const _={type:"bos",value:"",output:r.prepend||""},v=[_],E=r.capture?"":"?:",m=o.isWindows(t),g=n.globChars(m),y=n.extglobChars(g),{DOT_LITERAL:b,PLUS_LITERAL:A,SLASH_LITERAL:O,ONE_CHAR:w,DOTS_SLASH:C,NO_DOT:S,NO_DOT_SLASH:I,NO_DOTS_SLASH:P,QMARK:R,QMARK_NO_DOT:L,STAR:T,START_ANCHOR:D}=g,x=e=>`(${E}(?:(?!${D}${e.dot?C:b}).)*?)`,N=r.dot?"":S,j=r.dot?R:L;let M=!0===r.bash?x(r):T;r.capture&&(M=`(${M})`),"boolean"==typeof r.noext&&(r.noextglob=r.noext);const k={input:e,index:-1,start:0,dot:!0===r.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:v};e=o.removePrefix(e,k),h=e.length;const U=[],F=[],G=[];let B,H=_;const V=()=>k.index===h-1,Z=k.peek=(t=1)=>e[k.index+t],q=k.advance=()=>e[++k.index]||"",W=()=>e.slice(k.index+1),z=(e="",t=0)=>{k.consumed+=e,k.index+=t},K=e=>{k.output+=null!=e.output?e.output:e.value,z(e.value)},J=()=>{let e=1;for(;"!"===Z()&&("("!==Z(2)||"?"===Z(3));)q(),k.start++,e++;return e%2!=0&&(k.negated=!0,k.start++,!0)},$=e=>{k[e]++,G.push(e)},X=e=>{k[e]--,G.pop()},Y=e=>{if("globstar"===H.type){const t=k.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||U.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(k.output=k.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=M,k.output+=H.output)}if(U.length&&"paren"!==e.type&&(U[U.length-1].inner+=e.value),(e.value||e.output)&&K(e),H&&"text"===H.type&&"text"===e.type)return H.value+=e.value,void(H.output=(H.output||"")+e.value);e.prev=H,v.push(e),H=e},Q=(e,t)=>{const n={...y[t],conditions:1,inner:""};n.prev=H,n.parens=k.parens,n.output=k.output;const o=(r.capture?"(":"")+n.open;$("parens"),Y({type:e,value:t,output:k.output?"":w}),Y({type:"paren",extglob:!0,value:q(),output:o}),U.push(n)},ee=e=>{let n,o=e.close+(r.capture?")":"");if("negate"===e.type){let i=M;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(i=x(r)),(i!==M||V()||/^\)+$/.test(W()))&&(o=e.close=`)$))${i}`),e.inner.includes("*")&&(n=W())&&/^\.[^\\/.]+$/.test(n)){const r=f(n,{...t,fastpaths:!1}).output;o=e.close=`)${r})${i})`}"bos"===e.prev.type&&(k.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:B,output:o}),X("parens")};if(!1!==r.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(u,((e,t,r,o,i,a)=>"\\"===o?(n=!0,e):"?"===o?t?t+o+(i?R.repeat(i.length):""):0===a?j+(i?R.repeat(i.length):""):R.repeat(r.length):"."===o?b.repeat(r.length):"*"===o?t?t+o+(i?M:""):M:t?e:`\\${e}`));return!0===n&&(i=!0===r.unescape?i.replace(/\\/g,""):i.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),i===e&&!0===r.contains?(k.output=e,k):(k.output=o.wrapOutput(i,k,t),k)}for(;!V();){if(B=q(),"\0"===B)continue;if("\\"===B){const e=Z();if("/"===e&&!0!==r.bash)continue;if("."===e||";"===e)continue;if(!e){B+="\\",Y({type:"text",value:B});continue}const t=/^\\+/.exec(W());let n=0;if(t&&t[0].length>2&&(n=t[0].length,k.index+=n,n%2!=0&&(B+="\\")),!0===r.unescape?B=q():B+=q(),0===k.brackets){Y({type:"text",value:B});continue}}if(k.brackets>0&&("]"!==B||"["===H.value||"[^"===H.value)){if(!1!==r.posix&&":"===B){const e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){const e=H.value.lastIndexOf("["),t=H.value.slice(0,e),r=H.value.slice(e+2),n=a[r];if(n){H.value=t+n,k.backtrack=!0,q(),_.output||1!==v.indexOf(H)||(_.output=w);continue}}}("["===B&&":"!==Z()||"-"===B&&"]"===Z())&&(B=`\\${B}`),"]"!==B||"["!==H.value&&"[^"!==H.value||(B=`\\${B}`),!0===r.posix&&"!"===B&&"["===H.value&&(B="^"),H.value+=B,K({value:B});continue}if(1===k.quotes&&'"'!==B){B=o.escapeRegex(B),H.value+=B,K({value:B});continue}if('"'===B){k.quotes=1===k.quotes?0:1,!0===r.keepQuotes&&Y({type:"text",value:B});continue}if("("===B){$("parens"),Y({type:"paren",value:B});continue}if(")"===B){if(0===k.parens&&!0===r.strictBrackets)throw new SyntaxError(p("opening","("));const e=U[U.length-1];if(e&&k.parens===e.parens+1){ee(U.pop());continue}Y({type:"paren",value:B,output:k.parens?")":"\\)"}),X("parens");continue}if("["===B){if(!0!==r.nobracket&&W().includes("]"))$("brackets");else{if(!0!==r.nobracket&&!0===r.strictBrackets)throw new SyntaxError(p("closing","]"));B=`\\${B}`}Y({type:"bracket",value:B});continue}if("]"===B){if(!0===r.nobracket||H&&"bracket"===H.type&&1===H.value.length){Y({type:"text",value:B,output:`\\${B}`});continue}if(0===k.brackets){if(!0===r.strictBrackets)throw new SyntaxError(p("opening","["));Y({type:"text",value:B,output:`\\${B}`});continue}X("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(B=`/${B}`),H.value+=B,K({value:B}),!1===r.literalBrackets||o.hasRegexChars(e))continue;const t=o.escapeRegex(H.value);if(k.output=k.output.slice(0,-H.value.length),!0===r.literalBrackets){k.output+=t,H.value=t;continue}H.value=`(${E}${t}|${H.value})`,k.output+=H.value;continue}if("{"===B&&!0!==r.nobrace){$("braces");const e={type:"brace",value:B,output:"(",outputIndex:k.output.length,tokensIndex:k.tokens.length};F.push(e),Y(e);continue}if("}"===B){const e=F[F.length-1];if(!0===r.nobrace||!e){Y({type:"text",value:B,output:B});continue}let t=")";if(!0===e.dots){const e=v.slice(),n=[];for(let t=e.length-1;t>=0&&(v.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=l(n,r),k.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const r=k.output.slice(0,e.outputIndex),n=k.tokens.slice(e.tokensIndex);e.value=e.output="\\{",B=t="\\}",k.output=r;for(const e of n)k.output+=e.output||e.value}Y({type:"brace",value:B,output:t}),X("braces"),F.pop();continue}if("|"===B){U.length>0&&U[U.length-1].conditions++,Y({type:"text",value:B});continue}if(","===B){let e=B;const t=F[F.length-1];t&&"braces"===G[G.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:B,output:e});continue}if("/"===B){if("dot"===H.type&&k.index===k.start+1){k.start=k.index+1,k.consumed="",k.output="",v.pop(),H=_;continue}Y({type:"slash",value:B,output:O});continue}if("."===B){if(k.braces>0&&"dot"===H.type){"."===H.value&&(H.output=b);const e=F[F.length-1];H.type="dots",H.output+=B,H.value+=B,e.dots=!0;continue}if(k.braces+k.parens===0&&"bos"!==H.type&&"slash"!==H.type){Y({type:"text",value:B,output:b});continue}Y({type:"dot",value:B,output:b});continue}if("?"===B){if((!H||"("!==H.value)&&!0!==r.noextglob&&"("===Z()&&"?"!==Z(2)){Q("qmark",B);continue}if(H&&"paren"===H.type){const e=Z();let t=B;if("<"===e&&!o.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(W()))&&(t=`\\${B}`),Y({type:"text",value:B,output:t});continue}if(!0!==r.dot&&("slash"===H.type||"bos"===H.type)){Y({type:"qmark",value:B,output:L});continue}Y({type:"qmark",value:B,output:R});continue}if("!"===B){if(!0!==r.noextglob&&"("===Z()&&("?"!==Z(2)||!/[!=<:]/.test(Z(3)))){Q("negate",B);continue}if(!0!==r.nonegate&&0===k.index){J();continue}}if("+"===B){if(!0!==r.noextglob&&"("===Z()&&"?"!==Z(2)){Q("plus",B);continue}if(H&&"("===H.value||!1===r.regex){Y({type:"plus",value:B,output:A});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||k.parens>0){Y({type:"plus",value:B});continue}Y({type:"plus",value:A});continue}if("@"===B){if(!0!==r.noextglob&&"("===Z()&&"?"!==Z(2)){Y({type:"at",extglob:!0,value:B,output:""});continue}Y({type:"text",value:B});continue}if("*"!==B){"$"!==B&&"^"!==B||(B=`\\${B}`);const e=s.exec(W());e&&(B+=e[0],k.index+=e[0].length),Y({type:"text",value:B});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=B,H.output=M,k.backtrack=!0,k.globstar=!0,z(B);continue}let t=W();if(!0!==r.noextglob&&/^\([^?]/.test(t)){Q("star",B);continue}if("star"===H.type){if(!0===r.noglobstar){z(B);continue}const n=H.prev,o=n.prev,i="slash"===n.type||"bos"===n.type,a=o&&("star"===o.type||"globstar"===o.type);if(!0===r.bash&&(!i||t[0]&&"/"!==t[0])){Y({type:"star",value:B,output:""});continue}const s=k.braces>0&&("comma"===n.type||"brace"===n.type),u=U.length&&("pipe"===n.type||"paren"===n.type);if(!i&&"paren"!==n.type&&!s&&!u){Y({type:"star",value:B,output:""});continue}for(;"/**"===t.slice(0,3);){const r=e[k.index+4];if(r&&"/"!==r)break;t=t.slice(3),z("/**",3)}if("bos"===n.type&&V()){H.type="globstar",H.value+=B,H.output=x(r),k.output=H.output,k.globstar=!0,z(B);continue}if("slash"===n.type&&"bos"!==n.prev.type&&!a&&V()){k.output=k.output.slice(0,-(n.output+H.output).length),n.output=`(?:${n.output}`,H.type="globstar",H.output=x(r)+(r.strictSlashes?")":"|$)"),H.value+=B,k.globstar=!0,k.output+=n.output+H.output,z(B);continue}if("slash"===n.type&&"bos"!==n.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";k.output=k.output.slice(0,-(n.output+H.output).length),n.output=`(?:${n.output}`,H.type="globstar",H.output=`${x(r)}${O}|${O}${e})`,H.value+=B,k.output+=n.output+H.output,k.globstar=!0,z(B+q()),Y({type:"slash",value:"/",output:""});continue}if("bos"===n.type&&"/"===t[0]){H.type="globstar",H.value+=B,H.output=`(?:^|${O}|${x(r)}${O})`,k.output=H.output,k.globstar=!0,z(B+q()),Y({type:"slash",value:"/",output:""});continue}k.output=k.output.slice(0,-H.output.length),H.type="globstar",H.output=x(r),H.value+=B,k.output+=H.output,k.globstar=!0,z(B);continue}const n={type:"star",value:B,output:M};!0!==r.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==r.regex?(k.index!==k.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(k.output+=I,H.output+=I):!0===r.dot?(k.output+=P,H.output+=P):(k.output+=N,H.output+=N),"*"!==Z()&&(k.output+=w,H.output+=w)),Y(n)):(n.output=B,Y(n)):(n.output=".*?","bos"!==H.type&&"slash"!==H.type||(n.output=N+n.output),Y(n))}for(;k.brackets>0;){if(!0===r.strictBrackets)throw new SyntaxError(p("closing","]"));k.output=o.escapeLast(k.output,"["),X("brackets")}for(;k.parens>0;){if(!0===r.strictBrackets)throw new SyntaxError(p("closing",")"));k.output=o.escapeLast(k.output,"("),X("parens")}for(;k.braces>0;){if(!0===r.strictBrackets)throw new SyntaxError(p("closing","}"));k.output=o.escapeLast(k.output,"{"),X("braces")}if(!0===r.strictSlashes||"star"!==H.type&&"bracket"!==H.type||Y({type:"maybe_slash",value:"",output:`${O}?`}),!0===k.backtrack){k.output="";for(const e of k.tokens)k.output+=null!=e.output?e.output:e.value,e.suffix&&(k.output+=e.suffix)}return k};f.fastpaths=(e,t)=>{const r={...t},a="number"==typeof r.maxLength?Math.min(i,r.maxLength):i,s=e.length;if(s>a)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${a}`);e=c[e]||e;const u=o.isWindows(t),{DOT_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:f,DOTS_SLASH:d,NO_DOT:h,NO_DOTS:_,NO_DOTS_SLASH:v,STAR:E,START_ANCHOR:m}=n.globChars(u),g=r.dot?_:h,y=r.dot?v:h,b=r.capture?"":"?:";let A=!0===r.bash?".*?":E;r.capture&&(A=`(${A})`);const O=e=>!0===e.noglobstar?A:`(${b}(?:(?!${m}${e.dot?d:l}).)*?)`,w=e=>{switch(e){case"*":return`${g}${f}${A}`;case".*":return`${l}${f}${A}`;case"*.*":return`${g}${A}${l}${f}${A}`;case"*/*":return`${g}${A}${p}${f}${y}${A}`;case"**":return g+O(r);case"**/*":return`(?:${g}${O(r)}${p})?${y}${f}${A}`;case"**/*.*":return`(?:${g}${O(r)}${p})?${y}${A}${l}${f}${A}`;case"**/.*":return`(?:${g}${O(r)}${p})?${l}${f}${A}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=w(t[1]);if(!r)return;return r+l+t[2]}}},C=o.removePrefix(e,{negated:!1,prefix:""});let S=w(C);return S&&!0!==r.strictSlashes&&(S+=`${p}?`),S},e.exports=f},2595:(e,t,r)=>{"use strict";const n=r(1017),o=r(4933),i=r(2902),a=r(3338),s=r(7411),u=(e,t,r=!1)=>{if(Array.isArray(e)){const n=e.map((e=>u(e,t,r))),o=e=>{for(const t of n){const r=t(e);if(r)return r}return!1};return o}const n=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!n)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},s=a.isWindows(t),c=n?u.compileRe(e,t):u.makeRe(e,t,!1,!0),l=c.state;delete c.state;let p=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};p=u(i.ignore,e,r)}const f=(r,n=!1)=>{const{isMatch:o,match:a,output:f}=u.test(r,c,t,{glob:e,posix:s}),d={glob:e,state:l,regex:c,posix:s,input:r,output:f,match:a,isMatch:o};return"function"==typeof i.onResult&&i.onResult(d),!1===o?(d.isMatch=!1,!!n&&d):p(r)?("function"==typeof i.onIgnore&&i.onIgnore(d),d.isMatch=!1,!!n&&d):("function"==typeof i.onMatch&&i.onMatch(d),!n||d)};return r&&(f.state=l),f};u.test=(e,t,r,{glob:n,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const i=r||{},s=i.format||(o?a.toPosixSlashes:null);let c=e===n,l=c&&s?s(e):e;return!1===c&&(l=s?s(e):e,c=l===n),!1!==c&&!0!==i.capture||(c=!0===i.matchBase||!0===i.basename?u.matchBase(e,t,r,o):t.exec(l)),{isMatch:Boolean(c),match:c,output:l}},u.matchBase=(e,t,r,o=a.isWindows(r))=>(t instanceof RegExp?t:u.makeRe(t,r)).test(n.basename(e)),u.isMatch=(e,t,r)=>u(t,r)(e),u.parse=(e,t)=>Array.isArray(e)?e.map((e=>u.parse(e,t))):i(e,{...t,fastpaths:!1}),u.scan=(e,t)=>o(e,t),u.compileRe=(e,t,r=!1,n=!1)=>{if(!0===r)return e.output;const o=t||{},i=o.contains?"":"^",a=o.contains?"":"$";let s=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(s=`^(?!${s}).*$`);const c=u.toRegex(s,t);return!0===n&&(c.state=e),c},u.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=i.fastpaths(e,t)),o.output||(o=i(e,t)),u.compileRe(o,t,r,n)},u.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},u.constants=s,e.exports=u},4933:(e,t,r)=>{"use strict";const n=r(3338),{CHAR_ASTERISK:o,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:s,CHAR_DOT:u,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:f,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_PLUS:h,CHAR_QUESTION_MARK:_,CHAR_RIGHT_CURLY_BRACE:v,CHAR_RIGHT_PARENTHESES:E,CHAR_RIGHT_SQUARE_BRACKET:m}=r(7411),g=e=>e===l||e===a,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const r=t||{},b=e.length-1,A=!0===r.parts||!0===r.scanToEnd,O=[],w=[],C=[];let S,I,P=e,R=-1,L=0,T=0,D=!1,x=!1,N=!1,j=!1,M=!1,k=!1,U=!1,F=!1,G=!1,B=!1,H=0,V={value:"",depth:0,isGlob:!1};const Z=()=>R>=b,q=()=>(S=I,P.charCodeAt(++R));for(;R<b;){let e;if(I=q(),I!==a){if(!0===k||I===p){for(H++;!0!==Z()&&(I=q());)if(I!==a)if(I!==p){if(!0!==k&&I===u&&(I=q())===u){if(D=V.isBrace=!0,N=V.isGlob=!0,B=!0,!0===A)continue;break}if(!0!==k&&I===s){if(D=V.isBrace=!0,N=V.isGlob=!0,B=!0,!0===A)continue;break}if(I===v&&(H--,0===H)){k=!1,D=V.isBrace=!0,B=!0;break}}else H++;else U=V.backslashes=!0,q();if(!0===A)continue;break}if(I!==l){if(!0!==r.noext&&!0==(I===h||I===i||I===o||I===_||I===c)&&P.charCodeAt(R+1)===f){if(N=V.isGlob=!0,j=V.isExtglob=!0,B=!0,I===c&&R===L&&(G=!0),!0===A){for(;!0!==Z()&&(I=q());)if(I!==a){if(I===E){N=V.isGlob=!0,B=!0;break}}else U=V.backslashes=!0,I=q();continue}break}if(I===o){if(S===o&&(M=V.isGlobstar=!0),N=V.isGlob=!0,B=!0,!0===A)continue;break}if(I===_){if(N=V.isGlob=!0,B=!0,!0===A)continue;break}if(I===d){for(;!0!==Z()&&(e=q());)if(e!==a){if(e===m){x=V.isBracket=!0,N=V.isGlob=!0,B=!0;break}}else U=V.backslashes=!0,q();if(!0===A)continue;break}if(!0===r.nonegate||I!==c||R!==L){if(!0!==r.noparen&&I===f){if(N=V.isGlob=!0,!0===A){for(;!0!==Z()&&(I=q());)if(I!==f){if(I===E){B=!0;break}}else U=V.backslashes=!0,I=q();continue}break}if(!0===N){if(B=!0,!0===A)continue;break}}else F=V.negated=!0,L++}else{if(O.push(R),w.push(V),V={value:"",depth:0,isGlob:!1},!0===B)continue;if(S===u&&R===L+1){L+=2;continue}T=R+1}}else U=V.backslashes=!0,I=q(),I===p&&(k=!0)}!0===r.noext&&(j=!1,N=!1);let W=P,z="",K="";L>0&&(z=P.slice(0,L),P=P.slice(L),T-=L),W&&!0===N&&T>0?(W=P.slice(0,T),K=P.slice(T)):!0===N?(W="",K=P):W=P,W&&""!==W&&"/"!==W&&W!==P&&g(W.charCodeAt(W.length-1))&&(W=W.slice(0,-1)),!0===r.unescape&&(K&&(K=n.removeBackslashes(K)),W&&!0===U&&(W=n.removeBackslashes(W)));const J={prefix:z,input:e,start:L,base:W,glob:K,isBrace:D,isBracket:x,isGlob:N,isExtglob:j,isGlobstar:M,negated:F,negatedExtglob:G};if(!0===r.tokens&&(J.maxDepth=0,g(I)||w.push(V),J.tokens=w),!0===r.parts||!0===r.tokens){let t;for(let n=0;n<O.length;n++){const o=t?t+1:L,i=O[n],a=e.slice(o,i);r.tokens&&(0===n&&0!==L?(w[n].isPrefix=!0,w[n].value=z):w[n].value=a,y(w[n]),J.maxDepth+=w[n].depth),0===n&&""===a||C.push(a),t=i}if(t&&t+1<e.length){const n=e.slice(t+1);C.push(n),r.tokens&&(w[w.length-1].value=n,y(w[w.length-1]),J.maxDepth+=w[w.length-1].depth)}J.slashes=O,J.parts=C}return J}},3338:(e,t,r)=>{"use strict";const n=r(1017),o="win32"===process.platform,{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:a,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:u}=r(7411);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>s.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(u,"\\$1"),t.toPosixSlashes=e=>e.replace(i,"/"),t.removeBackslashes=e=>e.replace(a,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===o||"\\"===n.sep,t.escapeLast=(e,r,n)=>{const o=e.lastIndexOf(r,n);return-1===o?e:"\\"===e[o-1]?t.escapeLast(e,r,o-1):`${e.slice(0,o)}\\${e.slice(o)}`},t.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},t.wrapOutput=(e,t={},r={})=>{let n=`${r.contains?"":"^"}(?:${e})${r.contains?"":"$"}`;return!0===t.negated&&(n=`(?:^(?!${n}).*$)`),n}},3152:(e,t,r)=>{"use strict";var n=r(7310).parse,o={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},i=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function a(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}t.getProxyForUrl=function(e){var t="string"==typeof e?n(e):e||{},r=t.protocol,s=t.host,u=t.port;if("string"!=typeof s||!s||"string"!=typeof r)return"";if(r=r.split(":",1)[0],!function(e,t){var r=(a("npm_config_no_proxy")||a("no_proxy")).toLowerCase();return!r||"*"!==r&&r.split(/[,\s]/).every((function(r){if(!r)return!0;var n=r.match(/^(.+):(\d+)$/),o=n?n[1]:r,a=n?parseInt(n[2]):0;return!(!a||a===t)||(/^[.*]/.test(o)?("*"===o.charAt(0)&&(o=o.slice(1)),!i.call(e,o)):e!==o)}))}(s=s.replace(/:\d*$/,""),u=parseInt(u)||o[r]||0))return"";var c=a("npm_config_"+r+"_proxy")||a(r+"_proxy")||a("npm_config_proxy")||a("all_proxy");return c&&-1===c.indexOf("://")&&(c=r+"://"+c),c}},7013:(e,t,r)=>{"use strict";const n=r(2037),o=r(6224),i=r(8137),{env:a}=process;let s;function u(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e,t){if(0===s)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!t&&void 0===s)return 0;const r=s||0;if("dumb"===a.TERM)return r;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in a))||"codeship"===a.CI_NAME?1:r;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:r}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?s=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(s=1),"FORCE_COLOR"in a&&(s="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return u(c(e,e&&e.isTTY))},stdout:u(c(!0,o.isatty(1))),stderr:u(c(!0,o.isatty(2)))}},1681:(e,t,r)=>{e.exports=r(7955)},7955:(e,t,r)=>{"use strict";r(1808);var n,o=r(4404),i=r(3685),a=r(5687),s=r(2361),u=(r(9491),r(3837));function c(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||i.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,o){for(var i=p(r,n,o),a=0,s=t.requests.length;a<s;++a){var u=t.requests[a];if(u.host===i.host&&u.port===i.port)return t.requests.splice(a,1),void u.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function l(e,t){var r=this;c.prototype.createSocket.call(r,e,(function(n){var i=e.request.getHeader("host"),a=f({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):e.host}),s=o.connect(0,a);r.sockets[r.sockets.indexOf(n)]=s,t(s)}))}function p(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function f(e){for(var t=1,r=arguments.length;t<r;++t){var n=arguments[t];if("object"==typeof n)for(var o=Object.keys(n),i=0,a=o.length;i<a;++i){var s=o[i];void 0!==n[s]&&(e[s]=n[s])}}return e}t.httpOverHttp=function(e){var t=new c(e);return t.request=i.request,t},t.httpsOverHttp=function(e){var t=new c(e);return t.request=i.request,t.createSocket=l,t.defaultPort=443,t},t.httpOverHttps=function(e){var t=new c(e);return t.request=a.request,t},t.httpsOverHttps=function(e){var t=new c(e);return t.request=a.request,t.createSocket=l,t.defaultPort=443,t},u.inherits(c,s.EventEmitter),c.prototype.addRequest=function(e,t,r,n){var o=this,i=f({request:e},o.options,p(t,r,n));o.sockets.length>=this.maxSockets?o.requests.push(i):o.createSocket(i,(function(t){function r(){o.emit("free",t,i)}function n(e){o.removeSocket(t),t.removeListener("free",r),t.removeListener("close",n),t.removeListener("agentRemove",n)}t.on("free",r),t.on("close",n),t.on("agentRemove",n),e.onSocket(t)}))},c.prototype.createSocket=function(e,t){var r=this,o={};r.sockets.push(o);var i=f({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),n("making CONNECT request");var a=r.request(i);function s(i,s,u){var c;return a.removeAllListeners(),s.removeAllListeners(),200!==i.statusCode?(n("tunneling socket could not be established, statusCode=%d",i.statusCode),s.destroy(),(c=new Error("tunneling socket could not be established, statusCode="+i.statusCode)).code="ECONNRESET",e.request.emit("error",c),void r.removeSocket(o)):u.length>0?(n("got illegal response body from proxy"),s.destroy(),(c=new Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void r.removeSocket(o)):(n("tunneling connection has established"),r.sockets[r.sockets.indexOf(o)]=s,t(s))}a.useChunkedEncodingByDefault=!1,a.once("response",(function(e){e.upgrade=!0})),a.once("upgrade",(function(e,t,r){process.nextTick((function(){s(e,t,r)}))})),a.once("connect",s),a.once("error",(function(t){a.removeAllListeners(),n("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, cause="+t.message);i.code="ECONNRESET",e.request.emit("error",i),r.removeSocket(o)})),a.end()},c.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,(function(e){r.request.onSocket(e)}))}},n=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},t.debug=n},9698:(e,t,r)=>{var n;e.exports=function(){if(!n){try{n=r(445)("follow-redirects")}catch(e){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},4940:(e,t,r)=>{var n=r(7310),o=n.URL,i=r(3685),a=r(5687),s=r(2781).Writable,u=r(9491),c=r(9698),l=!1;try{u(new o)}catch(e){l="ERR_INVALID_URL"===e.code}var p=["auth","host","hostname","href","path","pathname","port","protocol","query","search"],f=["abort","aborted","connect","error","socket","timeout"],d=Object.create(null);f.forEach((function(e){d[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var h=I("ERR_INVALID_URL","Invalid URL",TypeError),_=I("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),v=I("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",_),E=I("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),m=I("ERR_STREAM_WRITE_AFTER_END","write after end"),g=s.prototype.destroy||A;function y(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){try{r._processResponse(e)}catch(e){r.emit("error",e instanceof _?e:new _({cause:e}))}},this._performRequest()}function b(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",a=r[i]=e[n],s=t[n]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,n,a){return o&&e instanceof o?e=C(e):R(e)?e=C(O(e)):(a=n,n=w(e),e={protocol:i}),L(n)&&(a=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,R(n.host)||R(n.hostname)||(n.hostname="::1"),u.equal(n.protocol,i,"protocol mismatch"),c("options",n),new y(n,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=s.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function A(){}function O(e){var t;if(l)t=new o(e);else if(!R((t=w(n.parse(e))).protocol))throw new h({input:e});return t}function w(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new h({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new h({input:e.href||e});return e}function C(e,t){var r=t||{};for(var n of p)r[n]=e[n];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 S(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function I(e,t,r){function n(r){Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function P(e,t){for(var r of f)e.removeListener(r,d[r]);e.on("error",A),e.destroy(t)}function R(e){return"string"==typeof e||e instanceof String}function L(e){return"function"==typeof e}y.prototype=Object.create(s.prototype),y.prototype.abort=function(){P(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},y.prototype.destroy=function(e){return P(this._currentRequest,e),g.call(this,e),this},y.prototype.write=function(e,t,r){if(this._ending)throw new m;if(!(R(e)||"object"==typeof(n=e)&&"length"in n))throw new TypeError("data should be a string, Buffer or Uint8Array");var n;L(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new E),this.abort()):r&&r()},y.prototype.end=function(e,t,r){if(L(e)?(r=e,e=t=null):L(t)&&(r=t,t=null),e){var n=this,o=this._currentRequest;this.write(e,t,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},y.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},y.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},y.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),i()}),e),n(t)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){y.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(y.prototype,e,{get:function(){return this._currentRequest[e]}})})),y.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},y.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(o._redirectable=this,f))o.on(i,d[i]);if(this._currentUrl=/^\//.test(this._options.path)?n.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,u=this._requestBodyBuffers;!function e(t){if(o===s._currentRequest)if(t)s.emit("error",t);else if(a<u.length){var r=u[a++];o.finished||o.write(r.data,r.encoding,e)}else s._ended&&o.end()}()}},y.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r,i=e.headers.location;if(!i||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(P(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new v;var a=this._options.beforeRedirect;a&&(r=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],S(/^content-/i,this._options.headers));var p,f,d=S(/^host$/i,this._options.headers),h=O(this._currentUrl),_=d||h.host,E=/^\w+:/.test(i)?this._currentUrl:n.format(Object.assign(h,{host:_})),m=(p=i,f=E,l?new o(p,f):O(n.resolve(f,p)));if(c("redirecting to",m.href),this._isRedirect=!0,C(m,this._options),(m.protocol!==h.protocol&&"https:"!==m.protocol||m.host!==_&&!function(e,t){u(R(e)&&R(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(m.host,_))&&S(/^(?:authorization|cookie)$/i,this._options.headers),L(a)){var g={headers:e.headers,statusCode:t},y={url:E,method:s,headers:r};a(this._options,g,y),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=b({http:i,https:a}),e.exports.wrap=b},2747:function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QRCodeError=t.SchemaError=t.CompileError=t.UploadError=t.CompressError=t.PackageSizeError=t.ProjectError=t.HashError=t.MetaError=t.LoginError=t.IDE_ERROR_LEVEL=void 0,t.IDE_ERROR_LEVEL={p0:"p0",p1:"p1",p2:"p2",p3:"p3"};var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Login Error",t}return n(t,e),t}(Error);t.LoginError=o;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Meta Error",t}return n(t,e),t}(Error);t.MetaError=i;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Hash Error",t}return n(t,e),t}(Error);t.HashError=a;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Project Error",t}return n(t,e),t}(Error);t.ProjectError=s;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="PackageSize Error",t}return n(t,e),t}(Error);t.PackageSizeError=u;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Compress Error",t}return n(t,e),t}(Error);t.CompressError=c;var l=function(e){function t(t,r){void 0===r&&(r=-1);var n=e.call(this,t)||this;return n.name="Upload Error",n.code=r,n}return n(t,e),t}(Error);t.UploadError=l;var p=function(e){function t(t,r,n){void 0===r&&(r=""),void 0===n&&(n=0);var o=e.call(this,t)||this;return o.name="Compile Error",o.errLink=r,o.code=n,o}return n(t,e),t}(Error);t.CompileError=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Schema Error",t}return n(t,e),t}(Error);t.SchemaError=f;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="QRCode Error",t}return n(t,e),t}(Error);t.QRCodeError=d},2139:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FRONT_PAGE_EVENT=t.IDE_PERFORMANCE_EVENTS=t.IDE_TIMELINE_NAMES=t.IDE_MODULES=t.SLARDAR_EVENT=void 0;var o=r(8039);t.SLARDAR_EVENT=n(n(n({},o.UPDATE_SLARDAR_EVENTS),o.UPDATE_SLARDAR_EVENTS_TECH),{VELA_CLICK_PREVIEW:"VELA_CLICK_PREVIEW",VELA_PREVIEW_FAIL:"VELA_PREVIEW_FAIL",VELA_CLICK_UPLOAD:"VELA_CLICK_UPLOAD",UPLOAD_VERSION_FOCUS:"UPLOAD_VERSION_FOCUS",UPLOAD_VERSION_ERROR:"UPLOAD_VERSION_ERROR",VELA_UPLOAD_FAIL:"VELA_UPLOAD_FAIL",VELA_SHOW_INIT_VIEW_TIME:"VELA_SHOW_INIT_VIEW_TIME",VELA_PREVIEW_TIME:"VELA_PREVIEW_TIME",VELA_UPLOAD_TIME:"VELA_UPLOAD_TIME",VELA_COMPILE_FIRST_END:"VELA_COMPILE_FIRST_END",VELA_COMPILE_TIME:"VELA_COMPILE_TIME",IDE_COMPILE_PERFORMANCE:"IDE_COMPILE_PERFORMANCE",IDE_COMPILE_RESULT:"IDE_COMPILE_RESULT",VELA_SIMULATOR_RENDER_TIME:"VELA_SIMULATOR_RENDER_TIME",VELA_SIMULATOR_FIRST_RENDER_SUCCESS:"VELA_SIMULATOR_FIRST_RENDER_SUCCESS",VELA_AUDIT_SCORE:"VELA_AUDIT_SCORE",MENU_BAR_DEBUG_SETTING_SAVE:"MENU_BAR_DEBUG_SETTING_SAVE",MENU_BAR_DEBUG_SETTING_SAVE_FAIL:"MENU_BAR_DEBUG_SETTING_SAVE_FAIL",MENU_BAR_DEBUG_APPLY_TEST_TMA:"MENU_BAR_DEBUG_APPLY_TEST_TMA",MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL:"MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL",MENU_BAR_DEBUG_APPLY_BOE:"MENU_BAR_DEBUG_APPLY_BOE",MENU_BAR_DEBUG_APPLY_BOE_FAIL:"MENU_BAR_DEBUG_APPLY_BOE_FAIL",MENU_BAR_DEBUG_APPLY_PPE:"MENU_BAR_DEBUG_APPLY_PPE",MENU_BAR_DEBUG_APPLY_PPE_FAIL:"MENU_BAR_DEBUG_APPLY_PPE_FAIL",VELA_POST_MESSAGE_LIST:"VELA_POST_MESSAGE_LIST",VELA_POST_MESSAGE_LIST_FAIL:"VELA_POST_MESSAGE_LIST_FAIL",VELA_AVATAR_LOGOUT:"VELA_AVATAR_LOGOUT",VELA_AVATAR_LOGOUT_FAIL:"VELA_AVATAR_LOGOUT_FAIL",VELA_CLEAR_ALL_SESSION:"VELA_CLEAR_ALL_SESSION",VELA_CLEAR_ALL_SESSION_FAIL:"VELA_CLEAR_ALL_SESSION_FAIL",VELA_CLEAR_DATA_SESSION:"VELA_CLEAR_DATA_SESSION",VELA_CLEAR_DATA_SESSION_FAIL:"VELA_CLEAR_DATA_SESSION_FAIL",VELA_CLEAR_LOGIN_SESSION:"VELA_CLEAR_LOGIN_SESSION",VELA_CLEAR_LOGIN_SESSION_FAIL:"VELA_CLEAR_LOGIN_SESSION_FAIL",VELA_CLEAR_AUTH_SESSION:"VELA_CLEAR_AUTH_SESSION",VELA_CLEAR_AUTH_SESSION_FAIL:"VELA_CLEAR_AUTH_SESSION_FAIL",VELA_ADD_COMPILE_MODE:"VELA_ADD_COMPILE_MODE",VELA_ADD_COMPILE_MODE_FAIL:"VELA_ADD_COMPILE_MODE_FAIL",VELA_COMPILE:"VELA_COMPILE",VELA_COMPILE_FAIL:"VELA_COMPILE_FAIL",VELA_CHANGE_COMPILE_MODE:"VELA_CHANGE_COMPILE_MODE",VELA_CHANGE_COMPILE_MODE_FAIL:"VELA_CHANGE_COMPILE_MODE_FAIL",VELA_SELECT_SDK:"VELA_SELECT_SDK",VELA_SELECT_SDK_FAIL:"VELA_SELECT_SDK_FAIL",VELA_CLICK_CONVERT_TOOL:"VELA_CLICK_CONVERT_TOOL",VELA_CONVERT_EMIT:"VELA_CONVERT_EMIT",VELA_OPEN_PROJECT_FROM_CONVERT_TOOL:"VELA_OPEN_PROJECT_FROM_CONVERT_TOOL",VELA_BUILD_NPM:"VELA_BUILD_NPM",VELA_BUILD_NPM_FAIL:"VELA_BUILD_NPM_FAIL",PACKAGE_SIZE:"PACKAGE_SIZE",UPLOAD_SUCCESS_EVENT:"UPLOAD_SUCCESS_EVENT",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL",IDE_GET_SDK_LIST_FAIL:"IDE_GET_SDK_LIST_FAIL",IDE_REQUEST_START:"IDE_REQUEST_START",IDE_REQUEST_FAIL:"IDE_REQUEST_FAIL",IDE_COLOR_THEME:"IDE_COLOR_THEME",IDE_CODE_WINDOW_ERROR:"IDE_CODE_WINDOW_ERROR",IDE_HELP_DEVELOPER_COMMUNITY:"IDE_HELP_DEVELOPER_COMMUNITY",IDE_MESSAGE_EXPAND_CLICK:"IDE_MESSAGE_EXPAND_CLICK",IDE_MODULE_CLICK:"IDE_MODULE_CLICK",IDE_MODULE_USAGE:"IDE_MODULE_USAGE",IDE_MODULE_LOADTIME:"IDE_MODULE_LOADTIME",IDE_MODULE_PERFORMANCE:"IDE_MODULE_PERFORMANCE",IDE_PERFORMANCE:"IDE_PERFORMANCE",IDE_DEVICE_INFO_DISPLAY:"IDE_DEVICE_INFO_DISPLAY",IDE_DEVICE_INFO_CPU:"IDE_DEVICE_INFO_CPU",IDE_DEVICE_INFO_OS:"IDE_DEVICE_INFO_OS",IDE_SIMULATOR_LOAD_TIME:"IDE_SIMULATOR_LOAD_TIME",IDE_MENU_CLICK:"IDE_MENU_CLICK",IDE_LANGUAGE:"IDE_LANGUAGE",IDE_ROOM_SERVICE_TRACE:"IDE_ROOM_SERVICE_TRACE",IDE_UPDATE_STEP_ERROR:"IDE_UPDATE_STEP_ERROR",IDE_SCENE_START:"IDE_SCENE_START",IDE_SCENE_END:"IDE_SCENE_END",IDE_APPID_SELECT:"IDE_APPID_SELECT",IDE_APPID_CHANGE:"IDE_APPID_CHANGE",IDE_FMP_BREAKDOWN:"IDE_FMP_BREAKDOWN",IDE_JS_LONG_TASK:"IDE_JS_LONG_TASK",IDE_INP_INFO:"IDE_INP_INFO",IDE_LOW_FPS:"IDE_LOW_FPS",IDE_LOW_MEMORY:"IDE_LOW_MEMORY",IDE_FETCH_ADMIN_XCONFIG_TMAR:"IDE_FETCH_ADMIN_XCONFIG_TMAR",IDE_BIG_PACKAGESIZE_CHECK:"IDE_BIG_PACKAGESIZE_CHECK",IDE_WORKBENCH_WILL_RENDER:"IDE_WORKBENCH_WILL_RENDER",IDE_WORKBENCH_RENDERED:"IDE_WORKBENCH_RENDERED",IDE_CODE_WINDOW_NUM:"IDE_CODE_WINDOW_NUM",IDE_NEW_CODE_WINDOW:"IDE_NEW_CODE_WINDOW",IDE_DETAIL_PANEL_OPENED:"IDE_DETAIL_PANEL_OPENED",IDE_DETAIL_PANEL_CLOSED:"IDE_DETAIL_PANEL_CLOSED",IDE_SETTING_PAGE_SHOW:"IDE_SETTING_PAGE_SHOW",IDE_SETTING_PAGE_OPERATION:"IDE_SETTING_PAGE_OPERATION",IDE_SETTING_CHANGE_LITE_MODE:"IDE_SETTING_CHANGE_LITE_MODE:",IDE_MODULE_CLICK_AUTH_REG:"IDE_MODULE_CLICK_AUTH_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_REG:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL:"IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC",IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS:"IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS",IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY:"IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY",IDE_MODULE_AUTH_SCAN_QRCODE:"IDE_MODULE_AUTH_SCAN_QRCODE",IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON:"IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON",IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE",IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",IDE_FRONTPAGE_PM_LIST:"IDE_FRONTPAGE_PM_LIST",CREATE_PROGRAM:"CREATE_PROGRAM",IDE_WXTOTT_ERROR:"IDE_WXTOTT_ERROR",IDE_SCENE_USER_OPERATE:"IDE_SCENE_USER_OPERATE",IDE_TEMPLATE_HOVER:"IDE_TEMPLATE_HOVER",IDE_TEMPLATE_DETAIL:"IDE_TEMPLATE_DETAIL",IDE_TEMPLATE_ERROR:"IDE_TEMPLATE_ERROR",IDE_TEMPLATE_DOWNLOAD:"IDE_TEMPLATE_DOWNLOAD",IDE_QUICK_JS_ERROR:"IDE_QUICK_JS_ERROR",IDE_REMOTE_DEBUG_CONNECTION_QUALITY:"IDE_REMOTE_DEBUG_CONNECTION_QUALITY",IDE_LOCAL_COMPILE_TRACE:"IDE_LOCAL_COMPILE_TRACE",IDE_REMOTE_DEBUG_EXCEPTION:"IDE_REMOTE_DEBUG_EXCEPTION",IDE_MODULE_AUTH_FORCE_LOGOUT:"IDE_MODULE_AUTH_FORCE_LOGOUT",IDE_CANVAS_WEBGL_CONTEXT_ENABLE:"IDE_CANVAS_WEBGL_CONTEXT_ENABLE",IDE_LOGIN_DATA_FORMAT:"IDE_LOGIN_DATA_FORMAT",IDE_IS_ENCRYPTION_AVAILABLE:"IDE_IS_ENCRYPTION_AVAILABLE",IDE_ADD_COMPILE_MODE:"IDE_ADD_COMPILE_MODE",IDE_DECODE_QRCODE:"IDE_DECODE_QRCODE",IDE_DECODE_URL:"IDE_DECODE_URL",IDE_MAIN_HELPER_FORK_TIME:"IDE_MAIN_HELPER_FORK_TIME",IDE_MAIN_HELPER_ERROR:"IDE_MAIN_HELPER_ERROR",IDE_INSTALL_PATH:"IDE_INSTALL_PATH",IDE_SWITCH_WORKBENCH_MODE:"IDE_SWITCH_WORKBENCH_MODE",IDE_TOGGLE_REMOTE_VIEW:"IDE_TOGGLE_REMOTE_VIEW",IDE_SIMULATOR_PAUSE_MINIAPP:"IDE_SIMULATOR_PAUSE_MINIAPP",IDE_SIMULATOR_REFRESH_MINIAPP:"IDE_SIMULATOR_REFRESH_MINIAPP",IDE_SIMULATOR_REFRESH:"IDE_SIMULATOR_REFRESH",IDE_SIMULATOR_CLICK_LITE_BANNER:"IDE_SIMULATOR_CLICK_LITE_BANNER",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER",IDE_LITE_NOTICE_MODAL_SHOW:"IDE_LITE_NOTICE_MODAL_SHOW",IDE_LITE_NOTICE_MODAL_CLICK:"IDE_LITE_NOTICE_MODAL_CLICK",IDE_WB_SCENE_START:"IDE_WB_SCENE_START",IDE_WB_SCENE_END:"IDE_WB_SCENE_END",IDE_GECKO_ERROR:"IDE_GECKO_ERROR",PUCK_COMPILE_ERROR:"PUCK_COMPILE_ERROR",IDE_DEVTOOLS_PANEL_INIT:"IDE_DEVTOOLS_PANEL_INIT",IDE_DEVTOOLS_SENSORS_PANEL_USAGE:"IDE_DEVTOOLS_SENSORS_PANEL_USAGE",IDE_FRONT_PAGE_CLICK_SETTINGS:"IDE_FRONT_PAGE_CLICK_SETTINGS",IDE_AI_OPEN:"IDE_AI_OPEN",IDE_AI_QUESTION:"IDE_AI_QUESTION",IDE_AI_FEEDBACK:"IDE_AI_FEEDBACK",IDE_AI_OPEN_LINK:"IDE_AI_OPEN_LINK",IDE_AI_ABNORMAL_REPLY:"IDE_AI_ABNORMAL_REPLY",IDE_AI_BUTTON_SHOW:"IDE_AI_BUTTON_SHOW",IDE_AI_STAY_DURATION:"IDE_AI_STAY_DURATION",IDE_DETAIL_CONFIG_ITEM_CLICK:"IDE_DETAIL_CONFIG_ITEM_CLICK",IDE_WORKBENCH_VIEW_STATUS:"IDE_WORKBENCH_VIEW_STATUS",IDE_POWER_EVENT:"IDE_POWER_EVENT",IDE_TASK_PERFORMANCE:"IDE_TASK_PERFORMANCE",IDE_EXCEPTION_RECORD:"IDE_EXCEPTION_RECORD",IDE_PROXY_ERROR_TRACE:"IDE_PROXY_ERROR_TRACE",IDE_EDITOR_RESOLVE_SNIPPET:"IDE_EDITOR_RESOLVE_SNIPPET",IDE_EDITOR_SNIPPET_CREATION:"IDE_EDITOR_SNIPPET_CREATION",IDE_EDITOR_REFERENCE:"IDE_EDITOR_REFERENCE",IDE_EDITOR_COMPLETION_SHOW:"IDE_EDITOR_COMPLETION_SHOW",IDE_MAIN_HELPER_FORK:"IDE_MAIN_HELPER_FORK",IDE_MAIN_HELPER_SPAWN:"IDE_MAIN_HELPER_SPAWN",IDE_MAIN_HELPER_READY:"IDE_MAIN_HELPER_READY",IDE_DOUYIN_OAUTH_BIND_CLICK:"IDE_DOUYIN_OAUTH_BIND_CLICK",IDE_USER_LOCAL_IP_COUNT:"IDE_USER_LOCAL_IP_COUNT",IDE_WEB_CREATE:"IDE_WEB_CREATE",IDE_WEB_LOAD:"IDE_WEB_LOAD",IDE_WEB_DETECT:"IDE_WEB_DETECT"}),t.IDE_MODULES={LOGIN:"LOGIN",MESSAGE:"MESSAGE",SIMULATOR:"SIMULATOR",SIMULATOR_USAGE:"SIMULATOR_USAGE",DEVTOOL:"DEVTOOL",DEVTOOL_USAGE:"DEVTOOL_USAGE",REFRESH:"REFRESH",CLEAR_CACHE:"CLEAR_CACHE",COMPILE_ORDINARY:"COMPILE_ORDINARY",SELF_COMPILE_MODE:"SELF_COMPILE_MODE",COMPILE:"COMPILE",PREVIEW:"PREVIEW",REMOTE_DEBUG:"REMOTE_DEBUG",UPLOAD:"UPLOAD",SIGN_CHECK:"SIGN_CHECK",INTELLIGENCE:"INTELLIGENCE",PROJECT_INSPECTION:"PROJECT_INSPECTION",AI:"AI",SHARE_PROJECT:"SHARE_PROJECT",PROJECT_MANAGE:"PROJECT_MANAGE",PROJECT_DETAIL:"PROJECT_DETAIL",CHECK_THIRD_PART_MINIAPP:"CHECK_THIRD_PART_MINIAPP",NPM_FUNCTION:"NPM_FUNCTION",EDITOR:"EDITOR",WORKBENCH:"WORKBENCH",SETTING:"SETTING",AVATAR:"AVATAR",UPDATE:"UPDATE",EDITOR_SAVE:"EDITOR_SAVE",MAIN_HELPER:"MAIN_HELPER",WEB_PC_SDK:"WEB_PC_SDK",SIGN_CHECKER_GUARANTEED_PAYMENT:"SIGN_CHECKER_GUARANTEED_PAYMENT",SIGN_CHECKER_TRADE_SYSTEM:"SIGN_CHECKER_TRADE_SYSTEM",TEST_QRCODE:"TEST_QRCODE"},t.IDE_TIMELINE_NAMES=n(n({},t.IDE_MODULES),{SIMULATOR_FIRST_LOADING_END:"SIMULATOR_FIRST_LOADING_END",SIMULATOR_LOADING:"SIMULATOR_LOADING",LOCAL_COMPILE:"LOCAL_COMPILE"}),t.IDE_PERFORMANCE_EVENTS={projectmanageCreated:"performance:projectmanageCreated",projectmanageReady:"performance:projectmanageReady",openProject:"performance:openProject",editorReady:"performance:editorReady",workbenchReady:"performance:workbenchReady",simulatorReady:"performance:simulatorReady",simulatorFirstLoadingEnd:"performance:simulatorFirstLoadingEnd",compilePartialEnd:"performance:compilePartialEnd",previewStart:"performance:previewStart",previewCodeReady:"performance:previewCodeReady",uploadStart:"performance:uploadStart",uploadEnd:"performance:uploadEnd",shareStart:"performance:shareStart",shareEnd:"performance:shareEnd",remoteDebugStart:"performance:remoteDebugStart",remoteDebugCodeReady:"performance:remoteDebugCodeReady"},t.FRONT_PAGE_EVENT={VELA_CAPTCHA_REQUEST:"VELA_CAPTCHA_REQUEST",VELA_CAPTCHA_FAIL:"VELA_CAPTCHA_FAIL",VELA_PHONE_CAPTCHA_REQUEST:"VELA_PHONE_CAPTCHA_REQUEST",VELA_PHONE_CAPTCHA_FAIL:"VELA_PHONE_CAPTCHA_FAIL",VELA_PHONE_LOGIN_REQUEST:"VELA_PHONE_LOGIN_REQUEST",VELA_PHONE_LOGIN_FAIL:"VELA_PHONE_LOGIN_FAIL",VELA_MAIL_LOGIN_REQUEST:"VELA_MAIL_LOGIN_REQUEST",VELA_MAIL_LOGIN_FAIL:"VELA_MAIL_LOGIN_FAIL",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_CHECK_EXIST_PROJECT_FAIL:"VELA_CHECK_EXIST_PROJECT_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_CHECK_TEMPLATE_FAIL:"VELA_CHECK_TEMPLATE_FAIL",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_DELETE_PROJECT_FAIL:"VELA_DELETE_PROJECT_FAIL",VELA_IMPORT_PROJECT:"VELA_IMPORT_PROJECT",VELA_IMPORT_PROJECT_FAIL:"VELA_IMPORT_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL:"VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL"}},5833:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.PACK_TYPE=t.CompilerPlugin=void 0,(t.CompilerPlugin||(t.CompilerPlugin={})).TYPESCRIPT="typescript",(r=t.PACK_TYPE||(t.PACK_TYPE={})).FILE="file",r.FOLDER="folder",r.SUFFIX="suffix",r.PREFIX="prefix",r.GLOB="glob",r.REGEXP="regexp"},8039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_SLARDAR_EVENTS_TECH=t.UPDATE_SLARDAR_EVENTS=void 0,t.UPDATE_SLARDAR_EVENTS={IDE_LAUNCH:"IDE_LAUNCH",IDE_UPGRADE_SUGGGEST_POP:"IDE_UPGRADE_SUGGGEST_POP",IDE_UPGRADE_SUGGGEST_POP_CLOSE:"IDE_UPGRADE_SUGGGEST_POP_CLOSE",IDE_UPGRADE_SUGGGEST_POP_NO:"IDE_UPGRADE_SUGGGEST_POP_NO",IDE_UPGRADE_SUGGGEST_POP_YES:"IDE_UPGRADE_SUGGGEST_POP_YES",IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL:"IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL",IDE_UPGRADE_ICON:"IDE_UPGRADE_ICON",IDE_UPGRADE_ICON_CLOSE:"IDE_UPGRADE_ICON_CLOSE",IDE_UPGRADE_ICON_RESTART:"IDE_UPGRADE_ICON_RESTART",IDE_UPGRADE_ICON_VIEWDETAIL:"IDE_UPGRADE_ICON_VIEWDETAIL",IDE_FULLUPGRADE_POP:"IDE_FULLUPGRADE_POP",IDE_FULLUPGRADE_POP_CLOSE:"IDE_FULLUPGRADE_POP_CLOSE",IDE_FULLUPGRADE_POP_NO:"IDE_FULLUPGRADE_POP_NO",IDE_FULLUPGRADE_POP_YESBACK:"IDE_FULLUPGRADE_POP_YESBACK",IDE_FULLUPGRADE_POP_YESONCE:"IDE_FULLUPGRADE_POP_YESONCE",IDE_FULLUPGRADE_POP_VIEWDETAIL:"IDE_FULLUPGRADE_POP_VIEWDETAIL",IDE_FORCE_UPGRADE:"IDE_FORCE_UPGRADE"},t.UPDATE_SLARDAR_EVENTS_TECH={IDE_LOADER_IO_ERROR:"IDE_LOADER_IO_ERROR",IDE_LOADER_INSTALL_RECOVER_ERROR:"IDE_LOADER_INSTALL_RECOVER_ERROR",IDE_LOADER_START_FROM_ENTRY:"IDE_LOADER_START_FROM_ENTRY",IDE_LAUNCH_FAIL:"IDE_LAUNCH_FAIL"}},1061:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},u=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AppJSON=void 0;var l=s(r(9849)),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.__isGame=!1,t}return o(t,e),t.from=function(e){return u(this,void 0,void 0,(function(){var r,n;return c(this,(function(o){switch(o.label){case 0:return[4,l.readJson(e)];case 1:return r=o.sent(),(n=new t(r,e)).__isGame=e.endsWith("game.json"),[2,n]}}))}))},Object.defineProperty(t.prototype,"isGame",{get:function(){return this.__isGame},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subPackages",{get:function(){var e=this.__raw,t=e.subPackages,r=e.subpackages;return t||(void 0===r?[]:r)},enumerable:!1,configurable:!0}),t}(r(4169).JSONContainer);t.AppJSON=p},3652:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},u=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtJSON=void 0;var l=s(r(9849)),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.from=function(e){return u(this,void 0,void 0,(function(){return c(this,(function(r){switch(r.label){case 0:return[4,l.readJson(e)];case 1:return[2,new t(r.sent(),e)]}}))}))},t}(r(4169).JSONContainer);t.ExtJSON=p},4169:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.JSONContainer=void 0;var u=i(r(9849)),c=function(){function e(e,t){this.__raw=e,this.path=t}return Object.defineProperty(e.prototype,"rawJSON",{get:function(){return this.__raw},enumerable:!1,configurable:!0}),e.prototype.getKey=function(e,t){var r;return null!==(r=this.__raw[e])&&void 0!==r?r:t},e.prototype.update=function(e,t,r){return void 0===r&&(r=!1),a(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return this.__raw[e]=t,r?[4,u.writeJson(this.path,this.__raw,{spaces:2})]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},e}();t.JSONContainer=c},8559:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},u=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},l=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},p=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectConfig=t.PrivateState=t.getOriginAppid=t.isTestAppid=t.getIDEAppTechType=t.setIDEAppTechType=t.PROJECT_TYPE_MAP=t.DEFAULT_PROJECT_CONFIG=t.setEnvFunctionForProject=void 0;var d=s(r(9849)),h=s(r(1017)),_=r(1061),v=r(3652),E=r(4169),m=r(5833),g=r(7992),y=f(r(6503)),b=f(r(7921)),A=f(r(772)),O=f(r(3122)),w=f(r(298)),C=f(r(1395)),S=f(r(8337)),I=f(r(5513)),P=function(){return g.defaultEnv};t.setEnvFunctionForProject=function(e){P=e};var R={MICROAPP:"tt07e3715e98c9aac0",MICROGAME:"tt975be1e608633d4202",get TOYBOX(){return"boe"===P().env.type?"tte05d96e07f3bdfe710":"tt3c174aaaa32e0eb810"}};t.DEFAULT_PROJECT_CONFIG={appid:"testappId",projectname:"默认小程序名",setting:{urlCheck:!0,es6:!0,postcss:!0,minified:!0,newFeature:!0},scripts:{afterOpen:"",beforeCompile:""}},t.PROJECT_TYPE_MAP={microapp:"app",microgame:"game",toybox:"toybox"};var L="";t.setIDEAppTechType=function(e){L=e},t.getIDEAppTechType=function(){return L};var T,D="testappid";function x(e,t){return void 0===t&&(t="app"),e.toLocaleLowerCase()===D?(null==L?void 0:L.includes("microapp"))?R.MICROAPP:(null==L?void 0:L.includes("toybox"))?R.TOYBOX:(null==L?void 0:L.includes("microgame"))?R.MICROGAME:"app"===t?R.MICROAPP:R.MICROGAME:e}t.isTestAppid=function(e){return Boolean(e)&&(e===R.MICROAPP||e===R.MICROGAME||e===R.TOYBOX||e.toLowerCase()===D)},t.getOriginAppid=x,function(e){e.ALWAYS="ALWAYS",e.NORMAL="NORMAL"}(T=t.PrivateState||(t.PrivateState={}));var N=function(e){function r(t){var r=t.rawJson,n=t.filepath,o=t.privateConfigPath,i=t.projectPath,a=t.publicJson,s=t.privateJson,u=e.call(this,r,n)||this;return u.projectPath=i,u.privateConfigPath=o,u.publicJson=a,u.privateJson=s,u._enablePrivateConfig=!1,u}return o(r,e),r.getKeyPath=function(){return r._keyPath||(r._keyPath=r.generateList(r.PRIVATE_CONFIG_KEYS)),r._keyPath},r.getKeyPathList=function(){return r.getKeyPath().map((function(e){return e[0]}))},r.generateList=function(e,t){return void 0===t&&(t=""),(0,y.default)(e,(function(e,n,o){var i,a=t?t+"."+o:o;return"string"==typeof(i=n)&&Object.values(T).includes(i)?e.push([a,n]):e.push.apply(e,p([],l(r.generateList(n,a)),!1)),e}),[])},r.from=function(e){return u(this,void 0,void 0,(function(){var t,n,o,i,a,s,u;return c(this,(function(c){switch(c.label){case 0:return t=h.join(e,"project.config.json"),n=h.join(e,"project.private.config.json"),o=d.readJsonSync(t),[4,(i=new r({rawJson:o,filepath:t,projectPath:e,publicJson:o,privateJson:{},privateConfigPath:n})).detectProjectType()];case 1:if("app"===c.sent()){a={};try{s=d.readJSONSync(n),(0,O.default)(s)&&(0,w.default)(s).length>0&&(a=s)}catch(e){}u=this.getMergedConfig(o,a),i.enablePrivateConfig(u,a)}return[2,i]}}))}))},r.fromJson=function(e,t){return new r({rawJson:e,filepath:h.join(t,"project.config.json"),projectPath:t,publicJson:e,privateJson:{},privateConfigPath:h.join(t,"project.private.config.json")})},r.getMergedConfig=function(e,t){var r,n=!0===(null!==(r=t.disablePrivate)&&void 0!==r?r:e.disablePrivate),o=(0,b.default)(e);return this.getKeyPath().forEach((function(e){if(e[1]===T.ALWAYS||!n){var r=(0,A.default)(t,e[0]);void 0!==r&&(0,I.default)(o,e[0],r)}})),o},r.prototype.update=function(t,n,o){var i;return u(this,void 0,void 0,(function(){var a,s,u,l,p,f,h;return c(this,(function(c){switch(c.label){case 0:return this._enablePrivateConfig&&!0===(null!==(i=this.privateJson.disablePrivate)&&void 0!==i?i:this.publicJson.disablePrivate)?[4,e.prototype.update.call(this,t,n,o)]:[3,2];case 1:return c.sent(),[2];case 2:return a=r.getKeyPathList(),s=(0,S.default)(((f={})[t]=n,f),a),u=(0,w.default)(s).length>0,l=(0,C.default)(((h={})[t]=n,h),a),p=(0,w.default)(l).length>0,(0,I.default)(this.__raw,t,n),u&&(0,I.default)(this.privateJson,t,s[t]),p&&(0,I.default)(this.publicJson,t,l[t]),o?p?[4,d.writeJSON(this.path,this.publicJson,{spaces:2})]:[3,4]:[3,7];case 3:c.sent(),c.label=4;case 4:return u?[4,d.ensureFile(this.privateConfigPath)]:[3,7];case 5:return c.sent(),[4,d.writeJson(this.privateConfigPath,this.privateJson,{spaces:2})];case 6:c.sent(),c.label=7;case 7:return[2]}}))}))},r.prototype.enablePrivateConfig=function(e,t){this.privateJson=t,this.__raw=e,this._enablePrivateConfig=!0},r.prototype.getPublicRawJSON=function(){return this.publicJson},r.prototype.getPrivateRawJSON=function(){return this.privateJson},r.prototype.getAppid=function(){var e="";return this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),x(e)},r.prototype.getRealAppid=function(){return u(this,void 0,void 0,(function(){var e,t,r,n;return c(this,(function(o){switch(o.label){case 0:return e="",this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),t=x,r=[e],L?(n=void 0,[3,3]):[3,1];case 1:return[4,this.detectProjectType()];case 2:n=o.sent(),o.label=3;case 3:return[2,e=t.apply(void 0,r.concat([n]))]}}))}))},r.prototype.getSetting=function(){var e;return null!==(e=this.__raw.setting)&&void 0!==e?e:t.DEFAULT_PROJECT_CONFIG.setting},r.prototype.getProjectName=function(){var e;return null!==(e=this.__raw.projectname)&&void 0!==e?e:""},r.prototype.getScripts=function(){var e;return null!==(e=this.__raw.scripts)&&void 0!==e?e:{afterOpen:"",beforeCompile:""}},r.prototype.getConditionData=function(e){var t,r;return null!==(r=null===(t=this.__raw.condition)||void 0===t?void 0:t[e])&&void 0!==r?r:{current:-1,list:[]}},r.prototype.getAutoCompileSetting=function(){var e;return!1!==(null===(e=this.__raw.setting)||void 0===e?void 0:e.autoCompile)},r.prototype.getCompileHotReloadSetting=function(){var e,t=null===(e=this.__raw.setting)||void 0===e?void 0:e.compileHotReLoad,r="native"===this.__raw.douyinProjectType;return t||void 0===t&&r},r.prototype.getNativeCompileSetting=function(){var e;return!1!==(null===(e=this.__raw.setting)||void 0===e?void 0:e.nativeCompile)},r.prototype.getLocalPluginsSetting=function(){var e,t;return null!==(t=null===(e=this.__raw.setting)||void 0===e?void 0:e.localPlugins)&&void 0!==t&&t},r.prototype.getAfterOpenScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.afterOpen},r.prototype.getBeforeCompileScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.beforeCompile},r.prototype.getSkipDomainCheck=function(){var e,t,r;return!(null===(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.urlCheck)||void 0===r||r)},r.prototype.getPreviewHotRestartCache=function(){var e,t,r;return null!==(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.IDEPreviewHotRestartCache)&&void 0!==r&&r},r.prototype.getMiniprogramRoot=function(){var e,t;return null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.miniprogramRoot)&&void 0!==t?t:"./"},r.prototype.getBigPackageSizeSupport=function(){var e,t,r;return null!==(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.bigPackageSizeSupport)&&void 0!==r&&r},r.prototype.getWebDetect=function(){var e,t,r;return null===(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.webDetect)||void 0===r||r},r.prototype.getPreviewPreload=function(){var e,t,r;return null===(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.previewPreload)||void 0===r||r},r.prototype.getPackOptions=function(){var e,t,r,n,o,i,a=null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.packOptions)&&void 0!==t?t:{},s=Object.values(m.PACK_TYPE),u=function(e){return"string"==typeof e.value&&!!e.value&&s.includes(e.type)};return{ignore:null!==(n=null===(r=a.ignore)||void 0===r?void 0:r.filter(u))&&void 0!==n?n:[],include:null!==(i=null===(o=a.include)||void 0===o?void 0:o.filter(u))&&void 0!==i?i:[]}},r.prototype.getLynxConfig=function(){return this.__raw.lynx},r.prototype.getLynxPackage=function(){var e,t;return JSON.stringify(null!==(t=null===(e=this.__raw.lynx)||void 0===e?void 0:e.debugSchema)&&void 0!==t?t:{})},r.prototype.detectProjectType=function(e){return u(this,void 0,void 0,(function(){var t;return c(this,(function(r){switch(r.label){case 0:return[4,this.getProjectType()];case 1:return t=r.sent(),[2,e?e===t:t]}}))}))},r.prototype.getProjectType=function(){return u(this,void 0,void 0,(function(){var e,r,n,o,i,a,s,u;return c(this,(function(c){switch(c.label){case 0:return(null==L?void 0:L.includes("microapp"))?[2,"app"]:(null==L?void 0:L.includes("unity"))||(null==L?void 0:L.includes("microgame"))||(null==L?void 0:L.includes("toybox"))?[2,"game"]:this.__raw.ttProjectType?[2,t.PROJECT_TYPE_MAP[this.__raw.ttProjectType]]:(e=this.getMiniprogramRoot(),r=h.join(this.projectPath,e,"app.json"),n=r.replace("app.json","app.ts"),o=r.replace("app.json","app.js"),[4,Promise.all([d.pathExists(r),d.pathExists(o),d.pathExists(n)])]);case 1:if(i=c.sent(),this.useTypeScript()){if(i[0]&&(i[1]||i[2]))return[2,"app"]}else if(i[0]&&i[1])return[2,"app"];return a=r.replace("app.json","game.json"),s=a.replace("game.json","game.js"),[4,Promise.all([d.pathExists(a),d.pathExists(s)])];case 2:if((u=c.sent())[0]&&u[1])return[2,"game"];throw new Error("[ProjectConfig]Bad Project Type")}}))}))},r.prototype.getAppJSON=function(){return u(this,void 0,void 0,(function(){var e,t;return c(this,(function(r){switch(r.label){case 0:return[4,this.detectProjectType("app")];case 1:return e=r.sent()?"app.json":"game.json",t=h.join(this.projectPath,this.getMiniprogramRoot(),e),[4,_.AppJSON.from(t)];case 2:return[2,r.sent()]}}))}))},r.prototype.getExtJSON=function(){return u(this,void 0,void 0,(function(){var e;return c(this,(function(t){switch(t.label){case 0:return e=h.join(this.projectPath,this.getMiniprogramRoot(),"ext.json"),[4,v.ExtJSON.from(e)];case 1:return[2,t.sent()]}}))}))},r.prototype.useTypeScript=function(){var e,t,r;return!!Array.isArray(null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.useCompilerPlugins)&&(null===(r=this.__raw.setting)||void 0===r?void 0:r.useCompilerPlugins.includes(m.CompilerPlugin.TYPESCRIPT))},r.PRIVATE_CONFIG_KEYS={disablePrivate:T.ALWAYS,setting:{urlCheck:T.NORMAL,mockLogin:T.NORMAL,autoPush:T.NORMAL,bigPackageSizeSupport:T.NORMAL,autoCompile:T.NORMAL,compileHotReLoad:T.NORMAL,nativeCompile:T.NORMAL,IDEPreviewHotRestartCache:T.NORMAL,webDetect:T.NORMAL},condition:T.NORMAL,packOptions:T.NORMAL,lynx:T.NORMAL},r}(E.JSONContainer);t.ProjectConfig=N},5622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathname=t.watchBrowserINP=void 0,t.watchBrowserINP=function(e){var t=new PerformanceObserver((function(r){r.getEntries().forEach((function(r){var n,o=r.duration,i=r.processingEnd-r.startTime,a=r.processingStart-r.startTime,s=r.processingEnd-r.processingStart,u=null===(n=null==r?void 0:r.target)||void 0===n?void 0:n.outerHTML;s<1||i<100||!u||e({metrics:{inp:o,inpt:i,inputDelay:a,processTime:s},tags:{outerHTML:u,type:r.name}},(function(){return t.disconnect()}))}))}));return setTimeout((function(){t.observe({type:"event",buffered:!0})}),3e4),t},t.getPathname=function(){try{return window.location.pathname.split("/dist")[1]}catch(e){return""}}},6912:function(e,t,r){"use strict";var n,o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultPerfConfigSettings=t.skipReport=t.startTime=t.PROCESS_TYPE=t.compareCacheTriggerCount=t.getModuleUseCache=t.setModuleUseCache=t.timelineMap=t.moduleEventCacheMap=t.getHref=t.commonParams2Context=t.BID=t.getSystemMemory=t.getCPUModel=t.getPathname=void 0;var a=i(r(2037)),s=r(5622);Object.defineProperty(t,"getPathname",{enumerable:!0,get:function(){return s.getPathname}});var u="";function c(){try{return u||(u=a.default.cpus()[0].model)}catch(e){return u="none"}}t.getCPUModel=c;var l="";function p(){try{return l||(l=Math.round(a.default.totalmem()/1024/1024/1024).toString())}catch(e){return l="none"}}function f(e,r,n){t.moduleEventCacheMap[e][r]=n}function d(e,r){var n=t.moduleEventCacheMap[e];return n[r]||(n[r]={count:0,triggerNum:0}),n[r]}t.getSystemMemory=p,t.BID="electron_12345",t.commonParams2Context=function(e,t,r,n){var o,i,a,s,u,l,f,d,h,_,v,E,m,g;return{user_id:String(null!==(o=null==e?void 0:e.userId)&&void 0!==o?o:""),name:null!==(i=null==e?void 0:e.username)&&void 0!==i?i:"",device_id:null==e?void 0:e.deviceId,ide_version:null==e?void 0:e.ideVersion,os_version:null==e?void 0:e.osVersion,os_platform:null==e?void 0:e.osPlatform,dev_app_id:null!=t?t:"",ext_app_id:null!=n?n:"",tech_type:null!=r?r:"",ide_version_number:null!==(s=null===(a=null==e?void 0:e.ideVersionNumber)||void 0===a?void 0:a.toString())&&void 0!==s?s:"",ide_env:null!==(u=null==e?void 0:e.env)&&void 0!==u?u:"",branch:null!==(l=null==e?void 0:e.branch)&&void 0!==l?l:"",build_id:null!==(f=null==e?void 0:e.buildId)&&void 0!==f?f:"",buildId:null!==(d=null==e?void 0:e.buildId)&&void 0!==d?d:"",arch:null===process||void 0===process?void 0:process.arch,ide_version_int:null!==(h=null==e?void 0:e.ideVersionNumber)&&void 0!==h?h:0,is_sandbox:null!==(_=e.isSandbox)&&void 0!==_?_:"0",frameworkType:null!==(v=null==e?void 0:e.frameworkType)&&void 0!==v?v:"",workbench_mode:null!==(E=e.workbenchMode)&&void 0!==E?E:"",e2e_scene:null!==(g=null===(m=null===process||void 0===process?void 0:process.env)||void 0===m?void 0:m.IDE_E2E_SCENE)&&void 0!==g?g:"",cpu_model:c(),system_memory:p()}},t.getHref=function(){try{return window.location.href}catch(e){return""}},t.moduleEventCacheMap={click:{},call:{}},t.timelineMap=new Map,t.setModuleUseCache=f,t.getModuleUseCache=d,t.compareCacheTriggerCount=function(e,t,r,n,i){var a;if(void 0===i&&(i=Date.now()),1===r)return!0;var s=d(e,t),u=s.startTime,c=void 0===u?0:u,l=s.triggerNum,p=Number(l)+1;if(p<r)return f(e,t,o(o({},s),{triggerNum:p,startTime:null!==(a=s.startTime)&&void 0!==a?a:i})),!1;var h=n&&i-c>n;return f(e,t,o(o({},s),{startTime:h?i:void 0,triggerNum:h?1:0})),!h},t.PROCESS_TYPE={main:"main",renderer:"renderer"},t.startTime=Date.now(),t.skipReport="development"===(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.NODE_ENV),t.defaultPerfConfigSettings={disabled:!0,fps:{below:20,belowCount:3,maxReporterCount:10},interval:{duration:100,blockFactor:5,reportThreshold:6,longTaskDuration:2e3,longTaskDurationMain:800,maxReporterCount:10},memory:{freePercent:10,free:2097152,duration:1e4,maxReporterCount:10,winUsePowershell:!1},disabledHref:[],disabledMain:!1,ideUsageCollectInterval:3e5,disabledJsonWorker:!1}},4084:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.reportTeaImmediately=t.clearTeaEvents=t.reportTea=t.makeEvent=t.registerDevLogger=void 0;var c=u(r(4088)),l=r(6912),p=c.default.create({baseURL:"https://mcs.snssdk.com",timeout:6e4,headers:{"Content-Type":"application/json"}}),f=console.info;function d(e,t,r){return void 0===r&&(r=Date.now()),{event:e,params:JSON.stringify(t),time:Math.floor(r/1e3)}}t.registerDevLogger=function(e){f=e},t.makeEvent=d;var h,_,v=function(){function e(e,t,r){var n=this;void 0===t&&(t=1e3),void 0===r&&(r=10),this._events=[],this.reporterAll=function(){0!==n._events.length&&(n.reporter(s([],a(n._events),!1)),n.clear())},this.add=function(e,t,r){if(n._events.push(d(e,t,r)),n._events.length>=n.cacheLimit)return n.reporterAll();n.timerId||(n.timerId=setTimeout((function(){n.timerId=void 0,n.reporterAll()}),n.cacheDurationLimit))},this.clear=function(){n._events=[]},this.reporter=e,this.cacheDurationLimit=t,this.cacheLimit=r}return Object.defineProperty(e.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),e}();function E(e){var t;return!_&&(null==e?void 0:e.deviceId)&&(_={user:{user_unique_id:e.deviceId},header:{app_id:1733,app_version:e.ideVersion,headers:JSON.stringify({app_full_version:e.ideVersion}),os_name:e.osPlatform,os_version:e.osVersion,custom:{cli_name:null!==(t=e.cliName)&&void 0!==t?t:""}},verbose:1}),_}var m=new Set;function g(e){m.size<100?g(e):console.error("失败缓存超过100个,无法继续缓存")}t.reportTea=function(e,t,r,u){var c=this;void 0===r&&(r={}),h||(h=new v((function(e){return o(c,void 0,void 0,(function(){var r,o,u,c,d,h,_;return i(this,(function(i){switch(i.label){case 0:if(r=Object.assign({},E(t),{events:e}),l.skipReport)return null==f||f("[skip report tea]events "+(null===(_=r.events)||void 0===_?void 0:_.length)+": ",r.events),[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,p.post("/v1/json",r)];case 2:return i.sent(),[3,4];case 3:throw o=i.sent(),console.error("上报数据出错,进入重试队列",o,r.events),e.forEach((function(e){return g(e)})),u=s([],a(new Set((e||[]).map((function(e){return null==e?void 0:e.event})))),!1).join(","),Error("Tea report error, "+((null==o?void 0:o.message)||String(o))+", event count: "+(null==e?void 0:e.length)+", failed events: "+u);case 4:if(!(m.size>0))return[3,8];c=s([],a(m),!1),null==f||f("[will report failed events]count: "+m.size+", events",c),d=p.post("/v1/json",n(n({},r),{events:c})),m.clear(),i.label=5;case 5:return i.trys.push([5,7,,8]),[4,d];case 6:return i.sent(),[3,8];case 7:return h=i.sent(),console.error("上报数据出错",h,c),null==f||f("重试出错,重新放入队列"),c.forEach((function(e){return g(e)})),[3,8];case 8:return[2]}}))}))}))),h.add(e,r,u)},t.clearTeaEvents=function(){null==h||h.reporterAll()},t.reportTeaImmediately=function(e,t){var r,n=t.map((function(e){return d(e.event,e.params)})),o=Object.assign({},E(e),{events:n});l.skipReport?null==f||f("[skip report tea immediately]events "+(null===(r=o.events)||void 0===r?void 0:r.length)+": ",o.events):p.post("/v1/json",o).catch((function(e){console.error("上报数据出错",e)}))}},4415:function(e,t){"use strict";var r=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function n(e){return e.endsWith("/")?e:e.concat("/")}Object.defineProperty(t,"__esModule",{value:!0}),t.ensureEndSlash=t.formatSize=t.normalizeSize=void 0,t.normalizeSize=function(e){var t=e.__APP__,o=void 0===t?0:t,i=r(e,["__APP__"]),a={main:{path:"main",size:o},sub:[],total:o};return Object.keys(i).forEach((function(e){var t,r=i[e];null===(t=a.sub)||void 0===t||t.push({path:n(e),size:r}),a.total=a.total+r})),a},t.formatSize=function(e){return e>1048576?(e/1024/1024).toFixed(2)+"MB":e>1024?(e/1024).toFixed(1)+"KB":e+"B"},t.ensureEndSlash=n},7992:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setBoeMap=t.setJestMock=t.setSlardarInstance=t.setEnvFunction=t.defaultEnv=t.AxiosInstance=void 0;var a=i(r(4088)),s=r(2139),u=new Map;u.set(/https:\/\/microapp.bytedance.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),u.set(/https:\/\/developer.toutiao.com\/api\/apps\/v3\/meta(.*)/,"http://developer.toutiao.com.boe-gateway.byted.org/api/apps/v3/meta$1"),u.set(/https:\/\/developer.toutiao.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),u.set(/https:\/\/open-sandbox.douyin.com\/(.*)/,"http://open-sandbox-boe.bytedance.net/$1"),u.set(/https:\/\/developer.open-douyin.com\/(.*)/,"https://dy-open-platform-boe.bytedance.net/$1"),u.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/user\/tp_info)/,"http://developer-boe.toutiao.com/$1"),u.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/.*)/,"http://developer-boe.toutiao.com/$1"),u.set(/https:\/\/starkgame.zijieapi.com\/(.*)/,"http://starkpublish.bytedance.net/$1");var c=["https://ma.zijieapi.com/api/apps/xconfig_meta"];t.setBoeMap=function(e,t){u.set(e,t)};var l={env:{type:"online",channel:""},proxy:{host:null,port:null}};t.defaultEnv=l;var p=function(){return l},f={reportRequestError:function(){},reportCustomEvent:function(){}},d=[function(e){var t,r,i;if(null===(i=e.headers)||void 0===i?void 0:i.online)return e;var a=p().env,s="boe"===a.type,l=a.channel;if(!s)return e;try{for(var f=n(u),d=f.next();!d.done;d=f.next()){var h=o(d.value,2),_=h[0],v=h[1];if(e.url&&_.test(e.url)&&!c.includes(e.url)){e.url=e.url.replace(_,v);break}}}catch(e){t={error:e}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}return l&&e.headers&&!e.headers["ignore-channel"]&&(e.headers["X-TT-ENV"]=l),e},function(e){var t;if(null===(t=e.headers)||void 0===t?void 0:t.online)return e;var r=p().env,n="ppe"===r.type,o=r.channel;return n&&e&&e.headers&&(e.headers["X-USE-PPE"]=1),n&&e.headers&&o&&!e.headers["ignore-channel"]&&(e.headers["X-TT-ENV"]=o),e}],h=a.default.create({adapter:"http",timeout:6e4});t.AxiosInstance=h,h.interceptors.request.use((function(e){var t,n;null==f||f.reportCustomEvent(s.SLARDAR_EVENT.IDE_REQUEST_START,void 0,{url:null!==(t=null==e?void 0:e.url)&&void 0!==t?t:""});var o=p().proxy;return o.host?(null===(n=e.url)||void 0===n?void 0:n.startsWith("https://"))?(e.httpsAgent=r(1681).httpsOverHttp({proxy:{host:o.host,port:o.port},rejectUnauthorized:!1}),e.proxy=!1):e.proxy={host:o.host,port:o.port?+o.port:80}:(null==o?void 0:o.host)&&o.port||(e.proxy=!1),d.forEach((function(t){return t(e)})),e}),(function(e){return null==f||f.reportRequestError({url:null==e?void 0:e.url,statusMessage:String(e),caller:"interceptors.request.error"}),Promise.reject(e)})),h.interceptors.response.use((function(e){var t,r,n,o,i,a,s,u,c,l,p,d,h;return null===e.config.validateStatus||e.status>=200&&e.status<300||null==f||f.reportRequestError({url:null!==(r=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:null===(n=null==e?void 0:e.request)||void 0===n?void 0:n.url,ttLogId:String(null!==(a=null===(i=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.headers)||void 0===i?void 0:i["x-tt-logid"])&&void 0!==a?a:null===(s=null==e?void 0:e.headers)||void 0===s?void 0:s["x-tt-logid"]),statusCode:null==e?void 0:e.status,statusMessage:null==e?void 0:e.statusText,caller:"interceptors.response"}),process.env.isIDE&&console.info("[request] ",null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.url,"x-tt-logid",null!==(h=null!==(p=null===(l=null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.headers)||void 0===l?void 0:l["x-tt-logid"])&&void 0!==p?p:null===(d=e.headers)||void 0===d?void 0:d["x-tt-logid"])&&void 0!==h?h:""),e}),(function(e){var t,r,n,o,i,a,s,u,c,l,d,h,_,v,E;return console.info("[error request proxy]",p().proxy),null==f||f.reportRequestError({url:null!==(i=null!==(r=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:null===(o=null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.config)||void 0===o?void 0:o.url)&&void 0!==i?i:null===(a=null==e?void 0:e.request)||void 0===a?void 0:a.url,statusCode:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.status,statusMessage:String(e),ttLogId:null!==(_=null!==(l=null===(c=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.headers)||void 0===c?void 0:c["x-tt-logid"])&&void 0!==l?l:null===(h=null===(d=null==e?void 0:e.response)||void 0===d?void 0:d.headers)||void 0===h?void 0:h["x-tt-logid"])&&void 0!==_?_:null===(E=null===(v=null==e?void 0:e.request)||void 0===v?void 0:v.headers)||void 0===E?void 0:E["x-tt-logid"],caller:"interceptors.response.error"}),Promise.reject(e)})),h.interceptors.request.use((function(e){return e.headers&&!e.headers.ignoreReferer&&(e.headers.Referer="developer.toutiao.com"),e})),t.setEnvFunction=function(e){p=e},t.setSlardarInstance=function(e){f=e},t.setJestMock=function(e){Object.entries(e).forEach((function(e){var t=o(e,2),r=t[0],n=t[1];h[r]=n}))}},9086:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.filterFile=void 0;var o=n(r(1017)),i=r(5833),a=n(r(4763));t.filterFile=function(e,t){e=e.replace(/\\/g,"/");var r=t.ignore||[],n=t.include||[];if("project.config.json"===e)return!1;var c=function(t){switch(t.type){case i.PACK_TYPE.FILE:return e===u(t.value);case i.PACK_TYPE.FOLDER:var r=t.value;return r.endsWith("/")&&(r=r.slice(0,-1)),s(u(r))&&(0,a.default)(u(r)+"/**/*")(e);case i.PACK_TYPE.GLOB:return(0,a.default)(u(t.value))(e);case i.PACK_TYPE.REGEXP:return new RegExp(t.value).test(e);case i.PACK_TYPE.PREFIX:return o.default.basename(e).startsWith(t.value);case i.PACK_TYPE.SUFFIX:return o.default.basename(e).endsWith(t.value);default:return!0}};return!n.some(c)&&r.some(c)};var s=function(e){return e.split("/").every((function(e){return".."!==e&&"."!==e}))},u=function(e){return e.startsWith("/")?e.slice(1):e}},4851:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubPath=t.isNeedForceUpdate=t.versionStringCompare=t.retryTask=t.sleep=t.waitUntil=t.parseJson=void 0;var a=i(r(1017));function s(e){return new Promise((function(t){return setTimeout(t,e)}))}t.parseJson=function(e,t){void 0===t&&(t={});try{return JSON.parse(e)}catch(e){return console.error("[parseJson]",e),t}},t.waitUntil=function(e,t,r){void 0===t&&(t=3e3),void 0===r&&(r=500);var n=Date.now(),o=!1;return new Promise((function(i){var a=setInterval((function(){(o||Date.now()-n>=t)&&(i(o),clearInterval(a));try{e().then((function(e){o=e})).catch((function(e){console.error("[waitUntil/task/promise]"+e.message)}))}catch(e){console.error("[waitUntil/task]"+e.message)}}),r)}))},t.sleep=s,t.retryTask=function(e,t,r){return void 0===t&&(t=10),void 0===r&&(r=1e3),n(this,void 0,void 0,(function(){var i,a,u,c=this;return o(this,(function(l){switch(l.label){case 0:i=0,a=function(){return n(c,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return"function"!=typeof r?[3,2]:[4,r()];case 1:return e.sent(),[3,4];case 2:return[4,s(r)];case 3:e.sent(),e.label=4;case 4:return[2]}}))}))},l.label=1;case 1:return i<t?1==++i?[3,3]:[4,a()]:[3,7];case 2:l.sent(),l.label=3;case 3:return l.trys.push([3,5,,6]),[4,e()];case 4:return l.sent(),[2];case 5:if(u=l.sent(),i===t)throw u;return console.error("task failed, will retry"),[3,6];case 6:return[3,1];case 7:return[2]}}))}))},t.versionStringCompare=function(e,t){void 0===e&&(e=""),void 0===t&&(t="");for(var r=e.split("-")[0].trim().split("."),n=t.split("-")[0].trim().split("."),o=Math.max(r.length,n.length),i=0,a=0;a<o;a++){var s=r.length>a?r[a]:"0",u=isNaN(Number(s))?s.charCodeAt(0):Number(s),c=n.length>a?n[a]:"0",l=isNaN(Number(c))?c.charCodeAt(0):Number(c);if(u<l){i=-1;break}if(u>l){i=1;break}}return i},t.isNeedForceUpdate=function(e){var r=e.curVersion,n=e.updateVersion,o=e.date,i=e.appType;if(n&&-1===(0,t.versionStringCompare)(r,n)){var a=new Date(o),s=new Date(a.getTime()-12096e5),u=new Date,c=a.getFullYear()+" 年 "+(a.getMonth()+1)+" 月 "+a.getDate()+" 日";return u>=a?{message:"当前版本 "+r+" 在 "+c+"后已不再提供服务,为了给你提供更好的体验,请将 "+i+" 升级至最新版本,感谢你的理解与支持。",type:"force"}:u>=s?{message:"为了给你提供更好的体验,请在 "+c+"前将 "+i+" 升级至最新版本。逾期未升级,我们将无法继续提供服务,感谢你的理解与支持。",type:"warn"}:null}return null},t.isSubPath=function(e,t){var r=a.default.relative(e,t);return r&&!r.startsWith("..")}},9251:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setAppConfig=t.getToken=void 0;var u,c=a(r(9849)),l=s(r(1017)),p=r(4263),f=s(r(8366)),d=l.default.join((0,p.getCliDefaultStoragePath)(),"appConfig.json");function h(){var e;try{var t=c.readJsonSync(d);e=(0,p.isObject)(t)?t:{}}catch(t){e={}}return e}t.getToken=function(e){var t;return u||(u=h()),null===(t=u[e])||void 0===t?void 0:t.token},t.setAppConfig=function(e){e.appid?(0,p.isObject)(e.config)?(c.ensureFileSync(d),(u=h())[e.appid]=n(n({},(0,p.isObject)(u[e.appid])?u[e.appid]:{}),e.config),c.writeJSONSync(d,u)):f.default.error("Config must be an object."):f.default.error("Appid is required to set app config.")}},9345:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.audit=t.getAuditHostsList=void 0;var s=r(7992),u=a(r(9258)),c=r(1728),l=r(5796);function p(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,u,l,p;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,p={},[4,(0,c.getLogInfoHeaders)(t)];case 1:p.headers=i.sent(),r=p,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://microapp.bytedance.com/platform_api/v1/app/"+t+"/code_manager/versions",r)];case 3:return n=i.sent(),o=n.data||{},a=o.error,u=o.message,l=o.data,a?[2,{success:!1,msg:u||"Get host failed,please check if your appid is valid",data:l}]:[2,{success:!0,msg:"",data:l}];case 4:return[2,{success:!1,msg:i.sent().message,data:null}];case 5:return[2]}}))}))}function f(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,u,l,p;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,p={},[4,(0,c.getLogInfoHeaders)(t)];case 1:p.headers=i.sent(),r=p,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://microapp.bytedance.com/platform_api/app/publish/v2/"+t+"/audit/host",r)];case 3:return n=i.sent(),o=n.data||{},a=o.error,u=o.message,l=o.data,a?[2,{success:!1,msg:u||"Get host failed,please check if your appid is valid",hostList:{},preHost:[]}]:l.hostList||l.preHost?[2,{success:!0,hostList:l.hostList,preHost:l.preHost}]:[2,{success:!1,msg:"You do not have permission to audit app",hostList:{},preHost:[]}];case 4:return[2,{success:!1,msg:i.sent().message,hostList:{},preHost:[]}];case 5:return[2]}}))}))}function d(e,t){return o(this,void 0,void 0,(function(){var r,o,a,l,p,f,d;return i(this,(function(i){switch(i.label){case 0:for(a in r="https://microapp.bytedance.com/api/v2/app/"+t+"/audit",o=new u.default,e)o.append(a,e[a]);return d={},p=[{}],[4,(0,c.getLogInfoHeaders)(t)];case 1:d.headers=n.apply(void 0,[n.apply(void 0,p.concat([i.sent()])),o.getHeaders()]),l=d,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.put(r,o,l)];case 3:if((f=i.sent()).data&&0===f.data.error)return[2,void 0];throw new Error(f.data.message);case 4:throw i.sent();case 5:return[2]}}))}))}t.getAuditHostsList=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o;return i(this,(function(i){switch(i.label){case 0:return[4,f({appid:e.appid})];case 1:if(t=i.sent(),r=t.success,n=t.msg,o=t.hostList,r)return[2,Object.keys(o)];throw new Error(n)}}))}))},t.audit=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,s,u;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,r=e.host,n=e.autoPublish,o=e.channel,[4,p({appid:t})];case 1:return a=i.sent(),s=a.success,u=a.msg,[4,(0,l.checkChannel)(t,o)];case 2:if(i.sent(),!s)throw new Error(u);return[4,d({auto_publish:n?1:0,host_chosen:r.toString(),notifyContent:"",test_report:"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1",versionTag:JSON.stringify({Tag:o})},t)];case 3:return i.sent(),[2]}}))}))}},2893:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getConfig=t.setConfig=void 0;var s=r(7992),u=r(8559),c=a(r(469)),l=i(r(9849)),p=i(r(1017)),f=r(7310),d=a(r(8366)),h=r(4263),_=(0,h.getCliDefaultStoragePath)(),v=p.join(_,"config.json"),E={proxy:null,tempFilePath:null,storagePath:_,url:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/microapp/make_schema",compileProgress:"https://microapp.bytedance.com/api/v1/app/${appid}/compile_progress",preview:"https://developer.toutiao.com/api/v2/app/${appid}/preview",upload:"https://developer.toutiao.com/api/v2/app/${appid}/testing",check:"https://developer.toutiao.com/api/developer/ide/v1/microapp/query_check_progress",emailLogin:"https://developer.toutiao.com/passport/web/email/login/",mobileLogin:"https://developer.toutiao.com/passport/web/sms_login/",sendLoginCode:"https://developer.toutiao.com/passport/web/send_code/",getUserInfo:"https://microapp.bytedance.com/platform_api/v1/app/microappadmincomm/getUserInfo"},interactGameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/v1/compile_progress",preview:"https://developer.toutiao.com/api/developer/ide/v1/preview",upload:"https://developer.toutiao.com/api/developer/ide/v1/testing"},microgameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/microgame/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/microgame/v1/compile_progress?appid=",preview:"https://developer.toutiao.com/api/developer/ide/microgame/v1/preview?appid=",upload:"https://developer.toutiao.com/api/developer/ide/microgame/v1/testing?appid=",versionInfo:"https://developer.toutiao.com/api/developer/ide/microgame/v1/versions?appid=",sizeLimit:"https://developer.toutiao.com/api/developer/ide/microgame/v1/get_package_size_limit?appid=",unityCompileProgress:"https://developer.toutiao.com/api/developer/ide/microgame/v1/sc_compile_progress",unityPreview:"https://developer.toutiao.com/api/developer/ide/microgame/v1/sc_preview"},env:{type:"online",channel:""},allowReportEvent:!0},m=(0,c.default)(E);if((0,h.isCli)()&&(l.existsSync(v)?((m=l.readJSONSync(v)).url.emailLogin=E.url.emailLogin,m.url.mobileLogin=E.url.mobileLogin,m.url.sendLoginCode=E.url.sendLoginCode,m.url.getUserInfo=E.url.getUserInfo):(l.ensureFileSync(v),l.writeJsonSync(v,E))),!(0,h.isIDE)()){var g=function(){var e=m.proxy,t=e?new f.URL(e):null;return{env:m.env,proxy:{host:t?t.hostname:null,port:t?t.port:null}}};(0,s.setEnvFunction)(g),(0,u.setEnvFunctionForProject)(g)}t.setConfig=function(e,t){if(void 0===t&&(t=!1),t)m=(0,c.default)(E),d.default.info("setConfig "+JSON.stringify(E,null,2));else{for(var r in e)"object"==typeof e[r]?m[r]=Object.assign(m[r],(0,c.default)(e[r])):m[r]=(0,c.default)(e[r]);d.default.info("setConfig "+JSON.stringify(e))}(0,h.isCli)()&&l.writeJsonSync(v,m)},t.getConfig=function(){return Object.assign({},m)}},2173:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProject=void 0;var c=r(7992),l=i(r(9849)),p=i(r(1017)),f=u(r(2541)),d=r(2696),h=u(r(8366)),_=r(4263);function v(e,t){return a(this,void 0,void 0,(function(){var r=this;return s(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,o){return a(r,void 0,void 0,(function(){var r,i;return s(this,(function(a){switch(a.label){case 0:return r=p.join(t,"template.zip"),i=l.createWriteStream(r),[4,c.AxiosInstance.get(e,{responseType:"stream"})];case 1:return a.sent().data.pipe(i),i.on("finish",(function(){l.createReadStream(r).pipe(f.default.Extract({path:t})).on("close",(function(){l.unlinkSync(r),n()})).on("error",(function(e){l.unlinkSync(r),o(e)}))})).on("error",(function(e){o(e)})),[2]}}))}))}))];case 1:return[2,n.sent()]}}))}))}t.createProject=function(e){return a(this,void 0,void 0,(function(){var t,r,n,o,i,a;return s(this,(function(s){switch(s.label){case 0:return t=e.projectName,r=e.force,n=e.template,(o=e.type)||(o="js"),(i=e.targetDir)||(i=p.resolve(process.cwd(),t||".")),l.existsSync(i)?r?[4,l.remove(i)]:[3,2]:[3,3];case 1:return s.sent(),h.default.info("Remove "+i),[3,3];case 2:throw new Error(i+" Exist");case 3:return l.ensureDirSync(i),"rich"!==n?[3,5]:(a="js"===o?d.TEMPLATE_DOWNLOAD_URL:d.TS_TEMPLATE_DOWNLOAD_URL,h.default.info("⚙️ Installing template. This might take a while...."),[4,v(a,i)]);case 4:return s.sent(),[3,8];case 5:return"empty"!==n?[3,8]:[4,l.copy(p.join((0,_.getPackageRoot)(),"./templates/"+("js"===o?"empty":"empty-ts")),i)];case 6:return s.sent(),[4,(0,_.createProjectConfigFile)(t,i,"ts"===o)];case 7:s.sent(),s.label=8;case 8:return h.default.info("🎉 Successfully created project "+t),[2]}}))}))}},4113:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.logout=t.checkSession=t.loginByPhone=t.sendVerificationCodeToPhone=t.loginByEmail=void 0;var s=r(2747),u=r(7992),c=a(r(3477)),l=r(1728),p=a(r(8366)),f=r(4263),d=r(2893),h=r(8066),_={aid:1365};function v(e){return o(this,void 0,void 0,(function(){var t,r,o,a,s,l,p;return i(this,(function(i){switch(i.label){case 0:t=e.type,r=e.params,o=(0,d.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,u.AxiosInstance.post("mobile"===t?o.url.mobileLogin:o.url.emailLogin,c.default.stringify(n(n({},_),r)),{headers:{"content-type":"application/x-www-form-urlencoded","ignore-channel":!0}})];case 2:return a=i.sent(),s=a.data,l=a.headers,[2,{success:p="success"===s.message,cookies:l["set-cookie"],msg:p?"":s.data.description||"Login failed, please try again",userId:s.data.user_id_str}];case 3:return[2,{success:!1,msg:i.sent().message,cookies:null,userId:""}];case 4:return[2]}}))}))}function E(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a;return i(this,(function(i){switch(i.label){case 0:return t=(0,d.getConfig)(),e?[3,2]:[4,(0,l.getUserCookies)()];case 1:e=i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,u.AxiosInstance.get(t.url.getUserInfo,{params:{},headers:{Cookie:e}})];case 3:return r=i.sent().data,n=!r.error,o=void 0,n&&(a=r.data,o={username:a.name||"",avatar:a.avatar||"",developerId:a.developerId||"",mobile:a.mobile||"",email:a.email||"",auditStatus:a.auditStatus||0,uid:a.uId}),[2,{success:n,userData:o,msg:n?"":"Login fail, please try later"}];case 4:return[2,{success:!1,msg:i.sent().message}];case 5:return[2]}}))}))}function m(e){return o(this,void 0,void 0,(function(){var t,r,o;return i(this,(function(i){switch(i.label){case 0:t=(0,d.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,u.AxiosInstance.get(t.url.sendLoginCode,{params:n(n({},_),{type:24,mobile:e}),headers:{"User-Agent":"bytedanceide"}})];case 2:return r=i.sent().data,[2,{success:o="success"===r.message,msg:o?"":"Get verification code fail, please try later"}];case 3:return[2,{success:!1,msg:i.sent().message}];case 4:return[2]}}))}))}t.loginByEmail=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,u,c,p,d,_,m;return i(this,(function(i){switch(i.label){case 0:return t=e.email,r=e.password,n=e.dontSaveCookie,(0,f.validateEmail)(t),[4,v({type:"email",params:{mix_mode:1,email:(0,f.mixEncode)(t),password:(0,f.mixEncode)(r)}})];case 1:if(o=i.sent(),a=o.success,u=o.msg,c=o.cookies,p=o.userId,!a||!c)throw new s.LoginError(u);return[4,E(c)];case 2:if(d=i.sent(),_=d.success,m=d.msg,!_)throw new s.LoginError(m);return n||(0,l.saveUserCookies)(c,p),h.CliMonitor.updateCommonParams({userId:p}),[2,c]}}))}))},t.sendVerificationCodeToPhone=function(e){return o(this,void 0,void 0,(function(){var t,r;return i(this,(function(n){switch(n.label){case 0:return t=e.phoneNumber,(0,f.validatePhoneNumber)(t),[4,m(t)];case 1:if(!(r=n.sent()).success)throw new s.LoginError(r.msg);return[2]}}))}))},t.loginByPhone=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,u,c,p,d,_,m;return i(this,(function(i){switch(i.label){case 0:return t=e.phoneNumber,r=e.code,n=e.dontSaveCookie,(0,f.validatePhoneNumber)(t),(0,f.validateVerificationCode)(r),[4,v({type:"mobile",params:{mobile:t,code:r}})];case 1:if(o=i.sent(),a=o.success,u=o.msg,c=o.cookies,p=o.userId,!a||!c)throw new s.LoginError(u);return[4,E(c)];case 2:if(d=i.sent(),_=d.success,m=d.msg,!_)throw new s.LoginError(m);return n||(0,l.saveUserCookies)(c,p),h.CliMonitor.updateCommonParams({userId:p}),[2,c]}}))}))},t.checkSession=function(){return o(this,void 0,void 0,(function(){var e,t,r,n,o,a;return i(this,(function(i){switch(i.label){case 0:e={isValid:!1,errMsg:null,username:void 0},i.label=1;case 1:return i.trys.push([1,3,,4]),[4,E()];case 2:return t=i.sent(),r=t.success,n=t.msg,o=t.userData,e.isValid=r,e.errMsg=n,e.username=null==o?void 0:o.username,[3,4];case 3:return a=i.sent(),e.errMsg=a.message,[3,4];case 4:return e.isValid?p.default.info("✅ 已登录(Logged in with "+e.username+")"):p.default.info("❌ 未登录(Not logged in, reason: "+e.errMsg+")"),[2,e]}}))}))},t.logout=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return(0,l.removeUserCookies)(),h.CliMonitor.updateCommonParams({userId:""}),p.default.info("✅ Logout success"),[2]}))}))}},3077:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAppVersions=t.fetchMeta=t.isRealToyId=t.getMeta=void 0;var i=r(2747),a=r(7992),s=r(1728),u=r(4263);function c(e){var t=e.appid,r=e.isGame,u=void 0!==r&&r;return n(this,void 0,void 0,(function(){var e,r,n,c;return o(this,(function(o){switch(o.label){case 0:return e=function(e){return"https://developer.toutiao.com/api/apps/v3/meta?appid="+e+"&aid=13&version=current&ttcode=OVCNW/U0UREwv0sHdY9Rm16vBgGrCQIBOWurUCmJ1H6d/2XHLKeOYTYfEJIEeC0AOCwBZAR2j34C4tFN7Nqfq9tHVEpM4OuJM2b8qz0INtUs1qLhKFOtnGa9/Ey0WW86GGocJk074eP72MMhzNmePzaTQzXwn/eqEq4GHwyF2Tg=&aid=1365"}(t),[4,(0,s.getLogInfoHeaders)(t)];case 1:return r=o.sent(),n={},u&&(e="https://developer.toutiao.com/api/developer/ide/v1/version_info",n.app_id=t,n.stage="current"),[4,a.AxiosInstance.get(e,{headers:r,params:n})];case 2:return(c=o.sent().data).error&&0!==c.error||c.code&&0!==c.code?[4,Promise.reject(new i.MetaError(c.data))]:[3,4];case 3:return[2,o.sent()];case 4:return[2,c]}}))}))}t.getMeta=function(e){var t,r;return n(this,void 0,void 0,(function(){var n,i,a,s;return o(this,(function(o){switch(o.label){case 0:return n=e.appid,i=e.isGame,a=void 0!==i&&i,(0,u.validateAppId)(n),[4,c(e)];case 1:return s=o.sent(),a?[2,{version:null===(t=s.data)||void 0===t?void 0:t.current_version}]:[2,{version:null===(r=s.data)||void 0===r?void 0:r.version}]}}))}))},t.isRealToyId=function(e){return n(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return[4,c({appid:e})];case 1:return[2,!!(t=r.sent().data)&&16===t.tech_type]}}))}))},t.fetchMeta=c,t.getAppVersions=function(e){return n(this,void 0,void 0,(function(){var t,r;return o(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,(0,s.getLogInfoHeaders)(e)];case 1:return t=n.sent(),[4,a.AxiosInstance.get("https://developer.toutiao.com/api/developer/ide/v1/microapp/versions",{headers:t,params:{app_id:e}})];case 2:return(r=n.sent().data).code&&0!==r.code?[4,Promise.reject(new i.MetaError(r.msg))]:[3,4];case 3:return[2,n.sent()];case 4:return[2,r.data];case 5:return n.sent(),[2,{audit_version:"0.0.0"}];case 6:return[2]}}))}))}},5787:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.projectToQRCode=t.upload=t.preview=void 0;var f=r(2747),d=r(7992),h=p(r(9258)),_=a(r(9849)),v=a(r(1017)),E=p(r(7086)),m=r(7312),g=r(9396),y=r(1728),b=p(r(8366)),A=r(5879),O=r(4486),w=r(2997),C=r(4263),S=r(2893),I=r(5834),P=r(1017),R=r(9428),L=p(r(9508)),T=(0,C.getCliDefaultStoragePath)(),D=v.join(T,"preview.json"),x={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default"},N={preview:x,debug:x};if((0,C.isCli)())if(_.existsSync(D))try{N=_.readJSONSync(D)}catch(e){}else _.ensureFileSync(D),_.writeJsonSync(D,N);function j(e){var t,r,o,i;return s(this,void 0,void 0,(function(){var a,s,c,l,p,v,E,b,A,O,w,C,I,R,L,T,D,x,N,j,M,k,U,F,G;return u(this,(function(u){switch(u.label){case 0:return a=e.devAppid,s=e.projectPath,c=e.type,l=e.uploadVersion,p=e.uploadChangeLog,v=e.uploadNeedUploadSourcemap,E=e.localCompileVersion,b=e.extraCheckInfoJson,A=e.extraInfoJson,w=new h.default,[4,(0,g.getSizeLimitConfig)(a)];case 1:return C=u.sent(),I=1024*C.subTotal*1024,[4,(0,m.folderToZipStream)(s,{whiteList:[],useTypeScript:!1},!0,I)];case 2:return R=u.sent(),L=(0,S.getConfig)(),T=d.AxiosInstance.put,"preview"===c?O=L.microgameUrl.preview+a:(O=L.microgameUrl.upload+a,w.append("version",l),w.append("intro",p),w.append("need_upload_sourcemap",String(!!v)),w.append("extra_check_info_json",b)),[4,_.readJson((0,P.join)(s,"game.json"))];case 3:return D=u.sent(),x=null!==(t=D.subPackages)&&void 0!==t?t:D.subpackages,w.append("subpackage",String(Boolean(null==x?void 0:x.length))),w.append("local_compile_version",null!=E?E:"4.0.4-rc.17.ide.2.cli"),w.append("source",R,{filename:"source.zip"}),A&&w.append("extra_info_json",A),k=T,U=[O,w],F={},G={},[4,(0,y.getUserCookies)()];case 4:return[4,k.apply(void 0,U.concat([(F.headers=n.apply(void 0,[(G.Cookie=u.sent(),G),w.getHeaders()]),F.maxBodyLength=I,F)]))];case 5:if(N=u.sent(),j=N.data,M=N.headers,0===j.error||0===j.code)return[2,{metrics:null!==(r=j.performance_metrics)&&void 0!==r?r:{},logId:null!==(o=null==M?void 0:M["x-tt-logid"])&&void 0!==o?o:""}];throw new f.UploadError(null!==(i=j.message)&&void 0!==i?i:j.msg,j.error)}}))}))}function M(e){return s(this,void 0,void 0,(function(){var t,r,n,o;return u(this,(function(i){switch(i.label){case 0:return n={},o={},[4,(0,y.getUserCookies)()];case 1:return n.headers=(o.Cookie=i.sent(),o),t=n,r=(0,S.getConfig)().microgameUrl.compileProgress+e,[4,d.AxiosInstance.get(r,t).then((function(e){var t,r,n,o=e.data||{},i=o.error,a=o.status,s=o.message;return 1===i?{success:!1,done:!1,error:i,msg:s,errLink:null!==(t=e.data.err_link)&&void 0!==t?t:"",passJson:{}}:{success:!0,done:0===i&&2===a,error:i,msg:"",metrics:null!==(r=e.data.performance_metrics)&&void 0!==r?r:{},errLink:null!==(n=e.data.err_link)&&void 0!==n?n:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,i.sent()]}}))}))}function k(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=setInterval((function(){return s(t,void 0,void 0,(function(){var t,i,a,s,c,l,p,d,h;return u(this,(function(u){switch(u.label){case 0:return[4,M(e)];case 1:return t=u.sent(),i=t.success,a=t.msg,s=t.error,c=t.errLink,l=t.metrics,p=t.done,d=t.passJson,i||(clearInterval(o),h=new f.CompileError(a,c,s),n(h)),p&&(clearInterval(o),r({metrics:null!=l?l:{},passJson:d})),[2]}}))}))}),1e3)}))];case 1:return[2,r.sent()]}}))}))}function U(e,t){return s(this,void 0,void 0,(function(){var r,n,o,i,a,s,l,p,f;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),r=["**/*.js"],[4,(0,L.default)(r,{cwd:t,onlyFiles:!0,ignore:["**/node_modules/**"]})];case 1:n=u.sent(),o=[],i=function(r){var n=v.join(t,r);try{_.readFileSync(n,"utf-8").split("\n").forEach((function(t,n){t.includes(e)&&o.push(r+":"+(n+1))}))}catch(e){console.error("[precheck/code search] 文件读取错误",e)}};try{for(a=c(n),s=a.next();!s.done;s=a.next())l=s.value,i(l)}catch(e){p={error:e}}finally{try{s&&!s.done&&(f=a.return)&&f.call(a)}finally{if(p)throw p.error}}return[2,o];case 2:return u.sent(),[2,[]];case 3:return[2]}}))}))}function F(e){var t,r,o,i,a,p,_=e.appid,v=e.extraCheckInfoJson,E=e.zipStream,m=e.updateStatus,g=e.setCheckResult,b=e.projectPath,A=e.isNewPlatform;return s(this,void 0,void 0,(function(){var e,s,O,w,C,S,I,P,R,L,T,D,x,N,j,M,k,F,G,B,H,V,Z,q,W;return u(this,(function(u){switch(u.label){case 0:if(e=new h.default,v)return[3,11];if(!b)return[3,9];s=[["side_bar","navigateToScene"],["add_short_cut","addShortcut"],["subscribe_message","requestSubscribeMessage"],["aweme_pay","openAwemeCustomerService"],["normal_pay","requestGamePayment"],["interstitial_ad","createInterstitialAd"],["reward_video_ad","createRewardedVideoAd"]],O={code_use:{}},u.label=1;case 1:u.trys.push([1,6,7,8]),w=c(s),C=w.next(),u.label=2;case 2:return C.done?[3,5]:(S=l(C.value,2),I=S[0],[4,U(S[1],b)]);case 3:P=u.sent(),O.code_use[I]={use:P.length>0,path:P},u.label=4;case 4:return C=w.next(),[3,2];case 5:return[3,8];case 6:return R=u.sent(),F={error:R},[3,8];case 7:try{C&&!C.done&&(G=w.return)&&G.call(w)}finally{if(F)throw F.error}return[7];case 8:return e.append("extra_check_info_json",JSON.stringify(O)),[3,10];case 9:return[2,!1];case 10:return[3,12];case 11:e.append("extra_check_info_json",v),u.label=12;case 12:return E&&e.append("source",E,{filename:"source.zip"}),D=(T=d.AxiosInstance).request,B={url:"https://developer.toutiao.com/api/developer/ide/microgame/v1/check",method:"put",data:e,params:{appid:_}},H={},[4,(0,y.getUserCookies)()];case 13:return[4,D.apply(T,[(B.headers=n.apply(void 0,[(H.Cookie=u.sent(),H),e.getHeaders()]),B)])];case 14:if(4===(L=u.sent().data).status){console.error("预检审核失败,失败原因");try{for(x=c(null!==(t=L.data.check_list)&&void 0!==t?t:[]),N=x.next();!N.done;N=x.next())4===(null==(k=N.value)?void 0:k.status)&&console.error("error: ",null==k?void 0:k.message),3===(null==k?void 0:k.status)&&console.info("warning: ",null==k?void 0:k.message)}catch(e){V={error:e}}finally{try{N&&!N.done&&(Z=x.return)&&Z.call(x)}finally{if(V)throw V.error}}return null==A||A(null!==(r=null==L?void 0:L.is_game_migrate)&&void 0!==r&&r),null==m||m({upload:1,check:L.data.check_list?L.status:2,compile:1}),null==g||g({status:L.data.check_list?L.status:2,result:null!==(o=L.data.check_list)&&void 0!==o?o:[]}),[2,!1]}if(3===L.status)try{for(j=c(null!==(i=L.data.check_list)&&void 0!==i?i:[]),M=j.next();!M.done;M=j.next())3===(null==(k=M.value)?void 0:k.status)&&console.info("warning: ",null==k?void 0:k.message)}catch(e){q={error:e}}finally{try{M&&!M.done&&(W=j.return)&&W.call(j)}finally{if(q)throw q.error}}else if(0===L.status)throw new f.UploadError(L.message);return null==A||A(null!==(a=null==L?void 0:L.is_game_migrate)&&void 0!==a&&a),null==m||m({upload:1,check:L.data.check_list?L.status:2,compile:1}),null==g||g({status:L.data.check_list?L.status:2,result:null!==(p=L.data.check_list)&&void 0!==p?p:[]}),[2,!0]}}))}))}function G(e){var t,r,n;return s(this,void 0,void 0,(function(){var o,i,a,s,c,l,p,d,h,v,m,y,S,P,L,T,M,U,G,B,H,V,Z,q,W,z,K,J,$,X,Y,Q;return u(this,(function(u){switch(u.label){case 0:return[4,(0,w.isCliNeedForceUpdate)("microgame")];case 1:return u.sent(),o={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},i=e.project,a=e.page,s=e.qrcode,c=e.cache,l=e.uploadOptions,p=e.extraInfoJson,d=e.localCompileVersion,h=e.ideConfig,v=e.debug,m=e.uploadCache,y=e.supportSourcemap,S=e.enableHotRestartCache,P=e.setCheckResult,L=e.updateStatus,T=e.isNewPlatform,M=i.path,[4,(0,R.getProjectHash)(M,!0).catch((function(){return""}))];case 2:return U=u.sent(),G=l?"upload":"preview",B=!1,V=N[H=v?"debug":"preview"]||x,a&&!a.scene&&(a.scene="990001"),c&&((0,C.isCli)()||(null==h?void 0:h.previewScene)===V.previewScene)&&U&&V.hash===U&&V.shortUrl&&V.expireTime>Date.now()/1e3?(o.shortUrl=V.shortUrl,o.expireTime=V.expireTime,o.originSchema=V.originSchema,o.useCache=!0,b.default.info("项目文件无变动,使用缓存"),B=!0,[3,17]):[3,3];case 3:return(0,A.addNodeToMetrics)(o.metrics,"compileCreate"),[4,(0,C.getProjectConfig)(M)];case 4:return[4,(Z=u.sent()).getAppid()];case 5:return q=u.sent(),[4,(0,g.validateAppId)(q)];case 6:return u.sent(),(0,A.addFieldToMetrics)(o.metrics,"appId",q),W=b.default.loading("正在准备上传..."),m&&U&&V.hash===U&&V.shortUrl&&V.expireTime>Date.now()/1e3?[3,14]:[4,(0,g.verifyPkgSize)(M,Z)];case 7:if(z=u.sent())throw new f.ProjectError(z);return"upload"!==G||(0,C.isIDE)()?[3,9]:[4,(0,I.getMeta)(q)];case 8:if((K=u.sent())&&l&&1===(0,E.default)(K,l.version))throw new f.UploadError(l.version+" is smaller than "+K+"(online version)");u.label=9;case 9:return"upload"!==G?[3,11]:[4,F({appid:q,extraCheckInfoJson:null!==(t=null==l?void 0:l.extraCheckInfoJson)&&void 0!==t?t:"",updateStatus:L,setCheckResult:P,projectPath:M,isNewPlatform:T})];case 10:if(!u.sent()){if((0,C.isCli)())throw new f.UploadError("审核预检失败");return[2]}u.label=11;case 11:return W.text="正在上传中...",(0,A.addNodeToMetrics)(o.metrics,"IDERequest"),[4,j({devAppid:q,projectPath:M,type:G,uploadChangeLog:null==l?void 0:l.changeLog,uploadVersion:null==l?void 0:l.version,uploadNeedUploadSourcemap:null==l?void 0:l.needUploadSourcemap,extraCheckInfoJson:null!==(r=null==l?void 0:l.extraCheckInfoJson)&&void 0!==r?r:"",extraInfoJson:p,localCompileVersion:d,supportSourcemap:y})];case 12:return J=u.sent(),(0,A.addFieldToMetrics)(o.metrics,"logId",J.logId),W.text="查询编译进度中...",[4,k(q)];case 13:$=u.sent(),o.metrics=(0,A.mergeMetrics)(o.metrics,J.metrics,$.metrics),o.passJson=$.passJson,(0,A.addNodeToMetrics)(o.metrics,"IDEReceiveResponse"),u.label=14;case 14:return null===(null==s?void 0:s.format)?[3,16]:(W.text="生成二维码中...",[4,(0,O.makeSchema)({devAppid:q,extAppid:"",startPage:a.path,query:a.query,scene:a.scene,bdpLog:{launch_from:a.launchFrom,location:a.location},headers:{},ideConfig:h,qrcodeQuery:null==v?void 0:v.query,referrerInfo:a.referrerInfo,hotRestartHash:S&&U?U:"",type:G})]);case 15:X=u.sent(),o.shortUrl=X.shortUrl,o.expireTime=X.expireTime,o.originSchema=X.originSchema,u.label=16;case 16:(0,A.addNodeToMetrics)(o.metrics,"compileClose"),W.stop(),u.label=17;case 17:return"imageFile"!==(null==s?void 0:s.format)?[3,20]:s.output?[4,(0,O.toQRCodeFile)(o.shortUrl,s.output)]:[3,19];case 18:Y=u.sent(),o.qrcodeFilePath=Y,b.default.info("二维码图片已存储到 "+Y),u.label=19;case 19:return[3,23];case 20:return"imageSVG"!==(null==s?void 0:s.format)?[3,23]:B&&V.qrcodeSVG?(o.qrcodeSVG=V.qrcodeSVG,[3,23]):[3,21];case 21:return Q=o,[4,(0,O.toQRCodeSVG)(o.shortUrl)];case 22:Q.qrcodeSVG=u.sent(),u.label=23;case 23:return function(e,t){N[t]=e,(0,C.isCli)()&&_.writeJsonSync(D,N)}({shortUrl:o.shortUrl,expireTime:o.expireTime,originSchema:o.originSchema,hash:U,previewScene:null!==(n=null==h?void 0:h.previewScene)&&void 0!==n?n:"default",qrcodeSVG:o.qrcodeSVG},H),[2,o]}}))}))}t.preview=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,G(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t,r;return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,G({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"",launchFrom:"",location:""},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap,extraCheckInfoJson:null!==(r=e.extraCheckInfoJson)&&void 0!==r?r:""},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig,setCheckResult:null==e?void 0:e.setCheckResult,updateStatus:null==e?void 0:e.updateStatus,isNewPlatform:null==e?void 0:e.isNewPlatform})];case 1:return[2,n.sent()]}}))}))},t.projectToQRCode=G},3098:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5787),t),o(r(9396),t),o(r(5834),t),o(r(7838),t)},5834:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getMicroappInfo=t.getMeta=void 0;var a=r(2747),s=r(7992),u=r(2893),c=r(1728),l=i(r(7086));t.getMeta=function(e){return n(void 0,void 0,void 0,(function(){var t,r,n,i,p;return o(this,(function(o){switch(o.label){case 0:return t=(0,u.getConfig)().microgameUrl.versionInfo+e,p={},[4,(0,c.getUserCookies)()];case 1:return p.Cookie=o.sent(),r=p,[4,s.AxiosInstance.get(t,{headers:r})];case 2:return(n=o.sent().data).error&&0!==n.error||n.error&&0!==n.code?[4,Promise.reject(new a.MetaError(n.message))]:[3,4];case 3:return[2,o.sent()];case 4:return[2,(i=[n.audit_version,n.gray_version,n.online_version].filter(Boolean).sort(l.default))[i.length-1]]}}))}))},t.getMicroappInfo=function(e){return n(void 0,void 0,void 0,(function(){var t,r,n,i,a,u,l;return o(this,(function(o){switch(o.label){case 0:return n={},[4,(0,c.getUserCookies)()];case 1:return n.Cookie=o.sent(),t=n,[4,(0,s.AxiosInstance)({url:"https://developer.open-douyin.com/bff_api/app/setting/v2/"+e+"/microappinfoservice/getMicroappInfo",params:{appId:e},headers:t,timeout:2e4})];case 2:return r=o.sent(),[2,null!==(l=null===(u=null===(a=null===(i=r.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.appInfo)||void 0===u?void 0:u.techType)&&void 0!==l?l:null]}}))}))}},7838:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.unityCli=void 0;var s=r(7992),u=a(r(9258)),c=r(1728),l=a(r(9849)),p=a(r(1017)),f=r(5834),d=a(r(7086)),h=a(r(8366)),_=r(2893),v=r(2747),E=r(4486),m=["0","1","2","3","4","5"],g={0:"队列中",1:"任务已被占用,待执行",2:"构建IL2CPP动态库中",3:"IL2CPP动态库构建完成",4:"从TOS下载文件",5:"打包WebGL",6:"Apk分包",7:"上传文件到TOS",8:"修改sc-config meta配置",9:"发布版本到抖音开放平台",99:"环境准备完成,等待执行",100:"发布成功","-1":"发布失败","-2":"IL2CPP动态库构建失败","-4":"TOS文件下载失败","-5":"打包WebGL失败","-6":"Apk分包","-7":"上传文件到TOS失败","-8":"修改sc-config meta配置失败","-9":"发布版本到抖音开放平台失败","-99":"环境准备失败","-100":"发布超时",uploadError:"",uploadFailed:"发布失败",defaultText:"任务准备中"},y=function(e){return o(void 0,void 0,void 0,(function(){var t,r,o;return i(this,(function(i){switch(i.label){case 0:return[4,l.default.readJSON(p.default.join(e,"project.config.json"))];case 1:if(!(t=i.sent()).unity)throw new Error("project.config.json 中没有 unity 字段");return[2,n({appid:null!==(r=null==t?void 0:t.appid)&&void 0!==r?r:""},null!==(o=null==t?void 0:t.unity)&&void 0!==o?o:{})]}}))}))},b=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,l.default.readJSON(p.default.join(e,"game.json"))];case 1:return[2,t.sent()]}}))}))},A=function(e){var t=e.projectPath,r=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,n,o,a,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),(e=(0,c.getUserId)())||r?[4,y(t)]:(console.info("请先登录"),[2]);case 1:return n=i.sent(),o=n.appid,[4,s.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/make_qrcode",method:"post",data:JSON.stringify({uid:null!=r?r:parseInt(e),appid:o,version_type:"latest"}),headers:{"content-type":"application/json"},responseType:"arraybuffer"})];case 2:return a=i.sent(),[2,"data:image/png;base64,"+Buffer.from(a.data).toString("base64")];case 3:return u=i.sent(),console.info("【Error】:",u),[2,null];case 4:return[2]}}))}))},O=function(e){var t=e.type,r=e.appid,n=e.uid;return o(void 0,void 0,void 0,(function(){var e,o,a,u,c;return i(this,(function(i){switch(i.label){case 0:e=3,i.label=1;case 1:if(!(e>0))return[3,6];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://starkgame.zijieapi.com/api/stark_publish/get_version",{params:{uid:n,appid:r,version_type:t}})];case 3:return o=i.sent(),[2,null!==(c=null===(u=null===(a=o.data)||void 0===a?void 0:a.result)||void 0===u?void 0:u[t])&&void 0!==c?c:{ctime:"",version:""}];case 4:return i.sent(),e--,[3,5];case 5:return[3,1];case 6:return[2,{ctime:"",version:""}]}}))}))},w=function(e){var t=e.projectPath,r=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,n,o;return i(this,(function(i){switch(i.label){case 0:return(e=(0,c.getUserId)())||r?[4,y(t)]:(console.info("请先登录"),[2]);case 1:return n=i.sent(),o=n.appid,[4,O({uid:null!=r?r:parseInt(e),appid:o,type:"latest"})];case 2:return[2,i.sent()]}}))}))},C=function(e){var t=e.projectPath,r=e.version,a=e.publishDesc,p=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,o,f,d,h,_,v,E,g,A,O,w;return i(this,(function(i){switch(i.label){case 0:return(e=(0,c.getUserId)())||p?[4,y(t)]:(console.info("请先登录"),[2]);case 1:return o=i.sent(),f=o.appid,d=o.publishType,h=o.unityEngineVersion,[4,b(t)];case 2:return _=i.sent(),[4,P(f)];case 3:if(!i.sent())throw new Error("appid: "+f+"为非unity小游戏");if(!h)throw new Error("unityEngineVersion为必填字段,请修改project.config.json后重试");switch((v=new u.default).append("uid",null!=p?p:parseInt(e)),v.append("app_id",f),v.append("version",r),v.append("publish_type",d),v.append("unity_engine_version",h),v.append("publish_desc",null!=a?a:""),v.append("orientation","portrait"===_.deviceOrientation?"0":"1"),v.append("menu_btn_style","light"===_.menuButtonStyle?"1":"0"),""+d){case"0":E=l.default.createReadStream(o.build.native.il2cpp),v.append("il2cpp_source_file",E,{filename:"il2cpp_source_file.zip"}),g=l.default.createReadStream(o.build.native.apk),v.append("apk_file",g,{filename:"apk_file.apk"});break;case"1":w=l.default.createReadStream(o.build.webgl),v.append("webgl_file",w,{filename:"webgl_file.zip"}),E=l.default.createReadStream(o.build.native.il2cpp),v.append("il2cpp_source_file",E,{filename:"il2cpp_source_file.zip"}),g=l.default.createReadStream(o.build.native.apk),v.append("apk_file",g,{filename:"apk_file.apk"});break;case"2":case"3":A=l.default.createReadStream(o.build.webgl),v.append("webgl_file",A,{filename:"webgl_file.zip"});break;case"4":O=l.default.createReadStream(o.build.instantGame),v.append("ig_file",O,{filename:"ig_file.json"});break;case"5":O=l.default.createReadStream(o.build.instantGame),v.append("ig_file",O,{filename:"ig_file.json"}),w=l.default.createReadStream(o.build.webgl),v.append("webgl_file",w,{filename:"webgl_file.zip"});break;default:throw new Error("Publish type must be in ["+m.join(",")+"]")}return[4,s.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/submit",method:"post",data:v,headers:n({},v.getHeaders()),timeout:18e5})];case 4:return[2,i.sent().data]}}))}))},S=function(e){var t=e.projectPath,r=e.version,n=e.updateStatus,a=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,u,l,p,f;return i(this,(function(d){switch(d.label){case 0:return(e=(0,c.getUserId)())||a?[4,y(t)]:(console.info("请先登录"),[2]);case 1:return u=d.sent(),l=u.appid,p=function(){return s.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/query",method:"post",data:JSON.stringify({uid:""+(null!=a?a:e),app_id:l,version:r}),headers:{"Content-Type":"application/json"}})},f=function(){return new Promise((function(e){var t=setInterval((function(){return o(void 0,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:return[4,p()];case 1:return r=o.sent(),null==n||n(r.data.result.status),100===r.data.result.status?(clearInterval(t),e(!0)):0===r.data.result.status||(""+r.data.result.status).startsWith("-")&&(clearInterval(t),e(!1),console.info("发布失败")),[2]}}))}))}),1e3)}))},[4,f()];case 2:return d.sent(),[2]}}))}))},I=function(e){var t=e.projectPath,r=e.version,n=e.publishDesc,a=e.updateStatus,s=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,C({projectPath:t,version:r,publishDesc:n,ideUid:s})];case 1:return 0!==(null==(e=i.sent())?void 0:e.code)?(g.uploadError=null!==(u=e.message)&&void 0!==u?u:"",a("uploadError"),[2]):[3,3];case 2:return o=i.sent(),g.uploadError=null!==(c=o.message)&&void 0!==c?c:"发布失败",a("uploadError"),[2];case 3:return[4,S({projectPath:t,version:r,updateStatus:a,ideUid:s})];case 4:return i.sent(),[2]}}))}))},P=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return[4,(0,f.getMicroappInfo)(e)];case 1:return 7===(t=r.sent())?[2,!0]:null===t?[2,null]:[2,!1]}}))}))},R=function(e){return o(void 0,void 0,void 0,(function(){var t,r,n,o,a,s,u,c,l,p,f,d;return i(this,(function(i){switch(i.label){case 0:if(!e)throw new Error("unityConfig is empty");switch(t=e.publishType,r=e.build,""+t){case"0":return[3,1];case"1":return[3,4];case"2":case"3":return[3,8];case"4":return[3,10];case"5":return[3,12]}return[3,15];case 1:return T(null!==(o=null===(n=null==r?void 0:r.native)||void 0===n?void 0:n.apk)&&void 0!==o?o:""),[4,L(null===(a=null==r?void 0:r.native)||void 0===a?void 0:a.il2cpp,"il2cpp产物文件不存在")];case 2:return i.sent(),[4,L(null===(s=null==r?void 0:r.native)||void 0===s?void 0:s.apk,"apk产物文件不存在")];case 3:case 7:case 9:case 11:case 14:return i.sent(),[3,16];case 4:return T(null!==(c=null===(u=null==r?void 0:r.native)||void 0===u?void 0:u.apk)&&void 0!==c?c:""),[4,L(null===(l=null==r?void 0:r.native)||void 0===l?void 0:l.il2cpp,"il2cpp产物文件不存在")];case 5:return i.sent(),[4,L(null===(p=null==r?void 0:r.native)||void 0===p?void 0:p.apk,"apk产物文件不存在")];case 6:case 13:return i.sent(),[4,L(null==r?void 0:r.webgl,"webgl产物文件不存在")];case 8:return[4,L(null==r?void 0:r.webgl,"webgl产物文件不存在")];case 10:return D(null!==(f=null==r?void 0:r.instantGame)&&void 0!==f?f:""),[4,L(null==r?void 0:r.instantGame,"instant game产物文件不存在")];case 12:return D(null!==(d=null==r?void 0:r.instantGame)&&void 0!==d?d:""),[4,L(null==r?void 0:r.instantGame,"instant game产物文件不存在")];case 15:throw new Error("Publish type must be in ["+m.join(",")+"]");case 16:return[2]}}))}))},L=function(e,t){return o(void 0,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,l.default.pathExists(null!=e?e:"")];case 1:if(!r.sent())throw new Error(null!=t?t:"文件不存在");return[2,!0]}}))}))},T=function(e){if(".apk"!==p.default.extname(e))throw new Error("请上传apk文件")},D=function(e){if(".json"!==p.default.extname(e))throw new Error("请上传json文件")},x=function(e,t){return-1===(0,d.default)(e,t)},N=function(e){var t=e.appId,r=e.compileId;return o(void 0,void 0,void 0,(function(){var e,n,a;return i(this,(function(u){switch(u.label){case 0:return e=(0,_.getConfig)(),n=function(){return o(void 0,void 0,void 0,(function(){var n,o,a,u;return i(this,(function(i){switch(i.label){case 0:return o=(n=s.AxiosInstance).request,a={url:e.microgameUrl.unityCompileProgress,method:"get",params:{appid:t,compile_id:r}},u={},[4,(0,c.getUserCookies)()];case 1:return[4,o.apply(n,[(a.headers=(u.Cookie=i.sent(),u),a)])];case 2:return[2,i.sent()]}}))}))},a=function(){return new Promise((function(e,t){var r=setInterval((function(){return o(void 0,void 0,void 0,(function(){var o,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,n()];case 1:switch((o=i.sent()).data.compile_status){case 2:break;case 3:clearInterval(r),e(o.data.ctime);break;default:clearInterval(r),console.info("发布失败:",o.data.failed_msg),t(o.data.message||o.data.failed_msg||"发布失败")}return[3,3];case 2:return a=i.sent(),clearInterval(r),console.info("发布失败:",a.message),t(a.message),[3,3];case 3:return[2]}}))}))}),1e3)}))},[4,a()];case 1:return[2,u.sent()]}}))}))},j=function(e){var t=e.appId,r=e.ideConfig,a=e.ctime;return o(void 0,void 0,void 0,(function(){var e,o,u,l,p,f;return i(this,(function(i){switch(i.label){case 0:return e=(0,_.getConfig)(),o={ide_version:null==r?void 0:r.ideVersion,ide_os:null==r?void 0:r.ideOS,ide_device_id:null==r?void 0:r.ideDid,ide_user_id:null==r?void 0:r.ideUid,iOS_debug_version:+(null==r?void 0:r.iOSDebugVersion),connect_type:null==r?void 0:r.connectType,local_debug:String(null==r?void 0:r.localDebug),extra_info:null!==(f=null==r?void 0:r.extraInfo)&&void 0!==f?f:{},performance_test:!1},u={start_page:"",query:"",scene:"990001",bdp_log:"",penetrate_map_json:JSON.stringify({referer_info:"",ide_inspect_version:6,ide_live_debug:!1,ide_config:o}),ctime:""+a},[4,(0,c.getLogInfoHeaders)(t)];case 1:return l=i.sent(),[4,s.AxiosInstance.request({url:e.microgameUrl.makeSchema,method:"post",data:{app_id:t,stage:"preview",devappid:"",schema_params:u},headers:n({},l)})];case 2:if(p=i.sent().data,console.info("make schema response: ",p),0!==p.code)throw new v.UploadError(p.msg);return[2,p]}}))}))},M=function(e){var t=e.projectPath,r=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,a,p,f,d,E,m,g,A,O,w,C,S;return i(this,(function(I){switch(I.label){case 0:return[4,y(t)];case 1:return e=I.sent(),a=e.appid,p=e.publishType,f=e.unityEngineVersion,d=e.build,[4,b(t)];case 2:E=I.sent(),m=h.default.loading("正在准备上传..."),I.label=3;case 3:return I.trys.push([3,8,9,10]),[4,(P={appId:a,apkSource:null!==(S=null===(C=d.native)||void 0===C?void 0:C.fullApk)&&void 0!==S?S:"",webGLSource:d.webgl,igSource:d.instantGame,isDebug:0,publishType:p,unityEngineVersion:f,menuBtnStyle:E.menuButtonStyle,orientation:"portrait"===E.deviceOrientation?0:1},o(void 0,void 0,void 0,(function(){var e,t,r,o,a,p,f,d,h,v,E,m,g,y,b,A,O;return i(this,(function(i){switch(i.label){case 0:switch(e=(0,_.getConfig)(),t=P.appId,r=P.apkSource,o=P.webGLSource,a=P.igSource,p=P.isDebug,f=P.publishType,d=P.unityEngineVersion,h=P.menuBtnStyle,v=P.orientation,(E=new u.default).append("publish_type",parseInt(f)),E.append("is_debug",p),E.append("unity_engine_version",d),E.append("menu_btn_style","light"===h?1:0),E.append("orientation",v),f){case"0":E.append("apk_source",l.default.createReadStream(r),{filename:"source.apk"}),E.append("web_gl_source",Buffer.from(""),{filename:"webgl.zip"}),E.append("ig_source",Buffer.from(""),{filename:"ig.json"});break;case"1":E.append("apk_source",l.default.createReadStream(r),{filename:"source.apk"}),E.append("web_gl_source",l.default.createReadStream(o),{filename:"webgl.zip"}),E.append("ig_source",Buffer.from(""),{filename:"ig.json"});break;case"2":case"3":E.append("apk_source",Buffer.from(""),{filename:"source.apk"}),E.append("web_gl_source",l.default.createReadStream(o),{filename:"webgl.zip"}),E.append("ig_source",Buffer.from(""),{filename:"ig.json"});break;case"4":E.append("apk_source",Buffer.from(""),{filename:"source.apk"}),E.append("web_gl_source",Buffer.from(""),{filename:"webgl.zip"}),E.append("ig_source",l.default.createReadStream(a),{filename:"ig.json"});break;case"5":E.append("apk_source",Buffer.from(""),{filename:"source.apk"}),E.append("ig_source",l.default.createReadStream(a),{filename:"ig.json"}),E.append("web_gl_source",l.default.createReadStream(o),{filename:"web_gl_source.zip"});break;default:throw Error("publishType error")}return y=(g=s.AxiosInstance).put,b=[e.microgameUrl.unityPreview,E],A={params:{appid:t}},O={},[4,(0,c.getUserCookies)()];case 1:return[4,y.apply(g,b.concat([(A.headers=n.apply(void 0,[(O.Cookie=i.sent(),O),E.getHeaders()]),A)]))];case 2:if(!(m=i.sent().data).CompileId||0!==m.error)throw new Error(m.message);return[2,m.CompileId]}}))})))];case 4:return g=I.sent(),m.text="查询编译进度中...",[4,N({compileId:g,appId:a})];case 5:return A=I.sent(),O=(0,c.getUserId)(),A?[4,j({appId:a,ctime:A,ideConfig:{ideUid:null!=O?O:r}})]:[3,7];case 6:return[2,I.sent()];case 7:return[3,10];case 8:throw w=I.sent(),new v.UploadError(w.message||w);case 9:return m.stop(),[7];case 10:return[2]}var P}))}))},k=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,l.default.readFile(e)];case 1:return[2,t.sent().includes("il2cpp.so")];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))};t.unityCli={getVersions:function(e){var t=e.projectPath,r=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,n,o,a,s,u;return i(this,(function(i){switch(i.label){case 0:return(e=(0,c.getUserId)())||r?[4,y(t)]:(console.info("请先登录"),[2]);case 1:n=i.sent(),o=n.appid,a={},i.label=2;case 2:return i.trys.push([2,4,,5]),[4,O({uid:null!=r?r:parseInt(e),appid:o,type:"current"})];case 3:return s=i.sent(),Object.assign(a,{current:s}),[3,5];case 4:return i.sent(),[3,5];case 5:return i.trys.push([5,7,,8]),[4,O({uid:null!=r?r:parseInt(e),appid:o,type:"latest"})];case 6:return u=i.sent(),Object.assign(a,{latest:u}),[3,8];case 7:return i.sent(),[3,8];case 8:return[2,a]}}))}))},getLatestVersion:w,testQrcode:A,upload:C,queryProgress:S,uploadAndQueryProgress:I,validateFiles:R,validateAppId:P,validateVersion:x,PROGRESS:g,isUnity:function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,y(e)];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))},unityUpload:function(e){return o(void 0,void 0,void 0,(function(){var t,r,n,o,a,s,u,c,f,d,_,v;return i(this,(function(i){switch(i.label){case 0:return t=e.projectPath,r=e.version,n=e.publishType,o=e.deviceOrientation,n?[4,l.default.readJSON(p.default.join(t,"project.config.json"))]:[3,3];case 1:return(null==(a=i.sent())?void 0:a.unity)?(a.unity.publishType=n,[4,l.default.writeJSON(p.default.join(t,"project.config.json"),a)]):[3,3];case 2:i.sent(),i.label=3;case 3:return o?[4,l.default.readJSON(p.default.join(t,"game.json"))]:[3,6];case 4:return(null==(s=i.sent())?void 0:s.deviceOrientation)?(s.deviceOrientation=o,[4,l.default.writeJSON(p.default.join(t,"game.json"),s)]):[3,6];case 5:i.sent(),i.label=6;case 6:return[4,y(t)];case 7:return u=i.sent(),[4,R(u)];case 8:return i.sent(),[4,P(u.appid)];case 9:if(null===(c=i.sent()))throw new Error("无此游戏 "+u.appid+" 权限");if(!c)throw new Error("appid: "+u.appid+"为非unity小游戏");return[4,w({projectPath:t})];case 10:if(f=i.sent(),!x(f.version,r))throw new Error("版本号必须大于最新版本号"+f.version);return[4,I(e)];case 11:return i.sent(),e.output?[4,A({projectPath:t})]:[3,14];case 12:return d=i.sent(),_=d.replace(/^data:image\/\w+;base64,/,""),v=Buffer.from(_,"base64"),[4,l.default.writeFile(e.output,v)];case 13:i.sent(),h.default.info("\n测试二维码图片保存成功:",e.output),i.label=14;case 14:return[2]}}))}))},preview:M,makeSchema:j,previewForCli:function(e){var t=e.projectPath,r=e.output;return o(void 0,void 0,void 0,(function(){var e,n,a,s,u;return i(this,(function(c){switch(c.label){case 0:return[4,y(t)];case 1:return e=c.sent(),[4,P(e.appid)];case 2:if(null===(n=c.sent()))throw new Error("无此游戏"+e.appid+"权限");if(!n)throw new Error("appid: "+e.appid+"为非unity小游戏");return[4,(l=e,o(void 0,void 0,void 0,(function(){var e,t,r,n,o,a,s,u,c,p,f,d,h,_;return i(this,(function(i){switch(i.label){case 0:if(!l)throw new Error("unityConfig is empty");switch(e=l.publishType,t=l.build,""+e){case"0":return[3,1];case"1":return[3,4];case"2":case"3":return[3,8];case"4":return[3,10];case"5":return[3,12]}return[3,15];case 1:return[4,k(null!==(n=null===(r=null==t?void 0:t.native)||void 0===r?void 0:r.fullApk)&&void 0!==n?n:"")];case 2:if(!i.sent())throw new Error("请使用 SC Stark Tool 构建预览时需要的完整APK文件,详情请查看:https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/developer-instrument/development-assistance/unity-game-preview");return T(null!==(a=null===(o=null==t?void 0:t.native)||void 0===o?void 0:o.fullApk)&&void 0!==a?a:""),[4,L(null===(s=null==t?void 0:t.native)||void 0===s?void 0:s.fullApk,"apk产物文件不存在")];case 3:case 7:case 9:case 11:case 14:return i.sent(),[3,16];case 4:return[4,k(null!==(c=null===(u=null==t?void 0:t.native)||void 0===u?void 0:u.fullApk)&&void 0!==c?c:"")];case 5:if(!i.sent())throw new Error("请使用 SC Stark Tool 构建预览时需要的完整APK文件,详情请查看:https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/developer-instrument/development-assistance/unity-game-preview");return[4,L(null===(p=null==t?void 0:t.native)||void 0===p?void 0:p.fullApk,"apk产物文件不存在")];case 6:return i.sent(),T(null!==(d=null===(f=null==t?void 0:t.native)||void 0===f?void 0:f.fullApk)&&void 0!==d?d:""),[4,L(null==t?void 0:t.webgl,"webgl产物文件不存在")];case 8:return[4,L(null==t?void 0:t.webgl,"webgl产物文件不存在")];case 10:return D(null!==(h=null==t?void 0:t.instantGame)&&void 0!==h?h:""),[4,L(null==t?void 0:t.instantGame,"instant game产物文件不存在")];case 12:return D(null!==(_=null==t?void 0:t.instantGame)&&void 0!==_?_:""),[4,L(null==t?void 0:t.instantGame,"instant game产物文件不存在")];case 13:return i.sent(),[4,L(null==t?void 0:t.webgl,"webgl产物文件不存在")];case 15:throw new Error("Publish type must be in ["+m.join(",")+"]");case 16:return[2]}}))})))];case 3:return c.sent(),[4,M({projectPath:t})];case 4:return a=c.sent(),r?[4,(0,E.toQRCodeFile)(null!==(u=null===(s=null==a?void 0:a.data)||void 0===s?void 0:s.short_url)&&void 0!==u?u:"",r)]:[3,6];case 5:c.sent(),c.label=6;case 6:return[2,null==a?void 0:a.data]}var l}))}))}}},155:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getPathByteSize=t.getDirByteSize=t.getFileByteSize=t.byte2Mb=t.mb2Byte=void 0;var a=i(r(7147)),s=i(r(9508)),u=r(9086),c=r(1017);t.mb2Byte=function(e){return 1024*e*1024},t.byte2Mb=function(e,t){return void 0===t&&(t=4),Number((e/1024/1024).toFixed(t))},t.getFileByteSize=function(e,t){return(0,u.filterFile)((0,c.relative)(t.projectPath,e),t.getPackOptions())?0:a.default.statSync(e).size},t.getDirByteSize=function(e,r,i,a){return void 0===r&&(r=[]),void 0===i&&(i=[]),n(void 0,void 0,void 0,(function(){var n;return o(this,(function(o){switch(o.label){case 0:return[4,(0,s.default)(i,{cwd:e,ignore:r,absolute:!0,dot:!0})];case 1:return n=o.sent(),[4,Promise.all(n.map((function(e){return(0,t.getFileByteSize)(e,a)})))];case 2:return[2,o.sent().reduce((function(e,t){return e+t}),0)]}}))}))},t.getPathByteSize=function(e,r,n,o){return void 0===r&&(r=[]),void 0===n&&(n=["**"]),a.default.statSync(e).isDirectory()?(0,t.getDirByteSize)(e,r,n,o):(0,t.getFileByteSize)(e,o)}},9396:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateAppId=t.getAppId=t.checkAppId=t.checkUCAppId=t.compressZip=t.getDirHash=t.verifyPkgSize=t.getSizeLimitConfig=t.PKG_HASH_IGNORE_LIST=t.PKG_SIZE_IGNORE_GLOBS=void 0;var c=u(r(3732)),l=r(2896),p=u(r(9849)),f=u(r(1017)),d=r(2747),h=r(155),_=r(3077),v=r(9882),E=r(7992),m=r(1728),g=r(2893);t.PKG_SIZE_IGNORE_GLOBS=["**/.*","**/.*/**/*","**/node_modules/**","**/**.js.map"],t.PKG_HASH_IGNORE_LIST=[".*","node_modules"],t.getSizeLimitConfig=function(e){return o(void 0,void 0,void 0,(function(){var t,r,o,a,s,u,c;return i(this,(function(i){switch(i.label){case 0:return t={normalTotal:16,subMain:4,subPkg:20,subTotal:20,openData:4},a=(o=E.AxiosInstance).get,s=[""+(0,g.getConfig)().microgameUrl.sizeLimit+e],u={},c={},[4,(0,m.getUserCookies)()];case 1:return[4,a.apply(o,s.concat([(u.headers=(c.Cookie=i.sent(),c),u)]))];case 2:if(0!==(r=i.sent().data).err_no)throw new Error(null==r?void 0:r.err_msg);return[2,n(n({},t),r.limit)]}}))}))};var y=function(e,t,r){return e+"大小为:"+t+"MB,超过 "+r+"MB。"};t.verifyPkgSize=function(e,r){return o(void 0,void 0,void 0,(function(){var n,o,s,u,c,l,d,_,E,m,g,b,A,O,w,C,S;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),[4,p.default.readJson(f.default.join(e,"game.json"))];case 1:return n=i.sent(),o=n.openDataContext,s=null!==(S=n.subPackages)&&void 0!==S?S:n.subpackages,[4,(0,t.getAppId)(e)];case 2:return u=i.sent(),[4,(0,t.getSizeLimitConfig)(u)];case 3:return c=i.sent(),l=[],o?[4,(0,h.getPathByteSize)(f.default.join(e,o),t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0),r)]:[3,5];case 4:return _=i.sent(),[3,6];case 5:_=0,i.label=6;case 6:return(d=_)>(0,h.mb2Byte)(c.openData)&&l.push(y("小游戏开放数据域文件",(0,h.byte2Mb)(d),c.openData)),E=!(null==s?void 0:s.length),m=E?c.normalTotal:c.subTotal,[4,(0,h.getPathByteSize)(e,t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0),r)];case 7:return(g=i.sent())>(0,h.mb2Byte)(m)&&l.push(y("小游戏包",(0,h.byte2Mb)(g),m)),E?[2,l.length?l.join("\n")+"\n请调整包大小再进行上传":""]:[4,Promise.all(s.map((function(n){var o=f.default.join(e,n.root);return(0,h.getPathByteSize)(o,t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0),r)})))];case 8:return b=i.sent(),A=b.map((function(e,t){return[s[t],e]})).filter((function(e){var t=a(e,2);return t[0],t[1]>(0,h.mb2Byte)(c.subPkg)})),A.length>0&&l.push(A.map((function(e){return a(e,1)[0].name})).join("、")+" 子包大小为:"+A.map((function(e){var t=a(e,2),r=(t[0],t[1]);return(0,h.byte2Mb)(r)+"MB"})).join("、")+",超过 "+c.subPkg+"MB。"),O=b.reduce((function(e,t){return e+t}),0),(w=g-d-O)>(0,h.mb2Byte)(c.subMain)&&l.push(y("小游戏分包主包",(0,h.byte2Mb)(w),c.subMain)),[2,l.length?l.join("\n")+"\n请调整包大小再进行上传":""];case 9:return[2,(C=i.sent())instanceof Error?C.message:String(C)];case 10:return[2]}}))}))},t.getDirHash=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,(0,l.hashElement)(e,{encoding:"hex",folders:{exclude:t.PKG_HASH_IGNORE_LIST}})];case 1:return[2,r.sent().hash]}}))}))},t.compressZip=function(e,r,n){return void 0===n&&(n=[]),new Promise((function(u,l){return o(this,void 0,void 0,(function(){var o,d,h;return i(this,(function(i){switch(i.label){case 0:return o=f.default.resolve(r,f.default.basename(e)+".zip"),d=p.default.createWriteStream(o),h=(0,c.default)("zip",{zlib:{level:9}}),d.on("close",(function(){return u(o)})),h.on("error",(function(e){return console.error("压缩失败:",e),l(e)})),h.pipe(d),h.glob("**/*",{cwd:e,ignore:s(s([],a(t.PKG_SIZE_IGNORE_GLOBS),!1),a(n),!1)},{}),[4,h.finalize()];case 1:return i.sent(),[2]}}))}))}))},t.checkUCAppId=function(e){return/^tt[0-9a-f]{16}(07)$/.test(e)},t.checkAppId=function(e){return/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e)},t.getAppId=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return[4,p.default.readJson(f.default.join(e,"project.config.json"))];case 1:return"testappid"===(t=r.sent()).appid.toLocaleLowerCase()?[2,"tt975be1e608633d4202"]:[2,t.appid]}}))}))},t.validateAppId=function(e){return o(void 0,void 0,void 0,(function(){var r,n;return i(this,(function(o){switch(o.label){case 0:if((0,t.checkUCAppId)(e))throw r="当前小游戏 AppId 为 "+e+",为Unity&UE小游戏 AppId, 不支持该类型小游戏",new d.ProjectError(r);if(!(0,t.checkAppId)(e))throw new d.ProjectError("请使用正确的 AppId");return[4,(0,_.fetchMeta)({appid:e})];case 1:if((n=o.sent().data)&&2!==n.tech_type)throw new d.ProjectError("请使用小游戏的 AppId");return[2]}}))}))}},8733:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t},__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildNpm=void 0;var fs_extra_1=__webpack_require__(9849),path=__importStar(__webpack_require__(1017));function buildNpm(options){return __awaiter(this,void 0,void 0,(function(){var cwd,_a,projectPath,buildNpm,_this=this;return __generator(this,(function(_b){switch(_b.label){case 0:return cwd=process.cwd(),_a=options.projectPath,projectPath=void 0===_a?cwd:_a,path.isAbsolute(projectPath)||(projectPath=path.resolve(cwd,projectPath)),[4,Promise.all([(0,fs_extra_1.access)(path.resolve(projectPath,"package.json")),(0,fs_extra_1.access)(path.resolve(projectPath,"node_modules"))])];case 1:return _b.sent(),buildNpm=eval("require")("@tt-miniprogram/ext-pack").buildNpm,[4,new Promise((function(e){return __awaiter(_this,void 0,void 0,(function(){var t,r,n;return __generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,buildNpm({projectPath})];case 1:return"success"===(t=o.sent()).result?e({success:!0,reason:t.message.title}):e({success:!1,reason:t.message.content}),[3,3];case 2:return r=o.sent(),e({success:!1,reason:null!==(n=r.message)&&void 0!==n?n:"执行构建 NPM 脚本失败"}),[3,3];case 3:return[2]}}))}))}))];case 2:return[2,_b.sent()]}}))}))}exports.buildNpm=buildNpm},7239:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(r(2081)),u=i(r(9849)),c=i(r(1017)),l=r(8066),p=r(2696),f=a(r(8366)),d=r(4263),h=l.CliMonitor.getInstance({cliVersion:"2.0.10",cliName:"tt-minigame-ide-cli"});t.default=function(e,t){var r=e.projectPath,n=e.mode,o=e.type;c.isAbsolute(r)||(r=c.join(process.cwd(),r));var i=!1;try{u.accessSync(r),i=!0}catch(e){f.default.error('The "projectPath" not exist. [path=%s]',r)}var a=(0,d.isMac)()?"open":"start";t&&(a="export BYTEDANCE_IDE_REMOTE_PORT="+t+" && "+a);var _="";i?(f.default.info("Open project. [path=%s]",r),_+="path="+r+"&project-type="+o,"full"!==n&&"lite"!==n||(f.default.info("mode=%s",n),_+="&mode="+n)):f.default.info("Open IDE");var v=a+" "+p.IDE_SCHEMA+"?"+encodeURIComponent(_);return new Promise((function(e,t){s.exec(v,(function(r){r?(f.default.error("Open IDE failed. [err=%o]",r),t(r)):(f.default.info("Open IDE success"),"lite"===n&&h.report(l.CLI_EVENTS.IDE_LITE_MODE_ENTER,{from:"cli"}),e())}))}))}},7312:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},c=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.prettyProjectSize=t.folderToZipStream=t.verifySubPackageSize=t.getProjectSize=t.getFolderSize=void 0;var p=r(2747),f=r(4415),d=l(r(3732)),h=l(r(6883)),_=l(r(9508)),v=i(r(1017)),E=r(4263),m=l(r(9849)),g=r(9882),y=r(9086),b=r(4851);function A(e){var t=e.folderPath,r=e.useTypeScript,n=e.options,o=void 0===n?{}:n,i=e.isGame,l=e.gameFiles,f=e.rootPath,d=e.packOptions;return a(this,void 0,void 0,(function(){var e,n,a,h,b,A,O,w,C,S,I;return s(this,(function(s){switch(s.label){case 0:e=o.ignore,n=void 0===e?[]:e,s.label=1;case 1:return s.trys.push([1,6,,7]),[4,m.default.lstat(t)];case 2:if((a=s.sent().isFile())&&!t.endsWith(".js"))throw new Error("subPackage root should be a valid js or a directory");return h=a?v.resolve(t,"../"):t,b=_.default.convertPathToPattern(h),A=_.default.convertPathToPattern(t),[4,(0,_.default)(a?A:(0,g.getWhiteList)(i),{cwd:b,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(n.map((function(e){return(0,E.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})];case 3:return O=s.sent(),(null==l?void 0:l.length)>0?(l=l.filter(E.isGameFileValid),[4,(0,_.default)(l,{cwd:b,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(n.map((function(e){return(0,E.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})]):[3,5];case 4:w=(w=s.sent()).filter((function(e){return g.ALLOWED_MICROGAME_EXTS_REG.test(e.path)&&e.path.startsWith(b)})),O.push.apply(O,c([],u(w),!1)),s.label=5;case 5:return C=new Map,O.forEach((function(e){C.set(e.path,e)})),S=0,C.forEach((function(e,t){(0,y.filterFile)(v.relative(f,t),d)||!r&&t.endsWith(".ts")||r&&t.endsWith(".js")&&C.has(t.replace(/\.js$/,".ts"))||(S+=e.stats?e.stats.size:0)})),[2,S];case 6:throw I=s.sent(),new p.ProjectError(I.toString());case 7:return[2]}}))}))}function O(e,t){return void 0===t&&(t=!1),a(this,void 0,void 0,(function(){var r,n,o,i,u,c,l,p,d,h,_,g,y,b=this;return s(this,(function(O){switch(O.label){case 0:return v.isAbsolute(e)||(e=v.join(process.cwd(),e)),[4,(0,E.getProjectConfig)(e)];case 1:return[4,(r=O.sent()).getAppJSON()];case 2:return n=O.sent().rawJSON,o={main:void 0,sub:[],openData:void 0,total:0},i=0,u=t?e:v.join(e,r.getMiniprogramRoot()),c=n.subPackages||n.subpackages||[],l=r.useTypeScript(),p=Array.isArray(n.gameFiles)?n.gameFiles:[],d=r.getPackOptions(),[4,A({folderPath:u,useTypeScript:l,options:{ignore:c.map((function(e){var t=v.join(u,e.root);return m.default.lstatSync(t).isFile()?t:v.join(t,"**")}))},isGame:t,gameFiles:p,rootPath:e,packOptions:d})];case 3:return h=O.sent(),Array.isArray(c)&&c.length>0?(_=c.reduce((function(e,t){return!t.root||e.includes(t.root)||e.push(t.root),e}),[]),[4,Promise.all(_.map((function(e){return a(b,void 0,void 0,(function(){var r;return s(this,(function(n){switch(n.label){case 0:return[4,A({folderPath:v.join(u,e),useTypeScript:l,options:{},isGame:t,packOptions:d,rootPath:u})];case 1:return r=n.sent(),[2,{path:(0,f.ensureEndSlash)(e),size:r}]}}))}))})))]):[3,5];case 4:g=O.sent(),i+=g.reduce((function(e,t){return e+t.size}),0),o.sub=g,O.label=5;case 5:return t&&n.openDataContext?[4,A({folderPath:v.join(u,n.openDataContext),useTypeScript:l,options:{},isGame:t,rootPath:u,packOptions:d})]:[3,7];case 6:y=O.sent(),o.openData={path:(0,f.ensureEndSlash)(n.openDataContext),size:y},i+=y,h-=y,O.label=7;case 7:return o.total=i+h,o.main={path:u,size:h},[2,o]}}))}))}t.getFolderSize=A,t.getProjectSize=O,t.verifySubPackageSize=function(e,t){return a(this,void 0,void 0,(function(){var r,n,o,i,a,u,c,l,d,h;return s(this,(function(s){switch(s.label){case 0:return[4,e.getAppJSON()];case 1:r=s.sent(),n=r.isGame,o=e.projectPath,i={mainMax:4194304,subMax:2097152,totalMax:16777216},"preview"===t&&e.getBigPackageSizeSupport()&&(i.mainMax=8388608,i.subMax=4194304,i.totalMax=25165824),n&&(i.mainMax=1/0,i.subMax=1/0,i.totalMax=20971520),a=[],s.label=2;case 2:return s.trys.push([2,4,,7]),[4,O(o,n)];case 3:return u=s.sent(),[3,7];case 4:return c=s.sent(),console.error("获取包体积失败",c),[4,(0,E.sleep)(1e3)];case 5:return s.sent(),[4,O(o,n)];case 6:return u=s.sent(),[3,7];case 7:if(!u)throw Error("获取包体积失败");if(u.total>i.totalMax&&a.push("项目源码包大小 "+(0,f.formatSize)(u.total)+",超过 "+(0,f.formatSize)(i.totalMax)+"。"),(u.sub.length>0||u.openData)&&(l=u.main,d=u.sub,h=u.openData,l.size>i.mainMax&&a.push("主包大小为 "+(0,f.formatSize)(l.size)+",超过 "+(0,f.formatSize)(i.mainMax)+"。"),null==d||d.forEach((function(e){e.size>i.subMax&&a.push(e.path+" 子包大小为 "+(0,f.formatSize)(e.size)+", 超过 "+(0,f.formatSize)(i.subMax)+"。")})),(null==h?void 0:h.size)>i.subMax&&a.push("开放数据域大小为 "+(0,f.formatSize)(h.size)+", 超过 "+(0,f.formatSize)(i.subMax)+"。")),a.length>0)throw new p.PackageSizeError(a.join("\n")+"\n可点击【查看解决方案】查看包体积优化方案,修改后重试。");return[2]}}))}))};var w=new Map;t.folderToZipStream=function(e,t,r,n){var o=t.whiteList,i=void 0===o?[]:o,l=t.useTypeScript;return void 0===n&&(n=E.HIGH_WATER_MARK),a(this,void 0,void 0,(function(){var t,o,f,h,m,A,O=this;return s(this,(function(C){switch(C.label){case 0:return t=function(e,t){if(r)return(0,y.filterFile)(e,t.getPackOptions());var n=t.getMiniprogramRoot();return(0,b.isSubPath)(n,e)&&(0,y.filterFile)(v.relative(n,e),t.getPackOptions())},o=function(){return a(O,void 0,void 0,(function(){var o,a,f,h,m,y,b,A,O,w;return s(this,(function(s){switch(s.label){case 0:return o=(0,d.default)("zip",{highWaterMark:n,statConcurrency:(0,E.maxConcurrency)()}),a=(0,g.getWhiteList)(r).concat(i),[4,(0,_.default)(a,{cwd:e,stats:!1,dot:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})];case 1:return f=s.sent(),[4,(0,E.getProjectConfig)(e)];case 2:return h=s.sent(),r?[3,6]:(m=h.getMiniprogramRoot(),y=v.join(e,m),[4,h.getAppJSON()]);case 3:return[4,s.sent().getKey("gameFiles")];case 4:return b=null!==(w=s.sent())&&void 0!==w?w:[],Array.isArray(b)&&b.length>0?(b=b.filter(E.isGameFileValid),[4,(0,_.default)(b,{cwd:y,dot:!1,stats:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})]):[3,6];case 5:A=(A=s.sent()).filter((function(e){return g.ALLOWED_MICROGAME_EXTS_REG.test(e)&&!e.startsWith("..")})).map((function(e){return v.join(m,e)})),f.push.apply(f,c([],u(A),!1)),s.label=6;case 6:return(O=new Set(f)).forEach((function(r){t(r,h)||l&&r.endsWith(".js")&&O.has(r.replace(/\.js$/,".ts"))||!l&&r.endsWith(".ts")||o.file(v.join(e,r),{name:r})})),o.on("warning",(function(e){if("ENOENT"!==e.code)throw new p.CompressError(e.message);console.warn("archiver with error "+e.message)})).on("error",(function(e){throw new p.CompressError(e.message)})),[4,o.finalize()];case 7:return s.sent(),[2,o]}}))}))},(f=w.get(e))?[4,f]:[3,2];case 1:C.sent(),C.label=2;case 2:h=o(),w.set(e,h),C.label=3;case 3:return C.trys.push([3,5,,6]),[4,h];case 4:return m=C.sent(),w.delete(e),[2,m];case 5:throw A=C.sent(),w.delete(e),A;case 6:return[2]}}))}))},t.prettyProjectSize=function(e){var t=e.total,r=e.main,n=e.sub,o=e.openData,i=[["主包",r.size]];null==n||n.sort((function(e,t){return t.size-e.size})).forEach((function(e){i.push([e.path,e.size])})),o&&i.push(["开放数据文件夹("+o.path+")",o.size]);var a=new h.default;return i.forEach((function(e){a.cell("路径",e[0]),a.cell("体积",(0,f.formatSize)(e[1]),h.default.leftPadder(" ")),a.newRow()})),a.total("体积",{reduce:function(e,r,n,o){return t},printer:function(e,r){return"总体积:"+(0,f.formatSize)(t)}}),a.toString()}},5796:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},l=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.projectToQRCode=t.upload=t.preview=t.checkProjectMatchAppid=t.checkChannel=void 0;var f=r(2747),d=r(7992),h=p(r(9258)),_=a(r(9849)),v=r(1017),E=p(r(7086)),m=r(7312),g=r(5138),y=r(9428),b=r(1728),A=p(r(8366)),O=r(5879),w=r(4486),C=r(4263),S=r(2893),I=r(3077),P=r(2997),R=r(4851);function L(e,t){if(!e)throw new Error("请检查 url 配置是否正常");return e.replace(/\$\{appid\}/g,t)}var T=(0,C.getCliDefaultStoragePath)(),D=(0,v.join)(T,"preview.json"),x={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default",page:{}};if((0,C.isCli)())if(_.existsSync(D))try{x=_.readJSONSync(D)}catch(e){}else _.ensureFileSync(D),_.writeJsonSync(D,x);function N(e){var t,r,o;return s(this,void 0,void 0,(function(){var i,a,s,c,l,p,_,v,E,g,y,A,O,w,I,P,R,T,D,x,N,M,k,U,F,G,B,H,V,Z,q;return u(this,(function(u){switch(u.label){case 0:return i=e.devAppid,a=e.extAppid,s=e.projectPath,c=e.type,l=e.uploadVersion,p=e.uploadChangeLog,_=e.uploadNeedUploadSourcemap,v=e.uploadNeedCheck,E=e.extraCheckInfoJson,g=e.localCompileVersion,y=e.extraInfoJson,A=e.interactGame,O=e.supportSourcemap,w=e.useTypeScript,I=e.channel,P=e.lynxPackages,T=new h.default,D=i,x="",A||"upload"!==c?[3,2]:[4,j(i,I)];case 1:u.sent(),u.label=2;case 2:return[4,(0,m.folderToZipStream)(s,{whiteList:A?["**/*"]:_?["**/*.map"]:void 0,useTypeScript:w},!1,void 0)];case 3:return N=u.sent(),M=(0,S.getConfig)(),k=d.AxiosInstance.put,A?[3,4]:("preview"===c?(a&&(D=a,x="?devappid="+i),R=L(M.url.preview,D)+x,P&&T.append("lynx_packages",P)):(R=L(M.url.upload,D),T.append("version",l),T.append("intro",p),T.append("need_upload_sourcemap",String(!!_)),T.append("need_check",String(!!v)),T.append("extra_check_info_json",E),I&&T.append("tag",I)),T.append("source",N,{filename:"source.zip"}),T.append("local_compile_version",null!=g?g:"4.0.0-cli"),y&&T.append("extra_info_json",y),[3,6]);case 4:return k=d.AxiosInstance.post,T.append("app_id",D),T.append("tech_type",16),[4,(0,C.getMD5Stream)(N)];case 5:U=u.sent(),T.append("src_md5",U.__md5),T.append("src",U,{filename:"src.zip"}),"preview"===c?(R=M.interactGameUrl.preview,T.append("extra_json",y)):(R=M.interactGameUrl.upload,T.append("version",l),T.append("intro",p),T.append("extra_json",y)),u.label=6;case 6:return O&&T.append("is_debug","1"),H=k,V=[R,T],q={},Z=[{}],[4,(0,b.getLogInfoHeaders)(i)];case 7:return[4,H.apply(void 0,V.concat([(q.headers=n.apply(void 0,[n.apply(void 0,Z.concat([u.sent()])),T.getHeaders()]),q.maxBodyLength=33554432,q)]))];case 8:if(F=u.sent(),G=F.data,B=F.headers,0===G.error||0===G.code)return[2,{metrics:null!==(t=G.performance_metrics)&&void 0!==t?t:{},logId:null!==(r=null==B?void 0:B["x-tt-logid"])&&void 0!==r?r:""}];throw new f.UploadError(null!==(o=G.message)&&void 0!==o?o:G.msg,G.error)}}))}))}function j(e,t){return s(this,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:if(!t)return[2];if(!/^[1-9]\d*$/.test(t))throw new f.UploadError("通道只能是大于0的整数");return[4,M(e)];case 1:if((r=n.sent().limit_num)&&Number(t)>=r)throw new f.UploadError("通道不能大于 "+(r-1));return[4,Z(e)];case 2:if(n.sent())throw new f.UploadError("沙盒小程序不支持通道");return[2]}}))}))}function M(e){return s(this,void 0,void 0,(function(){var t,r,n;return u(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),n={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return n.headers=o.sent(),t=n,[4,d.AxiosInstance.get("https://microapp.bytedance.com/api/developer/ide/v1/microapp/get_exist_test_version?app_id="+e,t)];case 2:if(0===(r=o.sent()).data.code)return[2,r.data.data];throw new Error(r.data.msg);case 3:throw o.sent(),new Error("获取通道限制失败");case 4:return[2]}}))}))}function k(e,t,r,n){return void 0===n&&(n=!1),s(this,void 0,void 0,(function(){var o,i,a,s,c;return u(this,(function(u){switch(u.label){case 0:return c={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return c.headers=u.sent(),o=c,i=e,a="","",r&&t&&(i=t,a="?devappid="+e),s=n?(0,S.getConfig)().interactGameUrl.compileProgress+"?app_id="+e+"&stage="+(r?"preview":"latest"):L((0,S.getConfig)().url.compileProgress,i)+a,[4,d.AxiosInstance.get(s,o).then((function(e){var t,r,o,i,a,s,u,c,l,p,f=e.data||{},d=f.error,h=f.status,_=f.message;return n&&(d=null===(t=e.data)||void 0===t?void 0:t.code,h=null===(o=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===o?void 0:o.status,_=null!==(s=null===(a=null===(i=e.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.msg)&&void 0!==s?s:null===(u=e.data)||void 0===u?void 0:u.msg),1===d||n&&(1===h||0!==d)?{success:!1,done:!1,error:d,msg:_,errLink:null!==(c=e.data.err_link)&&void 0!==c?c:"",passJson:{}}:{success:!0,done:0===d&&2===h,error:d,msg:"",metrics:null!==(l=e.data.performance_metrics)&&void 0!==l?l:{},errLink:null!==(p=e.data.err_link)&&void 0!==p?p:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,u.sent()]}}))}))}function U(e,t,r,n){return void 0===n&&(n=!1),s(this,void 0,void 0,(function(){var o=this;return u(this,(function(i){switch(i.label){case 0:return[4,new Promise((function(i,a){var c=setInterval((function(){return s(o,void 0,void 0,(function(){var o,s,l,p,d,h,_,v,E;return u(this,(function(u){switch(u.label){case 0:return[4,k(e,t,r,n)];case 1:return o=u.sent(),s=o.success,l=o.msg,p=o.error,d=o.errLink,h=o.metrics,_=o.done,v=o.passJson,s||(clearInterval(c),E=new f.CompileError(l,d,p),a(E)),_&&(clearInterval(c),i({metrics:null!=h?h:{},passJson:v})),[2]}}))}))}),1e3)}))];case 1:return[2,i.sent()]}}))}))}function F(e){return s(this,void 0,void 0,(function(){var t,r,n;return u(this,(function(o){switch(o.label){case 0:return n={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return n.headers=o.sent(),t=n,r=(0,S.getConfig)().url.check+"?app_id="+e,[4,d.AxiosInstance.get(r,t).then((function(e){var t,r,n,o,i=e.data||{},a=i.code,s=i.err_msg;if(0!==a)return{success:!1,done:!1,error:a,msg:s,status:1};var u=null===(r=null===(t=e.data)||void 0===t?void 0:t.data)||void 0===r?void 0:r.status;return{success:!0,done:2===u||3===u,error:a,msg:"",status:u,result:(null===(o=null===(n=e.data)||void 0===n?void 0:n.data)||void 0===o?void 0:o.check_list)||[]}})).catch((function(e){return{success:!1,error:-1,msg:e.message,status:1,done:!1}}))];case 2:return[2,o.sent()]}}))}))}function G(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=setInterval((function(){return s(t,void 0,void 0,(function(){var t,i,a,s,c,l,p;return u(this,(function(u){switch(u.label){case 0:return[4,F(e)];case 1:return t=u.sent(),i=t.success,a=t.msg,s=t.done,c=t.status,l=t.result,p=void 0===l?[]:l,i||(clearInterval(o),n({msg:a})),s&&(clearInterval(o),r({status:c,result:p})),[2]}}))}))}),1e3)}))];case 1:return[2,r.sent()]}}))}))}function B(e,t){return void 0===t&&(t=e.getAppid()),s(this,void 0,void 0,(function(){var r,n,o;return u(this,(function(i){switch(i.label){case 0:return[4,Promise.all([e.detectProjectType("game"),(0,I.isRealToyId)(t)])];case 1:if(r=c.apply(void 0,[i.sent(),2]),n=r[0],o=r[1],!n&&o)throw new f.ProjectError('当前项目为小程序项目,但是 "'+t+'" 属于小玩法 ID。');if(n&&!o)throw new f.ProjectError('当前项目为小玩法项目,但是 "'+t+'" 属于小程序 ID。');return[2]}}))}))}function H(e,t){var r,n;if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o=o.filter((function(t){return void 0!==e[t]})),i=i.filter((function(e){return void 0!==t[e]})),o.length!==i.length)return!1;try{for(var a=l(o),s=a.next();!s.done;s=a.next()){var u=s.value;if(!i.includes(u)||!H(e[u],t[u]))return!1}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!0}function V(e,t){var r;return void 0===t&&(t=5e3),s(this,void 0,void 0,(function(){var n,o,i,a,s,c,l,p,d,h,v,b,S,R,L,T,j,M,k,F,V,Z,W,z,K,J,$,X,Y,Q,ee,te,re,ne,oe,ie,ae;return u(this,(function(u){switch(u.label){case 0:return[4,(0,P.isCliNeedForceUpdate)("microapp")];case 1:return u.sent(),n={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},o=e.project,i=e.page,a=e.qrcode,s=e.cache,c=e.uploadOptions,l=e.localCompileVersion,p=e.ideConfig,d=e.debug,h=e.uploadCache,v=e.interactGame,b=e.supportSourcemap,S=e.enableHotRestartCache,R=e.penetrateMapJson,L=e.updateStatus,T=e.setCheckResult,j=e.traceVersion,M=e.traceMode,k=e.useLocalSchema,F=o.path,V=e.lynxPackages,Z="",h||s?[4,(0,y.getProjectHash)(F,!1,t)]:[3,3];case 2:Z=u.sent(),u.label=3;case 3:return W=c?"upload":"preview",z=!1,s&&((0,C.isCli)()||(null==p?void 0:p.previewScene)===x.previewScene)&&Z&&x.hash===Z&&x.shortUrl&&x.expireTime>Date.now()/1e3&&H(i,x.page)&&V===x.lynxPackages&&!k?(n.shortUrl=x.shortUrl,n.expireTime=x.expireTime,n.originSchema=x.originSchema,n.useCache=!0,A.default.info("项目文件无变动,使用缓存"),z=!0,[3,19]):[3,4];case 4:return(0,O.addNodeToMetrics)(n.metrics,"compileCreate"),[4,(0,C.getProjectConfig)(F)];case 5:return[4,(K=u.sent()).getRealAppid()];case 6:return J=u.sent(),(0,C.validateAppId)(J),[4,B(K,J)];case 7:return u.sent(),(0,O.addFieldToMetrics)(n.metrics,"appId",J),$=null,[4,(0,g.detectValidExtApp)(J,F)];case 8:if((X=u.sent()).invalidReason||($=X.ext.extAppid),X.invalidReason&&X.invalidReason.reason!==g.INVALID_EXTAPP_REASON.EXT_DISABLED&&X.invalidReason.reason!==g.INVALID_EXTAPP_REASON.INVALID_EXT_JSON)throw new f.ProjectError('当前 ext.json "extEnable" 为 true,但是由于三方配置异常,当前工程仍为普通小程序工程,错误原因是:'+X.invalidReason.errMsg);return Y=A.default.loading("正在准备上传..."),k&&!V&&(V=K.getLynxPackage()),h&&Z&&x.hash===Z&&x.shortUrl&&x.expireTime>Date.now()/1e3&&V===x.lynxPackages?[3,16]:[4,(0,m.verifySubPackageSize)(K,W)];case 9:return u.sent(),"upload"!==W||v||(0,C.isIDE)()?[3,11]:[4,(0,I.getAppVersions)(J)];case 10:if(Q=u.sent().audit_version,c.version||(c.version=(0,C.getNextVersion)(Q),A.default.info("\nThe default version is "+c.version+".")),Q&&c&&1===(0,E.default)(Q,c.version))throw new f.UploadError(c.version+" is smaller than "+Q+"(pre order version)");u.label=11;case 11:return ee={upload:1,check:1,compile:1},Y.text="正在上传中...",null==L||L(ee),(0,O.addNodeToMetrics)(n.metrics,"IDERequest"),[4,N({devAppid:J,extAppid:$,projectPath:F,type:W,uploadChangeLog:null==c?void 0:c.changeLog,uploadVersion:null==c?void 0:c.version,uploadNeedUploadSourcemap:null==c?void 0:c.needUploadSourcemap,uploadNeedCheck:null==c?void 0:c.needUploadCheck,extraCheckInfoJson:null==c?void 0:c.extraCheckInfoJson,extraInfoJson:q(K,W,e.extraInfoJson),localCompileVersion:l,interactGame:v,supportSourcemap:b,useTypeScript:K.useTypeScript(),channel:null==c?void 0:c.channel,lynxPackages:V})];case 12:return te=u.sent(),ee.upload=2,null==L||L(ee),(0,O.addFieldToMetrics)(n.metrics,"logId",te.logId),(null==c?void 0:c.needUploadCheck)?(Y.text="查询预检进度中...",[4,G(J)]):[3,14];case 13:re=u.sent(),ee.check=re.status,null==L||L(ee),null==T||T(re),u.label=14;case 14:return Y.text="查询编译进度中...",[4,U(J,$,"preview"===W,!!v)];case 15:ne=u.sent(),ee.compile=2,null==L||L(ee),n.metrics=(0,O.mergeMetrics)(n.metrics,te.metrics,ne.metrics),n.passJson=ne.passJson,(0,O.addNodeToMetrics)(n.metrics,"IDEReceiveResponse"),u.label=16;case 16:return null===(null==a?void 0:a.format)?[3,18]:(Y.text="生成二维码中...",[4,(0,w.makeSchema)({devAppid:J,extAppid:$,startPage:i.path,query:i.query,scene:i.scene,bdpLog:{launch_from:i.launchFrom,location:i.location,entrance_form:"990001",enter_from_merge:"scan",enter_position:"qr_code"},headers:{},ideConfig:p,qrcodeQuery:null==d?void 0:d.query,referrerInfo:i.referrerInfo,hotRestartHash:S&&Z?Z:"",type:W,penetrateMapJson:R,traceVersion:j,traceMode:M,isInteractGame:!!v,uploadOptions:c})]);case 17:oe=u.sent(),n.shortUrl=oe.shortUrl,n.expireTime=oe.expireTime,n.originSchema=oe.originSchema,u.label=18;case 18:(0,O.addNodeToMetrics)(n.metrics,"compileClose"),Y.stop(),u.label=19;case 19:return"imageFile"!==(null==a?void 0:a.format)?[3,22]:a.output?[4,(0,w.toQRCodeFile)(n.shortUrl,a.output)]:[3,21];case 20:ie=u.sent(),n.qrcodeFilePath=ie,A.default.info("二维码图片已存储到 "+ie),u.label=21;case 21:return[3,25];case 22:return"imageSVG"!==(null==a?void 0:a.format)?[3,25]:z&&x.qrcodeSVG?(n.qrcodeSVG=x.qrcodeSVG,[3,25]):[3,23];case 23:return ae=n,[4,(0,w.toQRCodeSVG)(n.shortUrl)];case 24:ae.qrcodeSVG=u.sent(),u.label=25;case 25:return function(e){x=e,(0,C.isCli)()&&_.writeJsonSync(D,x)}({shortUrl:n.shortUrl,expireTime:n.expireTime,originSchema:n.originSchema,hash:Z,previewScene:null!==(r=null==p?void 0:p.previewScene)&&void 0!==r?r:"default",qrcodeSVG:n.qrcodeSVG,page:i,lynxPackages:V}),[2,n]}}))}))}function Z(e){var t,r,o;return s(this,void 0,void 0,(function(){var i,a,s,c;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),a=d.AxiosInstance,c={url:"https://developer.open-douyin.com/bff_api/app/setting/v2/"+e+"/microappinfoservice/getMicroappInfo",params:{appId:e}},s=[{}],[4,(0,b.getLogInfoHeaders)(e)];case 1:return[4,a.apply(void 0,[(c.headers=n.apply(void 0,s.concat([u.sent()])),c.timeout=2e4,c)])];case 2:return i=u.sent(),[2,(null===(o=null===(r=null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.data)||void 0===r?void 0:r.appInfo)||void 0===o?void 0:o.isSandboxApp)||!1];case 3:return u.sent(),[2,!1];case 4:return[2]}}))}))}function q(e,t,r){if("preview"===t&&e.getBigPackageSizeSupport()){var n=(0,R.parseJson)(null!=r?r:"{}");return n.bigPackageSizeSupport=!0,JSON.stringify(n)}return r}t.checkChannel=j,t.checkProjectMatchAppid=B,t.preview=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,V(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t;return s(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,V({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"990001",launchFrom:"scan",location:"qr_code"},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap,needUploadCheck:!!e.needUploadCheck,extraCheckInfoJson:JSON.stringify({}),channel:e.channel},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig,interactGame:e.interactGame,penetrateMapJson:e.penetrateMapJson})];case 1:return[2,r.sent()]}}))}))},t.projectToQRCode=V},5138:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.detectValidExtApp=t.INVALID_EXTAPP_REASON=void 0;var a,s=r(8559),u=r(7992),c=r(1728),l=i(r(8366)),p=r(2747);!function(e){e[e.INVALID_APPID_META=0]="INVALID_APPID_META",e[e.INVALID_EXTAPPID=1]="INVALID_EXTAPPID",e[e.EXT_DISABLED=2]="EXT_DISABLED",e[e.INVALID_EXT_JSON=3]="INVALID_EXT_JSON",e[e.INVALID_AUTH=4]="INVALID_AUTH",e[e.NULL=5]="NULL"}(a=t.INVALID_EXTAPP_REASON||(t.INVALID_EXTAPP_REASON={}));var f=function(){function e(){this._thirdPartyMetaMap={}}return e.prototype.getThirdPartyMeta=function(e){var t,r,i,a;return n(this,void 0,void 0,(function(){var n,s,f,d,h,_;return o(this,(function(o){switch(o.label){case 0:return this._thirdPartyMetaMap[e]?[2,this._thirdPartyMetaMap[e]]:(n={isThirdPartyApp:!1,thirdPartyName:""},[4,(0,c.getLogInfoHeaders)(e)]);case 1:s=o.sent(),f="https://microapp.bytedance.com/api/v1/app/"+e+"/meta",d={headers:s},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.AxiosInstance.get(f,d)];case 3:return h=o.sent().data,this._thirdPartyMetaMap[e]={isThirdPartyApp:h.data.is_thirdparty_dev,thirdPartyName:h.data.thirdparty.name},[3,5];case 4:if(_=o.sent(),401===(null===(t=_.response)||void 0===t?void 0:t.status))throw new p.LoginError(null!==(a=null===(i=null===(r=_.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.message)&&void 0!==a?a:"尚未登录");return l.default.error("getThirdPartyMeta",_),[2,n];case 5:return[2,this._thirdPartyMetaMap[e]]}}))}))},e.prototype.checkExtAppIdAuth=function(e,t){var r,i,a,s;return n(this,void 0,void 0,(function(){var n,f,d,h;return o(this,(function(o){switch(o.label){case 0:return n="https://microapp.bytedance.com/api/thirdparty/validate_ext_appid?dev_appid="+e+"&ext_appid="+t,[4,(0,c.getLogInfoHeaders)(e)];case 1:f=o.sent(),d={headers:f},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.AxiosInstance.get(n,d)];case 3:return[2,0===o.sent().data.error];case 4:if(h=o.sent(),401===(null===(r=h.response)||void 0===r?void 0:r.status))throw new p.LoginError(null!==(s=null===(a=null===(i=h.response)||void 0===i?void 0:i.data)||void 0===a?void 0:a.message)&&void 0!==s?s:"尚未登录");return l.default.error("checkExtAppIdAuth",h),[2,!1];case 5:return[2]}}))}))},e.prototype.getExtData=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,s.ProjectConfig.from(e)];case 1:return[4,t.sent().getExtJSON()];case 2:return[2,t.sent().rawJSON];case 3:return t.sent(),[2,null];case 4:return[2]}}))}))},e.prototype.detectValidExtApp=function(e,t){return n(this,void 0,void 0,(function(){var r,n,i,s,u;return o(this,(function(o){switch(o.label){case 0:return r={invalidReason:null,ext:null,thirdPartyName:null},[4,this.getExtData(t)];case 1:return(n=o.sent())?n.extEnable?n.extAppid?[4,this.getThirdPartyMeta(e)]:(r.invalidReason={reason:a.INVALID_EXTAPPID,errMsg:"ext.json 中 extAppid 异常"},[2,r]):(r.invalidReason={reason:a.EXT_DISABLED,errMsg:"ext.json 中 extEnable 为 false"},[2,r]):(r.invalidReason={reason:a.INVALID_EXT_JSON,errMsg:"请检查项目根目录 ext.json 是否存在或者格式是否正确"},[2,r]);case 2:return i=o.sent(),s=i.isThirdPartyApp,u=i.thirdPartyName,s?[4,this.checkExtAppIdAuth(e,n.extAppid)]:(r.invalidReason={reason:a.INVALID_APPID_META,errMsg:"当前 appid 获取不到第三方平台信息,请检查当前 appId 是否可以合法预览并且正常关联第三方平台"},[2,r]);case 3:return o.sent()?(r.ext=n,r.thirdPartyName=u,[2,r]):(r.invalidReason={reason:a.INVALID_AUTH,errMsg:"当前 AppID 没有资质开发对应的第三方小程序,请检查 project.config.json 中的 “appid” 字段以及 ext.json 中的 “extAppid” 字段是否填写正确"},[2,r])}}))}))},e.Instance=new e,e}();t.detectValidExtApp=f.Instance.detectValidExtApp.bind(f.Instance)},8956:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setProjectHashFn=t.getProjectHash=t.microgame=t.folderToZipStream=t.setAppConfig=t.makeSchema=t.INVALID_EXTAPP_REASON=t.checkProjectMatchAppid=t.verifySubPackageSize=t.getProjectSize=t.detectValidExtApp=t.getConfig=t.setCookieFn=t.projectToQRCode=t.upload=t.preview=t.buildNpm=t.getAuditHostsList=t.audit=t.checkSession=t.sendVerificationCodeToPhone=t.logout=t.loginByPhone=t.loginByEmail=t.create=t.setConfig=t.open=void 0;var l=r(9345);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return l.audit}}),Object.defineProperty(t,"getAuditHostsList",{enumerable:!0,get:function(){return l.getAuditHostsList}});var p=r(2893);Object.defineProperty(t,"getConfig",{enumerable:!0,get:function(){return p.getConfig}}),Object.defineProperty(t,"setConfig",{enumerable:!0,get:function(){return p.setConfig}});var f=r(2173);Object.defineProperty(t,"create",{enumerable:!0,get:function(){return f.createProject}});var d=r(4113);Object.defineProperty(t,"checkSession",{enumerable:!0,get:function(){return d.checkSession}}),Object.defineProperty(t,"loginByEmail",{enumerable:!0,get:function(){return d.loginByEmail}}),Object.defineProperty(t,"loginByPhone",{enumerable:!0,get:function(){return d.loginByPhone}}),Object.defineProperty(t,"logout",{enumerable:!0,get:function(){return d.logout}}),Object.defineProperty(t,"sendVerificationCodeToPhone",{enumerable:!0,get:function(){return d.sendVerificationCodeToPhone}});var h=r(8733),_=c(r(7239)),v=r(7312);Object.defineProperty(t,"getProjectSize",{enumerable:!0,get:function(){return v.getProjectSize}}),Object.defineProperty(t,"verifySubPackageSize",{enumerable:!0,get:function(){return v.verifySubPackageSize}});var E=r(5796);Object.defineProperty(t,"checkProjectMatchAppid",{enumerable:!0,get:function(){return E.checkProjectMatchAppid}}),Object.defineProperty(t,"preview",{enumerable:!0,get:function(){return E.preview}}),Object.defineProperty(t,"projectToQRCode",{enumerable:!0,get:function(){return E.projectToQRCode}});var m=r(5138);Object.defineProperty(t,"detectValidExtApp",{enumerable:!0,get:function(){return m.detectValidExtApp}}),Object.defineProperty(t,"INVALID_EXTAPP_REASON",{enumerable:!0,get:function(){return m.INVALID_EXTAPP_REASON}});var g=r(1728);Object.defineProperty(t,"setCookieFn",{enumerable:!0,get:function(){return g.setCookieFn}});var y=r(4486);Object.defineProperty(t,"makeSchema",{enumerable:!0,get:function(){return y.makeSchema}});var b=r(8066),A=r(9251);Object.defineProperty(t,"setAppConfig",{enumerable:!0,get:function(){return A.setAppConfig}}),t.open=function(e){return s(this,void 0,void 0,(function(){var t,r;return u(this,(function(n){switch(n.label){case 0:return t=e.project,r=e.remotePort,[4,(0,_.default)({projectPath:t.path,mode:t.mode,type:"microapp"},r)];case 1:return[2,n.sent()]}}))}))},t.buildNpm=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(r){switch(r.label){case 0:return t=e.project,[4,(0,h.buildNpm)({projectPath:t.path})];case 1:return[2,r.sent()]}}))}))},t.upload=function(e){var t,r;return s(this,void 0,void 0,(function(){var n;return u(this,(function(o){switch(o.label){case 0:return C.reportCommandCall("upload"),[4,(0,E.upload)(e)];case 1:return n=o.sent(),C.report(b.CLI_EVENTS.IDE_CLI_UPLOAD_SUCCESS,{appid:(null===(t=n.metrics)||void 0===t?void 0:t.appId)||"",logid:(null===(r=n.metrics)||void 0===r?void 0:r.logId)||""}),[2,n]}}))}))},i(r(3077),t);var O=r(7312);Object.defineProperty(t,"folderToZipStream",{enumerable:!0,get:function(){return O.folderToZipStream}}),i(r(5879),t),t.microgame=a(r(3098));var w=r(9428);Object.defineProperty(t,"getProjectHash",{enumerable:!0,get:function(){return w.getProjectHash}}),Object.defineProperty(t,"setProjectHashFn",{enumerable:!0,get:function(){return w.setProjectHashFn}});var C=b.CliMonitor.getInstance({cliVersion:"2.0.10",cliName:"tt-minigame-ide-cli"});C.report(b.CLI_EVENTS.IDE_CLI_LAUNCH)},7145:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CliMonitor=void 0;var i=r(4084),a=o(r(2037)),s=r(8223),u=r(2893),c=r(4122),l=r(4263),p=r(1728),f="";function d(){if(!f)try{f=(0,s.machineIdSync)(!0)}catch(e){console.error(e)}return f}var h=function(){function e(e){this._didReportLaunch=!1;var t=e.cliVersion,r=e.cliName;"true"!==process.env.isIDE?(this._commonParams={ideVersion:t,deviceId:d(),osPlatform:a.default.platform(),osVersion:a.default.release(),cliName:r},this._commonData={userId:(0,p.getUserId)(),username:""}):(this._commonParams={ideVersion:t,deviceId:"",osPlatform:a.default.platform(),osVersion:a.default.release(),cliName:r},this._commonData={userId:"",username:""})}return e.updateCommonParams=function(e){this._instance._commonData=Object.assign(this._instance._commonData,e)},e.getInstance=function(t){return this._instance||(this._instance=new e(t)),this._instance},e.prototype.shouldReport=function(e){return!(!1===(0,u.getConfig)().allowReportEvent||"true"===process.env.isIDE||e===c.CLI_EVENTS.IDE_CLI_LAUNCH&&this._didReportLaunch||"no"===process.env.ALLOW_REPORT_EVENT)},e.prototype.report=function(e,t){void 0===t&&(t={}),this.shouldReport(e)&&(e===c.CLI_EVENTS.IDE_CLI_LAUNCH&&(this._didReportLaunch=!0,t.scene=(0,l.isCli)()?"cli":"require"),(0,i.reportTeaImmediately)(this._commonParams,[{event:e,params:n(n({},t),this._commonData)}]))},e.prototype.reportCommandCall=function(e){this.report("IDE_CLI_COMMAND_CALL",{command_name:e})},e}();t.CliMonitor=h},4122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=void 0,t.CLI_EVENTS={IDE_CLI_LAUNCH:"IDE_CLI_LAUNCH",IDE_CLI_COMMAND_CALL:"IDE_CLI_COMMAND_CALL",IDE_CLI_PREVIEW_SUCCESS:"IDE_CLI_PREVIEW_SUCCESS",IDE_CLI_PREVIEW_FAIL:"IDE_CLI_PREVIEW_FAIL",IDE_CLI_UPLOAD_SUCCESS:"IDE_CLI_UPLOAD_SUCCESS",IDE_CLI_UPLOAD_FAIL:"IDE_CLI_UPLOAD_FAIL",IDE_CLI_ERROR:"IDE_CLI_ERROR",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER",IDE_CLI_FORCE_UPGRADE:"IDE_CLI_FORCE_UPGRADE"}},8066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=t.CliMonitor=void 0;var n=r(7145);Object.defineProperty(t,"CliMonitor",{enumerable:!0,get:function(){return n.CliMonitor}});var o=r(4122);Object.defineProperty(t,"CLI_EVENTS",{enumerable:!0,get:function(){return o.CLI_EVENTS}})},2696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TS_TEMPLATE_DOWNLOAD_URL=t.TEMPLATE_DOWNLOAD_URL=t.IDE_SCHEMA=void 0,t.IDE_SCHEMA="bytedanceide:",t.TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master.zip",t.TS_TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master-ts.zip"},1728:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.getLogInfoHeaders=t.setCookieFn=t.removeUserCookies=t.saveUserCookies=t.getUserId=t.getUserCookies=void 0;var c=i(r(9849)),l=i(r(1017)),p=r(2893),f=r(4263),d=r(9251),h="",_="";function v(){var e=(0,p.getConfig)();return l.join(e.storagePath,".cookies")}t.getUserCookies=function(){return a(void 0,void 0,void 0,(function(){var e,t;return s(this,(function(r){if(h)return[2,h];try{return[2,h=null!==(t=null===(e=c.readFileSync(v(),"utf-8").split("\n")[0])||void 0===e?void 0:e.trim())&&void 0!==t?t:""]}catch(e){throw h="",new Error("检测到本地无 Cookie,请重新登录")}return[2]}))}))},t.getUserId=function(){var e,t;if(_)return _;try{_=null!==(t=null===(e=c.readFileSync(v(),"utf-8").split("\n")[1])||void 0===e?void 0:e.trim())&&void 0!==t?t:""}catch(e){_=""}return _},t.saveUserCookies=function(e,t){if(_=t,e&&!(e.length<1)){var r=v();c.ensureFileSync(r),h=function(e){void 0===e&&(e=[]);var t=function(e){return void 0===e&&(e=[]),e.map((function(e){var t={name:"",value:""};return e.split("; ").reduce((function(e,t,r){var n=u(t.split("="),2),o=n[0],i=n[1];return 0===r?(e.name=o,e.value=i,e):(e[o]=i,e)}),t),t}))}(e);return function(e,t,r){void 0===t&&(t="sessionid_microapp"),void 0===r&&(r="sessionid_dy_open");var n=function(e,t){return void 0===t&&(t="sessionid_microapp"),e.find((function(e){return e.name===t}))}(e,t);return e.concat([Object.assign({},n,{name:"sessionid"}),Object.assign({},n,{name:r})])}(t)}(e).map((function(e){return e.name+"="+e.value})).join(";");var n=h+"\n"+t;c.writeFileSync(l.join(r),n)}},t.removeUserCookies=function(){h="",_="";try{c.removeSync(v())}catch(e){if("ENOENT"===e.code)return;throw e}},t.setCookieFn=function(e){t.getUserCookies=e},t.getLogInfoHeaders=function(e){return a(void 0,void 0,void 0,(function(){var r,n,o;return s(this,(function(i){switch(i.label){case 0:if((0,f.isIDE)()||!(r=(0,d.getToken)(e)))return[3,5];if(!r)return[3,5];n=void 0,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,t.getUserCookies)()];case 2:return n=i.sent(),[3,4];case 3:return i.sent(),n="",[3,4];case 4:return[2,{"x-cli-token":r,"x-cli-appid":e,Cookie:n}];case 5:return o={},[4,(0,t.getUserCookies)()];case 6:return[2,(o.Cookie=i.sent(),o)]}}))}))}},9428:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.setProjectHashFn=t.getProjectHash=void 0;var i=r(2896),a=r(2747),s=r(4263),u=r(9882);t.getProjectHash=function(e,t,r){return n(void 0,void 0,void 0,(function(){var r,n;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=(0,s.isMac)()?(0,u.getWhiteList)(t):(0,u.getWhiteList)(t).map((function(e){return"*".concat(e.slice(3))})),[4,(0,i.hashElement)(".",e,{encoding:"hex",folders:{exclude:[".*","node_modules"]},files:{include:r,matchBasename:!1,matchPath:!0}})];case 1:return[2,o.sent().hash];case 2:throw n=o.sent(),new a.HashError("获取工程文件夹 hash 失败:"+n.toString());case 3:return[2]}}))}))},t.setProjectHashFn=function(e){return n(this,void 0,void 0,(function(){var r=this;return o(this,(function(i){return t.getProjectHash=function(t,i,a){return void 0===a&&(a=5e3),n(r,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r){var n=setTimeout((function(){console.info("[hash project timeout]"),r("")}),a);e(t,i,a).then((function(e){clearTimeout(n),r(e)})).catch((function(){clearTimeout(n),r("")}))}))];case 1:return[2,r.sent()]}}))}))},[2]}))}))}},8366:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(1606)),s=i(r(8838)),u=r(3837),c=r(4263),l=function(){function e(){}return e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.loading=function(e){return{color:"green",text:e,stop:function(){}}},e.prototype.stopLoading=function(){},e}(),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l),f=null,d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.info(a.default.green(u.format.apply(null,e)))},t.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.warn(a.default.yellow(u.format.apply(null,e)))},t.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error(a.default.red(u.format.apply(null,e)))},t.prototype.loading=function(e){return f=(0,s.default)({text:e,interval:80}).start()},t.prototype.stopLoading=function(){f&&(f.stop(),f=null)},t}(l),h=(0,c.isCli)()?new d:new p;t.default=h},5879:function(e,t){"use strict";var r=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Metrics=t.mergeMetrics=t.addFieldToMetrics=t.addNodeToMetrics=void 0,t.addNodeToMetrics=function(e,t){e.nodes||(e.nodes=[]),e.nodes.push({node:t,timestamp:Date.now()})},t.addFieldToMetrics=function(e,t,r){"nodes"!==t&&void 0!==r&&(e[t]=r)},t.mergeMetrics=function(){for(var e,t,a,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];var c={nodes:[]};try{for(var l=n(s.filter(Boolean)),p=l.next();!p.done;p=l.next()){var f=p.value,d=f.nodes,h=r(f,["nodes"]);for(var _ in(a=c.nodes).push.apply(a,i([],o(null!=d?d:[]),!1)),h)void 0!==h[_]&&null!==h[_]&&(c[_]=h[_])}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}return c};var a=function(){function e(){this.nodes=[],this.tags={}}return e.prototype.addNode=function(e,t){return void 0===t&&(t=Date.now()),this.nodes.push({node:e,timestamp:t}),this},e.prototype.updateField=function(e,t){return void 0!==t?this.tags[e]=t:delete this.tags[e],this},e.prototype.merge=function(){for(var e,t,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];try{for(var a=n(o.filter(Boolean)),s=a.next();!s.done;s=a.next()){var u=s.value,c=u.nodes,l=r(u,["nodes"]);for(var p in this.nodes=this.nodes.concat(c),l)void 0!==l[p]&&(this.tags[p]=l[p])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this},e.prototype.settle=function(e){void 0===e&&(e=!1);var t=Object.assign({},this.tags);return t.nodes=this.nodes,e&&this.clear(),t},e.prototype.clear=function(){return this.nodes=[],this.tags={},this},e}();t.Metrics=a},4486:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateTerminalQrCode=t.toQRCodeFile=t.toQRCodeSVG=t.makeSchema=void 0;var l=r(2747),p=r(7992),f=c(r(1887)),d=c(r(1017)),h=c(r(3727)),_=a(r(4563)),v=r(2893),E=r(1728),m=c(r(8366)),g=r(4263);t.makeSchema=function(e){var t=this;return new Promise((function(r,o){return s(t,void 0,void 0,(function(){var t,i,a,s,c,f,d,h,_,m,y,b,A,O,w,C,S,I,P,R,L,T,D,x,N,j,M,k,U,F,G,B;return u(this,(function(u){switch(u.label){case 0:return t=e.devAppid,i=e.extAppid,a=e.startPage,s=e.query,c=e.scene,f=e.bdpLog,d=e.qrcodeQuery,h=e.headers,_=e.ideConfig,m=e.isInteractGame,y=e.referrerInfo,b=e.hotRestartHash,A=e.type,O=e.penetrateMapJson,w=e.traceVersion,C=e.traceMode,S=e.uploadOptions,I=(0,v.getConfig)().url.makeSchema,P={},i&&(P={devappid:t}),[4,(0,E.getLogInfoHeaders)(t)];case 1:R=u.sent(),L=a?a+"?"+s:"",T={skip_domain_check:!!(null==_?void 0:_.skipDomainCheck),inspect_platform:null!==(j=null==_?void 0:_.inspectPlatform)&&void 0!==j?j:"all",ide_version:null==_?void 0:_.ideVersion,ide_os:null==_?void 0:_.ideOS,ide_device_id:null==_?void 0:_.ideDid,ide_user_id:null==_?void 0:_.ideUid,iOS_debug_version:+(null==_?void 0:_.iOSDebugVersion),connect_type:null==_?void 0:_.connectType,local_debug:String(null==_?void 0:_.localDebug),dycloud_config:{call_container:null!==(k=null===(M=null==_?void 0:_.dycloudConfig)||void 0===M?void 0:M.callContainer)&&void 0!==k?k:null,websocket:null!==(F=null===(U=null==_?void 0:_.dycloudConfig)||void 0===U?void 0:U.websocket)&&void 0!==F?F:null},extra_info:null!==(G=null==_?void 0:_.extraInfo)&&void 0!==G?G:{},performance_test:null==_?void 0:_.performanceTest},(null==_?void 0:_.isSandbox)&&Object.assign(T,{is_sandbox:!0,random_key:_.randomKey,account_name:_.accountName,app_id:_.appId,app_name:_.appName,expire_time:_.expireTime}),D={start_page:encodeURIComponent(L),query:null!=s?s:"",scene:""+c,bdp_log:JSON.stringify(f),penetrate_map_json:JSON.stringify(null!=O?O:n({referer_info:y,ide_inspect_version:6,trace_version:w,ide_live_debug:"live"===(null==_?void 0:_.previewScene),ide_config:T,trace_mode:C},b&&{hot_restart_version:b}))},"upload"===A&&(D.version_num=S.version,D.tag=S.channel),(null===(B=null==_?void 0:_.extraInfo)||void 0===B?void 0:B.preload)&&Object.assign(D,{preload:null==_?void 0:_.extraInfo.preload}),d&&Object.assign(D,d),m&&(I=(0,v.getConfig)().interactGameUrl.makeSchema),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,p.AxiosInstance.post(I,n(n({app_id:i||t,stage:"upload"===A?"latest":"preview"},P),{schema_params:D}),{headers:Object.assign(R,h)})];case 3:return x=u.sent(),(0,g.isIDE)()&&console.info("makeSchema result",x),0===x.data.code?((0,g.isIDE)()&&console.info("makeSchema",x.data.data),r({originSchema:m?x.data.data.schema_v2:x.data.data.origin_schema,shortUrl:x.data.data.short_url,expireTime:+x.data.data.expire_time})):o(new l.SchemaError(x.data.msg)),[3,5];case 4:return N=u.sent(),o(new l.SchemaError(N.toString())),[3,5];case 5:return[2]}}))}))}))},t.toQRCodeSVG=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(r){switch(r.label){case 0:return r.trys.push([0,1,,3]),[2,h.default.toString(e,{type:"svg",margin:0,color:{light:"#00000000"}})];case 1:return t=r.sent(),[4,Promise.reject(new l.QRCodeError(t.toString()))];case 2:return[2,r.sent()];case 3:return[2]}}))}))},t.toQRCodeFile=function(e,t){return s(this,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:d.default.isAbsolute(t)||(t=d.default.resolve(process.cwd(),t)),n.label=1;case 1:return n.trys.push([1,3,,5]),[4,h.default.toFile(t,e,{color:{light:"#0000"}})];case 2:return n.sent(),[2,t];case 3:return r=n.sent(),[4,Promise.reject(new l.QRCodeError(r.toString()))];case 4:return[2,n.sent()];case 5:return[2]}}))}))},t.generateTerminalQrCode=function(e,t){_.generate(e,{small:t.small});var r="";t.copy&&(f.default.writeSync(e),r="(已拷贝到剪贴板)"),t.small&&m.default.warn("small QR Code may not work in some environments"),m.default.info("二维码信息:"+e+" "+r)}},2997:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isCliNeedForceUpdate=t.getForceUpdateConfig=t.getIDESettings=void 0;var s=r(7992),u=r(4851),c=r(1728),l=a(r(8366)),p=a(r(7282)),f=r(4263),d=r(8066),h=d.CliMonitor.getInstance({cliVersion:"2.0.10",cliName:"tt-minigame-ide-cli"});function _(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:t=(0,c.getUserId)(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,s.AxiosInstance.get("https://is.snssdk.com/service/settings/v2/",{params:n({device_id:""+t,user_id:""+t,app:1,aid:13,caller_name:"microapp_ide"},null==e?void 0:e.params)})];case 2:return[2,r.sent().data.data.app];case 3:return r.sent(),[2,null];case 4:return[2]}}))}))}function v(e){var t;return o(this,void 0,void 0,(function(){var r,n;return i(this,(function(o){switch(o.label){case 0:return[4,_()];case 1:return(r=o.sent())?(n=null===(t=r.ide_config)||void 0===t?void 0:t.forceUpdate)?[2,{date:n.date,updateVersion:n.cli[e]}]:[2,null]:[2]}}))}))}t.getIDESettings=_,t.getForceUpdateConfig=v,t.isCliNeedForceUpdate=function(e){return o(this,void 0,void 0,(function(){var t,r,o,a;return i(this,(function(i){switch(i.label){case 0:return(0,f.isCli)()?[4,v(e)]:[2];case 1:return(t=i.sent())?((r=(0,u.isNeedForceUpdate)(n(n({},t),{curVersion:"2.0.10",appType:"CLI"})))&&(o=r.message,a=r.type,h.report(d.CLI_EVENTS.IDE_CLI_FORCE_UPGRADE,{force_update_type:a}),"force"===a?(l.default.error(o),p.default.exit()):l.default.warn(o)),[2]):[2,null]}}))}))}},4263:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=t.isObject=t.isGameFileValid=t.getNextVersion=t.getMD5Stream=t.getAppJson=t.getProjectConfig=t.getAppid=t.getCliDefaultStoragePath=t.clearConsole=t.mixEncode=t.validateAppId=t.validateEmail=t.validateVerificationCode=t.validatePhoneNumber=t.getPackageRoot=t.createProjectConfigFile=t.cleanArgs=t.maxConcurrency=t.isIDE=t.isMiniGameCli=t.isCli=t.isMac=t.HIGH_WATER_MARK=void 0;var c=r(2747),l=r(8559),p=u(r(6113)),f=i(r(9849)),d=i(r(2037)),h=i(r(1017)),_=i(r(4521)),v=r(2781);function E(){return"true"===process.env.isMiniGameCli}t.HIGH_WATER_MARK=33554432,t.isMac=function(){return"darwin"===process.platform},t.isCli=function(){return"true"===process.env.isCli},t.isMiniGameCli=E,t.isIDE=function(){return"true"===process.env.isIDE};var m=1;function g(e){if(!/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e))throw new c.ProjectError('AppId "'+e+'" is not valid')}t.maxConcurrency=function(){return m||(m=d.cpus().length),m},t.cleanArgs=function(e){return e.options.reduce((function(t,r){var n=r.long.replace(/^--/,"").replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}));return"function"!=typeof e[n]&&void 0!==e[n]&&(t[n]=e[n]),t}),{})},t.createProjectConfigFile=function(e,t,r){return void 0===r&&(r=!1),a(this,void 0,void 0,(function(){var n,o;return s(this,(function(i){switch(i.label){case 0:return n='{\n "setting": {\n "urlCheck": true,\n "es6": true,\n "postcss": true,\n "minified": true,\n "newFeature": true,\n "useCompilerPlugins": ['+(r?'"typescript"':"")+']\n },\n "miniprogramRoot": "./",\n "appid": "testappId",\n "projectname": "'+e+'"\n }',o=h.resolve(t,"project.config.json"),[4,f.writeFile(o,n)];case 1:return[2,i.sent()]}}))}))},t.getPackageRoot=function(){return h.join(__dirname,"..")},t.validatePhoneNumber=function(e){if(!/^1[3-9]\d{9}$/.test(e))throw new c.LoginError('PhoneNumber "'+e+'" is invalid')},t.validateVerificationCode=function(e){if(!/^\d{4}$/.test(e))throw new c.LoginError('VerificationCode "'+e+'" is invalid')},t.validateEmail=function(e){if(!/^([A-Za-z0-9_\-.])+@([A-Za-z0-9_\-.])+\.([A-Za-z]{2,4})$/.test(e))throw new c.LoginError('Email "'+e+'" is invalid')},t.validateAppId=g,t.mixEncode=function(e){for(var t=e.toString(),r=[],n=0,o=t.length;n<o;n++)r.push(t.charCodeAt(n));return r.map((function(e){return(5^e).toString(16)})).join("")},t.clearConsole=function(e){if(process.stdout.isTTY){var t="\n".repeat(process.stdout.rows);console.log(t),_.cursorTo(process.stdout,0,0),_.clearScreenDown(process.stdout),e&&console.log(e)}},t.getCliDefaultStoragePath=function(){var e=E()?".tmg-cli/":".tma-cli/";return h.join(d.homedir(),e)},t.getAppid=function(e){var t=e.getAppid();return g(t),t},t.getProjectConfig=function(e){return a(this,void 0,void 0,(function(){var t;return s(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,4]),[4,l.ProjectConfig.from(e)];case 1:case 3:return[2,r.sent()];case 2:return t=r.sent(),[4,Promise.reject(new c.ProjectError('Parsing "project.config.json" with error. '+t.toString()))];case 4:return[2]}}))}))},t.getAppJson=function(e,t,r){return a(this,void 0,void 0,(function(){var n,o,i,a;return s(this,(function(s){switch(s.label){case 0:n=(r?"game":"app")+".json",s.label=1;case 1:return s.trys.push([1,3,,5]),o=e.getMiniprogramRoot(),i=h.join(t,o,n),[4,f.readJSON(i)];case 2:return[2,s.sent()];case 3:return a=s.sent(),[4,Promise.reject(new c.ProjectError('Parsing "'+n+'" file with error. '+a.toString()))];case 4:return[2,s.sent()];case 5:return[2]}}))}))},t.getMD5Stream=function(e){return a(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=p.default.createHash("md5"),i=new v.Transform({writableHighWaterMark:t.HIGH_WATER_MARK,readableHighWaterMark:t.HIGH_WATER_MARK,transform:function(e,t,r){o.update(e),r(null,e)}});i.__md5="",e.pipe(i),e.on("end",(function(){i.__md5=o.digest("hex"),r(i)})).on("error",(function(e){n(new c.CompressError("MD5 calculation failed "+e.message))}))}))];case 1:return[2,r.sent()]}}))}))},t.getNextVersion=function(e){try{var t=e.match(/\d+/g);return t[2]=(parseInt(t[2])+1).toString(),t.join(".")}catch(e){return"0.0.1"}},t.isGameFileValid=function(e){return!(".."===e||/\.\.(\\|\/)/.test(e)||/(\\|\/)\.\./.test(e))},t.isObject=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)},t.sleep=function(e){return new Promise((function(t){setTimeout((function(){t(null)}),e)}))}},9882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWhiteList=t.ALLOWED_MICROGAME_EXTS_REG=void 0;var n=r(4263),o=Object.freeze(["**/*.json","**/*.js","**/*.png","**/*.jpg","**/*.jpeg","**/*.gif","**/*.svg","**/*.cer","**/*.mp3","**/*.aac","**/*.m4a","**/*.mp4","**/*.wav","**/*.flac","**/*.ape","**/*.ogg","**/*.wma","**/*.midi","**/*.ogv","**/*.webm","**/*.mkv","**/*.ttc","**/*.ttf","**/*.woff","**/*.otf","**/*.obj","**/*.dae","**/*.fbx","**/*.mtl","**/*.stl","**/*.3ds","**/*.pvr","**/*.plist","**/*.fnt","**/*.gz","**/*.ccz","**/*.bmp","**/*.atlas","**/*.swf","**/*.ani","**/*.part","**/*.proto","**/*.bin","**/*.sk","**/*.mipmaps","**/*.txt","**/*.zip","**/*.tt","**/*.map","**/*.silk","**/*.dbbin","**/*.dbmv","**/*.etc","**/*.lmat","**/*.lm","**/*.ls","**/*.lh","**/*.lani","**/*.lav","**/*.lsani","**/*.ltc","**/*.xml","**/*.pkm","**/*.scene","**/*.csv","**/*.prefab","**/*.mesh","**/*.wasm","**/*.wasm.br"]);t.ALLOWED_MICROGAME_EXTS_REG=new RegExp("\\.("+o.map((function(e){return e.match(/\.([^.]+)$/)[1]})).join("|")+")$");var i=Object.freeze(["**/*.js","**/*.json","**/*.sjs","**/*.ts","**/*.ttml","**/*.ttss","**/*.wxml","**/*.wxs","**/*.wxss","**/*.sk","**/*.md","**/*.aac","**/*.bmp","**/*.br","**/*.cer","**/*.eot","**/*.gif","**/*.jpeg","**/*.jpg","**/*.m4a","**/*.mp3","**/*.mp4","**/*.ogg","**/*.otf","**/*.png","**/*.silk","**/*.svg","**/*.ttf","**/*.wasm","**/*.wav","**/*.webp","**/*.woff","**/*.wxs","**/*.wasm.br","**/*.heic"]);t.getWhiteList=function(e){return void 0===e&&(e=!1),(0,n.isCli)()?(0,n.isMiniGameCli)()?o:i:e?o:i}},3607:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.unity=t.open=t.upload=t.preview=t.logout=t.setConfig=t.buildNpm=t.checkSession=t.loginByPhone=t.loginByEmail=void 0;var a=r(8956),s=i(r(7239)),u=a.microgame.preview,c=a.microgame.upload;t.preview=u,t.upload=c;var l=r(8956);Object.defineProperty(t,"loginByEmail",{enumerable:!0,get:function(){return l.loginByEmail}}),Object.defineProperty(t,"loginByPhone",{enumerable:!0,get:function(){return l.loginByPhone}}),Object.defineProperty(t,"checkSession",{enumerable:!0,get:function(){return l.checkSession}}),Object.defineProperty(t,"buildNpm",{enumerable:!0,get:function(){return l.buildNpm}}),Object.defineProperty(t,"setConfig",{enumerable:!0,get:function(){return l.setConfig}}),Object.defineProperty(t,"logout",{enumerable:!0,get:function(){return l.logout}}),t.open=function(e){return n(this,void 0,void 0,(function(){var t,r;return o(this,(function(n){switch(n.label){case 0:return t=e.project,r=e.remotePort,[4,(0,s.default)({projectPath:t.path,mode:t.mode,type:"microgame"},r)];case 1:return[2,n.sent()]}}))}))};var p={preview:a.microgame.unityCli.previewForCli,upload:a.microgame.unityCli.unityUpload};t.unity=p},9491:e=>{"use strict";e.exports=require("assert")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},7282:e=>{"use strict";e.exports=require("process")},3477:e=>{"use strict";e.exports=require("querystring")},4521:e=>{"use strict";e.exports=require("readline")},2781:e=>{"use strict";e.exports=require("stream")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},3732:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__3732__},1606:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1606__},1887:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1887__},469:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__469__},6883:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6883__},9508:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9508__},2896:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__2896__},9258:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9258__},9849:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9849__},8838:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__8838__},3727:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__3727__},4563:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__4563__},7086:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__7086__},2541:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__2541__},4088:(e,t,r)=>{"use strict";const n=r(9258),o=r(7310),i=r(3152),a=r(3685),s=r(5687),u=r(3837),c=r(4940),l=r(9796),p=r(2781),f=r(2361);function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const h=d(n),_=d(o),v=d(a),E=d(s),m=d(u),g=d(c),y=d(l),b=d(p),A=d(f);function O(e,t){return function(){return e.apply(t,arguments)}}const{toString:w}=Object.prototype,{getPrototypeOf:C}=Object,S=(I=Object.create(null),e=>{const t=w.call(e);return I[t]||(I[t]=t.slice(8,-1).toLowerCase())});var I;const P=e=>(e=e.toLowerCase(),t=>S(t)===e),R=e=>t=>typeof t===e,{isArray:L}=Array,T=R("undefined"),D=P("ArrayBuffer"),x=R("string"),N=R("function"),j=R("number"),M=e=>null!==e&&"object"==typeof e,k=e=>{if("object"!==S(e))return!1;const t=C(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},U=P("Date"),F=P("File"),G=P("Blob"),B=P("FileList"),H=P("URLSearchParams");function V(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),L(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function Z(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,W=e=>!T(e)&&e!==q,z=(K="undefined"!=typeof Uint8Array&&C(Uint8Array),e=>K&&e instanceof K);var K;const J=P("HTMLFormElement"),$=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),X=P("RegExp"),Y=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};V(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},Q="abcdefghijklmnopqrstuvwxyz",ee="0123456789",te={DIGIT:ee,ALPHA:Q,ALPHA_DIGIT:Q+Q.toUpperCase()+ee},re=P("AsyncFunction"),ne={isArray:L,isArrayBuffer:D,isBuffer:function(e){return null!==e&&!T(e)&&null!==e.constructor&&!T(e.constructor)&&N(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||N(e.append)&&("formdata"===(t=S(e))||"object"===t&&N(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&D(e.buffer),t},isString:x,isNumber:j,isBoolean:e=>!0===e||!1===e,isObject:M,isPlainObject:k,isUndefined:T,isDate:U,isFile:F,isBlob:G,isRegExp:X,isFunction:N,isStream:e=>M(e)&&N(e.pipe),isURLSearchParams:H,isTypedArray:z,isFileList:B,forEach:V,merge:function e(){const{caseless:t}=W(this)&&this||{},r={},n=(n,o)=>{const i=t&&Z(r,o)||o;k(r[i])&&k(n)?r[i]=e(r[i],n):k(n)?r[i]=e({},n):L(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&V(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(V(t,((t,n)=>{r&&N(t)?e[n]=O(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&C(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:S,kindOfTest:P,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(L(e))return e;let t=e.length;if(!j(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:J,hasOwnProperty:$,hasOwnProp:$,reduceDescriptors:Y,freezeMethods:e=>{Y(e,((t,r)=>{if(N(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];N(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return L(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Z,global:q,isContextDefined:W,ALPHABET:te,generateString:(e=16,t=te.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&N(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(M(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=L(e)?[]:{};return V(e,((e,t)=>{const i=r(e,n+1);!T(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:re,isThenable:e=>e&&(M(e)||N(e))&&N(e.then)&&N(e.catch)};function oe(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}ne.inherits(oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ne.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ie=oe.prototype,ae={};function se(e){return ne.isPlainObject(e)||ne.isArray(e)}function ue(e){return ne.endsWith(e,"[]")?e.slice(0,-2):e}function ce(e,t,r){return e?e.concat(t).map((function(e,t){return e=ue(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ae[e]={value:e}})),Object.defineProperties(oe,ae),Object.defineProperty(ie,"isAxiosError",{value:!0}),oe.from=(e,t,r,n,o,i)=>{const a=Object.create(ie);return ne.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),oe.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const le=ne.toFlatObject(ne,{},null,(function(e){return/^is[A-Z]/.test(e)}));function pe(e,t,r){if(!ne.isObject(e))throw new TypeError("target must be an object");t=t||new(h.default||FormData);const n=(r=ne.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ne.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ne.isSpecCompliantForm(t);if(!ne.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(ne.isDate(e))return e.toISOString();if(!s&&ne.isBlob(e))throw new oe("Blob is not supported. Use a Buffer instead.");return ne.isArrayBuffer(e)||ne.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(ne.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ne.isArray(e)&&function(e){return ne.isArray(e)&&!e.some(se)}(e)||(ne.isFileList(e)||ne.endsWith(r,"[]"))&&(s=ne.toArray(e)))return r=ue(r),s.forEach((function(e,n){!ne.isUndefined(e)&&null!==e&&t.append(!0===a?ce([r],n,i):null===a?r:r+"[]",u(e))})),!1;return!!se(e)||(t.append(ce(o,r,i),u(e)),!1)}const l=[],p=Object.assign(le,{defaultVisitor:c,convertValue:u,isVisitable:se});if(!ne.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ne.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),ne.forEach(r,(function(r,i){!0===(!(ne.isUndefined(r)||null===r)&&o.call(t,r,ne.isString(i)?i.trim():i,n,p))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function fe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function de(e,t){this._pairs=[],e&&pe(e,this,t)}const he=de.prototype;function _e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ve(e,t,r){if(!t)return e;const n=r&&r.encode||_e,o=r&&r.serialize;let i;if(i=o?o(t,r):ne.isURLSearchParams(t)?t.toString():new de(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}he.append=function(e,t){this._pairs.push([e,t])},he.toString=function(e){const t=e?function(t){return e.call(this,t,fe)}:fe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Ee=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ne.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ge={isNode:!0,classes:{URLSearchParams:_.default.URLSearchParams,FormData:h.default,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]},ye="undefined"!=typeof window&&"undefined"!=typeof document,be=(Ae="undefined"!=typeof navigator&&navigator.product,ye&&["ReactNative","NativeScript","NS"].indexOf(Ae)<0);var Ae;const Oe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,we={...Object.freeze({__proto__:null,hasBrowserEnv:ye,hasStandardBrowserWebWorkerEnv:Oe,hasStandardBrowserEnv:be}),...ge};function Ce(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;return i=!i&&ne.isArray(n)?n.length:i,s?(ne.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&ne.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&ne.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a)}if(ne.isFormData(e)&&ne.isFunction(e.entries)){const r={};return ne.forEachEntry(e,((e,n)=>{t(function(e){return ne.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Se={transitional:me,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=ne.isObject(e);if(o&&ne.isHTMLForm(e)&&(e=new FormData(e)),ne.isFormData(e))return n&&n?JSON.stringify(Ce(e)):e;if(ne.isArrayBuffer(e)||ne.isBuffer(e)||ne.isStream(e)||ne.isFile(e)||ne.isBlob(e))return e;if(ne.isArrayBufferView(e))return e.buffer;if(ne.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return pe(e,new we.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return we.isNode&&ne.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=ne.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return pe(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(ne.isString(e))try{return(0,JSON.parse)(e),ne.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Se.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&ne.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw oe.from(e,oe.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:we.classes.FormData,Blob:we.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ne.forEach(["delete","get","head","post","put","patch"],(e=>{Se.headers[e]={}}));const Ie=Se,Pe=ne.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Re=Symbol("internals");function Le(e){return e&&String(e).trim().toLowerCase()}function Te(e){return!1===e||null==e?e:ne.isArray(e)?e.map(Te):String(e)}function De(e,t,r,n,o){return ne.isFunction(n)?n.call(this,t,r):(o&&(t=r),ne.isString(t)?ne.isString(n)?-1!==t.indexOf(n):ne.isRegExp(n)?n.test(t):void 0:void 0)}class xe{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Le(t);if(!o)throw new Error("header name must be a non-empty string");const i=ne.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Te(e))}const i=(e,t)=>ne.forEach(e,((e,r)=>o(e,r,t)));return ne.isPlainObject(e)||e instanceof this.constructor?i(e,t):ne.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Pe[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&o(t,e,r),this}get(e,t){if(e=Le(e)){const r=ne.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(ne.isFunction(t))return t.call(this,e,r);if(ne.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Le(e)){const r=ne.findKey(this,e);return!(!r||void 0===this[r]||t&&!De(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Le(e)){const o=ne.findKey(r,e);!o||t&&!De(0,r[o],o,t)||(delete r[o],n=!0)}}return ne.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!De(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return ne.forEach(this,((n,o)=>{const i=ne.findKey(r,o);if(i)return t[i]=Te(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Te(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ne.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&ne.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[Re]=this[Re]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Le(e);t[n]||(function(e,t){const r=ne.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return ne.isArray(e)?e.forEach(n):n(e),this}}xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ne.reduceDescriptors(xe.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),ne.freezeMethods(xe);const Ne=xe;function je(e,t){const r=this||Ie,n=t||r,o=Ne.from(n.headers);let i=n.data;return ne.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Me(e){return!(!e||!e.__CANCEL__)}function ke(e,t,r){oe.call(this,null==e?"canceled":e,oe.ERR_CANCELED,t,r),this.name="CanceledError"}function Ue(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new oe("Request failed with status code "+r.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}function Fe(e,t){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}ne.inherits(ke,oe,{__CANCEL__:!0});const Ge="1.6.5";function Be(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const He=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Ve(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const u=Date.now(),c=n[a];o||(o=u),r[i]=s,n[i]=u;let l=a,p=0;for(;l!==i;)p+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o<t)return;const f=c&&u-c;return f?Math.round(1e3*p/f):void 0}}const Ze=Symbol("internals");class qe extends b.default.Transform{constructor(e){super({readableHighWaterMark:(e=ne.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,t)=>!ne.isUndefined(t[e])))).chunkSize});const t=this,r=this[Ze]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},n=Ve(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",(e=>{"progress"===e&&(r.isCaptured||(r.isCaptured=!0))}));let o=0;r.updateProgress=function(e,t){let r=0;const n=1e3/t;let o=null;return function(t,i){const a=Date.now();if(t||a-r>n)return o&&(clearTimeout(o),o=null),r=a,e.apply(null,i);o||(o=setTimeout((()=>(o=null,r=Date.now(),e.apply(null,i))),n-(a-r)))}}((function(){const e=r.length,i=r.bytesSeen,a=i-o;if(!a||t.destroyed)return;const s=n(a);o=i,process.nextTick((()=>{t.emit("progress",{loaded:i,total:e,progress:e?i/e:void 0,bytes:a,rate:s||void 0,estimated:s&&e&&i<=e?(e-i)/s:void 0})}))}),r.ticksRate);const i=()=>{r.updateProgress(!0)};this.once("end",i),this.once("error",i)}_read(e){const t=this[Ze];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,r){const n=this,o=this[Ze],i=o.maxRate,a=this.readableHighWaterMark,s=o.timeWindow,u=i/(1e3/s),c=!1!==o.minChunkSize?Math.max(o.minChunkSize,.01*u):0,l=(e,t)=>{const r=Buffer.byteLength(e);let l,p=null,f=a,d=0;if(i){const e=Date.now();(!o.ts||(d=e-o.ts)>=s)&&(o.ts=e,l=u-o.bytes,o.bytes=l<0?-l:0,d=0),l=u-o.bytes}if(i){if(l<=0)return setTimeout((()=>{t(null,e)}),s-d);l<f&&(f=l)}f&&r>f&&r-f>c&&(p=e.subarray(f),e=e.subarray(0,f)),function(e,t){const r=Buffer.byteLength(e);o.bytesSeen+=r,o.bytes+=r,o.isCaptured&&o.updateProgress(),n.push(e)?process.nextTick(t):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(t)}}(e,p?()=>{process.nextTick(t,null,p)}:t)};l(e,(function e(t,n){if(t)return r(t);n?l(n,e):r(null)}))}setLength(e){return this[Ze].length=+e,this}}const We=qe,{asyncIterator:ze}=Symbol,Ke=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[ze]?yield*e[ze]():yield e},Je=ne.ALPHABET.ALPHA_DIGIT+"-_",$e=new u.TextEncoder,Xe="\r\n",Ye=$e.encode(Xe);class Qe{constructor(e,t){const{escapeName:r}=this.constructor,n=ne.isString(t);let o=`Content-Disposition: form-data; name="${r(e)}"${!n&&t.name?`; filename="${r(t.name)}"`:""}${Xe}`;n?t=$e.encode(String(t).replace(/\r?\n|\r\n?/g,Xe)):o+=`Content-Type: ${t.type||"application/octet-stream"}${Xe}`,this.headers=$e.encode(o+Xe),this.contentLength=n?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;ne.isTypedArray(e)?yield e:yield*Ke(e),yield Ye}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}class et extends b.default.Transform{__transform(e,t,r){this.push(e),r()}_transform(e,t,r){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,r)}}const tt=et,rt=(e,t)=>ne.isAsyncFn(e)?function(...r){const n=r.pop();e.apply(this,r).then((e=>{try{t?n(null,...t(e)):n(null,e)}catch(e){n(e)}}),n)}:e,nt={flush:y.default.constants.Z_SYNC_FLUSH,finishFlush:y.default.constants.Z_SYNC_FLUSH},ot={flush:y.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:y.default.constants.BROTLI_OPERATION_FLUSH},it=ne.isFunction(y.default.createBrotliDecompress),{http:at,https:st}=g.default,ut=/https:?/,ct=we.protocols.map((e=>e+":"));function lt(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function pt(e,t,r){let n=t;if(!n&&!1!==n){const e=i.getProxyForUrl(r);e&&(n=new URL(e))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));const t=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=n.hostname||n.host;e.hostname=t,e.host=t,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(e){pt(e,t,e.href)}}const ft=(e,t)=>(({address:e,family:t})=>{if(!ne.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})(ne.isObject(e)?e:{address:e,family:t}),dt=we.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];ne.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),ne.isString(n)&&a.push("path="+n),ne.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}},ht=we.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=ne.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function _t(e,t){let r=0;const n=Ve(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,u=n(s);r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const vt={http:function(e){return t=async function(t,r,n){let{data:o,lookup:i,family:a}=e;const{responseType:s,responseEncoding:u}=e,c=e.method.toUpperCase();let l,f,d=!1;if(i){const e=rt(i,(e=>ne.isArray(e)?e:[e]));i=(t,r,n)=>{e(t,r,((e,t,o)=>{if(e)return n(e);const i=ne.isArray(t)?t.map((e=>ft(e))):[ft(t,o)];r.all?n(e,i):n(e,i[0].address,i[0].family)}))}}const h=new A.default,_=()=>{e.cancelToken&&e.cancelToken.unsubscribe(g),e.signal&&e.signal.removeEventListener("abort",g),h.removeAllListeners()};function g(t){h.emit("abort",!t||t.type?new ke(null,e,f):t)}n(((e,t)=>{l=!0,t&&(d=!0,_())})),h.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(g),e.signal&&(e.signal.aborted?g():e.signal.addEventListener("abort",g)));const O=Fe(e.baseURL,e.url),w=new URL(O,"http://localhost"),C=w.protocol||ct[0];if("data:"===C){let n;if("GET"!==c)return Ue(t,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{n=function(e,t,r){const n=r&&r.Blob||we.classes.Blob,o=Be(e);if(void 0===t&&n&&(t=!0),"data"===o){e=o.length?e.slice(o.length+1):e;const r=He.exec(e);if(!r)throw new oe("Invalid URL",oe.ERR_INVALID_URL);const i=r[1],a=r[2],s=r[3],u=Buffer.from(decodeURIComponent(s),a?"base64":"utf8");if(t){if(!n)throw new oe("Blob is not supported",oe.ERR_NOT_SUPPORT);return new n([u],{type:i})}return u}throw new oe("Unsupported protocol "+o,oe.ERR_NOT_SUPPORT)}(e.url,"blob"===s,{Blob:e.env&&e.env.Blob})}catch(t){throw oe.from(t,oe.ERR_BAD_REQUEST,e)}return"text"===s?(n=n.toString(u),u&&"utf8"!==u||(n=ne.stripBOM(n))):"stream"===s&&(n=b.default.Readable.from(n)),Ue(t,r,{data:n,status:200,statusText:"OK",headers:new Ne,config:e})}if(-1===ct.indexOf(C))return r(new oe("Unsupported protocol "+C,oe.ERR_BAD_REQUEST,e));const S=Ne.from(e.headers).normalize();S.set("User-Agent","axios/"+Ge,!1);const I=e.onDownloadProgress,P=e.onUploadProgress,R=e.maxRate;let L,T;if(ne.isSpecCompliantForm(o)){const e=S.getContentType(/boundary=([-_\w\d]{10,70})/i);o=((e,t,r)=>{const{tag:n="form-data-boundary",size:o=25,boundary:i=n+"-"+ne.generateString(o,Je)}=r||{};if(!ne.isFormData(e))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");const a=$e.encode("--"+i+Xe),s=$e.encode("--"+i+"--"+Xe+Xe);let u=s.byteLength;const c=Array.from(e.entries()).map((([e,t])=>{const r=new Qe(e,t);return u+=r.size,r}));u+=a.byteLength*c.length,u=ne.toFiniteNumber(u);const l={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(u)&&(l["Content-Length"]=u),t&&t(l),p.Readable.from(async function*(){for(const e of c)yield a,yield*e.encode();yield s}())})(o,(e=>{S.set(e)}),{tag:`axios-${Ge}-boundary`,boundary:e&&e[1]||void 0})}else if(ne.isFormData(o)&&ne.isFunction(o.getHeaders)){if(S.set(o.getHeaders()),!S.hasContentLength())try{const e=await m.default.promisify(o.getLength).call(o);Number.isFinite(e)&&e>=0&&S.setContentLength(e)}catch(e){}}else if(ne.isBlob(o))o.size&&S.setContentType(o.type||"application/octet-stream"),S.setContentLength(o.size||0),o=b.default.Readable.from(Ke(o));else if(o&&!ne.isStream(o)){if(Buffer.isBuffer(o));else if(ne.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else{if(!ne.isString(o))return r(new oe("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",oe.ERR_BAD_REQUEST,e));o=Buffer.from(o,"utf-8")}if(S.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return r(new oe("Request body larger than maxBodyLength limit",oe.ERR_BAD_REQUEST,e))}const D=ne.toFiniteNumber(S.getContentLength());let x,N;ne.isArray(R)?(L=R[0],T=R[1]):L=T=R,o&&(P||L)&&(ne.isStream(o)||(o=b.default.Readable.from(o,{objectMode:!1})),o=b.default.pipeline([o,new We({length:D,maxRate:ne.toFiniteNumber(L)})],ne.noop),P&&o.on("progress",(e=>{P(Object.assign(e,{upload:!0}))}))),e.auth&&(x=(e.auth.username||"")+":"+(e.auth.password||"")),!x&&w.username&&(x=w.username+":"+w.password),x&&S.delete("authorization");try{N=ve(w.pathname+w.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const n=new Error(t.message);return n.config=e,n.url=e.url,n.exists=!0,r(n)}S.set("Accept-Encoding","gzip, compress, deflate"+(it?", br":""),!1);const j={path:N,method:c,headers:S.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:x,protocol:C,family:a,beforeRedirect:lt,beforeRedirects:{}};let M;!ne.isUndefined(i)&&(j.lookup=i),e.socketPath?j.socketPath=e.socketPath:(j.hostname=w.hostname,j.port=w.port,pt(j,e.proxy,C+"//"+w.hostname+(w.port?":"+w.port:"")+j.path));const k=ut.test(j.protocol);if(j.agent=k?e.httpsAgent:e.httpAgent,e.transport?M=e.transport:0===e.maxRedirects?M=k?E.default:v.default:(e.maxRedirects&&(j.maxRedirects=e.maxRedirects),e.beforeRedirect&&(j.beforeRedirects.config=e.beforeRedirect),M=k?st:at),e.maxBodyLength>-1?j.maxBodyLength=e.maxBodyLength:j.maxBodyLength=1/0,e.insecureHTTPParser&&(j.insecureHTTPParser=e.insecureHTTPParser),f=M.request(j,(function(n){if(f.destroyed)return;const o=[n],i=+n.headers["content-length"];if(I){const e=new We({length:ne.toFiniteNumber(i),maxRate:ne.toFiniteNumber(T)});I&&e.on("progress",(e=>{I(Object.assign(e,{download:!0}))})),o.push(e)}let a=n;const l=n.req||f;if(!1!==e.decompress&&n.headers["content-encoding"])switch("HEAD"!==c&&204!==n.statusCode||delete n.headers["content-encoding"],(n.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":o.push(y.default.createUnzip(nt)),delete n.headers["content-encoding"];break;case"deflate":o.push(new tt),o.push(y.default.createUnzip(nt)),delete n.headers["content-encoding"];break;case"br":it&&(o.push(y.default.createBrotliDecompress(ot)),delete n.headers["content-encoding"])}a=o.length>1?b.default.pipeline(o,ne.noop):o[0];const p=b.default.finished(a,(()=>{p(),_()})),v={status:n.statusCode,statusText:n.statusMessage,headers:new Ne(n.headers),config:e,request:l};if("stream"===s)v.data=a,Ue(t,r,v);else{const n=[];let o=0;a.on("data",(function(t){n.push(t),o+=t.length,e.maxContentLength>-1&&o>e.maxContentLength&&(d=!0,a.destroy(),r(new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l)))})),a.on("aborted",(function(){if(d)return;const t=new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l);a.destroy(t),r(t)})),a.on("error",(function(t){f.destroyed||r(oe.from(t,null,e,l))})),a.on("end",(function(){try{let e=1===n.length?n[0]:Buffer.concat(n);"arraybuffer"!==s&&(e=e.toString(u),u&&"utf8"!==u||(e=ne.stripBOM(e))),v.data=e}catch(t){return r(oe.from(t,null,e,v.request,v))}Ue(t,r,v)}))}h.once("abort",(e=>{a.destroyed||(a.emit("error",e),a.destroy())}))})),h.once("abort",(e=>{r(e),f.destroy(e)})),f.on("error",(function(t){r(oe.from(t,null,e,f))})),f.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void r(new oe("error trying to parse `config.timeout` to int",oe.ERR_BAD_OPTION_VALUE,e,f));f.setTimeout(t,(function(){if(l)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||me;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new oe(t,n.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,f)),g()}))}if(ne.isStream(o)){let t=!1,r=!1;o.on("end",(()=>{t=!0})),o.once("error",(e=>{r=!0,f.destroy(e)})),o.on("close",(()=>{t||r||g(new ke("Request stream has been aborted",e,f))})),o.pipe(f)}else f.end(o)},new Promise(((e,r)=>{let n,o;const i=(e,t)=>{o||(o=!0,n&&n(e,t))},a=e=>{i(e,!0),r(e)};t((t=>{i(t),e(t)}),a,(e=>n=e)).catch(a)}));var t},xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const o=Ne.from(e.headers).normalize();let i,a,{responseType:s,withXSRFToken:u}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(ne.isFormData(n))if(we.hasStandardBrowserEnv||we.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(a=o.getContentType())){const[e,...t]=a?a.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const p=Fe(e.baseURL,e.url);function f(){if(!l)return;const n=Ne.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());Ue((function(e){t(e),c()}),(function(e){r(e),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),ve(p,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(f)},l.onabort=function(){l&&(r(new oe("Request aborted",oe.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new oe("Network Error",oe.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||me;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new oe(t,n.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,l)),l=null},we.hasStandardBrowserEnv&&(u&&ne.isFunction(u)&&(u=u(e)),u||!1!==u&&ht(p))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&dt.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in l&&ne.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),ne.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&"json"!==s&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",_t(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",_t(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(r(!t||t.type?new ke(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const d=Be(p);d&&-1===we.protocols.indexOf(d)?r(new oe("Unsupported protocol "+d+":",oe.ERR_BAD_REQUEST,e)):l.send(n||null)}))}};ne.forEach(vt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Et=e=>`- ${e}`,mt=e=>ne.isFunction(e)||null===e||!1===e,gt=e=>{e=ne.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!mt(r)&&(n=vt[(t=String(r)).toLowerCase()],void 0===n))throw new oe(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new oe("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Et).join("\n"):" "+Et(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function yt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ke(null,e)}function bt(e){return yt(e),e.headers=Ne.from(e.headers),e.data=je.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gt(e.adapter||Ie.adapter)(e).then((function(t){return yt(e),t.data=je.call(e,e.transformResponse,t),t.headers=Ne.from(t.headers),t}),(function(t){return Me(t)||(yt(e),t&&t.response&&(t.response.data=je.call(e,e.transformResponse,t.response),t.response.headers=Ne.from(t.response.headers))),Promise.reject(t)}))}const At=e=>e instanceof Ne?e.toJSON():e;function Ot(e,t){t=t||{};const r={};function n(e,t,r){return ne.isPlainObject(e)&&ne.isPlainObject(t)?ne.merge.call({caseless:r},e,t):ne.isPlainObject(t)?ne.merge({},t):ne.isArray(t)?t.slice():t}function o(e,t,r){return ne.isUndefined(t)?ne.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function i(e,t){if(!ne.isUndefined(t))return n(void 0,t)}function a(e,t){return ne.isUndefined(t)?ne.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>o(At(e),At(t),!0)};return ne.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=u[n]||o,a=i(e[n],t[n],n);ne.isUndefined(a)&&i!==s||(r[n]=a)})),r}const wt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{wt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Ct={};wt.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new oe(n(o," has been removed"+(t?" in "+t:"")),oe.ERR_DEPRECATED);return t&&!Ct[o]&&(Ct[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};const St={assertOptions:function(e,t,r){if("object"!=typeof e)throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new oe("option "+i+" must be "+r,oe.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new oe("Unknown option "+i,oe.ERR_BAD_OPTION)}},validators:wt},It=St.validators;class Pt{constructor(e){this.defaults=e,this.interceptors={request:new Ee,response:new Ee}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ot(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&St.assertOptions(r,{silentJSONParsing:It.transitional(It.boolean),forcedJSONParsing:It.transitional(It.boolean),clarifyTimeoutError:It.transitional(It.boolean)},!1),null!=n&&(ne.isFunction(n)?t.paramsSerializer={serialize:n}:St.assertOptions(n,{encode:It.function,serialize:It.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&ne.merge(o.common,o[t.method]);o&&ne.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ne.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,p=0;if(!s){const e=[bt.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);p<l;)c=c.then(e[p++],e[p++]);return c}l=a.length;let f=t;for(p=0;p<l;){const e=a[p++],t=a[p++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=bt.call(this,f)}catch(e){return Promise.reject(e)}for(p=0,l=u.length;p<l;)c=c.then(u[p++],u[p++]);return c}getUri(e){return ve(Fe((e=Ot(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}ne.forEach(["delete","get","head","options"],(function(e){Pt.prototype[e]=function(t,r){return this.request(Ot(r||{},{method:e,url:t,data:(r||{}).data}))}})),ne.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(Ot(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Pt.prototype[e]=t(),Pt.prototype[e+"Form"]=t(!0)}));const Rt=Pt;class Lt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new ke(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Lt((function(t){e=t})),cancel:e}}}const Tt=Lt,Dt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dt).forEach((([e,t])=>{Dt[t]=e}));const xt=Dt,Nt=function e(t){const r=new Rt(t),n=O(Rt.prototype.request,r);return ne.extend(n,Rt.prototype,r,{allOwnKeys:!0}),ne.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Ot(t,r))},n}(Ie);Nt.Axios=Rt,Nt.CanceledError=ke,Nt.CancelToken=Tt,Nt.isCancel=Me,Nt.VERSION=Ge,Nt.toFormData=pe,Nt.AxiosError=oe,Nt.Cancel=Nt.CanceledError,Nt.all=function(e){return Promise.all(e)},Nt.spread=function(e){return function(t){return e.apply(null,t)}},Nt.isAxiosError=function(e){return ne.isObject(e)&&!0===e.isAxiosError},Nt.mergeConfig=Ot,Nt.AxiosHeaders=Ne,Nt.formToJSON=e=>Ce(ne.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=gt,Nt.HttpStatusCode=xt,Nt.default=Nt,e.exports=Nt},4649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(8804);const o=function(e,t){for(var r=e.length;r--;)if((0,n.Z)(e[r][0],t))return r;return-1};var i=Array.prototype.splice;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,r=o(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,r=o(t,e);return r<0?void 0:t[r][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var r=this.__data__,n=o(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};const s=a},8896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(5546),o=r(3221);const i=(0,n.Z)(o.Z,"Map")},3703:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});const n=(0,r(5546).Z)(Object,"create");var o=Object.prototype.hasOwnProperty;var i=Object.prototype.hasOwnProperty;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}a.prototype.clear=function(){this.__data__=n?n(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)},a.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this};const s=a;var u=r(4649),c=r(8896);const l=function(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map};function p(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}p.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(c.Z||u.Z),string:new s}},p.prototype.delete=function(e){var t=l(this,e).delete(e);return this.size-=t?1:0,t},p.prototype.get=function(e){return l(this,e).get(e)},p.prototype.has=function(e){return l(this,e).has(e)},p.prototype.set=function(e,t){var r=l(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};const f=p},6218:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(4649);var o=r(8896),i=r(3703);function a(e){var t=this.__data__=new n.Z(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new n.Z,this.size=0},a.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var r=this.__data__;if(r instanceof n.Z){var a=r.__data__;if(!o.Z||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i.Z(a)}return r.set(e,t),this.size=r.size,this};const s=a},187:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(3221).Z.Symbol},8282:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(3221).Z.Uint8Array},848:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(4248),o=r(7885),i=r(4975),a=r(6401),s=r(8127),u=Object.prototype.hasOwnProperty;const c=function(e,t){var r=(0,o.Z)(e),c=!r&&(0,n.Z)(e),l=!r&&!c&&(0,i.Z)(e),p=!r&&!c&&!l&&(0,s.Z)(e),f=r||c||l||p,d=f?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],h=d.length;for(var _ in e)!t&&!u.call(e,_)||f&&("length"==_||l&&("offset"==_||"parent"==_)||p&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||(0,a.Z)(_,h))||d.push(_);return d}},5598:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},5810:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},6299:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(905),o=r(8804),i=Object.prototype.hasOwnProperty;const a=function(e,t,r){var a=e[t];i.call(e,t)&&(0,o.Z)(a,r)&&(void 0!==r||t in e)||(0,n.Z)(e,t,r)}},905:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(5088);const o=function(e,t,r){"__proto__"==t&&n.Z?(0,n.Z)(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},7024:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Z});var n=r(6218);var o=r(6299),i=r(2436),a=r(298);var s=r(7477);var u=r(3221),c="object"==typeof exports&&exports&&!exports.nodeType&&exports,l=c&&"object"==typeof module&&module&&!module.nodeType&&module,p=l&&l.exports===c?u.Z.Buffer:void 0,f=p?p.allocUnsafe:void 0;var d=r(6808);var h=r(8390);var _=r(7245),v=r(9878),E=r(8649),m=Object.prototype.hasOwnProperty;var g=r(8282);const y=function(e){var t=new e.constructor(e.byteLength);return new g.Z(t).set(new g.Z(e)),t};var b=/\w*$/;var A=r(187),O=A.Z?A.Z.prototype:void 0,w=O?O.valueOf:void 0;const C=function(e,t,r){var n,o,i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return y(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var r=t?y(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var r=t?y(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,r);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new(o=e).constructor(o.source,b.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return n=e,w?Object(w.call(n)):{}}};var S=r(3122),I=Object.create;const P=function(){function e(){}return function(t){if(!(0,S.default)(t))return{};if(I)return I(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var R=r(9552),L=r(5441);var T=r(7885),D=r(4975),x=r(3391);var N=r(3225),j=r(7755),M=j.Z&&j.Z.isMap;const k=M?(0,N.Z)(M):function(e){return(0,x.Z)(e)&&"[object Map]"==(0,E.Z)(e)};var U=j.Z&&j.Z.isSet;const F=U?(0,N.Z)(U):function(e){return(0,x.Z)(e)&&"[object Set]"==(0,E.Z)(e)};var G="[object Arguments]",B="[object Function]",H="[object Object]",V={};V[G]=V["[object Array]"]=V["[object ArrayBuffer]"]=V["[object DataView]"]=V["[object Boolean]"]=V["[object Date]"]=V["[object Float32Array]"]=V["[object Float64Array]"]=V["[object Int8Array]"]=V["[object Int16Array]"]=V["[object Int32Array]"]=V["[object Map]"]=V["[object Number]"]=V[H]=V["[object RegExp]"]=V["[object Set]"]=V["[object String]"]=V["[object Symbol]"]=V["[object Uint8Array]"]=V["[object Uint8ClampedArray]"]=V["[object Uint16Array]"]=V["[object Uint32Array]"]=!0,V["[object Error]"]=V[B]=V["[object WeakMap]"]=!1;const Z=function e(t,r,u,c,l,p){var g,y=1&r,b=2&r,A=4&r;if(u&&(g=l?u(t,c,l,p):u(t)),void 0!==g)return g;if(!(0,S.default)(t))return t;var O=(0,T.Z)(t);if(O){if(g=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&m.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(t),!y)return function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(t,g)}else{var w=(0,E.Z)(t),I=w==B||"[object GeneratorFunction]"==w;if((0,D.Z)(t))return function(e,t){if(t)return e.slice();var r=e.length,n=f?f(r):new e.constructor(r);return e.copy(n),n}(t,y);if(w==H||w==G||I&&!l){if(g=b||I?{}:function(e){return"function"!=typeof e.constructor||(0,L.Z)(e)?{}:P((0,R.Z)(e))}(t),!y)return b?function(e,t){return(0,i.Z)(e,(0,h.Z)(e),t)}(t,function(e,t){return e&&(0,i.Z)(t,(0,s.Z)(t),e)}(g,t)):function(e,t){return(0,i.Z)(e,(0,d.Z)(e),t)}(t,function(e,t){return e&&(0,i.Z)(t,(0,a.default)(t),e)}(g,t))}else{if(!V[w])return l?t:{};g=C(t,w,y)}}p||(p=new n.Z);var x=p.get(t);if(x)return x;p.set(t,g),F(t)?t.forEach((function(n){g.add(e(n,r,u,n,t,p))})):k(t)&&t.forEach((function(n,o){g.set(o,e(n,r,u,o,t,p))}));var N=A?b?v.Z:_.Z:b?s.Z:a.default,j=O?void 0:N(t);return function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););}(j||t,(function(n,i){j&&(n=t[i=n]),(0,o.Z)(g,i,e(n,r,u,i,t,p))})),g}},9523:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(7653),o=r(7969);const i=function(e,t){for(var r=0,i=(t=(0,n.Z)(t,e)).length;null!=e&&r<i;)e=e[(0,o.Z)(t[r++])];return r&&r==i?e:void 0}},2938:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(5810),o=r(7885);const i=function(e,t,r){var i=t(e);return(0,o.Z)(e)?i:(0,n.Z)(i,r(e))}},9001:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(187),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n.Z?n.Z.toStringTag:void 0;var u=Object.prototype.toString;var c=n.Z?n.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}(e):function(e){return u.call(e)}(e)}},4187:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(6299),o=r(7653),i=r(6401),a=r(3122),s=r(7969);const u=function(e,t,r,u){if(!(0,a.default)(e))return e;for(var c=-1,l=(t=(0,o.Z)(t,e)).length,p=l-1,f=e;null!=f&&++c<l;){var d=(0,s.Z)(t[c]),h=r;if("__proto__"===d||"constructor"===d||"prototype"===d)return e;if(c!=p){var _=f[d];void 0===(h=u?u(_,d,f):void 0)&&(h=(0,a.default)(_)?_:(0,i.Z)(t[c+1])?[]:{})}(0,n.Z)(f,d,h),f=f[d]}return e}},3225:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return function(t){return e(t)}}},7653:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(7885),o=r(3502),i=r(3703);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(a.Cache||i.Z),r}a.Cache=i.Z;var s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g;const c=(l=a((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(s,(function(e,r,n,o){t.push(n?o.replace(u,"$1"):r||e)})),t}),(function(e){return 500===p.size&&p.clear(),e})),p=l.cache,l);var l,p,f=r(187),d=r(5598),h=r(2758),_=f.Z?f.Z.prototype:void 0,v=_?_.toString:void 0;const E=function e(t){if("string"==typeof t)return t;if((0,n.Z)(t))return(0,d.Z)(t,e)+"";if((0,h.Z)(t))return v?v.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r},m=function(e){return null==e?"":E(e)},g=function(e,t){return(0,n.Z)(e)?e:(0,o.Z)(e,t)?[e]:c(m(e))}},2436:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(6299),o=r(905);const i=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(r[c],e[c],c,r,e):void 0;void 0===l&&(l=e[c]),a?(0,o.Z)(r,c,l):(0,n.Z)(r,c,l)}return r}},5088:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(5546);const o=function(){try{var e=(0,n.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},1380:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(5810),o=r(187),i=r(4248),a=r(7885),s=o.Z?o.Z.isConcatSpreadable:void 0;const u=function(e){return(0,a.Z)(e)||(0,i.Z)(e)||!!(s&&e&&e[s])},c=function e(t,r,o,i,a){var s=-1,c=t.length;for(o||(o=u),a||(a=[]);++s<c;){var l=t[s];r>0&&o(l)?r>1?e(l,r-1,o,i,a):(0,n.Z)(a,l):i||(a[a.length]=l)}return a},l=function(e){return null!=e&&e.length?c(e,1):[]};var p=Math.max;var f=r(5088),d=r(9930);const h=f.Z?function(e,t){return(0,f.Z)(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:d.Z;var _=Date.now;const v=(E=h,m=0,g=0,function(){var e=_(),t=16-(e-g);if(g=e,t>0){if(++m>=800)return arguments[0]}else m=0;return E.apply(void 0,arguments)});var E,m,g;const y=function(e){return v(function(e,t,r){return t=p(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=p(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,s)}}(e,void 0,l),e+"")}},2168:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n="object"==typeof global&&global&&global.Object===Object&&global},7245:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(2938),o=r(6808),i=r(298);const a=function(e){return(0,n.Z)(e,i.default,o.Z)}},9878:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(2938),o=r(8390),i=r(7477);const a=function(e){return(0,n.Z)(e,i.Z,o.Z)}},5546:(e,t,r)=>{"use strict";r.d(t,{Z:()=>v});var n=r(8936);const o=r(3221).Z["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var s=r(3122),u=r(6682),c=/^\[object .+?Constructor\]$/,l=Function.prototype,p=Object.prototype,f=l.toString,d=p.hasOwnProperty,h=RegExp("^"+f.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const _=function(e){return!(!(0,s.default)(e)||(t=e,a&&a in t))&&((0,n.Z)(e)?h:c).test((0,u.Z)(e));var t},v=function(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return _(r)?r:void 0}},9552:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=(0,r(6048).Z)(Object.getPrototypeOf,Object)},6808:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(813),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const a=i?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}(i(e),(function(t){return o.call(e,t)})))}:n.Z},8390:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(5810),o=r(9552),i=r(6808),a=r(813);const s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,n.Z)(t,(0,i.Z)(e)),e=(0,o.Z)(e);return t}:a.Z},8649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>O});var n=r(5546),o=r(3221);const i=(0,n.Z)(o.Z,"DataView");var a=r(8896);const s=(0,n.Z)(o.Z,"Promise"),u=(0,n.Z)(o.Z,"Set"),c=(0,n.Z)(o.Z,"WeakMap");var l=r(9001),p=r(6682),f="[object Map]",d="[object Promise]",h="[object Set]",_="[object WeakMap]",v="[object DataView]",E=(0,p.Z)(i),m=(0,p.Z)(a.Z),g=(0,p.Z)(s),y=(0,p.Z)(u),b=(0,p.Z)(c),A=l.Z;(i&&A(new i(new ArrayBuffer(1)))!=v||a.Z&&A(new a.Z)!=f||s&&A(s.resolve())!=d||u&&A(new u)!=h||c&&A(new c)!=_)&&(A=function(e){var t=(0,l.Z)(e),r="[object Object]"==t?e.constructor:void 0,n=r?(0,p.Z)(r):"";if(n)switch(n){case E:return v;case m:return f;case g:return d;case y:return h;case b:return _}return t});const O=A},6401:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=/^(?:0|[1-9]\d*)$/;const o=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},3502:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(7885),o=r(2758),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const s=function(e,t){if((0,n.Z)(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!(0,o.Z)(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},5441:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=Object.prototype;const o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},7755:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(2168),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o&&n.Z.process;const s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}()},6048:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){return function(r){return e(t(r))}}},3221:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(2168),o="object"==typeof self&&self&&self.Object===Object&&self;const i=n.Z||o||Function("return this")()},7969:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(2758);const o=function(e){if("string"==typeof e||(0,n.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},6682:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=Function.prototype.toString;const o=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7921:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(7024);const o=function(e){return(0,n.Z)(e,5)}},8804:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){return e===t||e!=e&&t!=t}},772:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(9523);const o=function(e,t,r){var o=null==e?void 0:(0,n.Z)(e,t);return void 0===o?r:o}},3488:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});const n=function(e,t){return null!=e&&t in Object(e)};var o=r(7653),i=r(4248),a=r(7885),s=r(6401),u=r(1164),c=r(7969);const l=function(e,t){return null!=e&&function(e,t,r){for(var n=-1,l=(t=(0,o.Z)(t,e)).length,p=!1;++n<l;){var f=(0,c.Z)(t[n]);if(!(p=null!=e&&r(e,f)))break;e=e[f]}return p||++n!=l?p:!!(l=null==e?0:e.length)&&(0,u.Z)(l)&&(0,s.Z)(f,l)&&((0,a.Z)(e)||(0,i.Z)(e))}(e,t,n)}},9930:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return e}},4248:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(9001),o=r(3391);const i=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,n.Z)(e)};var a=Object.prototype,s=a.hasOwnProperty,u=a.propertyIsEnumerable;const c=i(function(){return arguments}())?i:function(e){return(0,o.Z)(e)&&s.call(e,"callee")&&!u.call(e,"callee")}},7885:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=Array.isArray},3282:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(8936),o=r(1164);const i=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,n.Z)(e)}},4975:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(3221);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?n.Z.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},8936:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9001),o=r(3122);const i=function(e){if(!(0,o.default)(e))return!1;var t=(0,n.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1164:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3122:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3391:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return null!=e&&"object"==typeof e}},2758:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9001),o=r(3391);const i=function(e){return"symbol"==typeof e||(0,o.Z)(e)&&"[object Symbol]"==(0,n.Z)(e)}},8127:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(9001),o=r(1164),i=r(3391),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=r(3225),u=r(7755),c=u.Z&&u.Z.isTypedArray;const l=c?(0,s.Z)(c):function(e){return(0,i.Z)(e)&&(0,o.Z)(e.length)&&!!a[(0,n.Z)(e)]}},298:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(848),o=r(5441);const i=(0,r(6048).Z)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;var s=r(3282);const u=function(e){return(0,s.Z)(e)?(0,n.Z)(e):function(e){if(!(0,o.Z)(e))return i(e);var t=[];for(var r in Object(e))a.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}},7477:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(848),o=r(3122),i=r(5441);var a=Object.prototype.hasOwnProperty;const s=function(e){if(!(0,o.default)(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=(0,i.Z)(e),r=[];for(var n in e)("constructor"!=n||!t&&a.call(e,n))&&r.push(n);return r};var u=r(3282);const c=function(e){return(0,u.Z)(e)?(0,n.Z)(e,!0):s(e)}},1395:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>A});var n=r(5598),o=r(7024),i=r(7653);var a=r(9523);const s=function(e,t){return t.length<2?e:(0,a.Z)(e,function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}(t,0,-1))};var u=r(7969);const c=function(e,t){return t=(0,i.Z)(t,e),null==(e=s(e,t))||delete e[(0,u.Z)((r=t,n=null==r?0:r.length,n?r[n-1]:void 0))];var r,n};var l=r(2436),p=r(9001),f=r(9552),d=r(3391),h=Function.prototype,_=Object.prototype,v=h.toString,E=_.hasOwnProperty,m=v.call(Object);const g=function(e){return function(e){if(!(0,d.Z)(e)||"[object Object]"!=(0,p.Z)(e))return!1;var t=(0,f.Z)(e);if(null===t)return!0;var r=E.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&v.call(r)==m}(e)?void 0:e};var y=r(1380),b=r(9878);const A=(0,y.Z)((function(e,t){var r={};if(null==e)return r;var a=!1;t=(0,n.Z)(t,(function(t){return t=(0,i.Z)(t,e),a||(a=t.length>1),t})),(0,l.Z)(e,(0,b.Z)(e),r),a&&(r=(0,o.Z)(r,7,g));for(var s=t.length;s--;)c(r,t[s]);return r}))},8337:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(9523),o=r(4187),i=r(7653);var a=r(3488);const s=function(e,t){return function(e,t,r){for(var a=-1,s=t.length,u={};++a<s;){var c=t[a],l=(0,n.Z)(e,c);r(l,c)&&(0,o.Z)(u,(0,i.Z)(c,e),l)}return u}(e,t,(function(t,r){return(0,a.Z)(e,r)}))},u=(0,r(1380).Z)((function(e,t){return null==e?{}:s(e,t)}))},6503:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>K});const n=function(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r},o=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}return e};var i=r(298);var a=r(3282);const s=(u=function(e,t){return e&&o(e,t,i.default)},function(e,t){if(null==e)return e;if(!(0,a.Z)(e))return u(e,t);for(var r=e.length,n=-1,o=Object(e);++n<r&&!1!==t(o[n],n,o););return e});var u,c=r(6218),l=r(3703);function p(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new l.Z;++t<r;)this.add(e[t])}p.prototype.add=p.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},p.prototype.has=function(e){return this.__data__.has(e)};const f=p,d=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},h=function(e,t,r,n,o,i){var a=1&r,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var p=-1,h=!0,_=2&r?new f:void 0;for(i.set(e,t),i.set(t,e);++p<s;){var v=e[p],E=t[p];if(n)var m=a?n(E,v,p,t,e,i):n(v,E,p,e,t,i);if(void 0!==m){if(m)continue;h=!1;break}if(_){if(!d(t,(function(e,t){if(a=t,!_.has(a)&&(v===e||o(v,e,r,n,i)))return _.push(t);var a}))){h=!1;break}}else if(v!==E&&!o(v,E,r,n,i)){h=!1;break}}return i.delete(e),i.delete(t),h};var _=r(187),v=r(8282),E=r(8804);const m=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r},g=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r};var y=_.Z?_.Z.prototype:void 0,b=y?y.valueOf:void 0;var A=r(7245),O=Object.prototype.hasOwnProperty;var w=r(8649),C=r(7885),S=r(4975),I=r(8127),P="[object Arguments]",R="[object Array]",L="[object Object]",T=Object.prototype.hasOwnProperty;const D=function(e,t,r,n,o,i){var a=(0,C.Z)(e),s=(0,C.Z)(t),u=a?R:(0,w.Z)(e),l=s?R:(0,w.Z)(t),p=(u=u==P?L:u)==L,f=(l=l==P?L:l)==L,d=u==l;if(d&&(0,S.Z)(e)){if(!(0,S.Z)(t))return!1;a=!0,p=!1}if(d&&!p)return i||(i=new c.Z),a||(0,I.Z)(e)?h(e,t,r,n,o,i):function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new v.Z(e),new v.Z(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,E.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=m;case"[object Set]":var u=1&n;if(s||(s=g),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var l=h(s(e),s(t),n,o,i,a);return a.delete(e),l;case"[object Symbol]":if(b)return b.call(e)==b.call(t)}return!1}(e,t,u,r,n,o,i);if(!(1&r)){var _=p&&T.call(e,"__wrapped__"),y=f&&T.call(t,"__wrapped__");if(_||y){var D=_?e.value():e,x=y?t.value():t;return i||(i=new c.Z),o(D,x,r,n,i)}}return!!d&&(i||(i=new c.Z),function(e,t,r,n,o,i){var a=1&r,s=(0,A.Z)(e),u=s.length;if(u!=(0,A.Z)(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:O.call(t,l)))return!1}var p=i.get(e),f=i.get(t);if(p&&f)return p==t&&f==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var _=e[l=s[c]],v=t[l];if(n)var E=a?n(v,_,l,t,e,i):n(_,v,l,e,t,i);if(!(void 0===E?_===v||o(_,v,r,n,i):E)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var m=e.constructor,g=t.constructor;m==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof g&&g instanceof g||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,r,n,o,i))};var x=r(3391);const N=function e(t,r,n,o,i){return t===r||(null==t||null==r||!(0,x.Z)(t)&&!(0,x.Z)(r)?t!=t&&r!=r:D(t,r,n,o,e,i))};var j=r(3122);const M=function(e){return e==e&&!(0,j.default)(e)},k=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}},U=function(e){var t=function(e){for(var t=(0,i.default)(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,M(o)]}return t}(e);return 1==t.length&&t[0][2]?k(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var u=(s=r[o])[0],l=e[u],p=s[1];if(a&&s[2]){if(void 0===l&&!(u in e))return!1}else{var f=new c.Z;if(n)var d=n(l,p,u,e,t,f);if(!(void 0===d?N(p,l,3,n,f):d))return!1}}return!0}(r,e,t)}};var F=r(772),G=r(3488),B=r(3502),H=r(7969);var V=r(9930);var Z=r(9523);const q=function(e){return(0,B.Z)(e)?(t=(0,H.Z)(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return(0,Z.Z)(t,e)}}(e);var t},W=function(e){return"function"==typeof e?e:null==e?V.Z:"object"==typeof e?(0,C.Z)(e)?(t=e[0],r=e[1],(0,B.Z)(t)&&M(r)?k((0,H.Z)(t),r):function(e){var n=(0,F.default)(e,t);return void 0===n&&n===r?(0,G.Z)(e,t):N(r,n,3)}):U(e):q(e);var t,r},z=function(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r},K=function(e,t,r){var o=(0,C.Z)(e)?n:z,i=arguments.length<3;return o(e,W(t),r,i,s)}},5513:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(4187);const o=function(e,t,r){return null==e?e:(0,n.Z)(e,t,r)}},813:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(){return[]}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(3607);return __webpack_exports__})()));