edgeone 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,128 @@
1
+
2
+ <br/>
3
+ <div align="center">
4
+ <img src="https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/8f2d5c70-8f06-4366-ae29-1a3eb9c7f602.svg" height="96">
5
+ <h3 align="center">EdgeOne CLI</h3>
6
+ </div>
7
+
8
+ <br/>
9
+
10
+ ## Overview
11
+
12
+ EdgeOne Pages is a front-end development and deployment platform built on Tencent EdgeOne infrastructure, designed for modern web development. It enables developers to quickly build and deploy static sites and serverless applications. By integrating edge function capabilities, it ensures efficient content delivery and dynamic functionality expansion, supporting fast access for users worldwide.
13
+
14
+ EdgeOne CLI can help you manage and debug Pages Functions in the project more efficiently.
15
+
16
+ <br/>
17
+
18
+ ## 1. Preparations
19
+
20
+
21
+ - Create a [Pages project](https://edgeone.ai/pages/new?s_url=https://console.tencentcloud.com/edgeone/pages) in the Console, and clone the repository to Local.
22
+
23
+ - Go to the [CAM](https://edgeone.ai/pages/new?s_url=https://console.tencentcloud.com/cam/capi) Page to Retrieve `SecretKey` and `SecretId`.
24
+
25
+ *If you are a China site user, please go to the corresponding [Pages](https://console.cloud.tencent.com/edgeone/pages) and [CAM](https://console.cloud.tencent.com/cam/capi) pages.*
26
+
27
+ <br />
28
+
29
+ ## 2. Quick Start
30
+
31
+ ### 1. Install
32
+
33
+ In the cloned project during the preparation stage, you can use npm to install the CLI:
34
+ ``` plaintext
35
+ npm install -g edgeone
36
+ ```
37
+
38
+ Use the `edgeone -v` command to check if the installation is successful. Use the `edgeone -h` command to view all relevant commands.
39
+
40
+ ###
41
+
42
+ ### 2. Log in
43
+
44
+ Execute the login command and enter your `SecretKey` and `SecretId` as prompted to complete the login.
45
+ ``` plaintext
46
+ edgeone login
47
+ ```
48
+
49
+ After completing the login, you can use the `edgeone whoami` command to view the current login account information.
50
+
51
+
52
+
53
+ ### 3. Initialize
54
+
55
+ After successful login, execute the initialization command to initialize the basic environment required by Edgeone Pages in the project:
56
+ ``` plaintext
57
+ edgeone pages init
58
+ ```
59
+
60
+ After initialization, a `functions` folder and sample functions will be generated in the root directory of the project. You can continue to add and develop functions in this folder.
61
+
62
+
63
+
64
+ ### 4. Local Development
65
+
66
+ After completing initialization, enter the local development stage:
67
+ ``` plaintext
68
+ edgeone pages dev
69
+ ```
70
+
71
+ Executing the command will start a service on the local port 8088 by default. You can access the sample function via `http://localhost:8088/helloworld`. Here, the access path is the address path of the function file in the `functions` folder.
72
+
73
+
74
+
75
+ During local development, the service for Pages Functions and the service for the Pages project may run on different ports. In order to allow the Pages project to call functions, you can use a proxy server or reverse proxy to forward requests to the correct port. Here is an example configuration of webpack-dev-server:
76
+ ``` javascript
77
+ module.exports = {
78
+ devServer: {
79
+ proxy: {
80
+ '/api': {
81
+ target: 'http://localhost:8088', // Local Development Service Address for Pages Function
82
+ chagneOrigin: true,
83
+ pathRewrite: {
84
+ '^/api': '',
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ ```
91
+
92
+ In this way, use the Fetch API in the Pages project:
93
+ ``` javascript
94
+ fetch('/api/my-functions', {
95
+ method: 'POST',
96
+ body: JSON.stringify({ data: 'example' }),
97
+ })
98
+ ```
99
+
100
+
101
+
102
+ ### 5. Associated Project
103
+
104
+ If you need to use the Key-Value Storage capability or synchronize the environment variables set in the console to local debugging, you can execute the Associated Project commands, enter the project name as required. The project name here is the one created in the Preparation Work of the Pages project.
105
+ ``` plaintext
106
+ edgeone pages link
107
+ ```
108
+
109
+
110
+
111
+ ### 6. Submit for Deployment
112
+
113
+ After local development and debugging are completed, push the project code to the Git remote to trigger the CI build and deployment in the Pages backend, completing the entire development process.
114
+
115
+
116
+ <br/>
117
+
118
+ ## References
119
+ [Pages Introduction](https://edgeone.ai/document/160427672992178176) | [Pages Functions](https://edgeone.ai/document/162227908259442688)
120
+
121
+ *To access the China site documentation, please click [here](https://edgeone.cloud.tencent.com/pages/document/162936635171454976).*
122
+
123
+ <br/>
124
+
125
+ ## Contact
126
+ If you need technical support, please [contact us](https://edgeone.ai/contact?source=edgeone-cli).
127
+
128
+
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ var _a;
3
+ "use strict";var Fn=Object.create;var Dt=Object.defineProperty;var An=Object.getOwnPropertyDescriptor;var Un=Object.getOwnPropertyNames;var Bn=Object.getPrototypeOf,Mn=Object.prototype.hasOwnProperty;var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Dn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Un(e))!Mn.call(t,s)&&s!==r&&Dt(t,s,{get:()=>e[s],enumerable:!(n=An(e,s))||n.enumerable});return t};var ue=(t,e,r)=>(r=t!=null?Fn(Bn(t)):{},Dn(e||!t||!t.__esModule?Dt(r,"default",{value:t,enumerable:!0}):r,t));var Ht=p(jt=>{var d=jt,{Buffer:we}=require("buffer"),jn=require("os");d.toBuffer=function(t,e,r){r=~~r;let n;if(this.isV4Format(t))n=e||we.alloc(r+4),t.split(/\./g).map(s=>{n[r++]=parseInt(s,10)&255});else if(this.isV6Format(t)){let s=t.split(":",8),o;for(o=0;o<s.length;o++){let a=this.isV4Format(s[o]),u;a&&(u=this.toBuffer(s[o]),s[o]=u.slice(0,2).toString("hex")),u&&++o<8&&s.splice(o,0,u.slice(2,4).toString("hex"))}if(s[0]==="")for(;s.length<8;)s.unshift("0");else if(s[s.length-1]==="")for(;s.length<8;)s.push("0");else if(s.length<8){for(o=0;o<s.length&&s[o]!=="";o++);let a=[o,1];for(o=9-s.length;o>0;o--)a.push("0");s.splice(...a)}for(n=e||we.alloc(r+16),o=0;o<s.length;o++){let a=parseInt(s[o],16);n[r++]=a>>8&255,n[r++]=a&255}}if(!n)throw Error(`Invalid ip address: ${t}`);return n};d.toString=function(t,e,r){e=~~e,r=r||t.length-e;let n=[];if(r===4){for(let s=0;s<r;s++)n.push(t[e+s]);n=n.join(".")}else if(r===16){for(let s=0;s<r;s+=2)n.push(t.readUInt16BE(e+s).toString(16));n=n.join(":"),n=n.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3"),n=n.replace(/:{3,4}/,"::")}return n};var Hn=/^(\d{1,3}\.){3,3}\d{1,3}$/,kn=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;d.isV4Format=function(t){return Hn.test(t)};d.isV6Format=function(t){return kn.test(t)};function ce(t){return t===4?"ipv4":t===6?"ipv6":t?t.toLowerCase():"ipv4"}d.fromPrefixLen=function(t,e){t>32?e="ipv6":e=ce(e);let r=4;e==="ipv6"&&(r=16);let n=we.alloc(r);for(let s=0,o=n.length;s<o;++s){let a=8;t<8&&(a=t),t-=a,n[s]=~(255>>a)&255}return d.toString(n)};d.mask=function(t,e){t=d.toBuffer(t),e=d.toBuffer(e);let r=we.alloc(Math.max(t.length,e.length)),n;if(t.length===e.length)for(n=0;n<t.length;n++)r[n]=t[n]&e[n];else if(e.length===4)for(n=0;n<e.length;n++)r[n]=t[t.length-4+n]&e[n];else{for(n=0;n<r.length-6;n++)r[n]=0;for(r[10]=255,r[11]=255,n=0;n<t.length;n++)r[n+12]=t[n]&e[n+12];n+=12}for(;n<r.length;n++)r[n]=0;return d.toString(r)};d.cidr=function(t){let e=t.split("/"),r=e[0];if(e.length!==2)throw new Error(`invalid CIDR subnet: ${r}`);let n=d.fromPrefixLen(parseInt(e[1],10));return d.mask(r,n)};d.subnet=function(t,e){let r=d.toLong(d.mask(t,e)),n=d.toBuffer(e),s=0;for(let a=0;a<n.length;a++)if(n[a]===255)s+=8;else{let u=n[a]&255;for(;u;)u=u<<1&255,s++}let o=2**(32-s);return{networkAddress:d.fromLong(r),firstAddress:o<=2?d.fromLong(r):d.fromLong(r+1),lastAddress:o<=2?d.fromLong(r+o-1):d.fromLong(r+o-2),broadcastAddress:d.fromLong(r+o-1),subnetMask:e,subnetMaskLength:s,numHosts:o<=2?o:o-2,length:o,contains(a){return r===d.toLong(d.mask(a,e))}}};d.cidrSubnet=function(t){let e=t.split("/"),r=e[0];if(e.length!==2)throw new Error(`invalid CIDR subnet: ${r}`);let n=d.fromPrefixLen(parseInt(e[1],10));return d.subnet(r,n)};d.not=function(t){let e=d.toBuffer(t);for(let r=0;r<e.length;r++)e[r]=255^e[r];return d.toString(e)};d.or=function(t,e){if(t=d.toBuffer(t),e=d.toBuffer(e),t.length===e.length){for(let o=0;o<t.length;++o)t[o]|=e[o];return d.toString(t)}let r=t,n=e;e.length>t.length&&(r=e,n=t);let s=r.length-n.length;for(let o=s;o<r.length;++o)r[o]|=n[o-s];return d.toString(r)};d.isEqual=function(t,e){if(t=d.toBuffer(t),e=d.toBuffer(e),t.length===e.length){for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}if(e.length===4){let n=e;e=t,t=n}for(let n=0;n<10;n++)if(e[n]!==0)return!1;let r=e.readUInt16BE(10);if(r!==0&&r!==65535)return!1;for(let n=0;n<4;n++)if(t[n]!==e[n+12])return!1;return!0};d.isPrivate=function(t){if(d.isLoopback(t))return!0;if(!d.isV6Format(t)){let e=d.normalizeToLong(t);if(e<0)throw new Error("invalid ipv4 address");t=d.fromLong(e)}return/^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(t)||/^f[cd][0-9a-f]{2}:/i.test(t)||/^fe80:/i.test(t)||/^::1$/.test(t)||/^::$/.test(t)};d.isPublic=function(t){return!d.isPrivate(t)};d.isLoopback=function(t){return!/\./.test(t)&&!/:/.test(t)&&(t=d.fromLong(Number(t))),/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(t)||/^0177\./.test(t)||/^0x7f\./i.test(t)||/^fe80::1$/i.test(t)||/^::1$/.test(t)||/^::$/.test(t)};d.loopback=function(t){if(t=ce(t),t!=="ipv4"&&t!=="ipv6")throw new Error("family must be ipv4 or ipv6");return t==="ipv4"?"127.0.0.1":"fe80::1"};d.address=function(t,e){let r=jn.networkInterfaces();if(e=ce(e),t&&t!=="private"&&t!=="public"){let s=r[t].filter(o=>ce(o.family)===e);return s.length===0?void 0:s[0].address}let n=Object.keys(r).map(s=>{let o=r[s].filter(a=>(a.family=ce(a.family),a.family!==e||d.isLoopback(a.address)?!1:t?t==="public"?d.isPrivate(a.address):d.isPublic(a.address):!0));return o.length?o[0].address:void 0}).filter(Boolean);return n.length?n[0]:d.loopback(e)};d.toLong=function(t){let e=0;return t.split(".").forEach(r=>{e<<=8,e+=parseInt(r)}),e>>>0};d.fromLong=function(t){return`${t>>>24}.${t>>16&255}.${t>>8&255}.${t&255}`};d.normalizeToLong=function(t){let e=t.split(".").map(s=>s.startsWith("0x")||s.startsWith("0X")?parseInt(s,16):s.startsWith("0")&&s!=="0"&&/^[0-7]+$/.test(s)?parseInt(s,8):/^[1-9]\d*$/.test(s)||s==="0"?parseInt(s,10):NaN);if(e.some(isNaN))return-1;let r=0;switch(e.length){case 1:r=e[0];break;case 2:if(e[0]>255||e[1]>16777215)return-1;r=e[0]<<24|e[1]&16777215;break;case 3:if(e[0]>255||e[1]>255||e[2]>65535)return-1;r=e[0]<<24|e[1]<<16|e[2]&65535;break;case 4:if(e.some(s=>s>255))return-1;r=e[0]<<24|e[1]<<16|e[2]<<8|e[3];break;default:return-1}return r>>>0}});var kt=p(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.Request=void 0;var Gn=function(){function t(){this.mParams=new Map}return t.prototype.getParam=function(e){return this.mParams.has(e)&&this.mParams.get(e)||""},t.prototype.setParam=function(e,r){r==null?this.mParams.set(e,""):this.mParams.set(e,r)},t.prototype.getAllParams=function(){return this.mParams},t}();Oe.Request=Gn});var Gt=p(V=>{"use strict";var $n=V&&V.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(n[o]=s[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(V,"__esModule",{value:!0});V.PutLogsRequest=void 0;var zn=kt(),Jn=function(t){$n(e,t);function e(r,n){var s=t.call(this)||this;return s.topic=r,s.logItems=n,s}return e.prototype.getFilename=function(){return this.logItems.getFilename()},e.prototype.setFilename=function(r){this.logItems.setFilename(r)},e.prototype.getTopic=function(){return this.topic},e.prototype.setTopic=function(r){this.topic=r},e.prototype.getSource=function(){return this.source},e.prototype.setSource=function(r){this.source=r},e.prototype.getLogItems=function(){return this.logItems},e.prototype.setlogItems=function(r){this.logItems=r},e.prototype.encodeLogItems=function(){return JSON.stringify(this.logItems)},e}(zn.Request);V.PutLogsRequest=Jn});var Je=p(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.Response=void 0;var Vn=function(){function t(){this.httpStatusCode=0,this.mHeaders={},this.errorCode="",this.errorMessage=""}return t.prototype.getHeader=function(e){return this.mHeaders[e]?this.mHeaders[e]:[]},t.prototype.setHttpStatusCode=function(e){this.httpStatusCode=e},t.prototype.setErrorCode=function(e){this.errorCode=e},t.prototype.setErrorMessage=function(e){this.errorMessage=e},t.prototype.getHttpStatusCode=function(){return this.httpStatusCode},t.prototype.getErrorCode=function(){return this.errorCode},t.prototype.getErrorMessage=function(){return this.errorMessage},t.prototype.setAllHeaders=function(e){this.mHeaders=e},t.prototype.getAllHeaders=function(){return this.mHeaders},t}();be.Response=Vn});var $t=p(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.LogGroup=W.Log=void 0;var Wn=function(){function t(e){this.contents={},this.time=e}return t.prototype.setTime=function(e){this.time=e},t.prototype.getTime=function(){return this.time},t.prototype.addContent=function(e,r){this.contents[e]=r},t}();W.Log=Wn;var Xn=function(){function t(e,r,n){this.logs=[],this.source=e,r!=null&&r!=null&&(this.filename=""),n!=null&&n!=null&&(this.contextflow="")}return t.prototype.setSource=function(e){this.source=e},t.prototype.getSource=function(){return this.source},t.prototype.setContextFlow=function(){this.contextflow=this.contextflow},t.prototype.getContextFlow=function(){return this.contextflow},t.prototype.setFilename=function(e){this.filename=e},t.prototype.getFilename=function(){return this.filename},t.prototype.setLogs=function(e){this.logs=e},t.prototype.getLogs=function(){return this.logs},t.prototype.addLog=function(e){this.logs.push(e)},t}();W.LogGroup=Xn});var zt=p(fe=>{"use strict";var Yn=fe&&fe.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(n[o]=s[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(fe,"__esModule",{value:!0});var Zn=function(t){Yn(e,t);function e(r,n){n===void 0&&(n="");var s=t.call(this,r)||this;return s.requestId=n||"",s}return e.prototype.getMessage=function(){return this.message},e.prototype.getRequestId=function(){return this.requestId},e.prototype.toString=function(){return"[TencentCloudSDKException]message:"+this.getMessage()+" requestId:"+this.getRequestId()},e.prototype.toLocaleString=function(){return"[TencentCloudSDKException]message:"+this.getMessage()+" requestId:"+this.getRequestId()},e}(Error);fe.default=Zn});var Jt=p(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.SORT=h.CONTEXT=h.LIMIT=h.QUERY_STRING=h.END_TIME=h.START_TIME=h.LOGSET_ID=h.TOPIC_IDS=h.CONST_LZ4=h.CONST_X_SLS_COMPRESSTYPE=h.CONST_MAX_PUT_SIZE=h.UPLOAD_LOG_RESOURCE_URI=h.TOPIC_ID=h.HTTP_SEND_TIME_OUT=h.HTTP_CONNECT_TIME_OUT=h.CONST_LOCAL_IP=h.UTF_8_ENCODING=h.CONST_MD5=h.CONST_HOST=h.CONST_X_SLS_REQUESTID=h.CONST_HTTP_METHOD_GET=h.CONST_HTTP_METHOD_POST=h.CONST_GZIP_ENCODING=h.CONST_AUTHORIZATION=h.CONST_CONTENT_LENGTH=h.CONST_JSON=h.CONST_PROTO_BUF=h.CONST_CONTENT_TYPE=void 0;h.CONST_CONTENT_TYPE="Content-Type";h.CONST_PROTO_BUF="application/x-protobuf";h.CONST_JSON="application/json";h.CONST_CONTENT_LENGTH="Content-Length";h.CONST_AUTHORIZATION="Authorization";h.CONST_GZIP_ENCODING="deflate";h.CONST_HTTP_METHOD_POST="POST";h.CONST_HTTP_METHOD_GET="GET";h.CONST_X_SLS_REQUESTID="x-log-requestid";h.CONST_HOST="Host";h.CONST_MD5="MD5";h.UTF_8_ENCODING="UTF-8";h.CONST_LOCAL_IP="127.0.0.1";h.HTTP_CONNECT_TIME_OUT=60*1e3;h.HTTP_SEND_TIME_OUT=60*1e3;h.TOPIC_ID="topic_id";h.UPLOAD_LOG_RESOURCE_URI="/tracklog";h.CONST_MAX_PUT_SIZE=1*1024*1024;h.CONST_X_SLS_COMPRESSTYPE="x-cls-compress-type";h.CONST_LZ4="lz4";h.TOPIC_IDS="topic_ids";h.LOGSET_ID="logset_id";h.START_TIME="start_time";h.END_TIME="end_time";h.QUERY_STRING="query_string";h.LIMIT="limit";h.CONTEXT="context";h.SORT="sort"});var Ve=p((Ko,Vt)=>{"use strict";Vt.exports=function(e,r){return function(){for(var s=new Array(arguments.length),o=0;o<s.length;o++)s[o]=arguments[o];return e.apply(r,s)}}});var R=p((Qo,Yt)=>{"use strict";var Kn=Ve(),G=Object.prototype.toString;function Ye(t){return G.call(t)==="[object Array]"}function We(t){return typeof t>"u"}function Qn(t){return t!==null&&!We(t)&&t.constructor!==null&&!We(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function es(t){return G.call(t)==="[object ArrayBuffer]"}function ts(t){return typeof FormData<"u"&&t instanceof FormData}function rs(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function ns(t){return typeof t=="string"}function ss(t){return typeof t=="number"}function Wt(t){return t!==null&&typeof t=="object"}function Re(t){if(G.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function os(t){return G.call(t)==="[object Date]"}function is(t){return G.call(t)==="[object File]"}function as(t){return G.call(t)==="[object Blob]"}function Xt(t){return G.call(t)==="[object Function]"}function us(t){return Wt(t)&&Xt(t.pipe)}function cs(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function fs(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function ls(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Ze(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),Ye(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.call(null,t[s],s,t)}function Xe(){var t={};function e(s,o){Re(t[o])&&Re(s)?t[o]=Xe(t[o],s):Re(s)?t[o]=Xe({},s):Ye(s)?t[o]=s.slice():t[o]=s}for(var r=0,n=arguments.length;r<n;r++)Ze(arguments[r],e);return t}function hs(t,e,r){return Ze(e,function(s,o){r&&typeof s=="function"?t[o]=Kn(s,r):t[o]=s}),t}function ds(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}Yt.exports={isArray:Ye,isArrayBuffer:es,isBuffer:Qn,isFormData:ts,isArrayBufferView:rs,isString:ns,isNumber:ss,isObject:Wt,isPlainObject:Re,isUndefined:We,isDate:os,isFile:is,isBlob:as,isFunction:Xt,isStream:us,isURLSearchParams:cs,isStandardBrowserEnv:ls,forEach:Ze,merge:Xe,extend:hs,trim:fs,stripBOM:ds}});var xe=p((ei,Kt)=>{"use strict";var X=R();function Zt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}Kt.exports=function(e,r,n){if(!r)return e;var s;if(n)s=n(r);else if(X.isURLSearchParams(r))s=r.toString();else{var o=[];X.forEach(r,function(l,c){l===null||typeof l>"u"||(X.isArray(l)?c=c+"[]":l=[l],X.forEach(l,function(f){X.isDate(f)?f=f.toISOString():X.isObject(f)&&(f=JSON.stringify(f)),o.push(Zt(c)+"="+Zt(f))}))}),s=o.join("&")}if(s){var a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}});var er=p((ti,Qt)=>{"use strict";var ps=R();function Se(){this.handlers=[]}Se.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};Se.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Se.prototype.forEach=function(e){ps.forEach(this.handlers,function(n){n!==null&&e(n)})};Qt.exports=Se});var rr=p((ri,tr)=>{"use strict";var ms=R();tr.exports=function(e,r){ms.forEach(e,function(s,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(e[r]=s,delete e[o])})}});var qe=p((ni,nr)=>{"use strict";nr.exports=function(e,r,n,s,o){return e.config=r,n&&(e.code=n),e.request=s,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}});var Le=p((si,sr)=>{"use strict";var vs=qe();sr.exports=function(e,r,n,s,o){var a=new Error(e);return vs(a,r,n,s,o)}});var Ke=p((oi,or)=>{"use strict";var gs=Le();or.exports=function(e,r,n){var s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):r(gs("Request failed with status code "+n.status,n.config,null,n.request,n))}});var ar=p((ii,ir)=>{"use strict";var Ne=R();ir.exports=Ne.isStandardBrowserEnv()?function(){return{write:function(r,n,s,o,a,u){var l=[];l.push(r+"="+encodeURIComponent(n)),Ne.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),Ne.isString(o)&&l.push("path="+o),Ne.isString(a)&&l.push("domain="+a),u===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var cr=p((ai,ur)=>{"use strict";ur.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var lr=p((ui,fr)=>{"use strict";fr.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var Qe=p((ci,hr)=>{"use strict";var ys=cr(),Cs=lr();hr.exports=function(e,r){return e&&!ys(r)?Cs(e,r):r}});var pr=p((fi,dr)=>{"use strict";var et=R(),_s=["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"];dr.exports=function(e){var r={},n,s,o;return e&&et.forEach(e.split(`
4
+ `),function(u){if(o=u.indexOf(":"),n=et.trim(u.substr(0,o)).toLowerCase(),s=et.trim(u.substr(o+1)),n){if(r[n]&&_s.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([s]):r[n]=r[n]?r[n]+", "+s:s}}),r}});var gr=p((li,vr)=>{"use strict";var mr=R();vr.exports=mr.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function s(o){var a=o;return e&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=s(window.location.href),function(a){var u=mr.isString(a)?s(a):a;return u.protocol===n.protocol&&u.host===n.host}}():function(){return function(){return!0}}()});var Y=p((hi,yr)=>{"use strict";function tt(t){this.message=t}tt.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};tt.prototype.__CANCEL__=!0;yr.exports=tt});var _r=p((di,Cr)=>{"use strict";var Ie=R(),Ts=Ke(),Es=ar(),ws=xe(),Os=Qe(),bs=pr(),Rs=gr(),rt=Le(),xs=Z(),Ss=Y();Cr.exports=function(e){return new Promise(function(n,s){var o=e.data,a=e.headers,u=e.responseType,l;function c(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}Ie.isFormData(o)&&delete a["Content-Type"];var i=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(f+":"+m)}var N=Os(e.baseURL,e.url);i.open(e.method.toUpperCase(),ws(N,e.params,e.paramsSerializer),!0),i.timeout=e.timeout;function H(){if(i){var v="getAllResponseHeaders"in i?bs(i.getAllResponseHeaders()):null,y=!u||u==="text"||u==="json"?i.responseText:i.response,O={data:y,status:i.status,statusText:i.statusText,headers:v,config:e,request:i};Ts(function(U){n(U),c()},function(U){s(U),c()},O),i=null}}if("onloadend"in i?i.onloadend=H:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(H)},i.onabort=function(){i&&(s(rt("Request aborted",e,"ECONNABORTED",i)),i=null)},i.onerror=function(){s(rt("Network Error",e,null,i)),i=null},i.ontimeout=function(){var y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",O=e.transitional||xs.transitional;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),s(rt(y,e,O.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",i)),i=null},Ie.isStandardBrowserEnv()){var w=(e.withCredentials||Rs(N))&&e.xsrfCookieName?Es.read(e.xsrfCookieName):void 0;w&&(a[e.xsrfHeaderName]=w)}"setRequestHeader"in i&&Ie.forEach(a,function(y,O){typeof o>"u"&&O.toLowerCase()==="content-type"?delete a[O]:i.setRequestHeader(O,y)}),Ie.isUndefined(e.withCredentials)||(i.withCredentials=!!e.withCredentials),u&&u!=="json"&&(i.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&i.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&i.upload&&i.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(l=function(v){i&&(s(!v||v&&v.type?new Ss("canceled"):v),i.abort(),i=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l))),o||(o=null),i.send(o)})}});var Er=p((pi,Tr)=>{var K=1e3,Q=K*60,ee=Q*60,$=ee*24,qs=$*7,Ls=$*365.25;Tr.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Ns(t);if(r==="number"&&isFinite(t))return e.long?Ps(t):Is(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Ns(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Ls;case"weeks":case"week":case"w":return r*qs;case"days":case"day":case"d":return r*$;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ee;case"minutes":case"minute":case"mins":case"min":case"m":return r*Q;case"seconds":case"second":case"secs":case"sec":case"s":return r*K;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Is(t){var e=Math.abs(t);return e>=$?Math.round(t/$)+"d":e>=ee?Math.round(t/ee)+"h":e>=Q?Math.round(t/Q)+"m":e>=K?Math.round(t/K)+"s":t+"ms"}function Ps(t){var e=Math.abs(t);return e>=$?Pe(t,e,$,"day"):e>=ee?Pe(t,e,ee,"hour"):e>=Q?Pe(t,e,Q,"minute"):e>=K?Pe(t,e,K,"second"):t+" ms"}function Pe(t,e,r,n){var s=e>=r*1.5;return Math.round(t/r)+" "+n+(s?"s":"")}});var nt=p((mi,wr)=>{function Fs(t){r.debug=r,r.default=r,r.coerce=l,r.disable=o,r.enable=s,r.enabled=a,r.humanize=Er(),r.destroy=c,Object.keys(t).forEach(i=>{r[i]=t[i]}),r.names=[],r.skips=[],r.formatters={};function e(i){let f=0;for(let m=0;m<i.length;m++)f=(f<<5)-f+i.charCodeAt(m),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=e;function r(i){let f,m=null,N,H;function w(...v){if(!w.enabled)return;let y=w,O=Number(new Date),oe=O-(f||O);y.diff=oe,y.prev=f,y.curr=O,f=O,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let U=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(ie,I)=>{if(ie==="%%")return"%";U++;let F=r.formatters[I];if(typeof F=="function"){let Ce=v[U];ie=F.call(y,Ce),v.splice(U,1),U--}return ie}),r.formatArgs.call(y,v),(y.log||r.log).apply(y,v)}return w.namespace=i,w.useColors=r.useColors(),w.color=r.selectColor(i),w.extend=n,w.destroy=r.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(N!==r.namespaces&&(N=r.namespaces,H=r.enabled(i)),H),set:v=>{m=v}}),typeof r.init=="function"&&r.init(w),w}function n(i,f){let m=r(this.namespace+(typeof f>"u"?":":f)+i);return m.log=this.log,m}function s(i){r.save(i),r.namespaces=i,r.names=[],r.skips=[];let f,m=(typeof i=="string"?i:"").split(/[\s,]+/),N=m.length;for(f=0;f<N;f++)m[f]&&(i=m[f].replace(/\*/g,".*?"),i[0]==="-"?r.skips.push(new RegExp("^"+i.slice(1)+"$")):r.names.push(new RegExp("^"+i+"$")))}function o(){let i=[...r.names.map(u),...r.skips.map(u).map(f=>"-"+f)].join(",");return r.enable(""),i}function a(i){if(i[i.length-1]==="*")return!0;let f,m;for(f=0,m=r.skips.length;f<m;f++)if(r.skips[f].test(i))return!1;for(f=0,m=r.names.length;f<m;f++)if(r.names[f].test(i))return!0;return!1}function u(i){return i.toString().substring(2,i.toString().length-2).replace(/\.\*\?$/,"*")}function l(i){return i instanceof Error?i.stack||i.message:i}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}wr.exports=Fs});var Or=p((q,Fe)=>{q.formatArgs=Us;q.save=Bs;q.load=Ms;q.useColors=As;q.storage=Ds();q.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();q.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function As(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Us(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Fe.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),t.splice(n,0,e)}q.log=console.debug||console.log||(()=>{});function Bs(t){try{t?q.storage.setItem("debug",t):q.storage.removeItem("debug")}catch{}}function Ms(){let t;try{t=q.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Ds(){try{return localStorage}catch{}}Fe.exports=nt()(q);var{formatters:js}=Fe.exports;js.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Rr=p((vi,br)=>{"use strict";br.exports=(t,e)=>{e=e||process.argv;let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),s=e.indexOf("--");return n!==-1&&(s===-1?!0:n<s)}});var Sr=p((gi,xr)=>{"use strict";var Hs=require("os"),A=Rr(),E=process.env,te;A("no-color")||A("no-colors")||A("color=false")?te=!1:(A("color")||A("colors")||A("color=true")||A("color=always"))&&(te=!0);"FORCE_COLOR"in E&&(te=E.FORCE_COLOR.length===0||parseInt(E.FORCE_COLOR,10)!==0);function ks(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Gs(t){if(te===!1)return 0;if(A("color=16m")||A("color=full")||A("color=truecolor"))return 3;if(A("color=256"))return 2;if(t&&!t.isTTY&&te!==!0)return 0;let e=te?1:0;if(process.platform==="win32"){let r=Hs.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in E)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in E)||E.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in E)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(E.TEAMCITY_VERSION)?1:0;if(E.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in E){let r=parseInt((E.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(E.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(E.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(E.TERM)||"COLORTERM"in E?1:(E.TERM==="dumb",e)}function st(t){let e=Gs(t);return ks(e)}xr.exports={supportsColor:st,stdout:st(process.stdout),stderr:st(process.stderr)}});var Lr=p((C,Ue)=>{var $s=require("tty"),Ae=require("util");C.init=Zs;C.log=Ws;C.formatArgs=Js;C.save=Xs;C.load=Ys;C.useColors=zs;C.destroy=Ae.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");C.colors=[6,2,3,4,5,1];try{let t=Sr();t&&(t.stderr||t).level>=2&&(C.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{}C.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function zs(){return"colors"in C.inspectOpts?!!C.inspectOpts.colors:$s.isatty(process.stderr.fd)}function Js(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${e} \x1B[0m`;t[0]=o+t[0].split(`
5
+ `).join(`
6
+ `+o),t.push(s+"m+"+Ue.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Vs()+e+" "+t[0]}function Vs(){return C.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Ws(...t){return process.stderr.write(Ae.format(...t)+`
7
+ `)}function Xs(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Ys(){return process.env.DEBUG}function Zs(t){t.inspectOpts={};let e=Object.keys(C.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=C.inspectOpts[e[r]]}Ue.exports=nt()(C);var{formatters:qr}=Ue.exports;qr.o=function(t){return this.inspectOpts.colors=this.useColors,Ae.inspect(t,this.inspectOpts).split(`
8
+ `).map(e=>e.trim()).join(" ")};qr.O=function(t){return this.inspectOpts.colors=this.useColors,Ae.inspect(t,this.inspectOpts)}});var Nr=p((yi,ot)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ot.exports=Or():ot.exports=Lr()});var Pr=p((Ci,Ir)=>{var le;Ir.exports=function(){if(!le){try{le=Nr()("follow-redirects")}catch{}typeof le!="function"&&(le=function(){})}le.apply(null,arguments)}});var yt=p((_i,gt)=>{var pe=require("url"),he=pe.URL,Ks=require("http"),Qs=require("https"),ft=require("stream").Writable,lt=require("assert"),Fr=Pr(),ht=!1;try{lt(new he)}catch(t){ht=t.code==="ERR_INVALID_URL"}var eo=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],dt=["abort","aborted","connect","error","socket","timeout"],pt=Object.create(null);dt.forEach(function(t){pt[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var at=me("ERR_INVALID_URL","Invalid URL",TypeError),ut=me("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),to=me("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",ut),ro=me("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),no=me("ERR_STREAM_WRITE_AFTER_END","write after end"),so=ft.prototype.destroy||Ur;function x(t,e){ft.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(s){r.emit("error",s instanceof ut?s:new ut({cause:s}))}},this._performRequest()}x.prototype=Object.create(ft.prototype);x.prototype.abort=function(){vt(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};x.prototype.destroy=function(t){return vt(this._currentRequest,t),so.call(this,t),this};x.prototype.write=function(t,e,r){if(this._ending)throw new no;if(!z(t)&&!ao(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(de(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new ro),this.abort())};x.prototype.end=function(t,e,r){if(de(t)?(r=t,t=e=null):de(e)&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,s=this._currentRequest;this.write(t,e,function(){n._ended=!0,s.end(null,null,r)}),this._ending=!0}};x.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};x.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};x.prototype.setTimeout=function(t,e){var r=this;function n(a){a.setTimeout(t),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}function s(a){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),o()},t),n(a)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),r.removeListener("close",o),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",s)}return e&&this.on("timeout",e),this.socket?s(this.socket):this._currentRequest.once("socket",s),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){x.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(x.prototype,t,{get:function(){return this._currentRequest[t]}})});x.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};x.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var s of dt)n.on(s,pt[s]);if(this._currentUrl=/^\//.test(this._options.path)?pe.format(this._options):this._options.path,this._isRedirect){var o=0,a=this,u=this._requestBodyBuffers;(function l(c){if(n===a._currentRequest)if(c)a.emit("error",c);else if(o<u.length){var i=u[o++];n.finished||n.write(i.data,i.encoding,l)}else a._ended&&n.end()})()}};x.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(vt(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new to;var n,s=this._options.beforeRedirect;s&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var o=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],it(/^content-/i,this._options.headers));var a=it(/^host$/i,this._options.headers),u=mt(this._currentUrl),l=a||u.host,c=/^\w+:/.test(r)?this._currentUrl:pe.format(Object.assign(u,{host:l})),i=oo(r,c);if(Fr("redirecting to",i.href),this._isRedirect=!0,ct(i,this._options),(i.protocol!==u.protocol&&i.protocol!=="https:"||i.host!==l&&!io(i.host,l))&&it(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),de(s)){var f={headers:t.headers,statusCode:e},m={url:c,method:o,headers:n};s(this._options,f,m),this._sanitizeOptions(this._options)}this._performRequest()};function Ar(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var s=n+":",o=r[s]=t[n],a=e[n]=Object.create(o);function u(c,i,f){return uo(c)?c=ct(c):z(c)?c=ct(mt(c)):(f=i,i=Br(c),c={protocol:s}),de(i)&&(f=i,i=null),i=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},c,i),i.nativeProtocols=r,!z(i.host)&&!z(i.hostname)&&(i.hostname="::1"),lt.equal(i.protocol,s,"protocol mismatch"),Fr("options",i),new x(i,f)}function l(c,i,f){var m=a.request(c,i,f);return m.end(),m}Object.defineProperties(a,{request:{value:u,configurable:!0,enumerable:!0,writable:!0},get:{value:l,configurable:!0,enumerable:!0,writable:!0}})}),e}function Ur(){}function mt(t){var e;if(ht)e=new he(t);else if(e=Br(pe.parse(t)),!z(e.protocol))throw new at({input:t});return e}function oo(t,e){return ht?new he(t,e):mt(pe.resolve(e,t))}function Br(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new at({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new at({input:t.href||t});return t}function ct(t,e){var r=e||{};for(var n of eo)r[n]=t[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 it(t,e){var r;for(var n in e)t.test(n)&&(r=e[n],delete e[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function me(t,e,r){function n(s){Error.captureStackTrace(this,this.constructor),Object.assign(this,s||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),n}function vt(t,e){for(var r of dt)t.removeListener(r,pt[r]);t.on("error",Ur),t.destroy(e)}function io(t,e){lt(z(t)&&z(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function z(t){return typeof t=="string"||t instanceof String}function de(t){return typeof t=="function"}function ao(t){return typeof t=="object"&&"length"in t}function uo(t){return he&&t instanceof he}gt.exports=Ar({http:Ks,https:Qs});gt.exports.wrap=Ar});var Be=p((Ti,Mr)=>{Mr.exports={version:"0.24.0"}});var $r=p((Ei,Gr)=>{"use strict";var ve=R(),Dr=Ke(),co=Qe(),fo=xe(),lo=require("http"),ho=require("https"),po=yt().http,mo=yt().https,jr=require("url"),vo=require("zlib"),go=Be().version,Me=Le(),Ct=qe(),yo=Z(),Co=Y(),Hr=/https:?/;function kr(t,e,r){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=r,e.auth){var n=Buffer.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+n}t.beforeRedirect=function(o){o.headers.host=o.host,kr(o,e,o.href)}}Gr.exports=function(e){return new Promise(function(n,s){var o;function a(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}var u=function(g){a(),n(g)},l=function(g){a(),s(g)},c=e.data,i=e.headers,f={};if(Object.keys(i).forEach(function(g){f[g.toLowerCase()]=g}),"user-agent"in f?i[f["user-agent"]]||delete i[f["user-agent"]]:i["User-Agent"]="axios/"+go,c&&!ve.isStream(c)){if(!Buffer.isBuffer(c))if(ve.isArrayBuffer(c))c=Buffer.from(new Uint8Array(c));else if(ve.isString(c))c=Buffer.from(c,"utf-8");else return l(Me("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));f["content-length"]||(i["Content-Length"]=c.length)}var m=void 0;if(e.auth){var N=e.auth.username||"",H=e.auth.password||"";m=N+":"+H}var w=co(e.baseURL,e.url),v=jr.parse(w),y=v.protocol||"http:";if(!m&&v.auth){var O=v.auth.split(":"),oe=O[0]||"",U=O[1]||"";m=oe+":"+U}m&&f.authorization&&delete i[f.authorization];var $e=Hr.test(y),ie=$e?e.httpsAgent:e.httpAgent,I={path:fo(v.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:i,agent:ie,agents:{http:e.httpAgent,https:e.httpsAgent},auth:m};e.socketPath?I.socketPath=e.socketPath:(I.hostname=v.hostname,I.port=v.port);var F=e.proxy;if(!F&&F!==!1){var Ce=y.slice(0,-1)+"_proxy",Nt=process.env[Ce]||process.env[Ce.toUpperCase()];if(Nt){var ae=jr.parse(Nt),It=process.env.no_proxy||process.env.NO_PROXY,Pt=!0;if(It){var Pn=It.split(",").map(function(g){return g.trim()});Pt=!Pn.some(function(g){return g?g==="*"||g[0]==="."&&v.hostname.substr(v.hostname.length-g.length)===g?!0:v.hostname===g:!1})}if(Pt&&(F={host:ae.hostname,port:ae.port,protocol:ae.protocol},ae.auth)){var Ft=ae.auth.split(":");F.auth={username:Ft[0],password:Ft[1]}}}}F&&(I.headers.host=v.hostname+(v.port?":"+v.port:""),kr(I,F,y+"//"+v.hostname+(v.port?":"+v.port:"")+I.path));var _e,At=$e&&(F?Hr.test(F.protocol):!0);e.transport?_e=e.transport:e.maxRedirects===0?_e=At?ho:lo:(e.maxRedirects&&(I.maxRedirects=e.maxRedirects),_e=At?mo:po),e.maxBodyLength>-1&&(I.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&(I.insecureHTTPParser=e.insecureHTTPParser);var b=_e.request(I,function(g){if(!b.aborted){var k=g,Te=g.req||b;if(g.statusCode!==204&&Te.method!=="HEAD"&&e.decompress!==!1)switch(g.headers["content-encoding"]){case"gzip":case"compress":case"deflate":k=k.pipe(vo.createUnzip()),delete g.headers["content-encoding"];break}var Ee={status:g.statusCode,statusText:g.statusMessage,headers:g.headers,config:e,request:Te};if(e.responseType==="stream")Ee.data=k,Dr(u,l,Ee);else{var Ut=[],Bt=0;k.on("data",function(B){Ut.push(B),Bt+=B.length,e.maxContentLength>-1&&Bt>e.maxContentLength&&(k.destroy(),l(Me("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,Te)))}),k.on("error",function(B){b.aborted||l(Ct(B,e,null,Te))}),k.on("end",function(){var B=Buffer.concat(Ut);e.responseType!=="arraybuffer"&&(B=B.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(B=ve.stripBOM(B))),Ee.data=B,Dr(u,l,Ee)})}}});if(b.on("error",function(g){b.aborted&&g.code!=="ERR_FR_TOO_MANY_REDIRECTS"||l(Ct(g,e,null,b))}),e.timeout){var ze=parseInt(e.timeout,10);if(isNaN(ze)){l(Me("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",b));return}b.setTimeout(ze,function(){b.abort();var g=e.transitional||yo.transitional;l(Me("timeout of "+ze+"ms exceeded",e,g.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",b))})}(e.cancelToken||e.signal)&&(o=function(S){b.aborted||(b.abort(),l(!S||S&&S.type?new Co("canceled"):S))},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o))),ve.isStream(c)?c.on("error",function(g){l(Ct(g,e,null,b))}).pipe(b):b.end(c)})}});var Z=p((wi,Vr)=>{"use strict";var _=R(),zr=rr(),_o=qe(),To={"Content-Type":"application/x-www-form-urlencoded"};function Jr(t,e){!_.isUndefined(t)&&_.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function Eo(){var t;return typeof XMLHttpRequest<"u"?t=_r():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=$r()),t}function wo(t,e,r){if(_.isString(t))try{return(e||JSON.parse)(t),_.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var De={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Eo(),transformRequest:[function(e,r){return zr(r,"Accept"),zr(r,"Content-Type"),_.isFormData(e)||_.isArrayBuffer(e)||_.isBuffer(e)||_.isStream(e)||_.isFile(e)||_.isBlob(e)?e:_.isArrayBufferView(e)?e.buffer:_.isURLSearchParams(e)?(Jr(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):_.isObject(e)||r&&r["Content-Type"]==="application/json"?(Jr(r,"application/json"),wo(e)):e}],transformResponse:[function(e){var r=this.transitional||De.transitional,n=r&&r.silentJSONParsing,s=r&&r.forcedJSONParsing,o=!n&&this.responseType==="json";if(o||s&&_.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?_o(a,this,"E_JSON_PARSE"):a}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};_.forEach(["delete","get","head"],function(e){De.headers[e]={}});_.forEach(["post","put","patch"],function(e){De.headers[e]=_.merge(To)});Vr.exports=De});var Xr=p((Oi,Wr)=>{"use strict";var Oo=R(),bo=Z();Wr.exports=function(e,r,n){var s=this||bo;return Oo.forEach(n,function(a){e=a.call(s,e,r)}),e}});var _t=p((bi,Yr)=>{"use strict";Yr.exports=function(e){return!!(e&&e.__CANCEL__)}});var Qr=p((Ri,Kr)=>{"use strict";var Zr=R(),Tt=Xr(),Ro=_t(),xo=Z(),So=Y();function Et(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new So("canceled")}Kr.exports=function(e){Et(e),e.headers=e.headers||{},e.data=Tt.call(e,e.data,e.headers,e.transformRequest),e.headers=Zr.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Zr.forEach(["delete","get","head","post","put","patch","common"],function(s){delete e.headers[s]});var r=e.adapter||xo.adapter;return r(e).then(function(s){return Et(e),s.data=Tt.call(e,s.data,s.headers,e.transformResponse),s},function(s){return Ro(s)||(Et(e),s&&s.response&&(s.response.data=Tt.call(e,s.response.data,s.response.headers,e.transformResponse))),Promise.reject(s)})}});var wt=p((xi,en)=>{"use strict";var L=R();en.exports=function(e,r){r=r||{};var n={};function s(i,f){return L.isPlainObject(i)&&L.isPlainObject(f)?L.merge(i,f):L.isPlainObject(f)?L.merge({},f):L.isArray(f)?f.slice():f}function o(i){if(L.isUndefined(r[i])){if(!L.isUndefined(e[i]))return s(void 0,e[i])}else return s(e[i],r[i])}function a(i){if(!L.isUndefined(r[i]))return s(void 0,r[i])}function u(i){if(L.isUndefined(r[i])){if(!L.isUndefined(e[i]))return s(void 0,e[i])}else return s(void 0,r[i])}function l(i){if(i in r)return s(e[i],r[i]);if(i in e)return s(void 0,e[i])}var c={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:l};return L.forEach(Object.keys(e).concat(Object.keys(r)),function(f){var m=c[f]||o,N=m(f);L.isUndefined(N)&&m!==l||(n[f]=N)}),n}});var nn=p((Si,rn)=>{"use strict";var qo=Be().version,Ot={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Ot[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var tn={};Ot.transitional=function(e,r,n){function s(o,a){return"[Axios v"+qo+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return function(o,a,u){if(e===!1)throw new Error(s(a," has been removed"+(r?" in "+r:"")));return r&&!tn[a]&&(tn[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,a,u):!0}};function Lo(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),s=n.length;s-- >0;){var o=n[s],a=e[o];if(a){var u=t[o],l=u===void 0||a(u,o,t);if(l!==!0)throw new TypeError("option "+o+" must be "+l);continue}if(r!==!0)throw Error("Unknown option "+o)}}rn.exports={assertOptions:Lo,validators:Ot}});var fn=p((qi,cn)=>{"use strict";var an=R(),No=xe(),sn=er(),on=Qr(),je=wt(),un=nn(),re=un.validators;function ge(t){this.defaults=t,this.interceptors={request:new sn,response:new sn}}ge.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=je(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&un.assertOptions(r,{silentJSONParsing:re.transitional(re.boolean),forcedJSONParsing:re.transitional(re.boolean),clarifyTimeoutError:re.transitional(re.boolean)},!1);var n=[],s=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(e)===!1||(s=s&&m.synchronous,n.unshift(m.fulfilled,m.rejected))});var o=[];this.interceptors.response.forEach(function(m){o.push(m.fulfilled,m.rejected)});var a;if(!s){var u=[on,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(o),a=Promise.resolve(e);u.length;)a=a.then(u.shift(),u.shift());return a}for(var l=e;n.length;){var c=n.shift(),i=n.shift();try{l=c(l)}catch(f){i(f);break}}try{a=on(l)}catch(f){return Promise.reject(f)}for(;o.length;)a=a.then(o.shift(),o.shift());return a};ge.prototype.getUri=function(e){return e=je(this.defaults,e),No(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};an.forEach(["delete","get","head","options"],function(e){ge.prototype[e]=function(r,n){return this.request(je(n||{},{method:e,url:r,data:(n||{}).data}))}});an.forEach(["post","put","patch"],function(e){ge.prototype[e]=function(r,n,s){return this.request(je(s||{},{method:e,url:r,data:n}))}});cn.exports=ge});var hn=p((Li,ln)=>{"use strict";var Io=Y();function ne(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(s){e=s});var r=this;this.promise.then(function(n){if(r._listeners){var s,o=r._listeners.length;for(s=0;s<o;s++)r._listeners[s](n);r._listeners=null}}),this.promise.then=function(n){var s,o=new Promise(function(a){r.subscribe(a),s=a}).then(n);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s){r.reason||(r.reason=new Io(s),e(r.reason))})}ne.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};ne.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]};ne.prototype.unsubscribe=function(e){if(this._listeners){var r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}};ne.source=function(){var e,r=new ne(function(s){e=s});return{token:r,cancel:e}};ln.exports=ne});var pn=p((Ni,dn)=>{"use strict";dn.exports=function(e){return function(n){return e.apply(null,n)}}});var vn=p((Ii,mn)=>{"use strict";mn.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Cn=p((Pi,bt)=>{"use strict";var gn=R(),Po=Ve(),He=fn(),Fo=wt(),Ao=Z();function yn(t){var e=new He(t),r=Po(He.prototype.request,e);return gn.extend(r,He.prototype,e),gn.extend(r,e),r.create=function(s){return yn(Fo(t,s))},r}var M=yn(Ao);M.Axios=He;M.Cancel=Y();M.CancelToken=hn();M.isCancel=_t();M.VERSION=Be().version;M.all=function(e){return Promise.all(e)};M.spread=pn();M.isAxiosError=vn();bt.exports=M;bt.exports.default=M});var Tn=p((Fi,_n)=>{_n.exports=Cn()});var On=p(D=>{"use strict";var En=D&&D.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(i){try{c(n.next(i))}catch(f){a(f)}}function l(i){try{c(n.throw(i))}catch(f){a(f)}}function c(i){i.done?o(i.value):s(i.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},wn=D&&D.__generator||function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(i){return l([c,i])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(o=c[0]&2?s.return:c[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,c[1])).done)return o;switch(s=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,s=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(i){c=[6,i],s=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(D,"__esModule",{value:!0});D.AsyncClient=void 0;var ye=zt(),J=Jt(),Uo=Tn(),Rt=Je(),Bo=function(){function t(e){if(e==null||e==null)throw new ye.default("AsyncClientOptions invalid");if(e.endpoint==null||e.endpoint==null||e.endpoint.length==0)throw new ye.default("options endpoint can not be empty");for(this.retry_times=e.retry_times,(e.retry_times==0||e.retry_times==null||e.retry_times==null)&&(this.retry_times=5),e.endpoint.startsWith("http://")?(this.hostName=e.endpoint.substring(7),this.httpType="http://"):e.endpoint.startsWith("https://")?(this.hostName=e.endpoint.substring(8),this.httpType="https://"):(this.hostName=e.endpoint,this.httpType="http://");this.hostName.endsWith("/");)this.hostName=this.hostName.substring(0,this.hostName.length-1)}return t.prototype.PutLogs=function(e){return En(this,void 0,void 0,function(){var r,n,s,o,l,a,u,l,l;return wn(this,function(c){switch(c.label){case 0:if(r=e.encodeLogItems(),r.length>J.CONST_MAX_PUT_SIZE)throw new ye.default("InvalidLogSize. logItems' size exceeds maximum limitation : "+J.CONST_MAX_PUT_SIZE+" bytes, logBytes="+r.length+", topic="+e.getTopic());n=this.getCommonHeadPara(J.CONST_JSON),e.setParam(J.TOPIC_ID,e.getTopic()),s=0,c.label=1;case 1:if(!(s<this.retry_times))return[3,6];c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this.sendLogs(J.UPLOAD_LOG_RESOURCE_URI,n,r,e.getTopic())];case 3:if(o=c.sent(),l=new Rt.Response,l.setAllHeaders(o.headers),l.setHttpStatusCode(o.status),l.getHttpStatusCode()==200)return[2,l];if(s+1>=this.retry_times)throw new ye.default("send log failed and exceed retry times");return[3,5];case 4:if(a=c.sent(),u="",a.response&&a.response.headers&&(u=a.response.headers["x-cls-requestid"]),a.response&&a.response.status==413)return l=new Rt.Response,l.setAllHeaders(a.response.headers),l.setHttpStatusCode(a.response.status),a.response.data.errorcode!=null&&a.response.data.errorcode!=null&&l.setErrorCode(a.response.data.errorcode),a.response.data.errormessage!=null&&a.response.data.errormessage!=null&&l.setErrorMessage(a.response.data.errormessage),[2,l];if(s+1>=this.retry_times)throw l=new Rt.Response,a.response&&(l.setAllHeaders(a.response.headers),l.setHttpStatusCode(a.response.status),a.response.data.errorcode!=null&&a.response.data.errorcode!=null&&l.setErrorCode(a.response.data.errorcode),a.response.data.errormessage!=null&&a.response.data.errormessage!=null&&l.setErrorMessage(a.response.data.errormessage)),new ye.default("send log failed and exceed retry times. reason: "+JSON.stringify(l)+", error: "+a.message+".",u);return[3,5];case 5:return s++,[3,1];case 6:return[2]}})})},t.prototype.sendLogs=function(e,r,n,s){return En(this,void 0,void 0,function(){var o,a,u;return wn(this,function(l){return o=this.stringToArrayBuffer(n),a=new Uint8Array(o),u={},r.forEach(function(c,i){u[i]=c}),[2,Uo.default({url:this.httpType+this.hostName+e+"?"+J.TOPIC_ID+"="+s,method:"post",data:a,headers:u})]})})},t.prototype.getCommonHeadPara=function(e){var r=new Map;return r.set(J.CONST_CONTENT_TYPE,e),r},t.prototype.stringToArrayBuffer=function(e){var r=new Array,n,s;n=e.length;for(var o=0;o<n;o++)s=e.charCodeAt(o),s>=65536&&s<=1114111?(r.push(s>>18&7|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128)):s>=2048&&s<=65535?(r.push(s>>12&15|224),r.push(s>>6&63|128),r.push(s&63|128)):s>=128&&s<=2047?(r.push(s>>6&31|192),r.push(s&63|128)):r.push(s&255);var a=new Int8Array(r.length);for(var u in r)a[u]=r[u];return a.buffer},t}();D.AsyncClient=Bo});var Rn=p(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.AsyncClient=P.Log=P.LogGroup=P.Response=P.PutLogsRequest=void 0;var Mo=Gt();Object.defineProperty(P,"PutLogsRequest",{enumerable:!0,get:function(){return Mo.PutLogsRequest}});var Do=Je();Object.defineProperty(P,"Response",{enumerable:!0,get:function(){return Do.Response}});var bn=$t();Object.defineProperty(P,"LogGroup",{enumerable:!0,get:function(){return bn.LogGroup}});Object.defineProperty(P,"Log",{enumerable:!0,get:function(){return bn.Log}});var jo=On();Object.defineProperty(P,"AsyncClient",{enumerable:!0,get:function(){return jo.AsyncClient}})});var Nn=require("child_process"),In=ue(require("path"));var Ln=ue(Ht()),j=ue(Rn());var xn=ue(require("crypto")),Ge=new Uint8Array(256),ke=Ge.length;function xt(){return ke>Ge.length-16&&(xn.default.randomFillSync(Ge),ke=0),Ge.slice(ke,ke+=16)}var T=[];for(let t=0;t<256;++t)T.push((t+256).toString(16).slice(1));function Sn(t,e=0){return T[t[e+0]]+T[t[e+1]]+T[t[e+2]]+T[t[e+3]]+"-"+T[t[e+4]]+T[t[e+5]]+"-"+T[t[e+6]]+T[t[e+7]]+"-"+T[t[e+8]]+T[t[e+9]]+"-"+T[t[e+10]]+T[t[e+11]]+T[t[e+12]]+T[t[e+13]]+T[t[e+14]]+T[t[e+15]]}var qn=ue(require("crypto")),St={randomUUID:qn.default.randomUUID};function Ho(t,e,r){if(St.randomUUID&&!e&&!t)return St.randomUUID();t=t||{};let n=t.random||(t.rng||xt)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let s=0;s<16;++s)e[r+s]=n[s];return e}return Sn(n)}var qt=Ho;var Lt=class{logId;localIp;topicId;endpoint;client;log;added=!1;constructor(){this.logId=qt(),this.localIp=Ln.default.address(),this.setRegion(!0),this.log=new j.Log(Date.now()),this.log.addContent("id",this.logId),this.log.addContent("source",this.localIp)}setRegion(e){e?(this.endpoint="ap-nanjing.cls.tencentcs.com",this.topicId="4c6502d3-1134-4f2f-8359-157a8c5184cd"):(this.endpoint="ap-singapore.cls.tencentcs.com",this.topicId="589425db-bf02-4810-ae91-fe66daf63dc3"),this.client=new j.AsyncClient({endpoint:this.endpoint,retry_times:1})}async add(e,r){try{this.added=!0,this.log.addContent(e,String(r))}catch(n){console.log(n)}}async report(){try{if(!this.added)return console.log("no report info");let e=new j.LogGroup(this.localIp);e.addLog(this.log);let r=new j.PutLogsRequest(this.topicId,e);await this.client.PutLogs(r)}catch{}}},ko=new Lt,se=ko;function Go(){let t=(0,Nn.spawn)(process.execPath,["--no-warnings","--experimental-vm-modules",...process.execArgv,In.default.join(__dirname,"../edgeone-dist/cli.js"),...process.argv.slice(2)],{stdio:["inherit","inherit","inherit","ipc"]});process.on("SIGINT",()=>{t.kill("SIGTERM")}),process.on("SIGTERM",()=>{t.kill("SIGTERM")}),t.on("message",e=>{let{name:r,value:n,isDomestic:s}=JSON.parse(e);r&&n&&se.add(r,n),typeof s<"u"&&se.setRegion(s)}),t.on("exit",e=>{se.report().then(()=>{process.exit(e==null?0:e)})}),t.on("error",e=>{se.add("error",e),se.report().then(()=>{})})}Go();