@keload/node-red-dxp 1.25.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/create/plop-templates/.gitignore.hbs +7 -0
- package/dist/cli/create/plop-templates/README.md.hbs +25 -0
- package/dist/cli/create/plop-templates/biome.json.hbs +29 -0
- package/dist/cli/create/plop-templates/package.json.hbs +48 -0
- package/dist/cli/create/plop-templates/tsconfig.json.hbs +22 -0
- package/dist/cli/create/plop-templates/vitest.config.ts.hbs +8 -0
- package/dist/cli/index.cjs +25 -21
- package/dist/editor/assets/pug/helper.pug +13 -8
- package/dist/editor/dom-helper/index.cjs +1 -1
- package/dist/editor/dom-helper/index.d.cts +1 -1
- package/dist/editor/dom-helper/index.d.ts +2 -2
- package/dist/editor/dom-helper/index.js +1 -1
- package/dist/editor/index.d.ts +1 -1
- package/dist/index.cjs +0 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +0 -1
- package/package.json +15 -12
- package/dist/index-BhYSgW2V.d.ts +0 -6
- package/dist/index-DKhJ6JZE.d.cts +0 -6
- package/dist/src-BNoPX5QG.cjs +0 -0
- package/dist/src-DvBS17xd.js +0 -0
- /package/dist/{types-BSEMgzWV.d.ts → types-CdV6eCMD.d.ts} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# {{projectName}}
|
|
2
|
+
|
|
3
|
+
{{description}}
|
|
4
|
+
|
|
5
|
+
<br/>
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://www.npmjs.com/package/@keload/node-red-dxp" aria-label="Build with node-red-dxp">
|
|
8
|
+
<img src="https://img.shields.io/badge/Build%20with-node--red--dxp-blue?style=for-the-badge" alt="Build with node-red-dxp">
|
|
9
|
+
</a>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
## Overview 🔦
|
|
13
|
+
|
|
14
|
+
_Complete section describing the project._
|
|
15
|
+
|
|
16
|
+
## Contributing & Developer Experience
|
|
17
|
+
This package is built using [node-red-dxp](https://www.npmjs.com/package/@keload/node-red-dxp), offering a blazing-fast and seamless way to develop Node-RED packages.
|
|
18
|
+
|
|
19
|
+
Written in **TypeScript**, the codebase is cleanly structured, ensuring maintainability and effortless scalability.
|
|
20
|
+
|
|
21
|
+
We’re committed to keeping this node alive and thriving, making it a joy to evolve and improve over time. Whether it's refining existing features or adding new capabilities, contributing should always be an enjoyable experience.
|
|
22
|
+
|
|
23
|
+
## License
|
|
24
|
+
|
|
25
|
+
MIT
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
|
|
3
|
+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
|
|
4
|
+
"files": {
|
|
5
|
+
"includes": [
|
|
6
|
+
"**/src/**/*.ts",
|
|
7
|
+
"**/src/**/*.json",
|
|
8
|
+
"build-readme.ts",
|
|
9
|
+
"!**/dist"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"javascript": {
|
|
13
|
+
"formatter": {
|
|
14
|
+
"quoteStyle": "single",
|
|
15
|
+
"indentStyle": "space",
|
|
16
|
+
"indentWidth": 2,
|
|
17
|
+
"lineWidth": 120
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"linter": {
|
|
21
|
+
"enabled": true,
|
|
22
|
+
"rules": {
|
|
23
|
+
"recommended": true,
|
|
24
|
+
"suspicious": {
|
|
25
|
+
"noExplicitAny": "off"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "{{description}}",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=18"
|
|
7
|
+
},
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "node-red-dxp build",
|
|
13
|
+
"dev": "node-red-dxp watch",
|
|
14
|
+
"format": "biome format",
|
|
15
|
+
"lint": "pnpm biome lint",
|
|
16
|
+
"lint:check": "biome check",
|
|
17
|
+
"release": "pnpm release-it",
|
|
18
|
+
"release:test": "pnpm release-it --dry-run",
|
|
19
|
+
"test": "vitest"
|
|
20
|
+
},
|
|
21
|
+
"node-red": {
|
|
22
|
+
"version": ">=2.0.0",
|
|
23
|
+
"nodes": {
|
|
24
|
+
"all": "dist/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@biomejs/biome": "^2.3.8",
|
|
29
|
+
"@keload/node-red-dxp": "link:/Users/keload/work/perso/node-red-dxp",
|
|
30
|
+
"@release-it/conventional-changelog": "^10.0.3",
|
|
31
|
+
"@types/jquery": "^3.5.33",
|
|
32
|
+
"@types/jqueryui": "^1.12.24",
|
|
33
|
+
"@types/node": "^25.0.1",
|
|
34
|
+
"@types/node-red": "^1.3.5",
|
|
35
|
+
"release-it": "^19.1.0",
|
|
36
|
+
"typescript": "^5.9.3",
|
|
37
|
+
"vitest": "^4.0.15"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"node-red",
|
|
41
|
+
"node-red-contrib",
|
|
42
|
+
"node-red-dxp"
|
|
43
|
+
],
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"files": [
|
|
46
|
+
"dist"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"declaration": false,
|
|
4
|
+
"declarationMap": false,
|
|
5
|
+
"emitDeclarationOnly": false,
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"outDir": "dist",
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"moduleResolution": "Bundler",
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"rootDir": "./",
|
|
12
|
+
"types": ["jquery", "jqueryui", "node-red", "@keload/node-red-dxp"]
|
|
13
|
+
},
|
|
14
|
+
"include": ["./src/**/*.ts"],
|
|
15
|
+
"exclude": [
|
|
16
|
+
"./src/editor.ts",
|
|
17
|
+
"./src/editor/**/*",
|
|
18
|
+
"./src/nodes/**/editor/**/*",
|
|
19
|
+
"./src/nodes/**/editor.*",
|
|
20
|
+
"./test"
|
|
21
|
+
]
|
|
22
|
+
}
|
package/dist/cli/index.cjs
CHANGED
|
@@ -1,58 +1,62 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},
|
|
2
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`node:fs`);l=c(l);let u=require(`node:path`);u=c(u);let d=require(`commander`),ee=require(`node:perf_hooks`),f=require(`node:process`);f=c(f);let te=require(`node:os`);te=c(te);let p=require(`node:tty`);p=c(p);let m=require(`node:fs/promises`);m=c(m);let ne=require(`cosmiconfig`),h=require(`fast-glob`),g=require(`radash`),re=require(`esbuild`);re=c(re);let ie=require(`mdx-to-md`),ae=require(`html-minifier-terser`),oe=require(`pug`);oe=c(oe);let se=require(`@fullhuman/postcss-purgecss`);se=c(se);let ce=require(`autoprefixer`);ce=c(ce);let _=require(`cssnano`);_=c(_);let v=require(`postcss`);v=c(v);let le=require(`sass`);le=c(le);let ue=require(`tailwindcss`);ue=c(ue);let de=require(`node-plop`);de=c(de);let fe=require(`node:child_process`),pe=require(`package-manager-detector/detect`),y=require(`consola`),me=require(`prettyjson`);me=c(me);let he=require(`handlebars`);he=c(he);let ge=require(`browser-sync`);ge=c(ge);let _e=require(`chokidar`);_e=c(_e);let ve=require(`nodemon`);ve=c(ve);var ye=`@keload/node-red-dxp`,be=`1.26.0`;function xe(){let e=new Map;for(let[t,n]of Object.entries(b)){for(let[t,r]of Object.entries(n))b[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=b[t],e.set(r[0],r[1]);Object.defineProperty(b,t,{value:n,enumerable:!1})}return Object.defineProperty(b,`codes`,{value:e,enumerable:!1}),b.color.close=`\x1B[39m`,b.bgColor.close=`\x1B[49m`,b.color.ansi=Ce(),b.color.ansi256=we(),b.color.ansi16m=Te(),b.bgColor.ansi=Ce(Se),b.bgColor.ansi256=we(Se),b.bgColor.ansi16m=Te(Se),Object.defineProperties(b,{rgbToAnsi256:{value(e,t,n){return 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;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>b.rgbToAnsi256(...b.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>b.ansi256ToAnsi(b.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>b.ansi256ToAnsi(b.hexToAnsi256(e)),enumerable:!1}}),b}var Se,Ce,we,Te,b,Ee,De,Oe,ke,Ae,x,je=o((()=>{Se=10,Ce=(e=0)=>t=>`\u001B[${t+e}m`,we=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,Te=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,b={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(b.modifier),De=Object.keys(b.color),Oe=Object.keys(b.bgColor),[...De,...Oe],Ae=xe(),x=Ae}));function S(e,t=globalThis.Deno?globalThis.Deno.args:f.default.argv){let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}function Me(){if(`FORCE_COLOR`in C)return C.FORCE_COLOR===`true`?1:C.FORCE_COLOR===`false`?0:C.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(C.FORCE_COLOR,10),3)}function Ne(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Pe(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=Me();r!==void 0&&(w=r);let i=n?w:r;if(i===0)return 0;if(n){if(S(`color=16m`)||S(`color=full`)||S(`color=truecolor`))return 3;if(S(`color=256`))return 2}if(`TF_BUILD`in C&&`AGENT_NAME`in C)return 1;if(e&&!t&&i===void 0)return 0;let a=i||0;if(C.TERM===`dumb`)return a;if(f.default.platform===`win32`){let e=te.default.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in C)return[`GITHUB_ACTIONS`,`GITEA_ACTIONS`,`CIRCLECI`].some(e=>e in C)?3:[`TRAVIS`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(e=>e in C)||C.CI_NAME===`codeship`?1:a;if(`TEAMCITY_VERSION`in C)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(C.TEAMCITY_VERSION)?1:0;if(C.COLORTERM===`truecolor`||C.TERM===`xterm-kitty`||C.TERM===`xterm-ghostty`||C.TERM===`wezterm`)return 3;if(`TERM_PROGRAM`in C){let e=Number.parseInt((C.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(C.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(C.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(C.TERM)||`COLORTERM`in C?1:a}function Fe(e,t={}){return Ne(Pe(e,{streamIsTTY:e&&e.isTTY,...t}))}var C,w,Ie,Le,Re=o((()=>{({env:C}=f.default),S(`no-color`)||S(`no-colors`)||S(`color=false`)||S(`color=never`)?w=0:(S(`color`)||S(`colors`)||S(`color=true`)||S(`color=always`))&&(w=1),Ie={stdout:Fe({isTTY:p.default.isatty(1)}),stderr:Fe({isTTY:p.default.isatty(2)})},Le=Ie}));function ze(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.slice(a,r)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.slice(a),o}function Be(e,t,n,r){let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.slice(i,o?r-1:r)+t+(o?`\r
|
|
3
3
|
`:`
|
|
4
4
|
`)+n,i=r+1,r=e.indexOf(`
|
|
5
|
-
`,i)}while(r!==-1);return a+=e.slice(i),a}
|
|
6
|
-
`);return a!==-1&&(t=Oe(t,i,r,a)),r+t+i};Object.defineProperties(N.prototype,M);const ze=N(),Be=N({level:Ae?Ae.level:0});var Ve=ze;const He=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);!Ue(i,a)&&r||Object.defineProperty(e,n,a)},Ue=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},We=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},Ge=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Ke=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),qe=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),Je=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=Ge.bind(null,r,t.toString());Object.defineProperty(i,`name`,qe);let{writable:a,enumerable:o,configurable:s}=Ke;Object.defineProperty(e,`toString`,{value:i,writable:a,enumerable:o,configurable:s})};function Ye(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))He(e,t,r,n);return We(e,t),Je(e,t,r),e}const F=new WeakMap,Xe=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let n,r=0,i=e.displayName||e.name||`<anonymous>`,a=function(...o){if(F.set(a,++r),r===1)n=e.apply(this,o),e=void 0;else if(t.throw===!0)throw Error(`Function \`${i}\` can only be called once`);return n};return Ye(a,e),F.set(a,r),a};Xe.callCount=e=>{if(!F.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return F.get(e)};var Ze=Xe;const I=[];I.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&I.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&I.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`);const L=e=>!!e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`,Qe=Symbol.for(`signal-exit emitter`),$e=globalThis,et=Object.defineProperty.bind(Object);var tt=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if($e[Qe])return $e[Qe];et($e,Qe,{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);r!==-1&&(r===0&&n.length===1?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 i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},nt=class{};const rt=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var it=class extends nt{onExit(){return()=>{}}load(){}unload(){}},at=class extends nt{#e=ot.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new tt;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of I)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!L(this.#n))return()=>{};this.#o===!1&&this.load();let n=t!=null&&t.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of I)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,I.forEach(e=>{let t=this.#a[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return L(this.#n)?(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&L(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);let r=n.call(this.#n,e,...t);return this.#t.emit(`exit`,this.#n.exitCode,null),r}else return n.call(this.#n,e,...t)}};const ot=globalThis.process,{onExit:st,load:ct,unload:lt}=rt(L(ot)?new at(ot):new it),ut=l.default.stderr.isTTY?l.default.stderr:l.default.stdout.isTTY?l.default.stdout:void 0,dt=ut?Ze(()=>{st(()=>{ut.write(`\x1B[?25h`)},{alwaysLast:!0})}):()=>{};var ft=dt;let R=!1;const z={};z.show=(e=l.default.stderr)=>{e.isTTY&&(R=!1,e.write(`\x1B[?25h`))},z.hide=(e=l.default.stderr)=>{e.isTTY&&(ft(),R=!0,e.write(`\x1B[?25l`))},z.toggle=(e,t)=>{e!==void 0&&(R=e),R?z.show(t):z.hide(t)};var pt=z,mt={dots:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`]},dots2:{interval:80,frames:[`⣾`,`⣽`,`⣻`,`⢿`,`⡿`,`⣟`,`⣯`,`⣷`]},dots3:{interval:80,frames:[`⠋`,`⠙`,`⠚`,`⠞`,`⠖`,`⠦`,`⠴`,`⠲`,`⠳`,`⠓`]},dots4:{interval:80,frames:[`⠄`,`⠆`,`⠇`,`⠋`,`⠙`,`⠸`,`⠰`,`⠠`,`⠰`,`⠸`,`⠙`,`⠋`,`⠇`,`⠆`]},dots5:{interval:80,frames:[`⠋`,`⠙`,`⠚`,`⠒`,`⠂`,`⠂`,`⠒`,`⠲`,`⠴`,`⠦`,`⠖`,`⠒`,`⠐`,`⠐`,`⠒`,`⠓`,`⠋`]},dots6:{interval:80,frames:[`⠁`,`⠉`,`⠙`,`⠚`,`⠒`,`⠂`,`⠂`,`⠒`,`⠲`,`⠴`,`⠤`,`⠄`,`⠄`,`⠤`,`⠴`,`⠲`,`⠒`,`⠂`,`⠂`,`⠒`,`⠚`,`⠙`,`⠉`,`⠁`]},dots7:{interval:80,frames:[`⠈`,`⠉`,`⠋`,`⠓`,`⠒`,`⠐`,`⠐`,`⠒`,`⠖`,`⠦`,`⠤`,`⠠`,`⠠`,`⠤`,`⠦`,`⠖`,`⠒`,`⠐`,`⠐`,`⠒`,`⠓`,`⠋`,`⠉`,`⠈`]},dots8:{interval:80,frames:`⠁.⠁.⠉.⠙.⠚.⠒.⠂.⠂.⠒.⠲.⠴.⠤.⠄.⠄.⠤.⠠.⠠.⠤.⠦.⠖.⠒.⠐.⠐.⠒.⠓.⠋.⠉.⠈.⠈`.split(`.`)},dots9:{interval:80,frames:[`⢹`,`⢺`,`⢼`,`⣸`,`⣇`,`⡧`,`⡗`,`⡏`]},dots10:{interval:80,frames:[`⢄`,`⢂`,`⢁`,`⡁`,`⡈`,`⡐`,`⡠`]},dots11:{interval:100,frames:[`⠁`,`⠂`,`⠄`,`⡀`,`⢀`,`⠠`,`⠐`,`⠈`]},dots12:{interval:80,frames:`⢀⠀.⡀⠀.⠄⠀.⢂⠀.⡂⠀.⠅⠀.⢃⠀.⡃⠀.⠍⠀.⢋⠀.⡋⠀.⠍⠁.⢋⠁.⡋⠁.⠍⠉.⠋⠉.⠋⠉.⠉⠙.⠉⠙.⠉⠩.⠈⢙.⠈⡙.⢈⠩.⡀⢙.⠄⡙.⢂⠩.⡂⢘.⠅⡘.⢃⠨.⡃⢐.⠍⡐.⢋⠠.⡋⢀.⠍⡁.⢋⠁.⡋⠁.⠍⠉.⠋⠉.⠋⠉.⠉⠙.⠉⠙.⠉⠩.⠈⢙.⠈⡙.⠈⠩.⠀⢙.⠀⡙.⠀⠩.⠀⢘.⠀⡘.⠀⠨.⠀⢐.⠀⡐.⠀⠠.⠀⢀.⠀⡀`.split(`.`)},dots13:{interval:80,frames:[`⣼`,`⣹`,`⢻`,`⠿`,`⡟`,`⣏`,`⣧`,`⣶`]},dots14:{interval:80,frames:[`⠉⠉`,`⠈⠙`,`⠀⠹`,`⠀⢸`,`⠀⣰`,`⢀⣠`,`⣀⣀`,`⣄⡀`,`⣆⠀`,`⡇⠀`,`⠏⠀`,`⠋⠁`]},dots8Bit:{interval:80,frames:`⠀.⠁.⠂.⠃.⠄.⠅.⠆.⠇.⡀.⡁.⡂.⡃.⡄.⡅.⡆.⡇.⠈.⠉.⠊.⠋.⠌.⠍.⠎.⠏.⡈.⡉.⡊.⡋.⡌.⡍.⡎.⡏.⠐.⠑.⠒.⠓.⠔.⠕.⠖.⠗.⡐.⡑.⡒.⡓.⡔.⡕.⡖.⡗.⠘.⠙.⠚.⠛.⠜.⠝.⠞.⠟.⡘.⡙.⡚.⡛.⡜.⡝.⡞.⡟.⠠.⠡.⠢.⠣.⠤.⠥.⠦.⠧.⡠.⡡.⡢.⡣.⡤.⡥.⡦.⡧.⠨.⠩.⠪.⠫.⠬.⠭.⠮.⠯.⡨.⡩.⡪.⡫.⡬.⡭.⡮.⡯.⠰.⠱.⠲.⠳.⠴.⠵.⠶.⠷.⡰.⡱.⡲.⡳.⡴.⡵.⡶.⡷.⠸.⠹.⠺.⠻.⠼.⠽.⠾.⠿.⡸.⡹.⡺.⡻.⡼.⡽.⡾.⡿.⢀.⢁.⢂.⢃.⢄.⢅.⢆.⢇.⣀.⣁.⣂.⣃.⣄.⣅.⣆.⣇.⢈.⢉.⢊.⢋.⢌.⢍.⢎.⢏.⣈.⣉.⣊.⣋.⣌.⣍.⣎.⣏.⢐.⢑.⢒.⢓.⢔.⢕.⢖.⢗.⣐.⣑.⣒.⣓.⣔.⣕.⣖.⣗.⢘.⢙.⢚.⢛.⢜.⢝.⢞.⢟.⣘.⣙.⣚.⣛.⣜.⣝.⣞.⣟.⢠.⢡.⢢.⢣.⢤.⢥.⢦.⢧.⣠.⣡.⣢.⣣.⣤.⣥.⣦.⣧.⢨.⢩.⢪.⢫.⢬.⢭.⢮.⢯.⣨.⣩.⣪.⣫.⣬.⣭.⣮.⣯.⢰.⢱.⢲.⢳.⢴.⢵.⢶.⢷.⣰.⣱.⣲.⣳.⣴.⣵.⣶.⣷.⢸.⢹.⢺.⢻.⢼.⢽.⢾.⢿.⣸.⣹.⣺.⣻.⣼.⣽.⣾.⣿`.split(`.`)},dotsCircle:{interval:80,frames:[`⢎ `,`⠎⠁`,`⠊⠑`,`⠈⠱`,` ⡱`,`⢀⡰`,`⢄⡠`,`⢆⡀`]},sand:{interval:80,frames:`⠁.⠂.⠄.⡀.⡈.⡐.⡠.⣀.⣁.⣂.⣄.⣌.⣔.⣤.⣥.⣦.⣮.⣶.⣷.⣿.⡿.⠿.⢟.⠟.⡛.⠛.⠫.⢋.⠋.⠍.⡉.⠉.⠑.⠡.⢁`.split(`.`)},line:{interval:130,frames:[`-`,`\\`,`|`,`/`]},line2:{interval:100,frames:[`⠂`,`-`,`–`,`—`,`–`,`-`]},rollingLine:{interval:80,frames:[`/ `,` - `,` \\ `,` |`,` |`,` \\ `,` - `,`/ `]},pipe:{interval:100,frames:[`┤`,`┘`,`┴`,`└`,`├`,`┌`,`┬`,`┐`]},simpleDots:{interval:400,frames:[`. `,`.. `,`...`,` `]},simpleDotsScrolling:{interval:200,frames:[`. `,`.. `,`...`,` ..`,` .`,` `]},star:{interval:70,frames:[`✶`,`✸`,`✹`,`✺`,`✹`,`✷`]},star2:{interval:80,frames:[`+`,`x`,`*`]},flip:{interval:70,frames:[`_`,`_`,`_`,`-`,"`","`",`'`,`´`,`-`,`_`,`_`,`_`]},hamburger:{interval:100,frames:[`☱`,`☲`,`☴`]},growVertical:{interval:120,frames:[`▁`,`▃`,`▄`,`▅`,`▆`,`▇`,`▆`,`▅`,`▄`,`▃`]},growHorizontal:{interval:120,frames:[`▏`,`▎`,`▍`,`▌`,`▋`,`▊`,`▉`,`▊`,`▋`,`▌`,`▍`,`▎`]},balloon:{interval:140,frames:[` `,`.`,`o`,`O`,`@`,`*`,` `]},balloon2:{interval:120,frames:[`.`,`o`,`O`,`°`,`O`,`o`,`.`]},noise:{interval:100,frames:[`▓`,`▒`,`░`]},bounce:{interval:120,frames:[`⠁`,`⠂`,`⠄`,`⠂`]},boxBounce:{interval:120,frames:[`▖`,`▘`,`▝`,`▗`]},boxBounce2:{interval:100,frames:[`▌`,`▀`,`▐`,`▄`]},triangle:{interval:50,frames:[`◢`,`◣`,`◤`,`◥`]},binary:{interval:80,frames:[`010010`,`001100`,`100101`,`111010`,`111101`,`010111`,`101011`,`111000`,`110011`,`110101`]},arc:{interval:100,frames:[`◜`,`◠`,`◝`,`◞`,`◡`,`◟`]},circle:{interval:120,frames:[`◡`,`⊙`,`◠`]},squareCorners:{interval:180,frames:[`◰`,`◳`,`◲`,`◱`]},circleQuarters:{interval:120,frames:[`◴`,`◷`,`◶`,`◵`]},circleHalves:{interval:50,frames:[`◐`,`◓`,`◑`,`◒`]},squish:{interval:100,frames:[`╫`,`╪`]},toggle:{interval:250,frames:[`⊶`,`⊷`]},toggle2:{interval:80,frames:[`▫`,`▪`]},toggle3:{interval:120,frames:[`□`,`■`]},toggle4:{interval:100,frames:[`■`,`□`,`▪`,`▫`]},toggle5:{interval:100,frames:[`▮`,`▯`]},toggle6:{interval:300,frames:[`ဝ`,`၀`]},toggle7:{interval:80,frames:[`⦾`,`⦿`]},toggle8:{interval:100,frames:[`◍`,`◌`]},toggle9:{interval:100,frames:[`◉`,`◎`]},toggle10:{interval:100,frames:[`㊂`,`㊀`,`㊁`]},toggle11:{interval:50,frames:[`⧇`,`⧆`]},toggle12:{interval:120,frames:[`☗`,`☖`]},toggle13:{interval:80,frames:[`=`,`*`,`-`]},arrow:{interval:100,frames:[`←`,`↖`,`↑`,`↗`,`→`,`↘`,`↓`,`↙`]},arrow2:{interval:80,frames:[`⬆️ `,`↗️ `,`➡️ `,`↘️ `,`⬇️ `,`↙️ `,`⬅️ `,`↖️ `]},arrow3:{interval:120,frames:[`▹▹▹▹▹`,`▸▹▹▹▹`,`▹▸▹▹▹`,`▹▹▸▹▹`,`▹▹▹▸▹`,`▹▹▹▹▸`]},bouncingBar:{interval:80,frames:[`[ ]`,`[= ]`,`[== ]`,`[=== ]`,`[====]`,`[ ===]`,`[ ==]`,`[ =]`,`[ ]`,`[ =]`,`[ ==]`,`[ ===]`,`[====]`,`[=== ]`,`[== ]`,`[= ]`]},bouncingBall:{interval:80,frames:[`( ● )`,`( ● )`,`( ● )`,`( ● )`,`( ●)`,`( ● )`,`( ● )`,`( ● )`,`( ● )`,`(● )`]},smiley:{interval:200,frames:[`😄 `,`😝 `]},monkey:{interval:300,frames:[`🙈 `,`🙈 `,`🙉 `,`🙊 `]},hearts:{interval:100,frames:[`💛 `,`💙 `,`💜 `,`💚 `,`💗 `]},clock:{interval:100,frames:[`🕛 `,`🕐 `,`🕑 `,`🕒 `,`🕓 `,`🕔 `,`🕕 `,`🕖 `,`🕗 `,`🕘 `,`🕙 `,`🕚 `]},earth:{interval:180,frames:[`🌍 `,`🌎 `,`🌏 `]},material:{interval:17,frames:`█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁.███████▁▁▁▁▁▁▁▁▁▁▁▁▁.████████▁▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.██████████▁▁▁▁▁▁▁▁▁▁.███████████▁▁▁▁▁▁▁▁▁.█████████████▁▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁▁██████████████▁▁▁▁.▁▁▁██████████████▁▁▁.▁▁▁▁█████████████▁▁▁.▁▁▁▁██████████████▁▁.▁▁▁▁██████████████▁▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁▁██████████████.▁▁▁▁▁▁██████████████.▁▁▁▁▁▁▁█████████████.▁▁▁▁▁▁▁█████████████.▁▁▁▁▁▁▁▁████████████.▁▁▁▁▁▁▁▁████████████.▁▁▁▁▁▁▁▁▁███████████.▁▁▁▁▁▁▁▁▁███████████.▁▁▁▁▁▁▁▁▁▁██████████.▁▁▁▁▁▁▁▁▁▁██████████.▁▁▁▁▁▁▁▁▁▁▁▁████████.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.██████▁▁▁▁▁▁▁▁▁▁▁▁▁█.████████▁▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.███████████▁▁▁▁▁▁▁▁▁.████████████▁▁▁▁▁▁▁▁.████████████▁▁▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁▁▁█████████████▁▁▁▁.▁▁▁▁▁████████████▁▁▁.▁▁▁▁▁████████████▁▁▁.▁▁▁▁▁▁███████████▁▁▁.▁▁▁▁▁▁▁▁█████████▁▁▁.▁▁▁▁▁▁▁▁█████████▁▁▁.▁▁▁▁▁▁▁▁▁█████████▁▁.▁▁▁▁▁▁▁▁▁█████████▁▁.▁▁▁▁▁▁▁▁▁▁█████████▁.▁▁▁▁▁▁▁▁▁▁▁████████▁.▁▁▁▁▁▁▁▁▁▁▁████████▁.▁▁▁▁▁▁▁▁▁▁▁▁███████▁.▁▁▁▁▁▁▁▁▁▁▁▁███████▁.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁`.split(`.`)},moon:{interval:80,frames:[`🌑 `,`🌒 `,`🌓 `,`🌔 `,`🌕 `,`🌖 `,`🌗 `,`🌘 `]},runner:{interval:140,frames:[`🚶 `,`🏃 `]},pong:{interval:80,frames:`▐⠂ ▌.▐⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂▌.▐ ⠠▌.▐ ⡀▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐⠠ ▌`.split(`.`)},shark:{interval:120,frames:`▐|\\____________▌.▐_|\\___________▌.▐__|\\__________▌.▐___|\\_________▌.▐____|\\________▌.▐_____|\\_______▌.▐______|\\______▌.▐_______|\\_____▌.▐________|\\____▌.▐_________|\\___▌.▐__________|\\__▌.▐___________|\\_▌.▐____________|\\▌.▐____________/|▌.▐___________/|_▌.▐__________/|__▌.▐_________/|___▌.▐________/|____▌.▐_______/|_____▌.▐______/|______▌.▐_____/|_______▌.▐____/|________▌.▐___/|_________▌.▐__/|__________▌.▐_/|___________▌.▐/|____________▌`.split(`.`)},dqpb:{interval:100,frames:[`d`,`q`,`p`,`b`]},weather:{interval:100,frames:[`☀️ `,`☀️ `,`☀️ `,`🌤 `,`⛅️ `,`🌥 `,`☁️ `,`🌧 `,`🌨 `,`🌧 `,`🌨 `,`🌧 `,`🌨 `,`⛈ `,`🌨 `,`🌧 `,`🌨 `,`☁️ `,`🌥 `,`⛅️ `,`🌤 `,`☀️ `,`☀️ `]},christmas:{interval:400,frames:[`🌲`,`🎄`]},grenade:{interval:80,frames:[`، `,`′ `,` ´ `,` ‾ `,` ⸌`,` ⸊`,` |`,` ⁎`,` ⁕`,` ෴ `,` ⁓`,` `,` `,` `]},point:{interval:125,frames:[`∙∙∙`,`●∙∙`,`∙●∙`,`∙∙●`,`∙∙∙`]},layer:{interval:150,frames:[`-`,`=`,`≡`]},betaWave:{interval:80,frames:[`ρββββββ`,`βρβββββ`,`ββρββββ`,`βββρβββ`,`ββββρββ`,`βββββρβ`,`ββββββρ`]},fingerDance:{interval:160,frames:[`🤘 `,`🤟 `,`🖖 `,`✋ `,`🤚 `,`👆 `]},fistBump:{interval:80,frames:[`🤜 🤛 `,`🤜 🤛 `,`🤜 🤛 `,` 🤜 🤛 `,` 🤜🤛 `,` 🤜✨🤛 `,`🤜 ✨ 🤛 `]},soccerHeader:{interval:80,frames:[` 🧑⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `]},mindblown:{interval:160,frames:[`😐 `,`😐 `,`😮 `,`😮 `,`😦 `,`😦 `,`😧 `,`😧 `,`🤯 `,`💥 `,`✨ `,` `,` `,` `]},speaker:{interval:160,frames:[`🔈 `,`🔉 `,`🔊 `,`🔉 `]},orangePulse:{interval:100,frames:[`🔸 `,`🔶 `,`🟠 `,`🟠 `,`🔶 `]},bluePulse:{interval:100,frames:[`🔹 `,`🔷 `,`🔵 `,`🔵 `,`🔷 `]},orangeBluePulse:{interval:100,frames:[`🔸 `,`🔶 `,`🟠 `,`🟠 `,`🔶 `,`🔹 `,`🔷 `,`🔵 `,`🔵 `,`🔷 `]},timeTravel:{interval:100,frames:[`🕛 `,`🕚 `,`🕙 `,`🕘 `,`🕗 `,`🕖 `,`🕕 `,`🕔 `,`🕓 `,`🕒 `,`🕑 `,`🕐 `]},aesthetic:{interval:80,frames:[`▰▱▱▱▱▱▱`,`▰▰▱▱▱▱▱`,`▰▰▰▱▱▱▱`,`▰▰▰▰▱▱▱`,`▰▰▰▰▰▱▱`,`▰▰▰▰▰▰▱`,`▰▰▰▰▰▰▰`,`▰▱▱▱▱▱▱`]},dwarfFortress:{interval:80,frames:` ██████£££ .☺██████£££ .☺██████£££ .☺▓█████£££ .☺▓█████£££ .☺▒█████£££ .☺▒█████£££ .☺░█████£££ .☺░█████£££ .☺ █████£££ . ☺█████£££ . ☺█████£££ . ☺▓████£££ . ☺▓████£££ . ☺▒████£££ . ☺▒████£££ . ☺░████£££ . ☺░████£££ . ☺ ████£££ . ☺████£££ . ☺████£££ . ☺▓███£££ . ☺▓███£££ . ☺▒███£££ . ☺▒███£££ . ☺░███£££ . ☺░███£££ . ☺ ███£££ . ☺███£££ . ☺███£££ . ☺▓██£££ . ☺▓██£££ . ☺▒██£££ . ☺▒██£££ . ☺░██£££ . ☺░██£££ . ☺ ██£££ . ☺██£££ . ☺██£££ . ☺▓█£££ . ☺▓█£££ . ☺▒█£££ . ☺▒█£££ . ☺░█£££ . ☺░█£££ . ☺ █£££ . ☺█£££ . ☺█£££ . ☺▓£££ . ☺▓£££ . ☺▒£££ . ☺▒£££ . ☺░£££ . ☺░£££ . ☺ £££ . ☺£££ . ☺£££ . ☺▓££ . ☺▓££ . ☺▒££ . ☺▒££ . ☺░££ . ☺░££ . ☺ ££ . ☺££ . ☺££ . ☺▓£ . ☺▓£ . ☺▒£ . ☺▒£ . ☺░£ . ☺░£ . ☺ £ . ☺£ . ☺£ . ☺▓ . ☺▓ . ☺▒ . ☺▒ . ☺░ . ☺░ . ☺ . ☺ &. ☺ ☼&. ☺ ☼ &. ☺☼ &. ☺☼ & . ‼ & . ☺ & . ‼ & . ☺ & . ‼ & . ☺ & .‼ & . & . & . & ░ . & ▒ . & ▓ . & £ . & ░£ . & ▒£ . & ▓£ . & ££ . & ░££ . & ▒££ .& ▓££ .& £££ . ░£££ . ▒£££ . ▓£££ . █£££ . ░█£££ . ▒█£££ . ▓█£££ . ██£££ . ░██£££ . ▒██£££ . ▓██£££ . ███£££ . ░███£££ . ▒███£££ . ▓███£££ . ████£££ . ░████£££ . ▒████£££ . ▓████£££ . █████£££ . ░█████£££ . ▒█████£££ . ▓█████£££ . ██████£££ . ██████£££ `.split(`.`)}},B=mt;const ht=Object.keys(mt);var V,gt;const _t=(f.default===null||f.default===void 0||(V=f.default.WriteStream)==null||(V=V.prototype)==null||(gt=V.hasColors)==null?void 0:gt.call(V))??!1,H=(e,t)=>{if(!_t)return e=>e;let n=`\u001B[${e}m`,r=`\u001B[${t}m`;return e=>{let i=e+``,a=i.indexOf(r);if(a===-1)return n+i+r;let o=n,s=0,c=(t===22?r:``)+n;for(;a!==-1;)o+=i.slice(s,a)+c,s=a+r.length,a=i.indexOf(r,s);return o+=i.slice(s)+r,o}},vt=H(0,0),yt=H(1,22),bt=H(2,22),xt=H(3,23),St=H(4,24),Ct=H(53,55),wt=H(7,27),Tt=H(8,28),Et=H(9,29),Dt=H(30,39),Ot=H(31,39),kt=H(32,39),At=H(33,39),jt=H(34,39),Mt=H(35,39),Nt=H(36,39),Pt=H(37,39),Ft=H(90,39),It=H(40,49),Lt=H(41,49),Rt=H(42,49),zt=H(43,49),Bt=H(44,49),Vt=H(45,49),Ht=H(46,49),Ut=H(47,49),Wt=H(100,49),Gt=H(91,39),Kt=H(92,39),qt=H(93,39),Jt=H(94,39),Yt=H(95,39),Xt=H(96,39),Zt=H(97,39),Qt=H(101,49),$t=H(102,49),en=H(103,49),tn=H(104,49),nn=H(105,49),rn=H(106,49),an=H(107,49);function on(){let{env:e}=l.default,{TERM:t,TERM_PROGRAM:n}=e;return l.default.platform===`win32`?!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask===`{cmd::Cmder}`||n===`Terminus-Sublime`||n===`vscode`||t===`xterm-256color`||t===`alacritty`||t===`rxvt-unicode`||t===`rxvt-unicode-256color`||e.TERMINAL_EMULATOR===`JetBrains-JediTerm`:t!==`linux`}const U=on(),sn=jt(U?`ℹ`:`i`),cn=kt(U?`✔`:`√`),ln=At(U?`⚠`:`‼`),un=Ot(U?`✖`:`×`);function dn({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}const fn=dn();function pn(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(fn,``)}function mn(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function hn(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function gn(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function _n(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function vn(e,{ambiguousAsWide:t=!1}={}){return _n(e),hn(e)||gn(e)||t&&mn(e)?2:1}const yn=new Intl.Segmenter,bn=RegExp(`^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$`,`v`),xn=RegExp(`^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+`,`v`),Sn=RegExp(`^\\p{RGI_Emoji}$`,`v`);function Cn(e){return e.replace(xn,``)}function wn(e){return bn.test(e)}function Tn(e,t){let n=0;if(e.length>1)for(let r of e.slice(1))r>=``&&r<=``&&(n+=vn(r.codePointAt(0),t));return n}function En(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t,i=e;if(r||(i=pn(i)),i.length===0)return 0;let a=0,o={ambiguousAsWide:!n};for(let{segment:e}of yn.segment(i)){if(wn(e))continue;if(Sn.test(e)){a+=2;continue}let t=Cn(e).codePointAt(0);a+=vn(t,o),a+=Tn(e,o)}return a}function Dn({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!==`dumb`&&!(`CI`in process.env))}const On=3;var kn=class{#e=0;start(){this.#e++,this.#e===1&&this.#t()}stop(){if(this.#e<=0)throw Error("`stop` called more times than `start`");this.#e--,this.#e===0&&this.#n()}#t(){l.default.platform===`win32`||!l.default.stdin.isTTY||(l.default.stdin.setRawMode(!0),l.default.stdin.on(`data`,this.#r),l.default.stdin.resume())}#n(){l.default.stdin.isTTY&&(l.default.stdin.off(`data`,this.#r),l.default.stdin.pause(),l.default.stdin.setRawMode(!1))}#r(e){e[0]===3&&l.default.emit(`SIGINT`)}};const An=new kn;var jn=An,Mn=class{#e=0;#t=!1;#n=0;#r=-1;#i=0;#a=0;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;#g;color;constructor(e){typeof e==`string`&&(e={text:e}),this.#o={color:`cyan`,stream:l.default.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#o.color,this.spinner=this.#o.spinner,this.#u=this.#o.interval,this.#c=this.#o.stream,this.#d=typeof this.#o.isEnabled==`boolean`?this.#o.isEnabled:Dn({stream:this.#c}),this.#f=typeof this.#o.isSilent==`boolean`?this.#o.isSilent:!1,this.text=this.#o.text,this.prefixText=this.#o.prefixText,this.suffixText=this.#o.suffixText,this.indent=this.#o.indent,l.default.env.NODE_ENV===`test`&&(this._stream=this.#c,this._isEnabled=this.#d,Object.defineProperty(this,`_linesToClear`,{get(){return this.#e},set(e){this.#e=e}}),Object.defineProperty(this,`_frameIndex`,{get(){return this.#r}}),Object.defineProperty(this,`_lineCount`,{get(){return this.#n}}))}get indent(){return this.#p}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw Error("The `indent` option must be an integer from 0 and up");this.#p=e,this.#x()}get interval(){return this.#u??this.#s.interval??100}get spinner(){return this.#s}set spinner(e){if(this.#r=-1,this.#u=void 0,typeof e==`object`){if(!Array.isArray(e.frames)||e.frames.length===0||e.frames.some(e=>typeof e!=`string`))throw Error("The given spinner must have a non-empty `frames` array of strings");if(e.interval!==void 0&&!(Number.isInteger(e.interval)&&e.interval>0))throw Error("`spinner.interval` must be a positive integer if provided");this.#s=e}else if(!on())this.#s=B.line;else if(e===void 0)this.#s=B.dots;else if(e!==`default`&&B[e])this.#s=B[e];else throw Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#m}set text(e=``){this.#m=e,this.#x()}get prefixText(){return this.#h}set prefixText(e=``){this.#h=e,this.#x()}get suffixText(){return this.#g}set suffixText(e=``){this.#g=e,this.#x()}get isSpinning(){return this.#l!==void 0}#_(e,t,n=!1){let r=typeof e==`function`?e():e;return typeof r==`string`&&r!==``?n?t+r:r+t:``}#v(e=this.#h,t=` `){return this.#_(e,t,!1)}#y(e=this.#g,t=` `){return this.#_(e,t,!0)}#b(e,t){let n=0;for(let r of pn(e).split(`
|
|
7
|
-
`))n+=Math.max(1,Math.ceil(
|
|
5
|
+
`,i)}while(r!==-1);return a+=e.slice(i),a}var Ve=o((()=>{}));function T(e){return Ke(e)}var He,Ue,E,D,O,We,k,Ge,Ke,A,qe,j,M,Je,Ye,Xe,Ze,Qe=o((()=>{je(),Re(),Ve(),{stdout:He,stderr:Ue}=Le,E=Symbol(`GENERATOR`),D=Symbol(`STYLER`),O=Symbol(`IS_EMPTY`),We=[`ansi`,`ansi`,`ansi256`,`ansi16m`],k=Object.create(null),Ge=(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=He?He.level:0;e.level=t.level===void 0?n:t.level},Ke=e=>{let t=(...e)=>e.join(` `);return Ge(t,e),Object.setPrototypeOf(t,T.prototype),t},Object.setPrototypeOf(T.prototype,Function.prototype);for(let[e,t]of Object.entries(x))k[e]={get(){let n=M(this,j(t.open,t.close,this[D]),this[O]);return Object.defineProperty(this,e,{value:n}),n}};k.visible={get(){let e=M(this,this[D],!0);return Object.defineProperty(this,`visible`,{value:e}),e}},A=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?x[n].ansi16m(...r):t===`ansi256`?x[n].ansi256(x.rgbToAnsi256(...r)):x[n].ansi(x.rgbToAnsi(...r)):e===`hex`?A(`rgb`,t,n,...x.hexToRgb(...r)):x[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){k[e]={get(){let{level:t}=this;return function(...n){let r=j(A(e,We[t],`color`,...n),x.color.close,this[D]);return M(this,r,this[O])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);k[t]={get(){let{level:t}=this;return function(...n){let r=j(A(e,We[t],`bgColor`,...n),x.bgColor.close,this[D]);return M(this,r,this[O])}}}}qe=Object.defineProperties(()=>{},{...k,level:{enumerable:!0,get(){return this[E].level},set(e){this[E].level=e}}}),j=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},M=(e,t,n)=>{let r=(...e)=>Je(r,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(r,qe),r[E]=e,r[D]=t,r[O]=n,r},Je=(e,t)=>{if(e.level<=0||!t)return e[O]?``:t;let n=e[D];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=ze(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
|
|
6
|
+
`);return a!==-1&&(t=Be(t,i,r,a)),r+t+i},Object.defineProperties(T.prototype,k),Ye=T(),T({level:Ue?Ue.level:0}),Ze=Ye}));function $e(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))et(e,t,r,n);return nt(e,t),ot(e,t,r),e}var et,tt,nt,rt,it,at,ot,st=o((()=>{et=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);!tt(i,a)&&r||Object.defineProperty(e,n,a)},tt=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},nt=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},rt=(e,t)=>`/* Wrapped ${e}*/\n${t}`,it=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),at=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),ot=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=rt.bind(null,r,t.toString());Object.defineProperty(i,`name`,at);let{writable:a,enumerable:o,configurable:s}=it;Object.defineProperty(e,`toString`,{value:i,writable:a,enumerable:o,configurable:s})}})),N,ct,lt,ut=o((()=>{st(),N=new WeakMap,ct=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let n,r=0,i=e.displayName||e.name||`<anonymous>`,a=function(...o){if(N.set(a,++r),r===1)n=e.apply(this,o),e=void 0;else if(t.throw===!0)throw Error(`Function \`${i}\` can only be called once`);return n};return $e(a,e),N.set(a,r),a},ct.callCount=e=>{if(!N.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return N.get(e)},lt=ct})),P,dt=o((()=>{P=[],P.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&P.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&P.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`)})),F,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt=o((()=>{dt(),F=e=>!!e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`,ft=Symbol.for(`signal-exit emitter`),pt=globalThis,mt=Object.defineProperty.bind(Object),ht=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(pt[ft])return pt[ft];mt(pt,ft,{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);r!==-1&&(r===0&&n.length===1?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 i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},gt=class{},_t=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),vt=class extends gt{onExit(){return()=>{}}load(){}unload(){}},yt=class extends gt{#e=bt.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new ht;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of P)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!F(this.#n))return()=>{};this.#o===!1&&this.load();let n=t!=null&&t.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of P)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,P.forEach(e=>{let t=this.#a[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return F(this.#n)?(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&F(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);let r=n.call(this.#n,e,...t);return this.#t.emit(`exit`,this.#n.exitCode,null),r}else return n.call(this.#n,e,...t)}},bt=globalThis.process,{onExit:xt,load:St,unload:Ct}=_t(F(bt)?new yt(bt):new vt)})),Tt,Et,Dt,Ot=o((()=>{ut(),wt(),Tt=f.default.stderr.isTTY?f.default.stderr:f.default.stdout.isTTY?f.default.stdout:void 0,Et=Tt?lt(()=>{xt(()=>{Tt.write(`\x1B[?25h`)},{alwaysLast:!0})}):()=>{},Dt=Et})),I,L,kt,At=o((()=>{Ot(),I=!1,L={},L.show=(e=f.default.stderr)=>{e.isTTY&&(I=!1,e.write(`\x1B[?25h`))},L.hide=(e=f.default.stderr)=>{e.isTTY&&(Dt(),I=!0,e.write(`\x1B[?25l`))},L.toggle=(e,t)=>{e!==void 0&&(I=e),I?L.show(t):L.hide(t)},kt=L})),jt={dots:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`]},dots2:{interval:80,frames:[`⣾`,`⣽`,`⣻`,`⢿`,`⡿`,`⣟`,`⣯`,`⣷`]},dots3:{interval:80,frames:[`⠋`,`⠙`,`⠚`,`⠞`,`⠖`,`⠦`,`⠴`,`⠲`,`⠳`,`⠓`]},dots4:{interval:80,frames:[`⠄`,`⠆`,`⠇`,`⠋`,`⠙`,`⠸`,`⠰`,`⠠`,`⠰`,`⠸`,`⠙`,`⠋`,`⠇`,`⠆`]},dots5:{interval:80,frames:[`⠋`,`⠙`,`⠚`,`⠒`,`⠂`,`⠂`,`⠒`,`⠲`,`⠴`,`⠦`,`⠖`,`⠒`,`⠐`,`⠐`,`⠒`,`⠓`,`⠋`]},dots6:{interval:80,frames:[`⠁`,`⠉`,`⠙`,`⠚`,`⠒`,`⠂`,`⠂`,`⠒`,`⠲`,`⠴`,`⠤`,`⠄`,`⠄`,`⠤`,`⠴`,`⠲`,`⠒`,`⠂`,`⠂`,`⠒`,`⠚`,`⠙`,`⠉`,`⠁`]},dots7:{interval:80,frames:[`⠈`,`⠉`,`⠋`,`⠓`,`⠒`,`⠐`,`⠐`,`⠒`,`⠖`,`⠦`,`⠤`,`⠠`,`⠠`,`⠤`,`⠦`,`⠖`,`⠒`,`⠐`,`⠐`,`⠒`,`⠓`,`⠋`,`⠉`,`⠈`]},dots8:{interval:80,frames:`⠁.⠁.⠉.⠙.⠚.⠒.⠂.⠂.⠒.⠲.⠴.⠤.⠄.⠄.⠤.⠠.⠠.⠤.⠦.⠖.⠒.⠐.⠐.⠒.⠓.⠋.⠉.⠈.⠈`.split(`.`)},dots9:{interval:80,frames:[`⢹`,`⢺`,`⢼`,`⣸`,`⣇`,`⡧`,`⡗`,`⡏`]},dots10:{interval:80,frames:[`⢄`,`⢂`,`⢁`,`⡁`,`⡈`,`⡐`,`⡠`]},dots11:{interval:100,frames:[`⠁`,`⠂`,`⠄`,`⡀`,`⢀`,`⠠`,`⠐`,`⠈`]},dots12:{interval:80,frames:`⢀⠀.⡀⠀.⠄⠀.⢂⠀.⡂⠀.⠅⠀.⢃⠀.⡃⠀.⠍⠀.⢋⠀.⡋⠀.⠍⠁.⢋⠁.⡋⠁.⠍⠉.⠋⠉.⠋⠉.⠉⠙.⠉⠙.⠉⠩.⠈⢙.⠈⡙.⢈⠩.⡀⢙.⠄⡙.⢂⠩.⡂⢘.⠅⡘.⢃⠨.⡃⢐.⠍⡐.⢋⠠.⡋⢀.⠍⡁.⢋⠁.⡋⠁.⠍⠉.⠋⠉.⠋⠉.⠉⠙.⠉⠙.⠉⠩.⠈⢙.⠈⡙.⠈⠩.⠀⢙.⠀⡙.⠀⠩.⠀⢘.⠀⡘.⠀⠨.⠀⢐.⠀⡐.⠀⠠.⠀⢀.⠀⡀`.split(`.`)},dots13:{interval:80,frames:[`⣼`,`⣹`,`⢻`,`⠿`,`⡟`,`⣏`,`⣧`,`⣶`]},dots14:{interval:80,frames:[`⠉⠉`,`⠈⠙`,`⠀⠹`,`⠀⢸`,`⠀⣰`,`⢀⣠`,`⣀⣀`,`⣄⡀`,`⣆⠀`,`⡇⠀`,`⠏⠀`,`⠋⠁`]},dots8Bit:{interval:80,frames:`⠀.⠁.⠂.⠃.⠄.⠅.⠆.⠇.⡀.⡁.⡂.⡃.⡄.⡅.⡆.⡇.⠈.⠉.⠊.⠋.⠌.⠍.⠎.⠏.⡈.⡉.⡊.⡋.⡌.⡍.⡎.⡏.⠐.⠑.⠒.⠓.⠔.⠕.⠖.⠗.⡐.⡑.⡒.⡓.⡔.⡕.⡖.⡗.⠘.⠙.⠚.⠛.⠜.⠝.⠞.⠟.⡘.⡙.⡚.⡛.⡜.⡝.⡞.⡟.⠠.⠡.⠢.⠣.⠤.⠥.⠦.⠧.⡠.⡡.⡢.⡣.⡤.⡥.⡦.⡧.⠨.⠩.⠪.⠫.⠬.⠭.⠮.⠯.⡨.⡩.⡪.⡫.⡬.⡭.⡮.⡯.⠰.⠱.⠲.⠳.⠴.⠵.⠶.⠷.⡰.⡱.⡲.⡳.⡴.⡵.⡶.⡷.⠸.⠹.⠺.⠻.⠼.⠽.⠾.⠿.⡸.⡹.⡺.⡻.⡼.⡽.⡾.⡿.⢀.⢁.⢂.⢃.⢄.⢅.⢆.⢇.⣀.⣁.⣂.⣃.⣄.⣅.⣆.⣇.⢈.⢉.⢊.⢋.⢌.⢍.⢎.⢏.⣈.⣉.⣊.⣋.⣌.⣍.⣎.⣏.⢐.⢑.⢒.⢓.⢔.⢕.⢖.⢗.⣐.⣑.⣒.⣓.⣔.⣕.⣖.⣗.⢘.⢙.⢚.⢛.⢜.⢝.⢞.⢟.⣘.⣙.⣚.⣛.⣜.⣝.⣞.⣟.⢠.⢡.⢢.⢣.⢤.⢥.⢦.⢧.⣠.⣡.⣢.⣣.⣤.⣥.⣦.⣧.⢨.⢩.⢪.⢫.⢬.⢭.⢮.⢯.⣨.⣩.⣪.⣫.⣬.⣭.⣮.⣯.⢰.⢱.⢲.⢳.⢴.⢵.⢶.⢷.⣰.⣱.⣲.⣳.⣴.⣵.⣶.⣷.⢸.⢹.⢺.⢻.⢼.⢽.⢾.⢿.⣸.⣹.⣺.⣻.⣼.⣽.⣾.⣿`.split(`.`)},dotsCircle:{interval:80,frames:[`⢎ `,`⠎⠁`,`⠊⠑`,`⠈⠱`,` ⡱`,`⢀⡰`,`⢄⡠`,`⢆⡀`]},sand:{interval:80,frames:`⠁.⠂.⠄.⡀.⡈.⡐.⡠.⣀.⣁.⣂.⣄.⣌.⣔.⣤.⣥.⣦.⣮.⣶.⣷.⣿.⡿.⠿.⢟.⠟.⡛.⠛.⠫.⢋.⠋.⠍.⡉.⠉.⠑.⠡.⢁`.split(`.`)},line:{interval:130,frames:[`-`,`\\`,`|`,`/`]},line2:{interval:100,frames:[`⠂`,`-`,`–`,`—`,`–`,`-`]},rollingLine:{interval:80,frames:[`/ `,` - `,` \\ `,` |`,` |`,` \\ `,` - `,`/ `]},pipe:{interval:100,frames:[`┤`,`┘`,`┴`,`└`,`├`,`┌`,`┬`,`┐`]},simpleDots:{interval:400,frames:[`. `,`.. `,`...`,` `]},simpleDotsScrolling:{interval:200,frames:[`. `,`.. `,`...`,` ..`,` .`,` `]},star:{interval:70,frames:[`✶`,`✸`,`✹`,`✺`,`✹`,`✷`]},star2:{interval:80,frames:[`+`,`x`,`*`]},flip:{interval:70,frames:[`_`,`_`,`_`,`-`,"`","`",`'`,`´`,`-`,`_`,`_`,`_`]},hamburger:{interval:100,frames:[`☱`,`☲`,`☴`]},growVertical:{interval:120,frames:[`▁`,`▃`,`▄`,`▅`,`▆`,`▇`,`▆`,`▅`,`▄`,`▃`]},growHorizontal:{interval:120,frames:[`▏`,`▎`,`▍`,`▌`,`▋`,`▊`,`▉`,`▊`,`▋`,`▌`,`▍`,`▎`]},balloon:{interval:140,frames:[` `,`.`,`o`,`O`,`@`,`*`,` `]},balloon2:{interval:120,frames:[`.`,`o`,`O`,`°`,`O`,`o`,`.`]},noise:{interval:100,frames:[`▓`,`▒`,`░`]},bounce:{interval:120,frames:[`⠁`,`⠂`,`⠄`,`⠂`]},boxBounce:{interval:120,frames:[`▖`,`▘`,`▝`,`▗`]},boxBounce2:{interval:100,frames:[`▌`,`▀`,`▐`,`▄`]},triangle:{interval:50,frames:[`◢`,`◣`,`◤`,`◥`]},binary:{interval:80,frames:[`010010`,`001100`,`100101`,`111010`,`111101`,`010111`,`101011`,`111000`,`110011`,`110101`]},arc:{interval:100,frames:[`◜`,`◠`,`◝`,`◞`,`◡`,`◟`]},circle:{interval:120,frames:[`◡`,`⊙`,`◠`]},squareCorners:{interval:180,frames:[`◰`,`◳`,`◲`,`◱`]},circleQuarters:{interval:120,frames:[`◴`,`◷`,`◶`,`◵`]},circleHalves:{interval:50,frames:[`◐`,`◓`,`◑`,`◒`]},squish:{interval:100,frames:[`╫`,`╪`]},toggle:{interval:250,frames:[`⊶`,`⊷`]},toggle2:{interval:80,frames:[`▫`,`▪`]},toggle3:{interval:120,frames:[`□`,`■`]},toggle4:{interval:100,frames:[`■`,`□`,`▪`,`▫`]},toggle5:{interval:100,frames:[`▮`,`▯`]},toggle6:{interval:300,frames:[`ဝ`,`၀`]},toggle7:{interval:80,frames:[`⦾`,`⦿`]},toggle8:{interval:100,frames:[`◍`,`◌`]},toggle9:{interval:100,frames:[`◉`,`◎`]},toggle10:{interval:100,frames:[`㊂`,`㊀`,`㊁`]},toggle11:{interval:50,frames:[`⧇`,`⧆`]},toggle12:{interval:120,frames:[`☗`,`☖`]},toggle13:{interval:80,frames:[`=`,`*`,`-`]},arrow:{interval:100,frames:[`←`,`↖`,`↑`,`↗`,`→`,`↘`,`↓`,`↙`]},arrow2:{interval:80,frames:[`⬆️ `,`↗️ `,`➡️ `,`↘️ `,`⬇️ `,`↙️ `,`⬅️ `,`↖️ `]},arrow3:{interval:120,frames:[`▹▹▹▹▹`,`▸▹▹▹▹`,`▹▸▹▹▹`,`▹▹▸▹▹`,`▹▹▹▸▹`,`▹▹▹▹▸`]},bouncingBar:{interval:80,frames:[`[ ]`,`[= ]`,`[== ]`,`[=== ]`,`[====]`,`[ ===]`,`[ ==]`,`[ =]`,`[ ]`,`[ =]`,`[ ==]`,`[ ===]`,`[====]`,`[=== ]`,`[== ]`,`[= ]`]},bouncingBall:{interval:80,frames:[`( ● )`,`( ● )`,`( ● )`,`( ● )`,`( ●)`,`( ● )`,`( ● )`,`( ● )`,`( ● )`,`(● )`]},smiley:{interval:200,frames:[`😄 `,`😝 `]},monkey:{interval:300,frames:[`🙈 `,`🙈 `,`🙉 `,`🙊 `]},hearts:{interval:100,frames:[`💛 `,`💙 `,`💜 `,`💚 `,`💗 `]},clock:{interval:100,frames:[`🕛 `,`🕐 `,`🕑 `,`🕒 `,`🕓 `,`🕔 `,`🕕 `,`🕖 `,`🕗 `,`🕘 `,`🕙 `,`🕚 `]},earth:{interval:180,frames:[`🌍 `,`🌎 `,`🌏 `]},material:{interval:17,frames:`█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁.███████▁▁▁▁▁▁▁▁▁▁▁▁▁.████████▁▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.██████████▁▁▁▁▁▁▁▁▁▁.███████████▁▁▁▁▁▁▁▁▁.█████████████▁▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁▁██████████████▁▁▁▁.▁▁▁██████████████▁▁▁.▁▁▁▁█████████████▁▁▁.▁▁▁▁██████████████▁▁.▁▁▁▁██████████████▁▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁▁██████████████.▁▁▁▁▁▁██████████████.▁▁▁▁▁▁▁█████████████.▁▁▁▁▁▁▁█████████████.▁▁▁▁▁▁▁▁████████████.▁▁▁▁▁▁▁▁████████████.▁▁▁▁▁▁▁▁▁███████████.▁▁▁▁▁▁▁▁▁███████████.▁▁▁▁▁▁▁▁▁▁██████████.▁▁▁▁▁▁▁▁▁▁██████████.▁▁▁▁▁▁▁▁▁▁▁▁████████.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.██████▁▁▁▁▁▁▁▁▁▁▁▁▁█.████████▁▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.███████████▁▁▁▁▁▁▁▁▁.████████████▁▁▁▁▁▁▁▁.████████████▁▁▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁▁▁█████████████▁▁▁▁.▁▁▁▁▁████████████▁▁▁.▁▁▁▁▁████████████▁▁▁.▁▁▁▁▁▁███████████▁▁▁.▁▁▁▁▁▁▁▁█████████▁▁▁.▁▁▁▁▁▁▁▁█████████▁▁▁.▁▁▁▁▁▁▁▁▁█████████▁▁.▁▁▁▁▁▁▁▁▁█████████▁▁.▁▁▁▁▁▁▁▁▁▁█████████▁.▁▁▁▁▁▁▁▁▁▁▁████████▁.▁▁▁▁▁▁▁▁▁▁▁████████▁.▁▁▁▁▁▁▁▁▁▁▁▁███████▁.▁▁▁▁▁▁▁▁▁▁▁▁███████▁.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁`.split(`.`)},moon:{interval:80,frames:[`🌑 `,`🌒 `,`🌓 `,`🌔 `,`🌕 `,`🌖 `,`🌗 `,`🌘 `]},runner:{interval:140,frames:[`🚶 `,`🏃 `]},pong:{interval:80,frames:`▐⠂ ▌.▐⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂▌.▐ ⠠▌.▐ ⡀▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐⠠ ▌`.split(`.`)},shark:{interval:120,frames:`▐|\\____________▌.▐_|\\___________▌.▐__|\\__________▌.▐___|\\_________▌.▐____|\\________▌.▐_____|\\_______▌.▐______|\\______▌.▐_______|\\_____▌.▐________|\\____▌.▐_________|\\___▌.▐__________|\\__▌.▐___________|\\_▌.▐____________|\\▌.▐____________/|▌.▐___________/|_▌.▐__________/|__▌.▐_________/|___▌.▐________/|____▌.▐_______/|_____▌.▐______/|______▌.▐_____/|_______▌.▐____/|________▌.▐___/|_________▌.▐__/|__________▌.▐_/|___________▌.▐/|____________▌`.split(`.`)},dqpb:{interval:100,frames:[`d`,`q`,`p`,`b`]},weather:{interval:100,frames:[`☀️ `,`☀️ `,`☀️ `,`🌤 `,`⛅️ `,`🌥 `,`☁️ `,`🌧 `,`🌨 `,`🌧 `,`🌨 `,`🌧 `,`🌨 `,`⛈ `,`🌨 `,`🌧 `,`🌨 `,`☁️ `,`🌥 `,`⛅️ `,`🌤 `,`☀️ `,`☀️ `]},christmas:{interval:400,frames:[`🌲`,`🎄`]},grenade:{interval:80,frames:[`، `,`′ `,` ´ `,` ‾ `,` ⸌`,` ⸊`,` |`,` ⁎`,` ⁕`,` ෴ `,` ⁓`,` `,` `,` `]},point:{interval:125,frames:[`∙∙∙`,`●∙∙`,`∙●∙`,`∙∙●`,`∙∙∙`]},layer:{interval:150,frames:[`-`,`=`,`≡`]},betaWave:{interval:80,frames:[`ρββββββ`,`βρβββββ`,`ββρββββ`,`βββρβββ`,`ββββρββ`,`βββββρβ`,`ββββββρ`]},fingerDance:{interval:160,frames:[`🤘 `,`🤟 `,`🖖 `,`✋ `,`🤚 `,`👆 `]},fistBump:{interval:80,frames:[`🤜 🤛 `,`🤜 🤛 `,`🤜 🤛 `,` 🤜 🤛 `,` 🤜🤛 `,` 🤜✨🤛 `,`🤜 ✨ 🤛 `]},soccerHeader:{interval:80,frames:[` 🧑⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `]},mindblown:{interval:160,frames:[`😐 `,`😐 `,`😮 `,`😮 `,`😦 `,`😦 `,`😧 `,`😧 `,`🤯 `,`💥 `,`✨ `,` `,` `,` `]},speaker:{interval:160,frames:[`🔈 `,`🔉 `,`🔊 `,`🔉 `]},orangePulse:{interval:100,frames:[`🔸 `,`🔶 `,`🟠 `,`🟠 `,`🔶 `]},bluePulse:{interval:100,frames:[`🔹 `,`🔷 `,`🔵 `,`🔵 `,`🔷 `]},orangeBluePulse:{interval:100,frames:[`🔸 `,`🔶 `,`🟠 `,`🟠 `,`🔶 `,`🔹 `,`🔷 `,`🔵 `,`🔵 `,`🔷 `]},timeTravel:{interval:100,frames:[`🕛 `,`🕚 `,`🕙 `,`🕘 `,`🕗 `,`🕖 `,`🕕 `,`🕔 `,`🕓 `,`🕒 `,`🕑 `,`🕐 `]},aesthetic:{interval:80,frames:[`▰▱▱▱▱▱▱`,`▰▰▱▱▱▱▱`,`▰▰▰▱▱▱▱`,`▰▰▰▰▱▱▱`,`▰▰▰▰▰▱▱`,`▰▰▰▰▰▰▱`,`▰▰▰▰▰▰▰`,`▰▱▱▱▱▱▱`]},dwarfFortress:{interval:80,frames:` ██████£££ .☺██████£££ .☺██████£££ .☺▓█████£££ .☺▓█████£££ .☺▒█████£££ .☺▒█████£££ .☺░█████£££ .☺░█████£££ .☺ █████£££ . ☺█████£££ . ☺█████£££ . ☺▓████£££ . ☺▓████£££ . ☺▒████£££ . ☺▒████£££ . ☺░████£££ . ☺░████£££ . ☺ ████£££ . ☺████£££ . ☺████£££ . ☺▓███£££ . ☺▓███£££ . ☺▒███£££ . ☺▒███£££ . ☺░███£££ . ☺░███£££ . ☺ ███£££ . ☺███£££ . ☺███£££ . ☺▓██£££ . ☺▓██£££ . ☺▒██£££ . ☺▒██£££ . ☺░██£££ . ☺░██£££ . ☺ ██£££ . ☺██£££ . ☺██£££ . ☺▓█£££ . ☺▓█£££ . ☺▒█£££ . ☺▒█£££ . ☺░█£££ . ☺░█£££ . ☺ █£££ . ☺█£££ . ☺█£££ . ☺▓£££ . ☺▓£££ . ☺▒£££ . ☺▒£££ . ☺░£££ . ☺░£££ . ☺ £££ . ☺£££ . ☺£££ . ☺▓££ . ☺▓££ . ☺▒££ . ☺▒££ . ☺░££ . ☺░££ . ☺ ££ . ☺££ . ☺££ . ☺▓£ . ☺▓£ . ☺▒£ . ☺▒£ . ☺░£ . ☺░£ . ☺ £ . ☺£ . ☺£ . ☺▓ . ☺▓ . ☺▒ . ☺▒ . ☺░ . ☺░ . ☺ . ☺ &. ☺ ☼&. ☺ ☼ &. ☺☼ &. ☺☼ & . ‼ & . ☺ & . ‼ & . ☺ & . ‼ & . ☺ & .‼ & . & . & . & ░ . & ▒ . & ▓ . & £ . & ░£ . & ▒£ . & ▓£ . & ££ . & ░££ . & ▒££ .& ▓££ .& £££ . ░£££ . ▒£££ . ▓£££ . █£££ . ░█£££ . ▒█£££ . ▓█£££ . ██£££ . ░██£££ . ▒██£££ . ▓██£££ . ███£££ . ░███£££ . ▒███£££ . ▓███£££ . ████£££ . ░████£££ . ▒████£££ . ▓████£££ . █████£££ . ░█████£££ . ▒█████£££ . ▓█████£££ . ██████£££ . ██████£££ `.split(`.`)}},R,Mt,Nt=o((()=>{R=jt})),z,Pt,Ft,B,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn=o((()=>{Ft=(p.default===null||p.default===void 0||(z=p.default.WriteStream)==null||(z=z.prototype)==null||(Pt=z.hasColors)==null?void 0:Pt.call(z))??!1,B=(e,t)=>{if(!Ft)return e=>e;let n=`\u001B[${e}m`,r=`\u001B[${t}m`;return e=>{let i=e+``,a=i.indexOf(r);if(a===-1)return n+i+r;let o=n,s=0,c=(t===22?r:``)+n;for(;a!==-1;)o+=i.slice(s,a)+c,s=a+r.length,a=i.indexOf(r,s);return o+=i.slice(s)+r,o}},B(0,0),B(1,22),B(2,22),B(3,23),B(4,24),B(53,55),B(7,27),B(8,28),B(9,29),B(30,39),Kt=B(31,39),qt=B(32,39),Jt=B(33,39),Yt=B(34,39),B(35,39),B(36,39),B(37,39),B(90,39),B(40,49),B(41,49),B(42,49),B(43,49),B(44,49),B(45,49),B(46,49),B(47,49),B(100,49),B(91,39),B(92,39),B(93,39),B(94,39),B(95,39),B(96,39),B(97,39),B(101,49),B(102,49),B(103,49),B(104,49),B(105,49),B(106,49),B(107,49)})),Tn=o((()=>{wn()}));function En(){let{env:e}=f.default,{TERM:t,TERM_PROGRAM:n}=e;return f.default.platform===`win32`?!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask===`{cmd::Cmder}`||n===`Terminus-Sublime`||n===`vscode`||t===`xterm-256color`||t===`alacritty`||t===`rxvt-unicode`||t===`rxvt-unicode-256color`||e.TERMINAL_EMULATOR===`JetBrains-JediTerm`:t!==`linux`}var Dn=o((()=>{})),V,On,kn,An,jn,Mn=o((()=>{Tn(),Dn(),V=En(),On=Yt(V?`ℹ`:`i`),kn=qt(V?`✔`:`√`),An=Jt(V?`⚠`:`‼`),jn=Kt(V?`✖`:`×`)})),Nn=o((()=>{Mn()}));function Pn({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}var Fn=o((()=>{}));function In(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Ln,``)}var Ln,Rn=o((()=>{Fn(),Ln=Pn()}));function zn(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Bn(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Vn(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Hn=o((()=>{}));function Un(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Wn(e,{ambiguousAsWide:t=!1}={}){return Un(e),Bn(e)||Vn(e)||t&&zn(e)?2:1}var Gn=o((()=>{Hn()}));function Kn(e){return e.replace(Qn,``)}function qn(e){return Zn.test(e)}function Jn(e,t){let n=0;if(e.length>1)for(let r of e.slice(1))r>=``&&r<=``&&(n+=Wn(r.codePointAt(0),t));return n}function Yn(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t,i=e;if(r||(i=In(i)),i.length===0)return 0;let a=0,o={ambiguousAsWide:!n};for(let{segment:e}of Xn.segment(i)){if(qn(e))continue;if($n.test(e)){a+=2;continue}let t=Kn(e).codePointAt(0);a+=Wn(t,o),a+=Jn(e,o)}return a}var Xn,Zn,Qn,$n,er=o((()=>{Rn(),Gn(),Xn=new Intl.Segmenter,Zn=RegExp(`^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$`,`v`),Qn=RegExp(`^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+`,`v`),$n=RegExp(`^\\p{RGI_Emoji}$`,`v`)}));function tr({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!==`dumb`&&!(`CI`in process.env))}var nr=o((()=>{})),rr,ir,ar,or,sr=o((()=>{rr=3,ir=class{#e=0;start(){this.#e++,this.#e===1&&this.#t()}stop(){if(this.#e<=0)throw Error("`stop` called more times than `start`");this.#e--,this.#e===0&&this.#n()}#t(){f.default.platform===`win32`||!f.default.stdin.isTTY||(f.default.stdin.setRawMode(!0),f.default.stdin.on(`data`,this.#r),f.default.stdin.resume())}#n(){f.default.stdin.isTTY&&(f.default.stdin.off(`data`,this.#r),f.default.stdin.pause(),f.default.stdin.setRawMode(!1))}#r(e){e[0]===rr&&f.default.emit(`SIGINT`)}},ar=new ir,or=ar}));function cr(e){return new lr(e)}var lr,ur=o((()=>{Qe(),At(),Nt(),Nn(),Rn(),er(),nr(),Dn(),sr(),lr=class{#e=0;#t=!1;#n=0;#r=-1;#i=0;#a=0;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;#g;color;constructor(e){typeof e==`string`&&(e={text:e}),this.#o={color:`cyan`,stream:f.default.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#o.color,this.spinner=this.#o.spinner,this.#u=this.#o.interval,this.#c=this.#o.stream,this.#d=typeof this.#o.isEnabled==`boolean`?this.#o.isEnabled:tr({stream:this.#c}),this.#f=typeof this.#o.isSilent==`boolean`?this.#o.isSilent:!1,this.text=this.#o.text,this.prefixText=this.#o.prefixText,this.suffixText=this.#o.suffixText,this.indent=this.#o.indent,f.default.env.NODE_ENV===`test`&&(this._stream=this.#c,this._isEnabled=this.#d,Object.defineProperty(this,`_linesToClear`,{get(){return this.#e},set(e){this.#e=e}}),Object.defineProperty(this,`_frameIndex`,{get(){return this.#r}}),Object.defineProperty(this,`_lineCount`,{get(){return this.#n}}))}get indent(){return this.#p}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw Error("The `indent` option must be an integer from 0 and up");this.#p=e,this.#x()}get interval(){return this.#u??this.#s.interval??100}get spinner(){return this.#s}set spinner(e){if(this.#r=-1,this.#u=void 0,typeof e==`object`){if(!Array.isArray(e.frames)||e.frames.length===0||e.frames.some(e=>typeof e!=`string`))throw Error("The given spinner must have a non-empty `frames` array of strings");if(e.interval!==void 0&&!(Number.isInteger(e.interval)&&e.interval>0))throw Error("`spinner.interval` must be a positive integer if provided");this.#s=e}else if(!En())this.#s=R.line;else if(e===void 0)this.#s=R.dots;else if(e!==`default`&&R[e])this.#s=R[e];else throw Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#m}set text(e=``){this.#m=e,this.#x()}get prefixText(){return this.#h}set prefixText(e=``){this.#h=e,this.#x()}get suffixText(){return this.#g}set suffixText(e=``){this.#g=e,this.#x()}get isSpinning(){return this.#l!==void 0}#_(e,t,n=!1){let r=typeof e==`function`?e():e;return typeof r==`string`&&r!==``?n?t+r:r+t:``}#v(e=this.#h,t=` `){return this.#_(e,t,!1)}#y(e=this.#g,t=` `){return this.#_(e,t,!0)}#b(e,t){let n=0;for(let r of In(e).split(`
|
|
7
|
+
`))n+=Math.max(1,Math.ceil(Yn(r)/t));return n}#x(){let e=this.#c.columns??80,t=typeof this.#h==`function`?``:this.#h,n=typeof this.#g==`function`?``:this.#g,r=typeof t==`string`&&t!==``?t+` `:``,i=typeof n==`string`&&n!==``?` `+n:``,a=` `.repeat(this.#p)+r+`-`+(typeof this.#m==`string`?` `+this.#m:``)+i;this.#n=this.#b(a,e)}get isEnabled(){return this.#d&&!this.#f}set isEnabled(e){if(typeof e!=`boolean`)throw TypeError("The `isEnabled` option must be a boolean");this.#d=e}get isSilent(){return this.#f}set isSilent(e){if(typeof e!=`boolean`)throw TypeError("The `isSilent` option must be a boolean");this.#f=e}frame(){let e=Date.now();(this.#r===-1||e-this.#i>=this.interval)&&(this.#r=++this.#r%this.#s.frames.length,this.#i=e);let{frames:t}=this.#s,n=t[this.#r];this.color&&(n=Ze[this.color](n));let r=this.#v(this.#h,` `),i=typeof this.text==`string`?` `+this.text:``,a=this.#y(this.#g,` `);return r+n+i+a}clear(){if(!this.#d||!this.#c.isTTY)return this;this.#c.cursorTo(0);for(let e=0;e<this.#e;e++)e>0&&this.#c.moveCursor(0,-1),this.#c.clearLine(1);return(this.#p||this.#a!==this.#p)&&this.#c.cursorTo(this.#p),this.#a=this.#p,this.#e=0,this}render(){if(!this.#d||this.#f)return this;this.clear();let e=this.frame(),t=this.#c.columns??80,n=this.#b(e,t),r=this.#c.rows;if(r&&r>1&&n>r){let t=e.split(`
|
|
8
8
|
`),n=r-1;e=[...t.slice(0,n),`... (content truncated to fit terminal)`].join(`
|
|
9
9
|
`)}return this.#c.write(e),this.#e=this.#b(e,t),this}start(e){if(e&&(this.text=e),this.#f)return this;if(!this.#d){let e=` `.repeat(this.#p)+this.#v(this.#h,` `)+(this.text?`- ${this.text}`:``)+this.#y(this.#g,` `);return e.trim()!==``&&this.#c.write(e+`
|
|
10
|
-
`),this}return this.isSpinning?this:(this.#o.hideCursor&&
|
|
11
|
-
`;return this.stop(),this.#c.write(c),this}}
|
|
10
|
+
`),this}return this.isSpinning?this:(this.#o.hideCursor&&kt.hide(this.#c),this.#o.discardStdin&&f.default.stdin.isTTY&&(this.#t=!0,or.start()),this.render(),this.#l=setInterval(this.render.bind(this),this.interval),this)}stop(){return clearInterval(this.#l),this.#l=void 0,this.#r=0,this.#d&&(this.clear(),this.#o.hideCursor&&kt.show(this.#c)),this.#o.discardStdin&&f.default.stdin.isTTY&&this.#t&&(or.stop(),this.#t=!1),this}succeed(e){return this.stopAndPersist({symbol:kn,text:e})}fail(e){return this.stopAndPersist({symbol:jn,text:e})}warn(e){return this.stopAndPersist({symbol:An,text:e})}info(e){return this.stopAndPersist({symbol:On,text:e})}stopAndPersist(e={}){if(this.#f)return this;let t=e.prefixText??this.#h,n=this.#v(t,` `),r=e.symbol??` `,i=e.text??this.text,a=typeof i==`string`?(r?` `:``)+i:``,o=e.suffixText??this.#g,s=this.#y(o,` `),c=n+r+a+s+`
|
|
11
|
+
`;return this.stop(),this.#c.write(c),this}}}));function dr(e){return Object.prototype.toString.call(e).slice(8,-1)}var fr=o((()=>{}));function pr(e){if(dr(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}var mr=o((()=>{fr()}));function hr(e){return dr(e)===`Symbol`}var gr=o((()=>{fr()})),_r=o((()=>{mr(),gr()})),vr=o((()=>{}));function yr(e,t,n,r){let i={}.propertyIsEnumerable.call(r,t)?`enumerable`:`nonenumerable`;i===`enumerable`&&(e[t]=n),i===`nonenumerable`&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function br(e,t,n){if(!pr(t))return t;let r={};if(pr(e)){let n=Object.getOwnPropertyNames(e),i=Object.getOwnPropertySymbols(e);r=[...n,...i].reduce((n,r)=>{if(r===`__proto__`)return n;let i=e[r];return(!hr(r)&&!Object.getOwnPropertyNames(t).includes(r)||hr(r)&&!Object.getOwnPropertySymbols(t).includes(r))&&yr(n,r,i,e),n},{})}let i=Object.getOwnPropertyNames(t),a=Object.getOwnPropertySymbols(t);return[...i,...a].reduce((r,i)=>{if(i===`__proto__`)return r;let a=t[i],o=pr(e)?e[i]:void 0;return o!==void 0&&pr(a)&&(a=br(o,a,n)),yr(r,i,n?n(o,a,i):a,t),r},r)}function xr(e,...t){return t.reduce((e,t)=>br(e,t),e)}var Sr=o((()=>{_r()})),Cr=o((()=>{vr(),Sr()})),wr,Tr=o((()=>{wr={builder:{outputDir:`dist`,esbuildControllerOptions:{includeInBundle:[]},tailwind:{forcedClassesInclusion:[]},editor:{webComponents:{formRow:!1}}},watcher:{nodeRed:{enabled:!0,path:`~/.node-red`,url:`http://localhost:1880`}}}})),H,U=o((()=>{H={libCacheDir:`.node-red-dxp`,srcDir:`src`,nodesDirName:`nodes`,localesDirName:`locales`,globalStylesName:`styles`,nodes:{controllerName:`controller`,editor:{dirName:`editor`,htmlName:`index`,stylesName:`styles`,tsName:`index`}}}}));function Er(){let e=(0,ne.cosmiconfigSync)(kr);try{let t=e.search();return xr(wr,t?t.config:{})}catch(e){throw console.error(`Error while loading configuration`,e),e}}function Dr(e=[]){return e.map(e=>{let t=e.path,n=`${t}/${H.nodes.editor.dirName}`,r=t.replace(G,``).slice(1),i=`${r}/${H.nodes.editor.dirName}`,a=(0,h.globSync)(`${n}/${H.nodes.editor.stylesName}.scss`),o=(0,h.globSync)(`${t}/docs.mdx`),s=(0,h.globSync)(`${t}/docs.md`),c=(0,g.dash)(e.name);return{fullEditorPath:n,fullPath:t,name:e.name,pascalName:(0,g.pascal)(e.name),dashName:c,relativeEditorPath:i,relativePath:r,nodeIdentifier:`${Lr}-${c}`,fullControllerPath:`${t}/${H.nodes.controllerName}.ts`,editor:{tsPath:`${n}/${H.nodes.editor.tsName}.ts`,htmlPath:`${n}/${H.nodes.editor.htmlName}.html`,pugPath:`${n}/${H.nodes.editor.htmlName}.pug`,scssFiles:a},doc:{mdxFiles:o,mdFiles:s}}})}function Or(){let e=(0,h.globSync)(`${Pr}/**/*`,{onlyDirectories:!0,deep:1,objectMode:!0}),t=Dr(e),n=t.map(e=>e.name);return{currentDir:G,pathSrcDir:K,pathSrcNodesDir:Pr,pathResourcesDir:Mr,additionalResourcesDir:Nr,pathDist:`${G}/${W.builder.outputDir}`,currentPackagedDistPath:Ir,cacheDirFiles:{controllerIndex:`${Fr}/controller-index.ts`,editorIndex:`${Fr}/editor-index.ts`},pathLibCacheDir:Fr,packageName:jr.name,packageNameSlug:Lr,config:W,resolvedSrcPathsScss:(0,h.globSync)(`${K}/${H.globalStylesName}.scss`,{ignore:[`${Pr}/**/*.scss`]}),resolvedNodesPaths:e.map(e=>e.path),resolvedSrcLocalesPaths:(0,h.globSync)(`${K}/${H.localesDirName}/*.json`),redServerPath:(0,h.globSync)(`${K}/red-server.ts`),listNodesFull:t,listNodesFullNames:n}}var kr,Ar,W,G,jr,K,Mr,Nr,Pr,Fr,Ir,Lr,q,J=o((()=>{Cr(),Tr(),U(),kr=`node-red-dxp`,Ar=e=>e.replace(`@`,``).replace(`/`,`-`),W=Er(),G=process.cwd(),jr=JSON.parse((0,l.readFileSync)(`${G}/package.json`,`utf-8`)),K=`${G}/${H.srcDir}`,Mr=`${G}/resources`,Nr=`${G}/resources`,Pr=`${K}/${H.nodesDirName}`,Fr=`${G}/${H.libCacheDir}`,Ir=`${u.default.resolve(__dirname,`..`)}`,Lr=Ar(jr.name),q=Or()}));function Rr(e){l.default.existsSync(e)||l.default.mkdirSync(e,{recursive:!0})}async function Y(e,t){try{await m.default.writeFile(e,t)}catch(e){console.error(`Error writing controller index:`,e)}}async function zr(e){for(let t of e)try{let e=u.default.resolve(t),n=await m.default.stat(e).catch(()=>null);n!=null&&n.isDirectory()&&await m.default.rm(e,{recursive:!0,force:!0})}catch(e){console.error(`Error cleaning path (${t}): ${e}`)}}var Br,X=o((()=>{Br=`${u.default.resolve(__dirname,`..`)}`})),Vr,Hr=o((()=>{Vr={name:`add-credentials-export`,setup(e){e.onLoad({filter:/controller\.ts$/},async e=>{let t=await m.default.readFile(e.path,`utf8`);return/export\s+const\s+credentials\s*=/.test(t)?{contents:t,loader:`ts`}:{contents:`${t}\nexport const credentials = {};`,loader:`ts`}})}}})),Ur,Wr,Gr=o((()=>{J(),X(),Hr(),Ur=`${q.currentDir}/package.json`,Wr=class{constructor(e){this.params={minify:!1,...e}}async getControllerIndexContent(){return`
|
|
12
12
|
import type { NodeAPI } from 'node-red';
|
|
13
|
-
${
|
|
13
|
+
${q.listNodesFull.map(e=>`// @ts-ignore\nimport ${e.pascalName}, {credentials as cred${e.pascalName}} from '${e.fullControllerPath}';`).join(`
|
|
14
14
|
`)}
|
|
15
|
-
${
|
|
15
|
+
${q.redServerPath.map(e=>`// @ts-ignore\nimport RedServer from '${e}';`).join(`
|
|
16
16
|
`)}
|
|
17
17
|
|
|
18
18
|
export default async (RED: NodeAPI): Promise<void> => {
|
|
19
19
|
global.RED = RED;
|
|
20
20
|
|
|
21
|
-
${
|
|
21
|
+
${q.listNodesFull.map(e=>`
|
|
22
22
|
// @ts-ignore
|
|
23
23
|
global.RED.nodes.registerType('${e.name}', ${e.pascalName}, { credentials: cred${e.pascalName} });
|
|
24
24
|
`.trim()).join(`
|
|
25
25
|
`)}
|
|
26
|
-
${
|
|
26
|
+
${q.redServerPath.length>0?`RedServer();`:``}
|
|
27
27
|
};
|
|
28
|
-
`.trim()}buildScript(){let e=
|
|
28
|
+
`.trim()}buildScript(){let e=l.default.readFileSync(Ur,`utf8`),t=JSON.parse(e),n=[...q.config.builder.esbuildControllerOptions.includeInBundle,`@keload/node-red-dxp`],r=Object.keys(t.dependencies||{}).filter(e=>!n.includes(e));return re.default.build({entryPoints:[q.cacheDirFiles.controllerIndex],outfile:`${q.pathDist}/index.js`,bundle:!0,minify:this.params.minify,minifyWhitespace:this.params.minify,minifyIdentifiers:this.params.minify,minifySyntax:this.params.minify,platform:`node`,format:`cjs`,target:`es2018`,loader:{".ts":`ts`},packages:`bundle`,plugins:[Vr],external:r})}async getControllerTask(){return this.getControllerIndexContent().then(e=>{Y(`${q.cacheDirFiles.controllerIndex}`,e).then(()=>{this.buildScript()})})}}}));function Kr(e,t){return`
|
|
29
29
|
<script type="text/markdown" data-help-name="${t}">
|
|
30
30
|
${e}
|
|
31
|
-
<\/script>`.trim()}async function
|
|
32
|
-
`):``}function
|
|
31
|
+
<\/script>`.trim()}async function qr(e,t){return process.env.NODE_ENV=`production`,Kr(await(0,ie.mdxToMd)(e),t)}async function Jr(e,t){return Kr(await m.default.readFile(e,`utf8`),t)}async function Yr(e){return e.isMdx?await qr(e.path,e.name):await Jr(e.path,e.name)}async function Xr(){let e=q.listNodesFull.flatMap(e=>{let t=e.doc.mdxFiles.length!==0,n=e.doc.mdFiles.length!==0;if(!t&&!n)return[];let r=!t&&n;return{path:r?e.doc.mdFiles[0]:e.doc.mdxFiles[0],name:e.name,isMdx:t,isMd:r}}),t=await Promise.all(e.map(e=>Yr(e)));return t.length?t.join(`
|
|
32
|
+
`):``}var Zr=o((()=>{J()}));function Qr(e){return e.trim().replace(/\n\s+/g,``)}function $r(e=``){return{name:e,dashName:(0,g.dash)(e),pascalName:(0,g.pascal)(e)}}var ei=o((()=>{}));function ti(e=``,t=``){return!e||!t?t:t.replace(/data-i18n="([^"]+)"/g,(t,n)=>`data-i18n="${n.replace(/(\[.*?\])?(node-red:[^;]+|[^;]+)/g,(t,n,r)=>{let i=r;return r.startsWith(`node-red:`)||(i=`${e}.${r}`),(n||``)+i})}"`)}var ni=o((()=>{}));async function ri(e){return(0,ae.minify)(e,{collapseWhitespace:!0,removeComments:!0,removeRedundantAttributes:!1,useShortDoctype:!0,removeEmptyAttributes:!1,minifyCSS:!1,minifyJS:!1})}function ii(e,t){return`
|
|
33
33
|
<script type="text/html" data-template-name="${e}">
|
|
34
34
|
${t}
|
|
35
35
|
<\/script>
|
|
36
|
-
`}async function
|
|
36
|
+
`}async function ai(e,t,n=!1){let r=``,i=(0,h.globSync)(e.editor.pugPath,{onlyFiles:!0}).at(0);r=i?oe.default.renderFile(i):(0,l.readFileSync)(e.editor.htmlPath,`utf8`);let a=`
|
|
37
37
|
<div class="${t}">
|
|
38
38
|
<div id="${e.nodeIdentifier}">${r}</div>
|
|
39
39
|
</div>
|
|
40
|
-
`,o=n?await
|
|
40
|
+
`,o=n?await ri(a):a;o=ti(e.name,o);let s=ii(e.name,o);return{nodeName:e.name,nodeIdentifier:e.nodeIdentifier,html:o,wrappedHtml:s}}async function oi(e){let{nodes:t,minify:n=!1}=e,r=await Promise.all(t.map(t=>ai(t,e.packageNameSlug,n)));return{html:r.map(e=>e.html).join(``).trim(),allWrappedHtml:r.map(e=>n?Qr(e.wrappedHtml):e.wrappedHtml).join(``).trim()}}var si=o((()=>{ei(),ni()}));function ci(e){let t=e.replace(q.pathResourcesDir,``);return`resources/${q.packageName}${t}`}function li(e){return`<script src="${e}"><\/script>`}function ui(e){return`<link rel="stylesheet" href="${e}">`}async function di(e){return u.parse(e).ext===`.js`?li(ci(e)):ui(ci(e))}async function fi(){let e=q.pathResourcesDir,t=(0,h.globSync)(`${e}/**/*.{js,css}`,{onlyFiles:!0});return(await Promise.all(t.map(di))).join(``)}var pi=o((()=>{J()}));async function mi(e,t){return(await(0,v.default)([(0,se.default)({content:[{raw:t,extension:`html`}],safelist:[/^!/,/^\\!/,/^\\:/,...Si]}),ce.default,(0,_.default)({preset:`default`})]).process(e,{from:void 0})).css}function hi(e){return le.compile(e,{style:`expanded`}).css}function gi(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];t[r]=hi(r)}return t}function _i(e){return e.some(e=>e.editor.scssFiles.length)?e.filter(e=>e.editor.scssFiles.length).map(e=>{let t=gi(e.editor.scssFiles),n=Object.values(t).join(``);return{name:e.name,mergedCompiledStyles:n,scssFinal:`
|
|
41
41
|
#${e.nodeIdentifier}{
|
|
42
42
|
${n}
|
|
43
|
-
}`}}):[]}async function
|
|
44
|
-
`);return t(`${c}${r?await
|
|
43
|
+
}`}}):[]}async function vi(e,t={}){let n={content:[{raw:e},{raw:Si.join(` `)}],theme:{},...t},r=(0,h.globSync)(`${Br}/${H.nodes.editor.dirName}/assets/tailwind.scss`)[0],i=r.length?l.default.readFileSync(r,`utf8`):``;return(await(0,v.default)([(0,ue.default)(n),require(`autoprefixer`)]).process(i,{from:void 0})).css}function yi(){let e=q.resolvedSrcPathsScss;if(!e.length)return``;let t=gi([...e]);return Object.values(t).join(``)}async function bi(e){let t=e=>`.${q.packageNameSlug}{${e}}`,{rawHtml:n,minify:r=!1,nodes:i}=e||{},a=yi(),o=_i(i),s=await vi(n),c=r?await(0,v.default)([(0,_.default)({preset:`default`})]).process(s,{from:void 0}):s,l=o.map(e=>e.scssFinal).join(`
|
|
44
|
+
`);return t(`${c}${r?await mi(`${a}${l}`,n):`${a}${l}`}`)}var xi,Si,Ci=o((()=>{J(),U(),X(),xi=[`hidden`,`block`,`font-bold`,`red-ui-typedInput-container`,`red-ui-typedInput-type-select`,`red-ui-typedInput-type-label`,`red-ui-typedInput-type-icon`,...q.config.builder.tailwind.forcedClassesInclusion],Si=[...xi,...xi.map(e=>`!${e}`)]}));async function wi(){return`
|
|
45
45
|
import type { NodeAPI } from 'node-red';
|
|
46
|
-
${
|
|
46
|
+
${q.listNodesFull.map(e=>`// @ts-ignore\nimport ${e.pascalName} from '${e.editor.tsPath}';`).join(`
|
|
47
47
|
`)}
|
|
48
48
|
|
|
49
49
|
declare const RED: NodeAPI;
|
|
50
50
|
|
|
51
|
-
${
|
|
51
|
+
${q.listNodesFull.map(e=>`// @ts-ignore\nwindow.RED.nodes.registerType('${e.name}', ${e.pascalName});`).join(`
|
|
52
52
|
`)}
|
|
53
|
-
`.trim()}async function
|
|
53
|
+
`.trim()}async function Ti(e=!1){var t;let n=[];!(q==null||(t=q.config)==null||(t=t.builder)==null||(t=t.editor)==null||(t=t.webComponents)==null)&&t.formRow&&n.push(`${q.currentPackagedDistPath}/editor/inject/dxpFormRow.js`);let r=await re.default.build({entryPoints:[q.cacheDirFiles.editorIndex],bundle:!0,platform:`browser`,format:`iife`,target:`es6`,sourcemap:!1,minify:e,minifyWhitespace:e,minifySyntax:e,minifyIdentifiers:e,legalComments:`none`,inject:n,write:!1,loader:{".ts":`ts`}});return r.outputFiles&&r.outputFiles.length>0?r.outputFiles[0].text:``}var Ei,Di=o((()=>{J(),U(),X(),Zr(),si(),pi(),Ci(),Ei=class{constructor(e){this.params={minify:!1,...e}}async prepareEditorIndex(){let e=[Ti(this.params.minify),Xr(),fi()],[t,n,r]=await Promise.all(e),i=await oi({minify:this.params.minify,nodes:q.listNodesFull,packageNameSlug:q.packageNameSlug}),a=await bi({rawHtml:i.html,minify:this.params.minify,nodes:q.listNodesFull}),o=`<script type="application/javascript">${t.trim()}<\/script>`,s=`<style>${a}</style>`;return`
|
|
54
54
|
${r}
|
|
55
55
|
${i.allWrappedHtml}
|
|
56
56
|
${s}
|
|
57
57
|
${o}
|
|
58
|
-
${n}`.trim()}async getEditorTask(){return kr().then(e=>{Q(`${X.cacheDirFiles.editorIndex}`,e).then(()=>{this.prepareEditorIndex().then(async e=>{await Q(`${X.pathDist}/${G.nodes.editor.htmlName}.html`,e)})})})}};async function Mr(e){return{codeLang:e.split(`/`).pop().split(`.`).shift(),content:await p.default.readFile(e,`utf-8`)}}async function Nr(){let e=X.listNodesFullNames,t=X.resolvedSrcLocalesPaths,n=await Promise.all(t.map(Mr)),r={};return e.forEach(e=>{for(let{codeLang:t,content:i}of n)r[t]||(r[t]=[]),r[t].push(`"${e}":${i}`)}),`{${Object.entries(r).map(([e,t])=>`"${e}":{${t.join(`,`)}}`).join(`,`)}}`}async function Pr(e){let[t,,n]=e.replace(`${X.pathSrcNodesDir}${h.sep}`,``).split(h.sep),[r]=n.split(`.`);return{nodeName:t,codeLang:r,path:e,content:await p.default.readFile(e,`utf-8`)}}async function Fr(){let e=(0,g.globSync)(`${X.pathSrcNodesDir}/**/${G.localesDirName}/*.json`),t=await Promise.all(e.map(Pr)),n={};t.forEach(({nodeName:e,codeLang:t,content:r})=>{n[t]||(n[t]=[]),n[t].push(`"${e}":${r}`)});let r=``;for(let[e,t]of Object.entries(n)){let n=t.map(e=>e).join(`,`).slice(0,-1);r+=`"${e}":{${n}},`}return`{${r.slice(0,-1)}}`}async function Ir(){let[e,t]=await Promise.all([Nr(),Fr()]),n=zn(JSON.parse(e),JSON.parse(t)),r=[],i=[];for(let[e,t]of Object.entries(n))r.push(Z(`${X.pathDist}/${G.localesDirName}/${e}`)),i.push(Q(`${X.pathDist}/${G.localesDirName}/${e}/index.json`,JSON.stringify(t)));await Promise.all(r),await Promise.all(i)}var Lr=class{constructor(e){this.params={minify:!1,...e},this.builderController=new nr({minify:this.params.minify}),this.builderEditor=new jr({minify:this.params.minify})}async prepare(){Z(X.pathLibCacheDir);let e=`${X.currentPackagedDistPath}/editor/assets/pug-helper.pug`,t=`${X.currentPackagedDistPath}/editor/assets/pug`,n=[$n([X.pathDist]),Q(`${X.pathLibCacheDir}/config.json`,JSON.stringify(X.config,null,2)),p.default.copyFile(e,`${X.pathLibCacheDir}/pug-helper.pug`),p.default.cp(t,`${X.pathLibCacheDir}/pug`,{recursive:!0})];return Promise.all(n).then(()=>{Z(X.pathDist)})}async buildAll(){return await this.prepare(),Promise.all([this.builderController.getControllerTask(),this.builderEditor.getEditorTask(),Ir()])}};function Rr(e){let t=new u.Command(`checks`).description(`[WIP] Commands to check the some stuff`).command(`nodes-structure`).description(`[WIP] Verify the structure of the nodes`).action(()=>{console.log(`In construction`)});e.addCommand(t)}async function zr(){process.cwd()}function Br(e){let t=new u.Command(`create`).description(`[WIP] Create new package`).action(async()=>{await zr()});e.addCommand(t)}function Vr(e){let t=new u.Command(`info`).description(`Get information about the package`).option(`--config`,`Show relative configuration information`).action(e=>{e.config?(S.consola.log(`Configuration information:`),S.consola.log(C.default.render(K))):S.consola.log(C.default.render(X))});e.addCommand(t)}function Hr(e){return e.startsWith(`~`)?(0,h.join)((0,d.homedir)(),e.slice(1)):(0,h.resolve)(e)}function Ur(e){let t=new u.Command(`install-local-package`).description(`Install this package into the current Node-RED local installation to develop on it`).action(()=>{let e=X.currentDir,t=Hr(K.watcher.nodeRed.path);try{(0,se.execSync)(`cd "${t}" && npm install "${e}"`)}catch(e){console.log(`Error while installing package:`,e)}});e.addCommand(t)}async function Wr(e){try{let t=h.default.resolve(e);return await p.default.readFile(t,`utf-8`)}catch(e){throw Error(`Failed to load file: ${e.message}`)}}async function Gr(e,t){try{let n=await Wr(e);return ce.default.compile(n)(t)}catch(e){throw Error(`Failed to render template: ${e.message}`)}}var Kr=class{constructor(e){let{pascalName:t,dashName:n}=lr(e.innerNodeName);this.nodePascalName=t,this.nodeDashName=n,this.newNodeDistPath=`${X.pathSrcNodesDir}/${n}`,this.newNodeEditorDistPath=`${this.newNodeDistPath}/${G.nodes.editor.dirName}`,this.scaffoldedDistHbs=`${X.currentPackagedDistPath}/scaffolding/create-node/hbs`,this.isConfigNode=e.isConfigNode}distFolderExist(){return m.default.existsSync(this.newNodeDistPath)}prepareStructure(){return[{finalPath:`${this.newNodeDistPath}/controller.ts`,templatePath:`${this.scaffoldedDistHbs}/controller${this.isConfigNode?`-config`:``}.ts.hbs`,templateData:{nodePascalName:this.nodePascalName,nodeName:this.nodeDashName}},{finalPath:`${this.newNodeDistPath}/types.ts`,templatePath:`${this.scaffoldedDistHbs}/types.ts.hbs`,templateData:{nodePascalName:this.nodePascalName,nodeName:this.nodeDashName}},{finalPath:`${this.newNodeDistPath}/doc.md`,templatePath:`${this.scaffoldedDistHbs}/doc.md.hbs`,templateData:{}},{finalPath:`${this.newNodeEditorDistPath}/${G.nodes.editor.tsName}.ts`,templatePath:`${this.scaffoldedDistHbs}/editor/index${this.isConfigNode?`-config`:``}.ts.hbs`,templateData:{nodePascalName:this.nodePascalName,nodeName:this.nodeDashName}},{finalPath:`${this.newNodeEditorDistPath}/styles.scss`,templatePath:`${this.scaffoldedDistHbs}/editor/styles.scss.hbs`,templateData:{nodeName:this.nodeDashName}},{finalPath:`${this.newNodeEditorDistPath}/${G.nodes.editor.htmlName}.html`,templatePath:`${this.scaffoldedDistHbs}/editor/index${this.isConfigNode?`-config`:``}.html.hbs`,templateData:{}}]}async renderFilesTemplates(){let e=this.prepareStructure().map(async e=>Gr(e.templatePath,e.templateData).then(t=>({finalPath:e.finalPath,content:t})));return await Promise.all(e)}async writeNewNode(){let e=await this.renderFilesTemplates();await Promise.all(e.map(e=>Q(e.finalPath,e.content)))}};async function qr(e,t,n){return e===void 0?S.consola.prompt(t,n):e}function Jr(e){let t=new u.Command(`create-node`).description(`Create new node`).option(`--name <name>`,`Node name`).addOption(new u.Option(`--config-node`,`Generate a config node`).conflicts(`regularNode`)).addOption(new u.Option(`--regular-node`,`Generate a regular node`)).option(`--skip-confirm`,`Skip confirmations`,!1);t.action(async e=>{let t=(0,_.dash)(await qr(e.name,`Enter node name:`,{type:`text`}));if(!(e!=null&&e.skipConfirm||await S.consola.prompt(`This name is OK for you '${t}'?`,{type:`confirm`}))){S.consola.info(`👌 OK. Exiting...`);return}let n=(e==null?void 0:e.configNode)===void 0&&(e==null?void 0:e.regularNode)===void 0,r=!1;n?r=await S.consola.prompt(`Is this a config node?`,{type:`confirm`}):e!=null&&e.configNode?r=!0:e!=null&&e.regularNode&&(r=!1);let i=new Kr({innerNodeName:t,isConfigNode:r});if(i.distFolderExist()){S.consola.error(`Node ${i.nodeDashName} already exists`),S.consola.info(`In ${i.newNodeDistPath}`);return}Z(i.newNodeEditorDistPath),await i.writeNewNode()}),e.addCommand(t)}let Yr,Xr;function Zr(){Yr=(0,w.default)({exec:`node-red -u ${X.config.watcher.nodeRed.path}`,ignore:[`**/*`],ext:`js,html`,verbose:!0}),w.default.once(`start`,()=>{Xr=le.default.create(),Xr.init({ui:!1,proxy:{target:X.config.watcher.nodeRed.url,ws:!0},ghostMode:!1,open:!1,reloadDelay:4e3})}).on(`quit`,()=>{S.consola.info(`Nodemon has quit`),process.exit(0)})}function Qr(){Yr.restart(),Xr.reload()}function $r(e){let t=X.config.watcher.nodeRed.enabled&&X.config.watcher.nodeRed.path,n=ue.default.watch(X.pathSrcDir,{}),r=new Lr({minify:(e==null?void 0:e.minify)??!1});n.on(`ready`,async()=>{S.consola.info(`Initial scan complete. Ready for changes`),await r.buildAll(),S.consola.success(`Initial Build completed`),t?Zr():S.consola.warn(`Node-Red watcher is disabled. Please enable it in the config file`)}).on(`change`,async e=>{S.consola.info(`File ${e.replace(X.currentDir,``)} has been changed`),await r.buildAll(),S.consola.success(`Build completed`),t&&Qr()})}function ei(e){let t=new u.Command(`watch`).command(`watch`).description(`watch project`).option(`--minify`,`Minify the output`,!1).action(e=>{$r({minify:e.minify})});e.addCommand(t)}const $=new u.Command;$.name(`node-red-dxp`).description(`node-red-dxp CLI`).version(Pn),$.command(`build`).description(`The build script compiles all nodes into a production-ready, optimized format at lightning speed, with the output defaulting to the dist directory.`).option(`--no-minify`,`No minify the output`,!0).action(async e=>{let t=X.listNodesFull.length,n=c.performance.now();console.log(`node-red-dxp builder`);let r=Nn(`Building ${t} node(s)...`).start();await new Lr({minify:e.minify}).buildAll();let i=c.performance.now()-n,a=i>1e3?`${(i/1e3).toFixed(2)}s`:`${i.toFixed(2)}ms`;r.succeed(`Build completed in ${a} for ${t} nodes(s)`)}),ei($),Vr($),Rr($),Jr($),Br($),Ur($),$.parse(l.argv);
|
|
58
|
+
${n}`.trim()}async getEditorTask(){return wi().then(e=>{Y(`${q.cacheDirFiles.editorIndex}`,e).then(()=>{this.prepareEditorIndex().then(async e=>{await Y(`${q.pathDist}/${H.nodes.editor.htmlName}.html`,e)})})})}}}));async function Oi(e){return{codeLang:e.split(`/`).pop().split(`.`).shift(),content:await m.default.readFile(e,`utf-8`)}}async function ki(){let e=q.listNodesFullNames,t=q.resolvedSrcLocalesPaths,n=await Promise.all(t.map(Oi)),r={};return e.forEach(e=>{for(let{codeLang:t,content:i}of n)r[t]||(r[t]=[]),r[t].push(`"${e}":${i}`)}),`{${Object.entries(r).map(([e,t])=>`"${e}":{${t.join(`,`)}}`).join(`,`)}}`}var Ai=o((()=>{J()}));async function ji(e){let[t,,n]=e.replace(`${q.pathSrcNodesDir}${u.sep}`,``).split(u.sep),[r]=n.split(`.`);return{nodeName:t,codeLang:r,path:e,content:await m.default.readFile(e,`utf-8`)}}async function Mi(){let e=(0,h.globSync)(`${q.pathSrcNodesDir}/**/${H.localesDirName}/*.json`),t=await Promise.all(e.map(ji)),n={};t.forEach(({nodeName:e,codeLang:t,content:r})=>{n[t]||(n[t]=[]),n[t].push(`"${e}":${r}`)});let r=``;for(let[e,t]of Object.entries(n)){let n=t.map(e=>e).join(`,`).slice(0,-1);r+=`"${e}":{${n}},`}return`{${r.slice(0,-1)}}`}var Ni=o((()=>{J(),U()}));async function Pi(){let[e,t]=await Promise.all([ki(),Mi()]),n=xr(JSON.parse(e),JSON.parse(t)),r=[],i=[];for(let[e,t]of Object.entries(n))r.push(Rr(`${q.pathDist}/${H.localesDirName}/${e}`)),i.push(Y(`${q.pathDist}/${H.localesDirName}/${e}/index.json`,JSON.stringify(t)));await Promise.all(r),await Promise.all(i)}var Fi=o((()=>{Cr(),J(),U(),X(),Ai(),Ni()})),Ii,Li=o((()=>{J(),X(),Gr(),Di(),Fi(),Ii=class{constructor(e){this.params={minify:!1,...e},this.builderController=new Wr({minify:this.params.minify}),this.builderEditor=new Ei({minify:this.params.minify})}async prepare(){Rr(q.pathLibCacheDir);let e=`${q.currentPackagedDistPath}/editor/assets/pug-helper.pug`,t=`${q.currentPackagedDistPath}/editor/assets/pug`,n=[zr([q.pathDist]),Y(`${q.pathLibCacheDir}/config.json`,JSON.stringify(q.config,null,2)),m.default.copyFile(e,`${q.pathLibCacheDir}/pug-helper.pug`),m.default.cp(t,`${q.pathLibCacheDir}/pug`,{recursive:!0})];return Promise.all(n).then(()=>{Rr(q.pathDist)})}async buildAll(){return await this.prepare(),Promise.all([this.builderController.getControllerTask(),this.builderEditor.getEditorTask(),Pi()])}}})),Ri=o((()=>{Li()}));function zi(e){let t=new d.Command(`build`).command(`build`).description(`The build script compiles all nodes into a production-ready, optimized format at lightning speed, with the output defaulting to the dist directory.`).option(`--no-minify`,`No minify the output`,!0).action(async e=>{let t=q.listNodesFull.length,n=ee.performance.now();console.log(`node-red-dxp builder`);let r=cr(`Building ${t} node(s)...`).start();await new Ii({minify:e.minify}).buildAll();let i=ee.performance.now()-n,a=i>1e3?`${(i/1e3).toFixed(2)}s`:`${i.toFixed(2)}ms`;r.succeed(`Build completed in ${a} for ${t} nodes(s)`)});e.addCommand(t)}var Bi=o((()=>{ur(),Ri(),J()}));function Vi(e){let t=new d.Command(`checks`).description(`[WIP] Commands to check the some stuff`).command(`nodes-structure`).description(`[WIP] Verify the structure of the nodes`).action(()=>{console.log(`In construction`)});e.addCommand(t)}var Hi=o((()=>{})),Ui,Wi=o((()=>{Ui=()=>(0,pe.getUserAgent)()||`npm`}));function Gi(e){e.setActionType(`installDeps`,Ki),e.setActionType(`lint`,qi),e.setActionType(`createConfigNode`,Ji)}var Z,Ki,qi,Ji,Yi=o((()=>{Wi(),Z=(e,t,n)=>{if(!e)throw Error(`projectName is required`);let r=u.default.resolve(process.cwd(),e),i=Ui();return new Promise((e,a)=>{(0,fe.spawn)(i,t,{cwd:r,stdio:`inherit`}).on(`close`,r=>{r===0?e(`✓ ${n}`):a(`${i} ${t.join(` `)} failed`)})})},Ki=async(e,t)=>{let n=t.projectName;return Z(n,[`install`],`Dependencies installed`)},qi=async(e,t)=>{let n=t.projectName;return await Z(n,[`biome`,`migrate`,`--write`],`Biome migration completed`),Z(n,[`lint:check`,`--write`],`Lint check completed`)},Ji=async(e,t)=>{let n=t.projectName;return Z(n,[`node-red-dxp`,`create-node`,`--name`,`my-config-node`,`--config-node`,`--skip-confirm`],`Config Node completed`)}}));async function Xi(e){let t=e||process.cwd();console.log(`WIP COMMAND - DO NOT USE`),console.log(`Creating project in:`,t);let n=process.cwd();process.chdir(t);try{let e=await(0,de.default)(),t=(0,u.join)(__dirname,Qi);if(!(0,l.existsSync)(t))throw Error(`Templates directory not found: ${t}`);Gi(e),e.setGenerator(`project`,{description:`Generate a new Node.js project`,prompts:Zi?[]:[{type:`input`,name:`projectName`,message:`Node-Red project name:`,default:`@my-scope/node-red-contrib-my-awesome-lib`},{type:`input`,name:`description`,message:`Project description:`,default:`Awesome description`},{type:`confirm`,name:`installDependencies`,message:`Install dependencies with ${Ui()}?`,default:!0}],actions:e=>{let n=Zi?{projectName:`my-project-test`,description:`Test description`,installDependencies:!0}:e,r=[...[`package.json`,`.gitignore`,`biome.json`,`README.md`,`tsconfig.json`,`vitest.config.ts`].map(e=>({type:`add`,path:`${n==null?void 0:n.projectName}/${e}`,templateFile:(0,u.join)(t,`${e}.hbs`),data:n}))];return n!=null&&n.installDependencies&&r.push({type:`installDeps`,projectName:n.projectName}),r.push({type:`createConfigNode`,projectName:n==null?void 0:n.projectName}),r.push({type:`lint`,projectName:n==null?void 0:n.projectName}),r}});let n=e.getGenerator(`project`),r=await n.runPrompts(),i=await n.runActions(r);return i.failures.length>0&&(console.error(`❌ Failures:`,i.failures),process.exit(1)),console.log(`✅ Project created successfully!`),i}finally{process.chdir(n)}}var Zi,Qi,$i=o((()=>{Yi(),Wi(),Zi=process.env.DEV===`true`,Qi=`./create/plop-templates`}));function ea(e){let t=new d.Command(`create`).description(`[WIP] Create new package`).action(async()=>{await Xi()});e.addCommand(t)}var ta=o((()=>{$i()}));function na(e){let t=new d.Command(`info`).description(`Get information about the package`).option(`--config`,`Show relative configuration information`).action(e=>{e.config?(y.consola.log(`Configuration information:`),y.consola.log(me.default.render(W))):y.consola.log(me.default.render(q))});e.addCommand(t)}var ra=o((()=>{J()}));function ia(e){return e.startsWith(`~`)?(0,u.join)((0,te.homedir)(),e.slice(1)):(0,u.resolve)(e)}var aa=o((()=>{}));function oa(e){let t=new d.Command(`install-local-package`).description(`Install this package into the current Node-RED local installation to develop on it`).action(()=>{let e=q.currentDir,t=ia(W.watcher.nodeRed.path);try{(0,fe.execSync)(`cd "${t}" && npm install "${e}"`)}catch(e){console.log(`Error while installing package:`,e)}});e.addCommand(t)}var sa=o((()=>{J(),aa()}));async function ca(e){try{let t=u.default.resolve(e);return await m.default.readFile(t,`utf-8`)}catch(e){throw Error(`Failed to load file: ${e.message}`)}}async function la(e,t){try{let n=await ca(e);return he.default.compile(n)(t)}catch(e){throw Error(`Failed to render template: ${e.message}`)}}var ua,da=o((()=>{J(),U(),ei(),X(),ua=class{constructor(e){let{pascalName:t,dashName:n}=$r(e.innerNodeName);this.nodePascalName=t,this.nodeDashName=n,this.newNodeDistPath=`${q.pathSrcNodesDir}/${n}`,this.newNodeEditorDistPath=`${this.newNodeDistPath}/${H.nodes.editor.dirName}`,this.scaffoldedDistHbs=`${q.currentPackagedDistPath}/scaffolding/create-node/hbs`,this.isConfigNode=e.isConfigNode}distFolderExist(){return l.default.existsSync(this.newNodeDistPath)}prepareStructure(){return[{finalPath:`${this.newNodeDistPath}/controller.ts`,templatePath:`${this.scaffoldedDistHbs}/controller${this.isConfigNode?`-config`:``}.ts.hbs`,templateData:{nodePascalName:this.nodePascalName,nodeName:this.nodeDashName}},{finalPath:`${this.newNodeDistPath}/types.ts`,templatePath:`${this.scaffoldedDistHbs}/types.ts.hbs`,templateData:{nodePascalName:this.nodePascalName,nodeName:this.nodeDashName}},{finalPath:`${this.newNodeDistPath}/doc.md`,templatePath:`${this.scaffoldedDistHbs}/doc.md.hbs`,templateData:{}},{finalPath:`${this.newNodeEditorDistPath}/${H.nodes.editor.tsName}.ts`,templatePath:`${this.scaffoldedDistHbs}/editor/index${this.isConfigNode?`-config`:``}.ts.hbs`,templateData:{nodePascalName:this.nodePascalName,nodeName:this.nodeDashName}},{finalPath:`${this.newNodeEditorDistPath}/styles.scss`,templatePath:`${this.scaffoldedDistHbs}/editor/styles.scss.hbs`,templateData:{nodeName:this.nodeDashName}},{finalPath:`${this.newNodeEditorDistPath}/${H.nodes.editor.htmlName}.html`,templatePath:`${this.scaffoldedDistHbs}/editor/index${this.isConfigNode?`-config`:``}.html.hbs`,templateData:{}}]}async renderFilesTemplates(){let e=this.prepareStructure().map(async e=>la(e.templatePath,e.templateData).then(t=>({finalPath:e.finalPath,content:t})));return await Promise.all(e)}async writeNewNode(){let e=await this.renderFilesTemplates();await Promise.all(e.map(e=>Y(e.finalPath,e.content)))}}}));async function fa(e,t,n){return e===void 0?y.consola.prompt(t,n):e}function pa(e){let t=new d.Command(`create-node`).description(`Create new node`).option(`--name <name>`,`Node name`).addOption(new d.Option(`--config-node`,`Generate a config node`).conflicts(`regularNode`)).addOption(new d.Option(`--regular-node`,`Generate a regular node`)).option(`--skip-confirm`,`Skip confirmations`,!1);t.action(async e=>{let t=(0,g.dash)(await fa(e.name,`Enter node name:`,{type:`text`}));if(!(e!=null&&e.skipConfirm||await y.consola.prompt(`This name is OK for you '${t}'?`,{type:`confirm`}))){y.consola.info(`👌 OK. Exiting...`);return}let n=(e==null?void 0:e.configNode)===void 0&&(e==null?void 0:e.regularNode)===void 0,r=!1;n?r=await y.consola.prompt(`Is this a config node?`,{type:`confirm`}):e!=null&&e.configNode?r=!0:e!=null&&e.regularNode&&(r=!1);let i=new ua({innerNodeName:t,isConfigNode:r});if(i.distFolderExist()){y.consola.error(`Node ${i.nodeDashName} already exists`),y.consola.info(`In ${i.newNodeDistPath}`);return}Rr(i.newNodeEditorDistPath),await i.writeNewNode()}),e.addCommand(t)}var ma=o((()=>{da(),X()}));function ha(){va=(0,ve.default)({exec:`node-red -u ${q.config.watcher.nodeRed.path}`,ignore:[`**/*`],ext:`js,html`,verbose:!0}),ve.default.once(`start`,()=>{ya=ge.default.create(),ya.init({ui:!1,proxy:{target:q.config.watcher.nodeRed.url,ws:!0},ghostMode:!1,open:!1,reloadDelay:4e3})}).on(`quit`,()=>{y.consola.info(`Nodemon has quit`),process.exit(0)})}function ga(){va.restart(),ya.reload()}function _a(e){let t=q.config.watcher.nodeRed.enabled&&q.config.watcher.nodeRed.path,n=_e.default.watch(q.pathSrcDir,{}),r=new Ii({minify:(e==null?void 0:e.minify)??!1});n.on(`ready`,async()=>{y.consola.info(`Initial scan complete. Ready for changes`),await r.buildAll(),y.consola.success(`Initial Build completed`),t?ha():y.consola.warn(`Node-Red watcher is disabled. Please enable it in the config file`)}).on(`change`,async e=>{y.consola.info(`File ${e.replace(q.currentDir,``)} has been changed`),await r.buildAll(),y.consola.success(`Build completed`),t&&ga()})}var va,ya,ba=o((()=>{Ri(),J()}));function xa(e){let t=new d.Command(`watch`).command(`watch`).description(`watch project`).option(`--minify`,`Minify the output`,!1).action(e=>{_a({minify:e.minify})});e.addCommand(t)}var Sa=o((()=>{ba()})),Ca={},Q,wa=o((()=>{Bi(),Hi(),ta(),ra(),sa(),ma(),Sa(),Q=new d.Command,Q.name(`node-red-dxp`).description(`node-red-dxp CLI`).version(be),ea(Q),zi(Q),xa(Q),na(Q),Vi(Q),pa(Q),oa(Q),Q.parse(process.argv)})),Ta={},$,Ea=o((()=>{ta(),$=new d.Command,$.name(`node-red-dxp`).description(`node-red-dxp CLI`).version(be),ea($),$.parse(process.argv)}));process.on(`SIGINT`,()=>{console.log(`
|
|
59
|
+
|
|
60
|
+
👋 Operation cancelled by user`),process.exit(0)}),process.on(`SIGTERM`,()=>{console.log(`
|
|
61
|
+
|
|
62
|
+
👋 Operation terminated`),process.exit(0)});const Da=ye;function Oa(){let e=process.cwd();for(;e!==(0,u.dirname)(e);){try{var t,n;let r=(0,l.readFileSync)((0,u.join)(e,`package.json`),`utf-8`),i=JSON.parse(r);if((t=i.dependencies)!=null&&t[Da]||(n=i.devDependencies)!=null&&n[Da])return process.chdir(e),!0}catch{}e=(0,u.dirname)(e)}return!1}Oa()?wa():Ea();
|
|
@@ -31,17 +31,18 @@ mixin commonLabel(params)
|
|
|
31
31
|
- var capitalizedLabel = capitalizeFirst(params.label || '')
|
|
32
32
|
label(for=params.id)
|
|
33
33
|
+iconFontAwesome(params.icon)
|
|
34
|
-
span(data-i18n
|
|
34
|
+
span(data-i18n=`${params.i18nKey};[title]${params.i18nKey}` title=capitalizedLabel)= capitalizedLabel
|
|
35
35
|
|
|
36
36
|
mixin dxpFormRowInputText(params)
|
|
37
37
|
- var inputId = generateInputId(params.id, params.isConfig)
|
|
38
|
+
- var i18nKey = params.i18nKey || params.id
|
|
38
39
|
.dxp-template-form-row(class=params.rowClasses)
|
|
39
|
-
+commonLabel({label: params.label, icon: params.icon, id: inputId})
|
|
40
|
+
+commonLabel({label: params.label, icon: params.icon, id: inputId, i18nKey })
|
|
40
41
|
.content
|
|
41
42
|
input(
|
|
42
43
|
type="text"
|
|
43
44
|
id=inputId
|
|
44
|
-
data-i18n=`[placeholder]${params.
|
|
45
|
+
data-i18n=`[placeholder]${params.id}-placeholder`
|
|
45
46
|
placeholder=params.placeholder || ''
|
|
46
47
|
)&attributes(attributes)
|
|
47
48
|
if params.isTyped
|
|
@@ -51,8 +52,9 @@ mixin dxpFormRowInputText(params)
|
|
|
51
52
|
|
|
52
53
|
mixin dxpFormRowCheckbox(params)
|
|
53
54
|
- var inputId = generateInputId(params.id, params.isConfig)
|
|
55
|
+
- var i18nKey = params.i18nKey || params.id
|
|
54
56
|
.dxp-template-form-row(class=params.rowClasses)
|
|
55
|
-
+commonLabel({label: params.label, icon: params.icon, id: inputId})
|
|
57
|
+
+commonLabel({label: params.label, icon: params.icon, id: inputId, i18nKey })
|
|
56
58
|
.content
|
|
57
59
|
.checkbox
|
|
58
60
|
input(type="checkbox" id=inputId)&attributes(attributes)
|
|
@@ -63,8 +65,9 @@ mixin dxpFormRowCheckbox(params)
|
|
|
63
65
|
|
|
64
66
|
mixin dxpFormRowSelect(params)
|
|
65
67
|
- var inputId = generateInputId(params.id, params.isConfig)
|
|
68
|
+
- var i18nKey = params.i18nKey || params.id
|
|
66
69
|
.dxp-template-form-row(class=params.rowClasses)
|
|
67
|
-
+commonLabel({label: params.label, icon: params.icon, id: inputId})
|
|
70
|
+
+commonLabel({label: params.label, icon: params.icon, id: inputId, i18nKey })
|
|
68
71
|
.content
|
|
69
72
|
select(id=inputId)&attributes(attributes)
|
|
70
73
|
if block
|
|
@@ -72,8 +75,9 @@ mixin dxpFormRowSelect(params)
|
|
|
72
75
|
|
|
73
76
|
mixin dxpFormRowSelectConfigNode(params)
|
|
74
77
|
- var inputId = generateInputId(params.id, params.isConfig)
|
|
78
|
+
- var i18nKey = params.i18nKey || params.id
|
|
75
79
|
.dxp-template-form-row(class=params.rowClasses)
|
|
76
|
-
+commonLabel({label: params.label, icon: params.icon, id: inputId})
|
|
80
|
+
+commonLabel({label: params.label, icon: params.icon, id: inputId, i18nKey })
|
|
77
81
|
.content.force-w-full
|
|
78
82
|
select(id=inputId)&attributes(attributes)
|
|
79
83
|
if block
|
|
@@ -87,8 +91,9 @@ mixin dxpFormTitleSeparator(label)
|
|
|
87
91
|
div.flex-1.border-t.border-gray-300
|
|
88
92
|
|
|
89
93
|
mixin dxpHint(params)
|
|
90
|
-
- var
|
|
91
|
-
- var
|
|
94
|
+
- var params = params ?? {}
|
|
95
|
+
- var classState = params?.state ? 'hint-' + params.state : ''
|
|
96
|
+
- var width = params?.fullWidth ? '' : 'max-w-[350px]'
|
|
92
97
|
.hint(class=classState + ' ' + width)
|
|
93
98
|
+iconFontAwesome(params.icon)(class="mr-1")
|
|
94
99
|
if block
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../
|
|
1
|
+
require(`../../index.cjs`);const e=e=>{if(!e||e.length===0)return``;let t=e.toLowerCase();return t.substring(0,1).toUpperCase()+t.substring(1,t.length)},t=(t,n)=>{var r;let i=(r=t==null?void 0:t.replace(/([A-Z])+/g,e).split(/(?=[A-Z])|[\.\-\s_]/).map(e=>e.toLowerCase()))==null?[]:r;if(i.length===0)return``;if(i.length===1)return i[0];let a=i.reduce((e,t)=>`${e}_${t.toLowerCase()}`);return(n==null?void 0:n.splitOnNumber)===!1?a:a.replace(/([A-Za-z]{1}[0-9]{1})/,e=>`${e[0]}_${e[1]}`)};function n(e){let t=e.startsWith(`$`),n=e.startsWith(`$$`),r=e.startsWith(`#node-config-input`)||e.startsWith(`#node-input`);return{isNodeIdShortcut:t,isNodeConfigIdShortcut:n,isFullSelector:r,value:t||n||r}}function r(e){let t=n(e);return t.isNodeConfigIdShortcut?`#node-config-input-${e.replace(`$$`,``)}`:t.isNodeIdShortcut?`#node-input-${e.replace(`$`,``)}`:e}function i(e,t,n){t.forEach(t=>{let r=document.querySelector(t);r&&n.forEach(t=>r.classList[e](t))})}function a(e,t){i(`remove`,e,t)}function o(e,t){i(`add`,e,t)}function s(e){return r(e).split(`-input-`)[1]}function c(e,t,n){let i=r(e),a=t;n!=null&&n.emptyValue&&(a=[{value:``,text:n.emptyValue},...t]),$(i).empty().append(a.map(e=>$(`<option>`,{value:e.value,text:e.text,selected:e.value===(n==null?void 0:n.selected)})))}function l(e){p(e.selector).typedInput({types:e.types,typeField:r(`${e.selector}Type`)})}function u(e,t,n={additionalEvents:[]}){let i=(Array.isArray(e)?e:[e]).map(r).join(`, `),a=[`input`,...n.additionalEvents];$(i).on(a.join(` `),()=>{t($(i).map(function(){return $(this).val()}).get())})}function d(e,t){let n=r(e);$(n).val(t)}function f(e,t){let n=r(e);$(n).text(t)}function p(e){let t=r(e);return $(t)}function m(e){let t=r(e);return document.querySelector(t).checked}function h(e){let t={};return document.querySelectorAll(`[id^="node-input-${e}-"]`).forEach(n=>{let r=n,i=r.id.replace(`node-input-${e}-`,``);r.type===`checkbox`?t[i]=r.checked:t[i]=r.value}),t}function g(e,t){t&&Object.entries(t).forEach(([t,n])=>{let r=document.querySelector(`#node-input-${e}-${t}`);r&&(r.type===`checkbox`?r.checked=!!n:r.value=String(n))})}function _(e){let n=`#tabs-content-${e.targetId}`,r=RED.tabs.create({id:e.targetId,onchange:e=>{$(n).children().addClass(`hidden`),$(`#${e.id}`).removeClass(`hidden`)}});(e.tabsLabel||[]).forEach(e=>{r.addTab({id:`tab-${t(e)}`,label:e})}),r.activateTab(`tab-${t(e.initialTab)}`)}exports.addClassesOnSelectors=o,exports.applyTypedInput=l,exports.getFormValues=h,exports.handleAddRemoveClassesOnSelectors=i,exports.initSelect=c,exports.initTabs=_,exports.isCheckboxChecked=m,exports.isNodeInput=n,exports.jqSelector=p,exports.removeClassesOnSelectors=a,exports.resolveInputKey=s,exports.resolveSelector=r,exports.setFormValues=g,exports.setInputValue=d,exports.setText=f,exports.watchInput=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as EditorDomHelper } from "../../types-
|
|
2
|
-
import "../../index
|
|
1
|
+
import { t as EditorDomHelper } from "../../types-CdV6eCMD.js";
|
|
2
|
+
import "../../index.js";
|
|
3
3
|
import { EditorWidgetTypedInputType, EditorWidgetTypedInputTypeDefinition } from "node-red";
|
|
4
4
|
|
|
5
5
|
//#region src/editor/dom.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../
|
|
1
|
+
import"../../index.js";const e=e=>{if(!e||e.length===0)return``;let t=e.toLowerCase();return t.substring(0,1).toUpperCase()+t.substring(1,t.length)},t=(t,n)=>{var r;let i=(r=t==null?void 0:t.replace(/([A-Z])+/g,e).split(/(?=[A-Z])|[\.\-\s_]/).map(e=>e.toLowerCase()))==null?[]:r;if(i.length===0)return``;if(i.length===1)return i[0];let a=i.reduce((e,t)=>`${e}_${t.toLowerCase()}`);return(n==null?void 0:n.splitOnNumber)===!1?a:a.replace(/([A-Za-z]{1}[0-9]{1})/,e=>`${e[0]}_${e[1]}`)};function n(e){let t=e.startsWith(`$`),n=e.startsWith(`$$`),r=e.startsWith(`#node-config-input`)||e.startsWith(`#node-input`);return{isNodeIdShortcut:t,isNodeConfigIdShortcut:n,isFullSelector:r,value:t||n||r}}function r(e){let t=n(e);return t.isNodeConfigIdShortcut?`#node-config-input-${e.replace(`$$`,``)}`:t.isNodeIdShortcut?`#node-input-${e.replace(`$`,``)}`:e}function i(e,t,n){t.forEach(t=>{let r=document.querySelector(t);r&&n.forEach(t=>r.classList[e](t))})}function a(e,t){i(`remove`,e,t)}function o(e,t){i(`add`,e,t)}function s(e){return r(e).split(`-input-`)[1]}function c(e,t,n){let i=r(e),a=t;n!=null&&n.emptyValue&&(a=[{value:``,text:n.emptyValue},...t]),$(i).empty().append(a.map(e=>$(`<option>`,{value:e.value,text:e.text,selected:e.value===(n==null?void 0:n.selected)})))}function l(e){p(e.selector).typedInput({types:e.types,typeField:r(`${e.selector}Type`)})}function u(e,t,n={additionalEvents:[]}){let i=(Array.isArray(e)?e:[e]).map(r).join(`, `),a=[`input`,...n.additionalEvents];$(i).on(a.join(` `),()=>{t($(i).map(function(){return $(this).val()}).get())})}function d(e,t){let n=r(e);$(n).val(t)}function f(e,t){let n=r(e);$(n).text(t)}function p(e){let t=r(e);return $(t)}function m(e){let t=r(e);return document.querySelector(t).checked}function h(e){let t={};return document.querySelectorAll(`[id^="node-input-${e}-"]`).forEach(n=>{let r=n,i=r.id.replace(`node-input-${e}-`,``);r.type===`checkbox`?t[i]=r.checked:t[i]=r.value}),t}function g(e,t){t&&Object.entries(t).forEach(([t,n])=>{let r=document.querySelector(`#node-input-${e}-${t}`);r&&(r.type===`checkbox`?r.checked=!!n:r.value=String(n))})}function _(e){let n=`#tabs-content-${e.targetId}`,r=RED.tabs.create({id:e.targetId,onchange:e=>{$(n).children().addClass(`hidden`),$(`#${e.id}`).removeClass(`hidden`)}});(e.tabsLabel||[]).forEach(e=>{r.addTab({id:`tab-${t(e)}`,label:e})}),r.activateTab(`tab-${t(e.initialTab)}`)}export{o as addClassesOnSelectors,l as applyTypedInput,h as getFormValues,i as handleAddRemoveClassesOnSelectors,c as initSelect,_ as initTabs,m as isCheckboxChecked,n as isNodeInput,p as jqSelector,a as removeClassesOnSelectors,s as resolveInputKey,r as resolveSelector,g as setFormValues,d as setInputValue,f as setText,u as watchInput};
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as NodeEditorProps, i as NodeEditorDefinition, n as NodeControllerConfig, r as NodeControllerInst, t as EditorDomHelper } from "../types-
|
|
1
|
+
import { a as NodeEditorProps, i as NodeEditorDefinition, n as NodeControllerConfig, r as NodeControllerInst, t as EditorDomHelper } from "../types-CdV6eCMD.js";
|
|
2
2
|
import { EditorNodeDef, EditorNodeProperties } from "node-red";
|
|
3
3
|
|
|
4
4
|
//#region src/editor/index.d.ts
|
package/dist/index.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./src-BNoPX5QG.cjs`);
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-DvBS17xd.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keload/node-red-dxp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -61,19 +61,20 @@
|
|
|
61
61
|
},
|
|
62
62
|
"homepage": "https://github.com/clement-berard/node-red-dxp",
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@biomejs/biome": "2.3.
|
|
65
|
-
"@release-it/conventional-changelog": "10.0.
|
|
64
|
+
"@biomejs/biome": "2.3.11",
|
|
65
|
+
"@release-it/conventional-changelog": "10.0.4",
|
|
66
66
|
"@types/pug": "^2.0.10",
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
67
|
+
"plop": "^4.0.4",
|
|
68
|
+
"release-it": "19.2.2",
|
|
69
|
+
"tsdown": "^0.18.4",
|
|
70
|
+
"tsx": "4.21.0",
|
|
71
|
+
"typedoc": "0.28.15",
|
|
71
72
|
"typedoc-plugin-markdown": "4.9.0",
|
|
72
73
|
"typescript": "5.9.3",
|
|
73
74
|
"vitepress": "1.6.4",
|
|
74
75
|
"vitepress-plugin-npm-commands": "^0.8.1",
|
|
75
76
|
"vitepress-plugin-tabs": "^0.7.1",
|
|
76
|
-
"vitest": "4.0.
|
|
77
|
+
"vitest": "4.0.16"
|
|
77
78
|
},
|
|
78
79
|
"dependencies": {
|
|
79
80
|
"@fullhuman/postcss-purgecss": "7.0.2",
|
|
@@ -82,26 +83,28 @@
|
|
|
82
83
|
"@types/jqueryui": "1.12.24",
|
|
83
84
|
"@types/node-red": "1.3.5",
|
|
84
85
|
"@types/prettyjson": "0.0.33",
|
|
85
|
-
"autoprefixer": "10.4.
|
|
86
|
+
"autoprefixer": "10.4.23",
|
|
86
87
|
"browser-sync": "3.0.4",
|
|
87
|
-
"chokidar": "
|
|
88
|
+
"chokidar": "5.0.0",
|
|
88
89
|
"commander": "14.0.2",
|
|
89
90
|
"consola": "3.4.2",
|
|
90
91
|
"cosmiconfig": "9.0.0",
|
|
91
92
|
"cssnano": "7.1.2",
|
|
92
|
-
"esbuild": "0.27.
|
|
93
|
+
"esbuild": "0.27.2",
|
|
93
94
|
"fast-glob": "3.3.3",
|
|
94
95
|
"handlebars": "4.7.8",
|
|
95
96
|
"html-minifier-terser": "7.2.0",
|
|
96
97
|
"mdx-to-md": "0.5.2",
|
|
97
98
|
"merge-anything": "6.0.6",
|
|
99
|
+
"node-plop": "^0.32.3",
|
|
98
100
|
"nodemon": "3.1.11",
|
|
99
101
|
"ora": "9.0.0",
|
|
102
|
+
"package-manager-detector": "^1.6.0",
|
|
100
103
|
"postcss": "8.5.6",
|
|
101
104
|
"prettyjson": "1.2.5",
|
|
102
105
|
"pug": "3.0.3",
|
|
103
106
|
"radash": "12.1.1",
|
|
104
|
-
"sass": "1.
|
|
107
|
+
"sass": "1.97.1",
|
|
105
108
|
"tailwindcss": "^3"
|
|
106
109
|
},
|
|
107
110
|
"files": [
|
package/dist/index-BhYSgW2V.d.ts
DELETED
package/dist/src-BNoPX5QG.cjs
DELETED
|
File without changes
|
package/dist/src-DvBS17xd.js
DELETED
|
File without changes
|
|
File without changes
|