UNPKG

npm-check-updates

Version:

Find newer versions of dependencies than what your package.json allows

48 lines 1.36 MB
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const De=require("node:path"),RI=require("node:readline"),Ut=require("node:events"),at=require("node:fs"),Dt=require("node:os"),Dr=require("node:util"),Ne=require("node:fs/promises"),yt=require("node:url"),ET=require("node:child_process"),ua=require("node:http"),Lm=require("node:https"),_T=require("node:assert"),ca=require("node:buffer"),tr=require("node:stream"),Qi=require("node:string_decoder"),bT=require("node:zlib"),CI=require("node:path/win32"),wT=require("node:module"),km=require("node:dns"),DT=require("node:crypto"),an=require("node:net"),la=require("node:tls"),ST=require("node:tty"),TI=require("node:timers/promises"),OI=require("node:querystring"),$m=require("node:process"),xI=require("node:stream/consumers");var ar=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function FI(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function i(){var s=!1;try{s=this instanceof i}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),n}var ru={},nu,dy;function rr(){if(dy)return nu;dy=1;let e,t,n,i,s=!0;typeof process<"u"&&({FORCE_COLOR:e,NODE_DISABLE_COLORS:t,NO_COLOR:n,TERM:i}=process.env||{},s=process.stdout&&process.stdout.isTTY);const r={enabled:!t&&n==null&&i!=="dumb"&&(e!=null&&e!=="0"||s),reset:a(0,0),bold:a(1,22),dim:a(2,22),italic:a(3,23),underline:a(4,24),inverse:a(7,27),hidden:a(8,28),strikethrough:a(9,29),black:a(30,39),red:a(31,39),green:a(32,39),yellow:a(33,39),blue:a(34,39),magenta:a(35,39),cyan:a(36,39),white:a(37,39),gray:a(90,39),grey:a(90,39),bgBlack:a(40,49),bgRed:a(41,49),bgGreen:a(42,49),bgYellow:a(43,49),bgBlue:a(44,49),bgMagenta:a(45,49),bgCyan:a(46,49),bgWhite:a(47,49)};function o(f,u){let d=0,h,l="",p="";for(;d<f.length;d++)h=f[d],l+=h.open,p+=h.close,~u.indexOf(h.close)&&(u=u.replace(h.rgx,h.close+h.open));return l+u+p}function c(f,u){let d={has:f,keys:u};return d.reset=r.reset.bind(d),d.bold=r.bold.bind(d),d.dim=r.dim.bind(d),d.italic=r.italic.bind(d),d.underline=r.underline.bind(d),d.inverse=r.inverse.bind(d),d.hidden=r.hidden.bind(d),d.strikethrough=r.strikethrough.bind(d),d.black=r.black.bind(d),d.red=r.red.bind(d),d.green=r.green.bind(d),d.yellow=r.yellow.bind(d),d.blue=r.blue.bind(d),d.magenta=r.magenta.bind(d),d.cyan=r.cyan.bind(d),d.white=r.white.bind(d),d.gray=r.gray.bind(d),d.grey=r.grey.bind(d),d.bgBlack=r.bgBlack.bind(d),d.bgRed=r.bgRed.bind(d),d.bgGreen=r.bgGreen.bind(d),d.bgYellow=r.bgYellow.bind(d),d.bgBlue=r.bgBlue.bind(d),d.bgMagenta=r.bgMagenta.bind(d),d.bgCyan=r.bgCyan.bind(d),d.bgWhite=r.bgWhite.bind(d),d}function a(f,u){let d={open:`\x1B[${f}m`,close:`\x1B[${u}m`,rgx:new RegExp(`\\x1b\\[${u}m`,"g")};return function(h){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(f)||(this.has.push(f),this.keys.push(d)),h===void 0?this:r.enabled?o(this.keys,h+""):h+""):h===void 0?c([f],[d]):r.enabled?o([d],h+""):h+""}}return nu=r,nu}var iu,py;function II(){return py||(py=1,iu=(e,t)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(t){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}),iu}var su,gy;function Nm(){return gy||(gy=1,su=e=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(t,"g");return typeof e=="string"?e.replace(n,""):e}),su}var ou,my;function nr(){if(my)return ou;my=1;const e="\x1B",t=`${e}[`,n="\x07",i={to(o,c){return c?`${t}${c+1};${o+1}H`:`${t}${o+1}G`},move(o,c){let a="";return o<0?a+=`${t}${-o}D`:o>0&&(a+=`${t}${o}C`),c<0?a+=`${t}${-c}A`:c>0&&(a+=`${t}${c}B`),a},up:(o=1)=>`${t}${o}A`,down:(o=1)=>`${t}${o}B`,forward:(o=1)=>`${t}${o}C`,backward:(o=1)=>`${t}${o}D`,nextLine:(o=1)=>`${t}E`.repeat(o),prevLine:(o=1)=>`${t}F`.repeat(o),left:`${t}G`,hide:`${t}?25l`,show:`${t}?25h`,save:`${e}7`,restore:`${e}8`},s={up:(o=1)=>`${t}S`.repeat(o),down:(o=1)=>`${t}T`.repeat(o)},r={screen:`${t}2J`,up:(o=1)=>`${t}1J`.repeat(o),down:(o=1)=>`${t}J`.repeat(o),line:`${t}2K`,lineEnd:`${t}K`,lineStart:`${t}1K`,lines(o){let c="";for(let a=0;a<o;a++)c+=this.line+(a<o-1?i.up():"");return o&&(c+=i.left),c}};return ou={cursor:i,scroll:s,erase:r,beep:n},ou}var au,yy;function LI(){if(yy)return au;yy=1;const e=Nm(),{erase:t,cursor:n}=nr(),i=s=>[...e(s)].length;return au=function(s,r){if(!r)return t.line+n.to(0);let o=0;const c=s.split(/\r?\n/);for(let a of c)o+=1+Math.floor(Math.max(i(a)-1,0)/r);return t.lines(o)},au}var uu,vy;function AT(){if(vy)return uu;vy=1;const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},t={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};return uu=process.platform==="win32"?t:e,uu}var cu,Ey;function kI(){if(Ey)return cu;Ey=1;const e=rr(),t=AT(),n=Object.freeze({password:{scale:1,render:a=>"*".repeat(a.length)},emoji:{scale:2,render:a=>"😃".repeat(a.length)},invisible:{scale:0,render:a=>""},default:{scale:1,render:a=>`${a}`}}),i=a=>n[a]||n.default,s=Object.freeze({aborted:e.red(t.cross),done:e.green(t.tick),exited:e.yellow(t.cross),default:e.cyan("?")});return cu={styles:n,render:i,symbols:s,symbol:(a,f,u)=>f?s.aborted:u?s.exited:a?s.done:s.default,delimiter:a=>e.gray(a?t.ellipsis:t.pointerSmall),item:(a,f)=>e.gray(a?f?t.pointerSmall:"+":t.line)},cu}var lu,_y;function $I(){if(_y)return lu;_y=1;const e=Nm();return lu=function(t,n){let i=String(e(t)||"").split(/\r?\n/);return n?i.map(s=>Math.ceil(s.length/n)).reduce((s,r)=>s+r):i.length},lu}var fu,by;function NI(){return by||(by=1,fu=(e,t={})=>{const n=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map(s=>s.split(/\s+/g).reduce((r,o)=>(o.length+n.length>=i||r[r.length-1].length+o.length+1<i?r[r.length-1]+=` ${o}`:r.push(`${n}${o}`),r),[n]).join(` `)).join(` `)}),fu}var hu,wy;function PI(){return wy||(wy=1,hu=(e,t,n)=>{n=n||t;let i=Math.min(t-n,e-Math.floor(n/2));i<0&&(i=0);let s=Math.min(i+n,t);return{startIndex:i,endIndex:s}}),hu}var du,Dy;function lr(){return Dy||(Dy=1,du={action:II(),clear:LI(),style:kI(),strip:Nm(),figures:AT(),lines:$I(),wrap:NI(),entriesToDisplay:PI()}),du}var pu,Sy;function Lr(){if(Sy)return pu;Sy=1;const e=RI,{action:t}=lr(),n=Ut,{beep:i,cursor:s}=nr(),r=rr();class o extends n{constructor(a={}){super(),this.firstRender=!0,this.in=a.stdin||process.stdin,this.out=a.stdout||process.stdout,this.onRender=(a.onRender||(()=>{})).bind(this);const f=e.createInterface({input:this.in,escapeCodeTimeout:50});e.emitKeypressEvents(this.in,f),this.in.isTTY&&this.in.setRawMode(!0);const u=(d,h)=>{let l=t(h,this.isSelect);l===!1?this._&&this._(d,h):typeof this[l]=="function"?this[l](h):this.bell()};this.close=()=>{this.out.write(s.show),this.in.removeListener("keypress",u),this.in.isTTY&&this.in.setRawMode(!1),f.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",u)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(i)}render(){this.onRender(r),this.firstRender&&(this.firstRender=!1)}}return pu=o,pu}var gu,Ay;function BI(){if(Ay)return gu;Ay=1;const e=rr(),t=Lr(),{erase:n,cursor:i}=nr(),{style:s,clear:r,lines:o,figures:c}=lr();class a extends t{constructor(u={}){super(u),this.transform=s.render(u.style),this.scale=this.transform.scale,this.msg=u.message,this.initial=u.initial||"",this.validator=u.validate||(()=>!0),this.value="",this.errorMsg=u.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=r("",this.out.columns),this.render()}set value(u){!u&&this.initial?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(u)),this._value=u,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(` `),this.close()}async validate(){let u=await this.validator(this.value);typeof u=="string"&&(this.errorMsg=u,u=!1),this.error=!u}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(` `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(u){this.placeholder||(this.cursor=this.cursor+u,this.cursorOffset+=u)}_(u,d){let h=this.value.slice(0,this.cursor),l=this.value.slice(this.cursor);this.value=`${h}${u}${l}`,this.red=!1,this.cursor=this.placeholder?0:h.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let u=this.value.slice(0,this.cursor-1),d=this.value.slice(this.cursor);this.value=`${u}${d}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let u=this.value.slice(0,this.cursor),d=this.value.slice(this.cursor+1);this.value=`${u}${d}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(i.down(o(this.outputError,this.out.columns)-1)+r(this.outputError,this.out.columns)),this.out.write(r(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[s.symbol(this.done,this.aborted),e.bold(this.msg),s.delimiter(this.done),this.red?e.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(` `).reduce((u,d,h)=>u+` ${h?" ":c.pointerSmall} ${e.red().italic(d)}`,"")),this.out.write(n.line+i.to(0)+this.outputText+i.save+this.outputError+i.restore+i.move(this.cursorOffset,0)))}}return gu=a,gu}var mu,Ry;function MI(){if(Ry)return mu;Ry=1;const e=rr(),t=Lr(),{style:n,clear:i,figures:s,wrap:r,entriesToDisplay:o}=lr(),{cursor:c}=nr();class a extends t{constructor(u={}){super(u),this.isSelect=!0,this.msg=u.message,this.hint=u.hint||"- Use arrow-keys. Return to submit.",this.warn=u.warn||"- This option is disabled",this.cursor=u.initial||0,this.choices=u.choices.map((d,h)=>(typeof d=="string"&&(d={title:d,value:h}),{title:d&&(d.title||d.value||d),value:d&&(d.value===void 0?h:d.value),description:d&&d.description,selected:d&&d.selected,disabled:d&&d.disabled})),this.optionsPerPage=u.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=i("",this.out.columns),this.render()}moveCursor(u){this.cursor=u,this.value=this.choices[u].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(` `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(` `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(u,d){if(u===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(c.hide):this.out.write(i(this.outputText,this.out.columns)),super.render();let{startIndex:u,endIndex:d}=o(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[n.symbol(this.done,this.aborted),e.bold(this.msg),n.delimiter(!1),this.done?this.selection.title:this.selection.disabled?e.yellow(this.warn):e.gray(this.hint)].join(" "),!this.done){this.outputText+=` `;for(let h=u;h<d;h++){let l,p,g="",m=this.choices[h];h===u&&u>0?p=s.arrowUp:h===d-1&&d<this.choices.length?p=s.arrowDown:p=" ",m.disabled?(l=this.cursor===h?e.gray().underline(m.title):e.strikethrough().gray(m.title),p=(this.cursor===h?e.bold().gray(s.pointer)+" ":" ")+p):(l=this.cursor===h?e.cyan().underline(m.title):m.title,p=(this.cursor===h?e.cyan(s.pointer)+" ":" ")+p,m.description&&this.cursor===h&&(g=` - ${m.description}`,(p.length+l.length+g.length>=this.out.columns||m.description.split(/\r?\n/).length>1)&&(g=` `+r(m.description,{margin:3,width:this.out.columns})))),this.outputText+=`${p} ${l}${e.gray(g)} `}}this.out.write(this.outputText)}}return mu=a,mu}var yu,Cy;function qI(){if(Cy)return yu;Cy=1;const e=rr(),t=Lr(),{style:n,clear:i}=lr(),{cursor:s,erase:r}=nr();class o extends t{constructor(a={}){super(a),this.msg=a.message,this.value=!!a.initial,this.active=a.active||"on",this.inactive=a.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(` `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(` `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(a,f){if(a===" ")this.value=!this.value;else if(a==="1")this.value=!0;else if(a==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(s.hide):this.out.write(i(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),e.bold(this.msg),n.delimiter(this.done),this.value?this.inactive:e.cyan().underline(this.inactive),e.gray("/"),this.value?e.cyan().underline(this.active):this.active].join(" "),this.out.write(r.line+s.to(0)+this.outputText))}}return yu=o,yu}var vu,Ty;function Sr(){if(Ty)return vu;Ty=1;class e{constructor({token:n,date:i,parts:s,locales:r}){this.token=n,this.date=i||new Date,this.parts=s||[this],this.locales=r||{}}up(){}down(){}next(){const n=this.parts.indexOf(this);return this.parts.find((i,s)=>s>n&&i instanceof e)}setTo(n){}prev(){let n=[].concat(this.parts).reverse();const i=n.indexOf(this);return n.find((s,r)=>r>i&&s instanceof e)}toString(){return String(this.date)}}return vu=e,vu}var Eu,Oy;function jI(){if(Oy)return Eu;Oy=1;const e=Sr();class t extends e{constructor(i={}){super(i)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let i=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?i.toUpperCase():i}}return Eu=t,Eu}var _u,xy;function UI(){if(xy)return _u;xy=1;const e=Sr(),t=i=>(i=i%10,i===1?"st":i===2?"nd":i===3?"rd":"th");class n extends e{constructor(s={}){super(s)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(s){this.date.setDate(parseInt(s.substr(-2)))}toString(){let s=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(s).padStart(2,"0"):this.token==="Do"?s+t(s):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:s}}return _u=n,_u}var bu,Fy;function HI(){if(Fy)return bu;Fy=1;const e=Sr();class t extends e{constructor(i={}){super(i)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(i){this.date.setHours(parseInt(i.substr(-2)))}toString(){let i=this.date.getHours();return/h/.test(this.token)&&(i=i%12||12),this.token.length>1?String(i).padStart(2,"0"):i}}return bu=t,bu}var wu,Iy;function zI(){if(Iy)return wu;Iy=1;const e=Sr();class t extends e{constructor(i={}){super(i)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(i){this.date.setMilliseconds(parseInt(i.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}return wu=t,wu}var Du,Ly;function GI(){if(Ly)return Du;Ly=1;const e=Sr();class t extends e{constructor(i={}){super(i)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(i){this.date.setMinutes(parseInt(i.substr(-2)))}toString(){let i=this.date.getMinutes();return this.token.length>1?String(i).padStart(2,"0"):i}}return Du=t,Du}var Su,ky;function WI(){if(ky)return Su;ky=1;const e=Sr();class t extends e{constructor(i={}){super(i)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(i){i=parseInt(i.substr(-2))-1,this.date.setMonth(i<0?0:i)}toString(){let i=this.date.getMonth(),s=this.token.length;return s===2?String(i+1).padStart(2,"0"):s===3?this.locales.monthsShort[i]:s===4?this.locales.months[i]:String(i+1)}}return Su=t,Su}var Au,$y;function VI(){if($y)return Au;$y=1;const e=Sr();class t extends e{constructor(i={}){super(i)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(i){this.date.setSeconds(parseInt(i.substr(-2)))}toString(){let i=this.date.getSeconds();return this.token.length>1?String(i).padStart(2,"0"):i}}return Au=t,Au}var Ru,Ny;function YI(){if(Ny)return Ru;Ny=1;const e=Sr();class t extends e{constructor(i={}){super(i)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(i){this.date.setFullYear(i.substr(-4))}toString(){let i=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?i.substr(-2):i}}return Ru=t,Ru}var Cu,Py;function KI(){return Py||(Py=1,Cu={DatePart:Sr(),Meridiem:jI(),Day:UI(),Hours:HI(),Milliseconds:zI(),Minutes:GI(),Month:WI(),Seconds:VI(),Year:YI()}),Cu}var Tu,By;function ZI(){if(By)return Tu;By=1;const e=rr(),t=Lr(),{style:n,clear:i,figures:s}=lr(),{erase:r,cursor:o}=nr(),{DatePart:c,Meridiem:a,Day:f,Hours:u,Milliseconds:d,Minutes:h,Month:l,Seconds:p,Year:g}=KI(),m=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,y={1:({token:_})=>_.replace(/\\(.)/g,"$1"),2:_=>new f(_),3:_=>new l(_),4:_=>new g(_),5:_=>new a(_),6:_=>new u(_),7:_=>new h(_),8:_=>new p(_),9:_=>new d(_)},E={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class v extends t{constructor(b={}){super(b),this.msg=b.message,this.cursor=0,this.typed="",this.locales=Object.assign(E,b.locales),this._date=b.initial||new Date,this.errorMsg=b.error||"Please Enter A Valid Value",this.validator=b.validate||(()=>!0),this.mask=b.mask||"YYYY-MM-DD HH:mm:ss",this.clear=i("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(b){b&&this._date.setTime(b.getTime())}set mask(b){let w;for(this.parts=[];w=m.exec(b);){let R=w.shift(),C=w.findIndex(x=>x!=null);this.parts.push(C in y?y[C]({token:w[C]||R,date:this.date,parts:this.parts,locales:this.locales}):w[C]||R)}let A=this.parts.reduce((R,C)=>(typeof C=="string"&&typeof R[R.length-1]=="string"?R[R.length-1]+=C:R.push(C),R),[]);this.parts.splice(0),this.parts.push(...A),this.reset()}moveCursor(b){this.typed="",this.cursor=b,this.fire()}reset(){this.moveCursor(this.parts.findIndex(b=>b instanceof c)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(` `),this.close()}async validate(){let b=await this.validator(this.value);typeof b=="string"&&(this.errorMsg=b,b=!1),this.error=!b}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(` `),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let b=this.parts[this.cursor].prev();if(b==null)return this.bell();this.moveCursor(this.parts.indexOf(b)),this.render()}right(){let b=this.parts[this.cursor].next();if(b==null)return this.bell();this.moveCursor(this.parts.indexOf(b)),this.render()}next(){let b=this.parts[this.cursor].next();this.moveCursor(b?this.parts.indexOf(b):this.parts.findIndex(w=>w instanceof c)),this.render()}_(b){/\d/.test(b)&&(this.typed+=b,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(o.hide):this.out.write(i(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),e.bold(this.msg),n.delimiter(!1),this.parts.reduce((b,w,A)=>b.concat(A===this.cursor&&!this.done?e.cyan().underline(w.toString()):w),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(` `).reduce((b,w,A)=>b+` ${A?" ":s.pointerSmall} ${e.red().italic(w)}`,"")),this.out.write(r.line+o.to(0)+this.outputText))}}return Tu=v,Tu}var Ou,My;function JI(){if(My)return Ou;My=1;const e=rr(),t=Lr(),{cursor:n,erase:i}=nr(),{style:s,figures:r,clear:o,lines:c}=lr(),a=/[0-9]/,f=h=>h!==void 0,u=(h,l)=>{let p=Math.pow(10,l);return Math.round(h*p)/p};class d extends t{constructor(l={}){super(l),this.transform=s.render(l.style),this.msg=l.message,this.initial=f(l.initial)?l.initial:"",this.float=!!l.float,this.round=l.round||2,this.inc=l.increment||1,this.min=f(l.min)?l.min:-1/0,this.max=f(l.max)?l.max:1/0,this.errorMsg=l.error||"Please Enter A Valid Value",this.validator=l.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(l){!l&&l!==0?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${u(l,this.round)}`),this._value=u(l,this.round)),this.fire()}get value(){return this._value}parse(l){return this.float?parseFloat(l):parseInt(l)}valid(l){return l==="-"||l==="."&&this.float||a.test(l)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let l=this.value;this.value=l!==""?l:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(` `),this.close()}async validate(){let l=await this.validator(this.value);typeof l=="string"&&(this.errorMsg=l,l=!1),this.error=!l}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let l=this.value;this.value=l!==""?l:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(` `),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let l=this.value.toString();if(l.length===0)return this.bell();this.value=this.parse(l=l.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(l,p){if(!this.valid(l))return this.bell();const g=Date.now();if(g-this.lastHit>1e3&&(this.typed=""),this.typed+=l,this.lastHit=g,this.color="cyan",l===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(n.down(c(this.outputError,this.out.columns)-1)+o(this.outputError,this.out.columns)),this.out.write(o(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[s.symbol(this.done,this.aborted),e.bold(this.msg),s.delimiter(this.done),!this.done||!this.done&&!this.placeholder?e[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(` `).reduce((l,p,g)=>l+` ${g?" ":r.pointerSmall} ${e.red().italic(p)}`,"")),this.out.write(i.line+n.to(0)+this.outputText+n.save+this.outputError+n.restore))}}return Ou=d,Ou}var xu,qy;function RT(){if(qy)return xu;qy=1;const e=rr(),{cursor:t}=nr(),n=Lr(),{clear:i,figures:s,style:r,wrap:o,entriesToDisplay:c}=lr();class a extends n{constructor(u={}){super(u),this.isSelect=!0,this.msg=u.message,this.cursorStart=u.choices.findIndex(d=>!d.heading),this.cursor=u.cursor||this.cursorStart,this.scrollIndex=u.cursor||0,this.hint=u.hint||"",this.warn=u.warn||"- This option is disabled -",this.minSelected=u.min,this.showMinError=!1,this.maxChoices=u.max,this.instructions=u.instructions,this.optionsPerPage=u.optionsPerPage||10,this.value=u.choices.map((d,h)=>(typeof d=="string"&&(d={title:d,value:h}),{title:d&&(d.title||d.value||d),description:d&&d.description,value:d&&(d.value===void 0?h:d.value),selected:d&&d.selected,disabled:d&&d.disabled,heading:d&&d.heading})),this.clear=i("",this.out.columns),u.overrideRender||this.render()}reset(){this.value.map(u=>!u.selected),this.cursor=this.cursorStart,this.fire(),this.render()}selected(){return this.value.filter(u=>u.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(` `),this.close()}submit(){const u=this.value.filter(d=>d.selected);this.minSelected&&u.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(` `),this.close())}first(){this.cursor=this.cursorStart,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.value[this.cursor].heading&&this.next(),this.render()}up(){this.cursor===this.cursorStart?this.cursor=this.value.length-1:this.cursor--,this.value[this.cursor].heading&&this.up(),this.render()}down(){this.cursor===this.value.length-1?this.cursor=this.cursorStart:this.cursor++,this.value[this.cursor].heading&&this.down(),this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(u=>u.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const u=this.value[this.cursor];if(u.selected)u.selected=!1,this.render();else{if(u.disabled||this.value.filter(d=>d.selected).length>=this.maxChoices)return this.bell();u.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const u=!this.value[this.cursor].selected;this.value.filter(d=>!d.disabled&&!d.heading).forEach(d=>d.selected=u),this.render()}_(u,d){if(u===" ")this.handleSpaceToggle();else if(u==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:` Instructions: ${s.arrowUp}/${s.arrowDown}: Highlight option ${s.arrowLeft}/${s.arrowRight}/[space]: Toggle selection `+(this.maxChoices===void 0?` a: Toggle all `:"")+" enter/return: Complete answer":""}renderOption(u,d,h,l){const p=(u===h?"❯ ":" ")+(d.selected?e.green(s.radioOn):s.radioOff)+" ";let g,m;if(d.disabled)g=u===h?e.gray(d.title):e.strikethrough().gray(d.title);else{if(d.heading)return g=d.title,g+e.gray(m||"");g=d.title,u===h&&d.description&&(m=` - ${d.description}`,(p.length+g.length+m.length>=this.out.columns||d.description.split(/\r?\n/).length>1)&&(m=` `+o(d.description,{margin:p.length,width:this.out.columns})))}return p+g+e.gray(m||"")}paginateOptions(u){if(u.length===0)return e.red("No matches for this query.");let{startIndex:d,endIndex:h}=c(this.cursor,u.length,this.optionsPerPage),l,p=[];for(let g=d;g<h;g++)g===d&&d>0?l=s.arrowUp:g===h-1&&h<u.length?l=s.arrowDown:l=" ",p.push(this.renderOption(this.cursor,u[g],g,l));return` `+p.join(` `)}renderOptions(u){return this.done?"":this.paginateOptions(u)}renderDoneOrInstructions(){if(this.done)return"";const u=[e.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&u.push(e.yellow(this.warn)),u.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(t.hide),super.render();let u=[r.symbol(this.done,this.aborted),e.bold(this.msg),r.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(u+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),u+=this.renderOptions(this.value),this.out.write(this.clear+u),this.clear=i(u,this.out.columns)}}return xu=a,xu}var Fu,jy;function XI(){if(jy)return Fu;jy=1;const e=rr(),t=Lr(),{erase:n,cursor:i}=nr(),{style:s,clear:r,figures:o,wrap:c,entriesToDisplay:a}=lr(),f=(l,p)=>l[p]&&(l[p].value||l[p].title||l[p]),u=(l,p)=>l[p]&&(l[p].title||l[p].value||l[p]),d=(l,p)=>{const g=l.findIndex(m=>m.value===p||m.title===p);return g>-1?g:void 0};class h extends t{constructor(p={}){super(p),this.msg=p.message,this.suggest=p.suggest,this.choices=p.choices,this.initial=typeof p.initial=="number"?p.initial:d(p.choices,p.initial),this.select=this.initial||p.cursor||0,this.i18n={noMatches:p.noMatches||"no matches found"},this.fallback=p.fallback||this.initial,this.clearFirst=p.clearFirst||!1,this.suggestions=[],this.input="",this.limit=p.limit||10,this.cursor=0,this.transform=s.render(p.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=r("",this.out.columns),this.complete(this.render),this.render()}set fallback(p){this._fb=Number.isSafeInteger(parseInt(p))?parseInt(p):p}get fallback(){let p;return typeof this._fb=="number"?p=this.choices[this._fb]:typeof this._fb=="string"&&(p={title:this._fb}),p||this._fb||{title:this.i18n.noMatches}}moveSelect(p){this.select=p,this.suggestions.length>0?this.value=f(this.suggestions,p):this.value=this.fallback.value,this.fire()}async complete(p){const g=this.completing=this.suggest(this.input,this.choices),m=await g;if(this.completing!==g)return;this.suggestions=m.map((E,v,_)=>({title:u(_,v),value:f(_,v),description:E.description})),this.completing=!1;const y=Math.max(m.length-1,0);this.moveSelect(Math.min(y,this.select)),p&&p()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(` `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(` `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(` `),this.close()}_(p,g){let m=this.input.slice(0,this.cursor),y=this.input.slice(this.cursor);this.input=`${m}${p}${y}`,this.cursor=m.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let p=this.input.slice(0,this.cursor-1),g=this.input.slice(this.cursor);this.input=`${p}${g}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let p=this.input.slice(0,this.cursor),g=this.input.slice(this.cursor+1);this.input=`${p}${g}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(p,g,m,y){let E,v=m?o.arrowUp:y?o.arrowDown:" ",_=g?e.cyan().underline(p.title):p.title;return v=(g?e.cyan(o.pointer)+" ":" ")+v,p.description&&(E=` - ${p.description}`,(v.length+_.length+E.length>=this.out.columns||p.description.split(/\r?\n/).length>1)&&(E=` `+c(p.description,{margin:3,width:this.out.columns}))),v+" "+_+e.gray(E||"")}render(){if(this.closed)return;this.firstRender?this.out.write(i.hide):this.out.write(r(this.outputText,this.out.columns)),super.render();let{startIndex:p,endIndex:g}=a(this.select,this.choices.length,this.limit);if(this.outputText=[s.symbol(this.done,this.aborted,this.exited),e.bold(this.msg),s.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const m=this.suggestions.slice(p,g).map((y,E)=>this.renderOption(y,this.select===E+p,E===0&&p>0,E+p===g-1&&g<this.choices.length)).join(` `);this.outputText+=` `+(m||e.gray(this.fallback.title))}this.out.write(n.line+i.to(0)+this.outputText)}}return Fu=h,Fu}var Iu,Uy;function QI(){if(Uy)return Iu;Uy=1;const e=rr(),{cursor:t}=nr(),n=RT(),{clear:i,style:s,figures:r}=lr();class o extends n{constructor(a={}){a.overrideRender=!0,super(a),this.inputValue="",this.clear=i("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(a=>a.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const a=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(u=>this.inputValue?!!(typeof u.title=="string"&&u.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof u.value=="string"&&u.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);const f=this.filteredOptions.findIndex(u=>u===a);this.cursor=f<0?0:f,this.render()}handleSpaceToggle(){const a=this.filteredOptions[this.cursor];if(a.selected)a.selected=!1,this.render();else{if(a.disabled||this.value.filter(f=>f.selected).length>=this.maxChoices)return this.bell();a.selected=!0,this.render()}}handleInputChange(a){this.inputValue=this.inputValue+a,this.updateFilteredOptions()}_(a,f){a===" "?this.handleSpaceToggle():this.handleInputChange(a)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:` Instructions: ${r.arrowUp}/${r.arrowDown}: Highlight option ${r.arrowLeft}/${r.arrowRight}/[space]: Toggle selection [a,b,c]/delete: Filter choices enter/return: Complete answer `:""}renderCurrentInput(){return` Filtered results for: ${this.inputValue?this.inputValue:e.gray("Enter something to filter")} `}renderOption(a,f,u,d){const h=(f.selected?e.green(r.radioOn):r.radioOff)+" "+d+" ";let l;return f.disabled?l=a===u?e.gray().underline(f.title):e.strikethrough().gray(f.title):l=a===u?e.cyan().underline(f.title):f.title,h+l}renderDoneOrInstructions(){if(this.done)return this.value.filter(f=>f.selected).map(f=>f.title).join(", ");const a=[e.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&a.push(e.yellow(this.warn)),a.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(t.hide),super.render();let a=[s.symbol(this.done,this.aborted),e.bold(this.msg),s.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(a+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),a+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+a),this.clear=i(a,this.out.columns)}}return Iu=o,Iu}var Lu,Hy;function e2(){if(Hy)return Lu;Hy=1;const e=rr(),t=Lr(),{style:n,clear:i}=lr(),{erase:s,cursor:r}=nr();class o extends t{constructor(a={}){super(a),this.msg=a.message,this.value=a.initial,this.initialValue=!!a.initial,this.yesMsg=a.yes||"yes",this.yesOption=a.yesOption||"(Y/n)",this.noMsg=a.no||"no",this.noOption=a.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(` `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(` `),this.close()}_(a,f){return a.toLowerCase()==="y"?(this.value=!0,this.submit()):a.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){if(this.closed)return;this.firstRender?this.out.write(r.hide):this.out.write(i(this.outputText,this.out.columns)),super.render();const a=this.aborted||this.done&&!this.value;this.outputText=[n.symbol(this.done,a),e.bold(this.msg),n.delimiter(this.done),this.done?this.value&&!this.aborted?this.yesMsg:this.noMsg:e.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(s.line+r.to(0)+this.outputText)}}return Lu=o,Lu}var ku,zy;function t2(){return zy||(zy=1,ku={TextPrompt:BI(),SelectPrompt:MI(),TogglePrompt:qI(),DatePrompt:ZI(),NumberPrompt:JI(),MultiselectPrompt:RT(),AutocompletePrompt:XI(),AutocompleteMultiselectPrompt:QI(),ConfirmPrompt:e2()}),ku}var Gy;function r2(){return Gy||(Gy=1,function(e){const t=e,n=t2(),i=o=>o;function s(o,c,a={}){return new Promise((f,u)=>{const d=new n[o](c),h=a.onAbort||i,l=a.onSubmit||i,p=a.onExit||i;d.on("state",c.onState||i),d.on("submit",g=>f(l(g))),d.on("exit",g=>f(p(g))),d.on("abort",g=>u(h(g)))})}t.text=o=>s("TextPrompt",o),t.password=o=>(o.style="password",t.text(o)),t.invisible=o=>(o.style="invisible",t.text(o)),t.number=o=>s("NumberPrompt",o),t.date=o=>s("DatePrompt",o),t.confirm=o=>s("ConfirmPrompt",o),t.list=o=>{const c=o.separator||",";return s("TextPrompt",o,{onSubmit:a=>a.split(c).map(f=>f.trim())})},t.toggle=o=>s("TogglePrompt",o),t.select=o=>s("SelectPrompt",o),t.multiselect=o=>{o.choices=[].concat(o.choices||[]);const c=a=>a.filter(f=>f.selected).map(f=>f.value);return s("MultiselectPrompt",o,{onAbort:c,onSubmit:c})},t.autocompleteMultiselect=o=>{o.choices=[].concat(o.choices||[]);const c=a=>a.filter(f=>f.selected).map(f=>f.value);return s("AutocompleteMultiselectPrompt",o,{onAbort:c,onSubmit:c})};const r=(o,c)=>Promise.resolve(c.filter(a=>a.title.slice(0,o.length).toLowerCase()===o.toLowerCase()));t.autocomplete=o=>(o.suggest=o.suggest||r,o.choices=[].concat(o.choices||[]),s("AutocompletePrompt",o))}(ru)),ru}var $u,Wy;function n2(){if(Wy)return $u;Wy=1;const e=r2(),t=["suggest","format","onState","validate","onRender","type"],n=()=>{};async function i(c=[],{onSubmit:a=n,onCancel:f=n}={}){const u={},d=i._override||{};c=[].concat(c);let h,l,p,g,m,y;const E=async(v,_,b=!1)=>{if(!(!b&&v.validate&&v.validate(_)!==!0))return v.format?await v.format(_,u):_};for(l of c)if({name:g,type:m}=l,typeof m=="function"&&(m=await m(h,{...u},l),l.type=m),!!m){for(let v in l){if(t.includes(v))continue;let _=l[v];l[v]=typeof _=="function"?await _(h,{...u},y):_}if(y=l,typeof l.message!="string")throw new Error("prompt message is required");if({name:g,type:m}=l,e[m]===void 0)throw new Error(`prompt type (${m}) is not defined`);if(d[l.name]!==void 0&&(h=await E(l,d[l.name]),h!==void 0)){u[g]=h;continue}try{h=i._injected?s(i._injected,l.initial):await e[m](l),u[g]=h=await E(l,h,!0),p=await a(l,h,u)}catch{p=!await f(l,u)}if(p)return u}return u}function s(c,a){const f=c.shift();if(f instanceof Error)throw f;return f===void 0?a:f}function r(c){i._injected=(i._injected||[]).concat(c)}function o(c){i._override=Object.assign({},c)}return $u=Object.assign(i,{prompt:i,prompts:e,inject:r,override:o}),$u}var Nu,Vy;function i2(){return Vy||(Vy=1,Nu=n2()),Nu}var s2=i2();const Uo=tt(s2),o2="npm-check-updates",a2="19.6.6",u2="Tomas Junnonen <tomas1@gmail.com>",c2="Apache-2.0",l2=["Raine Revere (https://github.com/raineorshine)","Imamuzzaki Abu Salam <imamuzzaki@gmail.com>"],f2="Find newer versions of dependencies than what your package.json allows",h2=["dependencies","npm","package.json","update","upgrade","versions"],d2={node:">=20.0.0",npm:">=8.12.1"},p2="build/index.js",g2="build/index.d.ts",m2={build:"rimraf build && npm run build:options && vite build","build:options":"vite-node src/scripts/build-options.ts","build:analyze":"rimraf build && npm run build:options && ANALYZER=true vite build",lint:"cross-env FORCE_COLOR=1 npm-run-all --parallel --aggregate-output lint:*","lint:lockfile":"lockfile-lint","lint:markdown":'markdownlint "**/*.md" --ignore "**/node_modules/**/*.md" --ignore build --config .markdownlint.js',"lint:src":"eslint --cache --cache-location node_modules/.cache/.eslintcache --ignore-path .gitignore --report-unused-disable-directives .",prepare:"src/scripts/install-hooks",prepublishOnly:"npm run build",prettier:"prettier . --check","prettier:fix":"prettier . --write",test:"npm run test:unit && npm run test:e2e","test:bun":"test/bun-install.sh && mocha test/bun","test:unit":"mocha test test/package-managers/*","test:e2e":"./test/e2e.sh",ncu:"node build/cli.js"},y2={"npm-check-updates":"build/cli.js",ncu:"build/cli.js"},v2={type:"git",url:"git+https://github.com/raineorshine/npm-check-updates.git"},E2="https://github.com/raineorshine/npm-check-updates",_2={url:"https://github.com/raineorshine/npm-check-updates/issues"},b2={ip:"2.0.1","@yarnpkg/parsers":"2.6.0"},w2={"@streamparser/json":"^0.0.22","@trivago/prettier-plugin-sort-imports":"^5.2.2","@types/bun":"^1.2.23","@types/chai":"^4.3.19","@types/chai-as-promised":"^8.0.0","@types/chai-string":"^1.4.5","@types/cli-table":"^0.3.4","@types/hosted-git-info":"^3.0.5","@types/ini":"^4.1.1","@types/js-yaml":"^4.0.9","@types/jsonlines":"^0.1.5","@types/lodash":"^4.17.20","@types/mocha":"^10.0.10","@types/node":"^24.5.2","@types/npm-registry-fetch":"^8.0.8","@types/parse-github-url":"^1.0.3","@types/picomatch":"^4.0.2","@types/progress":"^2.0.7","@types/prompts":"^2.4.9","@types/semver":"^7.7.1","@types/semver-utils":"^1.1.3","@types/sinon":"^17.0.4","@types/update-notifier":"^6.0.8","@typescript-eslint/eslint-plugin":"^8.44.1","@typescript-eslint/parser":"^8.44.1",camelcase:"^6.3.0",chai:"^4.3.10","chai-as-promised":"^7.1.2","chai-string":"^1.6.0",chalk:"^5.6.2","cli-table3":"^0.6.5",commander:"^14.0.1","cross-env":"^10.0.0",dequal:"^2.0.3",eslint:"^8.57.0","eslint-config-prettier":"^10.1.8","eslint-config-raine":"^0.5.0","eslint-config-standard":"^17.1.0","eslint-plugin-import":"^2.32.0","eslint-plugin-jsdoc":"^60.5.0","eslint-plugin-n":"^16.6.2","eslint-plugin-promise":"^6.6.0","fast-glob":"^3.3.3","fast-memoize":"^2.5.2","find-up":"5.0.0","fp-and-or":"^1.0.2","hosted-git-info":"^9.0.0",ini:"^5.0.0","js-yaml":"^4.1.0","jsonc-parser":"^3.3.1",jsonlines:"^0.1.1","lockfile-lint":"^4.14.1",lodash:"^4.17.21","markdownlint-cli":"^0.45.0",mocha:"^11.7.2","npm-registry-fetch":"^19.0.0","npm-run-all":"^4.1.5","p-map":"^4.0.0","parse-github-url":"^1.0.3",picomatch:"^4.0.3",prettier:"^3.6.2",progress:"^2.0.3","prompts-ncu":"^3.0.2","rc-config-loader":"^4.1.3",rfdc:"^1.4.1",rimraf:"^6.0.1","rollup-plugin-node-externals":"^8.1.1",semver:"^7.7.2","semver-utils":"^1.1.4",should:"^13.2.3",sinon:"^21.0.0","source-map-support":"^0.5.21","spawn-please":"^3.0.0","strip-ansi":"^7.1.2","ts-node":"^10.9.2",typescript:"^5.9.2","typescript-json-schema":"^0.65.1",untildify:"^4.0.0","update-notifier":"^7.3.1",verdaccio:"^6.1.6",vite:"^7.1.7","vite-bundle-analyzer":"^1.2.3","vite-node":"^3.2.4","vite-plugin-dts":"^4.5.4",yaml:"^2.8.2",yarn:"^1.22.22",zod:"^4.3.5"},D2=["build","!**/test/**"],S2={"check-leaks":!0,extension:["test.ts"],require:["source-map-support/register","ts-node/register"],timeout:6e4,"trace-deprecation":!0,"trace-warnings":!0,use_strict:!0},Ho={name:o2,version:a2,author:u2,license:c2,contributors:l2,description:f2,keywords:h2,engines:d2,main:p2,types:g2,scripts:m2,bin:y2,repository:v2,homepage:E2,bugs:_2,overrides:b2,devDependencies:w2,files:D2,"lockfile-lint":{"allowed-schemes":["https:","git+ssh:"],"allowed-hosts":["npm","github.com"],"empty-hostname":!1,type:"npm ",path:"package-lock.json"},mocha:S2};var Pu,Yy;function Pm(){if(Yy)return Pu;Yy=1;let e=[],t=0;const n=(i,s)=>{t>=s&&e.push(i)};return n.WARN=1,n.INFO=2,n.DEBUG=3,n.reset=()=>{e=[]},n.setDebugLevel=i=>{t=i},n.warn=i=>n(i,n.WARN),n.info=i=>n(i,n.INFO),n.debug=i=>n(i,n.DEBUG),n.debugMessages=()=>e,Pu=n,Pu}var bs={exports:{}},Bu,Ky;function A2(){return Ky||(Ky=1,Bu=({onlyFirst:e=!1}={})=>{const t=["[\\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(t,e?void 0:"g")}),Bu}var Mu,Zy;function R2(){if(Zy)return Mu;Zy=1;const e=A2();return Mu=t=>typeof t=="string"?t.replace(e(),""):t,Mu}var ws={exports:{}},Jy;function CT(){if(Jy)return ws.exports;Jy=1;const e=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);return ws.exports=e,ws.exports.default=e,ws.exports}var qu,Xy;function C2(){return Xy||(Xy=1,qu=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