@under_koen/bsm 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +12 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
1
  #! /usr/bin/env node
2
- "use strict";var Cn=Object.create;var oe=Object.defineProperty;var Fn=Object.getOwnPropertyDescriptor;var bn=Object.getOwnPropertyNames;var Bn=Object.getPrototypeOf,yn=Object.prototype.hasOwnProperty;var v=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),An=(t,e)=>{for(var n in e)oe(t,n,{get:e[n],enumerable:!0})},rt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of bn(e))!yn.call(t,u)&&u!==n&&oe(t,u,{get:()=>e[u],enumerable:!(r=Fn(e,u))||r.enumerable});return t};var x=(t,e,n)=>(n=t!=null?Cn(Bn(t)):{},rt(e||!t||!t.__esModule?oe(n,"default",{value:t,enumerable:!0}):n,t)),wn=t=>rt(oe({},"__esModule",{value:!0}),t);var st=v((Er,ot)=>{"use strict";function vn(t,e){var n=t;e.slice(0,-1).forEach(function(u){n=n[u]||{}});var r=e[e.length-1];return r in n}function ut(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function it(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}ot.exports=function(t,e){e||(e={});var n={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(n.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?n.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(f){n.bools[f]=!0});var r={};function u(f){return r[f].some(function(g){return n.bools[g]})}Object.keys(e.alias||{}).forEach(function(f){r[f]=[].concat(e.alias[f]),r[f].forEach(function(g){r[g]=[f].concat(r[f].filter(function(R){return g!==R}))})}),[].concat(e.string).filter(Boolean).forEach(function(f){n.strings[f]=!0,r[f]&&[].concat(r[f]).forEach(function(g){n.strings[g]=!0})});var i=e.default||{},o={_:[]};function s(f,g){return n.allBools&&/^--[^=]+$/.test(g)||n.strings[f]||n.bools[f]||r[f]}function D(f,g,R){for(var C=f,M=0;M<g.length-1;M++){var I=g[M];if(it(C,I))return;C[I]===void 0&&(C[I]={}),(C[I]===Object.prototype||C[I]===Number.prototype||C[I]===String.prototype)&&(C[I]={}),C[I]===Array.prototype&&(C[I]=[]),C=C[I]}var y=g[g.length-1];it(C,y)||((C===Object.prototype||C===Number.prototype||C===String.prototype)&&(C={}),C===Array.prototype&&(C=[]),C[y]===void 0||n.bools[y]||typeof C[y]=="boolean"?C[y]=R:Array.isArray(C[y])?C[y].push(R):C[y]=[C[y],R])}function l(f,g,R){if(!(R&&n.unknownFn&&!s(f,R)&&n.unknownFn(R)===!1)){var C=!n.strings[f]&&ut(g)?Number(g):g;D(o,f.split("."),C),(r[f]||[]).forEach(function(M){D(o,M.split("."),C)})}}Object.keys(n.bools).forEach(function(f){l(f,i[f]===void 0?!1:i[f])});var p=[];t.indexOf("--")!==-1&&(p=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var m=0;m<t.length;m++){var a=t[m],F,A;if(/^--.+=/.test(a)){var k=a.match(/^--([^=]+)=([\s\S]*)$/);F=k[1];var L=k[2];n.bools[F]&&(L=L!=="false"),l(F,L,a)}else if(/^--no-.+/.test(a))F=a.match(/^--no-(.+)/)[1],l(F,!1,a);else if(/^--.+/.test(a))F=a.match(/^--(.+)/)[1],A=t[m+1],A!==void 0&&!/^(-|--)[^-]/.test(A)&&!n.bools[F]&&!n.allBools&&(!r[F]||!u(F))?(l(F,A,a),m+=1):/^(true|false)$/.test(A)?(l(F,A==="true",a),m+=1):l(F,n.strings[F]?"":!0,a);else if(/^-[^-]+/.test(a)){for(var S=a.slice(1,-1).split(""),j=!1,B=0;B<S.length;B++){if(A=a.slice(B+2),A==="-"){l(S[B],A,a);continue}if(/[A-Za-z]/.test(S[B])&&A[0]==="="){l(S[B],A.slice(1),a),j=!0;break}if(/[A-Za-z]/.test(S[B])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(A)){l(S[B],A,a),j=!0;break}if(S[B+1]&&S[B+1].match(/\W/)){l(S[B],a.slice(B+2),a),j=!0;break}else l(S[B],n.strings[S[B]]?"":!0,a)}F=a.slice(-1)[0],!j&&F!=="-"&&(t[m+1]&&!/^(-|--)[^-]/.test(t[m+1])&&!n.bools[F]&&(!r[F]||!u(F))?(l(F,t[m+1],a),m+=1):t[m+1]&&/^(true|false)$/.test(t[m+1])?(l(F,t[m+1]==="true",a),m+=1):l(F,n.strings[F]?"":!0,a))}else if((!n.unknownFn||n.unknownFn(a)!==!1)&&o._.push(n.strings._||!ut(a)?a:Number(a)),e.stopEarly){o._.push.apply(o._,t.slice(m+1));break}}return Object.keys(i).forEach(function(f){vn(o,f.split("."))||(D(o,f.split("."),i[f]),(r[f]||[]).forEach(function(g){D(o,g.split("."),i[f])}))}),e["--"]?o["--"]=p.slice():p.forEach(function(f){o._.push(f)}),o}});var dt=v((Tr,ht)=>{var Te=require("node:tty"),ft,he,pt,Rn=((pt=(he=(ft=Te==null?void 0:Te.WriteStream)==null?void 0:ft.prototype)==null?void 0:he.hasColors)==null?void 0:pt.call(he))??!1,d=(t,e)=>{if(!Rn)return u=>u;let n=`\x1B[${t}m`,r=`\x1B[${e}m`;return u=>{let i=u+"",o=i.indexOf(r);if(o===-1)return n+i+r;let s=n,D=0;for(;o!==-1;)s+=i.slice(D,o)+n,D=o+r.length,o=i.indexOf(r,D);return s+=i.slice(D)+r,s}},h={};h.reset=d(0,0);h.bold=d(1,22);h.dim=d(2,22);h.italic=d(3,23);h.underline=d(4,24);h.overline=d(53,55);h.inverse=d(7,27);h.hidden=d(8,28);h.strikethrough=d(9,29);h.black=d(30,39);h.red=d(31,39);h.green=d(32,39);h.yellow=d(33,39);h.blue=d(34,39);h.magenta=d(35,39);h.cyan=d(36,39);h.white=d(37,39);h.gray=d(90,39);h.bgBlack=d(40,49);h.bgRed=d(41,49);h.bgGreen=d(42,49);h.bgYellow=d(43,49);h.bgBlue=d(44,49);h.bgMagenta=d(45,49);h.bgCyan=d(46,49);h.bgWhite=d(47,49);h.bgGray=d(100,49);h.redBright=d(91,39);h.greenBright=d(92,39);h.yellowBright=d(93,39);h.blueBright=d(94,39);h.magentaBright=d(95,39);h.cyanBright=d(96,39);h.whiteBright=d(97,39);h.bgRedBright=d(101,49);h.bgGreenBright=d(102,49);h.bgYellowBright=d(103,49);h.bgBlueBright=d(104,49);h.bgMagentaBright=d(105,49);h.bgCyanBright=d(106,49);h.bgWhiteBright=d(107,49);ht.exports=h});var Ct=v((Jr,Et)=>{"use strict";Et.exports=jn;function Mn(t){let e={defaultWidth:0,output:process.stdout,tty:require("tty")};return t?(Object.keys(e).forEach(function(n){t[n]||(t[n]=e[n])}),t):e}function jn(t){let e=Mn(t);if(e.output.getWindowSize)return e.output.getWindowSize()[0]||e.defaultWidth;if(e.tty.getWindowSize)return e.tty.getWindowSize()[1]||e.defaultWidth;if(e.output.columns)return e.output.columns;if(process.env.CLI_WIDTH){let n=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(n)&&n!==0)return n}return e.defaultWidth}});var bt=v((Xr,Ft)=>{"use strict";Ft.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var Pe=v((Zr,Bt)=>{"use strict";var Nn=bt();Bt.exports=t=>typeof t=="string"?t.replace(Nn(),""):t});var At=v((eu,ke)=>{"use strict";var yt=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);ke.exports=yt;ke.exports.default=yt});var vt=v((tu,wt)=>{"use strict";wt.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var xt=v((nu,Me)=>{"use strict";var $n=Pe(),Hn=At(),Gn=vt(),St=t=>{if(typeof t!="string"||t.length===0||(t=$n(t),t.length===0))return 0;t=t.replace(Gn()," ");let e=0;for(let n=0;n<t.length;n++){let r=t.codePointAt(n);r<=31||r>=127&&r<=159||r>=768&&r<=879||(r>65535&&n++,e+=Hn(r)?2:1)}return e};Me.exports=St;Me.exports.default=St});var Lt=v((ru,Rt)=>{"use strict";Rt.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var je=v((uu,Tt)=>{var ne=Lt(),It={};for(let t of Object.keys(ne))It[ne[t]]=t;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Tt.exports=c;for(let t of Object.keys(c)){if(!("channels"in c[t]))throw new Error("missing channels property: "+t);if(!("labels"in c[t]))throw new Error("missing channel labels property: "+t);if(c[t].labels.length!==c[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:n}=c[t];delete c[t].channels,delete c[t].labels,Object.defineProperty(c[t],"channels",{value:e}),Object.defineProperty(c[t],"labels",{value:n})}c.rgb.hsl=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,u=Math.min(e,n,r),i=Math.max(e,n,r),o=i-u,s,D;i===u?s=0:e===i?s=(n-r)/o:n===i?s=2+(r-e)/o:r===i&&(s=4+(e-n)/o),s=Math.min(s*60,360),s<0&&(s+=360);let l=(u+i)/2;return i===u?D=0:l<=.5?D=o/(i+u):D=o/(2-i-u),[s,D*100,l*100]};c.rgb.hsv=function(t){let e,n,r,u,i,o=t[0]/255,s=t[1]/255,D=t[2]/255,l=Math.max(o,s,D),p=l-Math.min(o,s,D),m=function(a){return(l-a)/6/p+1/2};return p===0?(u=0,i=0):(i=p/l,e=m(o),n=m(s),r=m(D),o===l?u=r-n:s===l?u=1/3+e-r:D===l&&(u=2/3+n-e),u<0?u+=1:u>1&&(u-=1)),[u*360,i*100,l*100]};c.rgb.hwb=function(t){let e=t[0],n=t[1],r=t[2],u=c.rgb.hsl(t)[0],i=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[u,i*100,r*100]};c.rgb.cmyk=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,u=Math.min(1-e,1-n,1-r),i=(1-e-u)/(1-u)||0,o=(1-n-u)/(1-u)||0,s=(1-r-u)/(1-u)||0;return[i*100,o*100,s*100,u*100]};function qn(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}c.rgb.keyword=function(t){let e=It[t];if(e)return e;let n=1/0,r;for(let u of Object.keys(ne)){let i=ne[u],o=qn(t,i);o<n&&(n=o,r=u)}return r};c.keyword.rgb=function(t){return ne[t]};c.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let u=e*.4124+n*.3576+r*.1805,i=e*.2126+n*.7152+r*.0722,o=e*.0193+n*.1192+r*.9505;return[u*100,i*100,o*100]};c.rgb.lab=function(t){let e=c.rgb.xyz(t),n=e[0],r=e[1],u=e[2];n/=95.047,r/=100,u/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,u=u>.008856?u**(1/3):7.787*u+16/116;let i=116*r-16,o=500*(n-r),s=200*(r-u);return[i,o,s]};c.hsl.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,u,i,o;if(n===0)return o=r*255,[o,o,o];r<.5?u=r*(1+n):u=r+n-r*n;let s=2*r-u,D=[0,0,0];for(let l=0;l<3;l++)i=e+1/3*-(l-1),i<0&&i++,i>1&&i--,6*i<1?o=s+(u-s)*6*i:2*i<1?o=u:3*i<2?o=s+(u-s)*(2/3-i)*6:o=s,D[l]=o*255;return D};c.hsl.hsv=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,u=n,i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,u*=i<=1?i:2-i;let o=(r+n)/2,s=r===0?2*u/(i+u):2*n/(r+n);return[e,s*100,o*100]};c.hsv.rgb=function(t){let e=t[0]/60,n=t[1]/100,r=t[2]/100,u=Math.floor(e)%6,i=e-Math.floor(e),o=255*r*(1-n),s=255*r*(1-n*i),D=255*r*(1-n*(1-i));switch(r*=255,u){case 0:return[r,D,o];case 1:return[s,r,o];case 2:return[o,r,D];case 3:return[o,s,r];case 4:return[D,o,r];case 5:return[r,o,s]}};c.hsv.hsl=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,u=Math.max(r,.01),i,o;o=(2-n)*r;let s=(2-n)*u;return i=n*u,i/=s<=1?s:2-s,i=i||0,o/=2,[e,i*100,o*100]};c.hwb.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,u=n+r,i;u>1&&(n/=u,r/=u);let o=Math.floor(6*e),s=1-r;i=6*e-o,(o&1)!==0&&(i=1-i);let D=n+i*(s-n),l,p,m;switch(o){default:case 6:case 0:l=s,p=D,m=n;break;case 1:l=D,p=s,m=n;break;case 2:l=n,p=s,m=D;break;case 3:l=n,p=D,m=s;break;case 4:l=D,p=n,m=s;break;case 5:l=s,p=n,m=D;break}return[l*255,p*255,m*255]};c.cmyk.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,u=t[3]/100,i=1-Math.min(1,e*(1-u)+u),o=1-Math.min(1,n*(1-u)+u),s=1-Math.min(1,r*(1-u)+u);return[i*255,o*255,s*255]};c.xyz.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,u,i,o;return u=e*3.2406+n*-1.5372+r*-.4986,i=e*-.9689+n*1.8758+r*.0415,o=e*.0557+n*-.204+r*1.057,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,u=Math.min(Math.max(0,u),1),i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),[u*255,i*255,o*255]};c.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;let u=116*n-16,i=500*(e-n),o=200*(n-r);return[u,i,o]};c.lab.xyz=function(t){let e=t[0],n=t[1],r=t[2],u,i,o;i=(e+16)/116,u=n/500+i,o=i-r/200;let s=i**3,D=u**3,l=o**3;return i=s>.008856?s:(i-16/116)/7.787,u=D>.008856?D:(u-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,u*=95.047,i*=100,o*=108.883,[u,i,o]};c.lab.lch=function(t){let e=t[0],n=t[1],r=t[2],u;u=Math.atan2(r,n)*360/2/Math.PI,u<0&&(u+=360);let o=Math.sqrt(n*n+r*r);return[e,o,u]};c.lch.lab=function(t){let e=t[0],n=t[1],u=t[2]/360*2*Math.PI,i=n*Math.cos(u),o=n*Math.sin(u);return[e,i,o]};c.rgb.ansi16=function(t,e=null){let[n,r,u]=t,i=e===null?c.rgb.hsv(t)[2]:e;if(i=Math.round(i/50),i===0)return 30;let o=30+(Math.round(u/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return i===2&&(o+=60),o};c.hsv.ansi16=function(t){return c.rgb.ansi16(c.hsv.rgb(t),t[2])};c.rgb.ansi256=function(t){let e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};c.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let n=(~~(t>50)+1)*.5,r=(e&1)*n*255,u=(e>>1&1)*n*255,i=(e>>2&1)*n*255;return[r,u,i]};c.ansi256.rgb=function(t){if(t>=232){let i=(t-232)*10+8;return[i,i,i]}t-=16;let e,n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,u=e%6/5*255;return[n,r,u]};c.rgb.hex=function(t){let n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};c.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=n.split("").map(s=>s+s).join(""));let r=parseInt(n,16),u=r>>16&255,i=r>>8&255,o=r&255;return[u,i,o]};c.rgb.hcg=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,u=Math.max(Math.max(e,n),r),i=Math.min(Math.min(e,n),r),o=u-i,s,D;return o<1?s=i/(1-o):s=0,o<=0?D=0:u===e?D=(n-r)/o%6:u===n?D=2+(r-e)/o:D=4+(e-n)/o,D/=6,D%=1,[D*360,o*100,s*100]};c.hsl.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n),u=0;return r<1&&(u=(n-.5*r)/(1-r)),[t[0],r*100,u*100]};c.hsv.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=e*n,u=0;return r<1&&(u=(n-r)/(1-r)),[t[0],r*100,u*100]};c.hcg.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];let u=[0,0,0],i=e%1*6,o=i%1,s=1-o,D=0;switch(Math.floor(i)){case 0:u[0]=1,u[1]=o,u[2]=0;break;case 1:u[0]=s,u[1]=1,u[2]=0;break;case 2:u[0]=0,u[1]=1,u[2]=o;break;case 3:u[0]=0,u[1]=s,u[2]=1;break;case 4:u[0]=o,u[1]=0,u[2]=1;break;default:u[0]=1,u[1]=0,u[2]=s}return D=(1-n)*r,[(n*u[0]+D)*255,(n*u[1]+D)*255,(n*u[2]+D)*255]};c.hcg.hsv=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e),u=0;return r>0&&(u=e/r),[t[0],u*100,r*100]};c.hcg.hsl=function(t){let e=t[1]/100,r=t[2]/100*(1-e)+.5*e,u=0;return r>0&&r<.5?u=e/(2*r):r>=.5&&r<1&&(u=e/(2*(1-r))),[t[0],u*100,r*100]};c.hcg.hwb=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};c.hwb.hcg=function(t){let e=t[1]/100,r=1-t[2]/100,u=r-e,i=0;return u<1&&(i=(r-u)/(1-u)),[t[0],u*100,i*100]};c.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};c.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};c.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};c.gray.hsl=function(t){return[0,0,t[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(t){return[0,100,t[0]]};c.gray.cmyk=function(t){return[0,0,0,t[0]]};c.gray.lab=function(t){return[t[0],0,0]};c.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r};c.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Ut=v((iu,_t)=>{var me=je();function Wn(){let t={},e=Object.keys(me);for(let n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function Vn(t){let e=Wn(),n=[t];for(e[t].distance=0;n.length;){let r=n.pop(),u=Object.keys(me[r]);for(let i=u.length,o=0;o<i;o++){let s=u[o],D=e[s];D.distance===-1&&(D.distance=e[r].distance+1,D.parent=r,n.unshift(s))}}return e}function Kn(t,e){return function(n){return e(t(n))}}function Qn(t,e){let n=[e[t].parent,t],r=me[e[t].parent][t],u=e[t].parent;for(;e[u].parent;)n.unshift(e[u].parent),r=Kn(me[e[u].parent][u],r),u=e[u].parent;return r.conversion=n,r}_t.exports=function(t){let e=Vn(t),n={},r=Object.keys(e);for(let u=r.length,i=0;i<u;i++){let o=r[i];e[o].parent!==null&&(n[o]=Qn(o,e))}return n}});var Pt=v((ou,Ot)=>{var Ne=je(),Yn=Ut(),J={},zn=Object.keys(Ne);function Jn(t){let e=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function Xn(t){let e=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let u=t(n);if(typeof u=="object")for(let i=u.length,o=0;o<i;o++)u[o]=Math.round(u[o]);return u};return"conversion"in t&&(e.conversion=t.conversion),e}zn.forEach(t=>{J[t]={},Object.defineProperty(J[t],"channels",{value:Ne[t].channels}),Object.defineProperty(J[t],"labels",{value:Ne[t].labels});let e=Yn(t);Object.keys(e).forEach(r=>{let u=e[r];J[t][r]=Xn(u),J[t][r].raw=Jn(u)})});Ot.exports=J});var Ht=v((su,$t)=>{"use strict";var kt=(t,e)=>(...n)=>`\x1B[${t(...n)+e}m`,Mt=(t,e)=>(...n)=>{let r=t(...n);return`\x1B[${38+e};5;${r}m`},jt=(t,e)=>(...n)=>{let r=t(...n);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`},ge=t=>t,Nt=(t,e,n)=>[t,e,n],X=(t,e,n)=>{Object.defineProperty(t,e,{get:()=>{let r=n();return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})},$e,Z=(t,e,n,r)=>{$e===void 0&&($e=Pt());let u=r?10:0,i={};for(let[o,s]of Object.entries($e)){let D=o==="ansi16"?"ansi":o;o===e?i[D]=t(n,u):typeof s=="object"&&(i[D]=t(s[e],u))}return i};function Zn(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[n,r]of Object.entries(e)){for(let[u,i]of Object.entries(r))e[u]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[u]=e[u],t.set(i[0],i[1]);Object.defineProperty(e,n,{value:r,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",X(e.color,"ansi",()=>Z(kt,"ansi16",ge,!1)),X(e.color,"ansi256",()=>Z(Mt,"ansi256",ge,!1)),X(e.color,"ansi16m",()=>Z(jt,"rgb",Nt,!1)),X(e.bgColor,"ansi",()=>Z(kt,"ansi16",ge,!0)),X(e.bgColor,"ansi256",()=>Z(Mt,"ansi256",ge,!0)),X(e.bgColor,"ansi16m",()=>Z(jt,"rgb",Nt,!0)),e}Object.defineProperty($t,"exports",{enumerable:!0,get:Zn})});var Wt=v((Du,qt)=>{"use strict";var re=xt(),er=Pe(),tr=Ht(),Ge=new Set(["\x1B","\x9B"]),nr=39,Gt=t=>`${Ge.values().next().value}[${t}m`,rr=t=>t.split(" ").map(e=>re(e)),He=(t,e,n)=>{let r=[...e],u=!1,i=re(er(t[t.length-1]));for(let[o,s]of r.entries()){let D=re(s);if(i+D<=n?t[t.length-1]+=s:(t.push(s),i=0),Ge.has(s))u=!0;else if(u&&s==="m"){u=!1;continue}u||(i+=D,i===n&&o<r.length-1&&(t.push(""),i=0))}!i&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},ur=t=>{let e=t.split(" "),n=e.length;for(;n>0&&!(re(e[n-1])>0);)n--;return n===e.length?t:e.slice(0,n).join(" ")+e.slice(n).join("")},ir=(t,e,n={})=>{if(n.trim!==!1&&t.trim()==="")return"";let r="",u="",i,o=rr(t),s=[""];for(let[D,l]of t.split(" ").entries()){n.trim!==!1&&(s[s.length-1]=s[s.length-1].trimLeft());let p=re(s[s.length-1]);if(D!==0&&(p>=e&&(n.wordWrap===!1||n.trim===!1)&&(s.push(""),p=0),(p>0||n.trim===!1)&&(s[s.length-1]+=" ",p++)),n.hard&&o[D]>e){let m=e-p,a=1+Math.floor((o[D]-m-1)/e);Math.floor((o[D]-1)/e)<a&&s.push(""),He(s,l,e);continue}if(p+o[D]>e&&p>0&&o[D]>0){if(n.wordWrap===!1&&p<e){He(s,l,e);continue}s.push("")}if(p+o[D]>e&&n.wordWrap===!1){He(s,l,e);continue}s[s.length-1]+=l}n.trim!==!1&&(s=s.map(ur)),r=s.join(`
2
+ "use strict";var Fn=Object.create;var oe=Object.defineProperty;var Cn=Object.getOwnPropertyDescriptor;var bn=Object.getOwnPropertyNames;var Bn=Object.getPrototypeOf,yn=Object.prototype.hasOwnProperty;var v=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),An=(t,e)=>{for(var n in e)oe(t,n,{get:e[n],enumerable:!0})},rt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of bn(e))!yn.call(t,u)&&u!==n&&oe(t,u,{get:()=>e[u],enumerable:!(r=Cn(e,u))||r.enumerable});return t};var x=(t,e,n)=>(n=t!=null?Fn(Bn(t)):{},rt(e||!t||!t.__esModule?oe(n,"default",{value:t,enumerable:!0}):n,t)),wn=t=>rt(oe({},"__esModule",{value:!0}),t);var st=v((Er,ot)=>{"use strict";function vn(t,e){var n=t;e.slice(0,-1).forEach(function(u){n=n[u]||{}});var r=e[e.length-1];return r in n}function ut(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function it(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}ot.exports=function(t,e){e||(e={});var n={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(n.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?n.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(f){n.bools[f]=!0});var r={};function u(f){return r[f].some(function(g){return n.bools[g]})}Object.keys(e.alias||{}).forEach(function(f){r[f]=[].concat(e.alias[f]),r[f].forEach(function(g){r[g]=[f].concat(r[f].filter(function(R){return g!==R}))})}),[].concat(e.string).filter(Boolean).forEach(function(f){n.strings[f]=!0,r[f]&&[].concat(r[f]).forEach(function(g){n.strings[g]=!0})});var i=e.default||{},o={_:[]};function s(f,g){return n.allBools&&/^--[^=]+$/.test(g)||n.strings[f]||n.bools[f]||r[f]}function D(f,g,R){for(var F=f,M=0;M<g.length-1;M++){var I=g[M];if(it(F,I))return;F[I]===void 0&&(F[I]={}),(F[I]===Object.prototype||F[I]===Number.prototype||F[I]===String.prototype)&&(F[I]={}),F[I]===Array.prototype&&(F[I]=[]),F=F[I]}var y=g[g.length-1];it(F,y)||((F===Object.prototype||F===Number.prototype||F===String.prototype)&&(F={}),F===Array.prototype&&(F=[]),F[y]===void 0||n.bools[y]||typeof F[y]=="boolean"?F[y]=R:Array.isArray(F[y])?F[y].push(R):F[y]=[F[y],R])}function l(f,g,R){if(!(R&&n.unknownFn&&!s(f,R)&&n.unknownFn(R)===!1)){var F=!n.strings[f]&&ut(g)?Number(g):g;D(o,f.split("."),F),(r[f]||[]).forEach(function(M){D(o,M.split("."),F)})}}Object.keys(n.bools).forEach(function(f){l(f,i[f]===void 0?!1:i[f])});var p=[];t.indexOf("--")!==-1&&(p=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var m=0;m<t.length;m++){var a=t[m],C,A;if(/^--.+=/.test(a)){var k=a.match(/^--([^=]+)=([\s\S]*)$/);C=k[1];var L=k[2];n.bools[C]&&(L=L!=="false"),l(C,L,a)}else if(/^--no-.+/.test(a))C=a.match(/^--no-(.+)/)[1],l(C,!1,a);else if(/^--.+/.test(a))C=a.match(/^--(.+)/)[1],A=t[m+1],A!==void 0&&!/^(-|--)[^-]/.test(A)&&!n.bools[C]&&!n.allBools&&(!r[C]||!u(C))?(l(C,A,a),m+=1):/^(true|false)$/.test(A)?(l(C,A==="true",a),m+=1):l(C,n.strings[C]?"":!0,a);else if(/^-[^-]+/.test(a)){for(var S=a.slice(1,-1).split(""),j=!1,B=0;B<S.length;B++){if(A=a.slice(B+2),A==="-"){l(S[B],A,a);continue}if(/[A-Za-z]/.test(S[B])&&A[0]==="="){l(S[B],A.slice(1),a),j=!0;break}if(/[A-Za-z]/.test(S[B])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(A)){l(S[B],A,a),j=!0;break}if(S[B+1]&&S[B+1].match(/\W/)){l(S[B],a.slice(B+2),a),j=!0;break}else l(S[B],n.strings[S[B]]?"":!0,a)}C=a.slice(-1)[0],!j&&C!=="-"&&(t[m+1]&&!/^(-|--)[^-]/.test(t[m+1])&&!n.bools[C]&&(!r[C]||!u(C))?(l(C,t[m+1],a),m+=1):t[m+1]&&/^(true|false)$/.test(t[m+1])?(l(C,t[m+1]==="true",a),m+=1):l(C,n.strings[C]?"":!0,a))}else if((!n.unknownFn||n.unknownFn(a)!==!1)&&o._.push(n.strings._||!ut(a)?a:Number(a)),e.stopEarly){o._.push.apply(o._,t.slice(m+1));break}}return Object.keys(i).forEach(function(f){vn(o,f.split("."))||(D(o,f.split("."),i[f]),(r[f]||[]).forEach(function(g){D(o,g.split("."),i[f])}))}),e["--"]?o["--"]=p.slice():p.forEach(function(f){o._.push(f)}),o}});var dt=v((Tr,ht)=>{var Te=require("node:tty"),ft,he,pt,Rn=((pt=(he=(ft=Te==null?void 0:Te.WriteStream)==null?void 0:ft.prototype)==null?void 0:he.hasColors)==null?void 0:pt.call(he))??!1,d=(t,e)=>{if(!Rn)return u=>u;let n=`\x1B[${t}m`,r=`\x1B[${e}m`;return u=>{let i=u+"",o=i.indexOf(r);if(o===-1)return n+i+r;let s=n,D=0;for(;o!==-1;)s+=i.slice(D,o)+n,D=o+r.length,o=i.indexOf(r,D);return s+=i.slice(D)+r,s}},h={};h.reset=d(0,0);h.bold=d(1,22);h.dim=d(2,22);h.italic=d(3,23);h.underline=d(4,24);h.overline=d(53,55);h.inverse=d(7,27);h.hidden=d(8,28);h.strikethrough=d(9,29);h.black=d(30,39);h.red=d(31,39);h.green=d(32,39);h.yellow=d(33,39);h.blue=d(34,39);h.magenta=d(35,39);h.cyan=d(36,39);h.white=d(37,39);h.gray=d(90,39);h.bgBlack=d(40,49);h.bgRed=d(41,49);h.bgGreen=d(42,49);h.bgYellow=d(43,49);h.bgBlue=d(44,49);h.bgMagenta=d(45,49);h.bgCyan=d(46,49);h.bgWhite=d(47,49);h.bgGray=d(100,49);h.redBright=d(91,39);h.greenBright=d(92,39);h.yellowBright=d(93,39);h.blueBright=d(94,39);h.magentaBright=d(95,39);h.cyanBright=d(96,39);h.whiteBright=d(97,39);h.bgRedBright=d(101,49);h.bgGreenBright=d(102,49);h.bgYellowBright=d(103,49);h.bgBlueBright=d(104,49);h.bgMagentaBright=d(105,49);h.bgCyanBright=d(106,49);h.bgWhiteBright=d(107,49);ht.exports=h});var Ft=v((Jr,Et)=>{"use strict";Et.exports=jn;function Mn(t){let e={defaultWidth:0,output:process.stdout,tty:require("tty")};return t?(Object.keys(e).forEach(function(n){t[n]||(t[n]=e[n])}),t):e}function jn(t){let e=Mn(t);if(e.output.getWindowSize)return e.output.getWindowSize()[0]||e.defaultWidth;if(e.tty.getWindowSize)return e.tty.getWindowSize()[1]||e.defaultWidth;if(e.output.columns)return e.output.columns;if(process.env.CLI_WIDTH){let n=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(n)&&n!==0)return n}return e.defaultWidth}});var bt=v((Xr,Ct)=>{"use strict";Ct.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var Pe=v((Zr,Bt)=>{"use strict";var Nn=bt();Bt.exports=t=>typeof t=="string"?t.replace(Nn(),""):t});var At=v((eu,ke)=>{"use strict";var yt=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);ke.exports=yt;ke.exports.default=yt});var vt=v((tu,wt)=>{"use strict";wt.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var xt=v((nu,Me)=>{"use strict";var $n=Pe(),Hn=At(),Gn=vt(),St=t=>{if(typeof t!="string"||t.length===0||(t=$n(t),t.length===0))return 0;t=t.replace(Gn()," ");let e=0;for(let n=0;n<t.length;n++){let r=t.codePointAt(n);r<=31||r>=127&&r<=159||r>=768&&r<=879||(r>65535&&n++,e+=Hn(r)?2:1)}return e};Me.exports=St;Me.exports.default=St});var Lt=v((ru,Rt)=>{"use strict";Rt.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var je=v((uu,Tt)=>{var ne=Lt(),It={};for(let t of Object.keys(ne))It[ne[t]]=t;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Tt.exports=c;for(let t of Object.keys(c)){if(!("channels"in c[t]))throw new Error("missing channels property: "+t);if(!("labels"in c[t]))throw new Error("missing channel labels property: "+t);if(c[t].labels.length!==c[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:n}=c[t];delete c[t].channels,delete c[t].labels,Object.defineProperty(c[t],"channels",{value:e}),Object.defineProperty(c[t],"labels",{value:n})}c.rgb.hsl=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,u=Math.min(e,n,r),i=Math.max(e,n,r),o=i-u,s,D;i===u?s=0:e===i?s=(n-r)/o:n===i?s=2+(r-e)/o:r===i&&(s=4+(e-n)/o),s=Math.min(s*60,360),s<0&&(s+=360);let l=(u+i)/2;return i===u?D=0:l<=.5?D=o/(i+u):D=o/(2-i-u),[s,D*100,l*100]};c.rgb.hsv=function(t){let e,n,r,u,i,o=t[0]/255,s=t[1]/255,D=t[2]/255,l=Math.max(o,s,D),p=l-Math.min(o,s,D),m=function(a){return(l-a)/6/p+1/2};return p===0?(u=0,i=0):(i=p/l,e=m(o),n=m(s),r=m(D),o===l?u=r-n:s===l?u=1/3+e-r:D===l&&(u=2/3+n-e),u<0?u+=1:u>1&&(u-=1)),[u*360,i*100,l*100]};c.rgb.hwb=function(t){let e=t[0],n=t[1],r=t[2],u=c.rgb.hsl(t)[0],i=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[u,i*100,r*100]};c.rgb.cmyk=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,u=Math.min(1-e,1-n,1-r),i=(1-e-u)/(1-u)||0,o=(1-n-u)/(1-u)||0,s=(1-r-u)/(1-u)||0;return[i*100,o*100,s*100,u*100]};function qn(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}c.rgb.keyword=function(t){let e=It[t];if(e)return e;let n=1/0,r;for(let u of Object.keys(ne)){let i=ne[u],o=qn(t,i);o<n&&(n=o,r=u)}return r};c.keyword.rgb=function(t){return ne[t]};c.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let u=e*.4124+n*.3576+r*.1805,i=e*.2126+n*.7152+r*.0722,o=e*.0193+n*.1192+r*.9505;return[u*100,i*100,o*100]};c.rgb.lab=function(t){let e=c.rgb.xyz(t),n=e[0],r=e[1],u=e[2];n/=95.047,r/=100,u/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,u=u>.008856?u**(1/3):7.787*u+16/116;let i=116*r-16,o=500*(n-r),s=200*(r-u);return[i,o,s]};c.hsl.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,u,i,o;if(n===0)return o=r*255,[o,o,o];r<.5?u=r*(1+n):u=r+n-r*n;let s=2*r-u,D=[0,0,0];for(let l=0;l<3;l++)i=e+1/3*-(l-1),i<0&&i++,i>1&&i--,6*i<1?o=s+(u-s)*6*i:2*i<1?o=u:3*i<2?o=s+(u-s)*(2/3-i)*6:o=s,D[l]=o*255;return D};c.hsl.hsv=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,u=n,i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,u*=i<=1?i:2-i;let o=(r+n)/2,s=r===0?2*u/(i+u):2*n/(r+n);return[e,s*100,o*100]};c.hsv.rgb=function(t){let e=t[0]/60,n=t[1]/100,r=t[2]/100,u=Math.floor(e)%6,i=e-Math.floor(e),o=255*r*(1-n),s=255*r*(1-n*i),D=255*r*(1-n*(1-i));switch(r*=255,u){case 0:return[r,D,o];case 1:return[s,r,o];case 2:return[o,r,D];case 3:return[o,s,r];case 4:return[D,o,r];case 5:return[r,o,s]}};c.hsv.hsl=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,u=Math.max(r,.01),i,o;o=(2-n)*r;let s=(2-n)*u;return i=n*u,i/=s<=1?s:2-s,i=i||0,o/=2,[e,i*100,o*100]};c.hwb.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,u=n+r,i;u>1&&(n/=u,r/=u);let o=Math.floor(6*e),s=1-r;i=6*e-o,(o&1)!==0&&(i=1-i);let D=n+i*(s-n),l,p,m;switch(o){default:case 6:case 0:l=s,p=D,m=n;break;case 1:l=D,p=s,m=n;break;case 2:l=n,p=s,m=D;break;case 3:l=n,p=D,m=s;break;case 4:l=D,p=n,m=s;break;case 5:l=s,p=n,m=D;break}return[l*255,p*255,m*255]};c.cmyk.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,u=t[3]/100,i=1-Math.min(1,e*(1-u)+u),o=1-Math.min(1,n*(1-u)+u),s=1-Math.min(1,r*(1-u)+u);return[i*255,o*255,s*255]};c.xyz.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,u,i,o;return u=e*3.2406+n*-1.5372+r*-.4986,i=e*-.9689+n*1.8758+r*.0415,o=e*.0557+n*-.204+r*1.057,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,u=Math.min(Math.max(0,u),1),i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),[u*255,i*255,o*255]};c.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;let u=116*n-16,i=500*(e-n),o=200*(n-r);return[u,i,o]};c.lab.xyz=function(t){let e=t[0],n=t[1],r=t[2],u,i,o;i=(e+16)/116,u=n/500+i,o=i-r/200;let s=i**3,D=u**3,l=o**3;return i=s>.008856?s:(i-16/116)/7.787,u=D>.008856?D:(u-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,u*=95.047,i*=100,o*=108.883,[u,i,o]};c.lab.lch=function(t){let e=t[0],n=t[1],r=t[2],u;u=Math.atan2(r,n)*360/2/Math.PI,u<0&&(u+=360);let o=Math.sqrt(n*n+r*r);return[e,o,u]};c.lch.lab=function(t){let e=t[0],n=t[1],u=t[2]/360*2*Math.PI,i=n*Math.cos(u),o=n*Math.sin(u);return[e,i,o]};c.rgb.ansi16=function(t,e=null){let[n,r,u]=t,i=e===null?c.rgb.hsv(t)[2]:e;if(i=Math.round(i/50),i===0)return 30;let o=30+(Math.round(u/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return i===2&&(o+=60),o};c.hsv.ansi16=function(t){return c.rgb.ansi16(c.hsv.rgb(t),t[2])};c.rgb.ansi256=function(t){let e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};c.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let n=(~~(t>50)+1)*.5,r=(e&1)*n*255,u=(e>>1&1)*n*255,i=(e>>2&1)*n*255;return[r,u,i]};c.ansi256.rgb=function(t){if(t>=232){let i=(t-232)*10+8;return[i,i,i]}t-=16;let e,n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,u=e%6/5*255;return[n,r,u]};c.rgb.hex=function(t){let n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};c.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=n.split("").map(s=>s+s).join(""));let r=parseInt(n,16),u=r>>16&255,i=r>>8&255,o=r&255;return[u,i,o]};c.rgb.hcg=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,u=Math.max(Math.max(e,n),r),i=Math.min(Math.min(e,n),r),o=u-i,s,D;return o<1?s=i/(1-o):s=0,o<=0?D=0:u===e?D=(n-r)/o%6:u===n?D=2+(r-e)/o:D=4+(e-n)/o,D/=6,D%=1,[D*360,o*100,s*100]};c.hsl.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n),u=0;return r<1&&(u=(n-.5*r)/(1-r)),[t[0],r*100,u*100]};c.hsv.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=e*n,u=0;return r<1&&(u=(n-r)/(1-r)),[t[0],r*100,u*100]};c.hcg.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];let u=[0,0,0],i=e%1*6,o=i%1,s=1-o,D=0;switch(Math.floor(i)){case 0:u[0]=1,u[1]=o,u[2]=0;break;case 1:u[0]=s,u[1]=1,u[2]=0;break;case 2:u[0]=0,u[1]=1,u[2]=o;break;case 3:u[0]=0,u[1]=s,u[2]=1;break;case 4:u[0]=o,u[1]=0,u[2]=1;break;default:u[0]=1,u[1]=0,u[2]=s}return D=(1-n)*r,[(n*u[0]+D)*255,(n*u[1]+D)*255,(n*u[2]+D)*255]};c.hcg.hsv=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e),u=0;return r>0&&(u=e/r),[t[0],u*100,r*100]};c.hcg.hsl=function(t){let e=t[1]/100,r=t[2]/100*(1-e)+.5*e,u=0;return r>0&&r<.5?u=e/(2*r):r>=.5&&r<1&&(u=e/(2*(1-r))),[t[0],u*100,r*100]};c.hcg.hwb=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};c.hwb.hcg=function(t){let e=t[1]/100,r=1-t[2]/100,u=r-e,i=0;return u<1&&(i=(r-u)/(1-u)),[t[0],u*100,i*100]};c.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};c.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};c.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};c.gray.hsl=function(t){return[0,0,t[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(t){return[0,100,t[0]]};c.gray.cmyk=function(t){return[0,0,0,t[0]]};c.gray.lab=function(t){return[t[0],0,0]};c.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r};c.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Ut=v((iu,_t)=>{var me=je();function Wn(){let t={},e=Object.keys(me);for(let n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function Vn(t){let e=Wn(),n=[t];for(e[t].distance=0;n.length;){let r=n.pop(),u=Object.keys(me[r]);for(let i=u.length,o=0;o<i;o++){let s=u[o],D=e[s];D.distance===-1&&(D.distance=e[r].distance+1,D.parent=r,n.unshift(s))}}return e}function Kn(t,e){return function(n){return e(t(n))}}function Qn(t,e){let n=[e[t].parent,t],r=me[e[t].parent][t],u=e[t].parent;for(;e[u].parent;)n.unshift(e[u].parent),r=Kn(me[e[u].parent][u],r),u=e[u].parent;return r.conversion=n,r}_t.exports=function(t){let e=Vn(t),n={},r=Object.keys(e);for(let u=r.length,i=0;i<u;i++){let o=r[i];e[o].parent!==null&&(n[o]=Qn(o,e))}return n}});var Pt=v((ou,Ot)=>{var Ne=je(),Yn=Ut(),J={},zn=Object.keys(Ne);function Jn(t){let e=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function Xn(t){let e=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let u=t(n);if(typeof u=="object")for(let i=u.length,o=0;o<i;o++)u[o]=Math.round(u[o]);return u};return"conversion"in t&&(e.conversion=t.conversion),e}zn.forEach(t=>{J[t]={},Object.defineProperty(J[t],"channels",{value:Ne[t].channels}),Object.defineProperty(J[t],"labels",{value:Ne[t].labels});let e=Yn(t);Object.keys(e).forEach(r=>{let u=e[r];J[t][r]=Xn(u),J[t][r].raw=Jn(u)})});Ot.exports=J});var Ht=v((su,$t)=>{"use strict";var kt=(t,e)=>(...n)=>`\x1B[${t(...n)+e}m`,Mt=(t,e)=>(...n)=>{let r=t(...n);return`\x1B[${38+e};5;${r}m`},jt=(t,e)=>(...n)=>{let r=t(...n);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`},ge=t=>t,Nt=(t,e,n)=>[t,e,n],X=(t,e,n)=>{Object.defineProperty(t,e,{get:()=>{let r=n();return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})},$e,Z=(t,e,n,r)=>{$e===void 0&&($e=Pt());let u=r?10:0,i={};for(let[o,s]of Object.entries($e)){let D=o==="ansi16"?"ansi":o;o===e?i[D]=t(n,u):typeof s=="object"&&(i[D]=t(s[e],u))}return i};function Zn(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[n,r]of Object.entries(e)){for(let[u,i]of Object.entries(r))e[u]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[u]=e[u],t.set(i[0],i[1]);Object.defineProperty(e,n,{value:r,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",X(e.color,"ansi",()=>Z(kt,"ansi16",ge,!1)),X(e.color,"ansi256",()=>Z(Mt,"ansi256",ge,!1)),X(e.color,"ansi16m",()=>Z(jt,"rgb",Nt,!1)),X(e.bgColor,"ansi",()=>Z(kt,"ansi16",ge,!0)),X(e.bgColor,"ansi256",()=>Z(Mt,"ansi256",ge,!0)),X(e.bgColor,"ansi16m",()=>Z(jt,"rgb",Nt,!0)),e}Object.defineProperty($t,"exports",{enumerable:!0,get:Zn})});var Wt=v((Du,qt)=>{"use strict";var re=xt(),er=Pe(),tr=Ht(),Ge=new Set(["\x1B","\x9B"]),nr=39,Gt=t=>`${Ge.values().next().value}[${t}m`,rr=t=>t.split(" ").map(e=>re(e)),He=(t,e,n)=>{let r=[...e],u=!1,i=re(er(t[t.length-1]));for(let[o,s]of r.entries()){let D=re(s);if(i+D<=n?t[t.length-1]+=s:(t.push(s),i=0),Ge.has(s))u=!0;else if(u&&s==="m"){u=!1;continue}u||(i+=D,i===n&&o<r.length-1&&(t.push(""),i=0))}!i&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},ur=t=>{let e=t.split(" "),n=e.length;for(;n>0&&!(re(e[n-1])>0);)n--;return n===e.length?t:e.slice(0,n).join(" ")+e.slice(n).join("")},ir=(t,e,n={})=>{if(n.trim!==!1&&t.trim()==="")return"";let r="",u="",i,o=rr(t),s=[""];for(let[D,l]of t.split(" ").entries()){n.trim!==!1&&(s[s.length-1]=s[s.length-1].trimLeft());let p=re(s[s.length-1]);if(D!==0&&(p>=e&&(n.wordWrap===!1||n.trim===!1)&&(s.push(""),p=0),(p>0||n.trim===!1)&&(s[s.length-1]+=" ",p++)),n.hard&&o[D]>e){let m=e-p,a=1+Math.floor((o[D]-m-1)/e);Math.floor((o[D]-1)/e)<a&&s.push(""),He(s,l,e);continue}if(p+o[D]>e&&p>0&&o[D]>0){if(n.wordWrap===!1&&p<e){He(s,l,e);continue}s.push("")}if(p+o[D]>e&&n.wordWrap===!1){He(s,l,e);continue}s[s.length-1]+=l}n.trim!==!1&&(s=s.map(ur)),r=s.join(`
3
3
  `);for(let[D,l]of[...r].entries()){if(u+=l,Ge.has(l)){let m=parseFloat(/\d[^m]*/.exec(r.slice(D,D+4)));i=m===nr?null:m}let p=tr.codes.get(Number(i));i&&p&&(r[D+1]===`
4
4
  `?u+=Gt(p):l===`
5
5
  `&&(u+=Gt(i)))}return u};qt.exports=(t,e,n)=>String(t).normalize().replace(/\r\n/g,`
6
6
  `).split(`
7
7
  `).map(r=>ir(r,e,n)).join(`
8
- `)});var Yt=v((Bu,Qt)=>{var or=require("stream"),We=class extends or{#n=null;constructor(e={}){super(e),this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=e.replace,this._prompt=e.prompt||null,this._hadControl=!1}#t(e,n){return this._dest?this._dest[e]:this._src?this._src[e]:n}#e(e,...n){var r,u;typeof((r=this._dest)==null?void 0:r[e])=="function"&&this._dest[e](...n),typeof((u=this._src)==null?void 0:u[e])=="function"&&this._src[e](...n)}get isTTY(){return this.#n!==null?this.#n:this.#t("isTTY",!1)}set isTTY(e){this.#n=e}get rows(){return this.#t("rows")}get columns(){return this.#t("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(e){this._src=e}pipe(e,n){return this._dest=e,super.pipe(e,n)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(e){if(this.muted){if(!this.replace)return!0;if(e.match(/^\u001b/))return e.indexOf(this._prompt)===0&&(e=e.slice(this._prompt.length),e=e.replace(/./g,this.replace),e=this._prompt+e),this._hadControl=!0,this.emit("data",e);this._prompt&&this._hadControl&&e.indexOf(this._prompt)===0&&(this._hadControl=!1,this.emit("data",this._prompt),e=e.slice(this._prompt.length)),e=e.toString().replace(/./g,this.replace)}this.emit("data",e)}end(e){this.muted&&(e&&this.replace?e=e.toString().replace(/./g,this.replace):e=null),e&&this.emit("data",e),this.emit("end")}destroy(...e){return this.#e("destroy",...e)}destroySoon(...e){return this.#e("destroySoon",...e)}close(...e){return this.#e("close",...e)}};Qt.exports=We});var Xt=v((xu,Xe)=>{"use strict";var E=Xe.exports;Xe.exports.default=E;var b="\x1B[",ue="\x1B]",ee="\x07",be=";",Jt=process.env.TERM_PROGRAM==="Apple_Terminal";E.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?b+(t+1)+"G":b+(e+1)+";"+(t+1)+"H"};E.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let n="";return t<0?n+=b+-t+"D":t>0&&(n+=b+t+"C"),e<0?n+=b+-e+"A":e>0&&(n+=b+e+"B"),n};E.cursorUp=(t=1)=>b+t+"A";E.cursorDown=(t=1)=>b+t+"B";E.cursorForward=(t=1)=>b+t+"C";E.cursorBackward=(t=1)=>b+t+"D";E.cursorLeft=b+"G";E.cursorSavePosition=Jt?"\x1B7":b+"s";E.cursorRestorePosition=Jt?"\x1B8":b+"u";E.cursorGetPosition=b+"6n";E.cursorNextLine=b+"E";E.cursorPrevLine=b+"F";E.cursorHide=b+"?25l";E.cursorShow=b+"?25h";E.eraseLines=t=>{let e="";for(let n=0;n<t;n++)e+=E.eraseLine+(n<t-1?E.cursorUp():"");return t&&(e+=E.cursorLeft),e};E.eraseEndLine=b+"K";E.eraseStartLine=b+"1K";E.eraseLine=b+"2K";E.eraseDown=b+"J";E.eraseUp=b+"1J";E.eraseScreen=b+"2J";E.scrollUp=b+"S";E.scrollDown=b+"T";E.clearScreen="\x1Bc";E.clearTerminal=process.platform==="win32"?`${E.eraseScreen}${b}0f`:`${E.eraseScreen}${b}3J${b}H`;E.beep=ee;E.link=(t,e)=>[ue,"8",be,be,e,ee,t,ue,"8",be,be,ee].join("");E.image=(t,e={})=>{let n=`${ue}1337;File=inline=1`;return e.width&&(n+=`;width=${e.width}`),e.height&&(n+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(n+=";preserveAspectRatio=0"),n+":"+t.toString("base64")+ee};E.iTerm={setCwd:(t=process.cwd())=>`${ue}50;CurrentDir=${t}${ee}`,annotation:(t,e={})=>{let n=`${ue}1337;`,r=typeof e.x<"u",u=typeof e.y<"u";if((r||u)&&!(r&&u&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),n+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?n+=(r?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):n+=t,n+ee}}});var on=v((ni,ar)=>{ar.exports={name:"@under_koen/bsm",version:"1.6.1",description:"BSM (Basic Script Manager) is a useful tool that enables you to create clear and concise scripts without cluttering your `package.json` file.",license:"MIT",author:"Koen van Staveren <koen@underkoen.nl>",homepage:"https://github.com/UnderKoen/bsm#readme",repository:{type:"git",url:"https://github.com/UnderKoen/bsm.git"},bugs:{url:"https://github.com/UnderKoen/bsm/issues"},main:"dist/index.js",bin:{bsm:"./dist/index.js"},files:["dist"],scripts:{build:"bsm","build:dev":"bsm","build:prod":"bsm","build:watch":"bsm",lint:"bsm",prettier:"bsm",prepublishOnly:"bsm build.prod",test:"bsm","test:cov":"bsm test.cov"},devDependencies:{"@eslint/js":"^9.21.0","@inquirer/core":"^10.1.7","@semantic-release/changelog":"^6.0.3","@semantic-release/exec":"^7.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^11.0.1","@types/minimist":"^1.2.5","@types/node":"^22.13.9","@types/sinon":"^17.0.4","@typescript-eslint/eslint-plugin":"^8.26.0","@typescript-eslint/parser":"^8.26.0","@under_koen/bsm":"^1.5.0",c8:"^10.1.3","ci-info":"^4.1.0","cpy-cli":"^5.0.0",defu:"^6.1.4",esbuild:"^0.25.0",eslint:"^9.21.0","eslint-config-prettier":"^10.0.2",globals:"^16.0.0",minimist:"^1.2.8",prettier:"^3.5.3","prettier-package-json":"^2.8.0",rimraf:"^6.0.1","semantic-release":"^24.2.3",sinon:"^19.0.2",tsm:"^2.3.0",typescript:"^5.8.2","typescript-eslint":"^8.26.0",uvu:"^0.5.6"},keywords:["script","scripting"]}});var sn=v((ui,fr)=>{fr.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var cn=v(P=>{"use strict";var Dn=sn(),w=process.env;Object.defineProperty(P,"_vendors",{value:Dn.map(function(t){return t.constant})});P.name=null;P.isPR=null;P.id=null;Dn.forEach(function(t){let n=(Array.isArray(t.env)?t.env:[t.env]).every(function(r){return ln(r)});P[t.constant]=n,n&&(P.name=t.name,P.isPR=pr(t),P.id=t.constant)});P.isCI=!!(w.CI!=="false"&&(w.BUILD_ID||w.BUILD_NUMBER||w.CI||w.CI_APP_ID||w.CI_BUILD_ID||w.CI_BUILD_NUMBER||w.CI_NAME||w.CONTINUOUS_INTEGRATION||w.RUN_ID||P.name));function ln(t){return typeof t=="string"?!!w[t]:"env"in t?w[t.env]&&w[t.env].includes(t.includes):"any"in t?t.any.some(function(e){return!!w[e]}):Object.keys(t).every(function(e){return w[e]===t[e]})}function pr(t){switch(typeof t.pr){case"string":return!!w[t.pr];case"object":return"env"in t.pr?"any"in t.pr?t.pr.any.some(function(e){return w[t.pr.env]===e}):t.pr.env in w&&w[t.pr.env]!==t.pr.ne:"any"in t.pr?t.pr.any.some(function(e){return!!w[e]}):ln(t.pr);default:return null}}});var mr={};An(mr,{main:()=>En});module.exports=wn(mr);var gn=x(st());function Se(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function xe(t,e,n=".",r){if(!Se(e))return xe(t,{},n,r);let u=Object.assign({},e);for(let i in t){if(i==="__proto__"||i==="constructor")continue;let o=t[i];o!=null&&(r&&r(u,i,o,n)||(Array.isArray(o)&&Array.isArray(u[i])?u[i]=[...o,...u[i]]:Se(o)&&Se(u[i])?u[i]=xe(o,u[i],(n?`${n}.`:"")+i.toString(),r):u[i]=o))}return u}function Re(t){return(...e)=>e.reduce((n,r)=>xe(n,r,"",t),{})}var Dt=Re(),Cr=Re((t,e,n)=>{if(t[e]!==void 0&&typeof n=="function")return t[e]=n(t[e]),!0}),Fr=Re((t,e,n)=>{if(Array.isArray(t[e])&&typeof n=="function")return t[e]=n(t[e]),!0});var Sn=Object.freeze({scripts:{},config:{defaultHelpBehavior:"help",idempotency:{location:"./node_modules/.cache/bsm/idempotency",useFileContent:!1}}}),_=class{static getSource(e){return Array.isArray(e)?e[0]:e}static async loadExtensions(e){return!Object.hasOwn(e,"extends")||!e.extends?[]:(await Promise.all([...e.extends].map(n=>this.loadFile(n,!1)))).filter(n=>n!==void 0)}static async loadFile(e,n=!0){var u,i;if(!e)return;let r=this.getSource(e);try{r=require.resolve(r,{paths:[process.cwd()]});let o=require(r);typeof o=="function"&&(o=await o(...Array.isArray(e)?e.slice(1):[]));let s=await this.loadExtensions(o);return Dt(o,...s,Sn)}catch(o){let s=o,D=(i=(u=s.requireStack)==null?void 0:u[0])==null?void 0:i.replaceAll("\\","/");if(s.code==="MODULE_NOT_FOUND"&&(D!=null&&D.includes("bsm/dist/index.js"))){if(n)return;console.error(`\x1B[31mCannot find config '${r}' to extend\x1B[0m`),process.exit(1)}else console.error(o),Array.isArray(e)&&(e=e[0]),console.error(`\x1B[31mError loading config '${e}'\x1B[0m`),process.exit(1)}}static async load(e){let n=[e.config,process.env.BSM_CONFIG,"./package.scripts.js","./package.scripts.json"].filter(r=>r!==void 0);for(let r of n){let u=await this.loadFile(r);if(u)return process.env.BSM_CONFIG=r,this._config=u,u}console.error(`\x1B[31mCannot find config ${n.map(r=>`'${r}'`).join(" or ")}\x1B[0m`),process.exit(1)}static _config;static get config(){if(this._config)return this._config;throw new Error("Config not loaded")}};var se=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e==null?void 0:e.cause}},De=class extends Error{name="CancelPromptError";message="Prompt was canceled"},le=class extends Error{name="ExitPromptError"},ce=class extends Error{name="HookError"},ae=class extends Error{name="ValidationError"};var fe=require("node:async_hooks");var lt=new fe.AsyncLocalStorage;function xn(t){return{rl:t,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function ct(t,e){let n=xn(t);return lt.run(n,()=>{function r(u){n.handleChange=()=>{n.index=0,u()},n.handleChange()}return e(r)})}function W(){let t=lt.getStore();if(!t)throw new ce("[Inquirer] Hook functions can only be called from within a prompt");return t}function Le(){return W().rl}function Ie(t){let e=(...n)=>{let r=W(),u=!1,i=r.handleChange;r.handleChange=()=>{u=!0};let o=t(...n);return u&&i(),r.handleChange=i,o};return fe.AsyncResource.bind(e)}function z(t){let e=W(),{index:n}=e,r={get(){return e.hooks[n]},set(i){e.hooks[n]=i},initialized:n in e.hooks},u=t(r);return e.index++,u}function at(){W().handleChange()}var V={queue(t){let e=W(),{index:n}=e;e.hooksEffect.push(()=>{var u,i;(i=(u=e.hooksCleanup)[n])==null||i.call(u);let r=t(Le());if(r!=null&&typeof r!="function")throw new ae("useEffect return value must be a cleanup function or nothing.");e.hooksCleanup[n]=r})},run(){let t=W();Ie(()=>{t.hooksEffect.forEach(e=>{e()}),t.hooksEffect.length=0})()},clearAll(){let t=W();t.hooksCleanup.forEach(e=>{e==null||e()}),t.hooksEffect.length=0,t.hooksCleanup.length=0}};function N(t){return z(e=>{let n=u=>{e.get()!==u&&(e.set(u),at())};if(e.initialized)return[e.get(),n];let r=typeof t=="function"?t():t;return e.set(r),[r,n]})}function pe(t,e){z(n=>{let r=n.get();(!Array.isArray(r)||e.some((i,o)=>!Object.is(i,r[o])))&&V.queue(t),n.set(e)})}var T=x(dt(),1);var U=x(require("node:process"),1);function Ln(){return U.default.platform!=="win32"?U.default.env.TERM!=="linux":!!U.default.env.WT_SESSION||!!U.default.env.TERMINUS_SUBLIME||U.default.env.ConEmuTask==="{cmd::Cmder}"||U.default.env.TERM_PROGRAM==="Terminus-Sublime"||U.default.env.TERM_PROGRAM==="vscode"||U.default.env.TERM==="xterm-256color"||U.default.env.TERM==="alacritty"||U.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var mt={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},gt={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},In={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Tn={...mt,...gt},_n={...mt,...In},Un=Ln(),On=Un?Tn:_n,_e=On,_r=Object.entries(gt);var Pn={prefix:{idle:T.default.blue("?"),done:T.default.green(_e.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(t=>T.default.yellow(t))},style:{answer:T.default.cyan,message:T.default.bold,error:t=>T.default.red(`> ${t}`),defaultAnswer:t=>T.default.dim(`(${t})`),help:T.default.dim,highlight:T.default.cyan,key:t=>T.default.cyan(T.default.bold(`<${t}>`))}};function Ue(t,e){return z(n=>{let r=n.get();if(!r||r.dependencies.length!==e.length||r.dependencies.some((u,i)=>u!==e[i])){let u=t();return n.set({value:u,dependencies:e}),u}return r.value})}function de(t){return N({current:t})[0]}function Oe(t){let e=de(t);e.current=t,pe(n=>{let r=!1,u=Ie((i,o)=>{r||e.current(o,n)});return n.input.on("keypress",u),()=>{r=!0,n.input.removeListener("keypress",u)}},[])}var Vt=x(Ct(),1),Kt=x(Wt(),1);function Ee(t,e){return t.split(`
8
+ `)});var Yt=v((Bu,Qt)=>{var or=require("stream"),We=class extends or{#n=null;constructor(e={}){super(e),this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=e.replace,this._prompt=e.prompt||null,this._hadControl=!1}#t(e,n){return this._dest?this._dest[e]:this._src?this._src[e]:n}#e(e,...n){var r,u;typeof((r=this._dest)==null?void 0:r[e])=="function"&&this._dest[e](...n),typeof((u=this._src)==null?void 0:u[e])=="function"&&this._src[e](...n)}get isTTY(){return this.#n!==null?this.#n:this.#t("isTTY",!1)}set isTTY(e){this.#n=e}get rows(){return this.#t("rows")}get columns(){return this.#t("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(e){this._src=e}pipe(e,n){return this._dest=e,super.pipe(e,n)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(e){if(this.muted){if(!this.replace)return!0;if(e.match(/^\u001b/))return e.indexOf(this._prompt)===0&&(e=e.slice(this._prompt.length),e=e.replace(/./g,this.replace),e=this._prompt+e),this._hadControl=!0,this.emit("data",e);this._prompt&&this._hadControl&&e.indexOf(this._prompt)===0&&(this._hadControl=!1,this.emit("data",this._prompt),e=e.slice(this._prompt.length)),e=e.toString().replace(/./g,this.replace)}this.emit("data",e)}end(e){this.muted&&(e&&this.replace?e=e.toString().replace(/./g,this.replace):e=null),e&&this.emit("data",e),this.emit("end")}destroy(...e){return this.#e("destroy",...e)}destroySoon(...e){return this.#e("destroySoon",...e)}close(...e){return this.#e("close",...e)}};Qt.exports=We});var Xt=v((xu,Xe)=>{"use strict";var E=Xe.exports;Xe.exports.default=E;var b="\x1B[",ue="\x1B]",ee="\x07",be=";",Jt=process.env.TERM_PROGRAM==="Apple_Terminal";E.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?b+(t+1)+"G":b+(e+1)+";"+(t+1)+"H"};E.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let n="";return t<0?n+=b+-t+"D":t>0&&(n+=b+t+"C"),e<0?n+=b+-e+"A":e>0&&(n+=b+e+"B"),n};E.cursorUp=(t=1)=>b+t+"A";E.cursorDown=(t=1)=>b+t+"B";E.cursorForward=(t=1)=>b+t+"C";E.cursorBackward=(t=1)=>b+t+"D";E.cursorLeft=b+"G";E.cursorSavePosition=Jt?"\x1B7":b+"s";E.cursorRestorePosition=Jt?"\x1B8":b+"u";E.cursorGetPosition=b+"6n";E.cursorNextLine=b+"E";E.cursorPrevLine=b+"F";E.cursorHide=b+"?25l";E.cursorShow=b+"?25h";E.eraseLines=t=>{let e="";for(let n=0;n<t;n++)e+=E.eraseLine+(n<t-1?E.cursorUp():"");return t&&(e+=E.cursorLeft),e};E.eraseEndLine=b+"K";E.eraseStartLine=b+"1K";E.eraseLine=b+"2K";E.eraseDown=b+"J";E.eraseUp=b+"1J";E.eraseScreen=b+"2J";E.scrollUp=b+"S";E.scrollDown=b+"T";E.clearScreen="\x1Bc";E.clearTerminal=process.platform==="win32"?`${E.eraseScreen}${b}0f`:`${E.eraseScreen}${b}3J${b}H`;E.beep=ee;E.link=(t,e)=>[ue,"8",be,be,e,ee,t,ue,"8",be,be,ee].join("");E.image=(t,e={})=>{let n=`${ue}1337;File=inline=1`;return e.width&&(n+=`;width=${e.width}`),e.height&&(n+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(n+=";preserveAspectRatio=0"),n+":"+t.toString("base64")+ee};E.iTerm={setCwd:(t=process.cwd())=>`${ue}50;CurrentDir=${t}${ee}`,annotation:(t,e={})=>{let n=`${ue}1337;`,r=typeof e.x<"u",u=typeof e.y<"u";if((r||u)&&!(r&&u&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),n+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?n+=(r?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):n+=t,n+ee}}});var on=v((ni,ar)=>{ar.exports={name:"@under_koen/bsm",version:"1.6.2",description:"BSM (Basic Script Manager) is a useful tool that enables you to create clear and concise scripts without cluttering your `package.json` file.",license:"MIT",author:"Koen van Staveren <koen@underkoen.nl>",homepage:"https://github.com/UnderKoen/bsm#readme",repository:{type:"git",url:"https://github.com/UnderKoen/bsm.git"},bugs:{url:"https://github.com/UnderKoen/bsm/issues"},main:"dist/index.js",bin:{bsm:"./dist/index.js"},files:["dist"],scripts:{build:"bsm","build:dev":"bsm","build:prod":"bsm","build:watch":"bsm",lint:"bsm",prettier:"bsm",prepublishOnly:"bsm build.prod",test:"bsm","test:cov":"bsm test.cov"},devDependencies:{"@eslint/js":"^9.21.0","@inquirer/core":"^10.1.7","@semantic-release/changelog":"^6.0.3","@semantic-release/exec":"^7.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^11.0.1","@types/minimist":"^1.2.5","@types/node":"^22.13.9","@types/sinon":"^17.0.4","@typescript-eslint/eslint-plugin":"^8.26.0","@typescript-eslint/parser":"^8.26.0","@under_koen/bsm":"^1.5.0",c8:"^10.1.3","ci-info":"^4.1.0","cpy-cli":"^5.0.0",defu:"^6.1.4",esbuild:"^0.25.0",eslint:"^9.21.0","eslint-config-prettier":"^10.0.2",globals:"^16.0.0",minimist:"^1.2.8",prettier:"^3.5.3","prettier-package-json":"^2.8.0",rimraf:"^6.0.1","semantic-release":"^24.2.3",sinon:"^19.0.2",tsm:"^2.3.0",typescript:"^5.8.2","typescript-eslint":"^8.26.0",uvu:"^0.5.6"},keywords:["script","scripting"]}});var sn=v((ui,fr)=>{fr.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var cn=v(P=>{"use strict";var Dn=sn(),w=process.env;Object.defineProperty(P,"_vendors",{value:Dn.map(function(t){return t.constant})});P.name=null;P.isPR=null;P.id=null;Dn.forEach(function(t){let n=(Array.isArray(t.env)?t.env:[t.env]).every(function(r){return ln(r)});P[t.constant]=n,n&&(P.name=t.name,P.isPR=pr(t),P.id=t.constant)});P.isCI=!!(w.CI!=="false"&&(w.BUILD_ID||w.BUILD_NUMBER||w.CI||w.CI_APP_ID||w.CI_BUILD_ID||w.CI_BUILD_NUMBER||w.CI_NAME||w.CONTINUOUS_INTEGRATION||w.RUN_ID||P.name));function ln(t){return typeof t=="string"?!!w[t]:"env"in t?w[t.env]&&w[t.env].includes(t.includes):"any"in t?t.any.some(function(e){return!!w[e]}):Object.keys(t).every(function(e){return w[e]===t[e]})}function pr(t){switch(typeof t.pr){case"string":return!!w[t.pr];case"object":return"env"in t.pr?"any"in t.pr?t.pr.any.some(function(e){return w[t.pr.env]===e}):t.pr.env in w&&w[t.pr.env]!==t.pr.ne:"any"in t.pr?t.pr.any.some(function(e){return!!w[e]}):ln(t.pr);default:return null}}});var mr={};An(mr,{main:()=>En});module.exports=wn(mr);var gn=x(st());function Se(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function xe(t,e,n=".",r){if(!Se(e))return xe(t,{},n,r);let u=Object.assign({},e);for(let i in t){if(i==="__proto__"||i==="constructor")continue;let o=t[i];o!=null&&(r&&r(u,i,o,n)||(Array.isArray(o)&&Array.isArray(u[i])?u[i]=[...o,...u[i]]:Se(o)&&Se(u[i])?u[i]=xe(o,u[i],(n?`${n}.`:"")+i.toString(),r):u[i]=o))}return u}function Re(t){return(...e)=>e.reduce((n,r)=>xe(n,r,"",t),{})}var Dt=Re(),Fr=Re((t,e,n)=>{if(t[e]!==void 0&&typeof n=="function")return t[e]=n(t[e]),!0}),Cr=Re((t,e,n)=>{if(Array.isArray(t[e])&&typeof n=="function")return t[e]=n(t[e]),!0});var Sn=Object.freeze({scripts:{},config:{defaultHelpBehavior:"help",idempotency:{location:"./node_modules/.cache/bsm/idempotency",useFileContent:!1}}}),_=class{static getSource(e){return Array.isArray(e)?e[0]:e}static async loadExtensions(e){return!Object.hasOwn(e,"extends")||!e.extends?[]:(await Promise.all([...e.extends].map(n=>this.loadFile(n,!1)))).filter(n=>n!==void 0)}static async loadFile(e,n=!0){var u,i;if(!e)return;let r=this.getSource(e);try{r=require.resolve(r,{paths:[process.cwd()]});let o=require(r);typeof o=="function"&&(o=await o(...Array.isArray(e)?e.slice(1):[]));let s=await this.loadExtensions(o);return Dt(o,...s,Sn)}catch(o){let s=o,D=(i=(u=s.requireStack)==null?void 0:u[0])==null?void 0:i.replaceAll("\\","/");if(s.code==="MODULE_NOT_FOUND"&&(D!=null&&D.includes("bsm/dist/index.js"))){if(n)return;console.error(`\x1B[31mCannot find config '${r}' to extend\x1B[0m`),process.exit(1)}else console.error(o),Array.isArray(e)&&(e=e[0]),console.error(`\x1B[31mError loading config '${e}'\x1B[0m`),process.exit(1)}}static async load(e){let n=[e.config,process.env.BSM_CONFIG,"./package.scripts.js","./package.scripts.json"].filter(r=>r!==void 0);for(let r of n){let u=await this.loadFile(r);if(u)return process.env.BSM_CONFIG=r,this._config=u,u}console.error(`\x1B[31mCannot find config ${n.map(r=>`'${r}'`).join(" or ")}\x1B[0m`),process.exit(1)}static _config;static get config(){if(this._config)return this._config;throw new Error("Config not loaded")}};var se=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e==null?void 0:e.cause}},De=class extends Error{name="CancelPromptError";message="Prompt was canceled"},le=class extends Error{name="ExitPromptError"},ce=class extends Error{name="HookError"},ae=class extends Error{name="ValidationError"};var fe=require("node:async_hooks");var lt=new fe.AsyncLocalStorage;function xn(t){return{rl:t,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function ct(t,e){let n=xn(t);return lt.run(n,()=>{function r(u){n.handleChange=()=>{n.index=0,u()},n.handleChange()}return e(r)})}function W(){let t=lt.getStore();if(!t)throw new ce("[Inquirer] Hook functions can only be called from within a prompt");return t}function Le(){return W().rl}function Ie(t){let e=(...n)=>{let r=W(),u=!1,i=r.handleChange;r.handleChange=()=>{u=!0};let o=t(...n);return u&&i(),r.handleChange=i,o};return fe.AsyncResource.bind(e)}function z(t){let e=W(),{index:n}=e,r={get(){return e.hooks[n]},set(i){e.hooks[n]=i},initialized:n in e.hooks},u=t(r);return e.index++,u}function at(){W().handleChange()}var V={queue(t){let e=W(),{index:n}=e;e.hooksEffect.push(()=>{var u,i;(i=(u=e.hooksCleanup)[n])==null||i.call(u);let r=t(Le());if(r!=null&&typeof r!="function")throw new ae("useEffect return value must be a cleanup function or nothing.");e.hooksCleanup[n]=r})},run(){let t=W();Ie(()=>{t.hooksEffect.forEach(e=>{e()}),t.hooksEffect.length=0})()},clearAll(){let t=W();t.hooksCleanup.forEach(e=>{e==null||e()}),t.hooksEffect.length=0,t.hooksCleanup.length=0}};function N(t){return z(e=>{let n=u=>{e.get()!==u&&(e.set(u),at())};if(e.initialized)return[e.get(),n];let r=typeof t=="function"?t():t;return e.set(r),[r,n]})}function pe(t,e){z(n=>{let r=n.get();(!Array.isArray(r)||e.some((i,o)=>!Object.is(i,r[o])))&&V.queue(t),n.set(e)})}var T=x(dt(),1);var U=x(require("node:process"),1);function Ln(){return U.default.platform!=="win32"?U.default.env.TERM!=="linux":!!U.default.env.WT_SESSION||!!U.default.env.TERMINUS_SUBLIME||U.default.env.ConEmuTask==="{cmd::Cmder}"||U.default.env.TERM_PROGRAM==="Terminus-Sublime"||U.default.env.TERM_PROGRAM==="vscode"||U.default.env.TERM==="xterm-256color"||U.default.env.TERM==="alacritty"||U.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var mt={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},gt={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},In={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Tn={...mt,...gt},_n={...mt,...In},Un=Ln(),On=Un?Tn:_n,_e=On,_r=Object.entries(gt);var Pn={prefix:{idle:T.default.blue("?"),done:T.default.green(_e.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(t=>T.default.yellow(t))},style:{answer:T.default.cyan,message:T.default.bold,error:t=>T.default.red(`> ${t}`),defaultAnswer:t=>T.default.dim(`(${t})`),help:T.default.dim,highlight:T.default.cyan,key:t=>T.default.cyan(T.default.bold(`<${t}>`))}};function Ue(t,e){return z(n=>{let r=n.get();if(!r||r.dependencies.length!==e.length||r.dependencies.some((u,i)=>u!==e[i])){let u=t();return n.set({value:u,dependencies:e}),u}return r.value})}function de(t){return N({current:t})[0]}function Oe(t){let e=de(t);e.current=t,pe(n=>{let r=!1,u=Ie((i,o)=>{r||e.current(o,n)});return n.input.on("keypress",u),()=>{r=!0,n.input.removeListener("keypress",u)}},[])}var Vt=x(Ft(),1),Kt=x(Wt(),1);function Ee(t,e){return t.split(`
9
9
  `).flatMap(n=>(0,Kt.default)(n,e,{trim:!1,hard:!0}).split(`
10
10
  `).map(r=>r.trimEnd())).join(`
11
- `)}function qe(){return(0,Vt.default)({defaultWidth:80,output:Le().output})}var nn=x(require("node:readline"),1),rn=require("node:async_hooks"),un=x(Yt(),1);var K=[];K.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&K.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&K.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Ce=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",Ve=Symbol.for("signal-exit emitter"),Ke=globalThis,sr=Object.defineProperty.bind(Object),Qe=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Ke[Ve])return Ke[Ve];sr(Ke,Ve,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,n){this.listeners[e].push(n)}removeListener(e,n){let r=this.listeners[e],u=r.indexOf(n);u!==-1&&(u===0&&r.length===1?r.length=0:r.splice(u,1))}emit(e,n,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let u=!1;for(let i of this.listeners[e])u=i(n,r)===!0||u;return e==="exit"&&(u=this.emit("afterExit",n,r)||u),u}},Fe=class{},Dr=t=>({onExit(e,n){return t.onExit(e,n)},load(){return t.load()},unload(){return t.unload()}}),Ye=class extends Fe{onExit(){return()=>{}}load(){}unload(){}},ze=class extends Fe{#n=Je.platform==="win32"?"SIGINT":"SIGHUP";#t=new Qe;#e;#i;#o;#u={};#r=!1;constructor(e){super(),this.#e=e,this.#u={};for(let n of K)this.#u[n]=()=>{let r=this.#e.listeners(n),{count:u}=this.#t,i=e;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(u+=i.__signal_exit_emitter__.count),r.length===u){this.unload();let o=this.#t.emit("exit",null,n),s=n==="SIGHUP"?this.#n:n;o||e.kill(e.pid,s)}};this.#o=e.reallyExit,this.#i=e.emit}onExit(e,n){if(!Ce(this.#e))return()=>{};this.#r===!1&&this.load();let r=n!=null&&n.alwaysLast?"afterExit":"exit";return this.#t.on(r,e),()=>{this.#t.removeListener(r,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#r){this.#r=!0,this.#t.count+=1;for(let e of K)try{let n=this.#u[e];n&&this.#e.on(e,n)}catch{}this.#e.emit=(e,...n)=>this.#D(e,...n),this.#e.reallyExit=e=>this.#s(e)}}unload(){this.#r&&(this.#r=!1,K.forEach(e=>{let n=this.#u[e];if(!n)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,n)}catch{}}),this.#e.emit=this.#i,this.#e.reallyExit=this.#o,this.#t.count-=1)}#s(e){return Ce(this.#e)?(this.#e.exitCode=e||0,this.#t.emit("exit",this.#e.exitCode,null),this.#o.call(this.#e,this.#e.exitCode)):0}#D(e,...n){let r=this.#i;if(e==="exit"&&Ce(this.#e)){typeof n[0]=="number"&&(this.#e.exitCode=n[0]);let u=r.call(this.#e,e,...n);return this.#t.emit("exit",this.#e.exitCode,null),u}else return r.call(this.#e,e,...n)}},Je=globalThis.process,{onExit:zt,load:wu,unload:vu}=Dr(Ce(Je)?new ze(Je):new Ye);var tn=require("node:util"),H=x(Xt(),1);var Zt=t=>t.split(`
11
+ `)}function qe(){return(0,Vt.default)({defaultWidth:80,output:Le().output})}var nn=x(require("node:readline"),1),rn=require("node:async_hooks"),un=x(Yt(),1);var K=[];K.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&K.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&K.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Fe=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",Ve=Symbol.for("signal-exit emitter"),Ke=globalThis,sr=Object.defineProperty.bind(Object),Qe=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Ke[Ve])return Ke[Ve];sr(Ke,Ve,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,n){this.listeners[e].push(n)}removeListener(e,n){let r=this.listeners[e],u=r.indexOf(n);u!==-1&&(u===0&&r.length===1?r.length=0:r.splice(u,1))}emit(e,n,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let u=!1;for(let i of this.listeners[e])u=i(n,r)===!0||u;return e==="exit"&&(u=this.emit("afterExit",n,r)||u),u}},Ce=class{},Dr=t=>({onExit(e,n){return t.onExit(e,n)},load(){return t.load()},unload(){return t.unload()}}),Ye=class extends Ce{onExit(){return()=>{}}load(){}unload(){}},ze=class extends Ce{#n=Je.platform==="win32"?"SIGINT":"SIGHUP";#t=new Qe;#e;#i;#o;#u={};#r=!1;constructor(e){super(),this.#e=e,this.#u={};for(let n of K)this.#u[n]=()=>{let r=this.#e.listeners(n),{count:u}=this.#t,i=e;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(u+=i.__signal_exit_emitter__.count),r.length===u){this.unload();let o=this.#t.emit("exit",null,n),s=n==="SIGHUP"?this.#n:n;o||e.kill(e.pid,s)}};this.#o=e.reallyExit,this.#i=e.emit}onExit(e,n){if(!Fe(this.#e))return()=>{};this.#r===!1&&this.load();let r=n!=null&&n.alwaysLast?"afterExit":"exit";return this.#t.on(r,e),()=>{this.#t.removeListener(r,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#r){this.#r=!0,this.#t.count+=1;for(let e of K)try{let n=this.#u[e];n&&this.#e.on(e,n)}catch{}this.#e.emit=(e,...n)=>this.#D(e,...n),this.#e.reallyExit=e=>this.#s(e)}}unload(){this.#r&&(this.#r=!1,K.forEach(e=>{let n=this.#u[e];if(!n)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,n)}catch{}}),this.#e.emit=this.#i,this.#e.reallyExit=this.#o,this.#t.count-=1)}#s(e){return Fe(this.#e)?(this.#e.exitCode=e||0,this.#t.emit("exit",this.#e.exitCode,null),this.#o.call(this.#e,this.#e.exitCode)):0}#D(e,...n){let r=this.#i;if(e==="exit"&&Fe(this.#e)){typeof n[0]=="number"&&(this.#e.exitCode=n[0]);let u=r.call(this.#e,e,...n);return this.#t.emit("exit",this.#e.exitCode,null),u}else return r.call(this.#e,e,...n)}},Je=globalThis.process,{onExit:zt,load:wu,unload:vu}=Dr(Fe(Je)?new ze(Je):new Ye);var tn=require("node:util"),H=x(Xt(),1);var Zt=t=>t.split(`
12
12
  `).length,lr=t=>t.split(`
13
13
  `).pop()??"";function en(t){return t>0?H.default.cursorDown(t):""}var ie=class{rl;height=0;extraLinesUnderPrompt=0;cursorPos;constructor(e){this.rl=e,this.rl=e,this.cursorPos=e.getCursorPos()}write(e){this.rl.output.unmute(),this.rl.output.write(e),this.rl.output.mute()}render(e,n=""){let r=lr(e),u=(0,tn.stripVTControlCharacters)(r),i=u;this.rl.line.length>0&&(i=i.slice(0,-this.rl.line.length)),this.rl.setPrompt(i),this.cursorPos=this.rl.getCursorPos();let o=qe();e=Ee(e,o),n=Ee(n,o),u.length%o===0&&(e+=`
14
14
  `);let s=e+(n?`
15
15
  `+n:""),l=Math.floor(u.length/o)-this.cursorPos.rows+(n?Zt(n):0);l>0&&(s+=H.default.cursorUp(l)),s+=H.default.cursorTo(this.cursorPos.cols),this.write(en(this.extraLinesUnderPrompt)+H.default.eraseLines(this.height)+s),this.extraLinesUnderPrompt=l,this.height=Zt(s)}checkCursorPos(){let e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(H.default.cursorTo(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt("");let n=en(this.extraLinesUnderPrompt);n+=e?H.default.eraseLines(this.height):`
16
- `,n+=H.default.cursorShow,this.write(n),this.rl.close()}};var Be=class extends Promise{static withResolver(){let e,n;return{promise:new Promise((u,i)=>{e=u,n=i}),resolve:e,reject:n}}};function cr(){let t=Error.prepareStackTrace;try{let e=[];return Error.prepareStackTrace=(n,r)=>{let u=r.slice(1);return e=u,u},new Error().stack,e}finally{Error.prepareStackTrace=t}}function Ze(t){var u,i;let n=(i=(u=cr()[1])==null?void 0:u.getFileName)==null?void 0:i.call(u);return(o,s={})=>{let{input:D=process.stdin,signal:l}=s,p=new Set,m=new un.default;m.pipe(s.output??process.stdout);let a=nn.createInterface({terminal:!0,input:D,output:m}),F=new ie(a),{promise:A,resolve:k,reject:L}=Be.withResolver(),S=()=>L(new De);if(l){let B=()=>L(new se({cause:l.reason}));if(l.aborted)return B(),Object.assign(A,{cancel:S});l.addEventListener("abort",B),p.add(()=>l.removeEventListener("abort",B))}p.add(zt((B,f)=>{L(new le(`User force closed the prompt with ${B} ${f}`))}));let j=()=>F.checkCursorPos();return a.input.on("keypress",j),p.add(()=>a.input.removeListener("keypress",j)),ct(a,B=>{let f=rn.AsyncResource.bind(()=>V.clearAll());return a.on("close",f),p.add(()=>a.removeListener("close",f)),B(()=>{try{let g=t(o,M=>{setImmediate(()=>k(M))});if(g===void 0)throw new Error(`Prompt functions must return a string.
17
- at ${n}`);let[R,C]=typeof g=="string"?[g]:g;F.render(R,C),V.run()}catch(g){L(g)}}),Object.assign(A.then(g=>(V.clearAll(),g),g=>{throw V.clearAll(),g}).finally(()=>{p.forEach(g=>g()),F.done({clearContent:!!s.clearPromptOnDone}),m.end()}).then(()=>A),{cancel:S})})}}var O=class t{static printHelp(e,n){let r=n._;if(r.length===0)console.log(`
16
+ `,n+=H.default.cursorShow,this.write(n),this.rl.close()}};var Be=class extends Promise{static withResolver(){let e,n;return{promise:new Promise((u,i)=>{e=u,n=i}),resolve:e,reject:n}}};function cr(){let t=Error.prepareStackTrace;try{let e=[];return Error.prepareStackTrace=(n,r)=>{let u=r.slice(1);return e=u,u},new Error().stack,e}finally{Error.prepareStackTrace=t}}function Ze(t){var u,i;let n=(i=(u=cr()[1])==null?void 0:u.getFileName)==null?void 0:i.call(u);return(o,s={})=>{let{input:D=process.stdin,signal:l}=s,p=new Set,m=new un.default;m.pipe(s.output??process.stdout);let a=nn.createInterface({terminal:!0,input:D,output:m}),C=new ie(a),{promise:A,resolve:k,reject:L}=Be.withResolver(),S=()=>L(new De);if(l){let B=()=>L(new se({cause:l.reason}));if(l.aborted)return B(),Object.assign(A,{cancel:S});l.addEventListener("abort",B),p.add(()=>l.removeEventListener("abort",B))}p.add(zt((B,f)=>{L(new le(`User force closed the prompt with ${B} ${f}`))}));let j=()=>C.checkCursorPos();return a.input.on("keypress",j),p.add(()=>a.input.removeListener("keypress",j)),ct(a,B=>{let f=rn.AsyncResource.bind(()=>V.clearAll());return a.on("close",f),p.add(()=>a.removeListener("close",f)),B(()=>{try{let g=t(o,M=>{setImmediate(()=>k(M))});if(g===void 0)throw new Error(`Prompt functions must return a string.
17
+ at ${n}`);let[R,F]=typeof g=="string"?[g]:g;C.render(R,F),V.run()}catch(g){L(g)}}),Object.assign(A.then(g=>(V.clearAll(),g),g=>{throw V.clearAll(),g}).finally(()=>{p.forEach(g=>g()),C.done({clearContent:!!s.clearPromptOnDone}),m.end()}).then(()=>A),{cancel:S})})}}var O=class t{static printHelp(e,n){let r=n._;if(r.length===0)console.log(`
18
18
  \x1B[1mAvailable commands:\x1B[0m`),t.printCommands(e.scripts);else for(let u of r){console.log(`
19
- \x1B[1mAvailable commands: \x1B[90m${u}\x1B[0m`);let i=u.split("."),o=[[e.scripts,[],i]];for(;o.length>0;){let s=o.shift();if(s[2].length===0)t.printCommands(s[0],s[1]);else if(s[2][0]==="*"){if(typeof s[0]=="object")if(Array.isArray(s[0]))for(let D=0;D<s[0].length;D++)o.push([s[0][D],[...s[1],D.toString()],[]]);else for(let D in s[0])Object.hasOwn(s[0],D)&&o.push([s[0][D],[...s[1],D],s[2].slice(1)])}else{let D=s[2][0];if(typeof s[0]=="object")if(Array.isArray(s[0])){let l=parseInt(D);o.push([s[0][l],[...s[1],l.toString()],s[2].slice(1)])}else o.push([s[0][D],[...s[1],D],s[2].slice(1)])}}}process.exit(0)}static printCommands(e,n=[],r=!0){if(Array.isArray(e))e.forEach((u,i)=>{t.printCommand(u,[...n,i.toString()])});else if(typeof e=="object"){r&&n.length>0&&t.printCommand(e,[...n]);for(let u in e)Object.hasOwn(e,u)&&t.printCommand(e[u],[...n,u])}else t.printCommand(e,n)}static printCommand(e,n){if(e===void 0){console.error(`\x1B[31mScript '${n.join(".")}' not found\x1B[0m`);return}let r=t.getCommandHelp(e,n);r&&console.log(r)}static getCommandHelp(e,n){if(n[n.length-1]==="$description")return;let r=`\x1B[92m${n.join(".")}\x1B[0m\x1B[90m - \x1B[0m`,u;return typeof e=="string"?u=e:typeof e=="function"?u="\x1B[90m<function>\x1B[0m":Array.isArray(e)?u=`\x1B[90m[${e.length}]\x1B[0m`:Object.hasOwn(e,"$description")?u=`\x1B[90m${e.$description}\x1B[0m`:u=`\x1B[90m{${Object.keys(e).join(", ")}}\x1B[0m`,`${r}${u}`}static printVersion(){let e=on();console.log(e.version),process.exit(0)}};var pn=x(require("node:child_process")),hn=x(cn());var dn=x(require("path")),ye=x(require("fs"));var an=require("node:crypto");var G=x(require("fs")),fn=x(require("path")),$=class{static get useFileContent(){var e,n;return((n=(e=_.config.config)==null?void 0:e.idempotency)==null?void 0:n.useFileContent)??!1}static get location(){var e,n;return((n=(e=_.config.config)==null?void 0:e.idempotency)==null?void 0:n.location)??"./node_modules/.cache/bsm/idempotency"}static updateHashForFile(e,n){try{if(this.useFileContent){let r=G.default.readFileSync(n);e.update(r)}else{let r=G.default.lstatSync(n);e.update(r.ctimeMs.toString()),e.update(r.mtimeMs.toString())}}catch{}}static updateHashForDir(e,n){try{G.default.readdirSync(n,{withFileTypes:!0,recursive:!0}).forEach(r=>{if(r.name==null)return;let u=fn.default.join(r.path??n,r.name).replace(/\\/g,"/");e.update(u),r.isFile()&&this.updateHashForFile(e,u)})}catch{}}static calculateIdempotencyHash(e,n){var i;let r=[];if(Array.isArray(e))r.push(...e);else if(typeof e=="string")r.push(e);else for(let o of Object.values(e))Array.isArray(o)?r.push(...o):r.push(o);let u=(0,an.createHash)("sha256");for(let o of r){let s=o.split(":")[0],D=o.substring(s.length+1);switch(s){case"static":u.update(D);break;case"env":u.update(D),u.update(((i=n==null?void 0:n.env)==null?void 0:i[D])??process.env[D]??Buffer.of());break;case"file":this.updateHashForFile(u,D);break;case"dir":this.updateHashForDir(u,D);break;default:console.log(`\x1B[33m[Idempotency]\x1B[0m Unknown type: ${s}, using value as static`),u.update(o)}}return u.digest("hex")}static saveIdempotencyHash(e,n){let r=n.join("."),u=`${this.location}/${r}.hash`;G.default.mkdirSync(this.location,{recursive:!0}),G.default.writeFileSync(u,e)}static getSavedIdempotencyHash(e){let n=e.join("."),r=`${this.location}/${n}.hash`;if(G.default.existsSync(r))return G.default.readFileSync(r,"utf-8")}static checkIdempotency(e,n,r){let u=e.$idempotency,i=this.calculateIdempotencyHash(u,r);return this.getSavedIdempotencyHash(n)===i}static saveIdempotency(e,n){let r=e.$idempotency,u=this.calculateIdempotencyHash(r);this.saveIdempotencyHash(u,n)}static hasIdempotencyEnabled(e){return Object.hasOwn(e,"$idempotency")?Object.hasOwn(e,"$idempotencyEnabled")?!!e.$idempotencyEnabled:!0:!1}};var q=class extends Error{constructor(n,r){super();this.code=n;this.script=r}},te=class extends q{constructor(n,r){super(1,r);this.func=n;this.script=r}};var Q=class t{static async run(e){let n=_.config;await t.runScript(n.scripts,e.split("."),[],{})}static async runScript(e,n,r,u){typeof e=="function"?await t.executeFunction(e,n,r,u):typeof e=="string"?await t.executeString(e,n,r,u):typeof e=="object"?Array.isArray(e)?await t.executeArray(e,n,r,u):await t.executeObject(e,n,r,u):await t.notFound(r,u)}static async notFound(e,n,r){var u;if(!n.ignoreNotFound){if(r){let i=e[e.length-1],o=e.slice(0,-1);if(o.length===0?console.error(`\x1B[31mScript '${i}' does not exist\x1B[0m`):console.error(`\x1B[31mScript '${o.join(".")}' does not have a '${i}' script\x1B[0m`),((u=_.config.config)==null?void 0:u.defaultHelpBehavior)==="interactive"){let s=await Y.selectScript(_.config,{_:[e.join(".")]});await this.run(s[0]),process.exit(0)}else console.log(),Object.hasOwn(r,"$description")&&(O.printCommand(r,o),console.log()),console.log("\x1B[1mTry one of the following:\x1B[0m"),O.printCommands(r,o,!1)}else console.error(`\x1B[31mScript '${e.join(".")}' not found\x1B[0m`);process.exit(127)}}static async executeFunction(e,n,r,u){var s;console.log(`> \x1B[93mExecuting JavaScript function\x1B[0m \x1B[90m(${[...r].join(".")})\x1B[0m`);let i,o=process.env;try{process.env={...process.env,...u.env},i=await e.call(null,process.argv)}catch(D){throw D instanceof Error&&(D.stack=(s=D.stack)==null?void 0:s.split(" at executeFunction")[0]),new te(D,r.join("."))}finally{process.env=o}if(i==null){n.length>0&&await t.notFound([...r,...n],u);return}await t.runScript(i,n,r,{...u,excludeArgs:!0})}static async executeString(e,n,r,u){if(n.length>0){await t.notFound([...r,...n],u);return}!u.excludeArgs&&process.argv.length&&(e+=" "+process.argv.join(" ")),console.log(`> ${e} \x1B[90m(${r.join(".")})\x1B[0m`),process.env.BSM_LOG_FILE&&ye.default.appendFileSync(process.env.BSM_LOG_FILE,`${new Date().toISOString()} ${e} ${r.join(".")} ${process.cwd()}
20
- `),e!==""&&(e=e.replace(/bsm ~/g,"bsm \\~"),await new Promise((i,o)=>{pn.default.spawn(e,[],{stdio:"inherit",shell:!0,env:{...process.env,...u.env,BSM_PATH:r.slice(0,-1).join("."),BSM_SCRIPT:r.join(".")}}).on("close",D=>{D===0?i():o(new q(D,r.join(".")))})}))}static async executeArray(e,n,r,u){if(n.length===0||n[0]==="*"){for(let i=0;i<e.length;i++)await t.runScript(e[i],n.slice(1),[...r,i.toString()],{...u,ignoreNotFound:n[0]==="*"?!0:u.ignoreNotFound});return}else{let i=n[0],o=e[parseInt(i)];if(o===void 0){let s=t.subscriptWithAlias(e,i);if(s){await t.runScript(s[1],n.slice(1),[...r,s[0]],u);return}else{await t.notFound([...r,i],u,e);return}}await t.runScript(o,n.slice(1),[...r,i],u)}}static shouldRun(e,n,r,u){return $.hasIdempotencyEnabled(e)&&$.checkIdempotency(e,r,u)?(console.log(`\x1B[90mNot running ${[...r,...n].join(".")} because the idempotency hash is the same\x1B[0m`),!1):!0}static async executeObject(e,n,r,u){try{if(Object.hasOwn(e,"$env")&&(u.env={...u.env,...t.getEnv(e.$env)}),!t.shouldRun(e,n,r,u))return;if(await t.executeHook(e,"_pre",r,u),n.length===0)await t.runObject(e,r,u);else if(n[0]==="*")for(let i in e)i.startsWith("_")||i.startsWith("$")||Object.hasOwn(e,i)&&await t.runScript(e[i],n.slice(1),[...r,i],{...u,ignoreNotFound:!0});else{let i=n[0];if(Object.hasOwn(e,i))await t.runScript(e[i],n.slice(1),[...r,i],u);else{let o=t.subscriptWithAlias(e,i);if(o)await t.runScript(o[1],n.slice(1),[...r,o[0]],u);else{await t.notFound([...r,i],u,e);return}}}await t.executeHook(e,"_post",r,u),$.hasIdempotencyEnabled(e)&&$.saveIdempotency(e,r)}catch(i){if(i instanceof q?process.env.BSM_ERROR=i.code.toString():process.env.BSM_ERROR="1",await t.executeHook(e,"_onError",r,u),!await t.executeHook(e,"_catch",r,u))throw i;$.hasIdempotencyEnabled(e)&&$.saveIdempotency(e,r)}finally{await t.executeHook(e,"_finally",r,u)}}static subscriptWithAlias(e,n){for(let r of Object.entries(e)){let u=r[1];if(typeof u=="object"&&!Array.isArray(u)&&Object.hasOwn(u,"$alias")){let i=u.$alias;if(typeof i=="string"){if(i===n)return r}else if(Array.isArray(i)&&i.includes(n))return r}}}static getEnv(e){if(typeof e=="string"){if(e==="")return{};if(e.startsWith("file:")){let n=dn.default.join(process.cwd(),e.slice(5));if(!ye.default.existsSync(n))return console.error(`\x1B[31mFile '${n}' does not exist\x1B[0m
19
+ \x1B[1mAvailable commands: \x1B[90m${u}\x1B[0m`);let i=u.split("."),o=[[e.scripts,[],i]];for(;o.length>0;){let s=o.shift();if(s[2].length===0)t.printCommands(s[0],s[1]);else if(s[2][0]==="*"){if(typeof s[0]=="object")if(Array.isArray(s[0]))for(let D=0;D<s[0].length;D++)o.push([s[0][D],[...s[1],D.toString()],[]]);else for(let D in s[0])Object.hasOwn(s[0],D)&&o.push([s[0][D],[...s[1],D],s[2].slice(1)])}else{let D=s[2][0];if(typeof s[0]=="object")if(Array.isArray(s[0])){let l=parseInt(D);o.push([s[0][l],[...s[1],l.toString()],s[2].slice(1)])}else o.push([s[0][D],[...s[1],D],s[2].slice(1)])}}}process.exit(0)}static printCommands(e,n=[],r=!0){if(Array.isArray(e))e.forEach((u,i)=>{t.printCommand(u,[...n,i.toString()])});else if(typeof e=="object"){r&&n.length>0&&t.printCommand(e,[...n]);for(let u in e)Object.hasOwn(e,u)&&t.printCommand(e[u],[...n,u])}else t.printCommand(e,n)}static printCommand(e,n){if(e===void 0){console.error(`\x1B[31mScript '${n.join(".")}' not found\x1B[0m`);return}let r=t.getCommandHelp(e,n);r&&console.log(r)}static getCommandHelp(e,n){if(n[n.length-1]==="$description")return;let r=`\x1B[92m${n.join(".")}\x1B[0m\x1B[90m - \x1B[0m`,u;return typeof e=="string"?u=e:typeof e=="function"?u="\x1B[90m<function>\x1B[0m":Array.isArray(e)?u=`\x1B[90m[${e.length}]\x1B[0m`:Object.hasOwn(e,"$description")?u=`\x1B[90m${e.$description}\x1B[0m`:u=`\x1B[90m{${Object.keys(e).join(", ")}}\x1B[0m`,`${r}${u}`}static printVersion(){let e=on();console.log(e.version),process.exit(0)}};var pn=x(require("node:child_process")),hn=x(cn());var dn=x(require("path")),ye=x(require("fs"));var an=require("node:crypto");var G=x(require("fs")),fn=x(require("path")),$=class{static get useFileContent(){var e,n;return((n=(e=_.config.config)==null?void 0:e.idempotency)==null?void 0:n.useFileContent)??!1}static get location(){var e,n;return((n=(e=_.config.config)==null?void 0:e.idempotency)==null?void 0:n.location)??"./node_modules/.cache/bsm/idempotency"}static updateHashForFile(e,n){try{if(this.useFileContent){let r=G.default.readFileSync(n);e.update(r)}else{let r=G.default.lstatSync(n);e.update(r.ctimeMs.toString()),e.update(r.mtimeMs.toString())}}catch{}}static updateHashForDir(e,n){try{G.default.readdirSync(n,{withFileTypes:!0,recursive:!0}).forEach(r=>{if(r.name==null)return;let u=fn.default.join(r.path??n,r.name).replace(/\\/g,"/");e.update(u),r.isFile()&&this.updateHashForFile(e,u)})}catch{}}static calculateIdempotencyHash(e,n){var i;let r=[];if(Array.isArray(e))r.push(...e);else if(typeof e=="string")r.push(e);else for(let o of Object.values(e))Array.isArray(o)?r.push(...o):r.push(o);let u=(0,an.createHash)("sha256");for(let o of r){let s=o.split(":")[0],D=o.substring(s.length+1);switch(s){case"static":u.update(D);break;case"env":u.update(D),u.update(((i=n==null?void 0:n.env)==null?void 0:i[D])??process.env[D]??Buffer.of());break;case"file":this.updateHashForFile(u,D);break;case"dir":this.updateHashForDir(u,D);break;default:console.log(`\x1B[33m[Idempotency]\x1B[0m Unknown type: ${s}, using value as static`),u.update(o)}}return u.digest("hex")}static getFileName(e){let n=e.join(".");return`${this.location}/${n}.hash`.replaceAll("*","__all__")}static saveIdempotencyHash(e,n){G.default.mkdirSync(this.location,{recursive:!0}),G.default.writeFileSync(this.getFileName(n),e)}static getSavedIdempotencyHash(e){let n=this.getFileName(e);if(G.default.existsSync(n))return G.default.readFileSync(n,"utf-8")}static checkIdempotency(e,n,r){let u=e.$idempotency,i=this.calculateIdempotencyHash(u,r);return this.getSavedIdempotencyHash(n)===i}static saveIdempotency(e,n){let r=e.$idempotency,u=this.calculateIdempotencyHash(r);this.saveIdempotencyHash(u,n)}static hasIdempotencyEnabled(e){return process.env.BSM_DISABLE_IDEMPOTENCY==="true"||!Object.hasOwn(e,"$idempotency")?!1:Object.hasOwn(e,"$idempotencyEnabled")?!!e.$idempotencyEnabled:!0}};var q=class extends Error{constructor(n,r){super();this.code=n;this.script=r}},te=class extends q{constructor(n,r){super(1,r);this.func=n;this.script=r}};var Q=class t{static async run(e){let n=_.config;await t.runScript(n.scripts,e.split("."),[],{})}static async runScript(e,n,r,u){typeof e=="function"?await t.executeFunction(e,n,r,u):typeof e=="string"?await t.executeString(e,n,r,u):typeof e=="object"?Array.isArray(e)?await t.executeArray(e,n,r,u):await t.executeObject(e,n,r,u):await t.notFound(r,u)}static async notFound(e,n,r){var u;if(!n.ignoreNotFound){if(r){let i=e[e.length-1],o=e.slice(0,-1);if(o.length===0?console.error(`\x1B[31mScript '${i}' does not exist\x1B[0m`):console.error(`\x1B[31mScript '${o.join(".")}' does not have a '${i}' script\x1B[0m`),((u=_.config.config)==null?void 0:u.defaultHelpBehavior)==="interactive"){let s=await Y.selectScript(_.config,{_:[e.join(".")]});await this.run(s[0]),process.exit(0)}else console.log(),Object.hasOwn(r,"$description")&&(O.printCommand(r,o),console.log()),console.log("\x1B[1mTry one of the following:\x1B[0m"),O.printCommands(r,o,!1)}else console.error(`\x1B[31mScript '${e.join(".")}' not found\x1B[0m`);process.exit(127)}}static async executeFunction(e,n,r,u){var s;console.log(`> \x1B[93mExecuting JavaScript function\x1B[0m \x1B[90m(${[...r].join(".")})\x1B[0m`);let i,o=process.env;try{process.env={...process.env,...u.env},i=await e.call(null,process.argv)}catch(D){throw D instanceof Error&&(D.stack=(s=D.stack)==null?void 0:s.split(" at executeFunction")[0]),new te(D,r.join("."))}finally{process.env=o}if(i==null){n.length>0&&await t.notFound([...r,...n],u);return}await t.runScript(i,n,r,{...u,excludeArgs:!0})}static async executeString(e,n,r,u){if(n.length>0){await t.notFound([...r,...n],u);return}!u.excludeArgs&&process.argv.length&&(e+=" "+process.argv.join(" ")),console.log(`> ${e} \x1B[90m(${r.join(".")})\x1B[0m`),process.env.BSM_LOG_FILE&&ye.default.appendFileSync(process.env.BSM_LOG_FILE,`${new Date().toISOString()} ${e} ${r.join(".")} ${process.cwd()}
20
+ `),e!==""&&(e=e.replace(/bsm ~/g,"bsm \\~"),await new Promise((i,o)=>{pn.default.spawn(e,[],{stdio:"inherit",shell:!0,env:{...process.env,...u.env,BSM_PATH:r.slice(0,-1).join("."),BSM_SCRIPT:r.join(".")}}).on("close",D=>{D===0?i():o(new q(D,r.join(".")))})}))}static async executeArray(e,n,r,u){if(n.length===0||n[0]==="*"){for(let i=0;i<e.length;i++)await t.runScript(e[i],n.slice(1),[...r,i.toString()],{...u,ignoreNotFound:n[0]==="*"?!0:u.ignoreNotFound});return}else{let i=n[0],o=e[parseInt(i)];if(o===void 0){let s=t.subscriptWithAlias(e,i);if(s){await t.runScript(s[1],n.slice(1),[...r,s[0]],u);return}else{await t.notFound([...r,i],u,e);return}}await t.runScript(o,n.slice(1),[...r,i],u)}}static shouldRun(e,n,r,u){return $.hasIdempotencyEnabled(e)&&$.checkIdempotency(e,[...r,...n],u)?(console.log(`\x1B[90mNot running ${[...r,...n].join(".")} because the idempotency hash is the same\x1B[0m`),!1):!0}static async executeObject(e,n,r,u){try{if(Object.hasOwn(e,"$env")&&(u.env={...u.env,...t.getEnv(e.$env)}),!t.shouldRun(e,n,r,u))return;if(await t.executeHook(e,"_pre",r,u),n.length===0)await t.runObject(e,r,u);else if(n[0]==="*")for(let i in e)i.startsWith("_")||i.startsWith("$")||Object.hasOwn(e,i)&&await t.runScript(e[i],n.slice(1),[...r,i],{...u,ignoreNotFound:!0});else{let i=n[0];if(Object.hasOwn(e,i))await t.runScript(e[i],n.slice(1),[...r,i],u);else{let o=t.subscriptWithAlias(e,i);if(o)await t.runScript(o[1],n.slice(1),[...r,o[0]],u);else{await t.notFound([...r,i],u,e);return}}}await t.executeHook(e,"_post",r,u),$.hasIdempotencyEnabled(e)&&$.saveIdempotency(e,[...r,...n])}catch(i){if(i instanceof q?process.env.BSM_ERROR=i.code.toString():process.env.BSM_ERROR="1",await t.executeHook(e,"_onError",r,u),!await t.executeHook(e,"_catch",r,u))throw i;$.hasIdempotencyEnabled(e)&&$.saveIdempotency(e,[...r,...n])}finally{await t.executeHook(e,"_finally",r,u)}}static subscriptWithAlias(e,n){for(let r of Object.entries(e)){let u=r[1];if(typeof u=="object"&&!Array.isArray(u)&&Object.hasOwn(u,"$alias")){let i=u.$alias;if(typeof i=="string"){if(i===n)return r}else if(Array.isArray(i)&&i.includes(n))return r}}}static getEnv(e){if(typeof e=="string"){if(e==="")return{};if(e.startsWith("file:")){let n=dn.default.join(process.cwd(),e.slice(5));if(!ye.default.existsSync(n))return console.error(`\x1B[31mFile '${n}' does not exist\x1B[0m
21
21
  \x1B[1mRunning script without these environment variables\x1B[0m
22
22
  `),{};let u=ye.default.readFileSync(n,"utf-8").replaceAll("\r","").split(`
23
23
  `).filter(o=>!o.startsWith("#")&&o.trim()!==""),i={};for(let o of u){let D=/^([^=]+)=(['"])?(.+)\2$/g.exec(o);if(D){let l=D[3];D[2]==='"'&&(l=l.replaceAll(/(?<=(?<!\\)(\\\\)*)\\n/g,`
24
24
  `).replaceAll(/(?<=(?<!\\)(\\\\)*)\\t/g," ").replaceAll(/(?<=(?<!\\)(\\\\)*)\\r/g,"\r").replaceAll(/(?<=(?<!\\)(\\\\)*)\\\\/g,"\\")),i[D[1]]=l}}return i}else return console.error(`\x1B[31mCurrently only 'file:' is supported for environment variables\x1B[0m
25
- `),{}}else if(typeof e=="object")if(Array.isArray(e)){let n={};for(let r of e)n={...n,...t.getEnv(r)};return n}else return e;else{let n=e.call(null,process.argv);return n===void 0?{}:t.getEnv(n)}}static async executeHook(e,n,r,u){return Object.hasOwn(e,n)?(await t.runScript(e[n],[],[...r,n],{...u,excludeArgs:!0}),!0):!1}static get _isCI(){return hn.isCI}static get objectScripts(){let e=[`_${process.platform}`,`_${process.arch}`,"_default"];return t._isCI&&e.unshift("_ci"),e}static async runObject(e,n,r){for(let u of t.objectScripts)if(Object.hasOwn(e,u)){await t.runScript(e[u],[],[...n,u],r);return}await t.notFound([...n,"_default"],r,e)}static isExecutable(e){if(typeof e=="function"||typeof e=="string")return!0;if(typeof e!="object")return!1;if(Array.isArray(e))return!0;for(let n of t.objectScripts)if(Object.hasOwn(e,n))return!0;return!1}};var Y=class{static async selectScript(e,n){var s;let u=(((s=n._[0])==null?void 0:s.replace(/^~/,process.env.BSM_PATH??"~"))??"").split("."),i=[],o=e.scripts;for(let D of u){let l;if(Array.isArray(o)?l=o[Number.parseInt(D)]:l=o[D],typeof l!="object")break;i.push([D,o]),o=l}return Ze((D,l)=>{let[p,m]=N(i),[a,F]=N(o),A=Ue(()=>typeof a=="string"||typeof a=="function"?[]:Object.entries(a).map(y=>[y[0],y[1],O.getCommandHelp(y[1],[y[0]])]).filter(y=>y[2]!==void 0),[a,p]),[k,L]=N(0),[S,j]=N(!1),B=A.length,f=A[k][0],g=A[k][1],R=[...p.map(y=>y[0]),f].join("."),C=`
26
- \x1B[1mRun command \xBB \x1B[90m${R}\x1B[0m`;if(S)return l([R]),C;function M(){typeof g=="object"&&(L(0),m([...p,[f,a]]),F(g))}Oe(y=>{if(y.name==="up")L((k-1+B)%B);else if(y.name==="down")L((k+1)%B);else if(y.name==="left"){if(p.length===0)return;let we=p.slice(0,-1),ve=p[p.length-1];L(Object.keys(ve[1]).indexOf(ve[0])),m(we),F(ve[1])}else y.name==="right"?M():y.name==="return"&&(Q.isExecutable(g)?j(!0):M())});let I=A.map((y,we)=>`${we===k?"\x1B[32m\x1B[1m> \x1B[4m":" "}${y[2]}`).join(`
27
- `);return`${C}
28
- ${I}\x1B[?25l`})({message:"test"}).catch(()=>process.exit(1))}};var et=x(require("path"));function mn(t){return Array.isArray(t)?t:Object.entries(t).filter(([e])=>!e.startsWith("$")).map(([,e])=>e)}function hr(t,e){if(!e)return;let n=process.platform==="win32"?";":":",r=e.join(n);!process.env.Path||process.env.Path.includes(r)||(t.Path=`${process.env.Path}${n}${r}`)}function dr(){let t=[],e=process.cwd();do t.push(et.default.join(e,"node_modules/.bin"));while(e!==(e=et.default.join(e,"../")));return t}function tt(t,e){if(e.length===0)return t;let n=e[0];if(typeof t=="object"&&Object.hasOwn(t,n))if(Array.isArray(t)){let r=parseInt(n);return tt(t[r],e.slice(1))}else return tt(t[n],e.slice(1))}var Ae=class{constructor(e,n){this.config=e;this.argv=n}async run(){this.handleDebug(),this.argv.version&&O.printVersion(),this.argv.help&&O.printHelp(this.config,this.argv),this.argv.interactive&&(this.argv._=await Y.selectScript(this.config,this.argv)),await this.handleNoArgs(),hr(process.env,dr());for(let e of this.argv._){if(e=e.replace(/^\\~/g,"~"),e.startsWith("~")&&process.env.BSM_PATH){let n=process.env.BSM_PATH.split("."),r=tt(this.config.scripts,n);if(r){await Q.runScript(r,e.split(".").splice(1),n,{});continue}}await Q.run(e)}}handleDebug(){if(this.argv.debug)switch(this.argv.debug){case"extends":{let e=this.config.extends;if(e)for(let n of e)console.log(typeof n=="string"?n:n[0]);return process.exit(0)}case"scripts":{let e=[...mn(this.config.scripts)],n=[];for(;e.length>0;){let r=e.shift();r&&(typeof r=="string"?n.push(r):typeof r=="object"&&e.push(...mn(r)))}return console.log(n.join(`
29
- `)),process.exit(0)}}}async handleNoArgs(){var r,u;if(this.argv._.length>0)return;let e=process.env.npm_lifecycle_event;if(e&&e!=="npx"){this.argv._=[e.replaceAll(":",".")];return}(((r=this.config.config)==null?void 0:r.defaultNoArgsBehavior)??((u=this.config.config)==null?void 0:u.defaultHelpBehavior)??"help")==="interactive"?this.argv._=await Y.selectScript(this.config,this.argv):O.printHelp(this.config,this.argv)}};var nt=(0,gn.default)(process.argv.slice(2),{"--":!0,boolean:["interactive","help","version"],alias:{help:"h",version:"v",interactive:"i"}});process.argv=nt["--"]??[];async function En(){let t=await _.load(nt);await new Ae(t,nt).run()}En().catch(t=>{t instanceof te&&(console.error(t.func),console.error(`\x1B[31mError executing function '${t.script}'\x1B[0m`),process.exit(1)),t instanceof q&&(console.error(`\x1B[31mScript failed with code ${t.code}\x1B[0m \x1B[90m(${t.script})\x1B[0m`),process.exit(t.code)),console.error(t),console.error("\x1B[31mScript failed\x1B[0m"),process.exit(1)});0&&(module.exports={main});
25
+ `),{}}else if(typeof e=="object")if(Array.isArray(e)){let n={};for(let r of e)n={...n,...t.getEnv(r)};return n}else return e;else{let n=e.call(null,process.argv);return n===void 0?{}:t.getEnv(n)}}static async executeHook(e,n,r,u){return Object.hasOwn(e,n)?(await t.runScript(e[n],[],[...r,n],{...u,excludeArgs:!0}),!0):!1}static get _isCI(){return hn.isCI}static get objectScripts(){let e=[`_${process.platform}`,`_${process.arch}`,"_default"];return t._isCI&&e.unshift("_ci"),e}static async runObject(e,n,r){for(let u of t.objectScripts)if(Object.hasOwn(e,u)){await t.runScript(e[u],[],[...n,u],r);return}await t.notFound([...n,"_default"],r,e)}static isExecutable(e){if(typeof e=="function"||typeof e=="string")return!0;if(typeof e!="object")return!1;if(Array.isArray(e))return!0;for(let n of t.objectScripts)if(Object.hasOwn(e,n))return!0;return!1}};var Y=class{static async selectScript(e,n){var s;let u=(((s=n._[0])==null?void 0:s.replace(/^~/,process.env.BSM_PATH??"~"))??"").split("."),i=[],o=e.scripts;for(let D of u){let l;if(Array.isArray(o)?l=o[Number.parseInt(D)]:l=o[D],typeof l!="object")break;i.push([D,o]),o=l}return Ze((D,l)=>{let[p,m]=N(i),[a,C]=N(o),A=Ue(()=>typeof a=="string"||typeof a=="function"?[]:Object.entries(a).map(y=>[y[0],y[1],O.getCommandHelp(y[1],[y[0]])]).filter(y=>y[2]!==void 0),[a,p]),[k,L]=N(0),[S,j]=N(!1),B=A.length,f=A[k][0],g=A[k][1],R=[...p.map(y=>y[0]),f].join("."),F=`
26
+ \x1B[1mRun command \xBB \x1B[90m${R}\x1B[0m`;if(S)return l([R]),F;function M(){typeof g=="object"&&(L(0),m([...p,[f,a]]),C(g))}Oe(y=>{if(y.name==="up")L((k-1+B)%B);else if(y.name==="down")L((k+1)%B);else if(y.name==="left"){if(p.length===0)return;let we=p.slice(0,-1),ve=p[p.length-1];L(Object.keys(ve[1]).indexOf(ve[0])),m(we),C(ve[1])}else y.name==="right"?M():y.name==="return"&&(Q.isExecutable(g)?j(!0):M())});let I=A.map((y,we)=>`${we===k?"\x1B[32m\x1B[1m> \x1B[4m":" "}${y[2]}`).join(`
27
+ `);return`${F}
28
+ ${I}\x1B[?25l`})({message:"test"}).catch(()=>process.exit(1))}};var et=x(require("path"));function mn(t){return Array.isArray(t)?t:Object.entries(t).filter(([e])=>!e.startsWith("$")).map(([,e])=>e)}function hr(t,e){if(!e)return;let n=process.platform==="win32"?";":":",r=e.join(n);!process.env.Path||process.env.Path.includes(r)||(t.Path=`${process.env.Path}${n}${r}`)}function dr(){let t=[],e=process.cwd();do t.push(et.default.join(e,"node_modules/.bin"));while(e!==(e=et.default.join(e,"../")));return t}function tt(t,e){if(e.length===0)return t;let n=e[0];if(typeof t=="object"&&Object.hasOwn(t,n))if(Array.isArray(t)){let r=parseInt(n);return tt(t[r],e.slice(1))}else return tt(t[n],e.slice(1))}var Ae=class{constructor(e,n){this.config=e;this.argv=n}async run(){this.handleDebug(),this.argv.version&&O.printVersion(),this.argv.help&&O.printHelp(this.config,this.argv),this.argv.interactive&&(this.argv._=await Y.selectScript(this.config,this.argv)),this.argv.force&&(process.env.BSM_DISABLE_IDEMPOTENCY="true"),await this.handleNoArgs(),hr(process.env,dr());for(let e of this.argv._){if(e=e.replace(/^\\~/g,"~"),e.startsWith("~")&&process.env.BSM_PATH){let n=process.env.BSM_PATH.split("."),r=tt(this.config.scripts,n);if(r){await Q.runScript(r,e.split(".").splice(1),n,{});continue}}await Q.run(e)}}handleDebug(){if(this.argv.debug)switch(this.argv.debug){case"extends":{let e=this.config.extends;if(e)for(let n of e)console.log(typeof n=="string"?n:n[0]);return process.exit(0)}case"scripts":{let e=[...mn(this.config.scripts)],n=[];for(;e.length>0;){let r=e.shift();r&&(typeof r=="string"?n.push(r):typeof r=="object"&&e.push(...mn(r)))}return console.log(n.join(`
29
+ `)),process.exit(0)}}}async handleNoArgs(){var r,u;if(this.argv._.length>0)return;let e=process.env.npm_lifecycle_event;if(e&&e!=="npx"){this.argv._=[e.replaceAll(":",".")];return}(((r=this.config.config)==null?void 0:r.defaultNoArgsBehavior)??((u=this.config.config)==null?void 0:u.defaultHelpBehavior)??"help")==="interactive"?this.argv._=await Y.selectScript(this.config,this.argv):O.printHelp(this.config,this.argv)}};var nt=(0,gn.default)(process.argv.slice(2),{"--":!0,boolean:["interactive","help","version"],alias:{help:"h",version:"v",interactive:"i",force:"f"}});process.argv=nt["--"]??[];async function En(){let t=await _.load(nt);await new Ae(t,nt).run()}En().catch(t=>{t instanceof te&&(console.error(t.func),console.error(`\x1B[31mError executing function '${t.script}'\x1B[0m`),process.exit(1)),t instanceof q&&(console.error(`\x1B[31mScript failed with code ${t.code}\x1B[0m \x1B[90m(${t.script})\x1B[0m`),process.exit(t.code)),console.error(t),console.error("\x1B[31mScript failed\x1B[0m"),process.exit(1)});0&&(module.exports={main});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@under_koen/bsm",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "BSM (Basic Script Manager) is a useful tool that enables you to create clear and concise scripts without cluttering your `package.json` file.",
5
5
  "license": "MIT",
6
6
  "author": "Koen van Staveren <koen@underkoen.nl>",