UNPKG

dnf-api

Version:
60 lines (59 loc) 86.7 kB
// @bun var Lu=Object.defineProperty;var b=(D,t)=>{for(var F in t)Lu(D,F,{get:t[F],enumerable:!0,configurable:!0,set:(e)=>t[F]=()=>e})};var Uu=(D,t)=>()=>(D&&(t=D(D=0)),t);var cu={};b(cu,{prompt:()=>Bu,kCancel:()=>lu});import v,{stdin as c2,stdout as o2}from"process";import RD from"readline";import{WriteStream as f2}from"tty";function a2(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function A2(){if(yD)return sD;yD=1;let D="\x1B",t=`${D}[`,F="\x07",e={to(u,C){if(!C)return`${t}${u+1}G`;return`${t}${C+1};${u+1}H`},move(u,C){let r="";if(u<0)r+=`${t}${-u}D`;else if(u>0)r+=`${t}${u}C`;if(C<0)r+=`${t}${-C}A`;else if(C>0)r+=`${t}${C}B`;return r},up:(u=1)=>`${t}${u}A`,down:(u=1)=>`${t}${u}B`,forward:(u=1)=>`${t}${u}C`,backward:(u=1)=>`${t}${u}D`,nextLine:(u=1)=>`${t}E`.repeat(u),prevLine:(u=1)=>`${t}F`.repeat(u),left:`${t}G`,hide:`${t}?25l`,show:`${t}?25h`,save:`${D}7`,restore:`${D}8`},i={up:(u=1)=>`${t}S`.repeat(u),down:(u=1)=>`${t}T`.repeat(u)},n={screen:`${t}2J`,up:(u=1)=>`${t}1J`.repeat(u),down:(u=1)=>`${t}J`.repeat(u),line:`${t}2K`,lineEnd:`${t}K`,lineStart:`${t}1K`,lines(u){let C="";for(let r=0;r<u;r++)C+=this.line+(r<u-1?e.up():"");if(u)C+=e.left;return C}};return sD={cursor:e,scroll:i,erase:n,beep:F},sD}function m2(){if(PD)return X.exports;PD=1;let D=process||{},t=D.argv||[],F=D.env||{},e=!(!!F.NO_COLOR||t.includes("--no-color"))&&(!!F.FORCE_COLOR||t.includes("--color")||D.platform==="win32"||(D.stdout||{}).isTTY&&F.TERM!=="dumb"||!!F.CI),i=(C,r,o=C)=>(B)=>{let c=""+B,a=c.indexOf(r,C.length);return~a?C+n(c,r,o,a)+r:C+c+r},n=(C,r,o,B)=>{let c="",a=0;do c+=C.substring(a,B)+o,a=B+r.length,B=C.indexOf(r,a);while(~B);return c+C.substring(a)},u=(C=e)=>{let r=C?i:()=>String;return{isColorSupported:C,reset:r("\x1B[0m","\x1B[0m"),bold:r("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:r("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:r("\x1B[3m","\x1B[23m"),underline:r("\x1B[4m","\x1B[24m"),inverse:r("\x1B[7m","\x1B[27m"),hidden:r("\x1B[8m","\x1B[28m"),strikethrough:r("\x1B[9m","\x1B[29m"),black:r("\x1B[30m","\x1B[39m"),red:r("\x1B[31m","\x1B[39m"),green:r("\x1B[32m","\x1B[39m"),yellow:r("\x1B[33m","\x1B[39m"),blue:r("\x1B[34m","\x1B[39m"),magenta:r("\x1B[35m","\x1B[39m"),cyan:r("\x1B[36m","\x1B[39m"),white:r("\x1B[37m","\x1B[39m"),gray:r("\x1B[90m","\x1B[39m"),bgBlack:r("\x1B[40m","\x1B[49m"),bgRed:r("\x1B[41m","\x1B[49m"),bgGreen:r("\x1B[42m","\x1B[49m"),bgYellow:r("\x1B[43m","\x1B[49m"),bgBlue:r("\x1B[44m","\x1B[49m"),bgMagenta:r("\x1B[45m","\x1B[49m"),bgCyan:r("\x1B[46m","\x1B[49m"),bgWhite:r("\x1B[47m","\x1B[49m"),blackBright:r("\x1B[90m","\x1B[39m"),redBright:r("\x1B[91m","\x1B[39m"),greenBright:r("\x1B[92m","\x1B[39m"),yellowBright:r("\x1B[93m","\x1B[39m"),blueBright:r("\x1B[94m","\x1B[39m"),magentaBright:r("\x1B[95m","\x1B[39m"),cyanBright:r("\x1B[96m","\x1B[39m"),whiteBright:r("\x1B[97m","\x1B[39m"),bgBlackBright:r("\x1B[100m","\x1B[49m"),bgRedBright:r("\x1B[101m","\x1B[49m"),bgGreenBright:r("\x1B[102m","\x1B[49m"),bgYellowBright:r("\x1B[103m","\x1B[49m"),bgBlueBright:r("\x1B[104m","\x1B[49m"),bgMagentaBright:r("\x1B[105m","\x1B[49m"),bgCyanBright:r("\x1B[106m","\x1B[49m"),bgWhiteBright:r("\x1B[107m","\x1B[49m")}};return X.exports=u(),X.exports.createColors=u,X.exports}function b2({onlyFirst:D=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,D?void 0:"g")}function Fu(D){if(typeof D!="string")throw TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(g2,"")}function eu(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function W(D,t={}){if(typeof D!="string"||D.length===0||(t={ambiguousIsNarrow:!0,...t},D=Fu(D),D.length===0))return 0;D=D.replace(v2()," ");let F=t.ambiguousIsNarrow?1:2,e=0;for(let i of D){let n=i.codePointAt(0);if(n<=31||n>=127&&n<=159||n>=768&&n<=879)continue;switch(d2.eastAsianWidth(i)){case"F":case"W":e+=2;break;case"A":e+=F;break;default:e+=1}}return e}function _2(){let D=new Map;for(let[t,F]of Object.entries(A)){for(let[e,i]of Object.entries(F))A[e]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},F[e]=A[e],D.set(i[0],i[1]);Object.defineProperty(A,t,{value:F,enumerable:!1})}return Object.defineProperty(A,"codes",{value:D,enumerable:!1}),A.color.close="\x1B[39m",A.bgColor.close="\x1B[49m",A.color.ansi=LD(),A.color.ansi256=UD(),A.color.ansi16m=OD(),A.bgColor.ansi=LD(hD),A.bgColor.ansi256=UD(hD),A.bgColor.ansi16m=OD(hD),Object.defineProperties(A,{rgbToAnsi256:{value:(t,F,e)=>t===F&&F===e?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(F/255*5)+Math.round(e/255*5),enumerable:!1},hexToRgb:{value:(t)=>{let F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!F)return[0,0,0];let[e]=F;e.length===3&&(e=[...e].map((n)=>n+n).join(""));let i=Number.parseInt(e,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:(t)=>A.rgbToAnsi256(...A.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:(t)=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let F,e,i;if(t>=232)F=((t-232)*10+8)/255,e=F,i=F;else{t-=16;let C=t%36;F=Math.floor(t/36)/5,e=Math.floor(C/6)/5,i=C%6/5}let n=Math.max(F,e,i)*2;if(n===0)return 30;let u=30+(Math.round(i)<<2|Math.round(e)<<1|Math.round(F));return n===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(t,F,e)=>A.ansi256ToAnsi(A.rgbToAnsi256(t,F,e)),enumerable:!1},hexToAnsi:{value:(t)=>A.ansi256ToAnsi(A.hexToAnsi256(t)),enumerable:!1}}),A}function jD(D,t,F){return String(D).normalize().replace(/\r\n/g,` `).split(` `).map((e)=>J2(e,t,F)).join(` `)}function ru(D,t){if(typeof D=="string")return Q.aliases.get(D)===t;for(let F of D)if(F!==void 0&&ru(F,t))return!0;return!1}function Y2(D,t){if(D===t)return;let F=D.split(` `),e=t.split(` `),i=[];for(let n=0;n<Math.max(F.length,e.length);n++)F[n]!==e[n]&&i.push(n);return i}function N(D,t){let F=D;F.isTTY&&F.setRawMode(t)}class Y{constructor(D,t=!0){p(this,"input"),p(this,"output"),p(this,"_abortSignal"),p(this,"rl"),p(this,"opts"),p(this,"_render"),p(this,"_track",!1),p(this,"_prevFrame",""),p(this,"_subscribers",new Map),p(this,"_cursor",0),p(this,"state","initial"),p(this,"error",""),p(this,"value");let{input:F=c2,output:e=o2,render:i,signal:n,...u}=D;this.opts=u,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=i.bind(this),this._track=t,this._abortSignal=n,this.input=F,this.output=e}unsubscribe(){this._subscribers.clear()}setSubscriber(D,t){let F=this._subscribers.get(D)??[];F.push(t),this._subscribers.set(D,F)}on(D,t){this.setSubscriber(D,{cb:t})}once(D,t){this.setSubscriber(D,{cb:t,once:!0})}emit(D,...t){let F=this._subscribers.get(D)??[],e=[];for(let i of F)i.cb(...t),i.once&&e.push(()=>F.splice(F.indexOf(i),1));for(let i of e)i()}prompt(){return new Promise((D,t)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),D(xD);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let F=new f2(0);F._write=(e,i,n)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),n()},this.input.pipe(F),this.rl=RD.createInterface({input:this.input,output:F,tabSize:2,prompt:"",escapeCodeTimeout:50}),RD.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),N(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(M.cursor.show),this.output.off("resize",this.render),N(this.input,!1),D(this.value)}),this.once("cancel",()=>{this.output.write(M.cursor.show),this.output.off("resize",this.render),N(this.input,!1),D(xD)})})}onKeypress(D,t){if(this.state==="error"&&(this.state="active"),t?.name&&(!this._track&&Q.aliases.has(t.name)&&this.emit("cursor",Q.aliases.get(t.name)),Q.actions.has(t.name)&&this.emit("cursor",t.name)),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D==="\t"&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),D&&this.emit("key",D.toLowerCase()),t?.name==="return"){if(this.opts.validate){let F=this.opts.validate(this.value);F&&(this.error=F instanceof Error?F.message:F,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}ru([D,t?.name,t?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(` `),N(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let D=jD(this._prevFrame,process.stdout.columns,{hard:!0}).split(` `).length-1;this.output.write(M.cursor.move(-999,D*-1))}render(){let D=jD(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(M.cursor.hide);else{let t=Y2(this._prevFrame,D);if(this.restoreCursor(),t&&t?.length===1){let F=t[0];this.output.write(M.cursor.move(0,F)),this.output.write(M.erase.lines(1));let e=D.split(` `);this.output.write(e[F]),this._prevFrame=D,this.output.write(M.cursor.move(0,e.length-F-1));return}if(t&&t?.length>1){let F=t[0];this.output.write(M.cursor.move(0,F)),this.output.write(M.erase.down());let e=D.split(` `).slice(F);this.output.write(e.join(` `)),this._prevFrame=D;return}this.output.write(M.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}function y2(){return v.platform!=="win32"?v.env.TERM!=="linux":!!v.env.CI||!!v.env.WT_SESSION||!!v.env.TERMINUS_SUBLIME||v.env.ConEmuTask==="{cmd::Cmder}"||v.env.TERM_PROGRAM==="Terminus-Sublime"||v.env.TERM_PROGRAM==="vscode"||v.env.TERM==="xterm-256color"||v.env.TERM==="alacritty"||v.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}async function Bu(D,t={}){let F=(e)=>{if(typeof e!=="symbol"||e.toString()!=="Symbol(clack:cancel)")return e;switch(t.cancel){case"reject":{let i=Error("Prompt cancelled.");if(i.name="ConsolaPromptCancelledError",Error.captureStackTrace)Error.captureStackTrace(i,Bu);throw i}case"undefined":return;case"null":return null;case"symbol":return lu;default:case"default":return t.default??t.initial}};if(!t.type||t.type==="text")return await x2({message:D,defaultValue:t.default,placeholder:t.placeholder,initialValue:t.initial}).then(F);if(t.type==="confirm")return await Dt({message:D,initialValue:t.initial}).then(F);if(t.type==="select")return await ut({message:D,options:t.options.map((e)=>typeof e==="string"?{value:e,label:e}:e),initialValue:t.initial}).then(F);if(t.type==="multiselect")return await tt({message:D,options:t.options.map((e)=>typeof e==="string"?{value:e,label:e}:e),required:t.required,initialValues:t.initial}).then(F);throw Error(`Unknown prompt type: ${t.type}`)}var sD,yD,M,X,PD,$2,s,g2,iu,w2,d2,p2=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80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B\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD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0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\u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+D};2;${t};${F};${e}m`,A,M2,S2,V2,R,k2=39,fD="\x07",Cu="[",z2="]",nu="m",aD,qD=(D)=>`${R.values().next().value}${Cu}${D}${nu}`,ID=(D)=>`${R.values().next().value}${aD}${D}${fD}`,T2=(D)=>D.split(" ").map((t)=>W(t)),lD=(D,t,F)=>{let e=[...t],i=!1,n=!1,u=W(Fu(D[D.length-1]));for(let[C,r]of e.entries()){let o=W(r);if(u+o<=F?D[D.length-1]+=r:(D.push(r),u=0),R.has(r)&&(i=!0,n=e.slice(C+1).join("").startsWith(aD)),i){n?r===fD&&(i=!1,n=!1):r===nu&&(i=!1);continue}u+=o,u===F&&C<e.length-1&&(D.push(""),u=0)}!u&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},G2=(D)=>{let t=D.split(" "),F=t.length;for(;F>0&&!(W(t[F-1])>0);)F--;return F===t.length?D:t.slice(0,F).join(" ")+t.slice(F).join("")},J2=(D,t,F={})=>{if(F.trim!==!1&&D.trim()==="")return"";let e="",i,n,u=T2(D),C=[""];for(let[o,B]of D.split(" ").entries()){F.trim!==!1&&(C[C.length-1]=C[C.length-1].trimStart());let c=W(C[C.length-1]);if(o!==0&&(c>=t&&(F.wordWrap===!1||F.trim===!1)&&(C.push(""),c=0),(c>0||F.trim===!1)&&(C[C.length-1]+=" ",c++)),F.hard&&u[o]>t){let a=t-c,m=1+Math.floor((u[o]-a-1)/t);Math.floor((u[o]-1)/t)<m&&C.push(""),lD(C,B,t);continue}if(c+u[o]>t&&c>0&&u[o]>0){if(F.wordWrap===!1&&c<t){lD(C,B,t);continue}C.push("")}if(c+u[o]>t&&F.wordWrap===!1){lD(C,B,t);continue}C[C.length-1]+=B}F.trim!==!1&&(C=C.map((o)=>G2(o)));let r=[...C.join(` `)];for(let[o,B]of r.entries()){if(e+=B,R.has(B)){let{groups:a}=new RegExp(`(?:\\${Cu}(?<code>\\d+)m|\\${aD}(?<uri>.*)${fD})`).exec(r.slice(o).join(""))||{groups:{}};if(a.code!==void 0){let m=Number.parseFloat(a.code);i=m===k2?void 0:m}else a.uri!==void 0&&(n=a.uri.length===0?void 0:a.uri)}let c=V2.codes.get(Number(i));r[o+1]===` `?(n&&(e+=ID("")),i&&c&&(e+=qD(c))):B===` `&&(i&&c&&(e+=qD(i)),n&&(e+=ID(n)))}return e},W2,Q,xD,Z2,K2=(D,t,F)=>(t in D)?Z2(D,t,{enumerable:!0,configurable:!0,writable:!0,value:F}):D[t]=F,p=(D,t,F)=>(K2(D,typeof t!="symbol"?t+"":t,F),F),Eu,H2,X2=(D,t,F)=>(t in D)?H2(D,t,{enumerable:!0,configurable:!0,writable:!0,value:F}):D[t]=F,Du=(D,t,F)=>(X2(D,typeof t!="symbol"?t+"":t,F),F),N2,Q2,R2=(D,t,F)=>(t in D)?Q2(D,t,{enumerable:!0,configurable:!0,writable:!0,value:F}):D[t]=F,uu=(D,t,F)=>(R2(D,typeof t!="symbol"?t+"":t,F),F),su,hu,P2,S=(D,t)=>P2?D:t,L2,U2,O2,q2,f,J,BD,cD,I2,tu,j2,y=(D)=>{switch(D){case"initial":case"active":return s.cyan(L2);case"cancel":return s.red(U2);case"error":return s.yellow(O2);case"submit":return s.green(q2)}},oD=(D)=>{let{cursor:t,options:F,style:e}=D,i=D.maxItems??Number.POSITIVE_INFINITY,n=Math.max(process.stdout.rows-4,0),u=Math.min(n,Math.max(i,5)),C=0;t>=C+u-3?C=Math.max(Math.min(t-u+3,F.length-u),0):t<C+2&&(C=Math.max(t-2,0));let r=u<F.length&&C>0,o=u<F.length&&C+u<F.length;return F.slice(C,C+u).map((B,c,a)=>{let m=c===0&&r,T=c===a.length-1&&o;return m||T?s.dim("..."):e(B,c+C===t)})},x2=(D)=>new hu({validate:D.validate,placeholder:D.placeholder,defaultValue:D.defaultValue,initialValue:D.initialValue,render(){let t=`${s.gray(f)} ${y(this.state)} ${D.message} `,F=D.placeholder?s.inverse(D.placeholder[0])+s.dim(D.placeholder.slice(1)):s.inverse(s.hidden("_")),e=this.value?this.valueWithCursor:F;switch(this.state){case"error":return`${t.trim()} ${s.yellow(f)} ${e} ${s.yellow(J)} ${s.yellow(this.error)} `;case"submit":return`${t}${s.gray(f)} ${s.dim(this.value||D.placeholder)}`;case"cancel":return`${t}${s.gray(f)} ${s.strikethrough(s.dim(this.value??""))}${this.value?.trim()?` ${s.gray(f)}`:""}`;default:return`${t}${s.cyan(f)} ${e} ${s.cyan(J)} `}}}).prompt(),Dt=(D)=>{let t=D.active??"Yes",F=D.inactive??"No";return new Eu({active:t,inactive:F,initialValue:D.initialValue??!0,render(){let e=`${s.gray(f)} ${y(this.state)} ${D.message} `,i=this.value?t:F;switch(this.state){case"submit":return`${e}${s.gray(f)} ${s.dim(i)}`;case"cancel":return`${e}${s.gray(f)} ${s.strikethrough(s.dim(i))} ${s.gray(f)}`;default:return`${e}${s.cyan(f)} ${this.value?`${s.green(BD)} ${t}`:`${s.dim(cD)} ${s.dim(t)}`} ${s.dim("/")} ${this.value?`${s.dim(cD)} ${s.dim(F)}`:`${s.green(BD)} ${F}`} ${s.cyan(J)} `}}}).prompt()},ut=(D)=>{let t=(F,e)=>{let i=F.label??String(F.value);switch(e){case"selected":return`${s.dim(i)}`;case"active":return`${s.green(BD)} ${i} ${F.hint?s.dim(`(${F.hint})`):""}`;case"cancelled":return`${s.strikethrough(s.dim(i))}`;default:return`${s.dim(cD)} ${s.dim(i)}`}};return new su({options:D.options,initialValue:D.initialValue,render(){let F=`${s.gray(f)} ${y(this.state)} ${D.message} `;switch(this.state){case"submit":return`${F}${s.gray(f)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${F}${s.gray(f)} ${t(this.options[this.cursor],"cancelled")} ${s.gray(f)}`;default:return`${F}${s.cyan(f)} ${oD({cursor:this.cursor,options:this.options,maxItems:D.maxItems,style:(e,i)=>t(e,i?"active":"inactive")}).join(` ${s.cyan(f)} `)} ${s.cyan(J)} `}}}).prompt()},tt=(D)=>{let t=(F,e)=>{let i=F.label??String(F.value);return e==="active"?`${s.cyan(I2)} ${i} ${F.hint?s.dim(`(${F.hint})`):""}`:e==="selected"?`${s.green(tu)} ${s.dim(i)}`:e==="cancelled"?`${s.strikethrough(s.dim(i))}`:e==="active-selected"?`${s.green(tu)} ${i} ${F.hint?s.dim(`(${F.hint})`):""}`:e==="submitted"?`${s.dim(i)}`:`${s.dim(j2)} ${s.dim(i)}`};return new N2({options:D.options,initialValues:D.initialValues,required:D.required??!0,cursorAt:D.cursorAt,validate(F){if(this.required&&F.length===0)return`Please select at least one option. ${s.reset(s.dim(`Press ${s.gray(s.bgWhite(s.inverse(" space ")))} to select, ${s.gray(s.bgWhite(s.inverse(" enter ")))} to submit`))}`},render(){let F=`${s.gray(f)} ${y(this.state)} ${D.message} `,e=(i,n)=>{let u=this.value.includes(i.value);return n&&u?t(i,"active-selected"):u?t(i,"selected"):t(i,n?"active":"inactive")};switch(this.state){case"submit":return`${F}${s.gray(f)} ${this.options.filter(({value:i})=>this.value.includes(i)).map((i)=>t(i,"submitted")).join(s.dim(", "))||s.dim("none")}`;case"cancel":{let i=this.options.filter(({value:n})=>this.value.includes(n)).map((n)=>t(n,"cancelled")).join(s.dim(", "));return`${F}${s.gray(f)} ${i.trim()?`${i} ${s.gray(f)}`:""}`}case"error":{let i=this.error.split(` `).map((n,u)=>u===0?`${s.yellow(J)} ${s.yellow(n)}`:` ${n}`).join(` `);return`${F+s.yellow(f)} ${oD({options:this.options,cursor:this.cursor,maxItems:D.maxItems,style:e}).join(` ${s.yellow(f)} `)} ${i} `}default:return`${F}${s.cyan(f)} ${oD({options:this.options,cursor:this.cursor,maxItems:D.maxItems,style:e}).join(` ${s.cyan(f)} `)} ${s.cyan(J)} `}}}).prompt()},lu;var ou=Uu(()=>{M=A2(),X={exports:{}};$2=m2(),s=a2($2);g2=b2();iu={exports:{}};(function(D){var t={};D.exports=t,t.eastAsianWidth=function(e){var i=e.charCodeAt(0),n=e.length==2?e.charCodeAt(1):0,u=i;return 55296<=i&&i<=56319&&56320<=n&&n<=57343&&(i&=1023,n&=1023,u=i<<10|n,u+=65536),u==12288||65281<=u&&u<=65376||65504<=u&&u<=65510?"F":u==8361||65377<=u&&u<=65470||65474<=u&&u<=65479||65482<=u&&u<=65487||65490<=u&&u<=65495||65498<=u&&u<=65500||65512<=u&&u<=65518?"H":4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12289<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||110592<=u&&u<=110593||127488<=u&&u<=127490||127504<=u&&u<=127546||127552<=u&&u<=127560||127568<=u&&u<=127569||131072<=u&&u<=194367||177984<=u&&u<=196605||196608<=u&&u<=262141?"W":32<=u&&u<=126||162<=u&&u<=163||165<=u&&u<=166||u==172||u==175||10214<=u&&u<=10221||10629<=u&&u<=10630?"Na":u==161||u==164||167<=u&&u<=168||u==170||173<=u&&u<=174||176<=u&&u<=180||182<=u&&u<=186||188<=u&&u<=191||u==198||u==208||215<=u&&u<=216||222<=u&&u<=225||u==230||232<=u&&u<=234||236<=u&&u<=237||u==240||242<=u&&u<=243||247<=u&&u<=250||u==252||u==254||u==257||u==273||u==275||u==283||294<=u&&u<=295||u==299||305<=u&&u<=307||u==312||319<=u&&u<=322||u==324||328<=u&&u<=331||u==333||338<=u&&u<=339||358<=u&&u<=359||u==363||u==462||u==464||u==466||u==468||u==470||u==472||u==474||u==476||u==593||u==609||u==708||u==711||713<=u&&u<=715||u==717||u==720||728<=u&&u<=731||u==733||u==735||768<=u&&u<=879||913<=u&&u<=929||931<=u&&u<=937||945<=u&&u<=961||963<=u&&u<=969||u==1025||1040<=u&&u<=1103||u==1105||u==8208||8211<=u&&u<=8214||8216<=u&&u<=8217||8220<=u&&u<=8221||8224<=u&&u<=8226||8228<=u&&u<=8231||u==8240||8242<=u&&u<=8243||u==8245||u==8251||u==8254||u==8308||u==8319||8321<=u&&u<=8324||u==8364||u==8451||u==8453||u==8457||u==8467||u==8470||8481<=u&&u<=8482||u==8486||u==8491||8531<=u&&u<=8532||8539<=u&&u<=8542||8544<=u&&u<=8555||8560<=u&&u<=8569||u==8585||8592<=u&&u<=8601||8632<=u&&u<=8633||u==8658||u==8660||u==8679||u==8704||8706<=u&&u<=8707||8711<=u&&u<=8712||u==8715||u==8719||u==8721||u==8725||u==8730||8733<=u&&u<=8736||u==8739||u==8741||8743<=u&&u<=8748||u==8750||8756<=u&&u<=8759||8764<=u&&u<=8765||u==8776||u==8780||u==8786||8800<=u&&u<=8801||8804<=u&&u<=8807||8810<=u&&u<=8811||8814<=u&&u<=8815||8834<=u&&u<=8835||8838<=u&&u<=8839||u==8853||u==8857||u==8869||u==8895||u==8978||9312<=u&&u<=9449||9451<=u&&u<=9547||9552<=u&&u<=9587||9600<=u&&u<=9615||9618<=u&&u<=9621||9632<=u&&u<=9633||9635<=u&&u<=9641||9650<=u&&u<=9651||9654<=u&&u<=9655||9660<=u&&u<=9661||9664<=u&&u<=9665||9670<=u&&u<=9672||u==9675||9678<=u&&u<=9681||9698<=u&&u<=9701||u==9711||9733<=u&&u<=9734||u==9737||9742<=u&&u<=9743||9748<=u&&u<=9749||u==9756||u==9758||u==9792||u==9794||9824<=u&&u<=9825||9827<=u&&u<=9829||9831<=u&&u<=9834||9836<=u&&u<=9837||u==9839||9886<=u&&u<=9887||9918<=u&&u<=9919||9924<=u&&u<=9933||9935<=u&&u<=9953||u==9955||9960<=u&&u<=9983||u==10045||u==10071||10102<=u&&u<=10111||11093<=u&&u<=11097||12872<=u&&u<=12879||57344<=u&&u<=63743||65024<=u&&u<=65039||u==65533||127232<=u&&u<=127242||127248<=u&&u<=127277||127280<=u&&u<=127337||127344<=u&&u<=127386||917760<=u&&u<=917999||983040<=u&&u<=1048573||1048576<=u&&u<=1114109?"A":"N"},t.characterLength=function(e){var i=this.eastAsianWidth(e);return i=="F"||i=="W"||i=="A"?2:1};function F(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(e){for(var i=F(e),n=0,u=0;u<i.length;u++)n=n+this.characterLength(i[u]);return n},t.slice=function(e,i,n){textLen=t.length(e),i=i||0,n=n||1,i<0&&(i=textLen+i),n<0&&(n=textLen+n);for(var u="",C=0,r=F(e),o=0;o<r.length;o++){var B=r[o],c=t.length(B);if(C>=i-(c==2?1:0))if(C+c<=n)u+=B;else break;C+=c}return u}})(iu);w2=iu.exports,d2=eu(w2),v2=eu(p2);A={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(A.modifier);M2=Object.keys(A.color),S2=Object.keys(A.bgColor);[...M2,...S2];V2=_2(),R=new Set(["\x1B","\x9B"]),aD=`${z2}8;;`;W2=["up","down","left","right","space","enter","cancel"],Q={actions:new Set(W2),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]])};globalThis.process.platform.startsWith("win");xD=Symbol("clack:cancel");Z2=Object.defineProperty;Eu=class Eu extends Y{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(D){super(D,!1),this.value=!!D.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(t)=>{this.output.write(M.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};H2=Object.defineProperty,N2=class extends Y{constructor(D){super(D,!1),Du(this,"options"),Du(this,"cursor",0),this.options=D.options,this.value=[...D.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===D.cursorAt),0),this.on("key",(t)=>{t==="a"&&this.toggleAll()}),this.on("cursor",(t)=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let D=this.value.length===this.options.length;this.value=D?[]:this.options.map((t)=>t.value)}toggleValue(){let D=this.value.includes(this._value);this.value=D?this.value.filter((t)=>t!==this._value):[...this.value,this._value]}},Q2=Object.defineProperty;su=class su extends Y{constructor(D){super(D,!1),uu(this,"options"),uu(this,"cursor",0),this.options=D.options,this.cursor=this.options.findIndex(({value:t})=>t===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(t)=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};hu=class hu extends Y{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let D=this.value.slice(0,this.cursor),[t,...F]=this.value.slice(this.cursor);return`${D}${s.inverse(t)}${F.join("")}`}get cursor(){return this._cursor}constructor(D){super(D),this.on("finalize",()=>{this.value||(this.value=D.defaultValue)})}};P2=y2(),L2=S("\u276F",">"),U2=S("\u25A0","x"),O2=S("\u25B2","x"),q2=S("\u2714","\u221A"),f=S(""),J=S(""),BD=S("\u25CF",">"),cD=S("\u25CB"," "),I2=S("\u25FB","[\u2022]"),tu=S("\u25FC","[+]"),j2=S("\u25FB","[ ]");`${s.gray(f)} `;lu=Symbol.for("cancel")});var VD={};b(VD,{skill:()=>dD,setItem:()=>_D,server:()=>SD,multi:()=>MD,jobs:()=>vD,item:()=>pD,equip:()=>wD,characters:()=>gD,avatarMarket:()=>bD,action:()=>$D});var $D={};b($D,{no:()=>Pt,itemName:()=>Rt,itemIds:()=>Ot,itemId:()=>yt,auctionSoldName:()=>Lt,auctionSoldIds:()=>qt,auctionSoldId:()=>Ut});var I={};b(I,{staticUtil:()=>h,setConfig:()=>TD,resetConfig:()=>GD,requestQueue:()=>U,query:()=>E,params:()=>tD,createRequest:()=>_u,config:()=>w});var zD={key:"",hideOnErrorApiKey:!0,hideKeyText:"{HIDE_KEY}",timeout:5000,returnJSON:!1,responseHeader:!1,showURL:!1,maxRequestsPerSecond:500,maxRequestsPerMinute:30000},uD={...zD};function TD(D){Object.assign(uD,D)}function GD(){Object.assign(uD,zD)}var w=uD;var tD={};var Su={};b(Su,{makeItemQuery:()=>Mu,default:()=>E,UriBuilder:()=>O,Request:()=>q});var g={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},CD={silent:{level:-1},fatal:{level:g.fatal},error:{level:g.error},warn:{level:g.warn},log:{level:g.log},info:{level:g.info},success:{level:g.success},fail:{level:g.fail},ready:{level:g.info},start:{level:g.info},box:{level:g.info},debug:{level:g.debug},trace:{level:g.trace},verbose:{level:g.verbose}};function FD(D){if(D===null||typeof D!=="object")return!1;let t=Object.getPrototypeOf(D);if(t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null)return!1;if(Symbol.iterator in D)return!1;if(Symbol.toStringTag in D)return Object.prototype.toString.call(D)==="[object Module]";return!0}function nD(D,t,F=".",e){if(!FD(t))return nD(D,{},F,e);let i=Object.assign({},t);for(let n in D){if(n==="__proto__"||n==="constructor")continue;let u=D[n];if(u===null||u===void 0)continue;if(e&&e(i,n,u,F))continue;if(Array.isArray(u)&&Array.isArray(i[n]))i[n]=[...u,...i[n]];else if(FD(u)&&FD(i[n]))i[n]=nD(u,i[n],(F?`${F}.`:"")+n.toString(),e);else i[n]=u}return i}function Ou(D){return(...t)=>t.reduce((F,e)=>nD(F,e,"",D),{})}var qu=Ou();function Iu(D){return Object.prototype.toString.call(D)==="[object Object]"}function ju(D){if(!Iu(D))return!1;if(!D.message&&!D.args)return!1;if(D.stack)return!1;return!0}var eD=!1,JD=[];class ${options;_lastLog;_mockFn;constructor(D={}){let t=D.types||CD;this.options=qu({...D,defaults:{...D.defaults},level:iD(D.level,t),reporters:[...D.reporters||[]]},{types:CD,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let F in t){let e={type:F,...this.options.defaults,...t[F]};this[F]=this._wrapLogFn(e),this[F].raw=this._wrapLogFn(e,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(D){this.options.level=iD(D,this.options.types,this.options.level)}prompt(D,t){if(!this.options.prompt)throw Error("prompt is not supported!");return this.options.prompt(D,t)}create(D){let t=new $({...this.options,...D});if(this._mockFn)t.mockTypes(this._mockFn);return t}withDefaults(D){return this.create({...this.options,defaults:{...this.options.defaults,...D}})}withTag(D){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+D:D})}addReporter(D){return this.options.reporters.push(D),this}removeReporter(D){if(D){let t=this.options.reporters.indexOf(D);if(t!==-1)return this.options.reporters.splice(t,1)}else this.options.reporters.splice(0);return this}setReporters(D){return this.options.reporters=Array.isArray(D)?D:[D],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let D in this.options.types){if(!console["__"+D])console["__"+D]=console[D];console[D]=this[D].raw}}restoreConsole(){for(let D in this.options.types)if(console["__"+D])console[D]=console["__"+D],delete console["__"+D]}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(D,t){if(!D)return;if(!D.__write)D.__write=D.write;D.write=(F)=>{this[t].raw(String(F).trim())}}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(D){if(!D)return;if(D.__write)D.write=D.__write,delete D.__write}pauseLogs(){eD=!0}resumeLogs(){eD=!1;let D=JD.splice(0);for(let t of D)t[0]._logFn(t[1],t[2])}mockTypes(D){let t=D||this.options.mockFn;if(this._mockFn=t,typeof t!=="function")return;for(let F in this.options.types)this[F]=t(F,this.options.types[F])||this[F],this[F].raw=this[F]}_wrapLogFn(D,t){return(...F)=>{if(eD){JD.push([this,D,F,t]);return}return this._logFn(D,F,t)}}_logFn(D,t,F){if((D.level||0)>this.level)return!1;let e={date:new Date,args:[],...D,level:iD(D.level,this.options.types)};if(!F&&t.length===1&&ju(t[0]))Object.assign(e,t[0]);else e.args=[...t];if(e.message)e.args.unshift(e.message),delete e.message;if(e.additional){if(!Array.isArray(e.additional))e.additional=e.additional.split(` `);e.args.push(` `+e.additional.join(` `)),delete e.additional}e.type=typeof e.type==="string"?e.type.toLowerCase():"log",e.tag=typeof e.tag==="string"?e.tag:"";let i=(u=!1)=>{let C=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&C>0){let r=[...this._lastLog.object.args];if(C>1)r.push(`(repeated ${C} times)`);this._log({...this._lastLog.object,args:r}),this._lastLog.count=1}if(u)this._lastLog.object=e,this._log(e)};clearTimeout(this._lastLog.timeout);let n=this._lastLog.time&&e.date?e.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=e.date,n<this.options.throttle)try{let u=JSON.stringify([e.type,e.tag,e.args]),C=this._lastLog.serialized===u;if(this._lastLog.serialized=u,C){if(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin){this._lastLog.timeout=setTimeout(i,this.options.throttle);return}}}catch{}i(!0)}_log(D){for(let t of this.options.reporters)t.log(D,{options:this.options})}}function iD(D,t={},F=3){if(D===void 0)return F;if(typeof D==="number")return D;if(t[D]&&t[D].level!==void 0)return t[D].level;return F}$.prototype.add=$.prototype.addReporter;$.prototype.remove=$.prototype.removeReporter;$.prototype.clear=$.prototype.removeReporter;$.prototype.withScope=$.prototype.withTag;$.prototype.mock=$.prototype.mockTypes;$.prototype.pause=$.prototype.pauseLogs;$.prototype.resume=$.prototype.resumeLogs;function WD(D={}){return new $(D)}import{formatWithOptions as YD}from"util";import{sep as xu}from"path";function ED(D,t){let F=process.cwd()+xu;return D.split(` `).splice(t.split(` `).length).map((i)=>i.trim().replace("file://","").replace(F,""))}function D2(D,t){return(t.__write||t.write).call(t,D)}var rD=(D)=>D?`[${D}]`:"";class K{formatStack(D,t,F){let e=" ".repeat((F?.errorLevel||0)+1);return e+ED(D,t).join(` ${e}`)}formatError(D,t){let F=D.message??YD(t,D),e=D.stack?this.formatStack(D.stack,F,t):"",i=t?.errorLevel||0,n=i>0?`${" ".repeat(i)}[cause]: `:"",u=D.cause?` `+this.formatError(D.cause,{...t,errorLevel:i+1}):"";return n+F+` `+e+u}formatArgs(D,t){let F=D.map((e)=>{if(e&&typeof e.stack==="string")return this.formatError(e,t);return e});return YD(t,...F)}formatDate(D,t){return t.date?D.toLocaleTimeString():""}filterAndJoin(D){return D.filter(Boolean).join(" ")}formatLogObj(D,t){let F=this.formatArgs(D.args,t);if(D.type==="box")return` `+[rD(D.tag),D.title&&D.title,...F.split(` `)].filter(Boolean).map((e)=>" > "+e).join(` `)+` `;return this.filterAndJoin([rD(D.type),rD(D.tag),F])}log(D,t){let F=this.formatLogObj(D,{columns:t.options.stdout.columns||0,...t.options.formatOptions});return D2(F+` `,D.level<2?t.options.stderr||process.stderr:t.options.stdout||process.stdout)}}import fu from"process";import*as H from"tty";var{env:k={},argv:HD=[],platform:u2=""}=typeof process>"u"?{}:process,t2="NO_COLOR"in k||HD.includes("--no-color"),F2="FORCE_COLOR"in k||HD.includes("--color"),e2=u2==="win32",XD=k.TERM==="dumb",i2=H&&H.isatty&&H.isatty(1)&&k.TERM&&!XD,C2="CI"in k&&(("GITHUB_ACTIONS"in k)||("GITLAB_CI"in k)||("CIRCLECI"in k)),n2=!t2&&(F2||e2&&!XD||i2||C2);function ND(D,t,F,e,i=t.slice(0,Math.max(0,D))+e,n=t.slice(Math.max(0,D+F.length)),u=n.indexOf(F)){return i+(u<0?n:ND(u,n,F,e))}function r2(D,t,F,e,i){return D<0?F+t+e:F+ND(D,t,e,i)+e}function E2(D,t,F=D,e=D.length+1){return(i)=>i||!(i===""||i===void 0)?r2((""+i).indexOf(t,e),i,D,t,F):""}function l(D,t,F){return E2(`\x1B[${D}m`,`\x1B[${t}m`,F)}var ZD={reset:l(0,0),bold:l(1,22,"\x1B[22m\x1B[1m"),dim:l(2,22,"\x1B[22m\x1B[2m"),italic:l(3,23),underline:l(4,24),inverse:l(7,27),hidden:l(8,28),strikethrough:l(9,29),black:l(30,39),red:l(31,39),green:l(32,39),yellow:l(33,39),blue:l(34,39),magenta:l(35,39),cyan:l(36,39),white:l(37,39),gray:l(90,39),bgBlack:l(40,49),bgRed:l(41,49),bgG