@doubao-dev/cli 0.0.32 → 0.0.34
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/dist/2168.js +16 -16
- package/dist/275.js +12 -14
- package/dist/2932.js +1 -1
- package/dist/318.js +1 -1
- package/dist/{1560.js → 3688.js} +2 -2
- package/dist/3974.js +22 -22
- package/dist/4525.js +1 -1
- package/dist/4880.js +1 -1
- package/dist/4931.js +2 -2
- package/dist/6427.js +126 -0
- package/dist/7410.js +1 -1
- package/dist/7417.js +204 -0
- package/dist/7417.js.LICENSE.txt +107 -0
- package/dist/7945.js +1 -0
- package/dist/8981.js +78 -0
- package/dist/{8891.js.LICENSE.txt → 8981.js.LICENSE.txt} +0 -108
- package/dist/@byted-doubao-apps/create.js +1 -1
- package/dist/@byted-doubao-apps/kit.js +1 -0
- package/dist/@byted-doubao-apps/login.js +1 -1
- package/dist/@byted-doubao-apps/login~1.js +1 -1
- package/dist/@byted-doubao-apps/template-empty/package.json +3 -3
- package/dist/@byted-doubao-apps/template-starter/package.json +3 -3
- package/dist/@byted-hdt/cli.js +1 -1
- package/dist/@inquirer/select.js +1 -1
- package/dist/app.js +1 -1
- package/dist/assets/web-sdk-debugger/__doubao_web_sdk_native_modules/applet-bridge-module-core.js +1 -1
- package/dist/assets/web-sdk-debugger/index.html +1 -1
- package/dist/assets/web-sdk-debugger/static/js/index.9f626ba3a2.js +44 -0
- package/dist/assets/web-sdk-debugger/wsd/doubao-apps-api.template.js +0 -0
- package/dist/assets/web-sdk-debugger/wsd/doubao-apps-framework.template.js +0 -0
- package/dist/build.js +1 -1
- package/dist/build~1.js +6 -6
- package/dist/check.js +1 -1
- package/dist/demo-server.js +1 -1
- package/dist/dev-config.js +1 -1
- package/dist/dev-shell.js +1 -1
- package/dist/dev.js +10 -10
- package/dist/devtools.js +1 -1
- package/dist/gen-explore.js +1 -1
- package/dist/gen-trajectory.js +1 -1
- package/dist/init.js +4 -4
- package/dist/ink.js +1 -1
- package/dist/inquirer.js +1 -0
- package/dist/json-file.js +1 -1
- package/dist/kit-dev-options.js +1 -1
- package/dist/legacy-upload.js +1 -1
- package/dist/lepus.js +1 -1
- package/dist/ora.js +1 -1
- package/dist/project-layout.js +1 -1
- package/dist/prompt.js +1 -1
- package/dist/prompts.js +1 -1
- package/dist/report.js +1 -1
- package/dist/run-registry.js +1 -1
- package/dist/run.js +44 -44
- package/dist/sandbox.js +1 -1
- package/dist/scan.js +1 -1
- package/dist/sdk.js +63 -188
- package/dist/sdk~1.js +50 -50
- package/dist/server.js +1 -1
- package/dist/skill.js +1 -1
- package/dist/skills.js +1 -1
- package/dist/skills~1.js +2 -1
- package/dist/static/assets/web-view-proxy-bootstrap.js +1 -0
- package/dist/static/assets/web-view-proxy-page-client.js +1 -1
- package/dist/static/assets/web-view-proxy-service-worker.js +1 -1
- package/dist/status~1.js +1 -1
- package/dist/stop.js +1 -1
- package/dist/sync.js +1 -1
- package/dist/templates/README.md +0 -1
- package/dist/update.js +1 -1
- package/dist/workspace.js +1 -1
- package/dist/wrapper.js +1 -0
- package/dist/yaml.js +1 -1
- package/package.json +2 -2
- package/skills/dbx-eval/SKILL.md +15 -7
- package/skills/doubao-agentic-service-development/SKILL.md +1 -1
- package/skills/doubao-agentic-service-development/references/auth.md +1 -1
- package/skills/doubao-agentic-service-development/references/dev-debug.md +3 -3
- package/skills/doubao-agentic-service-development/references/frontend/components/map-canvas.md +1 -1
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/06-/350/267/257/347/224/261.md +2 -2
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/07-/347/225/214/351/235/242.md +0 -6
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/08-/344/272/244/344/272/222.md +2 -2
- package/skills/doubao-agentic-service-development/references/frontend/guides/debugger-mcp.md +2 -2
- package/skills/doubao-agentic-service-development/references/frontend/widget-templates/props.md +1 -1
- package/skills/doubao-agentic-service-development/references/frontend-dev.md +3 -3
- package/skills/doubao-agentic-service-development/references/local-debug/overview.md +2 -2
- package/skills/doubao-agentic-service-development/references/overview.md +16 -31
- package/skills/doubao-agentic-service-development/scripts/workspace.py +6 -89
- package/dist/180.js +0 -1
- package/dist/8891.js +0 -280
- package/dist/9635.js +0 -1
- package/dist/assets/web-sdk-debugger/static/js/index.75528d6de7.js +0 -26
- package/dist/dbx.js +0 -3
- package/dist/skills~2.js +0 -2
package/dist/{1560.js → 3688.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
let e,t,n;import"node:module";import{__webpack_require__ as r}from"./rslib-runtime.js";import{external_node_stream_promises_namespaceObject as o,external_node_tty_namespaceObject as i,external_node_process_namespaceObject as s}from"./
|
|
1
|
+
let e,t,n;import"node:module";import{__webpack_require__ as r}from"./rslib-runtime.js";import{external_node_stream_promises_namespaceObject as o,external_node_tty_namespaceObject as i,external_node_process_namespaceObject as s}from"./7945.js";import"./3551.js";r.add({"../../../node_modules/.pnpm/@dp+tea-sdk-node@3.0.12/node_modules/@dp/tea-sdk-node/lib/config-manager.js"(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};Object.defineProperty(t,"__esModule",{value:!0});let o=n("../../../node_modules/.pnpm/@dp+tea-sdk-node@3.0.12/node_modules/@dp/tea-sdk-node/package.json"),i=60*new Date().getTimezoneOffset(),s=new Proxy({darwin:"mac",win32:"windows"},{get:(e,t)=>e[t]||t});t.default=class{get headerFields(){return Object.assign(Object.assign({},this.partialHeaderFields),{custom:JSON.stringify(this.customField)})}get logger(){return this.options.logger}get caller(){return this.options.caller}get appId(){return this.options.app_id}constructor(e){this.options=e,this.userFields={},this.customField={},this.partialHeaderFields={app_id:e.app_id},Object.assign(this.partialHeaderFields,{platform:"Node.js",os_name:s[process.platform],tz_offset:i,sdk_version:o.version})}configure(e){var t;e.header&&this.logger.trace("Re-configure header with %o",e.header),e.user&&this.logger.trace("Re-configure user with %o",e.user),(null==(t=e.header)?void 0:t.custom)&&this.logger.warn("Set custom params inside header is deprecated, use `config` instead. which looks like:",`
|
|
2
2
|
teaSDK.config({
|
|
3
3
|
header: { ... },
|
|
4
4
|
user: { ... },
|
|
5
5
|
custom: {/** custom content */},
|
|
6
6
|
})`);let n=e.header||{},{custom:o}=n,i=r(n,["custom"]);this.customField=JSON.parse(o||"{}"),Object.assign(this.partialHeaderFields,i),Object.assign(this.userFields,e.user),Object.assign(this.customField,e.custom)}get(e){try{if(!e)return{user:this.userFields,header:this.partialHeaderFields};if(Object.hasOwnProperty.call(this.userFields,e))return this.userFields[e];if(Object.hasOwnProperty.call(this.partialHeaderFields,e))return this.partialHeaderFields[e];else return this.customField[e]?this.customField[e]:void 0}catch(e){this.logger.warn("applog node config get error");return}}compose(e,t){let n=Object.assign({},this.userFields,e.user);n.user_unique_id||(n.user_unique_id="anonymous",this.logger.warn("Composing events without specifying `user_unique_id` is strongly deprecated, use `sdk.config()` to add a global fallback value for anonymous users"));let r=Object.assign({},this.customField,e.customOfHeader);return this.partialHeaderFields&&this.partialHeaderFields.app_id&&this.logger.trace("report appid with %o",this.partialHeaderFields.app_id),{id:(null==t?void 0:t.id)||Math.random().toString(32).slice(2),originatedBy:(null==t?void 0:t.originatedBy)||"logsdk",createdAt:(null==t?void 0:t.createdAt)||Date.now(),event:{server_time:Math.ceil(Date.now()/1e3),caller:e.caller||this.caller||"",user:n,header:Object.assign({custom:JSON.stringify(r)},this.partialHeaderFields,e.header),events:e.events.map(e=>Object.assign(Object.assign({},e),{_staging_flag:this.options.isolated}))}}}}},"../../../node_modules/.pnpm/@dp+tea-sdk-node@3.0.12/node_modules/@dp/tea-sdk-node/lib/constants.js"(e,t){t.SDK_VERSION=void 0,t.SDK_VERSION="3.0.10"},"../../../node_modules/.pnpm/@dp+tea-sdk-node@3.0.12/node_modules/@dp/tea-sdk-node/lib/index.js"(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TeaSDK=void 0;let i=o(n("assert")),s=o(n("../../../node_modules/.pnpm/@dp+tea-sdk-node@3.0.12/node_modules/@dp/tea-sdk-node/lib/config-manager.js")),l=n("../../../node_modules/.pnpm/@logsdk+node-utils@3.0.8/node_modules/@logsdk/node-utils/lib/index.js"),a=n("../../../node_modules/.pnpm/@dp+tea-sdk-node@3.0.12/node_modules/@dp/tea-sdk-node/package.json"),d=n("../../../node_modules/.pnpm/@dp+tea-sdk-node@3.0.12/node_modules/@dp/tea-sdk-node/lib/constants.js");t.TeaSDK=class{get meta(){return{caller:this.configManager.caller,user:this.configManager.userFields,header:this.configManager.headerFields,appId:this.configManager.appId,version:a.version,instanceID:this.instanceID,installedPlugins:[]}}constructor(e){this.plugins=[],this.instanceID=Math.random().toString(32).slice(2),this.config=e=>{this.plugins.map(t=>{var n;null==(n=t.beforeConfig)||n.call(t,e)}),this.configManager.configure(e),this.plugins.map(t=>{var n;null==(n=t.afterConfig)||n.call(t,e)})},this.logger=new l.Logger("Logsdk"),this.logger.setLevel(e.logLevel||"silent"),e.isolated&&this.logger.warn("Global isolation is enabled"),(0,i.default)("number"==typeof(null==e?void 0:e.app_id)),this.configManager=new s.default(Object.assign(Object.assign({},e),{logger:this.logger})),this.logger.trace("initialized success with options %o",e),this.logger.trace("initialized sdk version %o",d.SDK_VERSION)}composeHookContext(e){let t=this;return{get metaInfo(){return t.meta},logger:this.logger.propagate(e.name),collect:(t,n)=>{this.trigger(Object.assign({events:t.map(e=>Object.assign(Object.assign({},e.extra),{event:e.name,params:JSON.stringify(e.params),time:Math.ceil(Date.now()/1e3)}))},n),{originatedBy:e.name})}}}trigger(...e){let[t,n]=e,r=this.configManager.compose(t,n);this.logger.trace("Composed event %o",r),this.plugins.map(e=>{var t,n;null==(t=e.beforeSendEvent)||t.call(e,r),null==(n=e.onSendEvent)||n.call(e,r)})}use(...e){this.plugins.push(...e),e.map(e=>{var t;null==(t=e.install)||t.call(e,this.composeHookContext(e)),this.logger.trace("Plugin %s installed",e.name)})}collectEvents(e,t,n,r){this.trigger({events:n,user:e,header:t,caller:r||this.configManager.caller})}getConfig(e){return this.configManager.get(e)}collect(e,t,n){let o=Array.isArray(e)?e.map(({name:e,params:t})=>({event:e,params:JSON.stringify(t||{})})):[{event:e,params:JSON.stringify(t||{})}],i=(Array.isArray(e)?t:n)||{},{custom:s}=i,l=r(i,["custom"]);this.plugins.length||this.logger.warn("Dry run since no plugin applied"),this.trigger(Object.assign({events:o.map(e=>Object.assign(Object.assign({},e),{time:Math.ceil(Date.now()/1e3)})),customOfHeader:s},l))}}},"../../../node_modules/.pnpm/@logsdk+node-plugin-http@4.0.8/node_modules/@logsdk/node-plugin-http/lib/constants.js"(e,t){t.pathMap=t.ReportURL=void 0,t.ReportURL={cn:"https://mcs.zijieapi.com",sg:"https://sgali-mcs.byteoversea.com",va:"https://maliva-mcs.byteoversea.com"},t.pathMap={REPORT_PATH:"/v1/list",ABConfigPath:"/service/2/abtest_config/"}},"../../../node_modules/.pnpm/@logsdk+node-plugin-http@4.0.8/node_modules/@logsdk/node-plugin-http/lib/index.js"(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{a(r.next(e))}catch(e){i(e)}}function l(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,l)}a((r=r.apply(e,t||[])).next())})},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.httpPlugin=t.HttpController=void 0;let s=n("events"),l=i(n("../../../node_modules/.pnpm/abort-controller@3.0.0/node_modules/abort-controller/dist/abort-controller.mjs")),a=i(n("node-fetch")),d=n("../../../node_modules/.pnpm/@logsdk+node-plugin-http@4.0.8/node_modules/@logsdk/node-plugin-http/lib/constants.js"),u=n("../../../node_modules/.pnpm/@logsdk+node-plugin-http@4.0.8/node_modules/@logsdk/node-plugin-http/lib/utility.js");function c(e){try{return JSON.parse(e||"{}")}catch(e){return{}}}class p extends s.EventEmitter{get concurrent(){return this.options.concurrent||10}constructor(e,t){super(),this.options=e,this.channelDomain=t,this.pending=!1,this.queue=[],this.name="http"}flush(){return r(this,void 0,void 0,function*(){let e;if(this.pending)return;this.pending=!0;let t=this.queue.splice(0,this.concurrent),n=[],{event_verify_url:r,retry:o,timeout:i=3e3}=this.options,s=!1;try{e=AbortController||l.default}catch(t){e=l.default}let c=new e;this.channelDomain.endsWith("/")&&(this.channelDomain=this.channelDomain.slice(0,-1));let p=this.channelDomain+d.pathMap.REPORT_PATH;try{if(t.length){if(r){let e=setTimeout(()=>{this.emit("submit-et-timeout"),this.pluginContext.logger.trace("verify %d event timeout",t.length),c.abort()},i);this.pluginContext.logger.trace("verify %d events with event verify url: %s",t.length);let s=(0,u.doWithRetry)({incremental:!0,durationMS:500,count:o||0,name:"verify"},()=>(0,a.default)(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.map(({event:e})=>Object.assign(Object.assign({},e),{verbose:1}))),signal:c.signal}).then(e=>e.json())).then(n=>{this.pluginContext.logger.trace("new verify events %o result %s",t.map(e=>e.id),n),clearTimeout(e)}).catch(t=>{let n=null==t?void 0:t.stack,r=null==t?void 0:t.message;n&&r?this.pluginContext.logger.error("network error: %s $o",r,n):this.pluginContext.logger.error("network error: %o",null==t?void 0:t.message),this.emit("submit-et-error",{message:r,stack:n}),clearTimeout(e)});n.push(s)}this.pluginContext.logger.trace("with channel domain %s",this.channelDomain);let e=setTimeout(()=>{this.emit("submit-timeout"),this.pluginContext.logger.trace("event %o timeout",t.map(({id:e})=>e)),c.abort()},i),l=(0,u.doWithRetry)({incremental:!0,durationMS:500,count:o||2,name:"event"},()=>(0,a.default)(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.map(({event:e})=>Object.assign(Object.assign({},e),{verbose:1}))),signal:c.signal}).then(e=>e.json())).then(n=>{s=!0,this.pluginContext.logger.trace("new sent events %o result %s",t.map(({id:e})=>e),n),clearTimeout(e)}).catch(t=>{let n=null==t?void 0:t.stack,r=null==t?void 0:t.message;n&&r?this.pluginContext.logger.trace("network error: %s %o",r,n):this.pluginContext.logger.trace("network error: %o",t),this.emit("submit-error",{message:r,stack:n}),clearTimeout(e)});n.push(l)}yield Promise.all(n).finally(()=>{var e,n;for(let{event:r}of t)this.emit("end",{event:r,hasSucceed:s}),null==(n=(e=this.options).onEnd)||n.call(e,r,s)})}finally{this.pending=!1}this.queue.length>0?this.flush():(this.pluginContext.logger.trace("queue drained, last sent %d",t.length),this.emit("drain",{lastEvents:t,hasSucceed:s}))})}install(e){this.pluginContext=e}onSendEvent({event:e,id:t}){let{events:n}=e,r=o(e,["events"]),i=(0,u.divide)(n,50).map(e=>({id:t,event:Object.assign(Object.assign({},r),{events:e})}));this.queue.push(...i),this.flush()}getVar(e,t){var n,o,i,s;return r(this,void 0,void 0,function*(){let{header:r,user:l}=this.pluginContext.metaInfo,a=Object.assign(Object.assign(Object.assign(Object.assign({aid:r.app_id},r),l),null==t?void 0:t.extraProperties),{custom:Object.assign(Object.assign({},c(r.custom)),null==t?void 0:t.extraProperties.custom)});this.pluginContext.logger.trace("abRequest config: %o",a);let d=yield this.abRequest(a,{timeout:(null==t?void 0:t.timeout)||3e3});if(null==(n=d[e])?void 0:n.vid){let{user_unique_id:n,uuid:r}=null!=(o=null==t?void 0:t.extraProperties)?o:{};this.pluginContext.logger.trace("abtest_exposure name: %s, vid: %s, val: %o",e,d[e].vid,d[e].val),this.pluginContext.collect([{extra:{ab_sdk_version:String(d[e].vid)},name:"abtest_exposure",params:{}}],{user:{user_unique_id:n||r},header:{ab_sdk_version:String(d[e].vid)}})}return null!=(s=null==(i=d[e])?void 0:i.val)?s:null==t?void 0:t.defaultValue})}getAllVars(e){return r(this,void 0,void 0,function*(){let{header:t,user:n}=this.pluginContext.metaInfo,r=Object.assign(Object.assign(Object.assign(Object.assign({aid:t.app_id},t),n),null==e?void 0:e.extraProperties),{custom:Object.assign(Object.assign({},c(t.custom)),null==e?void 0:e.extraProperties.custom)});return this.pluginContext.logger.trace("abRequest config: %o",r),this.abRequest(r,{timeout:(null==e?void 0:e.timeout)||3e3})})}abRequest(e,t){return r(this,void 0,void 0,function*(){let n,r;try{let e=new URL(this.options.abServiceOrigin);e.pathname=d.pathMap.ABConfigPath,n=e.toJSON(),this.pluginContext.logger.trace("request abtest config with url %s",n)}catch(e){this.pluginContext.logger.error("invalid service origin %O",e)}try{r=AbortController||l.default}catch(e){r=l.default}let o=new r,i=setTimeout(()=>{this.emit("submit-ab-timeout"),this.pluginContext.logger.trace("ab requesttimeout"),o.abort()},t.timeout);if(!n)return{};let s=(0,a.default)(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({header:e}),signal:o.signal}).then(e=>e.json()).then(e=>(this.pluginContext.logger.trace("abRequest response %O",e),clearTimeout(i),null==e?void 0:e.data));return(yield s.catch(e=>{this.pluginContext.logger.error("unexpected_error_when_request_ab_ata"),this.pluginContext.logger.error(e),clearTimeout(i)}))||{}})}}t.HttpController=p,t.httpPlugin=function(e){let t=e.channel_domain||e.channel&&d.ReportURL[e.channel];if(!t)throw Error("plugin 'http': channel or channel_domain can't be both undefined");return new p(e,t)}},"../../../node_modules/.pnpm/@logsdk+node-plugin-http@4.0.8/node_modules/@logsdk/node-plugin-http/lib/utility.js"(e,t){var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{a(r.next(e))}catch(e){i(e)}}function l(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,l)}a((r=r.apply(e,t||[])).next())})};function r(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e).unref()})}Object.defineProperty(t,"__esModule",{value:!0}),t.doWithRetry=t.waitUntil=t.divide=void 0,t.divide=function(e,t){return e.reduce((e,n)=>{let r=e[e.length-1];return r.length>=t&&(r=[],e.push(r)),r.push(n),e},[[]])},t.waitUntil=r,t.doWithRetry=function(e,t){return n(this,void 0,void 0,function*(){let n,o=e.count>=0?e.count:0,i=o+1;for(;i>0;){i--;try{return yield null==t?void 0:t()}catch(e){n=e}let s=o+1-i;yield r(e.durationMS*s)}return Promise.reject(n)})}},"../../../node_modules/.pnpm/@logsdk+node-utils@3.0.8/node_modules/@logsdk/node-utils/lib/format.js"(e,t,n){t.format=void 0;let r=/%[sdjo%]/g;t.format=function(e,...t){var o;return"object"==typeof process&&"string"==typeof(null==(o=null==process?void 0:process.versions)?void 0:o.node)?n("util").format(e,...t):function(e){let t=1,n=arguments,o=n.length,i=String(e).replace(r,e=>{if("%%"===e)return"%";if(t>=o)return e;switch(e){case"%s":return String(n[t++]);case"%d":return Number(n[t++]).toString();case"%j":try{return JSON.stringify(n[t++])}catch(e){return"[Circular]"}default:return e}});for(var s,l=n[t];t<o;l=n[++t])null!==l&&"object"==typeof(s=l)&&null!==s?i+=" "+JSON.stringify(l):i+=" "+l;return i}(e,...t)}},"../../../node_modules/.pnpm/@logsdk+node-utils@3.0.8/node_modules/@logsdk/node-utils/lib/index.js"(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n("../../../node_modules/.pnpm/@logsdk+node-utils@3.0.8/node_modules/@logsdk/node-utils/lib/logger.js"),t)},"../../../node_modules/.pnpm/@logsdk+node-utils@3.0.8/node_modules/@logsdk/node-utils/lib/logger.js"(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;let r=n("../../../node_modules/.pnpm/@logsdk+node-utils@3.0.8/node_modules/@logsdk/node-utils/lib/format.js"),o={silent:0,error:1,warn:2,verbose:3},i={write(e,t){switch(e){case"error":console.error(t);break;case"warn":console.warn(t);break;default:console.log(t)}}};t.Logger=class e{constructor(e){this.product=e,this.levelIndex=1,this.consumer=i,this.getLevelIndex=()=>this.levelIndex,this.getConsumer=()=>this.consumer}propagate(t){let n=new e(`${this.product}.${t}`);return n.getLevelIndex=()=>this.levelIndex,n.getConsumer=()=>this.consumer,n}setLevel(e){this.levelIndex=o[e]||1}log(e,t,...n){let o=(0,r.format)(t,...n);this.getConsumer().write(e,`[${this.product}] [${e}] ${o}`)}error(e,...t){this.getLevelIndex()>=1&&this.log("error",e,...t)}warn(e,...t){this.getLevelIndex()>=2&&this.log("warn",e,...t)}trace(e,...t){this.getLevelIndex()>=3&&this.log("trace",e,...t)}}},"../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(e,t,n){let r=n("child_process"),o=n("../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"),i=n("../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js");function s(e,t,n){let s=o(e,t,n),l=r.spawn(s.command,s.args,s.options);return i.hookChildProcess(l,s),l}e.exports=s,e.exports.spawn=s,e.exports.sync=function(e,t,n){let s=o(e,t,n),l=r.spawnSync(s.command,s.args,s.options);return l.error=l.error||i.verifyENOENTSync(l.status,s),l},e.exports._parse=o,e.exports._enoent=i},"../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(e){let t="win32"===process.platform;function n(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(e,r){return t&&1===e&&!r.file?n(r.original,"spawn"):null}e.exports={hookChildProcess:function(e,n){if(!t)return;let o=e.emit;e.emit=function(t,i){if("exit"===t){let t=r(i,n);if(t)return o.call(e,"error",t)}return o.apply(e,arguments)}},verifyENOENT:r,verifyENOENTSync:function(e,r){return t&&1===e&&!r.file?n(r.original,"spawnSync"):null},notFoundError:n}},"../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(e,t,n){let r=n("path"),o=n("../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"),i=n("../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"),s=n("../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"),l="win32"===process.platform,a=/\.(?:com|exe)$/i,d=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null);let u={command:e,args:t=t?t.slice(0):[],options:n=Object.assign({},n),file:void 0,original:{command:e,args:t}};return n.shell?u:function(e){let t;if(!l)return e;let n=(e.file=o(e),(t=e.file&&s(e.file))?(e.args.unshift(e.file),e.command=t,o(e)):e.file),u=!a.test(n);if(e.options.forceShell||u){let t=d.test(n);e.command=r.normalize(e.command),e.command=i.command(e.command),e.args=e.args.map(e=>i.argument(e,t));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(u)}},"../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(e){let t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,n){return e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1"),e=(e=`"${e}"`).replace(t,"^$1"),n&&(e=e.replace(t,"^$1")),e}},"../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(e,t,n){let r=n("fs"),o=n("../../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js");e.exports=function(e){let t,n=Buffer.alloc(150);try{t=r.openSync(e,"r"),r.readSync(t,n,0,150,0),r.closeSync(t)}catch(e){}return o(n.toString())}},"../../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(e,t,n){let r=n("path"),o=n("../../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"),i=n("../../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js");function s(e,t){let n,s=e.options.env||process.env,l=process.cwd(),a=null!=e.options.cwd,d=a&&void 0!==process.chdir&&!process.chdir.disabled;if(d)try{process.chdir(e.options.cwd)}catch(e){}try{n=o.sync(e.command,{path:s[i({env:s})],pathExt:t?r.delimiter:void 0})}catch(e){}finally{d&&process.chdir(l)}return n&&(n=r.resolve(a?e.options.cwd:"",n)),n}e.exports=function(e){return s(e)||s(e,!0)}},"../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(e,t,n){var r;function o(e,t,n){if("function"==typeof t&&(n=t,t={}),!n){if("function"!=typeof Promise)throw TypeError("callback not provided");return new Promise(function(n,r){o(e,t||{},function(e,t){e?r(e):n(t)})})}r(e,t||{},function(e,r){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)})}n("fs"),r="win32"===process.platform||globalThis.TESTING_WINDOWS?n("../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"):n("../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"),e.exports=o,o.sync=function(e,t){try{return r.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},"../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(e,t,n){e.exports=o,o.sync=function(e,t){return i(r.statSync(e),t)};var r=n("fs");function o(e,t,n){r.stat(e,function(e,r){n(e,!e&&i(r,t))})}function i(e,t){var n,r,o,i,s,l,a,d,u;return e.isFile()&&(n=e,r=t,o=n.mode,i=n.uid,s=n.gid,l=void 0!==r.uid?r.uid:process.getuid&&process.getuid(),a=void 0!==r.gid?r.gid:process.getgid&&process.getgid(),d=parseInt("100",8),u=parseInt("010",8),o&parseInt("001",8)||o&u&&s===a||o&d&&i===l||o&(d|u)&&0===l)}},"../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(e,t,n){e.exports=i,i.sync=function(e,t){return o(r.statSync(e),e,t)};var r=n("fs");function o(e,t,n){if(!e.isSymbolicLink()&&!e.isFile())return!1;var r=void 0!==n.pathExt?n.pathExt:process.env.PATHEXT;if(!r||-1!==(r=r.split(";")).indexOf(""))return!0;for(var o=0;o<r.length;o++){var i=r[o].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function i(e,t,n){r.stat(e,function(r,i){n(r,!r&&o(i,e,t))})}},"../../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(e){let t=(e={})=>{let t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};e.exports=t,e.exports.default=t},"../../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(e,t,n){let r=n("../../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js");e.exports=(e="")=>{let t=e.match(r);if(!t)return null;let[n,o]=t[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i}},"../../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(e){e.exports=/^#!(.*)/},"../../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(e,t,n){let r="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,o=n("path"),i=r?";":":",s=n("../../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"),l=e=>Object.assign(Error(`not found: ${e}`),{code:"ENOENT"}),a=(e,t)=>{let n=t.colon||i,o=e.match(/\//)||r&&e.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],s=r?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",l=r?s.split(n):[""];return r&&-1!==e.indexOf(".")&&""!==l[0]&&l.unshift(""),{pathEnv:o,pathExt:l,pathExtExe:s}},d=(e,t,n)=>{"function"==typeof t&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:i,pathExtExe:d}=a(e,t),u=[],c=n=>new Promise((i,s)=>{if(n===r.length)return t.all&&u.length?i(u):s(l(e));let a=r[n],d=/^".*"$/.test(a)?a.slice(1,-1):a,c=o.join(d,e);i(p(!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c,n,0))}),p=(e,n,r)=>new Promise((o,l)=>{if(r===i.length)return o(c(n+1));let a=i[r];s(e+a,{pathExt:d},(i,s)=>{if(!i&&s)if(!t.all)return o(e+a);else u.push(e+a);return o(p(e,n,r+1))})});return n?c(0).then(e=>n(null,e),n):c(0)};e.exports=d,d.sync=(e,t)=>{let{pathEnv:n,pathExt:r,pathExtExe:i}=a(e,t=t||{}),d=[];for(let l=0;l<n.length;l++){let a=n[l],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=o.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let e=0;e<r.length;e++){let n=p+r[e];try{if(s.sync(n,{pathExt:i}))if(!t.all)return n;else d.push(n)}catch(e){}}}if(t.all&&d.length)return d;if(t.nothrow)return null;throw l(e)}},"../../../node_modules/.pnpm/abort-controller@3.0.0/node_modules/abort-controller/dist/abort-controller.mjs"(e,t,n){n.r(t);var r=n("../../../node_modules/.pnpm/event-target-shim@5.0.1/node_modules/event-target-shim/dist/event-target-shim.mjs");class o extends r.SF{constructor(){throw super(),TypeError("AbortSignal cannot be constructed directly")}get aborted(){let e=i.get(this);if("boolean"!=typeof e)throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return e}}(0,r.Ui)(o.prototype,"abort");let i=new WeakMap;Object.defineProperties(o.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(o.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class s{constructor(){let e;l.set(this,(e=Object.create(o.prototype),r.SF.call(e),i.set(e,!1),e))}get signal(){return a(this)}abort(){var e;e=a(this),!1===i.get(e)&&(i.set(e,!0),e.dispatchEvent({type:"abort"}))}}let l=new WeakMap;function a(e){let t=l.get(e);if(null==t)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${null===e?"null":typeof e}`);return t}Object.defineProperties(s.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(s.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"}),n.d(t,{AbortController:()=>s,AbortSignal:()=>o},{default:s})},"../../../node_modules/.pnpm/event-target-shim@5.0.1/node_modules/event-target-shim/dist/event-target-shim.mjs"(e,t,n){let r=new WeakMap,o=new WeakMap;function i(e){let t=r.get(e);return console.assert(null!=t,"'this' is expected an Event object, but got",e),t}function s(e){if(null!=e.passiveListener){"u">typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",e.passiveListener);return}e.event.cancelable&&(e.canceled=!0,"function"==typeof e.event.preventDefault&&e.event.preventDefault())}function l(e,t){r.set(this,{eventTarget:e,event:t,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:t.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let n=Object.keys(t);for(let e=0;e<n.length;++e){let t=n[e];t in this||Object.defineProperty(this,t,a(t))}}function a(e){return{get(){return i(this).event[e]},set(t){i(this).event[e]=t},configurable:!0,enumerable:!0}}function d(e,t){i(e).passiveListener=t}l.prototype={get type(){return i(this).event.type},get target(){return i(this).eventTarget},get currentTarget(){return i(this).currentTarget},composedPath(){let e=i(this).currentTarget;return null==e?[]:[e]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return i(this).eventPhase},stopPropagation(){let e=i(this);e.stopped=!0,"function"==typeof e.event.stopPropagation&&e.event.stopPropagation()},stopImmediatePropagation(){let e=i(this);e.stopped=!0,e.immediateStopped=!0,"function"==typeof e.event.stopImmediatePropagation&&e.event.stopImmediatePropagation()},get bubbles(){return!!i(this).event.bubbles},get cancelable(){return!!i(this).event.cancelable},preventDefault(){s(i(this))},get defaultPrevented(){return i(this).canceled},get composed(){return!!i(this).event.composed},get timeStamp(){return i(this).timeStamp},get srcElement(){return i(this).eventTarget},get cancelBubble(){return i(this).stopped},set cancelBubble(value){if(!value)return;let e=i(this);e.stopped=!0,"boolean"==typeof e.event.cancelBubble&&(e.event.cancelBubble=!0)},get returnValue(){return!i(this).canceled},set returnValue(value){value||s(i(this))},initEvent(){}},Object.defineProperty(l.prototype,"constructor",{value:l,configurable:!0,writable:!0}),"u">typeof window&&void 0!==window.Event&&(Object.setPrototypeOf(l.prototype,window.Event.prototype),o.set(window.Event.prototype,l));let u=new WeakMap;function c(e){return null!==e&&"object"==typeof e}function p(e){let t=u.get(e);if(null==t)throw TypeError("'this' is expected an EventTarget object, but got another value.");return t}function h(e,t){Object.defineProperty(e,`on${t}`,{get(){let e=p(this).get(t);for(;null!=e;){if(3===e.listenerType)return e.listener;e=e.next}return null},set(e){"function"==typeof e||c(e)||(e=null);let n=p(this),r=null,o=n.get(t);for(;null!=o;)3===o.listenerType?null!==r?r.next=o.next:null!==o.next?n.set(t,o.next):n.delete(t):r=o,o=o.next;if(null!==e){let o={listener:e,listenerType:3,passive:!1,once:!1,next:null};null===r?n.set(t,o):r.next=o}},configurable:!0,enumerable:!0})}function m(e){function t(){g.call(this)}t.prototype=Object.create(g.prototype,{constructor:{value:t,configurable:!0,writable:!0}});for(let n=0;n<e.length;++n)h(t.prototype,e[n]);return t}function g(){if(this instanceof g)return void u.set(this,new Map);if(1==arguments.length&&Array.isArray(arguments[0]))return m(arguments[0]);if(arguments.length>0){let e=Array(arguments.length);for(let t=0;t<arguments.length;++t)e[t]=arguments[t];return m(e)}throw TypeError("Cannot call a class as a function")}g.prototype={addEventListener(e,t,n){if(null==t)return;if("function"!=typeof t&&!c(t))throw TypeError("'listener' should be a function or an object.");let r=p(this),o=c(n),i=(o?n.capture:n)?1:2,s={listener:t,listenerType:i,passive:o&&!!n.passive,once:o&&!!n.once,next:null},l=r.get(e);if(void 0===l)return void r.set(e,s);let a=null;for(;null!=l;){if(l.listener===t&&l.listenerType===i)return;a=l,l=l.next}a.next=s},removeEventListener(e,t,n){if(null==t)return;let r=p(this),o=(c(n)?n.capture:n)?1:2,i=null,s=r.get(e);for(;null!=s;){if(s.listener===t&&s.listenerType===o)return void(null!==i?i.next=s.next:null!==s.next?r.set(e,s.next):r.delete(e));i=s,s=s.next}},dispatchEvent(e){if(null==e||"string"!=typeof e.type)throw TypeError('"event.type" should be a string.');let t=p(this),n=e.type,r=t.get(n);if(null==r)return!0;let s=new(function e(t){if(null==t||t===Object.prototype)return l;let n=o.get(t);return null==n&&(n=function(e,t){let n=Object.keys(t);if(0===n.length)return e;function r(t,n){e.call(this,t,n)}r.prototype=Object.create(e.prototype,{constructor:{value:r,configurable:!0,writable:!0}});for(let o=0;o<n.length;++o){let s=n[o];if(!(s in e.prototype)){let e="function"==typeof Object.getOwnPropertyDescriptor(t,s).value;Object.defineProperty(r.prototype,s,e?function(e){return{value(){let t=i(this).event;return t[e].apply(t,arguments)},configurable:!0,enumerable:!0}}(s):a(s))}}return r}(e(Object.getPrototypeOf(t)),t),o.set(t,n)),n}(Object.getPrototypeOf(e)))(this,e),u=null;for(;null!=r;){if(r.once?null!==u?u.next=r.next:null!==r.next?t.set(n,r.next):t.delete(n):u=r,d(s,r.passive?r.listener:null),"function"==typeof r.listener)try{r.listener.call(this,s)}catch(e){"u">typeof console&&"function"==typeof console.error&&console.error(e)}else 3!==r.listenerType&&"function"==typeof r.listener.handleEvent&&r.listener.handleEvent(s);if(i(s).immediateStopped)break;r=r.next}return d(s,null),i(s).eventPhase=0,i(s).currentTarget=null,!s.defaultPrevented}},Object.defineProperty(g.prototype,"constructor",{value:g,configurable:!0,writable:!0}),"u">typeof window&&void 0!==window.EventTarget&&Object.setPrototypeOf(g.prototype,window.EventTarget.prototype),n.d(t,{SF:()=>g,Ui:()=>h})},"../../../node_modules/.pnpm/@dp+tea-sdk-node@3.0.12/node_modules/@dp/tea-sdk-node/package.json"(e){e.exports={version:"3.0.12"}}});let l=r("node:crypto"),a=r("node:fs"),d=r("node:os"),u=r("node:path");function c(e){try{return(0,a.readFileSync)(e,"utf8").trim()||void 0}catch{return}}let p=r("../../../node_modules/.pnpm/@dp+tea-sdk-node@3.0.12/node_modules/@dp/tea-sdk-node/lib/index.js"),h=r("../../../node_modules/.pnpm/@logsdk+node-plugin-http@4.0.8/node_modules/@logsdk/node-plugin-http/lib/index.js");class m{constructor(e=function(e=u.join((0,d.homedir)(),".doubao-apps")){let t=u.join(e,"monitor-user-id"),n=c(t);if(n)return n;let r=(0,l.randomUUID)();try{return(0,a.mkdirSync)(e,{recursive:!0,mode:448}),(0,a.writeFileSync)(t,`${r}
|
|
7
|
-
`,{encoding:"utf8",flag:"wx",mode:384}),r}catch{return c(t)??"anonymous-unpersisted"}}()){this.pendingCount=0,this.sdk=new p.TeaSDK({app_id:944787,logLevel:"silent"}),this.controller=(0,h.httpPlugin)({channel:"cn",retry:2,timeout:2e3}),this.controller.on("end",({hasSucceed:e})=>{this.pendingCount=Math.max(0,this.pendingCount-1),this.sdk.logger.trace("Tea event upload completed, hasSucceed: %s",e),e||this.sdk.logger.warn("Tea event upload did not succeed")}),this.controller.on("submit-error",({message:e})=>{this.sdk.logger.warn("Tea event upload failed: %s",e??"unknown network error")}),this.controller.on("submit-timeout",()=>{this.sdk.logger.warn("Tea event upload timed out after %d ms",2e3)}),this.sdk.use(this.controller),this.sdk.config({user:{user_unique_id:e}})}async upload(e){this.pendingCount+=1;try{this.sdk.collect(e.name,e.params)}catch(e){throw this.pendingCount-=1,e}}async flush(e){0!==this.pendingCount&&await new Promise(t=>{let n=()=>{clearTimeout(r),this.controller.off("drain",n),t()},r=setTimeout(n,e);this.controller.once("drain",n)})}}function g(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let f={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"\xbd",oneThird:"⅓",oneQuarter:"\xbc",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"\xbe",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},b={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},y={...f,...b},v={...f,tick:"√",info:"i",warning:"‼",cross:"\xd7",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(\xd7)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xd7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xd7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},w=function(){let{env:e}=s,{TERM:t,TERM_PROGRAM:n}=e;return"win32"!==s.platform?"linux"!==t:!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===n||"vscode"===n||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}()?y:v;Object.entries(b);let x=i?.WriteStream?.prototype?.hasColors?.()??!1,O=(e,t)=>{if(!x)return e=>e;let n=`\u001B[${e}m`,r=`\u001B[${t}m`;return e=>{let o=e+"",i=o.indexOf(r);if(-1===i)return n+o+r;let s=n,l=0,a=(22===t?r:"")+n;for(;-1!==i;)s+=o.slice(l,i)+a,l=i+r.length,i=o.indexOf(r,l);return s+(o.slice(l)+r)}};O(0,0);let S=O(1,22);O(2,22),O(3,23),O(4,24),O("4:2",24),O("4:3",24),O("4:4",24),O("4:5",24),O(53,55),O(7,27),O(8,28),O(9,29),O(30,39),O(31,39),O(32,39),O(33,39),O(34,39),O(35,39),O(36,39),O(37,39);let _=O(90,39);O(40,49),O(41,49),O(42,49),O(43,49),O(44,49),O(45,49),O(46,49),O(47,49),O(100,49);let D=O(91,39);O(92,39);let j=O(93,39);function T(e={}){let{env:t=process.env,platform:n=process.platform}=e;return"win32"!==n?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}O(94,39),O(95,39),O(96,39),O(97,39),O(101,49),O(102,49),O(103,49),O(104,49),O(105,49),O(106,49),O(107,49),O("58;5;0",59),O("58;5;1",59),O("58;5;2",59),O("58;5;3",59),O("58;5;4",59),O("58;5;5",59),O("58;5;6",59),O("58;5;7",59),O("58;5;8",59),O("58;5;9",59),O("58;5;10",59),O("58;5;11",59),O("58;5;12",59),O("58;5;13",59),O("58;5;14",59),O("58;5;15",59);let E=r("node:util"),R=r("node:child_process"),B=r("node:url");function P(e){return e instanceof URL?(0,B.fileURLToPath)(e):e}(0,E.promisify)(R.execFile);let C=({env:e=s.env,...t}={})=>{let n=T({env:e={...e}});return t.path=e[n],e[n]=(({cwd:e=s.cwd(),path:t=s.env[T()],preferLocal:n=!0,execPath:r=s.execPath,addExecPath:o=!0}={})=>{var i,l,a,d;let c,p=u.resolve(P(e)),h=[],m=t.split(u.delimiter);return n&&((e,t,n)=>{for(let r of{*[Symbol.iterator](){let e,t=u.resolve(P(n));for(;e!==t;)yield t,e=t,t=u.resolve(t,"..")}}){let n=u.join(r,"node_modules/.bin");t.includes(n)||e.push(n)}})(h,m,p),o&&(i=h,l=m,a=r,d=p,c=u.resolve(d,P(a),".."),l.includes(c)||i.push(c)),""===t||t===u.delimiter?`${h.join(u.delimiter)}${t}`:[...h,t].join(u.delimiter)})(t),e},L=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],k=(e,t)=>({name:`SIGRT${t+1}`,number:I+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),I=34,A=()=>[...L,...Array.from({length:64-I+1},k)].map(U),U=({name:e,number:t,description:n,action:r,forced:o=!1,standard:i})=>{let{signals:{[e]:s}}=d.constants,l=void 0!==s;return{name:e,number:l?s:t,description:n,supported:l,action:r,forced:o,standard:i}},M=Object.fromEntries(A().map(({name:e,number:t,description:n,supported:r,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:n,supported:r,action:o,forced:i,standard:s}])),N=(e,t)=>{let n=t.find(({name:t})=>d.constants.signals[t]===e);return void 0!==n?n:t.find(t=>t.number===e)};function G(e){if("string"==typeof e)return F(e);if(!(ArrayBuffer.isView(e)&&1===e.BYTES_PER_ELEMENT))throw Error("Input must be a string or a Uint8Array");return $(e)}t=A(),Object.assign({},...Array.from({length:65},(e,n)=>((e,t)=>{let n=N(e,t);if(void 0===n)return{};let{name:r,description:o,supported:i,action:s,forced:l,standard:a}=n;return{[e]:{name:r,number:e,description:o,supported:i,action:s,forced:l,standard:a}}})(n,t)));let F=e=>e.at(-1)===H?e.slice(0,e.at(-2)===V?-2:-1):e,$=e=>e.at(-1)===q?e.subarray(0,e.at(-2)===W?-2:-1):e,H="\n",q=H.codePointAt(0),V="\r",W=V.codePointAt(0);function z(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function K(e,{checkOpen:t=!0}={}){return z(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Y(e,{checkOpen:t=!0}={}){return z(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function J(e,t){return K(e,t)&&Y(e,t)}let X=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Q{#e;#t;#n=!1;#r=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){let e=()=>this.#o();return this.#r=this.#r?this.#r.then(e,e):e(),this.#r}return(e){let t=()=>this.#i(e);return this.#r?this.#r.then(t,t):t()}async #o(){let e;if(this.#n)return{done:!0,value:void 0};try{e=await this.#e.read()}catch(e){throw this.#r=void 0,this.#n=!0,this.#e.releaseLock(),e}return e.done&&(this.#r=void 0,this.#n=!0,this.#e.releaseLock()),e}async #i(e){if(this.#n)return{done:!0,value:e};if(this.#n=!0,!this.#t){let t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}let Z=Symbol();function ee(){return this[Z].next()}function et(e){return this[Z].return(e)}Object.defineProperty(ee,"name",{value:"next"}),Object.defineProperty(et,"name",{value:"return"});let en=Object.create(X,{next:{enumerable:!0,configurable:!0,writable:!0,value:ee},return:{enumerable:!0,configurable:!0,writable:!0,value:et}});function er({preventCancel:e=!1}={}){let t=new Q(this.getReader(),e),n=Object.create(en);return n[Z]=t,n}let{toString:eo}=Object.prototype,ei=async function*(e){let t=new AbortController,n={};es(e,t,n);try{for await(let[n]of el.on(e,"data",{signal:t.signal}))yield n}catch(e){if(void 0!==n.error)throw n.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},es=async(e,t,n)=>{try{await el.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){n.error=e}finally{t.abort()}},el={},ea=async(e,{init:t,convertChunk:n,getSize:r,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:l},{maxBuffer:a=1/0}={})=>{let d=(e=>{if(Y(e,{checkOpen:!1})&&void 0!==el.on)return ei(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===eo.call(e))return er.call(e);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")})(e),u=t();u.length=0;try{for await(let e of d){let t=n[ep(e)](e,u);eu({convertedChunk:t,state:u,getSize:r,truncateChunk:o,addChunk:i,maxBuffer:a})}return ed({state:u,convertChunk:n,getSize:r,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:a}),l(u)}catch(t){let e="object"==typeof t&&null!==t?t:Error(t);throw e.bufferedData=l(u),e}},ed=({state:e,getSize:t,truncateChunk:n,addChunk:r,getFinalChunk:o,maxBuffer:i})=>{let s=o(e);void 0!==s&&eu({convertedChunk:s,state:e,getSize:t,truncateChunk:n,addChunk:r,maxBuffer:i})},eu=({convertedChunk:e,state:t,getSize:n,truncateChunk:r,addChunk:o,maxBuffer:i})=>{let s=n(e),l=t.length+s;if(l<=i)return void ec(e,t,o,l);let a=r(e,i-t.length);throw void 0!==a&&ec(a,t,o,i),new em},ec=(e,t,n,r)=>{t.contents=n(e,t,r),t.length=r},ep=e=>{let t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";let n=eh.call(e);return"[object ArrayBuffer]"===n?"arrayBuffer":"[object DataView]"===n?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===eh.call(e.buffer)?"typedArray":"others"},{toString:eh}=Object.prototype;class em extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}let eg=e=>Number.isFinite(e)?e:0,ef=24n*60n*60n*1000n;function eb(e,t){let n="bigint"==typeof e;if(!n&&!Number.isFinite(e))throw TypeError("Expected a finite number or bigint");t={...t};let r=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[],i=(e,n,r,i)=>{if(!((0===o.length||!t.colonNotation)&&(0===e||0n===e))||t.colonNotation&&"m"===r){if(i??=String(e),t.colonNotation){let e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+(1===e||1n===e?n:`${n}s`):r;o.push(i)}},s=function(e){switch(typeof e){case"number":if(Number.isFinite(e))return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(eg(1e3*e)%1e3),nanoseconds:Math.trunc(eg(1e6*e)%1e3)};break;case"bigint":return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}throw TypeError("Expected a finite number or bigint")}(e),l=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(l)+BigInt(s.hours),"hour","h"):(t.hideYear?i(l,"day","d"):(i(l/365n,"year","y"),i(l%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){let e=Number(s.seconds),n=Number(s.milliseconds),r=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(n,"millisecond","ms"),i(r,"microsecond","\xb5s"),i(o,"nanosecond","ns");else{let e=n+r/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,l=e>=1?Math.round(e):Math.ceil(e),a=s?e.toFixed(s):l;i(Number.parseFloat(a),"millisecond","ms",a)}}else{let r=(n?Number(e%ef):e)/1e3%60,o="number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1,s=(Math.round(Math.floor(r*10**o+1e-7))/10**o).toFixed(o),l=t.keepDecimalsOnWholeSeconds?s:s.replace(/\.0+$/,"");i(Number.parseFloat(l),"second","s",l)}if(0===o.length)return r+"0"+(t.verbose?" milliseconds":"ms");let a=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),r+o.join(a)}let ey=r("node:events"),ev=r("node:stream");function ew(e){if(!Array.isArray(e))throw TypeError(`Expected an array, got \`${typeof e}\`.`);for(let t of e)ej(t);let t=e.some(({readableObjectMode:e})=>e),n=ex(e,t),r=new eO({objectMode:t,writableHighWaterMark:n,readableHighWaterMark:n});for(let t of e)r.add(t);return r}let ex=(e,t)=>0===e.length?(0,ev.getDefaultHighWaterMark)(t):Math.max(...e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e));class eO extends ev.PassThrough{#s=new Set([]);#l=new Set([]);#a=new Set([]);#d;#u=Symbol("unpipe");#c=new WeakMap;add(e){if(ej(e),this.#s.has(e))return;this.#s.add(e),this.#d??=eS(this,this.#s,this.#u);let t=eT({passThroughStream:this,stream:e,streams:this.#s,ended:this.#l,aborted:this.#a,onFinished:this.#d,unpipeEvent:this.#u});this.#c.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(ej(e),!this.#s.has(e))return!1;let t=this.#c.get(e);return void 0!==t&&(this.#c.delete(e),e.unpipe(this),await t,!0)}}let eS=async(e,t,n)=>{eU(e,eM);let r=new AbortController;try{await Promise.race([e_(e,r),eD(e,t,n,r)])}finally{r.abort(),eU(e,-eM)}},e_=async(e,{signal:t})=>{try{await (0,o.finished)(e,{signal:t,cleanup:!0})}catch(t){throw eC(e,t),t}},eD=async(e,t,n,{signal:r})=>{for await(let[o]of(0,ey.on)(e,"unpipe",{signal:r}))t.has(o)&&o.emit(n)},ej=e=>{if("function"!=typeof e?.pipe)throw TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},eT=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,onFinished:i,unpipeEvent:s})=>{eU(e,eN);let l=new AbortController;try{await Promise.race([eE(i,t,l),eR({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,controller:l}),eB({stream:t,streams:n,ended:r,aborted:o,unpipeEvent:s,controller:l})])}finally{l.abort(),eU(e,-eN)}n.size>0&&n.size===r.size+o.size&&(0===r.size&&o.size>0?ek(e):eP(e))},eE=async(e,t,{signal:n})=>{try{await e,n.aborted||ek(t)}catch(e){n.aborted||eC(t,e)}},eR=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:i,controller:{signal:s}})=>{try{await (0,o.finished)(t,{signal:s,cleanup:!0,readable:!0,writable:!1}),n.has(t)&&r.add(t)}catch(r){if(s.aborted||!n.has(t))return;eL(r)?i.add(t):eI(e,r)}},eB=async({stream:e,streams:t,ended:n,aborted:r,unpipeEvent:o,controller:{signal:i}})=>{if(await (0,ey.once)(e,o,{signal:i}),!e.readable)return(0,ey.once)(i,"abort",{signal:i});t.delete(e),n.delete(e),r.delete(e)},eP=e=>{e.writable&&e.end()},eC=(e,t)=>{eL(t)?ek(e):eI(e,t)},eL=e=>e?.code==="ERR_STREAM_PREMATURE_CLOSE",ek=e=>{(e.readable||e.writable)&&e.destroy()},eI=(e,t)=>{e.destroyed||(e.once("error",eA),e.destroy(t))},eA=()=>{},eU=(e,t)=>{let n=e.getMaxListeners();0!==n&&n!==1/0&&e.setMaxListeners(n+t)},eM=2,eN=1,eG=[];eG.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&eG.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&eG.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");let eF=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,e$=Symbol.for("signal-exit emitter"),eH=globalThis,eq=Object.defineProperty.bind(Object);class eV{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(eH[e$])return eH[e$];eq(eH,e$,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);-1!==r&&(0===r&&1===n.length?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let o of this.listeners[e])r=!0===o(t,n)||r;return"exit"===e&&(r=this.emit("afterExit",t,n)||r),r}}class eW{}class ez extends eW{#p="win32"===eK.platform?"SIGINT":"SIGHUP";#h=new eV;#m;#g;#f;#b={};#y=!1;constructor(e){for(let t of(super(),this.#m=e,this.#b={},eG))this.#b[t]=()=>{let n=this.#m.listeners(t),{count:r}=this.#h;if("object"==typeof e.__signal_exit_emitter__&&"number"==typeof e.__signal_exit_emitter__.count&&(r+=e.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#h.emit("exit",null,t),r="SIGHUP"===t?this.#p:t;n||e.kill(e.pid,r)}};this.#f=e.reallyExit,this.#g=e.emit}onExit(e,t){if(!eF(this.#m))return()=>{};!1===this.#y&&this.load();let n=t?.alwaysLast?"afterExit":"exit";return this.#h.on(n,e),()=>{this.#h.removeListener(n,e),0===this.#h.listeners.exit.length&&0===this.#h.listeners.afterExit.length&&this.unload()}}load(){if(!this.#y){for(let e of(this.#y=!0,this.#h.count+=1,eG))try{let t=this.#b[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#y&&(this.#y=!1,eG.forEach(e=>{let t=this.#b[e];if(!t)throw Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#g,this.#m.reallyExit=this.#f,this.#h.count-=1)}#w(e){return eF(this.#m)?(this.#m.exitCode=e||0,this.#h.emit("exit",this.#m.exitCode,null),this.#f.call(this.#m,this.#m.exitCode)):0}#v(e,...t){let n=this.#g;if(!("exit"===e&&eF(this.#m)))return n.call(this.#m,e,...t);{"number"==typeof t[0]&&(this.#m.exitCode=t[0]);let r=n.call(this.#m,e,...t);return this.#h.emit("exit",this.#m.exitCode,null),r}}}let eK=globalThis.process,{onExit:eY,load:eJ,unload:eX}=(n=eF(eK)?new ez(eK):new class extends eW{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>n.onExit(e,t),load:()=>n.load(),unload:()=>n.unload()}),eQ=e=>e,eZ=()=>void 0,e0=({contents:e})=>e,e1=e=>{throw Error(`Streams in object mode are not supported: ${String(e)}`)},e3=e=>e.length;async function e2(e,t){return ea(e,e5,t)}let e5={init:()=>({contents:[]}),convertChunk:{string:eQ,buffer:eQ,arrayBuffer:eQ,dataView:eQ,typedArray:eQ,others:eQ},getSize:()=>1,truncateChunk:eZ,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:eZ,finalize:e0};async function e9(e,t){return ea(e,tt,t)}let e4=new TextEncoder,e6=e=>new Uint8Array(e),e8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),e7=e=>te**Math.ceil(Math.log(e)/Math.log(te)),te=2,tt={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>e4.encode(e),buffer:e6,arrayBuffer:e6,dataView:e8,typedArray:e8,others:e1},getSize:e3,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:n},r)=>{let o="resize"in ArrayBuffer.prototype?((e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let n=new ArrayBuffer(t,{maxByteLength:e7(t)});return new Uint8Array(n).set(new Uint8Array(e),0),n})(t,r):((e,t)=>{if(t<=e.byteLength)return e;let n=new ArrayBuffer(e7(t));return new Uint8Array(n).set(new Uint8Array(e),0),n})(t,r);return new Uint8Array(o).set(e,n),o},getFinalChunk:eZ,finalize:({contents:e,length:t})=>"resize"in ArrayBuffer.prototype?e:e.slice(0,t)};async function tn(e,t){return ea(e,to,t)}let tr=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),to={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:eQ,buffer:tr,arrayBuffer:tr,dataView:tr,typedArray:tr,others:e1},getSize:e3,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{let t=e.decode();return""===t?void 0:t},finalize:e0},ti=(e=0)=>t=>`\u001B[${t+e}m`,ts=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,tl=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,ta={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ta.modifier),[...Object.keys(ta.color),...Object.keys(ta.bgColor)];let td=function(){let e=new Map;for(let[t,n]of Object.entries(ta)){for(let[t,r]of Object.entries(n))ta[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=ta[t],e.set(r[0],r[1]);Object.defineProperty(ta,t,{value:n,enumerable:!1})}return Object.defineProperty(ta,"codes",{value:e,enumerable:!1}),ta.color.close="\x1b[39m",ta.bgColor.close="\x1b[49m",ta.color.ansi=ti(),ta.color.ansi256=ts(),ta.color.ansi16m=tl(),ta.bgColor.ansi=ti(10),ta.bgColor.ansi256=ts(10),ta.bgColor.ansi16m=tl(10),Object.defineProperties(ta,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;3===n.length&&(n=[...n].map(e=>e+e).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:e=>ta.rgbToAnsi256(...ta.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){let t,n,r;if(e<8)return 30+e;if(e<16)return 90+(e-8);if(e>=232)n=t=((e-232)*10+8)/255,r=t;else{let o=(e-=16)%36;t=Math.floor(e/36)/5,n=Math.floor(o/6)/5,r=o%6/5}let o=2*Math.max(t,n,r);if(0===o)return 30;let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return 2===o&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>ta.ansi256ToAnsi(ta.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>ta.ansi256ToAnsi(ta.hexToAnsi256(e)),enumerable:!1}}),ta}();function tu(e,t=globalThis.Deno?globalThis.Deno.args:s.argv){let n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return -1!==r&&(-1===o||r<o)}let{env:tc}=s;function tp(t,n={}){var r;return 0!==(r=function(t,{streamIsTTY:n,sniffFlags:r=!0}={}){let o=function(){if("FORCE_COLOR"in tc)return"true"===tc.FORCE_COLOR?1:"false"===tc.FORCE_COLOR?0:0===tc.FORCE_COLOR.length?1:Math.min(Number.parseInt(tc.FORCE_COLOR,10),3)}();void 0!==o&&(e=o);let i=r?e:o;if(0===i)return 0;if(r){if(tu("color=16m")||tu("color=full")||tu("color=truecolor"))return 3;if(tu("color=256"))return 2}if("TF_BUILD"in tc&&"AGENT_NAME"in tc)return 1;if(t&&!n&&void 0===i)return 0;let l=i||0;if("dumb"===tc.TERM)return l;if("win32"===s.platform){let e=d.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in tc)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in tc)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in tc)||"codeship"===tc.CI_NAME?1:l;if("TEAMCITY_VERSION"in tc)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(tc.TEAMCITY_VERSION);if("truecolor"===tc.COLORTERM||"xterm-kitty"===tc.TERM||"xterm-ghostty"===tc.TERM||"wezterm"===tc.TERM)return 3;if("TERM_PROGRAM"in tc){let e=Number.parseInt((tc.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(tc.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(tc.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(tc.TERM)||"COLORTERM"in tc?1:l}(t,{streamIsTTY:t&&t.isTTY,...n}))&&{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}tu("no-color")||tu("no-colors")||tu("color=false")||tu("color=never")?e=0:(tu("color")||tu("colors")||tu("color=true")||tu("color=always"))&&(e=1);let{stdout:th,stderr:tm}={stdout:tp({isTTY:i.isatty(1)}),stderr:tp({isTTY:i.isatty(2)})},tg=Symbol("GENERATOR"),tf=Symbol("STYLER"),tb=Symbol("IS_EMPTY"),ty=["ansi","ansi","ansi256","ansi16m"],tv=Object.create(null);class tw{constructor(e){return tx(e)}}let tx=e=>{let t=(...e)=>e.join(" ");return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=th?th.level:0;e.level=void 0===t.level?n:t.level})(t,e),Object.setPrototypeOf(t,tO.prototype),t};function tO(e){return tx(e)}for(let[e,t]of(Object.setPrototypeOf(tO.prototype,Function.prototype),Object.entries(td)))tv[e]={get(){let n=tj(this,tD(t.open,t.close,this[tf]),this[tb]);return Object.defineProperty(this,e,{value:n}),n}};tv.visible={get(){let e=tj(this,this[tf],!0);return Object.defineProperty(this,"visible",{value:e}),e}};let tS=(e,t,n,...r)=>"rgb"===e?"ansi16m"===t?td[n].ansi16m(...r):"ansi256"===t?td[n].ansi256(td.rgbToAnsi256(...r)):td[n].ansi(td.rgbToAnsi(...r)):"hex"===e?tS("rgb",t,n,...td.hexToRgb(...r)):td[n][e](...r);for(let e of["rgb","hex","ansi256"])tv[e]={get(){let{level:t}=this;return function(...n){return tj(this,tD(tS(e,ty[t],"color",...n),td.color.close,this[tf]),this[tb])}}},tv["bg"+e[0].toUpperCase()+e.slice(1)]={get(){let{level:t}=this;return function(...n){return tj(this,tD(tS(e,ty[t],"bgColor",...n),td.bgColor.close,this[tf]),this[tb])}}};let t_=Object.defineProperties(()=>{},{...tv,level:{enumerable:!0,get(){return this[tg].level},set(e){this[tg].level=e}}}),tD=(e,t,n)=>{let r,o;return void 0===n?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},tj=(e,t,n)=>{let r=(...e)=>tT(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,t_),r[tg]=e,r[tf]=t,r[tb]=n,r},tT=(e,t)=>{if(e.level<=0||!t)return e[tb]?"":t;let n=e[tf];if(void 0===n)return t;let{openAll:r,closeAll:o}=n;if(t.includes("\x1b"))for(;void 0!==n;)t=function(e,t,n){let r=e.indexOf(t);if(-1===r)return e;let o=t.length,i=0,s="";do s+=e.slice(i,r)+t+n,i=r+o,r=e.indexOf(t,i);while(-1!==r);return s+e.slice(i)}(t,n.close,n.open),n=n.parent;let i=t.indexOf("\n");return -1!==i&&(t=function(e,t,n,r){let o=0,i="";do{let s="\r"===e[r-1];i+=e.slice(o,s?r-1:r)+t+(s?"\r\n":"\n")+n,o=r+1,r=e.indexOf("\n",o)}while(-1!==r);return i+e.slice(o)}(t,o,r,i)),r+t+o};Object.defineProperties(tO.prototype,tv);let tE=tx(void 0);tx({level:tm?tm.level:0});let tR=tE;export{tw as Chalk,em as MaxBufferError,m as TeaUploader,S as bold,e2 as getStreamAsArray,e9 as getStreamAsArrayBuffer,tn as getStreamAsString,_ as gray,J as isDuplexStream,g as isPlainObject,Y as isReadableStream,z as isStream,K as isWritableStream,ew as mergeStreams,w as node_modules_figures,C as npmRunPathEnv,eY as onExit,eb as prettyMilliseconds,D as redBright,M as signalsByName,tR as source,G as stripFinalNewline,j as yellowBright};
|
|
7
|
+
`,{encoding:"utf8",flag:"wx",mode:384}),r}catch{return c(t)??"anonymous-unpersisted"}}()){this.pendingCount=0,this.sdk=new p.TeaSDK({app_id:944787,logLevel:"silent"}),this.controller=(0,h.httpPlugin)({channel:"cn",retry:2,timeout:2e3}),this.controller.on("end",({hasSucceed:e})=>{this.pendingCount=Math.max(0,this.pendingCount-1),this.sdk.logger.trace("Tea event upload completed, hasSucceed: %s",e),e||this.sdk.logger.warn("Tea event upload did not succeed")}),this.controller.on("submit-error",({message:e})=>{this.sdk.logger.warn("Tea event upload failed: %s",e??"unknown network error")}),this.controller.on("submit-timeout",()=>{this.sdk.logger.warn("Tea event upload timed out after %d ms",2e3)}),this.sdk.use(this.controller),this.sdk.config({user:{user_unique_id:e}})}async upload(e){this.pendingCount+=1;try{this.sdk.collect(e.name,e.params)}catch(e){throw this.pendingCount-=1,e}}async flush(e){0!==this.pendingCount&&await new Promise(t=>{let n=()=>{clearTimeout(r),this.controller.off("drain",n),t()},r=setTimeout(n,e);this.controller.once("drain",n)})}}function g(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let f={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"\xbd",oneThird:"⅓",oneQuarter:"\xbc",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"\xbe",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},b={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},y={...f,...b},v={...f,tick:"√",info:"i",warning:"‼",cross:"\xd7",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(\xd7)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xd7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xd7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},w=function(){let{env:e}=s,{TERM:t,TERM_PROGRAM:n}=e;return"win32"!==s.platform?"linux"!==t:!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===n||"vscode"===n||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}()?y:v;Object.entries(b);let x=i?.WriteStream?.prototype?.hasColors?.()??!1,O=(e,t)=>{if(!x)return e=>e;let n=`\u001B[${e}m`,r=`\u001B[${t}m`;return e=>{let o=e+"",i=o.indexOf(r);if(-1===i)return n+o+r;let s=n,l=0,a=(22===t?r:"")+n;for(;-1!==i;)s+=o.slice(l,i)+a,l=i+r.length,i=o.indexOf(r,l);return s+(o.slice(l)+r)}};O(0,0);let S=O(1,22);O(2,22),O(3,23),O(4,24),O("4:2",24),O("4:3",24),O("4:4",24),O("4:5",24),O(53,55),O(7,27),O(8,28),O(9,29),O(30,39),O(31,39),O(32,39),O(33,39),O(34,39),O(35,39),O(36,39),O(37,39);let _=O(90,39);O(40,49),O(41,49),O(42,49),O(43,49),O(44,49),O(45,49),O(46,49),O(47,49),O(100,49);let D=O(91,39);O(92,39);let j=O(93,39);function T(e={}){let{env:t=process.env,platform:n=process.platform}=e;return"win32"!==n?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}O(94,39),O(95,39),O(96,39),O(97,39),O(101,49),O(102,49),O(103,49),O(104,49),O(105,49),O(106,49),O(107,49),O("58;5;0",59),O("58;5;1",59),O("58;5;2",59),O("58;5;3",59),O("58;5;4",59),O("58;5;5",59),O("58;5;6",59),O("58;5;7",59),O("58;5;8",59),O("58;5;9",59),O("58;5;10",59),O("58;5;11",59),O("58;5;12",59),O("58;5;13",59),O("58;5;14",59),O("58;5;15",59);let E=r("node:util"),R=r("node:child_process"),B=r("node:url");function P(e){return e instanceof URL?(0,B.fileURLToPath)(e):e}(0,E.promisify)(R.execFile);let L=({env:e=s.env,...t}={})=>{let n=T({env:e={...e}});return t.path=e[n],e[n]=(({cwd:e=s.cwd(),path:t=s.env[T()],preferLocal:n=!0,execPath:r=s.execPath,addExecPath:o=!0}={})=>{var i,l,a,d;let c,p=u.resolve(P(e)),h=[],m=t.split(u.delimiter);return n&&((e,t,n)=>{for(let r of{*[Symbol.iterator](){let e,t=u.resolve(P(n));for(;e!==t;)yield t,e=t,t=u.resolve(t,"..")}}){let n=u.join(r,"node_modules/.bin");t.includes(n)||e.push(n)}})(h,m,p),o&&(i=h,l=m,a=r,d=p,c=u.resolve(d,P(a),".."),l.includes(c)||i.push(c)),""===t||t===u.delimiter?`${h.join(u.delimiter)}${t}`:[...h,t].join(u.delimiter)})(t),e},C=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],k=(e,t)=>({name:`SIGRT${t+1}`,number:I+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),I=34,A=()=>[...C,...Array.from({length:64-I+1},k)].map(U),U=({name:e,number:t,description:n,action:r,forced:o=!1,standard:i})=>{let{signals:{[e]:s}}=d.constants,l=void 0!==s;return{name:e,number:l?s:t,description:n,supported:l,action:r,forced:o,standard:i}},M=Object.fromEntries(A().map(({name:e,number:t,description:n,supported:r,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:n,supported:r,action:o,forced:i,standard:s}])),N=(e,t)=>{let n=t.find(({name:t})=>d.constants.signals[t]===e);return void 0!==n?n:t.find(t=>t.number===e)};function G(e){if("string"==typeof e)return F(e);if(!(ArrayBuffer.isView(e)&&1===e.BYTES_PER_ELEMENT))throw Error("Input must be a string or a Uint8Array");return $(e)}t=A(),Object.assign({},...Array.from({length:65},(e,n)=>((e,t)=>{let n=N(e,t);if(void 0===n)return{};let{name:r,description:o,supported:i,action:s,forced:l,standard:a}=n;return{[e]:{name:r,number:e,description:o,supported:i,action:s,forced:l,standard:a}}})(n,t)));let F=e=>e.at(-1)===H?e.slice(0,e.at(-2)===V?-2:-1):e,$=e=>e.at(-1)===q?e.subarray(0,e.at(-2)===W?-2:-1):e,H="\n",q=H.codePointAt(0),V="\r",W=V.codePointAt(0);function z(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function K(e,{checkOpen:t=!0}={}){return z(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Y(e,{checkOpen:t=!0}={}){return z(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function J(e,t){return K(e,t)&&Y(e,t)}let X=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Q{#e;#t;#n=!1;#r=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){let e=()=>this.#o();return this.#r=this.#r?this.#r.then(e,e):e(),this.#r}return(e){let t=()=>this.#i(e);return this.#r?this.#r.then(t,t):t()}async #o(){let e;if(this.#n)return{done:!0,value:void 0};try{e=await this.#e.read()}catch(e){throw this.#r=void 0,this.#n=!0,this.#e.releaseLock(),e}return e.done&&(this.#r=void 0,this.#n=!0,this.#e.releaseLock()),e}async #i(e){if(this.#n)return{done:!0,value:e};if(this.#n=!0,!this.#t){let t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}let Z=Symbol();function ee(){return this[Z].next()}function et(e){return this[Z].return(e)}Object.defineProperty(ee,"name",{value:"next"}),Object.defineProperty(et,"name",{value:"return"});let en=Object.create(X,{next:{enumerable:!0,configurable:!0,writable:!0,value:ee},return:{enumerable:!0,configurable:!0,writable:!0,value:et}});function er({preventCancel:e=!1}={}){let t=new Q(this.getReader(),e),n=Object.create(en);return n[Z]=t,n}let{toString:eo}=Object.prototype,ei=async function*(e){let t=new AbortController,n={};es(e,t,n);try{for await(let[n]of el.on(e,"data",{signal:t.signal}))yield n}catch(e){if(void 0!==n.error)throw n.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},es=async(e,t,n)=>{try{await el.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){n.error=e}finally{t.abort()}},el={},ea=async(e,{init:t,convertChunk:n,getSize:r,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:l},{maxBuffer:a=1/0}={})=>{let d=(e=>{if(Y(e,{checkOpen:!1})&&void 0!==el.on)return ei(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===eo.call(e))return er.call(e);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")})(e),u=t();u.length=0;try{for await(let e of d){let t=n[ep(e)](e,u);eu({convertedChunk:t,state:u,getSize:r,truncateChunk:o,addChunk:i,maxBuffer:a})}return ed({state:u,convertChunk:n,getSize:r,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:a}),l(u)}catch(t){let e="object"==typeof t&&null!==t?t:Error(t);throw e.bufferedData=l(u),e}},ed=({state:e,getSize:t,truncateChunk:n,addChunk:r,getFinalChunk:o,maxBuffer:i})=>{let s=o(e);void 0!==s&&eu({convertedChunk:s,state:e,getSize:t,truncateChunk:n,addChunk:r,maxBuffer:i})},eu=({convertedChunk:e,state:t,getSize:n,truncateChunk:r,addChunk:o,maxBuffer:i})=>{let s=n(e),l=t.length+s;if(l<=i)return void ec(e,t,o,l);let a=r(e,i-t.length);throw void 0!==a&&ec(a,t,o,i),new em},ec=(e,t,n,r)=>{t.contents=n(e,t,r),t.length=r},ep=e=>{let t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";let n=eh.call(e);return"[object ArrayBuffer]"===n?"arrayBuffer":"[object DataView]"===n?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===eh.call(e.buffer)?"typedArray":"others"},{toString:eh}=Object.prototype;class em extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}let eg=e=>Number.isFinite(e)?e:0,ef=24n*60n*60n*1000n;function eb(e,t){let n="bigint"==typeof e;if(!n&&!Number.isFinite(e))throw TypeError("Expected a finite number or bigint");t={...t};let r=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[],i=(e,n,r,i)=>{if(!((0===o.length||!t.colonNotation)&&(0===e||0n===e))||t.colonNotation&&"m"===r){if(i??=String(e),t.colonNotation){let e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+(1===e||1n===e?n:`${n}s`):r;o.push(i)}},s=function(e){switch(typeof e){case"number":if(Number.isFinite(e))return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(eg(1e3*e)%1e3),nanoseconds:Math.trunc(eg(1e6*e)%1e3)};break;case"bigint":return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}throw TypeError("Expected a finite number or bigint")}(e),l=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(l)+BigInt(s.hours),"hour","h"):(t.hideYear?i(l,"day","d"):(i(l/365n,"year","y"),i(l%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){let e=Number(s.seconds),n=Number(s.milliseconds),r=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(n,"millisecond","ms"),i(r,"microsecond","\xb5s"),i(o,"nanosecond","ns");else{let e=n+r/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,l=e>=1?Math.round(e):Math.ceil(e),a=s?e.toFixed(s):l;i(Number.parseFloat(a),"millisecond","ms",a)}}else{let r=(n?Number(e%ef):e)/1e3%60,o="number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1,s=(Math.round(Math.floor(r*10**o+1e-7))/10**o).toFixed(o),l=t.keepDecimalsOnWholeSeconds?s:s.replace(/\.0+$/,"");i(Number.parseFloat(l),"second","s",l)}if(0===o.length)return r+"0"+(t.verbose?" milliseconds":"ms");let a=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),r+o.join(a)}let ey=r("node:events"),ev=r("node:stream");function ew(e){if(!Array.isArray(e))throw TypeError(`Expected an array, got \`${typeof e}\`.`);for(let t of e)ej(t);let t=e.some(({readableObjectMode:e})=>e),n=ex(e,t),r=new eO({objectMode:t,writableHighWaterMark:n,readableHighWaterMark:n});for(let t of e)r.add(t);return r}let ex=(e,t)=>0===e.length?(0,ev.getDefaultHighWaterMark)(t):Math.max(...e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e));class eO extends ev.PassThrough{#s=new Set([]);#l=new Set([]);#a=new Set([]);#d;#u=Symbol("unpipe");#c=new WeakMap;add(e){if(ej(e),this.#s.has(e))return;this.#s.add(e),this.#d??=eS(this,this.#s,this.#u);let t=eT({passThroughStream:this,stream:e,streams:this.#s,ended:this.#l,aborted:this.#a,onFinished:this.#d,unpipeEvent:this.#u});this.#c.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(ej(e),!this.#s.has(e))return!1;let t=this.#c.get(e);return void 0!==t&&(this.#c.delete(e),e.unpipe(this),await t,!0)}}let eS=async(e,t,n)=>{eU(e,eM);let r=new AbortController;try{await Promise.race([e_(e,r),eD(e,t,n,r)])}finally{r.abort(),eU(e,-eM)}},e_=async(e,{signal:t})=>{try{await (0,o.finished)(e,{signal:t,cleanup:!0})}catch(t){throw eL(e,t),t}},eD=async(e,t,n,{signal:r})=>{for await(let[o]of(0,ey.on)(e,"unpipe",{signal:r}))t.has(o)&&o.emit(n)},ej=e=>{if("function"!=typeof e?.pipe)throw TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},eT=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,onFinished:i,unpipeEvent:s})=>{eU(e,eN);let l=new AbortController;try{await Promise.race([eE(i,t,l),eR({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,controller:l}),eB({stream:t,streams:n,ended:r,aborted:o,unpipeEvent:s,controller:l})])}finally{l.abort(),eU(e,-eN)}n.size>0&&n.size===r.size+o.size&&(0===r.size&&o.size>0?ek(e):eP(e))},eE=async(e,t,{signal:n})=>{try{await e,n.aborted||ek(t)}catch(e){n.aborted||eL(t,e)}},eR=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:i,controller:{signal:s}})=>{try{await (0,o.finished)(t,{signal:s,cleanup:!0,readable:!0,writable:!1}),n.has(t)&&r.add(t)}catch(r){if(s.aborted||!n.has(t))return;eC(r)?i.add(t):eI(e,r)}},eB=async({stream:e,streams:t,ended:n,aborted:r,unpipeEvent:o,controller:{signal:i}})=>{if(await (0,ey.once)(e,o,{signal:i}),!e.readable)return(0,ey.once)(i,"abort",{signal:i});t.delete(e),n.delete(e),r.delete(e)},eP=e=>{e.writable&&e.end()},eL=(e,t)=>{eC(t)?ek(e):eI(e,t)},eC=e=>e?.code==="ERR_STREAM_PREMATURE_CLOSE",ek=e=>{(e.readable||e.writable)&&e.destroy()},eI=(e,t)=>{e.destroyed||(e.once("error",eA),e.destroy(t))},eA=()=>{},eU=(e,t)=>{let n=e.getMaxListeners();0!==n&&n!==1/0&&e.setMaxListeners(n+t)},eM=2,eN=1,eG=[];eG.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&eG.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&eG.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");let eF=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,e$=Symbol.for("signal-exit emitter"),eH=globalThis,eq=Object.defineProperty.bind(Object);class eV{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(eH[e$])return eH[e$];eq(eH,e$,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);-1!==r&&(0===r&&1===n.length?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let o of this.listeners[e])r=!0===o(t,n)||r;return"exit"===e&&(r=this.emit("afterExit",t,n)||r),r}}class eW{}class ez extends eW{#p="win32"===eK.platform?"SIGINT":"SIGHUP";#h=new eV;#m;#g;#f;#b={};#y=!1;constructor(e){for(let t of(super(),this.#m=e,this.#b={},eG))this.#b[t]=()=>{let n=this.#m.listeners(t),{count:r}=this.#h;if("object"==typeof e.__signal_exit_emitter__&&"number"==typeof e.__signal_exit_emitter__.count&&(r+=e.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#h.emit("exit",null,t),r="SIGHUP"===t?this.#p:t;n||e.kill(e.pid,r)}};this.#f=e.reallyExit,this.#g=e.emit}onExit(e,t){if(!eF(this.#m))return()=>{};!1===this.#y&&this.load();let n=t?.alwaysLast?"afterExit":"exit";return this.#h.on(n,e),()=>{this.#h.removeListener(n,e),0===this.#h.listeners.exit.length&&0===this.#h.listeners.afterExit.length&&this.unload()}}load(){if(!this.#y){for(let e of(this.#y=!0,this.#h.count+=1,eG))try{let t=this.#b[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#y&&(this.#y=!1,eG.forEach(e=>{let t=this.#b[e];if(!t)throw Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#g,this.#m.reallyExit=this.#f,this.#h.count-=1)}#w(e){return eF(this.#m)?(this.#m.exitCode=e||0,this.#h.emit("exit",this.#m.exitCode,null),this.#f.call(this.#m,this.#m.exitCode)):0}#v(e,...t){let n=this.#g;if(!("exit"===e&&eF(this.#m)))return n.call(this.#m,e,...t);{"number"==typeof t[0]&&(this.#m.exitCode=t[0]);let r=n.call(this.#m,e,...t);return this.#h.emit("exit",this.#m.exitCode,null),r}}}let eK=globalThis.process,{onExit:eY,load:eJ,unload:eX}=(n=eF(eK)?new ez(eK):new class extends eW{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>n.onExit(e,t),load:()=>n.load(),unload:()=>n.unload()}),eQ=e=>e,eZ=()=>void 0,e0=({contents:e})=>e,e1=e=>{throw Error(`Streams in object mode are not supported: ${String(e)}`)},e2=e=>e.length;async function e3(e,t){return ea(e,e5,t)}let e5={init:()=>({contents:[]}),convertChunk:{string:eQ,buffer:eQ,arrayBuffer:eQ,dataView:eQ,typedArray:eQ,others:eQ},getSize:()=>1,truncateChunk:eZ,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:eZ,finalize:e0};async function e9(e,t){return ea(e,tt,t)}let e4=new TextEncoder,e6=e=>new Uint8Array(e),e8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),e7=e=>te**Math.ceil(Math.log(e)/Math.log(te)),te=2,tt={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>e4.encode(e),buffer:e6,arrayBuffer:e6,dataView:e8,typedArray:e8,others:e1},getSize:e2,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:n},r)=>{let o="resize"in ArrayBuffer.prototype?((e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let n=new ArrayBuffer(t,{maxByteLength:e7(t)});return new Uint8Array(n).set(new Uint8Array(e),0),n})(t,r):((e,t)=>{if(t<=e.byteLength)return e;let n=new ArrayBuffer(e7(t));return new Uint8Array(n).set(new Uint8Array(e),0),n})(t,r);return new Uint8Array(o).set(e,n),o},getFinalChunk:eZ,finalize:({contents:e,length:t})=>"resize"in ArrayBuffer.prototype?e:e.slice(0,t)};async function tn(e,t){return ea(e,to,t)}let tr=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),to={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:eQ,buffer:tr,arrayBuffer:tr,dataView:tr,typedArray:tr,others:e1},getSize:e2,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{let t=e.decode();return""===t?void 0:t},finalize:e0},ti=(e=0)=>t=>`\u001B[${t+e}m`,ts=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,tl=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,ta={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ta.modifier),[...Object.keys(ta.color),...Object.keys(ta.bgColor)];let td=function(){let e=new Map;for(let[t,n]of Object.entries(ta)){for(let[t,r]of Object.entries(n))ta[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=ta[t],e.set(r[0],r[1]);Object.defineProperty(ta,t,{value:n,enumerable:!1})}return Object.defineProperty(ta,"codes",{value:e,enumerable:!1}),ta.color.close="\x1b[39m",ta.bgColor.close="\x1b[49m",ta.color.ansi=ti(),ta.color.ansi256=ts(),ta.color.ansi16m=tl(),ta.bgColor.ansi=ti(10),ta.bgColor.ansi256=ts(10),ta.bgColor.ansi16m=tl(10),Object.defineProperties(ta,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;3===n.length&&(n=[...n].map(e=>e+e).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:e=>ta.rgbToAnsi256(...ta.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){let t,n,r;if(e<8)return 30+e;if(e<16)return 90+(e-8);if(e>=232)n=t=((e-232)*10+8)/255,r=t;else{let o=(e-=16)%36;t=Math.floor(e/36)/5,n=Math.floor(o/6)/5,r=o%6/5}let o=2*Math.max(t,n,r);if(0===o)return 30;let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return 2===o&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>ta.ansi256ToAnsi(ta.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>ta.ansi256ToAnsi(ta.hexToAnsi256(e)),enumerable:!1}}),ta}();function tu(e,t=globalThis.Deno?globalThis.Deno.args:s.argv){let n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return -1!==r&&(-1===o||r<o)}let{env:tc}=s;function tp(t,n={}){var r;return 0!==(r=function(t,{streamIsTTY:n,sniffFlags:r=!0}={}){let o=function(){if("FORCE_COLOR"in tc)return"true"===tc.FORCE_COLOR?1:"false"===tc.FORCE_COLOR?0:0===tc.FORCE_COLOR.length?1:Math.min(Number.parseInt(tc.FORCE_COLOR,10),3)}();void 0!==o&&(e=o);let i=r?e:o;if(0===i)return 0;if(r){if(tu("color=16m")||tu("color=full")||tu("color=truecolor"))return 3;if(tu("color=256"))return 2}if("TF_BUILD"in tc&&"AGENT_NAME"in tc)return 1;if(t&&!n&&void 0===i)return 0;let l=i||0;if("dumb"===tc.TERM)return l;if("win32"===s.platform){let e=d.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in tc)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in tc)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in tc)||"codeship"===tc.CI_NAME?1:l;if("TEAMCITY_VERSION"in tc)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(tc.TEAMCITY_VERSION);if("truecolor"===tc.COLORTERM||"xterm-kitty"===tc.TERM||"xterm-ghostty"===tc.TERM||"wezterm"===tc.TERM)return 3;if("TERM_PROGRAM"in tc){let e=Number.parseInt((tc.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(tc.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(tc.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(tc.TERM)||"COLORTERM"in tc?1:l}(t,{streamIsTTY:t&&t.isTTY,...n}))&&{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}tu("no-color")||tu("no-colors")||tu("color=false")||tu("color=never")?e=0:(tu("color")||tu("colors")||tu("color=true")||tu("color=always"))&&(e=1);let{stdout:th,stderr:tm}={stdout:tp({isTTY:i.isatty(1)}),stderr:tp({isTTY:i.isatty(2)})},tg=Symbol("GENERATOR"),tf=Symbol("STYLER"),tb=Symbol("IS_EMPTY"),ty=["ansi","ansi","ansi256","ansi16m"],tv=Object.create(null);class tw{constructor(e){return tx(e)}}let tx=e=>{let t=(...e)=>e.join(" ");return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=th?th.level:0;e.level=void 0===t.level?n:t.level})(t,e),Object.setPrototypeOf(t,tO.prototype),t};function tO(e){return tx(e)}for(let[e,t]of(Object.setPrototypeOf(tO.prototype,Function.prototype),Object.entries(td)))tv[e]={get(){let n=tj(this,tD(t.open,t.close,this[tf]),this[tb]);return Object.defineProperty(this,e,{value:n}),n}};tv.visible={get(){let e=tj(this,this[tf],!0);return Object.defineProperty(this,"visible",{value:e}),e}};let tS=(e,t,n,...r)=>"rgb"===e?"ansi16m"===t?td[n].ansi16m(...r):"ansi256"===t?td[n].ansi256(td.rgbToAnsi256(...r)):td[n].ansi(td.rgbToAnsi(...r)):"hex"===e?tS("rgb",t,n,...td.hexToRgb(...r)):td[n][e](...r);for(let e of["rgb","hex","ansi256"])tv[e]={get(){let{level:t}=this;return function(...n){return tj(this,tD(tS(e,ty[t],"color",...n),td.color.close,this[tf]),this[tb])}}},tv["bg"+e[0].toUpperCase()+e.slice(1)]={get(){let{level:t}=this;return function(...n){return tj(this,tD(tS(e,ty[t],"bgColor",...n),td.bgColor.close,this[tf]),this[tb])}}};let t_=Object.defineProperties(()=>{},{...tv,level:{enumerable:!0,get(){return this[tg].level},set(e){this[tg].level=e}}}),tD=(e,t,n)=>{let r,o;return void 0===n?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},tj=(e,t,n)=>{let r=(...e)=>tT(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,t_),r[tg]=e,r[tf]=t,r[tb]=n,r},tT=(e,t)=>{if(e.level<=0||!t)return e[tb]?"":t;let n=e[tf];if(void 0===n)return t;let{openAll:r,closeAll:o}=n;if(t.includes("\x1b"))for(;void 0!==n;)t=function(e,t,n){let r=e.indexOf(t);if(-1===r)return e;let o=t.length,i=0,s="";do s+=e.slice(i,r)+t+n,i=r+o,r=e.indexOf(t,i);while(-1!==r);return s+e.slice(i)}(t,n.close,n.open),n=n.parent;let i=t.indexOf("\n");return -1!==i&&(t=function(e,t,n,r){let o=0,i="";do{let s="\r"===e[r-1];i+=e.slice(o,s?r-1:r)+t+(s?"\r\n":"\n")+n,o=r+1,r=e.indexOf("\n",o)}while(-1!==r);return i+e.slice(o)}(t,o,r,i)),r+t+o};Object.defineProperties(tO.prototype,tv);let tE=tx(void 0);tx({level:tm?tm.level:0});let tR=tE;export{tw as Chalk,em as MaxBufferError,m as TeaUploader,S as bold,e3 as getStreamAsArray,e9 as getStreamAsArrayBuffer,tn as getStreamAsString,_ as gray,J as isDuplexStream,g as isPlainObject,Y as isReadableStream,z as isStream,K as isWritableStream,ew as mergeStreams,w as node_modules_figures,L as npmRunPathEnv,eY as onExit,eb as prettyMilliseconds,D as redBright,M as signalsByName,tR as source,G as stripFinalNewline,j as yellowBright};
|