shaders 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,223 +1,232 @@
1
1
  #!/usr/bin/env node
2
- /* shaders@4.0.0 CLI — npx shaders connect | install-mcp. https://shaders.com */
2
+ /* shaders@4.0.2 CLI — npx shaders connect | install-mcp. https://shaders.com */
3
3
  import { createRequire as __cliCreateRequire } from "module";
4
4
  const require = __cliCreateRequire(import.meta.url);
5
- var _D=Object.create;var zr=Object.defineProperty;var SD=Object.getOwnPropertyDescriptor;var TD=Object.getOwnPropertyNames;var $D=Object.getPrototypeOf,kD=Object.prototype.hasOwnProperty;var OD=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Yu=(e,t)=>()=>(e&&(t=e(e=0)),t);var z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),RD=(e,t)=>{for(var r in t)zr(e,r,{get:t[r],enumerable:!0})},ID=(e,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of TD(t))!kD.call(e,i)&&i!==r&&zr(e,i,{get:()=>t[i],enumerable:!(u=SD(t,i))||u.enumerable});return e};var Nt=(e,t,r)=>(r=e!=null?_D($D(e)):{},ID(t||!e||!e.__esModule?zr(r,"default",{value:e,enumerable:!0}):r,e));var wi={};RD(wi,{kCancel:()=>yi,prompt:()=>Ai});import ie,{stdin as tl,stdout as rl}from"node:process";import ri from"node:readline";import{WriteStream as nl}from"node:tty";function ul(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function il(){if(ni)return rn;ni=1;let e="\x1B",t=`${e}[`,r="\x07",u={to(n,o){return o?`${t}${o+1};${n+1}H`:`${t}${n+1}G`},move(n,o){let a="";return n<0?a+=`${t}${-n}D`:n>0&&(a+=`${t}${n}C`),o<0?a+=`${t}${-o}A`:o>0&&(a+=`${t}${o}B`),a},up:(n=1)=>`${t}${n}A`,down:(n=1)=>`${t}${n}B`,forward:(n=1)=>`${t}${n}C`,backward:(n=1)=>`${t}${n}D`,nextLine:(n=1)=>`${t}E`.repeat(n),prevLine:(n=1)=>`${t}F`.repeat(n),left:`${t}G`,hide:`${t}?25l`,show:`${t}?25h`,save:`${e}7`,restore:`${e}8`},i={up:(n=1)=>`${t}S`.repeat(n),down:(n=1)=>`${t}T`.repeat(n)},s={screen:`${t}2J`,up:(n=1)=>`${t}1J`.repeat(n),down:(n=1)=>`${t}J`.repeat(n),line:`${t}2K`,lineEnd:`${t}K`,lineStart:`${t}1K`,lines(n){let o="";for(let a=0;a<n;a++)o+=this.line+(a<n-1?u.up():"");return n&&(o+=u.left),o}};return rn={cursor:u,scroll:i,erase:s,beep:r},rn}function sl(){if(ui)return jt.exports;ui=1;let e=process||{},t=e.argv||[],r=e.env||{},u=!(r.NO_COLOR||t.includes("--no-color"))&&(!!r.FORCE_COLOR||t.includes("--color")||e.platform==="win32"||(e.stdout||{}).isTTY&&r.TERM!=="dumb"||!!r.CI),i=(o,a,D=o)=>c=>{let l=""+c,h=l.indexOf(a,o.length);return~h?o+s(l,a,D,h)+a:o+l+a},s=(o,a,D,c)=>{let l="",h=0;do l+=o.substring(h,c)+D,h=c+a.length,c=o.indexOf(a,h);while(~c);return l+o.substring(h)},n=(o=u)=>{let a=o?i:()=>String;return{isColorSupported:o,reset:a("\x1B[0m","\x1B[0m"),bold:a("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:a("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:a("\x1B[3m","\x1B[23m"),underline:a("\x1B[4m","\x1B[24m"),inverse:a("\x1B[7m","\x1B[27m"),hidden:a("\x1B[8m","\x1B[28m"),strikethrough:a("\x1B[9m","\x1B[29m"),black:a("\x1B[30m","\x1B[39m"),red:a("\x1B[31m","\x1B[39m"),green:a("\x1B[32m","\x1B[39m"),yellow:a("\x1B[33m","\x1B[39m"),blue:a("\x1B[34m","\x1B[39m"),magenta:a("\x1B[35m","\x1B[39m"),cyan:a("\x1B[36m","\x1B[39m"),white:a("\x1B[37m","\x1B[39m"),gray:a("\x1B[90m","\x1B[39m"),bgBlack:a("\x1B[40m","\x1B[49m"),bgRed:a("\x1B[41m","\x1B[49m"),bgGreen:a("\x1B[42m","\x1B[49m"),bgYellow:a("\x1B[43m","\x1B[49m"),bgBlue:a("\x1B[44m","\x1B[49m"),bgMagenta:a("\x1B[45m","\x1B[49m"),bgCyan:a("\x1B[46m","\x1B[49m"),bgWhite:a("\x1B[47m","\x1B[49m"),blackBright:a("\x1B[90m","\x1B[39m"),redBright:a("\x1B[91m","\x1B[39m"),greenBright:a("\x1B[92m","\x1B[39m"),yellowBright:a("\x1B[93m","\x1B[39m"),blueBright:a("\x1B[94m","\x1B[39m"),magentaBright:a("\x1B[95m","\x1B[39m"),cyanBright:a("\x1B[96m","\x1B[39m"),whiteBright:a("\x1B[97m","\x1B[39m"),bgBlackBright:a("\x1B[100m","\x1B[49m"),bgRedBright:a("\x1B[101m","\x1B[49m"),bgGreenBright:a("\x1B[102m","\x1B[49m"),bgYellowBright:a("\x1B[103m","\x1B[49m"),bgBlueBright:a("\x1B[104m","\x1B[49m"),bgMagentaBright:a("\x1B[105m","\x1B[49m"),bgCyanBright:a("\x1B[106m","\x1B[49m"),bgWhiteBright:a("\x1B[107m","\x1B[49m")}};return jt.exports=n(),jt.exports.createColors=n,jt.exports}function al({onlyFirst:e=!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,e?void 0:"g")}function di(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Dl,"")}function Fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function it(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=di(e),e.length===0))return 0;e=e.replace(fl()," ");let r=t.ambiguousIsNarrow?1:2,u=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(cl.eastAsianWidth(i)){case"F":case"W":u+=2;break;case"A":u+=r;break;default:u+=1}}return u}function Fl(){let e=new Map;for(let[t,r]of Object.entries(O)){for(let[u,i]of Object.entries(r))O[u]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[u]=O[u],e.set(i[0],i[1]);Object.defineProperty(O,t,{value:r,enumerable:!1})}return Object.defineProperty(O,"codes",{value:e,enumerable:!1}),O.color.close="\x1B[39m",O.bgColor.close="\x1B[49m",O.color.ansi=ii(),O.color.ansi256=si(),O.color.ansi16m=oi(),O.bgColor.ansi=ii(nn),O.bgColor.ansi256=si(nn),O.bgColor.ansi16m=oi(nn),Object.defineProperties(O,{rgbToAnsi256:{value:(t,r,u)=>t===r&&r===u?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(u/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[u]=r;u.length===3&&(u=[...u].map(s=>s+s).join(""));let i=Number.parseInt(u,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>O.rgbToAnsi256(...O.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,u,i;if(t>=232)r=((t-232)*10+8)/255,u=r,i=r;else{t-=16;let o=t%36;r=Math.floor(t/36)/5,u=Math.floor(o/6)/5,i=o%6/5}let s=Math.max(r,u,i)*2;if(s===0)return 30;let n=30+(Math.round(i)<<2|Math.round(u)<<1|Math.round(r));return s===2&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(t,r,u)=>O.ansi256ToAnsi(O.rgbToAnsi256(t,r,u)),enumerable:!1},hexToAnsi:{value:t=>O.ansi256ToAnsi(O.hexToAnsi256(t)),enumerable:!1}}),O}function li(e,t,r){return String(e).normalize().replace(/\r\n/g,`
5
+ var zD=Object.create;var hn=Object.defineProperty;var qD=Object.getOwnPropertyDescriptor;var JD=Object.getOwnPropertyNames;var ZD=Object.getPrototypeOf,QD=Object.prototype.hasOwnProperty;var XD=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ci=(e,t)=>()=>(e&&(t=e(e=0)),t);var q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),el=(e,t)=>{for(var r in t)hn(e,r,{get:t[r],enumerable:!0})},tl=(e,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of JD(t))!QD.call(e,i)&&i!==r&&hn(e,i,{get:()=>t[i],enumerable:!(u=qD(t,i))||u.enumerable});return e};var zt=(e,t,r)=>(r=e!=null?zD(ZD(e)):{},tl(t||!e||!e.__esModule?hn(r,"default",{value:e,enumerable:!0}):r,e));var Ui={};el(Ui,{kCancel:()=>Mi,prompt:()=>Hi});import se,{stdin as yl,stdout as wl}from"node:process";import yi from"node:readline";import{WriteStream as Al}from"node:tty";function bl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xl(){if(wi)return En;wi=1;let e="\x1B",t=`${e}[`,r="\x07",u={to(n,o){return o?`${t}${o+1};${n+1}H`:`${t}${n+1}G`},move(n,o){let a="";return n<0?a+=`${t}${-n}D`:n>0&&(a+=`${t}${n}C`),o<0?a+=`${t}${-o}A`:o>0&&(a+=`${t}${o}B`),a},up:(n=1)=>`${t}${n}A`,down:(n=1)=>`${t}${n}B`,forward:(n=1)=>`${t}${n}C`,backward:(n=1)=>`${t}${n}D`,nextLine:(n=1)=>`${t}E`.repeat(n),prevLine:(n=1)=>`${t}F`.repeat(n),left:`${t}G`,hide:`${t}?25l`,show:`${t}?25h`,save:`${e}7`,restore:`${e}8`},i={up:(n=1)=>`${t}S`.repeat(n),down:(n=1)=>`${t}T`.repeat(n)},s={screen:`${t}2J`,up:(n=1)=>`${t}1J`.repeat(n),down:(n=1)=>`${t}J`.repeat(n),line:`${t}2K`,lineEnd:`${t}K`,lineStart:`${t}1K`,lines(n){let o="";for(let a=0;a<n;a++)o+=this.line+(a<n-1?u.up():"");return n&&(o+=u.left),o}};return En={cursor:u,scroll:i,erase:s,beep:r},En}function vl(){if(Ai)return Jt.exports;Ai=1;let e=process||{},t=e.argv||[],r=e.env||{},u=!(r.NO_COLOR||t.includes("--no-color"))&&(!!r.FORCE_COLOR||t.includes("--color")||e.platform==="win32"||(e.stdout||{}).isTTY&&r.TERM!=="dumb"||!!r.CI),i=(o,a,l=o)=>c=>{let D=""+c,h=D.indexOf(a,o.length);return~h?o+s(D,a,l,h)+a:o+D+a},s=(o,a,l,c)=>{let D="",h=0;do D+=o.substring(h,c)+l,h=c+a.length,c=o.indexOf(a,h);while(~c);return D+o.substring(h)},n=(o=u)=>{let a=o?i:()=>String;return{isColorSupported:o,reset:a("\x1B[0m","\x1B[0m"),bold:a("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:a("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:a("\x1B[3m","\x1B[23m"),underline:a("\x1B[4m","\x1B[24m"),inverse:a("\x1B[7m","\x1B[27m"),hidden:a("\x1B[8m","\x1B[28m"),strikethrough:a("\x1B[9m","\x1B[29m"),black:a("\x1B[30m","\x1B[39m"),red:a("\x1B[31m","\x1B[39m"),green:a("\x1B[32m","\x1B[39m"),yellow:a("\x1B[33m","\x1B[39m"),blue:a("\x1B[34m","\x1B[39m"),magenta:a("\x1B[35m","\x1B[39m"),cyan:a("\x1B[36m","\x1B[39m"),white:a("\x1B[37m","\x1B[39m"),gray:a("\x1B[90m","\x1B[39m"),bgBlack:a("\x1B[40m","\x1B[49m"),bgRed:a("\x1B[41m","\x1B[49m"),bgGreen:a("\x1B[42m","\x1B[49m"),bgYellow:a("\x1B[43m","\x1B[49m"),bgBlue:a("\x1B[44m","\x1B[49m"),bgMagenta:a("\x1B[45m","\x1B[49m"),bgCyan:a("\x1B[46m","\x1B[49m"),bgWhite:a("\x1B[47m","\x1B[49m"),blackBright:a("\x1B[90m","\x1B[39m"),redBright:a("\x1B[91m","\x1B[39m"),greenBright:a("\x1B[92m","\x1B[39m"),yellowBright:a("\x1B[93m","\x1B[39m"),blueBright:a("\x1B[94m","\x1B[39m"),magentaBright:a("\x1B[95m","\x1B[39m"),cyanBright:a("\x1B[96m","\x1B[39m"),whiteBright:a("\x1B[97m","\x1B[39m"),bgBlackBright:a("\x1B[100m","\x1B[49m"),bgRedBright:a("\x1B[101m","\x1B[49m"),bgGreenBright:a("\x1B[102m","\x1B[49m"),bgYellowBright:a("\x1B[103m","\x1B[49m"),bgBlueBright:a("\x1B[104m","\x1B[49m"),bgMagentaBright:a("\x1B[105m","\x1B[49m"),bgCyanBright:a("\x1B[106m","\x1B[49m"),bgWhiteBright:a("\x1B[107m","\x1B[49m")}};return Jt.exports=n(),Jt.exports.createColors=n,Jt.exports}function _l({onlyFirst:e=!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,e?void 0:"g")}function Ri(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Sl,"")}function Ii(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Ri(e),e.length===0))return 0;e=e.replace(Ol()," ");let r=t.ambiguousIsNarrow?1:2,u=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(kl.eastAsianWidth(i)){case"F":case"W":u+=2;break;case"A":u+=r;break;default:u+=1}}return u}function Ll(){let e=new Map;for(let[t,r]of Object.entries(O)){for(let[u,i]of Object.entries(r))O[u]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[u]=O[u],e.set(i[0],i[1]);Object.defineProperty(O,t,{value:r,enumerable:!1})}return Object.defineProperty(O,"codes",{value:e,enumerable:!1}),O.color.close="\x1B[39m",O.bgColor.close="\x1B[49m",O.color.ansi=bi(),O.color.ansi256=xi(),O.color.ansi16m=vi(),O.bgColor.ansi=bi(yn),O.bgColor.ansi256=xi(yn),O.bgColor.ansi16m=vi(yn),Object.defineProperties(O,{rgbToAnsi256:{value:(t,r,u)=>t===r&&r===u?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(u/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[u]=r;u.length===3&&(u=[...u].map(s=>s+s).join(""));let i=Number.parseInt(u,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>O.rgbToAnsi256(...O.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,u,i;if(t>=232)r=((t-232)*10+8)/255,u=r,i=r;else{t-=16;let o=t%36;r=Math.floor(t/36)/5,u=Math.floor(o/6)/5,i=o%6/5}let s=Math.max(r,u,i)*2;if(s===0)return 30;let n=30+(Math.round(i)<<2|Math.round(u)<<1|Math.round(r));return s===2&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(t,r,u)=>O.ansi256ToAnsi(O.rgbToAnsi256(t,r,u)),enumerable:!1},hexToAnsi:{value:t=>O.ansi256ToAnsi(O.hexToAnsi256(t)),enumerable:!1}}),O}function Si(e,t,r){return String(e).normalize().replace(/\r\n/g,`
6
6
  `).split(`
7
- `).map(u=>Al(u,t,r)).join(`
8
- `)}function Ei(e,t){if(typeof e=="string")return Ht.aliases.get(e)===t;for(let r of e)if(r!==void 0&&Ei(r,t))return!0;return!1}function bl(e,t){if(e===t)return;let r=e.split(`
7
+ `).map(u=>Ul(u,t,r)).join(`
8
+ `)}function ji(e,t){if(typeof e=="string")return Qt.aliases.get(e)===t;for(let r of e)if(r!==void 0&&ji(r,t))return!0;return!1}function Vl(e,t){if(e===t)return;let r=e.split(`
9
9
  `),u=t.split(`
10
- `),i=[];for(let s=0;s<Math.max(r.length,u.length);s++)r[s]!==u[s]&&i.push(s);return i}function Mt(e,t){let r=e;r.isTTY&&r.setRawMode(t)}function kl(){return ie.platform!=="win32"?ie.env.TERM!=="linux":!!ie.env.CI||!!ie.env.WT_SESSION||!!ie.env.TERMINUS_SUBLIME||ie.env.ConEmuTask==="{cmd::Cmder}"||ie.env.TERM_PROGRAM==="Terminus-Sublime"||ie.env.TERM_PROGRAM==="vscode"||ie.env.TERM==="xterm-256color"||ie.env.TERM==="alacritty"||ie.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}async function Ai(e,t={}){let r=u=>{if(typeof u!="symbol"||u.toString()!=="Symbol(clack:cancel)")return u;switch(t.cancel){case"reject":{let i=new Error("Prompt cancelled.");throw i.name="ConsolaPromptCancelledError",Error.captureStackTrace&&Error.captureStackTrace(i,Ai),i}case"undefined":return;case"null":return null;case"symbol":return yi;default:case"default":return t.default??t.initial}};if(!t.type||t.type==="text")return await Ml({message:e,defaultValue:t.default,placeholder:t.placeholder,initialValue:t.initial}).then(r);if(t.type==="confirm")return await Hl({message:e,initialValue:t.initial}).then(r);if(t.type==="select")return await Ul({message:e,options:t.options.map(u=>typeof u=="string"?{value:u,label:u}:u),initialValue:t.initial}).then(r);if(t.type==="multiselect")return await Wl({message:e,options:t.options.map(u=>typeof u=="string"?{value:u,label:u}:u),required:t.required,initialValues:t.initial}).then(r);throw new Error(`Unknown prompt type: ${t.type}`)}var rn,ni,se,jt,ui,ol,d,Dl,mi,ll,cl,hl,fl,nn,ii,si,oi,O,pl,dl,ml,Ut,gl,hn,gi,Cl,Ci,fn,ai,Di,El,un,yl,Al,wl,Ht,ci,xl,vl,ee,Ve,sn,Bl,_l,hi,Sl,Tl,$l,fi,on,an,Ol,oe,Rl,Il,Ll,Nl,$,Ge,Dn,ln,Pl,pi,jl,Wt,cn,Ml,Hl,Ul,Wl,yi,bi=Yu(()=>{se=il(),jt={exports:{}};ol=sl(),d=ul(ol);Dl=al();mi={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(u){var i=u.charCodeAt(0),s=u.length==2?u.charCodeAt(1):0,n=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,n=i<<10|s,n+=65536),n==12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n==8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n==172||n==175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n==161||n==164||167<=n&&n<=168||n==170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n==198||n==208||215<=n&&n<=216||222<=n&&n<=225||n==230||232<=n&&n<=234||236<=n&&n<=237||n==240||242<=n&&n<=243||247<=n&&n<=250||n==252||n==254||n==257||n==273||n==275||n==283||294<=n&&n<=295||n==299||305<=n&&n<=307||n==312||319<=n&&n<=322||n==324||328<=n&&n<=331||n==333||338<=n&&n<=339||358<=n&&n<=359||n==363||n==462||n==464||n==466||n==468||n==470||n==472||n==474||n==476||n==593||n==609||n==708||n==711||713<=n&&n<=715||n==717||n==720||728<=n&&n<=731||n==733||n==735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n==1025||1040<=n&&n<=1103||n==1105||n==8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n==8240||8242<=n&&n<=8243||n==8245||n==8251||n==8254||n==8308||n==8319||8321<=n&&n<=8324||n==8364||n==8451||n==8453||n==8457||n==8467||n==8470||8481<=n&&n<=8482||n==8486||n==8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n==8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n==8658||n==8660||n==8679||n==8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n==8715||n==8719||n==8721||n==8725||n==8730||8733<=n&&n<=8736||n==8739||n==8741||8743<=n&&n<=8748||n==8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n==8776||n==8780||n==8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n==8853||n==8857||n==8869||n==8895||n==8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n==9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n==9711||9733<=n&&n<=9734||n==9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n==9756||n==9758||n==9792||n==9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n==9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||n==9955||9960<=n&&n<=9983||n==10045||n==10071||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||n==65533||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"},t.characterLength=function(u){var i=this.eastAsianWidth(u);return i=="F"||i=="W"||i=="A"?2:1};function r(u){return u.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(u){for(var i=r(u),s=0,n=0;n<i.length;n++)s=s+this.characterLength(i[n]);return s},t.slice=function(u,i,s){textLen=t.length(u),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var n="",o=0,a=r(u),D=0;D<a.length;D++){var c=a[D],l=t.length(c);if(o>=i-(l==2?1:0))if(o+l<=s)n+=c;else break;o+=l}return n}})(mi);ll=mi.exports,cl=Fi(ll),hl=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\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\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\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\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])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\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-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\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])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},fl=Fi(hl);nn=10,ii=(e=0)=>t=>`\x1B[${t+e}m`,si=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,oi=(e=0)=>(t,r,u)=>`\x1B[${38+e};2;${t};${r};${u}m`,O={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(O.modifier);pl=Object.keys(O.color),dl=Object.keys(O.bgColor);[...pl,...dl];ml=Fl(),Ut=new Set(["\x1B","\x9B"]),gl=39,hn="\x07",gi="[",Cl="]",Ci="m",fn=`${Cl}8;;`,ai=e=>`${Ut.values().next().value}${gi}${e}${Ci}`,Di=e=>`${Ut.values().next().value}${fn}${e}${hn}`,El=e=>e.split(" ").map(t=>it(t)),un=(e,t,r)=>{let u=[...t],i=!1,s=!1,n=it(di(e[e.length-1]));for(let[o,a]of u.entries()){let D=it(a);if(n+D<=r?e[e.length-1]+=a:(e.push(a),n=0),Ut.has(a)&&(i=!0,s=u.slice(o+1).join("").startsWith(fn)),i){s?a===hn&&(i=!1,s=!1):a===Ci&&(i=!1);continue}n+=D,n===r&&o<u.length-1&&(e.push(""),n=0)}!n&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},yl=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(it(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Al=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let u="",i,s,n=El(e),o=[""];for(let[D,c]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let l=it(o[o.length-1]);if(D!==0&&(l>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),l=0),(l>0||r.trim===!1)&&(o[o.length-1]+=" ",l++)),r.hard&&n[D]>t){let h=t-l,f=1+Math.floor((n[D]-h-1)/t);Math.floor((n[D]-1)/t)<f&&o.push(""),un(o,c,t);continue}if(l+n[D]>t&&l>0&&n[D]>0){if(r.wordWrap===!1&&l<t){un(o,c,t);continue}o.push("")}if(l+n[D]>t&&r.wordWrap===!1){un(o,c,t);continue}o[o.length-1]+=c}r.trim!==!1&&(o=o.map(D=>yl(D)));let a=[...o.join(`
11
- `)];for(let[D,c]of a.entries()){if(u+=c,Ut.has(c)){let{groups:h}=new RegExp(`(?:\\${gi}(?<code>\\d+)m|\\${fn}(?<uri>.*)${hn})`).exec(a.slice(D).join(""))||{groups:{}};if(h.code!==void 0){let f=Number.parseFloat(h.code);i=f===gl?void 0:f}else h.uri!==void 0&&(s=h.uri.length===0?void 0:h.uri)}let l=ml.codes.get(Number(i));a[D+1]===`
12
- `?(s&&(u+=Di("")),i&&l&&(u+=ai(l))):c===`
13
- `&&(i&&l&&(u+=ai(i)),s&&(u+=Di(s)))}return u};wl=["up","down","left","right","space","enter","cancel"],Ht={actions:new Set(wl),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};globalThis.process.platform.startsWith("win");ci=Symbol("clack:cancel");xl=Object.defineProperty,vl=(e,t,r)=>t in e?xl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ee=(e,t,r)=>(vl(e,typeof t!="symbol"?t+"":t,r),r),Ve=class{constructor(t,r=!0){ee(this,"input"),ee(this,"output"),ee(this,"_abortSignal"),ee(this,"rl"),ee(this,"opts"),ee(this,"_render"),ee(this,"_track",!1),ee(this,"_prevFrame",""),ee(this,"_subscribers",new Map),ee(this,"_cursor",0),ee(this,"state","initial"),ee(this,"error",""),ee(this,"value");let{input:u=tl,output:i=rl,render:s,signal:n,...o}=t;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=r,this._abortSignal=n,this.input=u,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(t,r){let u=this._subscribers.get(t)??[];u.push(r),this._subscribers.set(t,u)}on(t,r){this.setSubscriber(t,{cb:r})}once(t,r){this.setSubscriber(t,{cb:r,once:!0})}emit(t,...r){let u=this._subscribers.get(t)??[],i=[];for(let s of u)s.cb(...r),s.once&&i.push(()=>u.splice(u.indexOf(s),1));for(let s of i)s()}prompt(){return new Promise((t,r)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(ci);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let u=new nl(0);u._write=(i,s,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(u),this.rl=ri.createInterface({input:this.input,output:u,tabSize:2,prompt:"",escapeCodeTimeout:50}),ri.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),Mt(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(se.cursor.show),this.output.off("resize",this.render),Mt(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(se.cursor.show),this.output.off("resize",this.render),Mt(this.input,!1),t(ci)})})}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&Ht.aliases.has(r.name)&&this.emit("cursor",Ht.aliases.get(r.name)),Ht.actions.has(r.name)&&this.emit("cursor",r.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),r?.name==="return"){if(this.opts.validate){let u=this.opts.validate(this.value);u&&(this.error=u instanceof Error?u.message:u,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}Ei([t,r?.name,r?.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(`
14
- `),Mt(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=li(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
15
- `).length-1;this.output.write(se.cursor.move(-999,t*-1))}render(){let t=li(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(se.cursor.hide);else{let r=bl(this._prevFrame,t);if(this.restoreCursor(),r&&r?.length===1){let u=r[0];this.output.write(se.cursor.move(0,u)),this.output.write(se.erase.lines(1));let i=t.split(`
16
- `);this.output.write(i[u]),this._prevFrame=t,this.output.write(se.cursor.move(0,i.length-u-1));return}if(r&&r?.length>1){let u=r[0];this.output.write(se.cursor.move(0,u)),this.output.write(se.erase.down());let i=t.split(`
10
+ `),i=[];for(let s=0;s<Math.max(r.length,u.length);s++)r[s]!==u[s]&&i.push(s);return i}function Zt(e,t){let r=e;r.isTTY&&r.setRawMode(t)}function Ql(){return se.platform!=="win32"?se.env.TERM!=="linux":!!se.env.CI||!!se.env.WT_SESSION||!!se.env.TERMINUS_SUBLIME||se.env.ConEmuTask==="{cmd::Cmder}"||se.env.TERM_PROGRAM==="Terminus-Sublime"||se.env.TERM_PROGRAM==="vscode"||se.env.TERM==="xterm-256color"||se.env.TERM==="alacritty"||se.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}async function Hi(e,t={}){let r=u=>{if(typeof u!="symbol"||u.toString()!=="Symbol(clack:cancel)")return u;switch(t.cancel){case"reject":{let i=new Error("Prompt cancelled.");throw i.name="ConsolaPromptCancelledError",Error.captureStackTrace&&Error.captureStackTrace(i,Hi),i}case"undefined":return;case"null":return null;case"symbol":return Mi;default:case"default":return t.default??t.initial}};if(!t.type||t.type==="text")return await sc({message:e,defaultValue:t.default,placeholder:t.placeholder,initialValue:t.initial}).then(r);if(t.type==="confirm")return await oc({message:e,initialValue:t.initial}).then(r);if(t.type==="select")return await ac({message:e,options:t.options.map(u=>typeof u=="string"?{value:u,label:u}:u),initialValue:t.initial}).then(r);if(t.type==="multiselect")return await Dc({message:e,options:t.options.map(u=>typeof u=="string"?{value:u,label:u}:u),required:t.required,initialValues:t.initial}).then(r);throw new Error(`Unknown prompt type: ${t.type}`)}var En,wi,oe,Jt,Ai,Bl,m,Sl,Li,$l,kl,Tl,Ol,yn,bi,xi,vi,O,Rl,Il,Pl,Xt,Nl,Sn,Pi,jl,Ni,$n,Bi,_i,Ml,wn,Hl,Ul,Wl,Qt,$i,Gl,Yl,re,Ze,An,Kl,zl,ki,ql,Jl,Zl,Ti,bn,xn,Xl,ae,ec,tc,rc,nc,k,Qe,vn,Bn,uc,Oi,ic,er,_n,sc,oc,ac,Dc,Mi,Wi=ci(()=>{oe=xl(),Jt={exports:{}};Bl=vl(),m=bl(Bl);Sl=_l();Li={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(u){var i=u.charCodeAt(0),s=u.length==2?u.charCodeAt(1):0,n=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,n=i<<10|s,n+=65536),n==12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n==8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n==172||n==175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n==161||n==164||167<=n&&n<=168||n==170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n==198||n==208||215<=n&&n<=216||222<=n&&n<=225||n==230||232<=n&&n<=234||236<=n&&n<=237||n==240||242<=n&&n<=243||247<=n&&n<=250||n==252||n==254||n==257||n==273||n==275||n==283||294<=n&&n<=295||n==299||305<=n&&n<=307||n==312||319<=n&&n<=322||n==324||328<=n&&n<=331||n==333||338<=n&&n<=339||358<=n&&n<=359||n==363||n==462||n==464||n==466||n==468||n==470||n==472||n==474||n==476||n==593||n==609||n==708||n==711||713<=n&&n<=715||n==717||n==720||728<=n&&n<=731||n==733||n==735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n==1025||1040<=n&&n<=1103||n==1105||n==8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n==8240||8242<=n&&n<=8243||n==8245||n==8251||n==8254||n==8308||n==8319||8321<=n&&n<=8324||n==8364||n==8451||n==8453||n==8457||n==8467||n==8470||8481<=n&&n<=8482||n==8486||n==8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n==8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n==8658||n==8660||n==8679||n==8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n==8715||n==8719||n==8721||n==8725||n==8730||8733<=n&&n<=8736||n==8739||n==8741||8743<=n&&n<=8748||n==8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n==8776||n==8780||n==8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n==8853||n==8857||n==8869||n==8895||n==8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n==9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n==9711||9733<=n&&n<=9734||n==9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n==9756||n==9758||n==9792||n==9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n==9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||n==9955||9960<=n&&n<=9983||n==10045||n==10071||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||n==65533||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"},t.characterLength=function(u){var i=this.eastAsianWidth(u);return i=="F"||i=="W"||i=="A"?2:1};function r(u){return u.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(u){for(var i=r(u),s=0,n=0;n<i.length;n++)s=s+this.characterLength(i[n]);return s},t.slice=function(u,i,s){textLen=t.length(u),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var n="",o=0,a=r(u),l=0;l<a.length;l++){var c=a[l],D=t.length(c);if(o>=i-(D==2?1:0))if(o+D<=s)n+=c;else break;o+=D}return n}})(Li);$l=Li.exports,kl=Ii($l),Tl=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\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\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\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\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])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\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-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\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])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},Ol=Ii(Tl);yn=10,bi=(e=0)=>t=>`\x1B[${t+e}m`,xi=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,vi=(e=0)=>(t,r,u)=>`\x1B[${38+e};2;${t};${r};${u}m`,O={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(O.modifier);Rl=Object.keys(O.color),Il=Object.keys(O.bgColor);[...Rl,...Il];Pl=Ll(),Xt=new Set(["\x1B","\x9B"]),Nl=39,Sn="\x07",Pi="[",jl="]",Ni="m",$n=`${jl}8;;`,Bi=e=>`${Xt.values().next().value}${Pi}${e}${Ni}`,_i=e=>`${Xt.values().next().value}${$n}${e}${Sn}`,Ml=e=>e.split(" ").map(t=>dt(t)),wn=(e,t,r)=>{let u=[...t],i=!1,s=!1,n=dt(Ri(e[e.length-1]));for(let[o,a]of u.entries()){let l=dt(a);if(n+l<=r?e[e.length-1]+=a:(e.push(a),n=0),Xt.has(a)&&(i=!0,s=u.slice(o+1).join("").startsWith($n)),i){s?a===Sn&&(i=!1,s=!1):a===Ni&&(i=!1);continue}n+=l,n===r&&o<u.length-1&&(e.push(""),n=0)}!n&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Hl=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(dt(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Ul=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let u="",i,s,n=Ml(e),o=[""];for(let[l,c]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let D=dt(o[o.length-1]);if(l!==0&&(D>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),D=0),(D>0||r.trim===!1)&&(o[o.length-1]+=" ",D++)),r.hard&&n[l]>t){let h=t-D,f=1+Math.floor((n[l]-h-1)/t);Math.floor((n[l]-1)/t)<f&&o.push(""),wn(o,c,t);continue}if(D+n[l]>t&&D>0&&n[l]>0){if(r.wordWrap===!1&&D<t){wn(o,c,t);continue}o.push("")}if(D+n[l]>t&&r.wordWrap===!1){wn(o,c,t);continue}o[o.length-1]+=c}r.trim!==!1&&(o=o.map(l=>Hl(l)));let a=[...o.join(`
11
+ `)];for(let[l,c]of a.entries()){if(u+=c,Xt.has(c)){let{groups:h}=new RegExp(`(?:\\${Pi}(?<code>\\d+)m|\\${$n}(?<uri>.*)${Sn})`).exec(a.slice(l).join(""))||{groups:{}};if(h.code!==void 0){let f=Number.parseFloat(h.code);i=f===Nl?void 0:f}else h.uri!==void 0&&(s=h.uri.length===0?void 0:h.uri)}let D=Pl.codes.get(Number(i));a[l+1]===`
12
+ `?(s&&(u+=_i("")),i&&D&&(u+=Bi(D))):c===`
13
+ `&&(i&&D&&(u+=Bi(i)),s&&(u+=_i(s)))}return u};Wl=["up","down","left","right","space","enter","cancel"],Qt={actions:new Set(Wl),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};globalThis.process.platform.startsWith("win");$i=Symbol("clack:cancel");Gl=Object.defineProperty,Yl=(e,t,r)=>t in e?Gl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,re=(e,t,r)=>(Yl(e,typeof t!="symbol"?t+"":t,r),r),Ze=class{constructor(t,r=!0){re(this,"input"),re(this,"output"),re(this,"_abortSignal"),re(this,"rl"),re(this,"opts"),re(this,"_render"),re(this,"_track",!1),re(this,"_prevFrame",""),re(this,"_subscribers",new Map),re(this,"_cursor",0),re(this,"state","initial"),re(this,"error",""),re(this,"value");let{input:u=yl,output:i=wl,render:s,signal:n,...o}=t;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=r,this._abortSignal=n,this.input=u,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(t,r){let u=this._subscribers.get(t)??[];u.push(r),this._subscribers.set(t,u)}on(t,r){this.setSubscriber(t,{cb:r})}once(t,r){this.setSubscriber(t,{cb:r,once:!0})}emit(t,...r){let u=this._subscribers.get(t)??[],i=[];for(let s of u)s.cb(...r),s.once&&i.push(()=>u.splice(u.indexOf(s),1));for(let s of i)s()}prompt(){return new Promise((t,r)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t($i);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let u=new Al(0);u._write=(i,s,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(u),this.rl=yi.createInterface({input:this.input,output:u,tabSize:2,prompt:"",escapeCodeTimeout:50}),yi.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),Zt(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(oe.cursor.show),this.output.off("resize",this.render),Zt(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(oe.cursor.show),this.output.off("resize",this.render),Zt(this.input,!1),t($i)})})}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&Qt.aliases.has(r.name)&&this.emit("cursor",Qt.aliases.get(r.name)),Qt.actions.has(r.name)&&this.emit("cursor",r.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),r?.name==="return"){if(this.opts.validate){let u=this.opts.validate(this.value);u&&(this.error=u instanceof Error?u.message:u,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}ji([t,r?.name,r?.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(`
14
+ `),Zt(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=Si(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
15
+ `).length-1;this.output.write(oe.cursor.move(-999,t*-1))}render(){let t=Si(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(oe.cursor.hide);else{let r=Vl(this._prevFrame,t);if(this.restoreCursor(),r&&r?.length===1){let u=r[0];this.output.write(oe.cursor.move(0,u)),this.output.write(oe.erase.lines(1));let i=t.split(`
16
+ `);this.output.write(i[u]),this._prevFrame=t,this.output.write(oe.cursor.move(0,i.length-u-1));return}if(r&&r?.length>1){let u=r[0];this.output.write(oe.cursor.move(0,u)),this.output.write(oe.erase.down());let i=t.split(`
17
17
  `).slice(u);this.output.write(i.join(`
18
- `)),this._prevFrame=t;return}this.output.write(se.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}},sn=class extends Ve{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",r=>{this.output.write(se.cursor.move(0,-1)),this.value=r,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}},Bl=Object.defineProperty,_l=(e,t,r)=>t in e?Bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hi=(e,t,r)=>(_l(e,typeof t!="symbol"?t+"":t,r),r),Sl=class extends Ve{constructor(e){super(e,!1),hi(this,"options"),hi(this,"cursor",0),this.options=e.options,this.value=[...e.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===e.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 e=this.value.length===this.options.length;this.value=e?[]:this.options.map(t=>t.value)}toggleValue(){let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}},Tl=Object.defineProperty,$l=(e,t,r)=>t in e?Tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fi=(e,t,r)=>($l(e,typeof t!="symbol"?t+"":t,r),r),on=class extends Ve{constructor(t){super(t,!1),fi(this,"options"),fi(this,"cursor",0),this.options=t.options,this.cursor=this.options.findIndex(({value:r})=>r===t.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",r=>{switch(r){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}},an=class extends Ve{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let t=this.value.slice(0,this.cursor),[r,...u]=this.value.slice(this.cursor);return`${t}${d.inverse(r)}${u.join("")}`}get cursor(){return this._cursor}constructor(t){super(t),this.on("finalize",()=>{this.value||(this.value=t.defaultValue)})}};Ol=kl(),oe=(e,t)=>Ol?e:t,Rl=oe("\u276F",">"),Il=oe("\u25A0","x"),Ll=oe("\u25B2","x"),Nl=oe("\u2714","\u221A"),$=oe(""),Ge=oe(""),Dn=oe("\u25CF",">"),ln=oe("\u25CB"," "),Pl=oe("\u25FB","[\u2022]"),pi=oe("\u25FC","[+]"),jl=oe("\u25FB","[ ]"),Wt=e=>{switch(e){case"initial":case"active":return d.cyan(Rl);case"cancel":return d.red(Il);case"error":return d.yellow(Ll);case"submit":return d.green(Nl)}},cn=e=>{let{cursor:t,options:r,style:u}=e,i=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),n=Math.min(s,Math.max(i,5)),o=0;t>=o+n-3?o=Math.max(Math.min(t-n+3,r.length-n),0):t<o+2&&(o=Math.max(t-2,0));let a=n<r.length&&o>0,D=n<r.length&&o+n<r.length;return r.slice(o,o+n).map((c,l,h)=>{let f=l===0&&a,p=l===h.length-1&&D;return f||p?d.dim("..."):u(c,l+o===t)})},Ml=e=>new an({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){let t=`${d.gray($)}
19
- ${Wt(this.state)} ${e.message}
20
- `,r=e.placeholder?d.inverse(e.placeholder[0])+d.dim(e.placeholder.slice(1)):d.inverse(d.hidden("_")),u=this.value?this.valueWithCursor:r;switch(this.state){case"error":return`${t.trim()}
21
- ${d.yellow($)} ${u}
22
- ${d.yellow(Ge)} ${d.yellow(this.error)}
23
- `;case"submit":return`${t}${d.gray($)} ${d.dim(this.value||e.placeholder)}`;case"cancel":return`${t}${d.gray($)} ${d.strikethrough(d.dim(this.value??""))}${this.value?.trim()?`
24
- ${d.gray($)}`:""}`;default:return`${t}${d.cyan($)} ${u}
25
- ${d.cyan(Ge)}
26
- `}}}).prompt(),Hl=e=>{let t=e.active??"Yes",r=e.inactive??"No";return new sn({active:t,inactive:r,initialValue:e.initialValue??!0,render(){let u=`${d.gray($)}
27
- ${Wt(this.state)} ${e.message}
28
- `,i=this.value?t:r;switch(this.state){case"submit":return`${u}${d.gray($)} ${d.dim(i)}`;case"cancel":return`${u}${d.gray($)} ${d.strikethrough(d.dim(i))}
29
- ${d.gray($)}`;default:return`${u}${d.cyan($)} ${this.value?`${d.green(Dn)} ${t}`:`${d.dim(ln)} ${d.dim(t)}`} ${d.dim("/")} ${this.value?`${d.dim(ln)} ${d.dim(r)}`:`${d.green(Dn)} ${r}`}
30
- ${d.cyan(Ge)}
31
- `}}}).prompt()},Ul=e=>{let t=(r,u)=>{let i=r.label??String(r.value);switch(u){case"selected":return`${d.dim(i)}`;case"active":return`${d.green(Dn)} ${i} ${r.hint?d.dim(`(${r.hint})`):""}`;case"cancelled":return`${d.strikethrough(d.dim(i))}`;default:return`${d.dim(ln)} ${d.dim(i)}`}};return new on({options:e.options,initialValue:e.initialValue,render(){let r=`${d.gray($)}
32
- ${Wt(this.state)} ${e.message}
33
- `;switch(this.state){case"submit":return`${r}${d.gray($)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${r}${d.gray($)} ${t(this.options[this.cursor],"cancelled")}
34
- ${d.gray($)}`;default:return`${r}${d.cyan($)} ${cn({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(u,i)=>t(u,i?"active":"inactive")}).join(`
35
- ${d.cyan($)} `)}
36
- ${d.cyan(Ge)}
37
- `}}}).prompt()},Wl=e=>{let t=(r,u)=>{let i=r.label??String(r.value);return u==="active"?`${d.cyan(Pl)} ${i} ${r.hint?d.dim(`(${r.hint})`):""}`:u==="selected"?`${d.green(pi)} ${d.dim(i)}`:u==="cancelled"?`${d.strikethrough(d.dim(i))}`:u==="active-selected"?`${d.green(pi)} ${i} ${r.hint?d.dim(`(${r.hint})`):""}`:u==="submitted"?`${d.dim(i)}`:`${d.dim(jl)} ${d.dim(i)}`};return new Sl({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(r){if(this.required&&r.length===0)return`Please select at least one option.
38
- ${d.reset(d.dim(`Press ${d.gray(d.bgWhite(d.inverse(" space ")))} to select, ${d.gray(d.bgWhite(d.inverse(" enter ")))} to submit`))}`},render(){let r=`${d.gray($)}
39
- ${Wt(this.state)} ${e.message}
40
- `,u=(i,s)=>{let n=this.value.includes(i.value);return s&&n?t(i,"active-selected"):n?t(i,"selected"):t(i,s?"active":"inactive")};switch(this.state){case"submit":return`${r}${d.gray($)} ${this.options.filter(({value:i})=>this.value.includes(i)).map(i=>t(i,"submitted")).join(d.dim(", "))||d.dim("none")}`;case"cancel":{let i=this.options.filter(({value:s})=>this.value.includes(s)).map(s=>t(s,"cancelled")).join(d.dim(", "));return`${r}${d.gray($)} ${i.trim()?`${i}
41
- ${d.gray($)}`:""}`}case"error":{let i=this.error.split(`
42
- `).map((s,n)=>n===0?`${d.yellow(Ge)} ${d.yellow(s)}`:` ${s}`).join(`
43
- `);return`${r+d.yellow($)} ${cn({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
44
- ${d.yellow($)} `)}
18
+ `)),this._prevFrame=t;return}this.output.write(oe.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}},An=class extends Ze{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",r=>{this.output.write(oe.cursor.move(0,-1)),this.value=r,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}},Kl=Object.defineProperty,zl=(e,t,r)=>t in e?Kl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ki=(e,t,r)=>(zl(e,typeof t!="symbol"?t+"":t,r),r),ql=class extends Ze{constructor(e){super(e,!1),ki(this,"options"),ki(this,"cursor",0),this.options=e.options,this.value=[...e.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===e.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 e=this.value.length===this.options.length;this.value=e?[]:this.options.map(t=>t.value)}toggleValue(){let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}},Jl=Object.defineProperty,Zl=(e,t,r)=>t in e?Jl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ti=(e,t,r)=>(Zl(e,typeof t!="symbol"?t+"":t,r),r),bn=class extends Ze{constructor(t){super(t,!1),Ti(this,"options"),Ti(this,"cursor",0),this.options=t.options,this.cursor=this.options.findIndex(({value:r})=>r===t.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",r=>{switch(r){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}},xn=class extends Ze{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let t=this.value.slice(0,this.cursor),[r,...u]=this.value.slice(this.cursor);return`${t}${m.inverse(r)}${u.join("")}`}get cursor(){return this._cursor}constructor(t){super(t),this.on("finalize",()=>{this.value||(this.value=t.defaultValue)})}};Xl=Ql(),ae=(e,t)=>Xl?e:t,ec=ae("\u276F",">"),tc=ae("\u25A0","x"),rc=ae("\u25B2","x"),nc=ae("\u2714","\u221A"),k=ae(""),Qe=ae(""),vn=ae("\u25CF",">"),Bn=ae("\u25CB"," "),uc=ae("\u25FB","[\u2022]"),Oi=ae("\u25FC","[+]"),ic=ae("\u25FB","[ ]"),er=e=>{switch(e){case"initial":case"active":return m.cyan(ec);case"cancel":return m.red(tc);case"error":return m.yellow(rc);case"submit":return m.green(nc)}},_n=e=>{let{cursor:t,options:r,style:u}=e,i=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),n=Math.min(s,Math.max(i,5)),o=0;t>=o+n-3?o=Math.max(Math.min(t-n+3,r.length-n),0):t<o+2&&(o=Math.max(t-2,0));let a=n<r.length&&o>0,l=n<r.length&&o+n<r.length;return r.slice(o,o+n).map((c,D,h)=>{let f=D===0&&a,p=D===h.length-1&&l;return f||p?m.dim("..."):u(c,D+o===t)})},sc=e=>new xn({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){let t=`${m.gray(k)}
19
+ ${er(this.state)} ${e.message}
20
+ `,r=e.placeholder?m.inverse(e.placeholder[0])+m.dim(e.placeholder.slice(1)):m.inverse(m.hidden("_")),u=this.value?this.valueWithCursor:r;switch(this.state){case"error":return`${t.trim()}
21
+ ${m.yellow(k)} ${u}
22
+ ${m.yellow(Qe)} ${m.yellow(this.error)}
23
+ `;case"submit":return`${t}${m.gray(k)} ${m.dim(this.value||e.placeholder)}`;case"cancel":return`${t}${m.gray(k)} ${m.strikethrough(m.dim(this.value??""))}${this.value?.trim()?`
24
+ ${m.gray(k)}`:""}`;default:return`${t}${m.cyan(k)} ${u}
25
+ ${m.cyan(Qe)}
26
+ `}}}).prompt(),oc=e=>{let t=e.active??"Yes",r=e.inactive??"No";return new An({active:t,inactive:r,initialValue:e.initialValue??!0,render(){let u=`${m.gray(k)}
27
+ ${er(this.state)} ${e.message}
28
+ `,i=this.value?t:r;switch(this.state){case"submit":return`${u}${m.gray(k)} ${m.dim(i)}`;case"cancel":return`${u}${m.gray(k)} ${m.strikethrough(m.dim(i))}
29
+ ${m.gray(k)}`;default:return`${u}${m.cyan(k)} ${this.value?`${m.green(vn)} ${t}`:`${m.dim(Bn)} ${m.dim(t)}`} ${m.dim("/")} ${this.value?`${m.dim(Bn)} ${m.dim(r)}`:`${m.green(vn)} ${r}`}
30
+ ${m.cyan(Qe)}
31
+ `}}}).prompt()},ac=e=>{let t=(r,u)=>{let i=r.label??String(r.value);switch(u){case"selected":return`${m.dim(i)}`;case"active":return`${m.green(vn)} ${i} ${r.hint?m.dim(`(${r.hint})`):""}`;case"cancelled":return`${m.strikethrough(m.dim(i))}`;default:return`${m.dim(Bn)} ${m.dim(i)}`}};return new bn({options:e.options,initialValue:e.initialValue,render(){let r=`${m.gray(k)}
32
+ ${er(this.state)} ${e.message}
33
+ `;switch(this.state){case"submit":return`${r}${m.gray(k)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${r}${m.gray(k)} ${t(this.options[this.cursor],"cancelled")}
34
+ ${m.gray(k)}`;default:return`${r}${m.cyan(k)} ${_n({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(u,i)=>t(u,i?"active":"inactive")}).join(`
35
+ ${m.cyan(k)} `)}
36
+ ${m.cyan(Qe)}
37
+ `}}}).prompt()},Dc=e=>{let t=(r,u)=>{let i=r.label??String(r.value);return u==="active"?`${m.cyan(uc)} ${i} ${r.hint?m.dim(`(${r.hint})`):""}`:u==="selected"?`${m.green(Oi)} ${m.dim(i)}`:u==="cancelled"?`${m.strikethrough(m.dim(i))}`:u==="active-selected"?`${m.green(Oi)} ${i} ${r.hint?m.dim(`(${r.hint})`):""}`:u==="submitted"?`${m.dim(i)}`:`${m.dim(ic)} ${m.dim(i)}`};return new ql({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(r){if(this.required&&r.length===0)return`Please select at least one option.
38
+ ${m.reset(m.dim(`Press ${m.gray(m.bgWhite(m.inverse(" space ")))} to select, ${m.gray(m.bgWhite(m.inverse(" enter ")))} to submit`))}`},render(){let r=`${m.gray(k)}
39
+ ${er(this.state)} ${e.message}
40
+ `,u=(i,s)=>{let n=this.value.includes(i.value);return s&&n?t(i,"active-selected"):n?t(i,"selected"):t(i,s?"active":"inactive")};switch(this.state){case"submit":return`${r}${m.gray(k)} ${this.options.filter(({value:i})=>this.value.includes(i)).map(i=>t(i,"submitted")).join(m.dim(", "))||m.dim("none")}`;case"cancel":{let i=this.options.filter(({value:s})=>this.value.includes(s)).map(s=>t(s,"cancelled")).join(m.dim(", "));return`${r}${m.gray(k)} ${i.trim()?`${i}
41
+ ${m.gray(k)}`:""}`}case"error":{let i=this.error.split(`
42
+ `).map((s,n)=>n===0?`${m.yellow(Qe)} ${m.yellow(s)}`:` ${s}`).join(`
43
+ `);return`${r+m.yellow(k)} ${_n({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
44
+ ${m.yellow(k)} `)}
45
45
  ${i}
46
- `}default:return`${r}${d.cyan($)} ${cn({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
47
- ${d.cyan($)} `)}
48
- ${d.cyan(Ge)}
49
- `}}}).prompt()};`${d.gray($)}`;yi=Symbol.for("cancel")});function ht(e){return e.charCodeAt(0)===65279?e.slice(1):e}function Rh(e,t={}){return{sample:t.indent===void 0&&t.preserveIndentation!==!1&&ht(e).slice(0,t?.sampleSize||1024),whiteSpace:t.preserveWhitespace===!1?void 0:{start:kh.exec(e)?.[0]||"",end:Oh.exec(e)?.[0]||""}}}function Zt(e,t,r){!t||typeof t!="object"||Object.defineProperty(t,$h,{enumerable:!1,configurable:!0,writable:!0,value:Rh(e,r)})}var $h,kh,Oh,Bn=Yu(()=>{$h=Symbol.for("__confbox_fmt__"),kh=/^(\s+)/,Oh=/(\s+)$/});var Jn=z((wC,Vs)=>{"use strict";var qn={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let r="";return e<0?r+=`\x1B[${-e}D`:e>0&&(r+=`\x1B[${e}C`),t<0?r+=`\x1B[${-t}A`:t>0&&(r+=`\x1B[${t}B`),r},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},dp={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},Fp={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?qn.up():"");return e&&(t+=qn.left),t}};Vs.exports={cursor:qn,scroll:dp,erase:Fp,beep:"\x07"}});var Ks=z((bC,Zn)=>{var pr=process||{},Gs=pr.argv||[],fr=pr.env||{},mp=!(fr.NO_COLOR||Gs.includes("--no-color"))&&(!!fr.FORCE_COLOR||Gs.includes("--color")||pr.platform==="win32"||(pr.stdout||{}).isTTY&&fr.TERM!=="dumb"||!!fr.CI),gp=(e,t,r=e)=>u=>{let i=""+u,s=i.indexOf(t,e.length);return~s?e+Cp(i,t,r,s)+t:e+i+t},Cp=(e,t,r,u)=>{let i="",s=0;do i+=e.substring(s,u)+r,s=u+t.length,u=e.indexOf(t,s);while(~u);return i+e.substring(s)},Ys=(e=mp)=>{let t=e?gp:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Zn.exports=Ys();Zn.exports.createColors=Ys});var va=z((hE,xa)=>{"use strict";var Ue=class e extends Error{constructor(t,r,u){super("[ParserError] "+t,r,u),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},Sr=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},kt=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new Sr(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new Ue("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,r){r&&this.next(r),this.stack.push(this.state),this.state=new Sr(t)}callNow(t,r){return this.call(t,r),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new Ue("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new Ue("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new Ue("Must declare a parseStart method")}};kt.END=1114112;kt.Error=Ue;xa.exports=kt});var _a=z((fE,Ba)=>{"use strict";Ba.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Tr=z((pE,Sa)=>{"use strict";Sa.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var $a=z((dE,Ta)=>{"use strict";var tt=Tr(),xu=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${tt(2,this.getUTCMonth()+1)}-${tt(2,this.getUTCDate())}`,r=`${tt(2,this.getUTCHours())}:${tt(2,this.getUTCMinutes())}:${tt(2,this.getUTCSeconds())}.${tt(3,this.getUTCMilliseconds())}`;return`${t}T${r}`}};Ta.exports=e=>{let t=new xu(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Ra=z((FE,Oa)=>{"use strict";var ka=Tr(),BF=global.Date,vu=class extends BF{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${ka(2,this.getUTCMonth()+1)}-${ka(2,this.getUTCDate())}`}};Oa.exports=e=>{let t=new vu(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var La=z((mE,Ia)=>{"use strict";var $r=Tr(),Bu=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${$r(2,this.getUTCHours())}:${$r(2,this.getUTCMinutes())}:${$r(2,this.getUTCSeconds())}.${$r(3,this.getUTCMilliseconds())}`}};Ia.exports=e=>{let t=new Bu(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var kr=z((exports,module)=>{"use strict";module.exports=makeParserClass(va());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=_a(),createDateTimeFloat=$a(),createDate=Ra(),createTime=La(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
50
- `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t==="__proto__"&&defineProperty(e,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return e===null||typeof e!="object"?!1:e[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return e===null||typeof e!="object"?!1:e[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return e===null||typeof e!="object"?!1:e[_type]===INTEGER}var FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return e===null||typeof e!="object"?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t==="object"){if(e===null)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(u){let i=this.ctx,s=u.key.pop();for(let n of u.key){if(hasKey(i,n)&&(!isTable(i[n])||i[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[n]=i[n]||Table()}if(hasKey(i,s))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(u.value)||isFloat(u.value)?i[s]=u.value.valueOf():i[s]=u.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(u){return this.state.resultTable?this.state.resultTable.push(u):this.state.resultTable=[u],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(u){return this.returnNow({key:this.state.resultTable,value:u})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(u){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,u)&&(!isTable(this.ctx[u])||this.ctx[u][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[u]=this.ctx[u]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,u))this.ctx=this.ctx[u]=Table();else if(isTable(this.ctx[u]))this.ctx=this.ctx[u];else if(isList(this.ctx[u]))this.ctx=this.ctx[u][this.ctx[u].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(u){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,u)||(this.ctx[u]=List()),isInlineList(this.ctx[u]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[u])){let i=Table();this.ctx[u].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,u))this.ctx=this.ctx[u]=Table();else{if(isInlineList(this.ctx[u]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[u]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[u]))this.ctx=this.ctx[u][this.ctx[u].length-1];else if(isTable(this.ctx[u]))this.ctx=this.ctx[u];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(u){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(u){return this.returnNow(u)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(u){return this.state.buf+=u,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let u="\\u00";return this.char<16&&(u+="0"),u+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${u} instead`))}recordMultiEscapeReplacement(u){return this.state.buf+=u,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(u){try{let i=parseInt(u,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let u=Integer(this.state.buf);if(u.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(u)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let u=Integer(this.state.buf);if(u.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(u)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let u=Integer(this.state.buf);if(u.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(u)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let u=Integer(this.state.buf);if(u.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(u)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(u){if(this.state.resultArr){let i=this.state.resultArr[_contentType],s=tomlType(u);if(i!==s)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${s}`))}else this.state.resultArr=InlineList(tomlType(u));return isFloat(u)||isInteger(u)?this.state.resultArr.push(u.valueOf()):this.state.resultArr.push(u),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(u){let i=this.state.resultTable,s=u.key.pop();for(let n of u.key){if(hasKey(i,n)&&(!isTable(i[n])||i[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[n]=i[n]||Table()}if(hasKey(i,s))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(u.value)||isFloat(u.value)?i[s]=u.value.valueOf():i[s]=u.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return t}});var Or=z((gE,Na)=>{"use strict";Na.exports=_F;function _F(e,t){if(e.pos==null||e.line==null)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
46
+ `}default:return`${r}${m.cyan(k)} ${_n({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
47
+ ${m.cyan(k)} `)}
48
+ ${m.cyan(Qe)}
49
+ `}}}).prompt()};`${m.gray(k)}`;Mi=Symbol.for("cancel")});function yt(e){return e.charCodeAt(0)===65279?e.slice(1):e}function ef(e,t={}){return{sample:t.indent===void 0&&t.preserveIndentation!==!1&&yt(e).slice(0,t?.sampleSize||1024),whiteSpace:t.preserveWhitespace===!1?void 0:{start:Qh.exec(e)?.[0]||"",end:Xh.exec(e)?.[0]||""}}}function ar(e,t,r){!t||typeof t!="object"||Object.defineProperty(t,Zh,{enumerable:!1,configurable:!0,writable:!0,value:ef(e,r)})}var Zh,Qh,Xh,Wn=ci(()=>{Zh=Symbol.for("__confbox_fmt__"),Qh=/^(\s+)/,Xh=/(\s+)$/});var su=q((yC,zs)=>{"use strict";var iu={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let r="";return e<0?r+=`\x1B[${-e}D`:e>0&&(r+=`\x1B[${e}C`),t<0?r+=`\x1B[${-t}A`:t>0&&(r+=`\x1B[${t}B`),r},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},gp={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},Cp={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?iu.up():"");return e&&(t+=iu.left),t}};zs.exports={cursor:iu,scroll:gp,erase:Cp,beep:"\x07"}});var Zs=q((wC,ou)=>{var wr=process||{},qs=wr.argv||[],yr=wr.env||{},Ep=!(yr.NO_COLOR||qs.includes("--no-color"))&&(!!yr.FORCE_COLOR||qs.includes("--color")||wr.platform==="win32"||(wr.stdout||{}).isTTY&&yr.TERM!=="dumb"||!!yr.CI),yp=(e,t,r=e)=>u=>{let i=""+u,s=i.indexOf(t,e.length);return~s?e+wp(i,t,r,s)+t:e+i+t},wp=(e,t,r,u)=>{let i="",s=0;do i+=e.substring(s,u)+r,s=u+t.length,u=e.indexOf(t,s);while(~u);return i+e.substring(s)},Js=(e=Ep)=>{let t=e?yp:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};ou.exports=Js();ou.exports.createColors=Js});var $a=q((lE,Sa)=>{"use strict";var Ye=class e extends Error{constructor(t,r,u){super("[ParserError] "+t,r,u),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},Pr=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},Lt=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new Pr(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new Ye("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,r){r&&this.next(r),this.stack.push(this.state),this.state=new Pr(t)}callNow(t,r){return this.call(t,r),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new Ye("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new Ye("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new Ye("Must declare a parseStart method")}};Lt.END=1114112;Lt.Error=Ye;Sa.exports=Lt});var Ta=q((cE,ka)=>{"use strict";ka.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Nr=q((hE,Oa)=>{"use strict";Oa.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var Ia=q((fE,Ra)=>{"use strict";var at=Nr(),Iu=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${at(2,this.getUTCMonth()+1)}-${at(2,this.getUTCDate())}`,r=`${at(2,this.getUTCHours())}:${at(2,this.getUTCMinutes())}:${at(2,this.getUTCSeconds())}.${at(3,this.getUTCMilliseconds())}`;return`${t}T${r}`}};Ra.exports=e=>{let t=new Iu(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Na=q((pE,Pa)=>{"use strict";var La=Nr(),$m=global.Date,Lu=class extends $m{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${La(2,this.getUTCMonth()+1)}-${La(2,this.getUTCDate())}`}};Pa.exports=e=>{let t=new Lu(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Ma=q((dE,ja)=>{"use strict";var jr=Nr(),Pu=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${jr(2,this.getUTCHours())}:${jr(2,this.getUTCMinutes())}:${jr(2,this.getUTCSeconds())}.${jr(3,this.getUTCMilliseconds())}`}};ja.exports=e=>{let t=new Pu(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Mr=q((exports,module)=>{"use strict";module.exports=makeParserClass($a());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=Ta(),createDateTimeFloat=Ia(),createDate=Na(),createTime=Ma(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
50
+ `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t==="__proto__"&&defineProperty(e,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return e===null||typeof e!="object"?!1:e[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return e===null||typeof e!="object"?!1:e[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return e===null||typeof e!="object"?!1:e[_type]===INTEGER}var FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return e===null||typeof e!="object"?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t==="object"){if(e===null)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(u){let i=this.ctx,s=u.key.pop();for(let n of u.key){if(hasKey(i,n)&&(!isTable(i[n])||i[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[n]=i[n]||Table()}if(hasKey(i,s))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(u.value)||isFloat(u.value)?i[s]=u.value.valueOf():i[s]=u.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(u){return this.state.resultTable?this.state.resultTable.push(u):this.state.resultTable=[u],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(u){return this.returnNow({key:this.state.resultTable,value:u})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(u){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,u)&&(!isTable(this.ctx[u])||this.ctx[u][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[u]=this.ctx[u]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,u))this.ctx=this.ctx[u]=Table();else if(isTable(this.ctx[u]))this.ctx=this.ctx[u];else if(isList(this.ctx[u]))this.ctx=this.ctx[u][this.ctx[u].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(u){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,u)||(this.ctx[u]=List()),isInlineList(this.ctx[u]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[u])){let i=Table();this.ctx[u].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,u))this.ctx=this.ctx[u]=Table();else{if(isInlineList(this.ctx[u]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[u]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[u]))this.ctx=this.ctx[u][this.ctx[u].length-1];else if(isTable(this.ctx[u]))this.ctx=this.ctx[u];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(u){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(u){return this.returnNow(u)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(u){return this.state.buf+=u,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let u="\\u00";return this.char<16&&(u+="0"),u+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${u} instead`))}recordMultiEscapeReplacement(u){return this.state.buf+=u,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(u){try{let i=parseInt(u,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let u=Integer(this.state.buf);if(u.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(u)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let u=Integer(this.state.buf);if(u.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(u)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let u=Integer(this.state.buf);if(u.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(u)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let u=Integer(this.state.buf);if(u.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(u)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(u){if(this.state.resultArr){let i=this.state.resultArr[_contentType],s=tomlType(u);if(i!==s)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${s}`))}else this.state.resultArr=InlineList(tomlType(u));return isFloat(u)||isInteger(u)?this.state.resultArr.push(u.valueOf()):this.state.resultArr.push(u),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(u){let i=this.state.resultTable,s=u.key.pop();for(let n of u.key){if(hasKey(i,n)&&(!isTable(i[n])||i[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[n]=i[n]||Table()}if(hasKey(i,s))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(u.value)||isFloat(u.value)?i[s]=u.value.valueOf():i[s]=u.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return t}});var Hr=q((mE,Ha)=>{"use strict";Ha.exports=km;function km(e,t){if(e.pos==null||e.line==null)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
51
51
  `,t&&t.split){let u=t.split(/\n/),i=String(Math.min(u.length,e.line+3)).length,s=" ";for(;s.length<i;)s+=" ";for(let n=Math.max(0,e.line-1);n<Math.min(u.length,e.line+2);++n){let o=String(n+1);if(o.length<i&&(o=" "+o),e.line===n){r+=o+"> "+u[n]+`
52
52
  `,r+=s+" ";for(let a=0;a<e.col;++a)r+=" ";r+=`^
53
53
  `}else r+=o+": "+u[n]+`
54
54
  `}}return e.message=r+`
55
- `,e}});var ja=z((CE,Pa)=>{"use strict";Pa.exports=$F;var SF=kr(),TF=Or();function $F(e){global.Buffer&&global.Buffer.isBuffer(e)&&(e=e.toString("utf8"));let t=new SF;try{return t.parse(e),t.finish()}catch(r){throw TF(r,e)}}});var Ua=z((EE,Ha)=>{"use strict";Ha.exports=OF;var kF=kr(),Ma=Or();function OF(e,t){t||(t={});let r=0,u=t.blocksize||40960,i=new kF;return new Promise((n,o)=>{setImmediate(s,r,u,n,o)});function s(n,o,a,D){if(n>=e.length)try{return a(i.finish())}catch(c){return D(Ma(c,e))}try{i.parse(e.slice(n,n+o)),setImmediate(s,n+o,o,a,D)}catch(c){D(Ma(c,e))}}}});var Ga=z((yE,Va)=>{"use strict";Va.exports=IF;var RF=OD("stream"),Wa=kr();function IF(e){return e?LF(e):NF(e)}function LF(e){let t=new Wa;return e.setEncoding("utf8"),new Promise((r,u)=>{let i,s=!1,n=!1;function o(){if(s=!0,!i)try{r(t.finish())}catch(c){u(c)}}function a(c){n=!0,u(c)}e.once("end",o),e.once("error",a),D();function D(){i=!0;let c;for(;(c=e.read())!==null;)try{t.parse(c)}catch(l){return a(l)}if(i=!1,s)return o();n||e.once("readable",D)}})}function NF(){let e=new Wa;return new RF.Transform({objectMode:!0,transform(t,r,u){try{e.parse(t.toString(r))}catch(i){this.emit("error",i)}u()},flush(t){try{this.push(e.finish())}catch(r){this.emit("error",r)}t()}})}});var Ya=z((AE,Ot)=>{"use strict";Ot.exports=ja();Ot.exports.async=Ua();Ot.exports.stream=Ga();Ot.exports.prettyError=Or()});var eD=z((wE,Tu)=>{"use strict";Tu.exports=PF;Tu.exports.value=Su;function PF(e){if(e===null)throw We("null");if(e===void 0)throw We("undefined");if(typeof e!="object")throw We(typeof e);if(typeof e.toJSON=="function"&&(e=e.toJSON()),e==null)return null;let t=X(e);if(t!=="table")throw We(t);return _u("","",e)}function We(e){return new Error("Can only stringify objects, not "+e)}function jF(){return new Error("Array values can't have mixed types")}function Ka(e){return Object.keys(e).filter(t=>za(e[t]))}function MF(e){return Object.keys(e).filter(t=>!za(e[t]))}function Rr(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))e[r]&&typeof e[r].toJSON=="function"&&!("toISOString"in e[r])?t[r]=e[r].toJSON():t[r]=e[r];return t}function _u(e,t,r){r=Rr(r);var u,i;u=Ka(r),i=MF(r);var s=[],n=t||"";u.forEach(a=>{var D=X(r[a]);D!=="undefined"&&D!=="null"&&s.push(n+Ir(a)+" = "+Za(r[a],!0))}),s.length>0&&s.push("");var o=e&&u.length>0?t+" ":"";return i.forEach(a=>{s.push(ZF(e,o,a,r[a]))}),s.join(`
56
- `)}function za(e){switch(X(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return e.length===0||X(e[0])!=="table";case"table":return Object.keys(e).length===0;default:return!1}}function X(e){return e===void 0?"undefined":e===null?"null":typeof e=="bigint"||Number.isInteger(e)&&!Object.is(e,-0)?"integer":typeof e=="number"?"float":typeof e=="boolean"?"boolean":typeof e=="string"?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function Ir(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:qa(t)}function qa(e){return'"'+Ja(e).replace(/"/g,'\\"')+'"'}function HF(e){return"'"+e+"'"}function UF(e,t){for(;t.length<e;)t="0"+t;return t}function Ja(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,t=>"\\u"+UF(4,t.codePointAt(0).toString(16)))}function WF(e){let t=e.split(/\n/).map(r=>Ja(r).replace(/"(?="")/g,'\\"')).join(`
55
+ `,e}});var Wa=q((FE,Ua)=>{"use strict";Ua.exports=Rm;var Tm=Mr(),Om=Hr();function Rm(e){global.Buffer&&global.Buffer.isBuffer(e)&&(e=e.toString("utf8"));let t=new Tm;try{return t.parse(e),t.finish()}catch(r){throw Om(r,e)}}});var Ya=q((gE,Ga)=>{"use strict";Ga.exports=Lm;var Im=Mr(),Va=Hr();function Lm(e,t){t||(t={});let r=0,u=t.blocksize||40960,i=new Im;return new Promise((n,o)=>{setImmediate(s,r,u,n,o)});function s(n,o,a,l){if(n>=e.length)try{return a(i.finish())}catch(c){return l(Va(c,e))}try{i.parse(e.slice(n,n+o)),setImmediate(s,n+o,o,a,l)}catch(c){l(Va(c,e))}}}});var qa=q((CE,za)=>{"use strict";za.exports=Nm;var Pm=XD("stream"),Ka=Mr();function Nm(e){return e?jm(e):Mm(e)}function jm(e){let t=new Ka;return e.setEncoding("utf8"),new Promise((r,u)=>{let i,s=!1,n=!1;function o(){if(s=!0,!i)try{r(t.finish())}catch(c){u(c)}}function a(c){n=!0,u(c)}e.once("end",o),e.once("error",a),l();function l(){i=!0;let c;for(;(c=e.read())!==null;)try{t.parse(c)}catch(D){return a(D)}if(i=!1,s)return o();n||e.once("readable",l)}})}function Mm(){let e=new Ka;return new Pm.Transform({objectMode:!0,transform(t,r,u){try{e.parse(t.toString(r))}catch(i){this.emit("error",i)}u()},flush(t){try{this.push(e.finish())}catch(r){this.emit("error",r)}t()}})}});var Ja=q((EE,Pt)=>{"use strict";Pt.exports=Wa();Pt.exports.async=Ya();Pt.exports.stream=qa();Pt.exports.prettyError=Hr()});var uD=q((yE,Mu)=>{"use strict";Mu.exports=Hm;Mu.exports.value=ju;function Hm(e){if(e===null)throw Ke("null");if(e===void 0)throw Ke("undefined");if(typeof e!="object")throw Ke(typeof e);if(typeof e.toJSON=="function"&&(e=e.toJSON()),e==null)return null;let t=te(e);if(t!=="table")throw Ke(t);return Nu("","",e)}function Ke(e){return new Error("Can only stringify objects, not "+e)}function Um(){return new Error("Array values can't have mixed types")}function Za(e){return Object.keys(e).filter(t=>Qa(e[t]))}function Wm(e){return Object.keys(e).filter(t=>!Qa(e[t]))}function Ur(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))e[r]&&typeof e[r].toJSON=="function"&&!("toISOString"in e[r])?t[r]=e[r].toJSON():t[r]=e[r];return t}function Nu(e,t,r){r=Ur(r);var u,i;u=Za(r),i=Wm(r);var s=[],n=t||"";u.forEach(a=>{var l=te(r[a]);l!=="undefined"&&l!=="null"&&s.push(n+Wr(a)+" = "+tD(r[a],!0))}),s.length>0&&s.push("");var o=e&&u.length>0?t+" ":"";return i.forEach(a=>{s.push(eF(e,o,a,r[a]))}),s.join(`
56
+ `)}function Qa(e){switch(te(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return e.length===0||te(e[0])!=="table";case"table":return Object.keys(e).length===0;default:return!1}}function te(e){return e===void 0?"undefined":e===null?"null":typeof e=="bigint"||Number.isInteger(e)&&!Object.is(e,-0)?"integer":typeof e=="number"?"float":typeof e=="boolean"?"boolean":typeof e=="string"?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function Wr(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:Xa(t)}function Xa(e){return'"'+eD(e).replace(/"/g,'\\"')+'"'}function Vm(e){return"'"+e+"'"}function Gm(e,t){for(;t.length<e;)t="0"+t;return t}function eD(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,t=>"\\u"+Gm(4,t.codePointAt(0).toString(16)))}function Ym(e){let t=e.split(/\n/).map(r=>eD(r).replace(/"(?="")/g,'\\"')).join(`
57
57
  `);return t.slice(-1)==='"'&&(t+=`\\
58
58
  `),`"""
59
- `+t+'"""'}function Za(e,t){let r=X(e);return r==="string"&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),Su(e,r)}function Su(e,t){switch(t||(t=X(e)),t){case"string-multiline":return WF(e);case"string":return qa(e);case"string-literal":return HF(e);case"integer":return Qa(e);case"float":return VF(e);case"boolean":return GF(e);case"datetime":return YF(e);case"array":return qF(e.filter(r=>X(r)!=="null"&&X(r)!=="undefined"&&X(r)!=="nan"));case"table":return JF(e);default:throw We(t)}}function Qa(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function VF(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=String(e).split("."),r=t[0],u=t[1]||0;return Qa(r)+"."+u}function GF(e){return String(e)}function YF(e){return e.toISOString()}function KF(e){return e==="float"||e==="integer"}function zF(e){var t=X(e[0]);return e.every(r=>X(r)===t)?t:e.every(r=>KF(X(r)))?"float":"mixed"}function Xa(e){let t=zF(e);if(t==="mixed")throw jF();return t}function qF(e){e=Rr(e);let t=Xa(e);var r="[",u=e.map(i=>Su(i,t));return u.join(", ").length>60||/\n/.test(u)?r+=`
59
+ `+t+'"""'}function tD(e,t){let r=te(e);return r==="string"&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),ju(e,r)}function ju(e,t){switch(t||(t=te(e)),t){case"string-multiline":return Ym(e);case"string":return Xa(e);case"string-literal":return Vm(e);case"integer":return rD(e);case"float":return Km(e);case"boolean":return zm(e);case"datetime":return qm(e);case"array":return Qm(e.filter(r=>te(r)!=="null"&&te(r)!=="undefined"&&te(r)!=="nan"));case"table":return Xm(e);default:throw Ke(t)}}function rD(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function Km(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=String(e).split("."),r=t[0],u=t[1]||0;return rD(r)+"."+u}function zm(e){return String(e)}function qm(e){return e.toISOString()}function Jm(e){return e==="float"||e==="integer"}function Zm(e){var t=te(e[0]);return e.every(r=>te(r)===t)?t:e.every(r=>Jm(te(r)))?"float":"mixed"}function nD(e){let t=Zm(e);if(t==="mixed")throw Um();return t}function Qm(e){e=Ur(e);let t=nD(e);var r="[",u=e.map(i=>ju(i,t));return u.join(", ").length>60||/\n/.test(u)?r+=`
60
60
  `+u.join(`,
61
61
  `)+`
62
- `:r+=" "+u.join(", ")+(u.length>0?" ":""),r+"]"}function JF(e){e=Rr(e);var t=[];return Object.keys(e).forEach(r=>{t.push(Ir(r)+" = "+Za(e[r],!1))}),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}function ZF(e,t,r,u){var i=X(u);if(i==="array")return QF(e,t,r,u);if(i==="table")return XF(e,t,r,u);throw We(i)}function QF(e,t,r,u){u=Rr(u),Xa(u);var i=X(u[0]);if(i!=="table")throw We(i);var s=e+Ir(r),n="";return u.forEach(o=>{n.length>0&&(n+=`
62
+ `:r+=" "+u.join(", ")+(u.length>0?" ":""),r+"]"}function Xm(e){e=Ur(e);var t=[];return Object.keys(e).forEach(r=>{t.push(Wr(r)+" = "+tD(e[r],!1))}),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}function eF(e,t,r,u){var i=te(u);if(i==="array")return tF(e,t,r,u);if(i==="table")return rF(e,t,r,u);throw Ke(i)}function tF(e,t,r,u){u=Ur(u),nD(u);var i=te(u[0]);if(i!=="table")throw Ke(i);var s=e+Wr(r),n="";return u.forEach(o=>{n.length>0&&(n+=`
63
63
  `),n+=t+"[["+s+`]]
64
- `,n+=_u(s+".",t,o)}),n}function XF(e,t,r,u){var i=e+Ir(r),s="";return Ka(u).length>0&&(s+=t+"["+i+`]
65
- `),s+_u(i+".",t,u)}});var tD=z($u=>{"use strict";$u.parse=Ya();$u.stringify=eD()});var Y={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},Qr={silent:{level:-1},fatal:{level:Y.fatal},error:{level:Y.error},warn:{level:Y.warn},log:{level:Y.log},info:{level:Y.info},success:{level:Y.success},fail:{level:Y.fail},ready:{level:Y.info},start:{level:Y.info},box:{level:Y.info},debug:{level:Y.debug},trace:{level:Y.trace},verbose:{level:Y.verbose}};function qr(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Xr(e,t,r=".",u){if(!qr(t))return Xr(e,{},r,u);let i=Object.assign({},t);for(let s in e){if(s==="__proto__"||s==="constructor")continue;let n=e[s];n!=null&&(u&&u(i,s,n,r)||(Array.isArray(n)&&Array.isArray(i[s])?i[s]=[...n,...i[s]]:qr(n)&&qr(i[s])?i[s]=Xr(n,i[s],(r?`${r}.`:"")+s.toString(),u):i[s]=n))}return i}function LD(e){return(...t)=>t.reduce((r,u)=>Xr(r,u,"",e),{})}var ND=LD();function PD(e){return Object.prototype.toString.call(e)==="[object Object]"}function jD(e){return!(!PD(e)||!e.message&&!e.args||e.stack)}var Jr=!1,Ku=[],W=class e{options;_lastLog;_mockFn;constructor(t={}){let r=t.types||Qr;this.options=ND({...t,defaults:{...t.defaults},level:Zr(t.level,r),reporters:[...t.reporters||[]]},{types:Qr,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let u in r){let i={type:u,...this.options.defaults,...r[u]};this[u]=this._wrapLogFn(i),this[u].raw=this._wrapLogFn(i,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(t){this.options.level=Zr(t,this.options.types,this.options.level)}prompt(t,r){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(t,r)}create(t){let r=new e({...this.options,...t});return this._mockFn&&r.mockTypes(this._mockFn),r}withDefaults(t){return this.create({...this.options,defaults:{...this.options.defaults,...t}})}withTag(t){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+t:t})}addReporter(t){return this.options.reporters.push(t),this}removeReporter(t){if(t){let r=this.options.reporters.indexOf(t);if(r!==-1)return this.options.reporters.splice(r,1)}else this.options.reporters.splice(0);return this}setReporters(t){return this.options.reporters=Array.isArray(t)?t:[t],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let t in this.options.types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}restoreConsole(){for(let t in this.options.types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(t,r){t&&(t.__write||(t.__write=t.write),t.write=u=>{this[r].raw(String(u).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}pauseLogs(){Jr=!0}resumeLogs(){Jr=!1;let t=Ku.splice(0);for(let r of t)r[0]._logFn(r[1],r[2])}mockTypes(t){let r=t||this.options.mockFn;if(this._mockFn=r,typeof r=="function")for(let u in this.options.types)this[u]=r(u,this.options.types[u])||this[u],this[u].raw=this[u]}_wrapLogFn(t,r){return(...u)=>{if(Jr){Ku.push([this,t,u,r]);return}return this._logFn(t,u,r)}}_logFn(t,r,u){if((t.level||0)>this.level)return!1;let i={date:new Date,args:[],...t,level:Zr(t.level,this.options.types)};!u&&r.length===1&&jD(r[0])?Object.assign(i,r[0]):i.args=[...r],i.message&&(i.args.unshift(i.message),delete i.message),i.additional&&(Array.isArray(i.additional)||(i.additional=i.additional.split(`
64
+ `,n+=Nu(s+".",t,o)}),n}function rF(e,t,r,u){var i=e+Wr(r),s="";return Za(u).length>0&&(s+=t+"["+i+`]
65
+ `),s+Nu(i+".",t,u)}});var iD=q(Hu=>{"use strict";Hu.parse=Ja();Hu.stringify=uD()});var K={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},mn={silent:{level:-1},fatal:{level:K.fatal},error:{level:K.error},warn:{level:K.warn},log:{level:K.log},info:{level:K.info},success:{level:K.success},fail:{level:K.fail},ready:{level:K.info},start:{level:K.info},box:{level:K.info},debug:{level:K.debug},trace:{level:K.trace},verbose:{level:K.verbose}};function fn(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Fn(e,t,r=".",u){if(!fn(t))return Fn(e,{},r,u);let i=Object.assign({},t);for(let s in e){if(s==="__proto__"||s==="constructor")continue;let n=e[s];n!=null&&(u&&u(i,s,n,r)||(Array.isArray(n)&&Array.isArray(i[s])?i[s]=[...n,...i[s]]:fn(n)&&fn(i[s])?i[s]=Fn(n,i[s],(r?`${r}.`:"")+s.toString(),u):i[s]=n))}return i}function rl(e){return(...t)=>t.reduce((r,u)=>Fn(r,u,"",e),{})}var nl=rl();function ul(e){return Object.prototype.toString.call(e)==="[object Object]"}function il(e){return!(!ul(e)||!e.message&&!e.args||e.stack)}var pn=!1,hi=[],V=class e{options;_lastLog;_mockFn;constructor(t={}){let r=t.types||mn;this.options=nl({...t,defaults:{...t.defaults},level:dn(t.level,r),reporters:[...t.reporters||[]]},{types:mn,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let u in r){let i={type:u,...this.options.defaults,...r[u]};this[u]=this._wrapLogFn(i),this[u].raw=this._wrapLogFn(i,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(t){this.options.level=dn(t,this.options.types,this.options.level)}prompt(t,r){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(t,r)}create(t){let r=new e({...this.options,...t});return this._mockFn&&r.mockTypes(this._mockFn),r}withDefaults(t){return this.create({...this.options,defaults:{...this.options.defaults,...t}})}withTag(t){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+t:t})}addReporter(t){return this.options.reporters.push(t),this}removeReporter(t){if(t){let r=this.options.reporters.indexOf(t);if(r!==-1)return this.options.reporters.splice(r,1)}else this.options.reporters.splice(0);return this}setReporters(t){return this.options.reporters=Array.isArray(t)?t:[t],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let t in this.options.types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}restoreConsole(){for(let t in this.options.types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(t,r){t&&(t.__write||(t.__write=t.write),t.write=u=>{this[r].raw(String(u).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}pauseLogs(){pn=!0}resumeLogs(){pn=!1;let t=hi.splice(0);for(let r of t)r[0]._logFn(r[1],r[2])}mockTypes(t){let r=t||this.options.mockFn;if(this._mockFn=r,typeof r=="function")for(let u in this.options.types)this[u]=r(u,this.options.types[u])||this[u],this[u].raw=this[u]}_wrapLogFn(t,r){return(...u)=>{if(pn){hi.push([this,t,u,r]);return}return this._logFn(t,u,r)}}_logFn(t,r,u){if((t.level||0)>this.level)return!1;let i={date:new Date,args:[],...t,level:dn(t.level,this.options.types)};!u&&r.length===1&&il(r[0])?Object.assign(i,r[0]):i.args=[...r],i.message&&(i.args.unshift(i.message),delete i.message),i.additional&&(Array.isArray(i.additional)||(i.additional=i.additional.split(`
66
66
  `)),i.args.push(`
67
67
  `+i.additional.join(`
68
- `)),delete i.additional),i.type=typeof i.type=="string"?i.type.toLowerCase():"log",i.tag=typeof i.tag=="string"?i.tag:"";let s=(o=!1)=>{let a=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&a>0){let D=[...this._lastLog.object.args];a>1&&D.push(`(repeated ${a} times)`),this._log({...this._lastLog.object,args:D}),this._lastLog.count=1}o&&(this._lastLog.object=i,this._log(i))};clearTimeout(this._lastLog.timeout);let n=this._lastLog.time&&i.date?i.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=i.date,n<this.options.throttle)try{let o=JSON.stringify([i.type,i.tag,i.args]),a=this._lastLog.serialized===o;if(this._lastLog.serialized=o,a&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(s,this.options.throttle);return}}catch{}s(!0)}_log(t){for(let r of this.options.reporters)r.log(t,{options:this.options})}};function Zr(e,t={},r=3){return e===void 0?r:typeof e=="number"?e:t[e]&&t[e].level!==void 0?t[e].level:r}W.prototype.add=W.prototype.addReporter;W.prototype.remove=W.prototype.removeReporter;W.prototype.clear=W.prototype.removeReporter;W.prototype.withScope=W.prototype.withTag;W.prototype.mock=W.prototype.mockTypes;W.prototype.pause=W.prototype.pauseLogs;W.prototype.resume=W.prototype.resumeLogs;function zu(e={}){return new W(e)}import{formatWithOptions as qu}from"node:util";import{sep as MD}from"node:path";function tn(e,t){let r=process.cwd()+MD;return e.split(`
68
+ `)),delete i.additional),i.type=typeof i.type=="string"?i.type.toLowerCase():"log",i.tag=typeof i.tag=="string"?i.tag:"";let s=(o=!1)=>{let a=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&a>0){let l=[...this._lastLog.object.args];a>1&&l.push(`(repeated ${a} times)`),this._log({...this._lastLog.object,args:l}),this._lastLog.count=1}o&&(this._lastLog.object=i,this._log(i))};clearTimeout(this._lastLog.timeout);let n=this._lastLog.time&&i.date?i.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=i.date,n<this.options.throttle)try{let o=JSON.stringify([i.type,i.tag,i.args]),a=this._lastLog.serialized===o;if(this._lastLog.serialized=o,a&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(s,this.options.throttle);return}}catch{}s(!0)}_log(t){for(let r of this.options.reporters)r.log(t,{options:this.options})}};function dn(e,t={},r=3){return e===void 0?r:typeof e=="number"?e:t[e]&&t[e].level!==void 0?t[e].level:r}V.prototype.add=V.prototype.addReporter;V.prototype.remove=V.prototype.removeReporter;V.prototype.clear=V.prototype.removeReporter;V.prototype.withScope=V.prototype.withTag;V.prototype.mock=V.prototype.mockTypes;V.prototype.pause=V.prototype.pauseLogs;V.prototype.resume=V.prototype.resumeLogs;function fi(e={}){return new V(e)}import{formatWithOptions as pi}from"node:util";import{sep as sl}from"node:path";function Cn(e,t){let r=process.cwd()+sl;return e.split(`
69
69
  `).splice(t.split(`
70
- `).length).map(i=>i.trim().replace("file://","").replace(r,""))}function HD(e,t){return(t.__write||t.write).call(t,e)}var en=e=>e?`[${e}]`:"",ut=class{formatStack(t,r,u){let i=" ".repeat((u?.errorLevel||0)+1);return i+tn(t,r).join(`
71
- ${i}`)}formatError(t,r){let u=t.message??qu(r,t),i=t.stack?this.formatStack(t.stack,u,r):"",s=r?.errorLevel||0,n=s>0?`${" ".repeat(s)}[cause]: `:"",o=t.cause?`
70
+ `).length).map(i=>i.trim().replace("file://","").replace(r,""))}function ol(e,t){return(t.__write||t.write).call(t,e)}var gn=e=>e?`[${e}]`:"",pt=class{formatStack(t,r,u){let i=" ".repeat((u?.errorLevel||0)+1);return i+Cn(t,r).join(`
71
+ ${i}`)}formatError(t,r){let u=t.message??pi(r,t),i=t.stack?this.formatStack(t.stack,u,r):"",s=r?.errorLevel||0,n=s>0?`${" ".repeat(s)}[cause]: `:"",o=t.cause?`
72
72
 
73
73
  `+this.formatError(t.cause,{...r,errorLevel:s+1}):"";return n+u+`
74
- `+i+o}formatArgs(t,r){let u=t.map(i=>i&&typeof i.stack=="string"?this.formatError(i,r):i);return qu(r,...u)}formatDate(t,r){return r.date?t.toLocaleTimeString():""}filterAndJoin(t){return t.filter(Boolean).join(" ")}formatLogObj(t,r){let u=this.formatArgs(t.args,r);return t.type==="box"?`
75
- `+[en(t.tag),t.title&&t.title,...u.split(`
74
+ `+i+o}formatArgs(t,r){let u=t.map(i=>i&&typeof i.stack=="string"?this.formatError(i,r):i);return pi(r,...u)}formatDate(t,r){return r.date?t.toLocaleTimeString():""}filterAndJoin(t){return t.filter(Boolean).join(" ")}formatLogObj(t,r){let u=this.formatArgs(t.args,r);return t.type==="box"?`
75
+ `+[gn(t.tag),t.title&&t.title,...u.split(`
76
76
  `)].filter(Boolean).map(i=>" > "+i).join(`
77
77
  `)+`
78
- `:this.filterAndJoin([en(t.type),en(t.tag),u])}log(t,r){let u=this.formatLogObj(t,{columns:r.options.stdout.columns||0,...r.options.formatOptions});return HD(u+`
79
- `,t.level<2?r.options.stderr||process.stderr:r.options.stdout||process.stdout)}};import xi from"node:process";import*as Pt from"node:tty";var{env:Ae={},argv:Qu=[],platform:UD=""}=typeof process>"u"?{}:process,WD="NO_COLOR"in Ae||Qu.includes("--no-color"),VD="FORCE_COLOR"in Ae||Qu.includes("--color"),GD=UD==="win32",Xu=Ae.TERM==="dumb",YD=Pt&&Pt.isatty&&Pt.isatty(1)&&Ae.TERM&&!Xu,KD="CI"in Ae&&("GITHUB_ACTIONS"in Ae||"GITLAB_CI"in Ae||"CIRCLECI"in Ae),zD=!WD&&(VD||GD&&!Xu||YD||KD);function ei(e,t,r,u,i=t.slice(0,Math.max(0,e))+u,s=t.slice(Math.max(0,e+r.length)),n=s.indexOf(r)){return i+(n<0?s:ei(n,s,r,u))}function qD(e,t,r,u,i){return e<0?r+t+u:r+ei(e,t,u,i)+u}function JD(e,t,r=e,u=e.length+1){return i=>i||!(i===""||i===void 0)?qD((""+i).indexOf(t,u),i,e,t,r):""}function w(e,t,r){return JD(`\x1B[${e}m`,`\x1B[${t}m`,r)}var Ju={reset:w(0,0),bold:w(1,22,"\x1B[22m\x1B[1m"),dim:w(2,22,"\x1B[22m\x1B[2m"),italic:w(3,23),underline:w(4,24),inverse:w(7,27),hidden:w(8,28),strikethrough:w(9,29),black:w(30,39),red:w(31,39),green:w(32,39),yellow:w(33,39),blue:w(34,39),magenta:w(35,39),cyan:w(36,39),white:w(37,39),gray:w(90,39),bgBlack:w(40,49),bgRed:w(41,49),bgGreen:w(42,49),bgYellow:w(43,49),bgBlue:w(44,49),bgMagenta:w(45,49),bgCyan:w(46,49),bgWhite:w(47,49),blackBright:w(90,39),redBright:w(91,39),greenBright:w(92,39),yellowBright:w(93,39),blueBright:w(94,39),magentaBright:w(95,39),cyanBright:w(96,39),whiteBright:w(97,39),bgBlackBright:w(100,49),bgRedBright:w(101,49),bgGreenBright:w(102,49),bgYellowBright:w(103,49),bgBlueBright:w(104,49),bgMagentaBright:w(105,49),bgCyanBright:w(106,49),bgWhiteBright:w(107,49)};function ZD(e=zD){return e?Ju:Object.fromEntries(Object.keys(Ju).map(t=>[t,String]))}var J=ZD();function QD(e,t="reset"){return J[e]||J[t]}var XD=[String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");function ye(e){return e.replace(new RegExp(XD,"g"),"")}var Zu={solid:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},doubleSingle:{tl:"\u2553",tr:"\u2556",bl:"\u2559",br:"\u255C",h:"\u2500",v:"\u2551"},doubleSingleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2551"},singleThick:{tl:"\u250F",tr:"\u2513",bl:"\u2517",br:"\u251B",h:"\u2501",v:"\u2503"},singleDouble:{tl:"\u2552",tr:"\u2555",bl:"\u2558",br:"\u255B",h:"\u2550",v:"\u2502"},singleDoubleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2550",v:"\u2502"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},el={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1};function ti(e,t={}){let r={...t,style:{...el,...t.style}},u=e.split(`
80
- `),i=[],s=QD(r.style.borderColor),n={...typeof r.style.borderStyle=="string"?Zu[r.style.borderStyle]||Zu.solid:r.style.borderStyle};if(s)for(let f in n)n[f]=s(n[f]);let o=r.style.padding%2===0?r.style.padding:r.style.padding+1,a=u.length+o,D=Math.max(...u.map(f=>ye(f).length),r.title?ye(r.title).length:0)+o,c=D+o,l=r.style.marginLeft>0?" ".repeat(r.style.marginLeft):"";if(r.style.marginTop>0&&i.push("".repeat(r.style.marginTop)),r.title){let f=s?s(r.title):r.title,p=n.h.repeat(Math.floor((D-ye(r.title).length)/2)),y=n.h.repeat(D-ye(r.title).length-ye(p).length+o);i.push(`${l}${n.tl}${p}${f}${y}${n.tr}`)}else i.push(`${l}${n.tl}${n.h.repeat(c)}${n.tr}`);let h=r.style.valign==="center"?Math.floor((a-u.length)/2):r.style.valign==="top"?a-u.length-o:a-u.length;for(let f=0;f<a;f++)if(f<h||f>=h+u.length)i.push(`${l}${n.v}${" ".repeat(c)}${n.v}`);else{let p=u[f-h],y=" ".repeat(o),C=" ".repeat(D-ye(p).length);i.push(`${l}${n.v}${y}${p}${C}${n.v}`)}return i.push(`${l}${n.bl}${n.h.repeat(c)}${n.br}`),r.style.marginBottom>0&&i.push("".repeat(r.style.marginBottom)),i.join(`
81
- `)}var Gt=Object.create(null),st=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Gt:globalThis),we=new Proxy(Gt,{get(e,t){return st()[t]??Gt[t]},has(e,t){let r=st();return t in r||t in Gt},set(e,t,r){let u=st(!0);return u[t]=r,!0},deleteProperty(e,t){if(!t)return!1;let r=st(!0);return delete r[t],!0},ownKeys(){let e=st(!0);return Object.keys(e)}}),Vl=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",Gl=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function Yl(){if(globalThis.process?.env)for(let e of Gl){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var Si=Yl();Si.name;function Te(e){return e?e!=="false":!1}var Kl=globalThis.process?.platform||"",dn=Te(we.CI)||Si.ci!==!1,Ti=Te(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),zl=Te(we.DEBUG),Fn=Vl==="test"||Te(we.TEST);Te(we.MINIMAL);var ql=/^win/i.test(Kl);!Te(we.NO_COLOR)&&(Te(we.FORCE_COLOR)||(Ti||ql)&&we.TERM);var Jl=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(Jl?.split(".")[0]);var Zl=globalThis.process||Object.create(null),vi={versions:{}};new Proxy(Zl,{get(e,t){if(t==="env")return we;if(t in e)return e[t];if(t in vi)return vi[t]}});var Ql=globalThis.process?.release?.name==="node",Xl=!!globalThis.Bun||!!globalThis.process?.versions?.bun,ec=!!globalThis.Deno,tc=!!globalThis.fastly,rc=!!globalThis.Netlify,nc=!!globalThis.EdgeRuntime,uc=globalThis.navigator?.userAgent==="Cloudflare-Workers",ic=[[rc,"netlify"],[nc,"edge-light"],[uc,"workerd"],[tc,"fastly"],[ec,"deno"],[Xl,"bun"],[Ql,"node"]];function sc(){let e=ic.find(t=>t[0]);if(e)return{name:e[1]}}var oc=sc();oc?.name;function ac({onlyFirst:e=!1}={}){let r=["[\\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(r,e?void 0:"g")}var Dc=ac();function lc(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Dc,"")}function cc(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function hc(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function fc(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function pc(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function dc(e,{ambiguousAsWide:t=!1}={}){return pc(e),hc(e)||fc(e)||t&&cc(e)?2:1}var Fc=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,mc=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:e=>e.split("")},gc=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Cc(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:u=!1}=t;if(u||(e=lc(e)),e.length===0)return 0;let i=0,s={ambiguousAsWide:!r};for(let{segment:n}of mc.segment(e)){let o=n.codePointAt(0);if(!(o<=31||o>=127&&o<=159)&&!(o>=8203&&o<=8207||o===65279)&&!(o>=768&&o<=879||o>=6832&&o<=6911||o>=7616&&o<=7679||o>=8400&&o<=8447||o>=65056&&o<=65071)&&!(o>=55296&&o<=57343)&&!(o>=65024&&o<=65039)&&!gc.test(n)){if(Fc().test(n)){i+=2;continue}i+=dc(o,s)}}return i}function Ec(){let{env:e}=xi,{TERM:t,TERM_PROGRAM:r}=e;return xi.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var yc={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},Ac={0:"red",1:"yellow"},wc=Ec(),le=(e,t)=>wc?e:t,Bi={error:le("\u2716","\xD7"),fatal:le("\u2716","\xD7"),ready:le("\u2714","\u221A"),warn:le("\u26A0","\u203C"),info:le("\u2139","i"),success:le("\u2714","\u221A"),debug:le("\u2699","D"),trace:le("\u2192","\u2192"),fail:le("\u2716","\xD7"),start:le("\u25D0","o"),log:""};function _i(e){return!(typeof Intl=="object")||!Intl.Segmenter?ye(e).length:Cc(e)}var pn=class extends ut{formatStack(t,r,u){let i=" ".repeat((u?.errorLevel||0)+1);return`
82
- ${i}`+tn(t,r).map(s=>" "+s.replace(/^at +/,n=>J.gray(n)).replace(/\((.+)\)/,(n,o)=>`(${J.cyan(o)})`)).join(`
83
- ${i}`)}formatType(t,r,u){let i=yc[t.type]||Ac[t.level]||"gray";if(r)return xc(i)(J.black(` ${t.type.toUpperCase()} `));let s=typeof Bi[t.type]=="string"?Bi[t.type]:t.icon||t.type;return s?bc(i)(s):""}formatLogObj(t,r){let[u,...i]=this.formatArgs(t.args,r).split(`
84
- `);if(t.type==="box")return ti(Vt(u+(i.length>0?`
78
+ `:this.filterAndJoin([gn(t.type),gn(t.tag),u])}log(t,r){let u=this.formatLogObj(t,{columns:r.options.stdout.columns||0,...r.options.formatOptions});return ol(u+`
79
+ `,t.level<2?r.options.stderr||process.stderr:r.options.stdout||process.stdout)}};import Vi from"node:process";import*as qt from"node:tty";var{env:be={},argv:Fi=[],platform:al=""}=typeof process>"u"?{}:process,Dl="NO_COLOR"in be||Fi.includes("--no-color"),ll="FORCE_COLOR"in be||Fi.includes("--color"),cl=al==="win32",gi=be.TERM==="dumb",hl=qt&&qt.isatty&&qt.isatty(1)&&be.TERM&&!gi,fl="CI"in be&&("GITHUB_ACTIONS"in be||"GITLAB_CI"in be||"CIRCLECI"in be),pl=!Dl&&(ll||cl&&!gi||hl||fl);function Ci(e,t,r,u,i=t.slice(0,Math.max(0,e))+u,s=t.slice(Math.max(0,e+r.length)),n=s.indexOf(r)){return i+(n<0?s:Ci(n,s,r,u))}function dl(e,t,r,u,i){return e<0?r+t+u:r+Ci(e,t,u,i)+u}function ml(e,t,r=e,u=e.length+1){return i=>i||!(i===""||i===void 0)?dl((""+i).indexOf(t,u),i,e,t,r):""}function A(e,t,r){return ml(`\x1B[${e}m`,`\x1B[${t}m`,r)}var di={reset:A(0,0),bold:A(1,22,"\x1B[22m\x1B[1m"),dim:A(2,22,"\x1B[22m\x1B[2m"),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),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),blackBright:A(90,39),redBright:A(91,39),greenBright:A(92,39),yellowBright:A(93,39),blueBright:A(94,39),magentaBright:A(95,39),cyanBright:A(96,39),whiteBright:A(97,39),bgBlackBright:A(100,49),bgRedBright:A(101,49),bgGreenBright:A(102,49),bgYellowBright:A(103,49),bgBlueBright:A(104,49),bgMagentaBright:A(105,49),bgCyanBright:A(106,49),bgWhiteBright:A(107,49)};function Fl(e=pl){return e?di:Object.fromEntries(Object.keys(di).map(t=>[t,String]))}var Z=Fl();function gl(e,t="reset"){return Z[e]||Z[t]}var Cl=[String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");function Ae(e){return e.replace(new RegExp(Cl,"g"),"")}var mi={solid:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},doubleSingle:{tl:"\u2553",tr:"\u2556",bl:"\u2559",br:"\u255C",h:"\u2500",v:"\u2551"},doubleSingleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2551"},singleThick:{tl:"\u250F",tr:"\u2513",bl:"\u2517",br:"\u251B",h:"\u2501",v:"\u2503"},singleDouble:{tl:"\u2552",tr:"\u2555",bl:"\u2558",br:"\u255B",h:"\u2550",v:"\u2502"},singleDoubleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2550",v:"\u2502"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},El={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1};function Ei(e,t={}){let r={...t,style:{...El,...t.style}},u=e.split(`
80
+ `),i=[],s=gl(r.style.borderColor),n={...typeof r.style.borderStyle=="string"?mi[r.style.borderStyle]||mi.solid:r.style.borderStyle};if(s)for(let f in n)n[f]=s(n[f]);let o=r.style.padding%2===0?r.style.padding:r.style.padding+1,a=u.length+o,l=Math.max(...u.map(f=>Ae(f).length),r.title?Ae(r.title).length:0)+o,c=l+o,D=r.style.marginLeft>0?" ".repeat(r.style.marginLeft):"";if(r.style.marginTop>0&&i.push("".repeat(r.style.marginTop)),r.title){let f=s?s(r.title):r.title,p=n.h.repeat(Math.floor((l-Ae(r.title).length)/2)),y=n.h.repeat(l-Ae(r.title).length-Ae(p).length+o);i.push(`${D}${n.tl}${p}${f}${y}${n.tr}`)}else i.push(`${D}${n.tl}${n.h.repeat(c)}${n.tr}`);let h=r.style.valign==="center"?Math.floor((a-u.length)/2):r.style.valign==="top"?a-u.length-o:a-u.length;for(let f=0;f<a;f++)if(f<h||f>=h+u.length)i.push(`${D}${n.v}${" ".repeat(c)}${n.v}`);else{let p=u[f-h],y=" ".repeat(o),C=" ".repeat(l-Ae(p).length);i.push(`${D}${n.v}${y}${p}${C}${n.v}`)}return i.push(`${D}${n.bl}${n.h.repeat(c)}${n.br}`),r.style.marginBottom>0&&i.push("".repeat(r.style.marginBottom)),i.join(`
81
+ `)}var rr=Object.create(null),mt=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?rr:globalThis),xe=new Proxy(rr,{get(e,t){return mt()[t]??rr[t]},has(e,t){let r=mt();return t in r||t in rr},set(e,t,r){let u=mt(!0);return u[t]=r,!0},deleteProperty(e,t){if(!t)return!1;let r=mt(!0);return delete r[t],!0},ownKeys(){let e=mt(!0);return Object.keys(e)}}),lc=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",cc=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function hc(){if(globalThis.process?.env)for(let e of cc){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var zi=hc();zi.name;function $e(e){return e?e!=="false":!1}var fc=globalThis.process?.platform||"",Tn=$e(xe.CI)||zi.ci!==!1,qi=$e(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),pc=$e(xe.DEBUG),On=lc==="test"||$e(xe.TEST);$e(xe.MINIMAL);var dc=/^win/i.test(fc);!$e(xe.NO_COLOR)&&($e(xe.FORCE_COLOR)||(qi||dc)&&xe.TERM);var mc=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(mc?.split(".")[0]);var Fc=globalThis.process||Object.create(null),Gi={versions:{}};new Proxy(Fc,{get(e,t){if(t==="env")return xe;if(t in e)return e[t];if(t in Gi)return Gi[t]}});var gc=globalThis.process?.release?.name==="node",Cc=!!globalThis.Bun||!!globalThis.process?.versions?.bun,Ec=!!globalThis.Deno,yc=!!globalThis.fastly,wc=!!globalThis.Netlify,Ac=!!globalThis.EdgeRuntime,bc=globalThis.navigator?.userAgent==="Cloudflare-Workers",xc=[[wc,"netlify"],[Ac,"edge-light"],[bc,"workerd"],[yc,"fastly"],[Ec,"deno"],[Cc,"bun"],[gc,"node"]];function vc(){let e=xc.find(t=>t[0]);if(e)return{name:e[1]}}var Bc=vc();Bc?.name;function _c({onlyFirst:e=!1}={}){let r=["[\\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(r,e?void 0:"g")}var Sc=_c();function $c(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Sc,"")}function kc(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Tc(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Oc(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function Rc(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Ic(e,{ambiguousAsWide:t=!1}={}){return Rc(e),Tc(e)||Oc(e)||t&&kc(e)?2:1}var Lc=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,Pc=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:e=>e.split("")},Nc=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function jc(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:u=!1}=t;if(u||(e=$c(e)),e.length===0)return 0;let i=0,s={ambiguousAsWide:!r};for(let{segment:n}of Pc.segment(e)){let o=n.codePointAt(0);if(!(o<=31||o>=127&&o<=159)&&!(o>=8203&&o<=8207||o===65279)&&!(o>=768&&o<=879||o>=6832&&o<=6911||o>=7616&&o<=7679||o>=8400&&o<=8447||o>=65056&&o<=65071)&&!(o>=55296&&o<=57343)&&!(o>=65024&&o<=65039)&&!Nc.test(n)){if(Lc().test(n)){i+=2;continue}i+=Ic(o,s)}}return i}function Mc(){let{env:e}=Vi,{TERM:t,TERM_PROGRAM:r}=e;return Vi.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Hc={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},Uc={0:"red",1:"yellow"},Wc=Mc(),he=(e,t)=>Wc?e:t,Yi={error:he("\u2716","\xD7"),fatal:he("\u2716","\xD7"),ready:he("\u2714","\u221A"),warn:he("\u26A0","\u203C"),info:he("\u2139","i"),success:he("\u2714","\u221A"),debug:he("\u2699","D"),trace:he("\u2192","\u2192"),fail:he("\u2716","\xD7"),start:he("\u25D0","o"),log:""};function Ki(e){return!(typeof Intl=="object")||!Intl.Segmenter?Ae(e).length:jc(e)}var kn=class extends pt{formatStack(t,r,u){let i=" ".repeat((u?.errorLevel||0)+1);return`
82
+ ${i}`+Cn(t,r).map(s=>" "+s.replace(/^at +/,n=>Z.gray(n)).replace(/\((.+)\)/,(n,o)=>`(${Z.cyan(o)})`)).join(`
83
+ ${i}`)}formatType(t,r,u){let i=Hc[t.type]||Uc[t.level]||"gray";if(r)return Gc(i)(Z.black(` ${t.type.toUpperCase()} `));let s=typeof Yi[t.type]=="string"?Yi[t.type]:t.icon||t.type;return s?Vc(i)(s):""}formatLogObj(t,r){let[u,...i]=this.formatArgs(t.args,r).split(`
84
+ `);if(t.type==="box")return Ei(tr(u+(i.length>0?`
85
85
  `+i.join(`
86
- `):"")),{title:t.title?Vt(t.title):void 0,style:t.style});let s=this.formatDate(t.date,r),n=s&&J.gray(s),o=t.badge??t.level<2,a=this.formatType(t,o,r),D=t.tag?J.gray(t.tag):"",c,l=this.filterAndJoin([a,Vt(u)]),h=this.filterAndJoin(r.columns?[D,n]:[D]),f=(r.columns||0)-_i(l)-_i(h)-2;if(c=f>0&&(r.columns||0)>=80?l+" ".repeat(f)+h:(h?`${J.gray(`[${h}]`)} `:"")+l,c+=Vt(i.length>0?`
86
+ `):"")),{title:t.title?tr(t.title):void 0,style:t.style});let s=this.formatDate(t.date,r),n=s&&Z.gray(s),o=t.badge??t.level<2,a=this.formatType(t,o,r),l=t.tag?Z.gray(t.tag):"",c,D=this.filterAndJoin([a,tr(u)]),h=this.filterAndJoin(r.columns?[l,n]:[l]),f=(r.columns||0)-Ki(D)-Ki(h)-2;if(c=f>0&&(r.columns||0)>=80?D+" ".repeat(f)+h:(h?`${Z.gray(`[${h}]`)} `:"")+D,c+=tr(i.length>0?`
87
87
  `+i.join(`
88
88
  `):""),t.type==="trace"){let p=new Error("Trace: "+t.message);c+=this.formatStack(p.stack||"",p.message)}return o?`
89
89
  `+c+`
90
- `:c}};function Vt(e){return e.replace(/`([^`]+)`/gm,(t,r)=>J.cyan(r)).replace(/\s+_([^_]+)_\s+/gm,(t,r)=>` ${J.underline(r)} `)}function bc(e="white"){return J[e]||J.white}function xc(e="bgWhite"){return J[`bg${e[0].toUpperCase()}${e.slice(1)}`]||J.bgWhite}function vc(e={}){let t=Bc();return process.env.CONSOLA_LEVEL&&(t=Number.parseInt(process.env.CONSOLA_LEVEL)??t),zu({level:t,defaults:{level:t},stdout:process.stdout,stderr:process.stderr,prompt:(...u)=>Promise.resolve().then(()=>(bi(),wi)).then(i=>i.prompt(...u)),reporters:e.reporters||[e.fancy??!(dn||Fn)?new pn:new ut],...e})}function Bc(){return zl?Y.debug:Fn?Y.warn:Y.info}var m=vc();var _c="https://shaders.com";function te(){return(process.env.SHADERS_API_URL||_c).replace(/\/+$/,"")}var L=class extends Error{constructor(r,u,i=null){super(u);this.status=r;this.data=i;this.name="ApiError"}status;data;get upgradeUrl(){let r=this.data?.upgrade_url;return typeof r=="string"?r:null}get code(){let r=this.data?.error;return typeof r=="string"?r:null}get isProjectNotFound(){return this.code==="project_not_found"}},ce=class extends Error{constructor(r,u){super(r);this.what=u;this.name="GoneError"}what};function $e(e){return new ce(`The connected Shaders project (${e}) isn't available to this account \u2014 it may have been deleted, or it belongs to a different account.
91
- Run npx shaders connect to pick a different project, or npx shaders login to switch accounts.`,"project")}async function V(e,t={}){let r=new URL(e,te()+"/");for(let[o,a]of Object.entries(t.query??{}))r.searchParams.set(o,a);let u={Accept:"application/json"};t.token&&(u.Authorization=`Bearer ${t.token}`),t.body!==void 0&&(u["Content-Type"]="application/json");let i;try{i=await fetch(r,{method:t.method??"GET",headers:u,body:t.body===void 0?void 0:JSON.stringify(t.body)})}catch(o){throw new L(0,`Could not reach ${r.host} (${o instanceof Error?o.message:String(o)})`)}let s=await i.text(),n=null;if(s)try{n=JSON.parse(s)}catch{n=null}if(!i.ok){let o=n&&typeof n=="object"&&typeof n.message=="string"?n.message:`${i.status} ${i.statusText}`;throw new L(i.status,o,n&&typeof n=="object"?n:null)}return n}import{spawn as Sc}from"node:child_process";import{chmod as Tc,mkdir as $c,readFile as $i,rm as kc,writeFile as Oc}from"node:fs/promises";import{homedir as Rc}from"node:os";import ki from"node:path";var Ic=2e3,Lc=10*6e4,Oi=6e4;function Ri(){return process.env.SHADERS_HOME||ki.join(Rc(),".shaders")}function at(){return ki.join(Ri(),"credentials.json")}function mn(){let e=process.env.SHADERS_API_KEY?.trim();return e?{host:te(),accessToken:e}:null}async function Ii(){let e=mn();if(e)return e;try{let t=JSON.parse(await $i(at(),"utf8"));return typeof t.accessToken!="string"||t.host!==te()?null:t}catch{return null}}async function Li(e){await $c(Ri(),{recursive:!0,mode:448}),await Oc(at(),JSON.stringify(e,null,2)+`
92
- `,{mode:384}),await Tc(at(),384).catch(()=>{})}async function Ni(){mn()&&m.info("SHADERS_API_KEY is set in this environment \u2014 unset it to sign out of that key");let e=!0;try{await $i(at())}catch{e=!1}return await kc(at(),{force:!0}),e}function Pi(e){return{host:te(),accessToken:e.access_token,refreshToken:e.refresh_token,expiresAt:e.expires_in?Date.now()+e.expires_in*1e3:void 0}}function Dt(e){let[t,r]=process.platform==="darwin"?["open",[e]]:process.platform==="win32"?["cmd",["/c","start","",e.replace(/&/g,"^&")]]:["xdg-open",[e]];try{let u=Sc(t,r,{stdio:"ignore",detached:!0});u.on("error",()=>{}),u.unref()}catch{}}var Nc=e=>new Promise(t=>setTimeout(t,e));async function gn(){if(mn())throw new Error("SHADERS_API_KEY is set but was rejected by Shaders \u2014 check the key is valid and belongs to the right account, or unset it to sign in with your browser");let{url:e,readKey:t}=await V("/api/plugin-auth/authorize",{method:"POST"});m.info(`Opening your browser to sign in to Shaders\u2026
90
+ `:c}};function tr(e){return e.replace(/`([^`]+)`/gm,(t,r)=>Z.cyan(r)).replace(/\s+_([^_]+)_\s+/gm,(t,r)=>` ${Z.underline(r)} `)}function Vc(e="white"){return Z[e]||Z.white}function Gc(e="bgWhite"){return Z[`bg${e[0].toUpperCase()}${e.slice(1)}`]||Z.bgWhite}function Yc(e={}){let t=Kc();return process.env.CONSOLA_LEVEL&&(t=Number.parseInt(process.env.CONSOLA_LEVEL)??t),fi({level:t,defaults:{level:t},stdout:process.stdout,stderr:process.stderr,prompt:(...u)=>Promise.resolve().then(()=>(Wi(),Ui)).then(i=>i.prompt(...u)),reporters:e.reporters||[e.fancy??!(Tn||On)?new kn:new pt],...e})}function Kc(){return pc?K.debug:On?K.warn:K.info}var d=Yc();var zc="https://shaders.com";function G(){return(process.env.SHADERS_API_URL||zc).replace(/\/+$/,"")}var P=class extends Error{constructor(r,u,i=null){super(u);this.status=r;this.data=i;this.name="ApiError"}status;data;get upgradeUrl(){let r=this.data?.upgrade_url;return typeof r=="string"?r:null}get code(){let r=this.data?.error;return typeof r=="string"?r:null}get isProjectNotFound(){return this.code==="project_not_found"}},fe=class extends Error{constructor(r,u){super(r);this.what=u;this.name="GoneError"}what};function ke(e){return new fe(`The connected Shaders project (${e}) isn't available to this account \u2014 it may have been deleted, or it belongs to a different account.
91
+ Run npx shaders connect to pick a different project, or npx shaders login to switch accounts.`,"project")}async function j(e,t={}){let r=new URL(e,G()+"/");for(let[o,a]of Object.entries(t.query??{}))r.searchParams.set(o,a);let u={Accept:"application/json"};t.token&&(u.Authorization=`Bearer ${t.token}`),t.body!==void 0&&(u["Content-Type"]="application/json");let i;try{i=await fetch(r,{method:t.method??"GET",headers:u,body:t.body===void 0?void 0:JSON.stringify(t.body)})}catch(o){throw new P(0,`Could not reach ${r.host} (${o instanceof Error?o.message:String(o)})`)}let s=await i.text(),n=null;if(s)try{n=JSON.parse(s)}catch{n=null}if(!i.ok){let o=n&&typeof n=="object"&&typeof n.message=="string"?n.message:`${i.status} ${i.statusText}`;throw new P(i.status,o,n&&typeof n=="object"?n:null)}return n}import{spawn as qc}from"node:child_process";import{chmod as Jc,mkdir as Zc,readFile as Ji,rm as Qc,writeFile as Xc}from"node:fs/promises";import{homedir as eh}from"node:os";import Zi from"node:path";var th=2e3,rh=10*6e4,Qi=6e4;function Xi(){return process.env.SHADERS_HOME||Zi.join(eh(),".shaders")}function gt(){return Zi.join(Xi(),"credentials.json")}function Rn(){let e=process.env.SHADERS_API_KEY?.trim();return e?{host:G(),accessToken:e}:null}async function es(){let e=Rn();if(e)return e;try{let t=JSON.parse(await Ji(gt(),"utf8"));return typeof t.accessToken!="string"||t.host!==G()?null:t}catch{return null}}async function ts(e){await Zc(Xi(),{recursive:!0,mode:448}),await Xc(gt(),JSON.stringify(e,null,2)+`
92
+ `,{mode:384}),await Jc(gt(),384).catch(()=>{})}async function rs(){Rn()&&d.info("SHADERS_API_KEY is set in this environment \u2014 unset it to sign out of that key");let e=!0;try{await Ji(gt())}catch{e=!1}return await Qc(gt(),{force:!0}),e}function ns(e){return{host:G(),accessToken:e.access_token,refreshToken:e.refresh_token,expiresAt:e.expires_in?Date.now()+e.expires_in*1e3:void 0}}function Te(e){let[t,r]=process.platform==="darwin"?["open",[e]]:process.platform==="win32"?["cmd",["/c","start","",e.replace(/&/g,"^&")]]:["xdg-open",[e]];try{let u=qc(t,r,{stdio:"ignore",detached:!0});u.on("error",()=>{}),u.unref()}catch{}}var nh=e=>new Promise(t=>setTimeout(t,e));async function Ct(e={}){if(Rn())throw new Error("SHADERS_API_KEY is set but was rejected by Shaders \u2014 check the key is valid and belongs to the right account, or unset it to sign in with your browser");let{url:t,readKey:r}=await j("/api/plugin-auth/authorize",{method:"POST",body:e.screen?{screen:e.screen}:void 0});d.info(`Opening your browser to ${e.screen==="sign-up"?"create your Shaders account":"sign in to Shaders"}\u2026
93
93
  If it doesn't open, visit:
94
- ${e}`),Dt(e),m.start("Waiting for you to finish signing in");let r=Date.now()+Lc;for(;Date.now()<r;){await Nc(Ic);let u;try{u=await V("/api/plugin-auth/poll",{method:"POST",query:{readKey:t}})}catch(i){if(i instanceof L&&(i.status===404||i.status===410))throw new Error("The sign-in session expired. Run the command again to start over.");continue}if(u&&typeof u.access_token=="string"){let i=Pi(u);return await Li(i),i}}throw new Error("Timed out waiting for sign-in. Run the command again to start over.")}async function Yt(e){if(!e.refreshToken)return null;try{let t=await V("/api/plugin-auth/refresh",{method:"POST",body:{refresh_token:e.refreshToken}}),r=Pi({...t,refresh_token:t.refresh_token??e.refreshToken});return await Li(r),r}catch{return null}}async function ot(e){return V("/api/plugin/me",{token:e.accessToken})}async function Kt(){let e=await Ii();if(!e||e.expiresAt&&e.expiresAt-Oi<Date.now()&&(e=await Yt(e),!e))return null;try{return{credentials:e,me:await ot(e)}}catch(t){if(!(t instanceof L)||t.status!==401)throw t;let r=await Yt(e);if(!r)return null;try{return{credentials:r,me:await ot(r)}}catch(u){if(u instanceof L&&u.status===401)return null;throw u}}}async function ge(){let e=await Ii();if(e&&(e.expiresAt&&e.expiresAt-Oi<Date.now()&&(e=await Yt(e)),e))try{return{credentials:e,me:await ot(e)}}catch(r){if(!(r instanceof L)||r.status!==401)throw r;let u=await Yt(e);if(u)try{return{credentials:u,me:await ot(u)}}catch(i){if(!(i instanceof L)||i.status!==401)throw i}}let t=await gn();return{credentials:t,me:await ot(t)}}function he(e){console.error(`\u2717 ${e}`),process.exit(1)}import sr from"node:path";import{createRequire as mh}from"node:module";import{existsSync as lt}from"node:fs";import{readFile as yn}from"node:fs/promises";var Pc=/^[A-Za-z]:\//;function ji(e=""){return e&&e.replace(/\\/g,"/").replace(Pc,t=>t.toUpperCase())}var jc=/^[/\\]{2}/,Mc=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Hc=/^[A-Za-z]:$/;var Oe=function(e){if(e.length===0)return".";e=ji(e);let t=e.match(jc),r=ke(e),u=e[e.length-1]==="/";return e=Cn(e,!r),e.length===0?r?"/":u?"./":".":(u&&(e+="/"),Hc.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!ke(e)?`/${e}`:e)},Re=function(...e){let t="";for(let r of e)if(r)if(t.length>0){let u=t[t.length-1]==="/",i=r[0]==="/";u&&i?t+=r.slice(1):t+=u||i?r:`/${r}`}else t+=r;return Oe(t)};function Uc(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var Ie=function(...e){e=e.map(u=>ji(u));let t="",r=!1;for(let u=e.length-1;u>=-1&&!r;u--){let i=u>=0?e[u]:Uc();!i||i.length===0||(t=`${i}/${t}`,r=ke(i))}return t=Cn(t,!r),r&&!ke(t)?`/${t}`:t.length>0?t:"."};function Cn(e,t){let r="",u=0,i=-1,s=0,n=null;for(let o=0;o<=e.length;++o){if(o<e.length)n=e[o];else{if(n==="/")break;n="/"}if(n==="/"){if(!(i===o-1||s===1))if(s===2){if(r.length<2||u!==2||r[r.length-1]!=="."||r[r.length-2]!=="."){if(r.length>2){let a=r.lastIndexOf("/");a===-1?(r="",u=0):(r=r.slice(0,a),u=r.length-1-r.lastIndexOf("/")),i=o,s=0;continue}else if(r.length>0){r="",u=0,i=o,s=0;continue}}t&&(r+=r.length>0?"/..":"..",u=2)}else r.length>0?r+=`/${e.slice(i+1,o)}`:r=e.slice(i+1,o),u=o-i-1;i=o,s=0}else n==="."&&s!==-1?++s:s=-1}return r}var ke=function(e){return Mc.test(e)};import{spawn as Vc,spawnSync as I2}from"node:child_process";import{cwd as Gi}from"node:process";import{basename as Gc,delimiter as zt,dirname as Mi,normalize as Yc,resolve as Yi}from"node:path";import{fileURLToPath as Kc}from"node:url";import{pipeline as zc}from"node:stream/promises";import{PassThrough as qc}from"node:stream";import Jc from"node:readline";import{closeSync as Zc,openSync as Qc,readSync as Xc,statSync as eh}from"node:fs";var th=/^path$/i,Hi={key:"PATH",value:""};function Ki(e){for(let t in e){if(!Object.prototype.hasOwnProperty.call(e,t)||!th.test(t))continue;let r=e[t];return r?{key:t,value:r}:Hi}return Hi}function rh(e,t){let r=t.value.split(zt),u=[],i=typeof e=="string"?e:Kc(e,{windows:!1}),s;do u.push(Yi(i,"node_modules",".bin")),s=i,i=Mi(i);while(i!==s);u.push(Mi(process.execPath));let n=u.concat(r).join(zt);return{key:t.key,value:n}}function nh(e,t,r=!0){let u={...process.env,...t};if(!r)return u;let i=rh(e,Ki(u));return u[i.key]=i.value,u}var uh=e=>{let t=e.length,r=new qc,u=()=>{--t===0&&r.end()};for(let i of e)zc(i,r,{end:!1}).then(u).catch(u);return r},En=/([()\][%!^"`<>&|;, *?])/g,ih=/^#!\s*(.+)/,sh=/\.(?:com|exe)$/i,oh=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,ah=process.platform==="win32",Dh=[".EXE",".CMD",".BAT",".COM"],lh=[""];function ch(e,t=[],r={}){if(r.shell===!0||!ah)return{command:e,args:t,options:r};let u=Ui(e,r),i=null;if(u!==null){let n=Buffer.alloc(150),o=null;try{o=Qc(u,"r"),Xc(o,n,0,150,0)}catch{}finally{o!==null&&Zc(o)}let a=n.toString().match(ih);if(a!==null){let D=a[1].trim(),c=D.indexOf(" "),l=c!==-1?D.slice(0,c):D,h=c!==-1?D.slice(c+1):"",f=Gc(l);i=f==="env"?h||null:f}}if(i!==null&&u!==null&&(t=[u,...t],e=i,u=Ui(e,r)),u===null||!sh.test(u)){let s=u!==null&&oh.test(u);e=Yc(e),e=e.replace(En,"^$1"),t=t.map(n=>(n=n.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),n=n.replace(/(?=(\\+?)?)\1$/,"$1$1"),n=`"${n}"`,n=n.replace(En,"^$1"),s&&(n=n.replace(En,"^$1")),n)),t=["/d","/s","/c",`"${[e,...t].join(" ")}"`],e=r.env?.comspec??"cmd.exe",r={...r,windowsVerbatimArguments:!0}}return{command:e,args:t,options:r}}function Ui(e,t){let r=(t.cwd??Gi()).toString(),u=t.env??process.env,i=Ki(u).value,s=e.includes("/")||e.includes("\\")?[""]:[r,...i.split(zt)],n=u.PATHEXT?u.PATHEXT.split(zt):Dh;e.includes(".")&&n[0]!==""&&(n=["",...n]);for(let o of[n,lh])for(let a of s){let D=a.startsWith('"')&&a.endsWith('"')&&a.length>1?a.slice(1,-1):a,c=Yi(r,D,e);for(let l of o){let h=c+l;try{if(eh(h).isFile())return h}catch{}}}return null}var Wi=class extends Error{result;output;exitCode;get signalCode(){return this.result.signalCode}constructor(e,t,r,u){let i="The process";r&&(i=`The command \`${u?.length?`${r} ${u.map(n=>/[ "'`()]/.test(n)?JSON.stringify(n):n).join(" ")}`:r}\``);let s=e.exitCode??1;super(e.signalCode!==null?`${i} was killed by the signal ${e.signalCode}`:`${i} exited with a non-zero status (${s})`),this.result=e,this.output=t,this.exitCode=s,Object.defineProperty(this,"result",{enumerable:!1,writable:!1,configurable:!1})}};var hh={timeout:void 0,persist:!1};var fh={windowsHide:!0};function ph(e){let t=new AbortController;for(let r of e){if(r.aborted)return t.abort(),r;let u=()=>{t.abort(r.reason)};r.addEventListener("abort",u,{signal:t.signal})}return t.signal}async function Vi(e){let t="";try{for await(let r of e)t+=r.toString()}catch{}return t}var dh=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}get signalCode(){return this._process?.signalCode??null}constructor(e,t,r){this._options={...hh,...r},this._command=e,this._args=t??[],this._processClosed=new Promise(u=>{this._resolveClose=u})}kill(e){return this._process?.kill(e)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(e,t,r){return Fh(e,t,{...r,stdin:this})}async*[Symbol.asyncIterator](){let e=this._process;if(!e)return;let t=[];this._streamErr&&t.push(this._streamErr),this._streamOut&&t.push(this._streamOut);let r=uh(t),u=Jc.createInterface({input:r});for await(let i of u)yield i.toString();if(await this._processClosed,e.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&(this.exitCode!==0&&this.exitCode!==void 0||this.signalCode!==null))throw new Wi(this,void 0,this._command,this._args)}async _waitForOutput(){let e=this._process;if(!e)throw new Error("No process was started");let[t,r]=await Promise.all([this._streamOut?Vi(this._streamOut):"",this._streamErr?Vi(this._streamErr):""]);await this._processClosed;let{stdin:u}=this._options;if(u&&typeof u!="string"&&await u,e.removeAllListeners(),this._thrownError)throw this._thrownError;let i={stderr:r,stdout:t,exitCode:this.exitCode};if(this._options.throwOnError&&(this.exitCode!==0&&this.exitCode!==void 0||this.signalCode!==null))throw new Wi(this,i,this._command,this._args);return i}then(e,t){return this._waitForOutput().then(e,t)}_streamOut;_streamErr;spawn(){let e=this._options,t={...fh,...e.nodeOptions},r=t?.cwd??Gi(),u=[];this._resetState(),e.timeout!==void 0&&u.push(AbortSignal.timeout(e.timeout)),e.signal!==void 0&&u.push(e.signal),e.persist===!0&&(t.detached=!0),u.length>0&&(t.signal=ph(u)),t.env=nh(r,t.env,e.nodePath);let i=ch(this._command,this._args,t),s=Vc(i.command,i.args,i.options);if(s.stderr&&(this._streamErr=s.stderr),s.stdout&&(this._streamOut=s.stdout),this._process=s,s.once("error",this._onError),s.once("close",this._onClose),s.stdin){let{stdin:n}=e;typeof n=="string"?s.stdin.end(n):n?.process?.stdout?.pipe(s.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(e=>{this._resolveClose=e}),this._thrownError=void 0}_onError=e=>{if(e.name==="AbortError"&&(!(e.cause instanceof Error)||e.cause.name!=="TimeoutError")){this._aborted=!0;return}this._thrownError=e};_onClose=()=>{this._resolveClose&&this._resolveClose()}};var qt=(e,t,r)=>{let u=new dh(e,t,r);return u.spawn(),u},Fh=qt;import{join as An}from"node:path";async function wn(e,t,r={}){let u=Oe(e).split("/");for(;u.length>0;){let i=await t(u.join("/")||"/");if(i||!r.includeParentDirs)return i;u.pop()}}async function qi(e,t={}){return wn(e,r=>{let u=An(r,"package.json");if(lt(u))return yn(u,"utf8").then(i=>JSON.parse(i))},t)}async function gh(e,t){let r=await wn(t,u=>{let i=An(u,"node_modules",e,"package.json");if(lt(i))return i},{includeParentDirs:!0});if(!r)return null;try{return JSON.parse(await yn(r,"utf8"))}catch{return null}}async function Ch(e,t){let r;try{r=e.resolve(t)}catch{return null}return qi(r,{includeParentDirs:!0})}function Eh(e){let t;return()=>(t===void 0&&(t=e().then(r=>(t=r,t))),t)}var yh=Eh(async()=>{if(globalThis.process?.versions?.webcontainer)return!1;try{let{exitCode:e}=await qt("corepack",["--version"]);return e===0}catch{return!1}});async function Ah(e,t,r={}){let u=e!=="npm"&&e!=="bun"&&e!=="deno"&&e!=="aube"&&e!=="nub"&&r.corepack!==!1&&await yh()?["corepack",[e,...t]]:[e,t],i=process.stdin.isTTY?"inherit":"ignore",s=r.silent?[i,"pipe","pipe"]:[i,"inherit","inherit"],{exitCode:n,stdout:o,stderr:a}=await qt(u[0],u[1],{nodeOptions:{cwd:Ie(r.cwd||process.cwd()),env:r.env,stdio:s}});if(n!==0)throw new Error(`\`${u.flat().join(" ")}\` failed.${r.silent?["",o,a].join(`
95
- `):""}`)}var wh="No package manager auto-detected.";async function bh(e={}){let t=e.cwd||process.cwd(),r={...process.env,...e.env},u=(typeof e.packageManager=="string"?be.find(i=>i.name===e.packageManager):e.packageManager)||await bn(e.cwd||process.cwd());if(!u)throw new Error(wh);return{cwd:t,env:r,silent:e.silent??!1,packageManager:u,dev:e.dev??!1,workspace:e.workspace,global:e.global??!1,dry:e.dry??!1,corepack:e.corepack??!0}}function zi(e){if(!e.workspace)return[];let t=typeof e.workspace=="string"&&e.workspace!==""?e.workspace:void 0;return e.packageManager.name==="pnpm"||e.packageManager.name==="aube"||e.packageManager.name==="nub"?t?["--filter",t]:["--workspace-root"]:e.packageManager.name==="npm"?t?["-w",t]:["--workspaces"]:e.packageManager.name==="yarn"?!e.packageManager.majorVersion||e.packageManager.majorVersion==="1"?t?["--cwd",t]:["-W"]:t?["workspace",t]:[]:[]}var Ji=/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;function xh(e){let[t,r]=(e||"").split("@"),[u,i]=r?.split("+")||[];if(t&&t!=="-"&&Ji.test(t))return{name:t,version:u,buildMeta:i};let s=(t||"").replace(/\W+/g,"");return{name:s,version:u,buildMeta:i,warnings:[`Abnormal characters found in \`packageManager\` field, sanitizing from \`${t}\` to \`${s}\``]}}function vh(e){let t=e?.packageManager,r=Array.isArray(t)?t[0]:t,u=typeof r?.name=="string"?r.name:void 0,i=typeof r?.version=="string"?r.version:void 0;if(!u)return{};if(!Ji.test(u)){let s=u.replace(/\W+/g,"");return{name:s,version:i,warnings:[`Abnormal characters found in \`devEngines.packageManager\` field, sanitizing from \`${u}\` to \`${s}\``]}}return{name:u,version:i}}var be=[{name:"npm",command:"npm",lockFile:"package-lock.json"},{name:"aube",command:"aube",lockFile:"aube-lock.yaml"},{name:"nub",command:"nub",lockFile:"nub.lock"},{name:"pnpm",command:"pnpm",lockFile:"pnpm-lock.yaml",files:["pnpm-workspace.yaml"]},{name:"bun",command:"bun",lockFile:["bun.lockb","bun.lock"]},{name:"yarn",command:"yarn",lockFile:"yarn.lock",files:[".yarnrc.yml"]},{name:"deno",command:"deno",lockFile:"deno.lock",files:["deno.json"]}];async function bn(e,t={}){let r=await wn(Ie(e||"."),async u=>{if(!t.ignorePackageJSON){let i=Re(u,"package.json");if(lt(i)){let n=JSON.parse(await yn(i,"utf8"));if(n?.packageManager){let{name:a,version:D="0.0.0",buildMeta:c,warnings:l}=xh(n.packageManager);if(a){let h=D.split(".")[0],f=be.find(p=>p.name===a&&p.majorVersion===h)||be.find(p=>p.name===a);return{name:a,command:a,version:D,majorVersion:h,buildMeta:c,warnings:l,files:f?.files,lockFile:f?.lockFile}}}let o=vh(n?.devEngines);if(o.name){let{name:a,version:D,warnings:c}=o,l=D?.match(/\d+/)?.[0],h=be.find(f=>f.name===a&&f.majorVersion===l)||be.find(f=>f.name===a);return{name:a,command:a,version:D,majorVersion:l,warnings:c,files:h?.files,lockFile:h?.lockFile}}}let s=Re(u,"deno.json");if(lt(s))return be.find(n=>n.name==="deno")}if(!t.ignoreLockFile){for(let i of be)if([i.lockFile,i.files].flat().filter(Boolean).some(s=>lt(Ie(u,s))))return{...i}}},{includeParentDirs:t.includeParentDirs??!0});if(!r&&!t.ignoreArgv){let u=process.argv[1];if(u){for(let i of be)if(new RegExp(`[/\\\\]\\.?${i.command}`).test(u))return i}}return r}async function Jt(e,t={}){let r=await bh(t),u=Array.isArray(e)?e:[e];if(r.packageManager.name==="deno")for(let s=0;s<u.length;s++)/^(npm|jsr|file):.+$/.test(u[s]||"")||(u[s]=`npm:${u[s]}`);if(u.length===0)return{};let i=(r.packageManager.name==="yarn"?[...zi(r),r.global&&r.packageManager.majorVersion==="1"?"global":"","add",r.dev?"-D":"",...u]:[r.packageManager.name==="npm"?"install":"add",...zi(r),r.dev?"-D":"",r.global?"-g":"",...u]).filter(Boolean);if(r.dry||await Ah(r.packageManager.command,i,{cwd:r.cwd,silent:r.silent,corepack:r.corepack}),!r.dry&&t.installPeerDependencies){let s=await qi(r.cwd),n=[],o=[],a=mh(An(r.cwd,"/_.js"));for(let D of u){let c=D.match(/^(.[^@]+)/)?.[0];if(!c)continue;let l=await Ch(a,c);if(l?.name!==c&&(l=await gh(c,r.cwd)),!!l?.peerDependencies)for(let[h,f]of Object.entries(l.peerDependencies))l.peerDependenciesMeta?.[h]?.optional||s?.dependencies?.[h]||s?.devDependencies?.[h]||(l.peerDependenciesMeta?.[h]?.dev?o:n).push(`${h}@${f}`)}n.length>0&&await Jt(n,{...r}),o.length>0&&await Bh(o,{...r})}return{exec:{command:r.packageManager.command,args:i}}}async function Bh(e,t={}){return await Jt(e,{...t,dev:!0})}import{readFile as vn,writeFile as Zi}from"node:fs/promises";import Qi from"node:path";var _h=["shaders.config.ts","shaders.config.mts","shaders.config.js","shaders.config.mjs"],Sh=["react","vue","svelte","solid"],Xi={framework:e=>`Components are imported from 'shaders/${e}'`,project:()=>"Shaders project this codebase is connected to",outDir:()=>"Where `npx shaders install` writes component files"};async function ct(e){for(let t of _h){let r=Qi.join(e,t);try{return await vn(r),r}catch{}}return null}function xn(e,t){let r=new RegExp(`\\b${t}\\s*:\\s*(['"\`])([^'"\`]*)\\1`).exec(e);return r?r[2]:null}async function es(e){let t=await vn(e,"utf8"),r=xn(t,"framework");return{framework:Sh.includes(r)?r:null,project:xn(t,"project"),outDir:xn(t,"outDir")}}function Th(e){let t=["import { defineConfig } from 'shaders/config'","","export default defineConfig({"];for(let r of["framework","project","outDir"]){let u=e[r];u&&t.push(` // ${Xi[r](u)}`,` ${r}: '${u}',`)}return t.push("})",""),t.join(`
96
- `)}async function ts(e,t,r){let u=Qi.join(e,r?"shaders.config.ts":"shaders.config.js");return await Zi(u,Th(t)),u}async function xe(e,t,r){let u=await vn(e,"utf8"),i=new RegExp(`(\\b${t}\\s*:\\s*)(['"\`])[^'"\`]*\\2`),s;if(i.test(u))s=u.replace(i,`$1'${r}'`);else{let n=/^([ \t]*)(framework|project|outDir)\s*:\s*['"`][^'"`]*['"`],?[ \t]*$/gm,o=null;for(let l=n.exec(u);l;l=n.exec(u))o=l;if(!o)return!1;let a=o[1],c=`${o[0].trimEnd().endsWith(",")?o[0]:o[0].trimEnd()+","}
97
- ${a}// ${Xi[t](r)}
98
- ${a}${t}: '${r}',`;s=u.slice(0,o.index)+c+u.slice(o.index+o[0].length)}return await Zi(e,s),!0}import{existsSync as Bs}from"node:fs";import _s from"node:path";import{promises as Lf,statSync as Nf}from"node:fs";Bn();var Qt=Symbol("singleComment"),rs=Symbol("multiComment"),Ih=()=>"",Lh=(e,t,r)=>e.slice(t,r).replace(/[^ \t\r\n]/g," "),Nh=(e,t)=>{let r=t-1,u=0;for(;e[r]==="\\";)--r,u+=1;return!!(u%2)};function ns(e,{whitespace:t=!0,trailingCommas:r=!1}={}){if(typeof e!="string")throw TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let u=t?Lh:Ih,i=!1,s=!1,n=0,o="",a="",D=-1;for(let l=0;l<e.length;l++){let h=e[l],f=e[l+1];if(!s&&h==='"'&&(Nh(e,l)||(i=!i)),!i)if(!s&&h+f==="//")o+=e.slice(n,l),n=l,s=Qt,l++;else if(s===Qt&&h+f===`\r
99
- `){l++,s=!1,o+=u(e,n,l),n=l;continue}else if(s===Qt&&h===`
100
- `)s=!1,o+=u(e,n,l),n=l;else if(!s&&h+f==="/*"){o+=e.slice(n,l),n=l,s=rs,l++;continue}else if(s===rs&&h+f==="*/"){l++,s=!1,o+=u(e,n,l+1),n=l+1;continue}else r&&!s&&(D===-1?h===","&&(a+=o+e.slice(n,l),o="",n=l,D=l):h==="}"||h==="]"?(o+=e.slice(n,l),a+=u(o,0,1)+o.slice(1),o="",n=l,D=-1):h!==" "&&h!==" "&&h!=="\r"&&h!==`
101
- `&&(o+=e.slice(n,l),n=l,D=-1))}let c=s===Qt?u(e,n):e.slice(n);return a+o+c}Bn();function us(e,t){let r=JSON.parse(ht(e),t?.reviver);return Zt(e,r,t),r}function is(e,t){let r=JSON.parse(ns(ht(e),{trailingCommas:t?.allowTrailingComma}));return Zt(e,r,t),r}import Ph,{lstatSync as jh,realpathSync as Fs,statSync as On}from"node:fs";import{URL as H,fileURLToPath as B,pathToFileURL as fe}from"node:url";import Rn,{isAbsolute as Mh}from"node:path";import pe from"node:assert";import Le from"node:process";import{format as ms,inspect as kn}from"node:util";var In=["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"],Hh=/^([A-Z][a-z\d]*)+$/,Uh=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),Ln=new Map;function _n(e,t="and"){switch(e.length){case 0:return"";case 1:return`${e[0]}`;case 2:return`${e[0]} ${t} ${e[1]}`;case 3:return`${e[0]}, ${e[1]}, ${t} ${e[2]}`;default:return`${e.slice(0,-1).join(", ")}, ${t} ${e.at(-1)}`}}function gs(e){let t=0,r=/%[dfijoOs]/g;for(;r.exec(e)!==null;)t++;return t}function ae(e,t,r){return Ln.set(e,t),Wh(r,e)}var Sn=Symbol("kIsNodeError");function Wh(e,t){let r=Ln.get(t),u=typeof r=="string"?gs(r):-1;switch(u){case 0:{class i extends e{code=t;constructor(...n){pe.ok(n.length===0,`Code: ${t}; The provided arguments length (${n.length}) does not match the required ones (${u}).`),super(r)}get["constructor"](){return e}get[Sn](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}case-1:{class i extends e{code=t;constructor(...n){super(),Object.defineProperty(this,"message",{value:Vh(t,n,this),enumerable:!1,writable:!0,configurable:!0})}get["constructor"](){return e}get[Sn](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}default:{class i extends e{code=t;constructor(...n){pe.ok(n.length===u,`Code: ${t}; The provided arguments length (${n.length}) does not match the required ones (${u}).`),n.unshift(r),super(Reflect.apply(ms,null,n))}get["constructor"](){return e}get[Sn](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}}}function Vh(e,t,r){let u=Ln.get(e);if(pe.ok(u!==void 0,"expected `message` to be found"),typeof u=="function")return pe.ok(u.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${u.length}).`),Reflect.apply(u,r,t);let i=gs(u);return pe.ok(i===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${i}).`),t.length===0?u:(t.unshift(u),Reflect.apply(ms,null,t))}function Gh(e){if(e===null)return"null";if(e===void 0)return"undefined";let t=typeof e;switch(t){case"bigint":return`type bigint (${e}n)`;case"number":return e===0?1/e===Number.NEGATIVE_INFINITY?"type number (-0)":"type number (0)":Number.isNaN(e)?"type number (NaN)":e===Number.POSITIVE_INFINITY?"type number (Infinity)":e===Number.NEGATIVE_INFINITY?"type number (-Infinity)":`type number (${e})`;case"boolean":return e?"type boolean (true)":"type boolean (false)";case"symbol":return`type symbol (${String(e)})`;case"function":return`function ${e.name}`;case"object":return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${kn(e,{depth:-1})}`;case"string":{let r=e;return r.length>28&&(r=`${r.slice(0,25)}...`),r.includes("'")?`type string (${JSON.stringify(r)})`:`type string ('${r}')`}default:{let r=kn(e,{colors:!1});return r.length>28&&(r=`${r.slice(0,25)}...`),`type ${t} (${r})`}}}ae("ERR_INVALID_ARG_TYPE",(e,t,r)=>{pe.ok(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let u="The ";if(e.endsWith(" argument"))u+=`${e} `;else{let o=e.includes(".")?"property":"argument";u+=`"${e}" ${o} `}u+="must be ";let i=[],s=[],n=[];for(let o of t)pe.ok(typeof o=="string","All expected entries have to be of type string"),Uh.has(o)?i.push(o.toLowerCase()):Hh.exec(o)===null?(pe.ok(o!=="object",'The value "object" should be written as "Object"'),n.push(o)):s.push(o);if(s.length>0){let o=i.indexOf("object");o!==-1&&(i.splice(o,1),s.push("Object"))}return i.length>0&&(u+=`${i.length>1?"one of type":"of type"} ${_n(i,"or")}`,(s.length>0||n.length>0)&&(u+=" or ")),s.length>0&&(u+=`an instance of ${_n(s,"or")}`,n.length>0&&(u+=" or ")),n.length>0&&(n.length>1?u+=`one of ${_n(n,"or")}`:(n[0]?.toLowerCase()!==n[0]&&(u+="an "),u+=`${n[0]}`)),u+=`. Received ${Gh(r)}`,u},TypeError);var rr=ae("ERR_INVALID_MODULE_SPECIFIER",(e,t,r)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError),Nn=ae("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error),Yh=ae("ERR_INVALID_PACKAGE_TARGET",(e,t,r,u=!1,i)=>{let s=typeof r=="string"&&!u&&r.length>0&&!r.startsWith("./");return t==="."?(pe.ok(u===!1),`Invalid "exports" main target ${JSON.stringify(r)} defined in the package config ${e}package.json${i?` imported from ${i}`:""}${s?'; targets must start with "./"':""}`):`Invalid "${u?"imports":"exports"}" target ${JSON.stringify(r)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:""}${s?'; targets must start with "./"':""}`},Error),Pn=ae("ERR_MODULE_NOT_FOUND",function(e,t,r=!1){return r&&typeof r=="string"&&(this.url=`${r}`),`Cannot find ${r?"module":"package"} '${e}' imported from ${t}`},Error),Kh=ae("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,r)=>`Package import specifier "${e}" is not defined${t?` in package ${t||""}package.json`:""} imported from ${r}`,TypeError),zh=ae("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,r)=>t==="."?`No "exports" main defined in ${e}package.json${r?` imported from ${r}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${r?` imported from ${r}`:""}`,Error),qh=ae("ERR_UNSUPPORTED_DIR_IMPORT",function(e,t,r=void 0){return this.url=r,`Directory import '${e}' is not supported resolving ES modules imported from ${t}`},Error),ss=ae("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),Jh=ae("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);ae("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let u=kn(t);return u.length>128&&(u=`${u.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${u}`},TypeError);var ft={}.hasOwnProperty,os=new Map;function Cs(e,{base:t,specifier:r}){let u=os.get(e);if(u)return u;let i;try{i=Ph.readFileSync(Rn.toNamespacedPath(e),"utf8")}catch(n){let o=n;if(o.code!=="ENOENT")throw o}let s={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(i!==void 0){let n;try{n=JSON.parse(i)}catch(o){let a=new Nn(e,(t?`"${r}" from `:"")+B(t||r),o.message);throw a.cause=o,a}s.exists=!0,ft.call(n,"name")&&typeof n.name=="string"&&(s.name=n.name),ft.call(n,"main")&&typeof n.main=="string"&&(s.main=n.main),ft.call(n,"exports")&&(s.exports=n.exports),ft.call(n,"imports")&&(s.imports=n.imports),ft.call(n,"type")&&(n.type==="commonjs"||n.type==="module")&&(s.type=n.type)}return os.set(e,s),s}function tr(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let r=Cs(B(t),{specifier:e});if(r.exists)return r;let u=t;if(t=new URL("../package.json",t),t.pathname===u.pathname)break}return{pjsonPath:B(t),exists:!1,type:"none"}}var Zh={}.hasOwnProperty,Qh={__proto__:null,".json":"json",".cjs":"commonjs",".cts":"commonjs",".js":"module",".ts":"module",".mts":"module",".mjs":"module"},as={__proto__:null,"data:":ef,"file:":nf,"node:":()=>"builtin"};function Xh(e){return e&&/^\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?$/i.test(e)?"module":e==="application/json"?"json":null}function ef(e){let{1:t}=/^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/.exec(e.pathname)||[null,null,null];return Xh(t)}var tf=46,Ds=47;function rf(e){let t=e.pathname;for(let r=t.length-1;r>0;r--)switch(t.charCodeAt(r)){case Ds:return"";case tf:return t.charCodeAt(r-1)===Ds?"":t.slice(r)}return""}function nf(e,t,r){let u=rf(e);if(u===".js"){let{type:s}=tr(e);return s!=="none"?s:"commonjs"}if(u===""){let{type:s}=tr(e);return s==="module"?"module":s!=="none"?s:"commonjs"}let i=Qh[u];if(i)return i;if(!r)throw new Jh(u,B(e))}function uf(e,t){let r=e.protocol;return Zh.call(as,r)&&as[r](e,t,!0)||null}var Xt=RegExp.prototype[Symbol.replace],Es={}.hasOwnProperty,ls=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,cs=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,sf=/^\.|%|\\/,er=/\*/g,of=/%2f|%5c/i,hs=new Set,af=/[/\\]{2}/;function fs(e,t,r,u,i,s,n){if(Le.noDeprecation)return;let o=B(u),a=af.exec(n?e:t)!==null;Le.emitWarning(`Use of deprecated ${a?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===r?"":`matched to "${r}" `}in the "${i?"imports":"exports"}" field module resolution of the package at ${o}${s?` imported from ${B(s)}`:""}.`,"DeprecationWarning","DEP0166")}function ps(e,t,r,u){if(Le.noDeprecation||uf(e,{parentURL:r.href})!=="module")return;let i=B(e.href),s=B(new H(".",t)),n=B(r);u?Rn.resolve(s,u)!==i&&Le.emitWarning(`Package ${s} has a "main" field set to "${u}", excluding the full filename and extension to the resolved file at "${i.slice(s.length)}", imported from ${n}.
102
- Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):Le.emitWarning(`No "main" or "exports" field defined in the package.json for ${s} resolving the main entry point "${i.slice(s.length)}", imported from ${n}.
103
- Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function ys(e){try{return On(e)}catch{}}function Tn(e){let t=On(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function Df(e,t,r){let u;if(t.main!==void 0){if(u=new H(t.main,e),Tn(u))return u;let n=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],o=-1;for(;++o<n.length&&(u=new H(n[o],e),!Tn(u));)u=void 0;if(u)return ps(u,e,r,t.main),u}let i=["./index.js","./index.json","./index.node"],s=-1;for(;++s<i.length&&(u=new H(i[s],e),!Tn(u));)u=void 0;if(u)return ps(u,e,r,t.main),u;throw new Pn(B(new H(".",e)),B(r))}function lf(e,t,r){if(of.exec(e.pathname)!==null)throw new rr(e.pathname,String.raw`must not include encoded "/" or "\" characters`,B(t));let u;try{u=B(e)}catch(s){throw Object.defineProperty(s,"input",{value:String(e)}),Object.defineProperty(s,"module",{value:String(t)}),s}let i=ys(u.endsWith("/")?u.slice(-1):u);if(i&&i.isDirectory()){let s=new qh(u,B(t));throw s.url=String(e),s}if(!i||!i.isFile()){let s=new Pn(u||e.pathname,t&&B(t),!0);throw s.url=String(e),s}if(!r){let s=Fs(u),{search:n,hash:o}=e;e=fe(s+(u.endsWith(Rn.sep)?"/":"")),e.search=n,e.hash=o}return e}function cf(e,t,r){return new Kh(e,t&&B(new H(".",t)),B(r))}function $n(e,t,r){return new zh(B(new H(".",t)),e,r&&B(r))}function hf(e,t,r,u,i){throw new rr(e,`request is not a valid match in pattern "${t}" for the "${u?"imports":"exports"}" resolution of ${B(r)}`,i&&B(i))}function pt(e,t,r,u,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new Yh(B(new H(".",r)),e,t,u,i&&B(i))}function ff(e,t,r,u,i,s,n,o,a){if(t!==""&&!s&&e.at(-1)!=="/")throw pt(r,e,u,n,i);if(!e.startsWith("./")){if(n&&!e.startsWith("../")&&!e.startsWith("/")){let h=!1;try{new H(e),h=!0}catch{}if(!h)return ws(s?Xt.call(er,e,()=>t):e+t,u,a)}throw pt(r,e,u,n,i)}if(ls.exec(e.slice(2))!==null)if(cs.exec(e.slice(2))===null){if(!o){let h=s?r.replace("*",()=>t):r+t;fs(s?Xt.call(er,e,()=>t):e,h,r,u,n,i,!0)}}else throw pt(r,e,u,n,i);let D=new H(e,u),c=D.pathname,l=new H(".",u).pathname;if(!c.startsWith(l))throw pt(r,e,u,n,i);if(t==="")return D;if(ls.exec(t)!==null){let h=s?r.replace("*",()=>t):r+t;cs.exec(t)===null?o||fs(s?Xt.call(er,e,()=>t):e,h,r,u,n,i,!1):hf(h,r,u,n,i)}return s?new H(Xt.call(er,D.href,()=>t)):new H(t,D)}function pf(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function Ye(e,t,r,u,i,s,n,o,a){if(typeof t=="string")return ff(t,r,u,e,i,s,n,o,a);if(Array.isArray(t)){let D=t;if(D.length===0)return null;let c,l=-1;for(;++l<D.length;){let h=D[l],f;try{f=Ye(e,h,r,u,i,s,n,o,a)}catch(p){let y=p;if(c=y,y.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw p}if(f!==void 0){if(f===null){c=null;continue}return f}}if(c==null)return c;throw c}if(typeof t=="object"&&t!==null){let D=Object.getOwnPropertyNames(t),c=-1;for(;++c<D.length;){let l=D[c];if(pf(l))throw new Nn(B(e),B(i),'"exports" cannot contain numeric property keys.')}for(c=-1;++c<D.length;){let l=D[c];if(l==="default"||a&&a.has(l)){let h=t[l],f=Ye(e,h,r,u,i,s,n,o,a);if(f===void 0)continue;return f}}return}if(t===null)return null;throw pt(u,t,e,n,i)}function df(e,t,r){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let u=Object.getOwnPropertyNames(e),i=!1,s=0,n=-1;for(;++n<u.length;){let o=u[n],a=o===""||o[0]!==".";if(s++===0)i=a;else if(i!==a)throw new Nn(B(t),B(r),`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return i}function Ff(e,t,r){if(Le.noDeprecation)return;let u=B(t);hs.has(u+"|"+e)||(hs.add(u+"|"+e),Le.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${u}${r?` imported from ${B(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function ds(e,t,r,u,i){let s=r.exports;if(df(s,e,u)&&(s={".":s}),Es.call(s,t)&&!t.includes("*")&&!t.endsWith("/")){let c=s[t],l=Ye(e,c,"",t,u,!1,!1,!1,i);if(l==null)throw $n(t,e,u);return l}let n="",o="",a=Object.getOwnPropertyNames(s),D=-1;for(;++D<a.length;){let c=a[D],l=c.indexOf("*");if(l!==-1&&t.startsWith(c.slice(0,l))){t.endsWith("/")&&Ff(t,e,u);let h=c.slice(l+1);t.length>=c.length&&t.endsWith(h)&&As(n,c)===1&&c.lastIndexOf("*")===l&&(n=c,o=t.slice(l,t.length-h.length))}}if(n){let c=s[n],l=Ye(e,c,o,n,u,!0,!1,t.endsWith("/"),i);if(l==null)throw $n(t,e,u);return l}throw $n(t,e,u)}function As(e,t){let r=e.indexOf("*"),u=t.indexOf("*"),i=r===-1?e.length:r+1,s=u===-1?t.length:u+1;return i>s?-1:s>i||r===-1?1:u===-1||e.length>t.length?-1:t.length>e.length?1:0}function mf(e,t,r){if(e==="#"||e.endsWith("/"))throw new rr(e,"is not a valid internal imports specifier name",B(t));let u,i=tr(t);if(i.exists){u=fe(i.pjsonPath);let s=i.imports;if(s)if(Es.call(s,e)&&!e.includes("*")){let n=Ye(u,s[e],"",e,t,!1,!0,!1,r);if(n!=null)return n}else{let n="",o="",a=Object.getOwnPropertyNames(s),D=-1;for(;++D<a.length;){let c=a[D],l=c.indexOf("*");if(l!==-1&&e.startsWith(c.slice(0,l))){let h=c.slice(l+1);e.length>=c.length&&e.endsWith(h)&&As(n,c)===1&&c.lastIndexOf("*")===l&&(n=c,o=e.slice(l,e.length-h.length))}}if(n){let c=s[n],l=Ye(u,c,o,n,t,!0,!0,!1,r);if(l!=null)return l}}}throw cf(e,u,t)}function gf(e,t){let r=e.indexOf("/"),u=!0,i=!1;e[0]==="@"&&(i=!0,r===-1||e.length===0?u=!1:r=e.indexOf("/",r+1));let s=r===-1?e:e.slice(0,r);if(sf.exec(s)!==null&&(u=!1),!u)throw new rr(e,"is not a valid package name",B(t));return{packageName:s,packageSubpath:"."+(r===-1?"":e.slice(r)),isScoped:i}}function ws(e,t,r){if(In.includes(e))return new H("node:"+e);let{packageName:u,packageSubpath:i,isScoped:s}=gf(e,t),n=tr(t);if(n.exists&&n.name===u&&n.exports!==void 0&&n.exports!==null)return ds(fe(n.pjsonPath),i,n,t,r);let o=new H("./node_modules/"+u+"/package.json",t),a=B(o),D;do{let c=ys(a.slice(0,-13));if(!c||!c.isDirectory()){D=a,o=new H((s?"../../../../node_modules/":"../../../node_modules/")+u+"/package.json",o),a=B(o);continue}let l=Cs(a,{base:t,specifier:e});return l.exports!==void 0&&l.exports!==null?ds(o,i,l,t,r):i==="."?Df(o,l,t):new H(i,o)}while(a.length!==D.length);throw new Pn(u,B(t),!1)}function Cf(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Ef(e){return e===""?!1:e[0]==="/"?!0:Cf(e)}function yf(e,t,r,u){let i=t.protocol,s=i==="data:",n;if(Ef(e))try{n=new H(e,t)}catch(o){let a=new ss(e,t);throw a.cause=o,a}else if(i==="file:"&&e[0]==="#")n=mf(e,t,r);else try{n=new H(e)}catch(o){if(s&&!In.includes(e)){let a=new ss(e,t);throw a.cause=o,a}n=ws(e,t,r)}return pe.ok(n!==void 0,"expected to be defined"),n.protocol!=="file:"?n:lf(n,t,u)}var Af=new Set(["node","import"]),wf="2:6:import4:node",bf=process.platform==="win32",xf=globalThis.__EXSOLVE_CACHE__||=new Map;function vf(e,t){let r=If(e);if("external"in r)return r.external;let u=r.specifier,i=r.url,s=r.absolutePath,n,o;if(t?.cache!==!1&&(n=$f(s||u,t),o=t?.cache&&typeof t?.cache=="object"?t.cache:xf),o){let p=o.get(n);if(typeof p=="string")return p;if(p instanceof Error){if(t?.try)return;throw p}}if(s)try{let p=jh(s);if(p.isSymbolicLink()&&(s=Fs(s),i=fe(s)),p.isFile())return o&&o.set(n,i.href),i.href}catch(p){if(p?.code!=="ENOENT")throw o&&o.set(n,p),p}let a=t?.conditions?new Set(t.conditions):Af,D=u||i.href,c=_f(t?.from),l=t?.suffixes||[""],h=t?.extensions?["",...t.extensions]:[""],f;for(let p of c){for(let y of l){let C=Of(D,y);C==="."&&(C+="/.");for(let T of h)if(f=Bf(C+T,p,a),f)break;if(f)break}if(f)break}if(!f){let p=new Error(`Cannot resolve module "${e}" (from: ${c.map(y=>Tf(y)).join(", ")})`);if(p.code="ERR_MODULE_NOT_FOUND",o&&o.set(n,p),t?.try)return;throw p}return o&&o.set(n,f.href),f.href}function bs(e,t){let r=vf(e,t);if(!r||!r.startsWith("file://")&&t?.try)return;let u=B(r);return bf?Rf(u):u}function Bf(e,t,r){try{return yf(e,t,r)}catch{}}function _f(e){let t=(Array.isArray(e)?e:[e]).flatMap(r=>Sf(r));return t.length===0?[fe("./")]:t}function Sf(e){if(!e)return[];if(xs(e))return[e];if(typeof e!="string")return[];if(/^(?:node|data|http|https|file):/.test(e))return new URL(e);try{return e.endsWith("/")||On(e).isDirectory()?fe(e+"/"):fe(e)}catch{return[fe(e+"/"),fe(e)]}}function Tf(e){try{return B(e)}catch{return e}}function $f(e,t){let r;return Array.isArray(t?.from)?r=t.from:t?.from&&(r=[t.from]),dt([e])+kf(t?.conditions)+dt(t?.extensions)+dt(r)+dt(t?.suffixes)}function kf(e){return e?dt([...new Set(e)].sort()):wf}function dt(e){if(!e)return"-";let t=`${e.length}:`;for(let r of e){let u=String(r);t+=`${u.length}:${u}`}return t}function Of(e,t){return!e||!t||t==="/"?e:(e.endsWith("/")?e:e+"/")+(t.startsWith("/")?t.slice(1):t)}function Rf(e){return e.replace(/\\/g,"/").replace(/^[a-z]:\//,t=>t.toUpperCase())}function xs(e){return e instanceof URL||e?.constructor?.name==="URL"}function If(e){if(typeof e=="string"){if(e.startsWith("file:")){let t=new URL(e);return{url:t,absolutePath:B(t)}}return Mh(e)?{url:fe(e),absolutePath:e}:/^(?:node|data|http|https):/.test(e)?{external:e}:In.includes(e)&&!e.includes(":")?{external:`node:${e}`}:{specifier:e}}if(xs(e))return e.protocol==="file:"?{url:e,absolutePath:B(e)}:{external:e.href};throw new TypeError("id must be a `string` or `URL`")}import{fileURLToPath as Pf}from"node:url";var jf={startingFrom:".",rootPattern:/^node_modules$/,reverse:!1,test:e=>{try{if(Nf(e).isFile())return!0}catch{}}};async function Mf(e,t={}){let r=Array.isArray(e)?e:[e],u={...jf,...t},i=Ie(u.startingFrom),s=i[0]==="/",n=i.split("/").filter(Boolean);if(r.includes(n.at(-1))&&await u.test(i))return i;s&&(n[0]="/"+n[0]);let o=n.findIndex(a=>a.match(u.rootPattern));if(o===-1&&(o=0),u.reverse)for(let a=o+1;a<=n.length;a++)for(let D of r){let c=Re(...n.slice(0,a),D);if(await u.test(c))return c}else for(let a=n.length;a>o;a--)for(let D of r){let c=Re(...n.slice(0,a),D);if(await u.test(c))return c}throw new Error(`Cannot find matching ${e} in ${u.startingFrom} or parent directories`)}function Hf(e,t={}){return Mf(e,t)}function Uf(e,t={}){return e instanceof URL||e.startsWith("file://")?Oe(Pf(e)):ke(e)?Oe(e):bs(e,{...t,from:t.from||t.parent||t.url})}var Wf=new Map;async function vs(e,t={}){let r=await jn(e,t),u=t.cache&&typeof t.cache!="boolean"?t.cache:Wf;if(t.cache&&u.has(r))return u.get(r);let i=await Lf.readFile(r,"utf8"),s;try{s=us(i)}catch{s=is(i)}return u.set(r,s),s}async function jn(e=process.cwd(),t={}){return Hf("package.json",{...t,startingFrom:Uf(e,t)})}var nr={react:"React",vue:"Vue",svelte:"Svelte",solid:"Solid"},Vf=[{dep:"next",name:"Next.js",library:"react"},{dep:"nuxt",name:"Nuxt",library:"vue"},{dep:"@sveltejs/kit",name:"SvelteKit",library:"svelte"},{dep:"@solidjs/start",name:"SolidStart",library:"solid"},{dep:"solid-start",name:"SolidStart",library:"solid"},{dep:"@tanstack/react-start",name:"TanStack Start",library:"react"},{dep:"@remix-run/react",name:"Remix",library:"react"},{dep:"@react-router/dev",name:"React Router",library:"react"},{dep:"gatsby",name:"Gatsby",library:"react"},{dep:"expo",name:"Expo",library:"react"},{dep:"astro",name:"Astro",library:null},{dep:"vite",name:"Vite",library:null}],Gf=[{dep:"react",library:"react"},{dep:"vue",library:"vue"},{dep:"svelte",library:"svelte"},{dep:"solid-js",library:"solid"}];function Yf(e){return{...e.dependencies??{},...e.devDependencies??{},...e.peerDependencies??{}}}async function Ft(e){let t;try{t=await jn(e)}catch{return null}let r=await vs(t),u=Yf(r),i=t.replace(/[\\/]package\.json$/,""),s=Vf.find(o=>o.dep in u)??null,n=s?.library??Gf.find(o=>o.dep in u)?.library??null;return{dir:i,pkg:r,framework:s?.name??null,library:n,usesTypeScript:"typescript"in u,shadersVersion:u.shaders??null}}function Ss(e,t){let r=nr[t];return!e||e===r?r:`${e} + ${r}`}function ur(e,t){return t==="Nuxt"?"components/shaders":t==="SvelteKit"?"src/lib/components/shaders":t==="Remix"||t==="React Router"?"app/components/shaders":Bs(_s.join(e,"src"))?"src/components/shaders":Bs(_s.join(e,"app"))&&t!=="Next.js"?"app/components/shaders":"components/shaders"}var Hn=Symbol.for("cancel"),ir=Object.keys(nr);function ve(e){return!e.yes&&!!process.stdout.isTTY&&!!process.stdin.isTTY}function Ce(){m.log("Cancelled."),process.exit(0)}async function Kf(e,t){if(t.framework){if(!ir.includes(t.framework))throw new Error(`Unknown framework "${t.framework}". Use one of: ${ir.join(", ")}`);return t.framework}if(e.library)return e.library;if(!ve(t))throw new Error(`Couldn't detect a UI framework in ${sr.join(e.dir,"package.json")}. Pass one with --framework <${ir.join("|")}>`);let r=await m.prompt("Which framework does this project use?",{type:"select",options:ir.map(u=>({value:u,label:nr[u]})),cancel:"symbol"});return r===Hn&&Ce(),r}async function zf(e,t){if(e.shadersVersion){m.success(`shaders already installed (${e.shadersVersion})`);return}if(!t.install){m.info("Skipped installing shaders (--no-install)");return}let r=(await bn(e.dir))?.name??"npm";m.start(`Installing shaders with ${r}\u2026`);try{await Jt("shaders",{cwd:e.dir,silent:!0,packageManager:r})}catch(u){throw new Error(`Failed to install shaders: ${u instanceof Error?u.message:String(u)}
104
- Install it manually, then re-run npx shaders connect`)}m.success("Installed shaders")}function Mn(e,t){return sr.relative(e,t)||sr.basename(t)}async function mt(e,t,r){if(r.project){let{projects:c}=await V("/api/plugin/projects",{token:e.accessToken,query:{id:r.project,limit:"1"}}),l=c.find(h=>h.id===r.project);if(!l)throw new Error(`Project ${r.project} isn't in your account \u2014 it may have been deleted. Run npx shaders connect without --project to pick one.`);return l}if(!ve(r))return m.info("Skipped connecting a project \u2014 pass --project <id> to connect non-interactively"),null;let{projects:u}=await V("/api/plugin/projects",{token:e.accessToken,query:{limit:"100"}}),i="__new__",s=[{value:i,label:u.length?"Create a new project":"Create a new project (you have none yet)"},...u.map(c=>({value:c.id,label:c.title||"Untitled Project",hint:`${c.shader_count} shader${c.shader_count===1?"":"s"}`}))],n=await m.prompt("Which project should this codebase connect to?",{type:"select",options:s,cancel:"symbol"});if(n===Hn&&Ce(),n!==i)return u.find(c=>c.id===n)??null;let o=typeof t.pkg.name=="string"&&t.pkg.name?t.pkg.name.replace(/^@[^/]+\//,""):sr.basename(t.dir),a=await m.prompt("Project name",{type:"text",default:o,placeholder:o,cancel:"symbol"});a===Hn&&Ce();let D=await V("/api/plugin/projects",{method:"POST",token:e.accessToken,body:{title:a||o}});return{id:D.id,title:D.title,updated_at:new Date().toISOString(),shader_count:0}}async function or(e){let t=process.cwd(),r=await Ft(t);if(!r)throw new Error(`No package.json found in ${t} or its parents. Run npx shaders connect from inside your project.`);let u=await Kf(r,e);m.log(`Detected: ${Ss(r.framework,u)}`),await zf(r,e);let i=await ct(r.dir);i&&m.success(`Found ${Mn(r.dir,i)}`);let s=null,n=null;if(e.auth){let{credentials:o,me:a}=await ge();m.success(`Signed in${a.email?` as ${a.email}`:""}`);let D=await mt(o,r,e);D&&(s=D.id,n=D.title)}else m.info("Skipped sign-in (--no-auth)");if(i)s&&(await xe(i,"project",s)||m.warn(`Couldn't update ${Mn(r.dir,i)} automatically \u2014 add project: '${s}' to it`));else{let o=ur(r.dir,r.framework);i=await ts(r.dir,{framework:u,project:s??void 0,outDir:o},r.usesTypeScript),m.success(`Created ${Mn(r.dir,i)} (components will install to ${o}/)`)}s&&m.success(`Connected project to Shaders${n?` (${n})`:""}`)}import{lstatSync as rp,realpathSync as Is}from"node:fs";import{mkdir as np,readFile as up,writeFile as ip}from"node:fs/promises";import de from"node:path";import{createHash as qf}from"node:crypto";import{readFile as Jf,writeFile as Zf}from"node:fs/promises";import Ts from"node:path";var Ne="shaders.lock.json";function gt(e){return"sha256:"+qf("sha256").update(e).digest("hex")}var Qf=["title","component","file","framework","hash","installedAt"];function Xf(e){if(!e||typeof e!="object")return!1;let t=e;return(t.kind==="preset"||t.kind==="preview")&&typeof t.presetId=="string"&&(t.slug===null||typeof t.slug=="string")}function ep(e){if(!e||typeof e!="object")return!1;let t=e;return Qf.every(r=>typeof t[r]=="string")&&(t.updatedAt===null||typeof t.updatedAt=="string")&&(t.source===void 0||Xf(t.source))&&(t.pending===void 0||t.pending===!0)}async function ar(e){let t=Ts.join(e,Ne),r;try{r=await Jf(t,"utf8")}catch(s){if(s.code==="ENOENT")return{version:1,shaders:{}};throw s}let u;try{u=JSON.parse(r)}catch{throw new Error(`${Ne} is not valid JSON \u2014 fix or delete it and re-run`)}if(!u||typeof u!="object")throw new Error(`${Ne} is malformed \u2014 fix or delete it and re-run`);let i=u;if(i.version!==1)throw new Error(`${Ne} has unsupported version ${String(i.version)} \u2014 update the shaders CLI`);if(!i.shaders||typeof i.shaders!="object"||Array.isArray(i.shaders))throw new Error(`${Ne} is malformed (missing "shaders") \u2014 fix or delete it and re-run`);for(let[s,n]of Object.entries(i.shaders))if(!ep(n))throw new Error(`${Ne} has an invalid entry for "${s}" \u2014 fix or delete it and re-run`);return{version:1,shaders:i.shaders}}async function Pe(e,t){let r={version:1,shaders:Object.fromEntries(Object.entries(t.shaders).sort(([u],[i])=>u.localeCompare(i)))};await Zf(Ts.join(e,Ne),JSON.stringify(r,null,2)+`
105
- `)}var Un=Symbol.for("cancel");function Dr(e){return!/^\d+$/.test(e)}function Wn(e){let t=new URL("/pricing",te()+"/");return t.searchParams.set("utm_source","cli"),t.searchParams.set("utm_medium","terminal"),e&&t.searchParams.set("utm_campaign",e),t.toString()}async function Ct(e,t){let r;try{r=await V(`/api/plugin/presets/${encodeURIComponent(e.toLowerCase())}`)}catch(i){throw i instanceof L&&i.status===404?new ce(`No preset called "${e}" is available in Shaders \u2014 it may have been retired. Preset names look like offsets-1.`,"preset"):i}if(r.kind==="preset")return r.preset;if(r.variants.length===1||!ve(t))return r.variants[0];let u=await m.prompt(`"${r.collection.name}" has ${r.variants.length} variants \u2014 which one?`,{type:"select",options:r.variants.map(i=>({value:i.id,label:i.title,hint:i.slug})),cancel:"symbol"});return u===Un&&Ce(),r.variants.find(i=>i.id===u)??r.variants[0]}function lr(e,t){return{kind:t,presetId:e.id,slug:e.slug}}async function Et(e,t,r){if(e.project)return e.project;let u=await mt(t,e.detected,r);if(!u)throw new Error("A Shaders project is needed to hold the preset. Pass --project <id> or run npx shaders connect");return await xe(e.configFile,"project",u.id)?m.success(`Connected project "${u.title}"`):m.warn(`Couldn't update your shaders config automatically \u2014 add project: '${u.id}' to it`),e.project=u.id,u.id}async function $s(e,t,r){try{return await V(`/api/plugin/presets/${encodeURIComponent(t.id)}/clone`,{method:"POST",token:e.accessToken,body:{project_id:r}})}catch(u){throw u instanceof L&&u.isProjectNotFound?$e(r):u}}var tp=e=>new Promise(t=>setTimeout(t,e));async function ks(e,t,r){let u=`${e.title} requires a Shaders Pro subscription`,i=Wn(e.slug);if(!ve(r))throw new Error(`${u}.
106
- Get Pro: ${i}
107
- Then run: npx shaders login && npx shaders install ${e.slug}`);let s=t;for(;;){m.log("");let n=[{value:"pro",label:"Get Shaders Pro",hint:"opens the pricing page in your browser"},...s?[]:[{value:"login",label:"Sign in to an existing account"}],{value:"preview",label:"Install a free watermarked preview instead",hint:"`npx shaders update` swaps in the real thing once you have Pro"}],o=await m.prompt(u,{type:"select",options:n,cancel:"symbol"});if(o===Un&&Ce(),o==="preview")return{kind:"preview"};o==="pro"&&(m.info(`Opening ${i}`),Dt(i),await m.prompt("Press enter here once you've finished in your browser",{type:"text",placeholder:"",default:"",cancel:"symbol"})===Un&&Ce(),await tp(500));let a=s&&o==="pro"?s.credentials:await gn(),D;try{D=await V("/api/plugin/me",{token:a.accessToken})}catch(c){if(c instanceof L&&c.status===401&&s){s=null;continue}throw c}if(s={credentials:a,me:D},D.isPro)return{kind:"pro",credentials:a,me:D};m.warn(`Signed in${D.email?` as ${D.email}`:""}, but this account doesn't have Shaders Pro yet`)}}function Os(e,t,r){let u=[`Watermarked preview of "${r.title}" from Shaders (${r.slug}).`,"Fetches the preset at runtime. Once your account has Shaders Pro, run","`npx shaders update` to replace this file with the full component source."];switch(e){case"react":case"solid":return[`import { Preview } from 'shaders/${e}'`,"",...u.map(i=>`// ${i}`),`export default function ${t}() {`,` return <Preview presetId="${r.id}" />`,"}",""].join(`
108
- `);case"vue":return['<script setup lang="ts">',...u.map(i=>`// ${i}`),"import { Preview } from 'shaders/vue'","</script>","","<template>",` <Preview preset-id="${r.id}" />`,"</template>",""].join(`
109
- `);case"svelte":return['<script lang="ts">',...u.map(i=>` // ${i}`)," import { Preview } from 'shaders/svelte'","</script>","",`<Preview presetId="${r.id}" />`,""].join(`
110
- `)}}async function Rs(e){let t=await Ft(e);return!!t&&!!await ct(t.dir)}async function Ke(e){let t=await Ft(e);if(!t)throw new Error(`No package.json found in ${e} or its parents. Run this from inside your project.`);let r=await ct(t.dir);if(!r)throw new Error(`No shaders.config found in ${t.dir}. Run npx shaders connect first.`);let u=await es(r),i=u.framework??t.library;if(!i)throw new Error(`Couldn't read a framework from ${r}. Set framework: 'react' | 'vue' | 'svelte' | 'solid'.`);let s=u.outDir;return s||(s=ur(t.dir,t.framework),await xe(r,"outDir",s)&&m.info(`Added outDir: '${s}' to your shaders config`)),{detected:t,configFile:r,framework:i,project:u.project,outDir:s}}var Ls="__all__",sp=Symbol.for("cancel"),op=100,ap=1e3,Dp={react:".tsx",solid:".tsx",vue:".vue",svelte:".svelte"};function Ps(e,t){let u=e.normalize("NFKD").replace(/[^\w\s-]/g," ").split(/[\s_-]+/).filter(Boolean).map(i=>i[0].toUpperCase()+i.slice(1)).join("");return u||(u=`Shader${t.replace(/[^a-zA-Z0-9]/g,"").slice(0,8)}`),/^\d/.test(u)&&(u=`Shader${u}`),u}function lp(e,t){return e.replace(/\bShaderEffect\b/g,t)}function cp(e,t){let r=t.file.replace(/\.[^.]+$/,"");if(e.detected.framework==="Nuxt"){let i=de.posix.relative("components",de.posix.dirname(t.file));return`<${i&&!i.startsWith("..")?i.split("/").map(n=>n?n[0].toUpperCase()+n.slice(1):"").join(""):""}${t.component} /> (auto-imported)`}if(e.detected.framework==="SvelteKit"&&t.file.startsWith("src/lib/"))return`import ${t.component} from '$lib/${t.file.slice(8)}'`;let u=e.framework==="vue"||e.framework==="svelte"?t.file:r;return`import ${t.component} from './${u}' (relative to the project root)`}async function cr(e,t,r){try{return await V(`/api/plugin/shaders/${encodeURIComponent(t)}/code`,{token:e.accessToken,query:{format:r}})}catch(u){if(u instanceof L&&u.status===403&&u.upgradeUrl)throw new Error(`${u.message}
111
- ${u.upgradeUrl}`);if(u instanceof L&&u.isProjectNotFound)throw $e(t);if(u instanceof L&&u.status===410&&u.code==="shader_deleted"){let i=typeof u.data?.title=="string"?u.data.title:`Shader ${t}`;throw new ce(`"${i}" has been deleted from Shaders. Remove it from shaders.lock.json to stop tracking it.`,"shader")}throw u instanceof L&&u.status===404?new ce(`Shader ${t} has been deleted from Shaders (or isn't in your account). IDs are shown in the design editor's Export Code dialog.`,"shader"):u}}function Vn(e,t){let r=de.resolve(e),u=de.resolve(r,t),i=(a,D)=>a===D||a.startsWith(D+de.sep);if(!i(u,r))throw new Error(`Refusing to write outside the project: ${t}`);let s=a=>{try{return rp(a),!0}catch{return!1}},n=u;for(;!s(n);)n=de.dirname(n);let o;try{o=Is(n)}catch{throw new Error(`Refusing to write through a broken symlink: ${t}`)}if(!i(o,Is(r)))throw new Error(`Refusing to write outside the project (symlink escapes it): ${t}`);return u}async function Gn(e){try{return await up(e,"utf8")}catch(t){if(t.code==="ENOENT")return null;throw t}}function js(e,t,r,u){let i=e.outDir.split(de.sep).join("/"),s=Dp[e.framework],n=new Set(Object.entries(u.shaders).filter(([c])=>c!==r).map(([,c])=>c.file)),o=Ps(t,r),a=r.replace(/[^a-zA-Z0-9]/g,"").slice(0,8),D=[o,`${o}${a}`];for(let c=2;;c++){for(let l of D){let h=de.posix.join(i,`${l}${s}`);if(!n.has(h))return{component:l,relFile:h}}D.splice(0,D.length,`${o}${a}${c}`)}}async function Yn(e,t,r,u,i){let{component:s,relFile:n}=r?{component:r.component,relFile:r.file}:js(e,t.title,t.id,u),o=Vn(e.detected.dir,n),a=lp(t.code,s).replace(/\n?$/,`
112
- `),D=gt(a),c=await Gn(o);if(c!==null){let l=gt(c);if(l===D)return{entry:Ns(r,s,n,e.framework,D,t),status:"unchanged"};if(!(r?l===r.hash:!1)&&!i)throw new Error(r?`${n} has local edits \u2014 re-run with --force to overwrite them`:`${n} already exists \u2014 re-run with --force to overwrite it`)}return await np(de.dirname(o),{recursive:!0}),await ip(o,a),{entry:Ns(r,s,n,e.framework,D,t),status:c===null?"installed":"updated"}}function Kn(e,t,r,u,i,s){return Yn(e,{id:t.id,title:t.title,code:t.code,updatedAt:t.updated_at??null,source:s??r?.source},r,u,i)}function Ns(e,t,r,u,i,s){let n={title:s.title,component:t,file:r,framework:u,hash:i,updatedAt:s.updatedAt,installedAt:e?.installedAt??new Date().toISOString()};return s.source&&(n.source=s.source),n}async function hp(e,t){let r=[],u=0,i=null;for(;u!==null&&r.length<ap;){let s;try{s=await V(`/api/plugin/projects/${encodeURIComponent(t)}/shaders`,{token:e.accessToken,query:{limit:String(op),offset:String(u)}})}catch(n){throw n instanceof L&&n.isProjectNotFound?$e(t):n}i??=s.project,r.push(...s.shaders),u=s.has_more?s.next_offset:null}return{project:i,shaders:r}}async function fp(e,t,r){if(!ve(r)&&!r.all)throw new Error(`Usage: npx shaders install <id|preset> [...] (or --all to install every shader in the connected project)
113
- Shader IDs are shown in the design editor's Export Code dialog; presets look like offsets-1.`);let u=e.project;if(!u){m.info("This codebase isn't connected to a Shaders project yet");let a=await mt(t,e.detected,r);if(!a)throw new Error("No project selected. Pass --project <id> or run npx shaders connect");u=a.id,await xe(e.configFile,"project",u)?m.success(`Connected project "${a.title}"`):m.warn(`Couldn't update ${de.basename(e.configFile)} automatically \u2014 add project: '${u}' to it`)}let{project:i,shaders:s}=await hp(t,u);if(s.length===0)return m.info(`"${i.title}" has no shaders yet \u2014 ${te()}/design-editor/${i.id}`),[];if(r.all)return s.map(a=>a.id);let n=await m.prompt(`Which shaders from "${i.title}" do you want to install?`,{type:"multiselect",options:[{value:Ls,label:`All ${s.length} shaders`},...s.map(a=>({value:a.id,label:a.title||`Shader ${a.id}`,hint:`id ${a.id}`}))],required:!0,cancel:"symbol"});n===sp&&Ce();let o=n.map(a=>typeof a=="string"?a:a.value);return o.includes(Ls)?s.map(a=>a.id):o}function zn(e,t,r,u,i){let s=u==="unchanged"?"Already up to date":u==="updated"?"Updated":"Installed";m.success(`${s} "${t}" \u2192 ${r.file}${i?`
114
- ${i}`:""}
115
- ${cp(e,r)}`)}async function Ms(e,t,r,u,i){let s=await cr(t,r,e.framework),n=u.shaders[r]??null,{entry:o,status:a}=await Kn(e,s,n,u,i.force);u.shaders[r]=o,await Pe(e.detected.dir,u),e.project&&s.kind==="shader"&&s.project_id&&s.project_id!==e.project&&m.warn(`"${s.title}" belongs to a different Shaders project than this codebase is connected to`),zn(e,s.title,o,a)}async function pp(e,t,r,u,i){let s=await Ct(t,u),n=Object.keys(r.shaders).find(c=>r.shaders[c].source?.kind==="preset"&&r.shaders[c].source?.presetId===s.id&&!r.shaders[c].pending);if(n){let c=i??await ge();return m.info(`"${s.title}" is already in your project as shader ${n} \u2014 refreshing it`),await Ms(e,c.credentials,n,r,u),c}let o=Object.keys(r.shaders).find(c=>r.shaders[c].source?.kind==="preview"&&r.shaders[c].source?.presetId===s.id),a=i;if(!a?.me.isPro){let c=await ks(s,a,u);if(c.kind==="preview"){let l=o?r.shaders[o]:null,{entry:h,status:f}=await Yn(e,{id:s.id,title:s.title,code:Os(e.framework,l?.component??Ps(s.title,s.id),s),updatedAt:null,source:lr(s,"preview")},l,r,u.force);return r.shaders[s.id]=h,await Pe(e.detected.dir,r),zn(e,s.title,h,f,"Watermarked preview \u2014 run `npx shaders update` once you have Pro to swap in the real component"),a}a={credentials:c.credentials,me:c.me},m.success(`Signed in${a.me.email?` as ${a.me.email}`:""} \u2014 Shaders Pro`)}let D=await Et(e,a.credentials,u);return await hr(e,a.credentials,s,D,o?r.shaders[o]:null,o,r,u.force),a}async function hr(e,t,r,u,i,s,n,o){let a=Object.keys(n.shaders).find(f=>n.shaders[f].pending&&n.shaders[f].source?.presetId===r.id),D;if(a)D=n.shaders[a],m.info(`Resuming "${D.title}" \u2014 clone ${a} was created earlier but never written`);else{let f=await $s(t,r,u);a=f.id;let p=i?{component:i.component,relFile:i.file}:js(e,f.title,f.id,n);D={title:f.title,component:p.component,file:p.relFile,framework:e.framework,hash:i?.hash??"",updatedAt:f.updated_at,installedAt:i?.installedAt??new Date().toISOString(),source:lr(r,"preset"),pending:!0},s&&s!==a&&delete n.shaders[s],n.shaders[a]=D,await Pe(e.detected.dir,n)}let c=await cr(t,a,e.framework),{entry:l,status:h}=await Yn(e,{id:a,title:c.title,code:c.code,updatedAt:c.updated_at??D.updatedAt,source:lr(r,"preset")},D,n,o);n.shaders[a]=l,await Pe(e.detected.dir,n),zn(e,c.title,l,i?"updated":h,`Added to your project as shader ${a} \u2014 edit it with \`npx shaders open\``)}async function Hs(e,t){let r=process.cwd(),u=e.length>0&&e.every(Dr);if(!await Rs(r)){if(!ve(t))throw new Error("No shaders.config found. Run npx shaders connect first.");m.info(`Shaders isn't set up in this project yet \u2014 running connect first
116
- `),await or(u?{...t,auth:!1}:t),m.log("")}let i=await Ke(r),s=await ar(i.detected.dir),n=await Kt();if((e.length===0||e.some(D=>!Dr(D)))&&!n&&(n=await ge()),e.length===0&&(e=await fp(i,n.credentials,t),e.length===0))return;let a=0;for(let D of e)try{Dr(D)?n=await pp(i,D,s,t,n):await Ms(i,n.credentials,D,s,t)}catch(c){a++,m.error(`${D}: ${c instanceof Error?c.message:String(c)}`)}a===e.length&&process.exit(1)}async function Us(){let e=await Ke(process.cwd());if(!e.project)throw new Error("This codebase isn't connected to a Shaders project yet. Run npx shaders connect to set one up.");try{let r=await Kt();if(r){let{projects:u}=await V("/api/plugin/projects",{token:r.credentials.accessToken,query:{id:e.project,limit:"1"}});if(!u.some(i=>i.id===e.project))throw $e(e.project)}}catch(r){if(!(r instanceof L))throw r}let t=`${te()}/design-editor/${e.project}`;m.log(t),Dt(t)}async function Ws(e,t){let r=await Ke(process.cwd()),u=await ar(r.detected.dir),i=e.length?e:Object.keys(u.shaders);if(i.length===0){m.info("Nothing installed yet \u2014 run npx shaders install <id> first");return}for(let D of i)if(!u.shaders[D])throw new Error(`${D} isn't in shaders.lock.json \u2014 install it first with npx shaders install ${D}`);let{credentials:s,me:n}=await ge(),o={updated:0,unchanged:0,skipped:0,gone:0,interrupted:0,failed:0};for(let[D,c]of i.entries()){let l=u.shaders[c];try{if(l.pending&&l.source){let C=await Ct(l.source.presetId,t),T=await Et(r,s,t);await hr(r,s,C,T,l,c,u,t.force),o.updated++;continue}let h=await Gn(Vn(r.detected.dir,l.file));if(h!==null&&gt(h)!==l.hash&&!t.force){o.skipped++,m.warn(`Skipped "${l.title}" \u2014 ${l.file} has local edits (use --force to overwrite)`);continue}if(l.source?.kind==="preview"){if(!n.isPro){o.skipped++,m.info(`"${l.title}" is a watermarked preview \u2014 unlock Shaders Pro to swap in the real component: ${Wn(l.source.slug)}`);continue}let C=await Ct(l.source.presetId,t),T=await Et(r,s,t);await hr(r,s,C,T,l,c,u,t.force),o.updated++;continue}let f=await cr(s,c,l.framework),{entry:p,status:y}=await Kn(r,f,l,u,t.force);u.shaders[c]=p,await Pe(r.detected.dir,u),y==="unchanged"?(o.unchanged++,m.log(` "${p.title}" is up to date`)):(o.updated++,m.success(`${h===null?"Restored":"Updated"} "${p.title}" \u2192 ${p.file}`))}catch(h){if(h instanceof ce){if(o.gone++,m.warn(`${l.title} (${c}): ${h.message}
117
- ${l.file} was left untouched.`),h.what==="project"){o.interrupted=i.length-D-1,o.interrupted&&m.warn(`Stopped \u2014 ${o.interrupted} more shader${o.interrupted===1?"":"s"} not checked`);break}continue}o.failed++,m.error(`${l.title} (${c}): ${h instanceof Error?h.message:String(h)}`)}}let a=[o.updated&&`${o.updated} updated`,o.unchanged&&`${o.unchanged} up to date`,o.skipped&&`${o.skipped} skipped`,o.gone&&`${o.gone} unavailable in Shaders`,o.interrupted&&`${o.interrupted} not checked`,o.failed&&`${o.failed} failed`].filter(Boolean);m.log(`
118
- ${a.join(", ")}`),(o.failed||o.interrupted)&&process.exit(1)}var ue=Nt(Jn(),1);import{stdin as Ep,stdout as yp}from"node:process";import zs from"node:readline";import{WriteStream as Ap}from"node:tty";function wp({onlyFirst:e=!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,e?void 0:"g")}var bp=wp();function ro(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(bp,"")}function no(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uo={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(u){var i=u.charCodeAt(0),s=u.length==2?u.charCodeAt(1):0,n=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,n=i<<10|s,n+=65536),n==12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n==8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n==172||n==175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n==161||n==164||167<=n&&n<=168||n==170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n==198||n==208||215<=n&&n<=216||222<=n&&n<=225||n==230||232<=n&&n<=234||236<=n&&n<=237||n==240||242<=n&&n<=243||247<=n&&n<=250||n==252||n==254||n==257||n==273||n==275||n==283||294<=n&&n<=295||n==299||305<=n&&n<=307||n==312||319<=n&&n<=322||n==324||328<=n&&n<=331||n==333||338<=n&&n<=339||358<=n&&n<=359||n==363||n==462||n==464||n==466||n==468||n==470||n==472||n==474||n==476||n==593||n==609||n==708||n==711||713<=n&&n<=715||n==717||n==720||728<=n&&n<=731||n==733||n==735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n==1025||1040<=n&&n<=1103||n==1105||n==8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n==8240||8242<=n&&n<=8243||n==8245||n==8251||n==8254||n==8308||n==8319||8321<=n&&n<=8324||n==8364||n==8451||n==8453||n==8457||n==8467||n==8470||8481<=n&&n<=8482||n==8486||n==8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n==8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n==8658||n==8660||n==8679||n==8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n==8715||n==8719||n==8721||n==8725||n==8730||8733<=n&&n<=8736||n==8739||n==8741||8743<=n&&n<=8748||n==8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n==8776||n==8780||n==8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n==8853||n==8857||n==8869||n==8895||n==8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n==9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n==9711||9733<=n&&n<=9734||n==9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n==9756||n==9758||n==9792||n==9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n==9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||n==9955||9960<=n&&n<=9983||n==10045||n==10071||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||n==65533||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"},t.characterLength=function(u){var i=this.eastAsianWidth(u);return i=="F"||i=="W"||i=="A"?2:1};function r(u){return u.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(u){for(var i=r(u),s=0,n=0;n<i.length;n++)s=s+this.characterLength(i[n]);return s},t.slice=function(u,i,s){textLen=t.length(u),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var n="",o=0,a=r(u),D=0;D<a.length;D++){var c=a[D],l=t.length(c);if(o>=i-(l==2?1:0))if(o+l<=s)n+=c;else break;o+=l}return n}})(uo);var xp=uo.exports,vp=no(xp),Bp=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\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\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\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\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])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\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-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\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])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},_p=no(Bp);function yt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=ro(e),e.length===0))return 0;e=e.replace(_p()," ");let r=t.ambiguousIsNarrow?1:2,u=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(vp.eastAsianWidth(i)){case"F":case"W":u+=2;break;case"A":u+=r;break;default:u+=1}}return u}var Qn=10,qs=(e=0)=>t=>`\x1B[${t+e}m`,Js=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Zs=(e=0)=>(t,r,u)=>`\x1B[${38+e};2;${t};${r};${u}m`,R={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(R.modifier);var Sp=Object.keys(R.color),Tp=Object.keys(R.bgColor);[...Sp,...Tp];function $p(){let e=new Map;for(let[t,r]of Object.entries(R)){for(let[u,i]of Object.entries(r))R[u]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[u]=R[u],e.set(i[0],i[1]);Object.defineProperty(R,t,{value:r,enumerable:!1})}return Object.defineProperty(R,"codes",{value:e,enumerable:!1}),R.color.close="\x1B[39m",R.bgColor.close="\x1B[49m",R.color.ansi=qs(),R.color.ansi256=Js(),R.color.ansi16m=Zs(),R.bgColor.ansi=qs(Qn),R.bgColor.ansi256=Js(Qn),R.bgColor.ansi16m=Zs(Qn),Object.defineProperties(R,{rgbToAnsi256:{value:(t,r,u)=>t===r&&r===u?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(u/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[u]=r;u.length===3&&(u=[...u].map(s=>s+s).join(""));let i=Number.parseInt(u,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>R.rgbToAnsi256(...R.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,u,i;if(t>=232)r=((t-232)*10+8)/255,u=r,i=r;else{t-=16;let o=t%36;r=Math.floor(t/36)/5,u=Math.floor(o/6)/5,i=o%6/5}let s=Math.max(r,u,i)*2;if(s===0)return 30;let n=30+(Math.round(i)<<2|Math.round(u)<<1|Math.round(r));return s===2&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(t,r,u)=>R.ansi256ToAnsi(R.rgbToAnsi256(t,r,u)),enumerable:!1},hexToAnsi:{value:t=>R.ansi256ToAnsi(R.hexToAnsi256(t)),enumerable:!1}}),R}var kp=$p(),mr=new Set(["\x1B","\x9B"]),Op=39,ru="\x07",io="[",Rp="]",so="m",nu=`${Rp}8;;`,Qs=e=>`${mr.values().next().value}${io}${e}${so}`,Xs=e=>`${mr.values().next().value}${nu}${e}${ru}`,Ip=e=>e.split(" ").map(t=>yt(t)),Xn=(e,t,r)=>{let u=[...t],i=!1,s=!1,n=yt(ro(e[e.length-1]));for(let[o,a]of u.entries()){let D=yt(a);if(n+D<=r?e[e.length-1]+=a:(e.push(a),n=0),mr.has(a)&&(i=!0,s=u.slice(o+1).join("").startsWith(nu)),i){s?a===ru&&(i=!1,s=!1):a===so&&(i=!1);continue}n+=D,n===r&&o<u.length-1&&(e.push(""),n=0)}!n&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Lp=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(yt(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Np=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let u="",i,s,n=Ip(e),o=[""];for(let[D,c]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let l=yt(o[o.length-1]);if(D!==0&&(l>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),l=0),(l>0||r.trim===!1)&&(o[o.length-1]+=" ",l++)),r.hard&&n[D]>t){let h=t-l,f=1+Math.floor((n[D]-h-1)/t);Math.floor((n[D]-1)/t)<f&&o.push(""),Xn(o,c,t);continue}if(l+n[D]>t&&l>0&&n[D]>0){if(r.wordWrap===!1&&l<t){Xn(o,c,t);continue}o.push("")}if(l+n[D]>t&&r.wordWrap===!1){Xn(o,c,t);continue}o[o.length-1]+=c}r.trim!==!1&&(o=o.map(D=>Lp(D)));let a=[...o.join(`
119
- `)];for(let[D,c]of a.entries()){if(u+=c,mr.has(c)){let{groups:h}=new RegExp(`(?:\\${io}(?<code>\\d+)m|\\${nu}(?<uri>.*)${ru})`).exec(a.slice(D).join(""))||{groups:{}};if(h.code!==void 0){let f=Number.parseFloat(h.code);i=f===Op?void 0:f}else h.uri!==void 0&&(s=h.uri.length===0?void 0:h.uri)}let l=kp.codes.get(Number(i));a[D+1]===`
120
- `?(s&&(u+=Xs("")),i&&l&&(u+=Qs(l))):c===`
121
- `&&(i&&l&&(u+=Qs(i)),s&&(u+=Xs(s)))}return u};function eo(e,t,r){return String(e).normalize().replace(/\r\n/g,`
94
+ ${t}`),Te(t),d.start("Waiting for you to finish signing in");let u=Date.now()+rh;for(;Date.now()<u;){await nh(th);let i;try{i=await j("/api/plugin-auth/poll",{method:"POST",query:{readKey:r}})}catch(s){if(s instanceof P&&(s.status===404||s.status===410))throw new Error("The sign-in session expired. Run the command again to start over.");continue}if(i&&typeof i.access_token=="string"){let s=ns(i);return await ts(s),s}}throw new Error("Timed out waiting for sign-in. Run the command again to start over.")}async function nr(e){if(!e.refreshToken)return null;try{let t=await j("/api/plugin-auth/refresh",{method:"POST",body:{refresh_token:e.refreshToken}}),r=ns({...t,refresh_token:t.refresh_token??e.refreshToken});return await ts(r),r}catch{return null}}async function Ft(e){return j("/api/plugin/me",{token:e.accessToken})}async function Oe(){let e=await es();if(!e||e.expiresAt&&e.expiresAt-Qi<Date.now()&&(e=await nr(e),!e))return null;try{return{credentials:e,me:await Ft(e)}}catch(t){if(!(t instanceof P)||t.status!==401)throw t;let r=await nr(e);if(!r)return null;try{return{credentials:r,me:await Ft(r)}}catch(u){if(u instanceof P&&u.status===401)return null;throw u}}}async function ye(){let e=await es();if(e&&(e.expiresAt&&e.expiresAt-Qi<Date.now()&&(e=await nr(e)),e))try{return{credentials:e,me:await Ft(e)}}catch(r){if(!(r instanceof P)||r.status!==401)throw r;let u=await nr(e);if(u)try{return{credentials:u,me:await Ft(u)}}catch(i){if(!(i instanceof P)||i.status!==401)throw i}}let t=await Ct();return{credentials:t,me:await Ft(t)}}function De(e){console.error(`\u2717 ${e}`),process.exit(1)}import gr from"node:path";import{createRequire as Ph}from"node:module";import{existsSync as Et}from"node:fs";import{readFile as Pn}from"node:fs/promises";var uh=/^[A-Za-z]:\//;function us(e=""){return e&&e.replace(/\\/g,"/").replace(uh,t=>t.toUpperCase())}var ih=/^[/\\]{2}/,sh=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,oh=/^[A-Za-z]:$/;var Ie=function(e){if(e.length===0)return".";e=us(e);let t=e.match(ih),r=Re(e),u=e[e.length-1]==="/";return e=In(e,!r),e.length===0?r?"/":u?"./":".":(u&&(e+="/"),oh.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!Re(e)?`/${e}`:e)},Le=function(...e){let t="";for(let r of e)if(r)if(t.length>0){let u=t[t.length-1]==="/",i=r[0]==="/";u&&i?t+=r.slice(1):t+=u||i?r:`/${r}`}else t+=r;return Ie(t)};function ah(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var Pe=function(...e){e=e.map(u=>us(u));let t="",r=!1;for(let u=e.length-1;u>=-1&&!r;u--){let i=u>=0?e[u]:ah();!i||i.length===0||(t=`${i}/${t}`,r=Re(i))}return t=In(t,!r),r&&!Re(t)?`/${t}`:t.length>0?t:"."};function In(e,t){let r="",u=0,i=-1,s=0,n=null;for(let o=0;o<=e.length;++o){if(o<e.length)n=e[o];else{if(n==="/")break;n="/"}if(n==="/"){if(!(i===o-1||s===1))if(s===2){if(r.length<2||u!==2||r[r.length-1]!=="."||r[r.length-2]!=="."){if(r.length>2){let a=r.lastIndexOf("/");a===-1?(r="",u=0):(r=r.slice(0,a),u=r.length-1-r.lastIndexOf("/")),i=o,s=0;continue}else if(r.length>0){r="",u=0,i=o,s=0;continue}}t&&(r+=r.length>0?"/..":"..",u=2)}else r.length>0?r+=`/${e.slice(i+1,o)}`:r=e.slice(i+1,o),u=o-i-1;i=o,s=0}else n==="."&&s!==-1?++s:s=-1}return r}var Re=function(e){return sh.test(e)};import{spawn as lh,spawnSync as d2}from"node:child_process";import{cwd as ls}from"node:process";import{basename as ch,delimiter as ur,dirname as is,normalize as hh,resolve as cs}from"node:path";import{fileURLToPath as fh}from"node:url";import{pipeline as ph}from"node:stream/promises";import{PassThrough as dh}from"node:stream";import mh from"node:readline";import{closeSync as Fh,openSync as gh,readSync as Ch,statSync as Eh}from"node:fs";var yh=/^path$/i,ss={key:"PATH",value:""};function hs(e){for(let t in e){if(!Object.prototype.hasOwnProperty.call(e,t)||!yh.test(t))continue;let r=e[t];return r?{key:t,value:r}:ss}return ss}function wh(e,t){let r=t.value.split(ur),u=[],i=typeof e=="string"?e:fh(e,{windows:!1}),s;do u.push(cs(i,"node_modules",".bin")),s=i,i=is(i);while(i!==s);u.push(is(process.execPath));let n=u.concat(r).join(ur);return{key:t.key,value:n}}function Ah(e,t,r=!0){let u={...process.env,...t};if(!r)return u;let i=wh(e,hs(u));return u[i.key]=i.value,u}var bh=e=>{let t=e.length,r=new dh,u=()=>{--t===0&&r.end()};for(let i of e)ph(i,r,{end:!1}).then(u).catch(u);return r},Ln=/([()\][%!^"`<>&|;, *?])/g,xh=/^#!\s*(.+)/,vh=/\.(?:com|exe)$/i,Bh=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,_h=process.platform==="win32",Sh=[".EXE",".CMD",".BAT",".COM"],$h=[""];function kh(e,t=[],r={}){if(r.shell===!0||!_h)return{command:e,args:t,options:r};let u=os(e,r),i=null;if(u!==null){let n=Buffer.alloc(150),o=null;try{o=gh(u,"r"),Ch(o,n,0,150,0)}catch{}finally{o!==null&&Fh(o)}let a=n.toString().match(xh);if(a!==null){let l=a[1].trim(),c=l.indexOf(" "),D=c!==-1?l.slice(0,c):l,h=c!==-1?l.slice(c+1):"",f=ch(D);i=f==="env"?h||null:f}}if(i!==null&&u!==null&&(t=[u,...t],e=i,u=os(e,r)),u===null||!vh.test(u)){let s=u!==null&&Bh.test(u);e=hh(e),e=e.replace(Ln,"^$1"),t=t.map(n=>(n=n.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),n=n.replace(/(?=(\\+?)?)\1$/,"$1$1"),n=`"${n}"`,n=n.replace(Ln,"^$1"),s&&(n=n.replace(Ln,"^$1")),n)),t=["/d","/s","/c",`"${[e,...t].join(" ")}"`],e=r.env?.comspec??"cmd.exe",r={...r,windowsVerbatimArguments:!0}}return{command:e,args:t,options:r}}function os(e,t){let r=(t.cwd??ls()).toString(),u=t.env??process.env,i=hs(u).value,s=e.includes("/")||e.includes("\\")?[""]:[r,...i.split(ur)],n=u.PATHEXT?u.PATHEXT.split(ur):Sh;e.includes(".")&&n[0]!==""&&(n=["",...n]);for(let o of[n,$h])for(let a of s){let l=a.startsWith('"')&&a.endsWith('"')&&a.length>1?a.slice(1,-1):a,c=cs(r,l,e);for(let D of o){let h=c+D;try{if(Eh(h).isFile())return h}catch{}}}return null}var as=class extends Error{result;output;exitCode;get signalCode(){return this.result.signalCode}constructor(e,t,r,u){let i="The process";r&&(i=`The command \`${u?.length?`${r} ${u.map(n=>/[ "'`()]/.test(n)?JSON.stringify(n):n).join(" ")}`:r}\``);let s=e.exitCode??1;super(e.signalCode!==null?`${i} was killed by the signal ${e.signalCode}`:`${i} exited with a non-zero status (${s})`),this.result=e,this.output=t,this.exitCode=s,Object.defineProperty(this,"result",{enumerable:!1,writable:!1,configurable:!1})}};var Th={timeout:void 0,persist:!1};var Oh={windowsHide:!0};function Rh(e){let t=new AbortController;for(let r of e){if(r.aborted)return t.abort(),r;let u=()=>{t.abort(r.reason)};r.addEventListener("abort",u,{signal:t.signal})}return t.signal}async function Ds(e){let t="";try{for await(let r of e)t+=r.toString()}catch{}return t}var Ih=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}get signalCode(){return this._process?.signalCode??null}constructor(e,t,r){this._options={...Th,...r},this._command=e,this._args=t??[],this._processClosed=new Promise(u=>{this._resolveClose=u})}kill(e){return this._process?.kill(e)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(e,t,r){return Lh(e,t,{...r,stdin:this})}async*[Symbol.asyncIterator](){let e=this._process;if(!e)return;let t=[];this._streamErr&&t.push(this._streamErr),this._streamOut&&t.push(this._streamOut);let r=bh(t),u=mh.createInterface({input:r});for await(let i of u)yield i.toString();if(await this._processClosed,e.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&(this.exitCode!==0&&this.exitCode!==void 0||this.signalCode!==null))throw new as(this,void 0,this._command,this._args)}async _waitForOutput(){let e=this._process;if(!e)throw new Error("No process was started");let[t,r]=await Promise.all([this._streamOut?Ds(this._streamOut):"",this._streamErr?Ds(this._streamErr):""]);await this._processClosed;let{stdin:u}=this._options;if(u&&typeof u!="string"&&await u,e.removeAllListeners(),this._thrownError)throw this._thrownError;let i={stderr:r,stdout:t,exitCode:this.exitCode};if(this._options.throwOnError&&(this.exitCode!==0&&this.exitCode!==void 0||this.signalCode!==null))throw new as(this,i,this._command,this._args);return i}then(e,t){return this._waitForOutput().then(e,t)}_streamOut;_streamErr;spawn(){let e=this._options,t={...Oh,...e.nodeOptions},r=t?.cwd??ls(),u=[];this._resetState(),e.timeout!==void 0&&u.push(AbortSignal.timeout(e.timeout)),e.signal!==void 0&&u.push(e.signal),e.persist===!0&&(t.detached=!0),u.length>0&&(t.signal=Rh(u)),t.env=Ah(r,t.env,e.nodePath);let i=kh(this._command,this._args,t),s=lh(i.command,i.args,i.options);if(s.stderr&&(this._streamErr=s.stderr),s.stdout&&(this._streamOut=s.stdout),this._process=s,s.once("error",this._onError),s.once("close",this._onClose),s.stdin){let{stdin:n}=e;typeof n=="string"?s.stdin.end(n):n?.process?.stdout?.pipe(s.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(e=>{this._resolveClose=e}),this._thrownError=void 0}_onError=e=>{if(e.name==="AbortError"&&(!(e.cause instanceof Error)||e.cause.name!=="TimeoutError")){this._aborted=!0;return}this._thrownError=e};_onClose=()=>{this._resolveClose&&this._resolveClose()}};var ir=(e,t,r)=>{let u=new Ih(e,t,r);return u.spawn(),u},Lh=ir;import{join as Nn}from"node:path";async function jn(e,t,r={}){let u=Ie(e).split("/");for(;u.length>0;){let i=await t(u.join("/")||"/");if(i||!r.includeParentDirs)return i;u.pop()}}async function ps(e,t={}){return jn(e,r=>{let u=Nn(r,"package.json");if(Et(u))return Pn(u,"utf8").then(i=>JSON.parse(i))},t)}async function Nh(e,t){let r=await jn(t,u=>{let i=Nn(u,"node_modules",e,"package.json");if(Et(i))return i},{includeParentDirs:!0});if(!r)return null;try{return JSON.parse(await Pn(r,"utf8"))}catch{return null}}async function jh(e,t){let r;try{r=e.resolve(t)}catch{return null}return ps(r,{includeParentDirs:!0})}function Mh(e){let t;return()=>(t===void 0&&(t=e().then(r=>(t=r,t))),t)}var Hh=Mh(async()=>{if(globalThis.process?.versions?.webcontainer)return!1;try{let{exitCode:e}=await ir("corepack",["--version"]);return e===0}catch{return!1}});async function Uh(e,t,r={}){let u=e!=="npm"&&e!=="bun"&&e!=="deno"&&e!=="aube"&&e!=="nub"&&r.corepack!==!1&&await Hh()?["corepack",[e,...t]]:[e,t],i=process.stdin.isTTY?"inherit":"ignore",s=r.silent?[i,"pipe","pipe"]:[i,"inherit","inherit"],{exitCode:n,stdout:o,stderr:a}=await ir(u[0],u[1],{nodeOptions:{cwd:Pe(r.cwd||process.cwd()),env:r.env,stdio:s}});if(n!==0)throw new Error(`\`${u.flat().join(" ")}\` failed.${r.silent?["",o,a].join(`
95
+ `):""}`)}var Wh="No package manager auto-detected.";async function Vh(e={}){let t=e.cwd||process.cwd(),r={...process.env,...e.env},u=(typeof e.packageManager=="string"?ve.find(i=>i.name===e.packageManager):e.packageManager)||await Mn(e.cwd||process.cwd());if(!u)throw new Error(Wh);return{cwd:t,env:r,silent:e.silent??!1,packageManager:u,dev:e.dev??!1,workspace:e.workspace,global:e.global??!1,dry:e.dry??!1,corepack:e.corepack??!0}}function fs(e){if(!e.workspace)return[];let t=typeof e.workspace=="string"&&e.workspace!==""?e.workspace:void 0;return e.packageManager.name==="pnpm"||e.packageManager.name==="aube"||e.packageManager.name==="nub"?t?["--filter",t]:["--workspace-root"]:e.packageManager.name==="npm"?t?["-w",t]:["--workspaces"]:e.packageManager.name==="yarn"?!e.packageManager.majorVersion||e.packageManager.majorVersion==="1"?t?["--cwd",t]:["-W"]:t?["workspace",t]:[]:[]}var ds=/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;function Gh(e){let[t,r]=(e||"").split("@"),[u,i]=r?.split("+")||[];if(t&&t!=="-"&&ds.test(t))return{name:t,version:u,buildMeta:i};let s=(t||"").replace(/\W+/g,"");return{name:s,version:u,buildMeta:i,warnings:[`Abnormal characters found in \`packageManager\` field, sanitizing from \`${t}\` to \`${s}\``]}}function Yh(e){let t=e?.packageManager,r=Array.isArray(t)?t[0]:t,u=typeof r?.name=="string"?r.name:void 0,i=typeof r?.version=="string"?r.version:void 0;if(!u)return{};if(!ds.test(u)){let s=u.replace(/\W+/g,"");return{name:s,version:i,warnings:[`Abnormal characters found in \`devEngines.packageManager\` field, sanitizing from \`${u}\` to \`${s}\``]}}return{name:u,version:i}}var ve=[{name:"npm",command:"npm",lockFile:"package-lock.json"},{name:"aube",command:"aube",lockFile:"aube-lock.yaml"},{name:"nub",command:"nub",lockFile:"nub.lock"},{name:"pnpm",command:"pnpm",lockFile:"pnpm-lock.yaml",files:["pnpm-workspace.yaml"]},{name:"bun",command:"bun",lockFile:["bun.lockb","bun.lock"]},{name:"yarn",command:"yarn",lockFile:"yarn.lock",files:[".yarnrc.yml"]},{name:"deno",command:"deno",lockFile:"deno.lock",files:["deno.json"]}];async function Mn(e,t={}){let r=await jn(Pe(e||"."),async u=>{if(!t.ignorePackageJSON){let i=Le(u,"package.json");if(Et(i)){let n=JSON.parse(await Pn(i,"utf8"));if(n?.packageManager){let{name:a,version:l="0.0.0",buildMeta:c,warnings:D}=Gh(n.packageManager);if(a){let h=l.split(".")[0],f=ve.find(p=>p.name===a&&p.majorVersion===h)||ve.find(p=>p.name===a);return{name:a,command:a,version:l,majorVersion:h,buildMeta:c,warnings:D,files:f?.files,lockFile:f?.lockFile}}}let o=Yh(n?.devEngines);if(o.name){let{name:a,version:l,warnings:c}=o,D=l?.match(/\d+/)?.[0],h=ve.find(f=>f.name===a&&f.majorVersion===D)||ve.find(f=>f.name===a);return{name:a,command:a,version:l,majorVersion:D,warnings:c,files:h?.files,lockFile:h?.lockFile}}}let s=Le(u,"deno.json");if(Et(s))return ve.find(n=>n.name==="deno")}if(!t.ignoreLockFile){for(let i of ve)if([i.lockFile,i.files].flat().filter(Boolean).some(s=>Et(Pe(u,s))))return{...i}}},{includeParentDirs:t.includeParentDirs??!0});if(!r&&!t.ignoreArgv){let u=process.argv[1];if(u){for(let i of ve)if(new RegExp(`[/\\\\]\\.?${i.command}`).test(u))return i}}return r}async function sr(e,t={}){let r=await Vh(t),u=Array.isArray(e)?e:[e];if(r.packageManager.name==="deno")for(let s=0;s<u.length;s++)/^(npm|jsr|file):.+$/.test(u[s]||"")||(u[s]=`npm:${u[s]}`);if(u.length===0)return{};let i=(r.packageManager.name==="yarn"?[...fs(r),r.global&&r.packageManager.majorVersion==="1"?"global":"","add",r.dev?"-D":"",...u]:[r.packageManager.name==="npm"?"install":"add",...fs(r),r.dev?"-D":"",r.global?"-g":"",...u]).filter(Boolean);if(r.dry||await Uh(r.packageManager.command,i,{cwd:r.cwd,silent:r.silent,corepack:r.corepack}),!r.dry&&t.installPeerDependencies){let s=await ps(r.cwd),n=[],o=[],a=Ph(Nn(r.cwd,"/_.js"));for(let l of u){let c=l.match(/^(.[^@]+)/)?.[0];if(!c)continue;let D=await jh(a,c);if(D?.name!==c&&(D=await Nh(c,r.cwd)),!!D?.peerDependencies)for(let[h,f]of Object.entries(D.peerDependencies))D.peerDependenciesMeta?.[h]?.optional||s?.dependencies?.[h]||s?.devDependencies?.[h]||(D.peerDependenciesMeta?.[h]?.dev?o:n).push(`${h}@${f}`)}n.length>0&&await sr(n,{...r}),o.length>0&&await Kh(o,{...r})}return{exec:{command:r.packageManager.command,args:i}}}async function Kh(e,t={}){return await sr(e,{...t,dev:!0})}import{readFile as Un,writeFile as ms}from"node:fs/promises";import Fs from"node:path";var zh=["shaders.config.ts","shaders.config.mts","shaders.config.js","shaders.config.mjs"],qh=["react","vue","svelte","solid"],gs={framework:e=>`Components are imported from 'shaders/${e}'`,project:()=>"Shaders project this codebase is connected to",outDir:()=>"Where `npx shaders install` writes component files"};async function Ne(e){for(let t of zh){let r=Fs.join(e,t);try{return await Un(r),r}catch{}}return null}function Hn(e,t){let r=new RegExp(`\\b${t}\\s*:\\s*(['"\`])([^'"\`]*)\\1`).exec(e);return r?r[2]:null}async function or(e){let t=await Un(e,"utf8"),r=Hn(t,"framework");return{framework:qh.includes(r)?r:null,project:Hn(t,"project"),outDir:Hn(t,"outDir")}}function Jh(e){let t=["import { defineConfig } from 'shaders/config'","","export default defineConfig({"];for(let r of["framework","project","outDir"]){let u=e[r];u&&t.push(` // ${gs[r](u)}`,` ${r}: '${u}',`)}return t.push("})",""),t.join(`
96
+ `)}async function Cs(e,t,r){let u=Fs.join(e,r?"shaders.config.ts":"shaders.config.js");return await ms(u,Jh(t)),u}async function pe(e,t,r){let u=await Un(e,"utf8"),i=new RegExp(`(\\b${t}\\s*:\\s*)(['"\`])[^'"\`]*\\2`),s;if(i.test(u))s=u.replace(i,`$1'${r}'`);else{let n=/^([ \t]*)(framework|project|outDir)\s*:\s*['"`][^'"`]*['"`],?[ \t]*$/gm,o=null;for(let D=n.exec(u);D;D=n.exec(u))o=D;if(!o)return!1;let a=o[1],c=`${o[0].trimEnd().endsWith(",")?o[0]:o[0].trimEnd()+","}
97
+ ${a}// ${gs[t](r)}
98
+ ${a}${t}: '${r}',`;s=u.slice(0,o.index)+c+u.slice(o.index+o[0].length)}return await ms(e,s),!0}import{existsSync as Gs}from"node:fs";import Ys from"node:path";import{promises as rp,statSync as np}from"node:fs";Wn();var Dr=Symbol("singleComment"),Es=Symbol("multiComment"),tf=()=>"",rf=(e,t,r)=>e.slice(t,r).replace(/[^ \t\r\n]/g," "),nf=(e,t)=>{let r=t-1,u=0;for(;e[r]==="\\";)--r,u+=1;return!!(u%2)};function ys(e,{whitespace:t=!0,trailingCommas:r=!1}={}){if(typeof e!="string")throw TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let u=t?rf:tf,i=!1,s=!1,n=0,o="",a="",l=-1;for(let D=0;D<e.length;D++){let h=e[D],f=e[D+1];if(!s&&h==='"'&&(nf(e,D)||(i=!i)),!i)if(!s&&h+f==="//")o+=e.slice(n,D),n=D,s=Dr,D++;else if(s===Dr&&h+f===`\r
99
+ `){D++,s=!1,o+=u(e,n,D),n=D;continue}else if(s===Dr&&h===`
100
+ `)s=!1,o+=u(e,n,D),n=D;else if(!s&&h+f==="/*"){o+=e.slice(n,D),n=D,s=Es,D++;continue}else if(s===Es&&h+f==="*/"){D++,s=!1,o+=u(e,n,D+1),n=D+1;continue}else r&&!s&&(l===-1?h===","&&(a+=o+e.slice(n,D),o="",n=D,l=D):h==="}"||h==="]"?(o+=e.slice(n,D),a+=u(o,0,1)+o.slice(1),o="",n=D,l=-1):h!==" "&&h!==" "&&h!=="\r"&&h!==`
101
+ `&&(o+=e.slice(n,D),n=D,l=-1))}let c=s===Dr?u(e,n):e.slice(n);return a+o+c}Wn();function ws(e,t){let r=JSON.parse(yt(e),t?.reviver);return ar(e,r,t),r}function As(e,t){let r=JSON.parse(ys(yt(e),{trailingCommas:t?.allowTrailingComma}));return ar(e,r,t),r}import uf,{lstatSync as sf,realpathSync as Rs,statSync as qn}from"node:fs";import{URL as U,fileURLToPath as B,pathToFileURL as de}from"node:url";import Jn,{isAbsolute as of}from"node:path";import me from"node:assert";import je from"node:process";import{format as Is,inspect as zn}from"node:util";var Zn=["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"],af=/^([A-Z][a-z\d]*)+$/,Df=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),Qn=new Map;function Vn(e,t="and"){switch(e.length){case 0:return"";case 1:return`${e[0]}`;case 2:return`${e[0]} ${t} ${e[1]}`;case 3:return`${e[0]}, ${e[1]}, ${t} ${e[2]}`;default:return`${e.slice(0,-1).join(", ")}, ${t} ${e.at(-1)}`}}function Ls(e){let t=0,r=/%[dfijoOs]/g;for(;r.exec(e)!==null;)t++;return t}function le(e,t,r){return Qn.set(e,t),lf(r,e)}var Gn=Symbol("kIsNodeError");function lf(e,t){let r=Qn.get(t),u=typeof r=="string"?Ls(r):-1;switch(u){case 0:{class i extends e{code=t;constructor(...n){me.ok(n.length===0,`Code: ${t}; The provided arguments length (${n.length}) does not match the required ones (${u}).`),super(r)}get["constructor"](){return e}get[Gn](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}case-1:{class i extends e{code=t;constructor(...n){super(),Object.defineProperty(this,"message",{value:cf(t,n,this),enumerable:!1,writable:!0,configurable:!0})}get["constructor"](){return e}get[Gn](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}default:{class i extends e{code=t;constructor(...n){me.ok(n.length===u,`Code: ${t}; The provided arguments length (${n.length}) does not match the required ones (${u}).`),n.unshift(r),super(Reflect.apply(Is,null,n))}get["constructor"](){return e}get[Gn](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}}}function cf(e,t,r){let u=Qn.get(e);if(me.ok(u!==void 0,"expected `message` to be found"),typeof u=="function")return me.ok(u.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${u.length}).`),Reflect.apply(u,r,t);let i=Ls(u);return me.ok(i===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${i}).`),t.length===0?u:(t.unshift(u),Reflect.apply(Is,null,t))}function hf(e){if(e===null)return"null";if(e===void 0)return"undefined";let t=typeof e;switch(t){case"bigint":return`type bigint (${e}n)`;case"number":return e===0?1/e===Number.NEGATIVE_INFINITY?"type number (-0)":"type number (0)":Number.isNaN(e)?"type number (NaN)":e===Number.POSITIVE_INFINITY?"type number (Infinity)":e===Number.NEGATIVE_INFINITY?"type number (-Infinity)":`type number (${e})`;case"boolean":return e?"type boolean (true)":"type boolean (false)";case"symbol":return`type symbol (${String(e)})`;case"function":return`function ${e.name}`;case"object":return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${zn(e,{depth:-1})}`;case"string":{let r=e;return r.length>28&&(r=`${r.slice(0,25)}...`),r.includes("'")?`type string (${JSON.stringify(r)})`:`type string ('${r}')`}default:{let r=zn(e,{colors:!1});return r.length>28&&(r=`${r.slice(0,25)}...`),`type ${t} (${r})`}}}le("ERR_INVALID_ARG_TYPE",(e,t,r)=>{me.ok(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let u="The ";if(e.endsWith(" argument"))u+=`${e} `;else{let o=e.includes(".")?"property":"argument";u+=`"${e}" ${o} `}u+="must be ";let i=[],s=[],n=[];for(let o of t)me.ok(typeof o=="string","All expected entries have to be of type string"),Df.has(o)?i.push(o.toLowerCase()):af.exec(o)===null?(me.ok(o!=="object",'The value "object" should be written as "Object"'),n.push(o)):s.push(o);if(s.length>0){let o=i.indexOf("object");o!==-1&&(i.splice(o,1),s.push("Object"))}return i.length>0&&(u+=`${i.length>1?"one of type":"of type"} ${Vn(i,"or")}`,(s.length>0||n.length>0)&&(u+=" or ")),s.length>0&&(u+=`an instance of ${Vn(s,"or")}`,n.length>0&&(u+=" or ")),n.length>0&&(n.length>1?u+=`one of ${Vn(n,"or")}`:(n[0]?.toLowerCase()!==n[0]&&(u+="an "),u+=`${n[0]}`)),u+=`. Received ${hf(r)}`,u},TypeError);var fr=le("ERR_INVALID_MODULE_SPECIFIER",(e,t,r)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError),Xn=le("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error),ff=le("ERR_INVALID_PACKAGE_TARGET",(e,t,r,u=!1,i)=>{let s=typeof r=="string"&&!u&&r.length>0&&!r.startsWith("./");return t==="."?(me.ok(u===!1),`Invalid "exports" main target ${JSON.stringify(r)} defined in the package config ${e}package.json${i?` imported from ${i}`:""}${s?'; targets must start with "./"':""}`):`Invalid "${u?"imports":"exports"}" target ${JSON.stringify(r)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:""}${s?'; targets must start with "./"':""}`},Error),eu=le("ERR_MODULE_NOT_FOUND",function(e,t,r=!1){return r&&typeof r=="string"&&(this.url=`${r}`),`Cannot find ${r?"module":"package"} '${e}' imported from ${t}`},Error),pf=le("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,r)=>`Package import specifier "${e}" is not defined${t?` in package ${t||""}package.json`:""} imported from ${r}`,TypeError),df=le("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,r)=>t==="."?`No "exports" main defined in ${e}package.json${r?` imported from ${r}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${r?` imported from ${r}`:""}`,Error),mf=le("ERR_UNSUPPORTED_DIR_IMPORT",function(e,t,r=void 0){return this.url=r,`Directory import '${e}' is not supported resolving ES modules imported from ${t}`},Error),bs=le("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),Ff=le("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);le("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let u=zn(t);return u.length>128&&(u=`${u.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${u}`},TypeError);var wt={}.hasOwnProperty,xs=new Map;function Ps(e,{base:t,specifier:r}){let u=xs.get(e);if(u)return u;let i;try{i=uf.readFileSync(Jn.toNamespacedPath(e),"utf8")}catch(n){let o=n;if(o.code!=="ENOENT")throw o}let s={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(i!==void 0){let n;try{n=JSON.parse(i)}catch(o){let a=new Xn(e,(t?`"${r}" from `:"")+B(t||r),o.message);throw a.cause=o,a}s.exists=!0,wt.call(n,"name")&&typeof n.name=="string"&&(s.name=n.name),wt.call(n,"main")&&typeof n.main=="string"&&(s.main=n.main),wt.call(n,"exports")&&(s.exports=n.exports),wt.call(n,"imports")&&(s.imports=n.imports),wt.call(n,"type")&&(n.type==="commonjs"||n.type==="module")&&(s.type=n.type)}return xs.set(e,s),s}function hr(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let r=Ps(B(t),{specifier:e});if(r.exists)return r;let u=t;if(t=new URL("../package.json",t),t.pathname===u.pathname)break}return{pjsonPath:B(t),exists:!1,type:"none"}}var gf={}.hasOwnProperty,Cf={__proto__:null,".json":"json",".cjs":"commonjs",".cts":"commonjs",".js":"module",".ts":"module",".mts":"module",".mjs":"module"},vs={__proto__:null,"data:":yf,"file:":bf,"node:":()=>"builtin"};function Ef(e){return e&&/^\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?$/i.test(e)?"module":e==="application/json"?"json":null}function yf(e){let{1:t}=/^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/.exec(e.pathname)||[null,null,null];return Ef(t)}var wf=46,Bs=47;function Af(e){let t=e.pathname;for(let r=t.length-1;r>0;r--)switch(t.charCodeAt(r)){case Bs:return"";case wf:return t.charCodeAt(r-1)===Bs?"":t.slice(r)}return""}function bf(e,t,r){let u=Af(e);if(u===".js"){let{type:s}=hr(e);return s!=="none"?s:"commonjs"}if(u===""){let{type:s}=hr(e);return s==="module"?"module":s!=="none"?s:"commonjs"}let i=Cf[u];if(i)return i;if(!r)throw new Ff(u,B(e))}function xf(e,t){let r=e.protocol;return gf.call(vs,r)&&vs[r](e,t,!0)||null}var lr=RegExp.prototype[Symbol.replace],Ns={}.hasOwnProperty,_s=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,Ss=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,vf=/^\.|%|\\/,cr=/\*/g,Bf=/%2f|%5c/i,$s=new Set,_f=/[/\\]{2}/;function ks(e,t,r,u,i,s,n){if(je.noDeprecation)return;let o=B(u),a=_f.exec(n?e:t)!==null;je.emitWarning(`Use of deprecated ${a?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===r?"":`matched to "${r}" `}in the "${i?"imports":"exports"}" field module resolution of the package at ${o}${s?` imported from ${B(s)}`:""}.`,"DeprecationWarning","DEP0166")}function Ts(e,t,r,u){if(je.noDeprecation||xf(e,{parentURL:r.href})!=="module")return;let i=B(e.href),s=B(new U(".",t)),n=B(r);u?Jn.resolve(s,u)!==i&&je.emitWarning(`Package ${s} has a "main" field set to "${u}", excluding the full filename and extension to the resolved file at "${i.slice(s.length)}", imported from ${n}.
102
+ Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):je.emitWarning(`No "main" or "exports" field defined in the package.json for ${s} resolving the main entry point "${i.slice(s.length)}", imported from ${n}.
103
+ Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function js(e){try{return qn(e)}catch{}}function Yn(e){let t=qn(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function Sf(e,t,r){let u;if(t.main!==void 0){if(u=new U(t.main,e),Yn(u))return u;let n=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],o=-1;for(;++o<n.length&&(u=new U(n[o],e),!Yn(u));)u=void 0;if(u)return Ts(u,e,r,t.main),u}let i=["./index.js","./index.json","./index.node"],s=-1;for(;++s<i.length&&(u=new U(i[s],e),!Yn(u));)u=void 0;if(u)return Ts(u,e,r,t.main),u;throw new eu(B(new U(".",e)),B(r))}function $f(e,t,r){if(Bf.exec(e.pathname)!==null)throw new fr(e.pathname,String.raw`must not include encoded "/" or "\" characters`,B(t));let u;try{u=B(e)}catch(s){throw Object.defineProperty(s,"input",{value:String(e)}),Object.defineProperty(s,"module",{value:String(t)}),s}let i=js(u.endsWith("/")?u.slice(-1):u);if(i&&i.isDirectory()){let s=new mf(u,B(t));throw s.url=String(e),s}if(!i||!i.isFile()){let s=new eu(u||e.pathname,t&&B(t),!0);throw s.url=String(e),s}if(!r){let s=Rs(u),{search:n,hash:o}=e;e=de(s+(u.endsWith(Jn.sep)?"/":"")),e.search=n,e.hash=o}return e}function kf(e,t,r){return new pf(e,t&&B(new U(".",t)),B(r))}function Kn(e,t,r){return new df(B(new U(".",t)),e,r&&B(r))}function Tf(e,t,r,u,i){throw new fr(e,`request is not a valid match in pattern "${t}" for the "${u?"imports":"exports"}" resolution of ${B(r)}`,i&&B(i))}function At(e,t,r,u,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new ff(B(new U(".",r)),e,t,u,i&&B(i))}function Of(e,t,r,u,i,s,n,o,a){if(t!==""&&!s&&e.at(-1)!=="/")throw At(r,e,u,n,i);if(!e.startsWith("./")){if(n&&!e.startsWith("../")&&!e.startsWith("/")){let h=!1;try{new U(e),h=!0}catch{}if(!h)return Hs(s?lr.call(cr,e,()=>t):e+t,u,a)}throw At(r,e,u,n,i)}if(_s.exec(e.slice(2))!==null)if(Ss.exec(e.slice(2))===null){if(!o){let h=s?r.replace("*",()=>t):r+t;ks(s?lr.call(cr,e,()=>t):e,h,r,u,n,i,!0)}}else throw At(r,e,u,n,i);let l=new U(e,u),c=l.pathname,D=new U(".",u).pathname;if(!c.startsWith(D))throw At(r,e,u,n,i);if(t==="")return l;if(_s.exec(t)!==null){let h=s?r.replace("*",()=>t):r+t;Ss.exec(t)===null?o||ks(s?lr.call(cr,e,()=>t):e,h,r,u,n,i,!1):Tf(h,r,u,n,i)}return s?new U(lr.call(cr,l.href,()=>t)):new U(t,l)}function Rf(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function Xe(e,t,r,u,i,s,n,o,a){if(typeof t=="string")return Of(t,r,u,e,i,s,n,o,a);if(Array.isArray(t)){let l=t;if(l.length===0)return null;let c,D=-1;for(;++D<l.length;){let h=l[D],f;try{f=Xe(e,h,r,u,i,s,n,o,a)}catch(p){let y=p;if(c=y,y.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw p}if(f!==void 0){if(f===null){c=null;continue}return f}}if(c==null)return c;throw c}if(typeof t=="object"&&t!==null){let l=Object.getOwnPropertyNames(t),c=-1;for(;++c<l.length;){let D=l[c];if(Rf(D))throw new Xn(B(e),B(i),'"exports" cannot contain numeric property keys.')}for(c=-1;++c<l.length;){let D=l[c];if(D==="default"||a&&a.has(D)){let h=t[D],f=Xe(e,h,r,u,i,s,n,o,a);if(f===void 0)continue;return f}}return}if(t===null)return null;throw At(u,t,e,n,i)}function If(e,t,r){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let u=Object.getOwnPropertyNames(e),i=!1,s=0,n=-1;for(;++n<u.length;){let o=u[n],a=o===""||o[0]!==".";if(s++===0)i=a;else if(i!==a)throw new Xn(B(t),B(r),`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return i}function Lf(e,t,r){if(je.noDeprecation)return;let u=B(t);$s.has(u+"|"+e)||($s.add(u+"|"+e),je.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${u}${r?` imported from ${B(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function Os(e,t,r,u,i){let s=r.exports;if(If(s,e,u)&&(s={".":s}),Ns.call(s,t)&&!t.includes("*")&&!t.endsWith("/")){let c=s[t],D=Xe(e,c,"",t,u,!1,!1,!1,i);if(D==null)throw Kn(t,e,u);return D}let n="",o="",a=Object.getOwnPropertyNames(s),l=-1;for(;++l<a.length;){let c=a[l],D=c.indexOf("*");if(D!==-1&&t.startsWith(c.slice(0,D))){t.endsWith("/")&&Lf(t,e,u);let h=c.slice(D+1);t.length>=c.length&&t.endsWith(h)&&Ms(n,c)===1&&c.lastIndexOf("*")===D&&(n=c,o=t.slice(D,t.length-h.length))}}if(n){let c=s[n],D=Xe(e,c,o,n,u,!0,!1,t.endsWith("/"),i);if(D==null)throw Kn(t,e,u);return D}throw Kn(t,e,u)}function Ms(e,t){let r=e.indexOf("*"),u=t.indexOf("*"),i=r===-1?e.length:r+1,s=u===-1?t.length:u+1;return i>s?-1:s>i||r===-1?1:u===-1||e.length>t.length?-1:t.length>e.length?1:0}function Pf(e,t,r){if(e==="#"||e.endsWith("/"))throw new fr(e,"is not a valid internal imports specifier name",B(t));let u,i=hr(t);if(i.exists){u=de(i.pjsonPath);let s=i.imports;if(s)if(Ns.call(s,e)&&!e.includes("*")){let n=Xe(u,s[e],"",e,t,!1,!0,!1,r);if(n!=null)return n}else{let n="",o="",a=Object.getOwnPropertyNames(s),l=-1;for(;++l<a.length;){let c=a[l],D=c.indexOf("*");if(D!==-1&&e.startsWith(c.slice(0,D))){let h=c.slice(D+1);e.length>=c.length&&e.endsWith(h)&&Ms(n,c)===1&&c.lastIndexOf("*")===D&&(n=c,o=e.slice(D,e.length-h.length))}}if(n){let c=s[n],D=Xe(u,c,o,n,t,!0,!0,!1,r);if(D!=null)return D}}}throw kf(e,u,t)}function Nf(e,t){let r=e.indexOf("/"),u=!0,i=!1;e[0]==="@"&&(i=!0,r===-1||e.length===0?u=!1:r=e.indexOf("/",r+1));let s=r===-1?e:e.slice(0,r);if(vf.exec(s)!==null&&(u=!1),!u)throw new fr(e,"is not a valid package name",B(t));return{packageName:s,packageSubpath:"."+(r===-1?"":e.slice(r)),isScoped:i}}function Hs(e,t,r){if(Zn.includes(e))return new U("node:"+e);let{packageName:u,packageSubpath:i,isScoped:s}=Nf(e,t),n=hr(t);if(n.exists&&n.name===u&&n.exports!==void 0&&n.exports!==null)return Os(de(n.pjsonPath),i,n,t,r);let o=new U("./node_modules/"+u+"/package.json",t),a=B(o),l;do{let c=js(a.slice(0,-13));if(!c||!c.isDirectory()){l=a,o=new U((s?"../../../../node_modules/":"../../../node_modules/")+u+"/package.json",o),a=B(o);continue}let D=Ps(a,{base:t,specifier:e});return D.exports!==void 0&&D.exports!==null?Os(o,i,D,t,r):i==="."?Sf(o,D,t):new U(i,o)}while(a.length!==l.length);throw new eu(u,B(t),!1)}function jf(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Mf(e){return e===""?!1:e[0]==="/"?!0:jf(e)}function Hf(e,t,r,u){let i=t.protocol,s=i==="data:",n;if(Mf(e))try{n=new U(e,t)}catch(o){let a=new bs(e,t);throw a.cause=o,a}else if(i==="file:"&&e[0]==="#")n=Pf(e,t,r);else try{n=new U(e)}catch(o){if(s&&!Zn.includes(e)){let a=new bs(e,t);throw a.cause=o,a}n=Hs(e,t,r)}return me.ok(n!==void 0,"expected to be defined"),n.protocol!=="file:"?n:$f(n,t,u)}var Uf=new Set(["node","import"]),Wf="2:6:import4:node",Vf=process.platform==="win32",Gf=globalThis.__EXSOLVE_CACHE__||=new Map;function Yf(e,t){let r=tp(e);if("external"in r)return r.external;let u=r.specifier,i=r.url,s=r.absolutePath,n,o;if(t?.cache!==!1&&(n=Zf(s||u,t),o=t?.cache&&typeof t?.cache=="object"?t.cache:Gf),o){let p=o.get(n);if(typeof p=="string")return p;if(p instanceof Error){if(t?.try)return;throw p}}if(s)try{let p=sf(s);if(p.isSymbolicLink()&&(s=Rs(s),i=de(s)),p.isFile())return o&&o.set(n,i.href),i.href}catch(p){if(p?.code!=="ENOENT")throw o&&o.set(n,p),p}let a=t?.conditions?new Set(t.conditions):Uf,l=u||i.href,c=zf(t?.from),D=t?.suffixes||[""],h=t?.extensions?["",...t.extensions]:[""],f;for(let p of c){for(let y of D){let C=Xf(l,y);C==="."&&(C+="/.");for(let $ of h)if(f=Kf(C+$,p,a),f)break;if(f)break}if(f)break}if(!f){let p=new Error(`Cannot resolve module "${e}" (from: ${c.map(y=>Jf(y)).join(", ")})`);if(p.code="ERR_MODULE_NOT_FOUND",o&&o.set(n,p),t?.try)return;throw p}return o&&o.set(n,f.href),f.href}function Us(e,t){let r=Yf(e,t);if(!r||!r.startsWith("file://")&&t?.try)return;let u=B(r);return Vf?ep(u):u}function Kf(e,t,r){try{return Hf(e,t,r)}catch{}}function zf(e){let t=(Array.isArray(e)?e:[e]).flatMap(r=>qf(r));return t.length===0?[de("./")]:t}function qf(e){if(!e)return[];if(Ws(e))return[e];if(typeof e!="string")return[];if(/^(?:node|data|http|https|file):/.test(e))return new URL(e);try{return e.endsWith("/")||qn(e).isDirectory()?de(e+"/"):de(e)}catch{return[de(e+"/"),de(e)]}}function Jf(e){try{return B(e)}catch{return e}}function Zf(e,t){let r;return Array.isArray(t?.from)?r=t.from:t?.from&&(r=[t.from]),bt([e])+Qf(t?.conditions)+bt(t?.extensions)+bt(r)+bt(t?.suffixes)}function Qf(e){return e?bt([...new Set(e)].sort()):Wf}function bt(e){if(!e)return"-";let t=`${e.length}:`;for(let r of e){let u=String(r);t+=`${u.length}:${u}`}return t}function Xf(e,t){return!e||!t||t==="/"?e:(e.endsWith("/")?e:e+"/")+(t.startsWith("/")?t.slice(1):t)}function ep(e){return e.replace(/\\/g,"/").replace(/^[a-z]:\//,t=>t.toUpperCase())}function Ws(e){return e instanceof URL||e?.constructor?.name==="URL"}function tp(e){if(typeof e=="string"){if(e.startsWith("file:")){let t=new URL(e);return{url:t,absolutePath:B(t)}}return of(e)?{url:de(e),absolutePath:e}:/^(?:node|data|http|https):/.test(e)?{external:e}:Zn.includes(e)&&!e.includes(":")?{external:`node:${e}`}:{specifier:e}}if(Ws(e))return e.protocol==="file:"?{url:e,absolutePath:B(e)}:{external:e.href};throw new TypeError("id must be a `string` or `URL`")}import{fileURLToPath as up}from"node:url";var ip={startingFrom:".",rootPattern:/^node_modules$/,reverse:!1,test:e=>{try{if(np(e).isFile())return!0}catch{}}};async function sp(e,t={}){let r=Array.isArray(e)?e:[e],u={...ip,...t},i=Pe(u.startingFrom),s=i[0]==="/",n=i.split("/").filter(Boolean);if(r.includes(n.at(-1))&&await u.test(i))return i;s&&(n[0]="/"+n[0]);let o=n.findIndex(a=>a.match(u.rootPattern));if(o===-1&&(o=0),u.reverse)for(let a=o+1;a<=n.length;a++)for(let l of r){let c=Le(...n.slice(0,a),l);if(await u.test(c))return c}else for(let a=n.length;a>o;a--)for(let l of r){let c=Le(...n.slice(0,a),l);if(await u.test(c))return c}throw new Error(`Cannot find matching ${e} in ${u.startingFrom} or parent directories`)}function op(e,t={}){return sp(e,t)}function ap(e,t={}){return e instanceof URL||e.startsWith("file://")?Ie(up(e)):Re(e)?Ie(e):Us(e,{...t,from:t.from||t.parent||t.url})}var Dp=new Map;async function Vs(e,t={}){let r=await tu(e,t),u=t.cache&&typeof t.cache!="boolean"?t.cache:Dp;if(t.cache&&u.has(r))return u.get(r);let i=await rp.readFile(r,"utf8"),s;try{s=ws(i)}catch{s=As(i)}return u.set(r,s),s}async function tu(e=process.cwd(),t={}){return op("package.json",{...t,startingFrom:ap(e,t)})}var pr={react:"React",vue:"Vue",svelte:"Svelte",solid:"Solid"},lp=[{dep:"next",name:"Next.js",library:"react"},{dep:"nuxt",name:"Nuxt",library:"vue"},{dep:"@sveltejs/kit",name:"SvelteKit",library:"svelte"},{dep:"@solidjs/start",name:"SolidStart",library:"solid"},{dep:"solid-start",name:"SolidStart",library:"solid"},{dep:"@tanstack/react-start",name:"TanStack Start",library:"react"},{dep:"@remix-run/react",name:"Remix",library:"react"},{dep:"@react-router/dev",name:"React Router",library:"react"},{dep:"gatsby",name:"Gatsby",library:"react"},{dep:"expo",name:"Expo",library:"react"},{dep:"astro",name:"Astro",library:null},{dep:"vite",name:"Vite",library:null}],cp=[{dep:"react",library:"react"},{dep:"vue",library:"vue"},{dep:"svelte",library:"svelte"},{dep:"solid-js",library:"solid"}];function hp(e){return{...e.dependencies??{},...e.devDependencies??{},...e.peerDependencies??{}}}async function Me(e){let t;try{t=await tu(e)}catch{return null}let r=await Vs(t),u=hp(r),i=t.replace(/[\\/]package\.json$/,""),s=lp.find(o=>o.dep in u)??null,n=s?.library??cp.find(o=>o.dep in u)?.library??null;return{dir:i,pkg:r,framework:s?.name??null,library:n,usesTypeScript:"typescript"in u,shadersVersion:u.shaders??null}}function Ks(e,t){let r=pr[t];return!e||e===r?r:`${e} + ${r}`}function dr(e,t){return t==="Nuxt"?"components/shaders":t==="SvelteKit"?"src/lib/components/shaders":t==="Remix"||t==="React Router"?"app/components/shaders":Gs(Ys.join(e,"src"))?"src/components/shaders":Gs(Ys.join(e,"app"))&&t!=="Next.js"?"app/components/shaders":"components/shaders"}import{spawn as fp}from"node:child_process";var pp="shader-effects-inc/shaders",He="shaders",mr="https://shaders.com/docs/guide/agent-skill";function dp(e){let t=["--yes","skills@latest","add",pp,"--skill",He];e.global&&t.push("--global");for(let r of e.agents)t.push("--agent",r);return e.yes&&t.push("--yes"),t}function et(e){return new Promise((t,r)=>{let u=process.platform==="win32",i=fp(u?"npx.cmd":"npx",dp(e),{stdio:"inherit",shell:u,cwd:e.cwd});i.on("error",r),i.on("exit",s=>{s===0?t():r(new Error(`skills add exited with code ${s??"null"}`))})})}var ru=Symbol.for("cancel"),Fr=Object.keys(pr);function Fe(e){return!e.yes&&!!process.stdout.isTTY&&!!process.stdin.isTTY}function X(){d.log("Cancelled."),process.exit(0)}async function mp(e,t){if(t.framework){if(!Fr.includes(t.framework))throw new Error(`Unknown framework "${t.framework}". Use one of: ${Fr.join(", ")}`);return t.framework}if(e.library)return e.library;if(!Fe(t))throw new Error(`Couldn't detect a UI framework in ${gr.join(e.dir,"package.json")}. Pass one with --framework <${Fr.join("|")}>`);let r=await d.prompt("Which framework does this project use?",{type:"select",options:Fr.map(u=>({value:u,label:pr[u]})),cancel:"symbol"});return r===ru&&X(),r}async function Fp(e,t){if(e.shadersVersion){d.success(`shaders already installed (${e.shadersVersion})`);return}if(!t.install){d.info("Skipped installing shaders (--no-install)");return}let r=(await Mn(e.dir))?.name??"npm";d.start(`Installing shaders with ${r}\u2026`);try{await sr("shaders",{cwd:e.dir,silent:!0,packageManager:r})}catch(u){throw new Error(`Failed to install shaders: ${u instanceof Error?u.message:String(u)}
104
+ Install it manually, then re-run npx shaders connect`)}d.success("Installed shaders")}function nu(e,t){return gr.relative(e,t)||gr.basename(t)}async function Ue(e,t,r){if(r.project){let{projects:c}=await j("/api/plugin/projects",{token:e.accessToken,query:{id:r.project,limit:"1"}}),D=c.find(h=>h.id===r.project);if(!D)throw new Error(`Project ${r.project} isn't in your account \u2014 it may have been deleted. Run npx shaders connect without --project to pick one.`);return D}if(!Fe(r))return d.info("Skipped connecting a project \u2014 pass --project <id> to connect non-interactively"),null;let{projects:u}=await j("/api/plugin/projects",{token:e.accessToken,query:{limit:"100"}}),i="__new__",s=[{value:i,label:u.length?"Create a new project":"Create a new project (you have none yet)"},...u.map(c=>({value:c.id,label:c.title||"Untitled Project",hint:`${c.shader_count} shader${c.shader_count===1?"":"s"}`}))],n=await d.prompt("Which project should this codebase connect to?",{type:"select",options:s,cancel:"symbol"});if(n===ru&&X(),n!==i)return u.find(c=>c.id===n)??null;let o=typeof t.pkg.name=="string"&&t.pkg.name?t.pkg.name.replace(/^@[^/]+\//,""):gr.basename(t.dir),a=await d.prompt("Project name",{type:"text",default:o,placeholder:o,cancel:"symbol"});a===ru&&X();let l=await j("/api/plugin/projects",{method:"POST",token:e.accessToken,body:{title:a||o}});return{id:l.id,title:l.title,updated_at:new Date().toISOString(),shader_count:0}}async function uu(e,{quiet:t=!1}={}){let r=process.cwd(),u=await Me(r);if(!u)throw new Error(`No package.json found in ${r} or its parents. Run npx shaders from inside your project.`);let i=await mp(u,e);t||d.log(`Detected: ${Ks(u.framework,i)}`),await Fp(u,e);let s=await Ne(u.dir);return s&&!t&&d.success(`Found ${nu(u.dir,s)}`),{detected:u,library:i,configFile:s}}async function Cr(e,t){let r=dr(e.detected.dir,e.detected.framework),u=await Cs(e.detected.dir,{framework:e.library,project:t??void 0,outDir:r},e.detected.usesTypeScript);return d.success(`Created ${nu(e.detected.dir,u)} (components will install to ${r}/)`),u}async function Er(e){let t=await uu(e),{detected:r}=t,{configFile:u}=t,i=null,s=null;if(e.auth){let{credentials:n,me:o}=await ye();d.success(`Signed in${o.email?` as ${o.email}`:""}`);let a=await Ue(n,r,e);a&&(i=a.id,s=a.title)}else d.info("Skipped sign-in (--no-auth)");if(u?i&&(await pe(u,"project",i)||d.warn(`Couldn't update ${nu(r.dir,u)} automatically \u2014 add project: '${i}' to it`)):u=await Cr(t,i),i&&d.success(`Connected project to Shaders${s?` (${s})`:""}`),e.skill){d.start("Adding the Shaders agent skill to your coding agents\u2026");try{await et({global:!1,yes:e.yes,agents:[],cwd:r.dir})}catch{d.warn(`Couldn't add the agent skill. Run npx shaders skill to retry (${mr})`)}}else d.info("Skipped the agent skill (--no-skill)")}import{existsSync as Cg}from"node:fs";import{homedir as HD}from"node:os";import Yt from"node:path";var ie=zt(su(),1);import{stdin as Ap,stdout as bp}from"node:process";import Qs from"node:readline";import{WriteStream as xp}from"node:tty";function vp({onlyFirst:e=!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,e?void 0:"g")}var Bp=vp();function so(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Bp,"")}function oo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ao={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(u){var i=u.charCodeAt(0),s=u.length==2?u.charCodeAt(1):0,n=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,n=i<<10|s,n+=65536),n==12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n==8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n==172||n==175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n==161||n==164||167<=n&&n<=168||n==170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n==198||n==208||215<=n&&n<=216||222<=n&&n<=225||n==230||232<=n&&n<=234||236<=n&&n<=237||n==240||242<=n&&n<=243||247<=n&&n<=250||n==252||n==254||n==257||n==273||n==275||n==283||294<=n&&n<=295||n==299||305<=n&&n<=307||n==312||319<=n&&n<=322||n==324||328<=n&&n<=331||n==333||338<=n&&n<=339||358<=n&&n<=359||n==363||n==462||n==464||n==466||n==468||n==470||n==472||n==474||n==476||n==593||n==609||n==708||n==711||713<=n&&n<=715||n==717||n==720||728<=n&&n<=731||n==733||n==735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n==1025||1040<=n&&n<=1103||n==1105||n==8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n==8240||8242<=n&&n<=8243||n==8245||n==8251||n==8254||n==8308||n==8319||8321<=n&&n<=8324||n==8364||n==8451||n==8453||n==8457||n==8467||n==8470||8481<=n&&n<=8482||n==8486||n==8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n==8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n==8658||n==8660||n==8679||n==8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n==8715||n==8719||n==8721||n==8725||n==8730||8733<=n&&n<=8736||n==8739||n==8741||8743<=n&&n<=8748||n==8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n==8776||n==8780||n==8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n==8853||n==8857||n==8869||n==8895||n==8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n==9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n==9711||9733<=n&&n<=9734||n==9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n==9756||n==9758||n==9792||n==9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n==9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||n==9955||9960<=n&&n<=9983||n==10045||n==10071||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||n==65533||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"},t.characterLength=function(u){var i=this.eastAsianWidth(u);return i=="F"||i=="W"||i=="A"?2:1};function r(u){return u.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(u){for(var i=r(u),s=0,n=0;n<i.length;n++)s=s+this.characterLength(i[n]);return s},t.slice=function(u,i,s){textLen=t.length(u),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var n="",o=0,a=r(u),l=0;l<a.length;l++){var c=a[l],D=t.length(c);if(o>=i-(D==2?1:0))if(o+D<=s)n+=c;else break;o+=D}return n}})(ao);var _p=ao.exports,Sp=oo(_p),$p=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\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\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\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\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])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\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-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\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])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},kp=oo($p);function xt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=so(e),e.length===0))return 0;e=e.replace(kp()," ");let r=t.ambiguousIsNarrow?1:2,u=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(Sp.eastAsianWidth(i)){case"F":case"W":u+=2;break;case"A":u+=r;break;default:u+=1}}return u}var au=10,Xs=(e=0)=>t=>`\x1B[${t+e}m`,eo=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,to=(e=0)=>(t,r,u)=>`\x1B[${38+e};2;${t};${r};${u}m`,R={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(R.modifier);var Tp=Object.keys(R.color),Op=Object.keys(R.bgColor);[...Tp,...Op];function Rp(){let e=new Map;for(let[t,r]of Object.entries(R)){for(let[u,i]of Object.entries(r))R[u]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[u]=R[u],e.set(i[0],i[1]);Object.defineProperty(R,t,{value:r,enumerable:!1})}return Object.defineProperty(R,"codes",{value:e,enumerable:!1}),R.color.close="\x1B[39m",R.bgColor.close="\x1B[49m",R.color.ansi=Xs(),R.color.ansi256=eo(),R.color.ansi16m=to(),R.bgColor.ansi=Xs(au),R.bgColor.ansi256=eo(au),R.bgColor.ansi16m=to(au),Object.defineProperties(R,{rgbToAnsi256:{value:(t,r,u)=>t===r&&r===u?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(u/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[u]=r;u.length===3&&(u=[...u].map(s=>s+s).join(""));let i=Number.parseInt(u,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>R.rgbToAnsi256(...R.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,u,i;if(t>=232)r=((t-232)*10+8)/255,u=r,i=r;else{t-=16;let o=t%36;r=Math.floor(t/36)/5,u=Math.floor(o/6)/5,i=o%6/5}let s=Math.max(r,u,i)*2;if(s===0)return 30;let n=30+(Math.round(i)<<2|Math.round(u)<<1|Math.round(r));return s===2&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(t,r,u)=>R.ansi256ToAnsi(R.rgbToAnsi256(t,r,u)),enumerable:!1},hexToAnsi:{value:t=>R.ansi256ToAnsi(R.hexToAnsi256(t)),enumerable:!1}}),R}var Ip=Rp(),xr=new Set(["\x1B","\x9B"]),Lp=39,hu="\x07",Do="[",Pp="]",lo="m",fu=`${Pp}8;;`,ro=e=>`${xr.values().next().value}${Do}${e}${lo}`,no=e=>`${xr.values().next().value}${fu}${e}${hu}`,Np=e=>e.split(" ").map(t=>xt(t)),Du=(e,t,r)=>{let u=[...t],i=!1,s=!1,n=xt(so(e[e.length-1]));for(let[o,a]of u.entries()){let l=xt(a);if(n+l<=r?e[e.length-1]+=a:(e.push(a),n=0),xr.has(a)&&(i=!0,s=u.slice(o+1).join("").startsWith(fu)),i){s?a===hu&&(i=!1,s=!1):a===lo&&(i=!1);continue}n+=l,n===r&&o<u.length-1&&(e.push(""),n=0)}!n&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},jp=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(xt(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Mp=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let u="",i,s,n=Np(e),o=[""];for(let[l,c]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let D=xt(o[o.length-1]);if(l!==0&&(D>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),D=0),(D>0||r.trim===!1)&&(o[o.length-1]+=" ",D++)),r.hard&&n[l]>t){let h=t-D,f=1+Math.floor((n[l]-h-1)/t);Math.floor((n[l]-1)/t)<f&&o.push(""),Du(o,c,t);continue}if(D+n[l]>t&&D>0&&n[l]>0){if(r.wordWrap===!1&&D<t){Du(o,c,t);continue}o.push("")}if(D+n[l]>t&&r.wordWrap===!1){Du(o,c,t);continue}o[o.length-1]+=c}r.trim!==!1&&(o=o.map(l=>jp(l)));let a=[...o.join(`
105
+ `)];for(let[l,c]of a.entries()){if(u+=c,xr.has(c)){let{groups:h}=new RegExp(`(?:\\${Do}(?<code>\\d+)m|\\${fu}(?<uri>.*)${hu})`).exec(a.slice(l).join(""))||{groups:{}};if(h.code!==void 0){let f=Number.parseFloat(h.code);i=f===Lp?void 0:f}else h.uri!==void 0&&(s=h.uri.length===0?void 0:h.uri)}let D=Ip.codes.get(Number(i));a[l+1]===`
106
+ `?(s&&(u+=no("")),i&&D&&(u+=ro(D))):c===`
107
+ `&&(i&&D&&(u+=ro(i)),s&&(u+=no(s)))}return u};function uo(e,t,r){return String(e).normalize().replace(/\r\n/g,`
122
108
  `).split(`
123
- `).map(u=>Np(u,t,r)).join(`
124
- `)}var Pp=["up","down","left","right","space","enter","cancel"],Fr={actions:new Set(Pp),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function oo(e,t){if(typeof e=="string")return Fr.aliases.get(e)===t;for(let r of e)if(r!==void 0&&oo(r,t))return!0;return!1}function jp(e,t){if(e===t)return;let r=e.split(`
109
+ `).map(u=>Mp(u,t,r)).join(`
110
+ `)}var Hp=["up","down","left","right","space","enter","cancel"],br={actions:new Set(Hp),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function co(e,t){if(typeof e=="string")return br.aliases.get(e)===t;for(let r of e)if(r!==void 0&&co(r,t))return!0;return!1}function Up(e,t){if(e===t)return;let r=e.split(`
125
111
  `),u=t.split(`
126
- `),i=[];for(let s=0;s<Math.max(r.length,u.length);s++)r[s]!==u[s]&&i.push(s);return i}var _C=globalThis.process.platform.startsWith("win"),eu=Symbol("clack:cancel");function At(e){return e===eu}function dr(e,t){let r=e;r.isTTY&&r.setRawMode(t)}var Mp=Object.defineProperty,Hp=(e,t,r)=>t in e?Mp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,re=(e,t,r)=>(Hp(e,typeof t!="symbol"?t+"":t,r),r),tu=class{constructor(t,r=!0){re(this,"input"),re(this,"output"),re(this,"_abortSignal"),re(this,"rl"),re(this,"opts"),re(this,"_render"),re(this,"_track",!1),re(this,"_prevFrame",""),re(this,"_subscribers",new Map),re(this,"_cursor",0),re(this,"state","initial"),re(this,"error",""),re(this,"value");let{input:u=Ep,output:i=yp,render:s,signal:n,...o}=t;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=r,this._abortSignal=n,this.input=u,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(t,r){let u=this._subscribers.get(t)??[];u.push(r),this._subscribers.set(t,u)}on(t,r){this.setSubscriber(t,{cb:r})}once(t,r){this.setSubscriber(t,{cb:r,once:!0})}emit(t,...r){let u=this._subscribers.get(t)??[],i=[];for(let s of u)s.cb(...r),s.once&&i.push(()=>u.splice(u.indexOf(s),1));for(let s of i)s()}prompt(){return new Promise((t,r)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(eu);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let u=new Ap(0);u._write=(i,s,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(u),this.rl=zs.createInterface({input:this.input,output:u,tabSize:2,prompt:"",escapeCodeTimeout:50}),zs.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),dr(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(ue.cursor.show),this.output.off("resize",this.render),dr(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(ue.cursor.show),this.output.off("resize",this.render),dr(this.input,!1),t(eu)})})}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&Fr.aliases.has(r.name)&&this.emit("cursor",Fr.aliases.get(r.name)),Fr.actions.has(r.name)&&this.emit("cursor",r.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),r?.name==="return"){if(this.opts.validate){let u=this.opts.validate(this.value);u&&(this.error=u instanceof Error?u.message:u,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}oo([t,r?.name,r?.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(`
127
- `),dr(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=eo(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
128
- `).length-1;this.output.write(ue.cursor.move(-999,t*-1))}render(){let t=eo(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(ue.cursor.hide);else{let r=jp(this._prevFrame,t);if(this.restoreCursor(),r&&r?.length===1){let u=r[0];this.output.write(ue.cursor.move(0,u)),this.output.write(ue.erase.lines(1));let i=t.split(`
129
- `);this.output.write(i[u]),this._prevFrame=t,this.output.write(ue.cursor.move(0,i.length-u-1));return}if(r&&r?.length>1){let u=r[0];this.output.write(ue.cursor.move(0,u)),this.output.write(ue.erase.down());let i=t.split(`
112
+ `),i=[];for(let s=0;s<Math.max(r.length,u.length);s++)r[s]!==u[s]&&i.push(s);return i}var vC=globalThis.process.platform.startsWith("win"),lu=Symbol("clack:cancel");function vt(e){return e===lu}function Ar(e,t){let r=e;r.isTTY&&r.setRawMode(t)}var Wp=Object.defineProperty,Vp=(e,t,r)=>t in e?Wp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ne=(e,t,r)=>(Vp(e,typeof t!="symbol"?t+"":t,r),r),cu=class{constructor(t,r=!0){ne(this,"input"),ne(this,"output"),ne(this,"_abortSignal"),ne(this,"rl"),ne(this,"opts"),ne(this,"_render"),ne(this,"_track",!1),ne(this,"_prevFrame",""),ne(this,"_subscribers",new Map),ne(this,"_cursor",0),ne(this,"state","initial"),ne(this,"error",""),ne(this,"value");let{input:u=Ap,output:i=bp,render:s,signal:n,...o}=t;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=r,this._abortSignal=n,this.input=u,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(t,r){let u=this._subscribers.get(t)??[];u.push(r),this._subscribers.set(t,u)}on(t,r){this.setSubscriber(t,{cb:r})}once(t,r){this.setSubscriber(t,{cb:r,once:!0})}emit(t,...r){let u=this._subscribers.get(t)??[],i=[];for(let s of u)s.cb(...r),s.once&&i.push(()=>u.splice(u.indexOf(s),1));for(let s of i)s()}prompt(){return new Promise((t,r)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(lu);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let u=new xp(0);u._write=(i,s,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(u),this.rl=Qs.createInterface({input:this.input,output:u,tabSize:2,prompt:"",escapeCodeTimeout:50}),Qs.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),Ar(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(ie.cursor.show),this.output.off("resize",this.render),Ar(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(ie.cursor.show),this.output.off("resize",this.render),Ar(this.input,!1),t(lu)})})}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&br.aliases.has(r.name)&&this.emit("cursor",br.aliases.get(r.name)),br.actions.has(r.name)&&this.emit("cursor",r.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),r?.name==="return"){if(this.opts.validate){let u=this.opts.validate(this.value);u&&(this.error=u instanceof Error?u.message:u,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}co([t,r?.name,r?.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(`
113
+ `),Ar(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=uo(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
114
+ `).length-1;this.output.write(ie.cursor.move(-999,t*-1))}render(){let t=uo(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(ie.cursor.hide);else{let r=Up(this._prevFrame,t);if(this.restoreCursor(),r&&r?.length===1){let u=r[0];this.output.write(ie.cursor.move(0,u)),this.output.write(ie.erase.lines(1));let i=t.split(`
115
+ `);this.output.write(i[u]),this._prevFrame=t,this.output.write(ie.cursor.move(0,i.length-u-1));return}if(r&&r?.length>1){let u=r[0];this.output.write(ie.cursor.move(0,u)),this.output.write(ie.erase.down());let i=t.split(`
130
116
  `).slice(u);this.output.write(i.join(`
131
- `)),this._prevFrame=t;return}this.output.write(ue.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};var Up=Object.defineProperty,Wp=(e,t,r)=>t in e?Up(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,to=(e,t,r)=>(Wp(e,typeof t!="symbol"?t+"":t,r),r),ao=class extends tu{constructor(e){super(e,!1),to(this,"options"),to(this,"cursor",0),this.options=e.options,this.value=[...e.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===e.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 e=this.value.length===this.options.length;this.value=e?[]:this.options.map(t=>t.value)}toggleValue(){let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}};var v=Nt(Ks(),1),ho=Nt(Jn(),1);import De from"node:process";function Vp(){return De.platform!=="win32"?De.env.TERM!=="linux":!!De.env.CI||!!De.env.WT_SESSION||!!De.env.TERMINUS_SUBLIME||De.env.ConEmuTask==="{cmd::Cmder}"||De.env.TERM_PROGRAM==="Terminus-Sublime"||De.env.TERM_PROGRAM==="vscode"||De.env.TERM==="xterm-256color"||De.env.TERM==="alacritty"||De.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Gp=Vp(),P=(e,t)=>Gp?e:t,Yp=P("\u25C6","*"),Kp=P("\u25A0","x"),zp=P("\u25B2","x"),qp=P("\u25C7","o"),HC=P("\u250C","T"),Be=P("\u2502","|"),Do=P("\u2514","\u2014"),UC=P("\u25CF",">"),WC=P("\u25CB"," "),Jp=P("\u25FB","[\u2022]"),lo=P("\u25FC","[+]"),Zp=P("\u25FB","[ ]"),VC=P("\u25AA","\u2022"),GC=P("\u2500","-"),YC=P("\u256E","+"),KC=P("\u251C","+"),zC=P("\u256F","+"),qC=P("\u25CF","\u2022"),JC=P("\u25C6","*"),ZC=P("\u25B2","!"),QC=P("\u25A0","x"),Qp=e=>{switch(e){case"initial":case"active":return v.default.cyan(Yp);case"cancel":return v.default.red(Kp);case"error":return v.default.yellow(zp);case"submit":return v.default.green(qp)}},co=e=>{let{cursor:t,options:r,style:u}=e,i=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),n=Math.min(s,Math.max(i,5)),o=0;t>=o+n-3?o=Math.max(Math.min(t-n+3,r.length-n),0):t<o+2&&(o=Math.max(t-2,0));let a=n<r.length&&o>0,D=n<r.length&&o+n<r.length;return r.slice(o,o+n).map((c,l,h)=>{let f=l===0&&a,p=l===h.length-1&&D;return f||p?v.default.dim("..."):u(c,l+o===t)})};var uu=e=>{let t=(r,u)=>{let i=r.label??String(r.value);return u==="active"?`${v.default.cyan(Jp)} ${i} ${r.hint?v.default.dim(`(${r.hint})`):""}`:u==="selected"?`${v.default.green(lo)} ${v.default.dim(i)}`:u==="cancelled"?`${v.default.strikethrough(v.default.dim(i))}`:u==="active-selected"?`${v.default.green(lo)} ${i} ${r.hint?v.default.dim(`(${r.hint})`):""}`:u==="submitted"?`${v.default.dim(i)}`:`${v.default.dim(Zp)} ${v.default.dim(i)}`};return new ao({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(r){if(this.required&&r.length===0)return`Please select at least one option.
117
+ `)),this._prevFrame=t;return}this.output.write(ie.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};var Gp=Object.defineProperty,Yp=(e,t,r)=>t in e?Gp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,io=(e,t,r)=>(Yp(e,typeof t!="symbol"?t+"":t,r),r),ho=class extends cu{constructor(e){super(e,!1),io(this,"options"),io(this,"cursor",0),this.options=e.options,this.value=[...e.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===e.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 e=this.value.length===this.options.length;this.value=e?[]:this.options.map(t=>t.value)}toggleValue(){let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}};var v=zt(Zs(),1),Fo=zt(su(),1);import ce from"node:process";function Kp(){return ce.platform!=="win32"?ce.env.TERM!=="linux":!!ce.env.CI||!!ce.env.WT_SESSION||!!ce.env.TERMINUS_SUBLIME||ce.env.ConEmuTask==="{cmd::Cmder}"||ce.env.TERM_PROGRAM==="Terminus-Sublime"||ce.env.TERM_PROGRAM==="vscode"||ce.env.TERM==="xterm-256color"||ce.env.TERM==="alacritty"||ce.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var zp=Kp(),N=(e,t)=>zp?e:t,qp=N("\u25C6","*"),Jp=N("\u25A0","x"),Zp=N("\u25B2","x"),Qp=N("\u25C7","o"),jC=N("\u250C","T"),Be=N("\u2502","|"),fo=N("\u2514","\u2014"),MC=N("\u25CF",">"),HC=N("\u25CB"," "),Xp=N("\u25FB","[\u2022]"),po=N("\u25FC","[+]"),ed=N("\u25FB","[ ]"),UC=N("\u25AA","\u2022"),WC=N("\u2500","-"),VC=N("\u256E","+"),GC=N("\u251C","+"),YC=N("\u256F","+"),KC=N("\u25CF","\u2022"),zC=N("\u25C6","*"),qC=N("\u25B2","!"),JC=N("\u25A0","x"),td=e=>{switch(e){case"initial":case"active":return v.default.cyan(qp);case"cancel":return v.default.red(Jp);case"error":return v.default.yellow(Zp);case"submit":return v.default.green(Qp)}},mo=e=>{let{cursor:t,options:r,style:u}=e,i=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),n=Math.min(s,Math.max(i,5)),o=0;t>=o+n-3?o=Math.max(Math.min(t-n+3,r.length-n),0):t<o+2&&(o=Math.max(t-2,0));let a=n<r.length&&o>0,l=n<r.length&&o+n<r.length;return r.slice(o,o+n).map((c,D,h)=>{let f=D===0&&a,p=D===h.length-1&&l;return f||p?v.default.dim("..."):u(c,D+o===t)})};var pu=e=>{let t=(r,u)=>{let i=r.label??String(r.value);return u==="active"?`${v.default.cyan(Xp)} ${i} ${r.hint?v.default.dim(`(${r.hint})`):""}`:u==="selected"?`${v.default.green(po)} ${v.default.dim(i)}`:u==="cancelled"?`${v.default.strikethrough(v.default.dim(i))}`:u==="active-selected"?`${v.default.green(po)} ${i} ${r.hint?v.default.dim(`(${r.hint})`):""}`:u==="submitted"?`${v.default.dim(i)}`:`${v.default.dim(ed)} ${v.default.dim(i)}`};return new ho({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(r){if(this.required&&r.length===0)return`Please select at least one option.
132
118
  ${v.default.reset(v.default.dim(`Press ${v.default.gray(v.default.bgWhite(v.default.inverse(" space ")))} to select, ${v.default.gray(v.default.bgWhite(v.default.inverse(" enter ")))} to submit`))}`},render(){let r=`${v.default.gray(Be)}
133
- ${Qp(this.state)} ${e.message}
119
+ ${td(this.state)} ${e.message}
134
120
  `,u=(i,s)=>{let n=this.value.includes(i.value);return s&&n?t(i,"active-selected"):n?t(i,"selected"):t(i,s?"active":"inactive")};switch(this.state){case"submit":return`${r}${v.default.gray(Be)} ${this.options.filter(({value:i})=>this.value.includes(i)).map(i=>t(i,"submitted")).join(v.default.dim(", "))||v.default.dim("none")}`;case"cancel":{let i=this.options.filter(({value:s})=>this.value.includes(s)).map(s=>t(s,"cancelled")).join(v.default.dim(", "));return`${r}${v.default.gray(Be)} ${i.trim()?`${i}
135
121
  ${v.default.gray(Be)}`:""}`}case"error":{let i=this.error.split(`
136
- `).map((s,n)=>n===0?`${v.default.yellow(Do)} ${v.default.yellow(s)}`:` ${s}`).join(`
137
- `);return`${r+v.default.yellow(Be)} ${co({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
122
+ `).map((s,n)=>n===0?`${v.default.yellow(fo)} ${v.default.yellow(s)}`:` ${s}`).join(`
123
+ `);return`${r+v.default.yellow(Be)} ${mo({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
138
124
  ${v.default.yellow(Be)} `)}
139
125
  ${i}
140
- `}default:return`${r}${v.default.cyan(Be)} ${co({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
126
+ `}default:return`${r}${v.default.cyan(Be)} ${mo({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
141
127
  ${v.default.cyan(Be)} `)}
142
- ${v.default.cyan(Do)}
143
- `}}}).prompt()};import{homedir as em}from"os";import{dirname as Nr,join as b}from"path";import{existsSync as G}from"fs";import{readFileSync as Nu,writeFileSync as Pr,existsSync as jr,mkdirSync as hm}from"fs";import{dirname as fm}from"path";function bt(e,t=!1){let r=e.length,u=0,i="",s=0,n=16,o=0,a=0,D=0,c=0,l=0;function h(E,k){let x=0,A=0;for(;x<E||!k;){let F=e.charCodeAt(u);if(F>=48&&F<=57)A=A*16+F-48;else if(F>=65&&F<=70)A=A*16+F-65+10;else if(F>=97&&F<=102)A=A*16+F-97+10;else break;u++,x++}return x<E&&(A=-1),A}function f(E){u=E,i="",s=0,n=16,l=0}function p(){let E=u;if(e.charCodeAt(u)===48)u++;else for(u++;u<e.length&&ze(e.charCodeAt(u));)u++;if(u<e.length&&e.charCodeAt(u)===46)if(u++,u<e.length&&ze(e.charCodeAt(u)))for(u++;u<e.length&&ze(e.charCodeAt(u));)u++;else return l=3,e.substring(E,u);let k=u;if(u<e.length&&(e.charCodeAt(u)===69||e.charCodeAt(u)===101))if(u++,(u<e.length&&e.charCodeAt(u)===43||e.charCodeAt(u)===45)&&u++,u<e.length&&ze(e.charCodeAt(u))){for(u++;u<e.length&&ze(e.charCodeAt(u));)u++;k=u}else l=3;return e.substring(E,k)}function y(){let E="",k=u;for(;;){if(u>=r){E+=e.substring(k,u),l=2;break}let x=e.charCodeAt(u);if(x===34){E+=e.substring(k,u),u++;break}if(x===92){if(E+=e.substring(k,u),u++,u>=r){l=2;break}switch(e.charCodeAt(u++)){case 34:E+='"';break;case 92:E+="\\";break;case 47:E+="/";break;case 98:E+="\b";break;case 102:E+="\f";break;case 110:E+=`
144
- `;break;case 114:E+="\r";break;case 116:E+=" ";break;case 117:let F=h(4,!0);F>=0?E+=String.fromCharCode(F):l=4;break;default:l=5}k=u;continue}if(x>=0&&x<=31)if(wt(x)){E+=e.substring(k,u),l=2;break}else l=6;u++}return E}function C(){if(i="",l=0,s=u,a=o,c=D,u>=r)return s=r,n=17;let E=e.charCodeAt(u);if(iu(E)){do u++,i+=String.fromCharCode(E),E=e.charCodeAt(u);while(iu(E));return n=15}if(wt(E))return u++,i+=String.fromCharCode(E),E===13&&e.charCodeAt(u)===10&&(u++,i+=`
145
- `),o++,D=u,n=14;switch(E){case 123:return u++,n=1;case 125:return u++,n=2;case 91:return u++,n=3;case 93:return u++,n=4;case 58:return u++,n=6;case 44:return u++,n=5;case 34:return u++,i=y(),n=10;case 47:let k=u-1;if(e.charCodeAt(u+1)===47){for(u+=2;u<r&&!wt(e.charCodeAt(u));)u++;return i=e.substring(k,u),n=12}if(e.charCodeAt(u+1)===42){u+=2;let x=r-1,A=!1;for(;u<x;){let F=e.charCodeAt(u);if(F===42&&e.charCodeAt(u+1)===47){u+=2,A=!0;break}u++,wt(F)&&(F===13&&e.charCodeAt(u)===10&&u++,o++,D=u)}return A||(u++,l=1),i=e.substring(k,u),n=13}return i+=String.fromCharCode(E),u++,n=16;case 45:if(i+=String.fromCharCode(E),u++,u===r||!ze(e.charCodeAt(u)))return n=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=p(),n=11;default:for(;u<r&&T(E);)u++,E=e.charCodeAt(u);if(s!==u){switch(i=e.substring(s,u),i){case"true":return n=8;case"false":return n=9;case"null":return n=7}return n=16}return i+=String.fromCharCode(E),u++,n=16}}function T(E){if(iu(E)||wt(E))return!1;switch(E){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function _(){let E;do E=C();while(E>=12&&E<=15);return E}return{setPosition:f,getPosition:()=>u,scan:t?_:C,getToken:()=>n,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>u-s,getTokenStartLine:()=>a,getTokenStartCharacter:()=>s-c,getTokenError:()=>l}}function iu(e){return e===32||e===9}function wt(e){return e===10||e===13}function ze(e){return e>=48&&e<=57}var po;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(po||(po={}));var ne=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),qe=200,su={" ":{"\n":new Array(qe).fill(0).map((e,t)=>`
146
- `+" ".repeat(t)),"\r":new Array(qe).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(qe).fill(0).map((e,t)=>`\r
147
- `+" ".repeat(t))}," ":{"\n":new Array(qe).fill(0).map((e,t)=>`
148
- `+" ".repeat(t)),"\r":new Array(qe).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(qe).fill(0).map((e,t)=>`\r
149
- `+" ".repeat(t))}},Fo=[`
128
+ ${v.default.cyan(fo)}
129
+ `}}}).prompt()};import{homedir as nF}from"os";import{dirname as Gr,join as b}from"path";import{existsSync as Y}from"fs";import{readFileSync as Gu,writeFileSync as Yr,existsSync as Kr,mkdirSync as dF}from"fs";import{dirname as mF}from"path";function _t(e,t=!1){let r=e.length,u=0,i="",s=0,n=16,o=0,a=0,l=0,c=0,D=0;function h(E,T){let x=0,w=0;for(;x<E||!T;){let F=e.charCodeAt(u);if(F>=48&&F<=57)w=w*16+F-48;else if(F>=65&&F<=70)w=w*16+F-65+10;else if(F>=97&&F<=102)w=w*16+F-97+10;else break;u++,x++}return x<E&&(w=-1),w}function f(E){u=E,i="",s=0,n=16,D=0}function p(){let E=u;if(e.charCodeAt(u)===48)u++;else for(u++;u<e.length&&tt(e.charCodeAt(u));)u++;if(u<e.length&&e.charCodeAt(u)===46)if(u++,u<e.length&&tt(e.charCodeAt(u)))for(u++;u<e.length&&tt(e.charCodeAt(u));)u++;else return D=3,e.substring(E,u);let T=u;if(u<e.length&&(e.charCodeAt(u)===69||e.charCodeAt(u)===101))if(u++,(u<e.length&&e.charCodeAt(u)===43||e.charCodeAt(u)===45)&&u++,u<e.length&&tt(e.charCodeAt(u))){for(u++;u<e.length&&tt(e.charCodeAt(u));)u++;T=u}else D=3;return e.substring(E,T)}function y(){let E="",T=u;for(;;){if(u>=r){E+=e.substring(T,u),D=2;break}let x=e.charCodeAt(u);if(x===34){E+=e.substring(T,u),u++;break}if(x===92){if(E+=e.substring(T,u),u++,u>=r){D=2;break}switch(e.charCodeAt(u++)){case 34:E+='"';break;case 92:E+="\\";break;case 47:E+="/";break;case 98:E+="\b";break;case 102:E+="\f";break;case 110:E+=`
130
+ `;break;case 114:E+="\r";break;case 116:E+=" ";break;case 117:let F=h(4,!0);F>=0?E+=String.fromCharCode(F):D=4;break;default:D=5}T=u;continue}if(x>=0&&x<=31)if(Bt(x)){E+=e.substring(T,u),D=2;break}else D=6;u++}return E}function C(){if(i="",D=0,s=u,a=o,c=l,u>=r)return s=r,n=17;let E=e.charCodeAt(u);if(du(E)){do u++,i+=String.fromCharCode(E),E=e.charCodeAt(u);while(du(E));return n=15}if(Bt(E))return u++,i+=String.fromCharCode(E),E===13&&e.charCodeAt(u)===10&&(u++,i+=`
131
+ `),o++,l=u,n=14;switch(E){case 123:return u++,n=1;case 125:return u++,n=2;case 91:return u++,n=3;case 93:return u++,n=4;case 58:return u++,n=6;case 44:return u++,n=5;case 34:return u++,i=y(),n=10;case 47:let T=u-1;if(e.charCodeAt(u+1)===47){for(u+=2;u<r&&!Bt(e.charCodeAt(u));)u++;return i=e.substring(T,u),n=12}if(e.charCodeAt(u+1)===42){u+=2;let x=r-1,w=!1;for(;u<x;){let F=e.charCodeAt(u);if(F===42&&e.charCodeAt(u+1)===47){u+=2,w=!0;break}u++,Bt(F)&&(F===13&&e.charCodeAt(u)===10&&u++,o++,l=u)}return w||(u++,D=1),i=e.substring(T,u),n=13}return i+=String.fromCharCode(E),u++,n=16;case 45:if(i+=String.fromCharCode(E),u++,u===r||!tt(e.charCodeAt(u)))return n=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=p(),n=11;default:for(;u<r&&$(E);)u++,E=e.charCodeAt(u);if(s!==u){switch(i=e.substring(s,u),i){case"true":return n=8;case"false":return n=9;case"null":return n=7}return n=16}return i+=String.fromCharCode(E),u++,n=16}}function $(E){if(du(E)||Bt(E))return!1;switch(E){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function _(){let E;do E=C();while(E>=12&&E<=15);return E}return{setPosition:f,getPosition:()=>u,scan:t?_:C,getToken:()=>n,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>u-s,getTokenStartLine:()=>a,getTokenStartCharacter:()=>s-c,getTokenError:()=>D}}function du(e){return e===32||e===9}function Bt(e){return e===10||e===13}function tt(e){return e>=48&&e<=57}var Co;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Co||(Co={}));var ue=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),rt=200,mu={" ":{"\n":new Array(rt).fill(0).map((e,t)=>`
132
+ `+" ".repeat(t)),"\r":new Array(rt).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(rt).fill(0).map((e,t)=>`\r
133
+ `+" ".repeat(t))}," ":{"\n":new Array(rt).fill(0).map((e,t)=>`
134
+ `+" ".repeat(t)),"\r":new Array(rt).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(rt).fill(0).map((e,t)=>`\r
135
+ `+" ".repeat(t))}},Eo=[`
150
136
  `,"\r",`\r
151
- `];function ou(e,t,r){let u,i,s,n,o;if(t){for(n=t.offset,o=n+t.length,s=n;s>0&&!xt(e,s-1);)s--;let x=o;for(;x<e.length&&!xt(e,x);)x++;i=e.substring(s,x),u=e0(i,r)}else i=e,u=0,s=0,n=0,o=e.length;let a=t0(r,e),D=Fo.includes(a),c=0,l=0,h;r.insertSpaces?h=ne[r.tabSize||4]??Je(ne[1],r.tabSize||4):h=" ";let f=h===" "?" ":" ",p=bt(i,!1),y=!1;function C(){if(c>1)return Je(a,c)+Je(h,u+l);let x=h.length*(u+l);return!D||x>su[f][a].length?a+Je(h,u+l):x<=0?a:su[f][a][x]}function T(){let x=p.scan();for(c=0;x===15||x===14;)x===14&&r.keepLines?c+=1:x===14&&(c=1),x=p.scan();return y=x===16||p.getTokenError()!==0,x}let _=[];function E(x,A,F){!y&&(!t||A<o&&F>n)&&e.substring(A,F)!==x&&_.push({offset:A,length:F-A,content:x})}let k=T();if(r.keepLines&&c>0&&E(Je(a,c),0,0),k!==17){let x=p.getTokenOffset()+s,A=h.length*u<20&&r.insertSpaces?ne[h.length*u]:Je(h,u);E(A,s,x)}for(;k!==17;){let x=p.getTokenOffset()+p.getTokenLength()+s,A=T(),F="",me=!1;for(;c===0&&(A===12||A===13);){let Yr=p.getTokenOffset()+s;E(ne[1],x,Yr),x=p.getTokenOffset()+p.getTokenLength()+s,me=A===12,F=me?C():"",A=T()}if(A===2)k!==1&&l--,r.keepLines&&c>0||!r.keepLines&&k!==1?F=C():r.keepLines&&(F=ne[1]);else if(A===4)k!==3&&l--,r.keepLines&&c>0||!r.keepLines&&k!==3?F=C():r.keepLines&&(F=ne[1]);else{switch(k){case 3:case 1:l++,r.keepLines&&c>0||!r.keepLines?F=C():F=ne[1];break;case 5:r.keepLines&&c>0||!r.keepLines?F=C():F=ne[1];break;case 12:F=C();break;case 13:c>0?F=C():me||(F=ne[1]);break;case 6:r.keepLines&&c>0?F=C():me||(F=ne[1]);break;case 10:r.keepLines&&c>0?F=C():A===6&&!me&&(F="");break;case 7:case 8:case 9:case 11:case 2:case 4:r.keepLines&&c>0?F=C():(A===12||A===13)&&!me?F=ne[1]:A!==5&&A!==17&&(y=!0);break;case 16:y=!0;break}c>0&&(A===12||A===13)&&(F=C())}A===17&&(r.keepLines&&c>0?F=C():F=r.insertFinalNewline?a:"");let Gr=p.getTokenOffset()+s;E(F,x,Gr),k=A}return _}function Je(e,t){let r="";for(let u=0;u<t;u++)r+=e;return r}function e0(e,t){let r=0,u=0,i=t.tabSize||4;for(;r<e.length;){let s=e.charAt(r);if(s===ne[1])u++;else if(s===" ")u+=i;else break;r++}return Math.floor(u/i)}function t0(e,t){for(let r=0;r<t.length;r++){let u=t.charAt(r);if(u==="\r")return r+1<t.length&&t.charAt(r+1)===`
137
+ `];function Fu(e,t,r){let u,i,s,n,o;if(t){for(n=t.offset,o=n+t.length,s=n;s>0&&!St(e,s-1);)s--;let x=o;for(;x<e.length&&!St(e,x);)x++;i=e.substring(s,x),u=nd(i,r)}else i=e,u=0,s=0,n=0,o=e.length;let a=ud(r,e),l=Eo.includes(a),c=0,D=0,h;r.insertSpaces?h=ue[r.tabSize||4]??nt(ue[1],r.tabSize||4):h=" ";let f=h===" "?" ":" ",p=_t(i,!1),y=!1;function C(){if(c>1)return nt(a,c)+nt(h,u+D);let x=h.length*(u+D);return!l||x>mu[f][a].length?a+nt(h,u+D):x<=0?a:mu[f][a][x]}function $(){let x=p.scan();for(c=0;x===15||x===14;)x===14&&r.keepLines?c+=1:x===14&&(c=1),x=p.scan();return y=x===16||p.getTokenError()!==0,x}let _=[];function E(x,w,F){!y&&(!t||w<o&&F>n)&&e.substring(w,F)!==x&&_.push({offset:w,length:F-w,content:x})}let T=$();if(r.keepLines&&c>0&&E(nt(a,c),0,0),T!==17){let x=p.getTokenOffset()+s,w=h.length*u<20&&r.insertSpaces?ue[h.length*u]:nt(h,u);E(w,s,x)}for(;T!==17;){let x=p.getTokenOffset()+p.getTokenLength()+s,w=$(),F="",Ee=!1;for(;c===0&&(w===12||w===13);){let ln=p.getTokenOffset()+s;E(ue[1],x,ln),x=p.getTokenOffset()+p.getTokenLength()+s,Ee=w===12,F=Ee?C():"",w=$()}if(w===2)T!==1&&D--,r.keepLines&&c>0||!r.keepLines&&T!==1?F=C():r.keepLines&&(F=ue[1]);else if(w===4)T!==3&&D--,r.keepLines&&c>0||!r.keepLines&&T!==3?F=C():r.keepLines&&(F=ue[1]);else{switch(T){case 3:case 1:D++,r.keepLines&&c>0||!r.keepLines?F=C():F=ue[1];break;case 5:r.keepLines&&c>0||!r.keepLines?F=C():F=ue[1];break;case 12:F=C();break;case 13:c>0?F=C():Ee||(F=ue[1]);break;case 6:r.keepLines&&c>0?F=C():Ee||(F=ue[1]);break;case 10:r.keepLines&&c>0?F=C():w===6&&!Ee&&(F="");break;case 7:case 8:case 9:case 11:case 2:case 4:r.keepLines&&c>0?F=C():(w===12||w===13)&&!Ee?F=ue[1]:w!==5&&w!==17&&(y=!0);break;case 16:y=!0;break}c>0&&(w===12||w===13)&&(F=C())}w===17&&(r.keepLines&&c>0?F=C():F=r.insertFinalNewline?a:"");let Dn=p.getTokenOffset()+s;E(F,x,Dn),T=w}return _}function nt(e,t){let r="";for(let u=0;u<t;u++)r+=e;return r}function nd(e,t){let r=0,u=0,i=t.tabSize||4;for(;r<e.length;){let s=e.charAt(r);if(s===ue[1])u++;else if(s===" ")u+=i;else break;r++}return Math.floor(u/i)}function ud(e,t){for(let r=0;r<t.length;r++){let u=t.charAt(r);if(u==="\r")return r+1<t.length&&t.charAt(r+1)===`
152
138
  `?`\r
153
139
  `:"\r";if(u===`
154
140
  `)return`
155
141
  `}return e&&e.eol||`
156
- `}function xt(e,t){return`\r
157
- `.indexOf(e.charAt(t))!==-1}var vt;(function(e){e.DEFAULT={allowTrailingComma:!1}})(vt||(vt={}));function mo(e,t=[],r=vt.DEFAULT){let u=null,i=[],s=[];function n(a){Array.isArray(i)?i.push(a):u!==null&&(i[u]=a)}return Cr(e,{onObjectBegin:()=>{let a={};n(a),s.push(i),i=a,u=null},onObjectProperty:a=>{u=a},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{let a=[];n(a),s.push(i),i=a,u=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:n,onError:(a,D,c)=>{t.push({error:a,offset:D,length:c})}},r),i[0]}function au(e,t=[],r=vt.DEFAULT){let u={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(a){u.type==="property"&&(u.length=a-u.offset,u=u.parent)}function s(a){return u.children.push(a),a}Cr(e,{onObjectBegin:a=>{u=s({type:"object",offset:a,length:-1,parent:u,children:[]})},onObjectProperty:(a,D,c)=>{u=s({type:"property",offset:D,length:-1,parent:u,children:[]}),u.children.push({type:"string",value:a,offset:D,length:c,parent:u})},onObjectEnd:(a,D)=>{i(a+D),u.length=a+D-u.offset,u=u.parent,i(a+D)},onArrayBegin:(a,D)=>{u=s({type:"array",offset:a,length:-1,parent:u,children:[]})},onArrayEnd:(a,D)=>{u.length=a+D-u.offset,u=u.parent,i(a+D)},onLiteralValue:(a,D,c)=>{s({type:n0(a),offset:D,length:c,parent:u,value:a}),i(D+c)},onSeparator:(a,D,c)=>{u.type==="property"&&(a===":"?u.colonOffset=D:a===","&&i(D))},onError:(a,D,c)=>{t.push({error:a,offset:D,length:c})}},r);let o=u.children[0];return o&&delete o.parent,o}function gr(e,t){if(!e)return;let r=e;for(let u of t)if(typeof u=="string"){if(r.type!=="object"||!Array.isArray(r.children))return;let i=!1;for(let s of r.children)if(Array.isArray(s.children)&&s.children[0].value===u&&s.children.length===2){r=s.children[1],i=!0;break}if(!i)return}else{let i=u;if(r.type!=="array"||i<0||!Array.isArray(r.children)||i>=r.children.length)return;r=r.children[i]}return r}function Cr(e,t,r=vt.DEFAULT){let u=bt(e,!1),i=[],s=0;function n(S){return S?()=>s===0&&S(u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter()):()=>!0}function o(S){return S?M=>s===0&&S(M,u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter()):()=>!0}function a(S){return S?M=>s===0&&S(M,u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter(),()=>i.slice()):()=>!0}function D(S){return S?()=>{s>0?s++:S(u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}function c(S){return S?()=>{s>0&&s--,s===0&&S(u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter())}:()=>!0}let l=D(t.onObjectBegin),h=a(t.onObjectProperty),f=c(t.onObjectEnd),p=D(t.onArrayBegin),y=c(t.onArrayEnd),C=a(t.onLiteralValue),T=o(t.onSeparator),_=n(t.onComment),E=o(t.onError),k=r&&r.disallowComments,x=r&&r.allowTrailingComma;function A(){for(;;){let S=u.scan();switch(u.getTokenError()){case 4:F(14);break;case 5:F(15);break;case 3:F(13);break;case 1:k||F(11);break;case 2:F(12);break;case 6:F(16);break}switch(S){case 12:case 13:k?F(10):_();break;case 16:F(1);break;case 15:case 14:break;default:return S}}}function F(S,M=[],Gu=[]){if(E(S),M.length+Gu.length>0){let Lt=u.getToken();for(;Lt!==17;){if(M.indexOf(Lt)!==-1){A();break}else if(Gu.indexOf(Lt)!==-1)break;Lt=A()}}}function me(S){let M=u.getTokenValue();return S?C(M):(h(M),i.push(M)),A(),!0}function Gr(){switch(u.getToken()){case 11:let S=u.getTokenValue(),M=Number(S);isNaN(M)&&(F(2),M=0),C(M);break;case 7:C(null);break;case 8:C(!0);break;case 9:C(!1);break;default:return!1}return A(),!0}function Yr(){return u.getToken()!==10?(F(3,[],[2,5]),!1):(me(!1),u.getToken()===6?(T(":"),A(),Kr()||F(4,[],[2,5])):F(5,[],[2,5]),i.pop(),!0)}function vD(){l(),A();let S=!1;for(;u.getToken()!==2&&u.getToken()!==17;){if(u.getToken()===5){if(S||F(4,[],[]),T(","),A(),u.getToken()===2&&x)break}else S&&F(6,[],[]);Yr()||F(4,[],[2,5]),S=!0}return f(),u.getToken()!==2?F(7,[2],[]):A(),!0}function BD(){p(),A();let S=!0,M=!1;for(;u.getToken()!==4&&u.getToken()!==17;){if(u.getToken()===5){if(M||F(4,[],[]),T(","),A(),u.getToken()===4&&x)break}else M&&F(6,[],[]);S?(i.push(0),S=!1):i[i.length-1]++,Kr()||F(4,[],[4,5]),M=!0}return y(),S||i.pop(),u.getToken()!==4?F(8,[4],[]):A(),!0}function Kr(){switch(u.getToken()){case 3:return BD();case 1:return vD();case 10:return me(!0);default:return Gr()}}return A(),u.getToken()===17?r.allowEmptyContent?!0:(F(4,[],[]),!1):Kr()?(u.getToken()!==17&&F(9,[],[]),!0):(F(4,[],[]),!1)}function n0(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function go(e,t,r,u){let i=t.slice(),n=au(e,[]),o,a;for(;i.length>0&&(a=i.pop(),o=gr(n,i),o===void 0&&r!==void 0);)typeof a=="string"?r={[a]:r}:r=[r];if(o)if(o.type==="object"&&typeof a=="string"&&Array.isArray(o.children)){let D=gr(o,[a]);if(D!==void 0)if(r===void 0){if(!D.parent)throw new Error("Malformed AST");let c=o.children.indexOf(D.parent),l,h=D.parent.offset+D.parent.length;if(c>0){let f=o.children[c-1];l=f.offset+f.length}else l=o.offset+1,o.children.length>1&&(h=o.children[1].offset);return je(e,{offset:l,length:h-l,content:""},u)}else return je(e,{offset:D.offset,length:D.length,content:JSON.stringify(r)},u);else{if(r===void 0)return[];let c=`${JSON.stringify(a)}: ${JSON.stringify(r)}`,l=u.getInsertionIndex?u.getInsertionIndex(o.children.map(f=>f.children[0].value)):o.children.length,h;if(l>0){let f=o.children[l-1];h={offset:f.offset+f.length,length:0,content:","+c}}else o.children.length===0?h={offset:o.offset+1,length:0,content:c}:h={offset:o.offset+1,length:0,content:c+","};return je(e,h,u)}}else if(o.type==="array"&&typeof a=="number"&&Array.isArray(o.children)){let D=a;if(D===-1){let c=`${JSON.stringify(r)}`,l;if(o.children.length===0)l={offset:o.offset+1,length:0,content:c};else{let h=o.children[o.children.length-1];l={offset:h.offset+h.length,length:0,content:","+c}}return je(e,l,u)}else if(r===void 0&&o.children.length>=0){let c=a,l=o.children[c],h;if(o.children.length===1)h={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===c){let f=o.children[c-1],p=f.offset+f.length,y=o.offset+o.length;h={offset:p,length:y-2-p,content:""}}else h={offset:l.offset,length:o.children[c+1].offset-l.offset,content:""};return je(e,h,u)}else if(r!==void 0){let c,l=`${JSON.stringify(r)}`;if(!u.isArrayInsertion&&o.children.length>a){let h=o.children[a];c={offset:h.offset,length:h.length,content:l}}else if(o.children.length===0||a===0)c={offset:o.offset+1,length:0,content:o.children.length===0?l:l+","};else{let h=a>o.children.length?o.children.length:a,f=o.children[h-1];c={offset:f.offset+f.length,length:0,content:","+l}}return je(e,c,u)}else throw new Error(`Can not ${r===void 0?"remove":u.isArrayInsertion?"insert":"modify"} Array index ${D} as length is not sufficient`)}else throw new Error(`Can not add ${typeof a!="number"?"index":"property"} to parent of type ${o.type}`);else{if(r===void 0)throw new Error("Can not delete in empty document");return je(e,{offset:n?n.offset:0,length:n?n.length:0,content:JSON.stringify(r)},u)}}function je(e,t,r){if(!r.formattingOptions)return[t];let u=Er(e,t),i=t.offset,s=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!xt(u,i-1);)i--;for(;s<u.length&&!xt(u,s);)s++}let n=ou(u,{offset:i,length:s-i},{...r.formattingOptions,keepLines:!1});for(let a=n.length-1;a>=0;a--){let D=n[a];u=Er(u,D),i=Math.min(i,D.offset),s=Math.max(s,D.offset+D.length),s+=D.content.length-D.length}let o=e.length-(u.length-s)-i;return[{offset:i,length:o,content:u.substring(i,s)}]}function Er(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var Co;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Co||(Co={}));var Eo;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Eo||(Eo={}));var yr=mo;var Ao=Cr;var yo;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(yo||(yo={}));function Du(e,t,r,u){return go(e,t,r,u)}function lu(e,t){let r=t.slice(0).sort((i,s)=>{let n=i.offset-s.offset;return n===0?i.length-s.length:n}),u=e.length;for(let i=r.length-1;i>=0;i--){let s=r[i];if(s.offset+s.length<=u)e=Er(e,s);else throw new Error("Overlapping edit");u=s.offset}return e}import{readFileSync as gm,writeFileSync as cD,existsSync as Mr,mkdirSync as Cm}from"fs";import{dirname as Em}from"path";function Po(e){return typeof e>"u"||e===null}function o0(e){return typeof e=="object"&&e!==null}function a0(e){return Array.isArray(e)?e:Po(e)?[]:[e]}function D0(e,t){var r,u,i,s;if(t)for(s=Object.keys(t),r=0,u=s.length;r<u;r+=1)i=s[r],e[i]=t[i];return e}function l0(e,t){var r="",u;for(u=0;u<t;u+=1)r+=e;return r}function c0(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var h0=Po,f0=o0,p0=a0,d0=l0,F0=c0,m0=D0,U={isNothing:h0,isObject:f0,toArray:p0,repeat:d0,isNegativeZero:F0,extend:m0};function jo(e,t){var r="",u=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
142
+ `}function St(e,t){return`\r
143
+ `.indexOf(e.charAt(t))!==-1}var $t;(function(e){e.DEFAULT={allowTrailingComma:!1}})($t||($t={}));function yo(e,t=[],r=$t.DEFAULT){let u=null,i=[],s=[];function n(a){Array.isArray(i)?i.push(a):u!==null&&(i[u]=a)}return Br(e,{onObjectBegin:()=>{let a={};n(a),s.push(i),i=a,u=null},onObjectProperty:a=>{u=a},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{let a=[];n(a),s.push(i),i=a,u=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:n,onError:(a,l,c)=>{t.push({error:a,offset:l,length:c})}},r),i[0]}function gu(e,t=[],r=$t.DEFAULT){let u={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(a){u.type==="property"&&(u.length=a-u.offset,u=u.parent)}function s(a){return u.children.push(a),a}Br(e,{onObjectBegin:a=>{u=s({type:"object",offset:a,length:-1,parent:u,children:[]})},onObjectProperty:(a,l,c)=>{u=s({type:"property",offset:l,length:-1,parent:u,children:[]}),u.children.push({type:"string",value:a,offset:l,length:c,parent:u})},onObjectEnd:(a,l)=>{i(a+l),u.length=a+l-u.offset,u=u.parent,i(a+l)},onArrayBegin:(a,l)=>{u=s({type:"array",offset:a,length:-1,parent:u,children:[]})},onArrayEnd:(a,l)=>{u.length=a+l-u.offset,u=u.parent,i(a+l)},onLiteralValue:(a,l,c)=>{s({type:sd(a),offset:l,length:c,parent:u,value:a}),i(l+c)},onSeparator:(a,l,c)=>{u.type==="property"&&(a===":"?u.colonOffset=l:a===","&&i(l))},onError:(a,l,c)=>{t.push({error:a,offset:l,length:c})}},r);let o=u.children[0];return o&&delete o.parent,o}function vr(e,t){if(!e)return;let r=e;for(let u of t)if(typeof u=="string"){if(r.type!=="object"||!Array.isArray(r.children))return;let i=!1;for(let s of r.children)if(Array.isArray(s.children)&&s.children[0].value===u&&s.children.length===2){r=s.children[1],i=!0;break}if(!i)return}else{let i=u;if(r.type!=="array"||i<0||!Array.isArray(r.children)||i>=r.children.length)return;r=r.children[i]}return r}function Br(e,t,r=$t.DEFAULT){let u=_t(e,!1),i=[],s=0;function n(S){return S?()=>s===0&&S(u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter()):()=>!0}function o(S){return S?H=>s===0&&S(H,u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter()):()=>!0}function a(S){return S?H=>s===0&&S(H,u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l(S){return S?()=>{s>0?s++:S(u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}function c(S){return S?()=>{s>0&&s--,s===0&&S(u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter())}:()=>!0}let D=l(t.onObjectBegin),h=a(t.onObjectProperty),f=c(t.onObjectEnd),p=l(t.onArrayBegin),y=c(t.onArrayEnd),C=a(t.onLiteralValue),$=o(t.onSeparator),_=n(t.onComment),E=o(t.onError),T=r&&r.disallowComments,x=r&&r.allowTrailingComma;function w(){for(;;){let S=u.scan();switch(u.getTokenError()){case 4:F(14);break;case 5:F(15);break;case 3:F(13);break;case 1:T||F(11);break;case 2:F(12);break;case 6:F(16);break}switch(S){case 12:case 13:T?F(10):_();break;case 16:F(1);break;case 15:case 14:break;default:return S}}}function F(S,H=[],li=[]){if(E(S),H.length+li.length>0){let Kt=u.getToken();for(;Kt!==17;){if(H.indexOf(Kt)!==-1){w();break}else if(li.indexOf(Kt)!==-1)break;Kt=w()}}}function Ee(S){let H=u.getTokenValue();return S?C(H):(h(H),i.push(H)),w(),!0}function Dn(){switch(u.getToken()){case 11:let S=u.getTokenValue(),H=Number(S);isNaN(H)&&(F(2),H=0),C(H);break;case 7:C(null);break;case 8:C(!0);break;case 9:C(!1);break;default:return!1}return w(),!0}function ln(){return u.getToken()!==10?(F(3,[],[2,5]),!1):(Ee(!1),u.getToken()===6?($(":"),w(),cn()||F(4,[],[2,5])):F(5,[],[2,5]),i.pop(),!0)}function YD(){D(),w();let S=!1;for(;u.getToken()!==2&&u.getToken()!==17;){if(u.getToken()===5){if(S||F(4,[],[]),$(","),w(),u.getToken()===2&&x)break}else S&&F(6,[],[]);ln()||F(4,[],[2,5]),S=!0}return f(),u.getToken()!==2?F(7,[2],[]):w(),!0}function KD(){p(),w();let S=!0,H=!1;for(;u.getToken()!==4&&u.getToken()!==17;){if(u.getToken()===5){if(H||F(4,[],[]),$(","),w(),u.getToken()===4&&x)break}else H&&F(6,[],[]);S?(i.push(0),S=!1):i[i.length-1]++,cn()||F(4,[],[4,5]),H=!0}return y(),S||i.pop(),u.getToken()!==4?F(8,[4],[]):w(),!0}function cn(){switch(u.getToken()){case 3:return KD();case 1:return YD();case 10:return Ee(!0);default:return Dn()}}return w(),u.getToken()===17?r.allowEmptyContent?!0:(F(4,[],[]),!1):cn()?(u.getToken()!==17&&F(9,[],[]),!0):(F(4,[],[]),!1)}function sd(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function wo(e,t,r,u){let i=t.slice(),n=gu(e,[]),o,a;for(;i.length>0&&(a=i.pop(),o=vr(n,i),o===void 0&&r!==void 0);)typeof a=="string"?r={[a]:r}:r=[r];if(o)if(o.type==="object"&&typeof a=="string"&&Array.isArray(o.children)){let l=vr(o,[a]);if(l!==void 0)if(r===void 0){if(!l.parent)throw new Error("Malformed AST");let c=o.children.indexOf(l.parent),D,h=l.parent.offset+l.parent.length;if(c>0){let f=o.children[c-1];D=f.offset+f.length}else D=o.offset+1,o.children.length>1&&(h=o.children[1].offset);return We(e,{offset:D,length:h-D,content:""},u)}else return We(e,{offset:l.offset,length:l.length,content:JSON.stringify(r)},u);else{if(r===void 0)return[];let c=`${JSON.stringify(a)}: ${JSON.stringify(r)}`,D=u.getInsertionIndex?u.getInsertionIndex(o.children.map(f=>f.children[0].value)):o.children.length,h;if(D>0){let f=o.children[D-1];h={offset:f.offset+f.length,length:0,content:","+c}}else o.children.length===0?h={offset:o.offset+1,length:0,content:c}:h={offset:o.offset+1,length:0,content:c+","};return We(e,h,u)}}else if(o.type==="array"&&typeof a=="number"&&Array.isArray(o.children)){let l=a;if(l===-1){let c=`${JSON.stringify(r)}`,D;if(o.children.length===0)D={offset:o.offset+1,length:0,content:c};else{let h=o.children[o.children.length-1];D={offset:h.offset+h.length,length:0,content:","+c}}return We(e,D,u)}else if(r===void 0&&o.children.length>=0){let c=a,D=o.children[c],h;if(o.children.length===1)h={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===c){let f=o.children[c-1],p=f.offset+f.length,y=o.offset+o.length;h={offset:p,length:y-2-p,content:""}}else h={offset:D.offset,length:o.children[c+1].offset-D.offset,content:""};return We(e,h,u)}else if(r!==void 0){let c,D=`${JSON.stringify(r)}`;if(!u.isArrayInsertion&&o.children.length>a){let h=o.children[a];c={offset:h.offset,length:h.length,content:D}}else if(o.children.length===0||a===0)c={offset:o.offset+1,length:0,content:o.children.length===0?D:D+","};else{let h=a>o.children.length?o.children.length:a,f=o.children[h-1];c={offset:f.offset+f.length,length:0,content:","+D}}return We(e,c,u)}else throw new Error(`Can not ${r===void 0?"remove":u.isArrayInsertion?"insert":"modify"} Array index ${l} as length is not sufficient`)}else throw new Error(`Can not add ${typeof a!="number"?"index":"property"} to parent of type ${o.type}`);else{if(r===void 0)throw new Error("Can not delete in empty document");return We(e,{offset:n?n.offset:0,length:n?n.length:0,content:JSON.stringify(r)},u)}}function We(e,t,r){if(!r.formattingOptions)return[t];let u=_r(e,t),i=t.offset,s=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!St(u,i-1);)i--;for(;s<u.length&&!St(u,s);)s++}let n=Fu(u,{offset:i,length:s-i},{...r.formattingOptions,keepLines:!1});for(let a=n.length-1;a>=0;a--){let l=n[a];u=_r(u,l),i=Math.min(i,l.offset),s=Math.max(s,l.offset+l.length),s+=l.content.length-l.length}let o=e.length-(u.length-s)-i;return[{offset:i,length:o,content:u.substring(i,s)}]}function _r(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var Ao;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Ao||(Ao={}));var bo;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(bo||(bo={}));var Sr=yo;var vo=Br;var xo;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(xo||(xo={}));function Cu(e,t,r,u){return wo(e,t,r,u)}function Eu(e,t){let r=t.slice(0).sort((i,s)=>{let n=i.offset-s.offset;return n===0?i.length-s.length:n}),u=e.length;for(let i=r.length-1;i>=0;i--){let s=r[i];if(s.offset+s.length<=u)e=_r(e,s);else throw new Error("Overlapping edit");u=s.offset}return e}import{readFileSync as yF,writeFileSync as mD,existsSync as zr,mkdirSync as wF}from"fs";import{dirname as AF}from"path";function Uo(e){return typeof e>"u"||e===null}function ld(e){return typeof e=="object"&&e!==null}function cd(e){return Array.isArray(e)?e:Uo(e)?[]:[e]}function hd(e,t){var r,u,i,s;if(t)for(s=Object.keys(t),r=0,u=s.length;r<u;r+=1)i=s[r],e[i]=t[i];return e}function fd(e,t){var r="",u;for(u=0;u<t;u+=1)r+=e;return r}function pd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var dd=Uo,md=ld,Fd=cd,gd=fd,Cd=pd,Ed=hd,W={isNothing:dd,isObject:md,toArray:Fd,repeat:gd,isNegativeZero:Cd,extend:Ed};function Wo(e,t){var r="",u=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
158
144
 
159
- `+e.mark.snippet),u+" "+r):u}function _t(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=jo(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}_t.prototype=Object.create(Error.prototype);_t.prototype.constructor=_t;_t.prototype.toString=function(t){return this.name+": "+jo(this,t)};var Z=_t;function cu(e,t,r,u,i){var s="",n="",o=Math.floor(i/2)-1;return u-t>o&&(s=" ... ",t=u-o+s.length),r-u>o&&(n=" ...",r=u+o-n.length),{str:s+e.slice(t,r).replace(/\t/g,"\u2192")+n,pos:u-t+s.length}}function hu(e,t){return U.repeat(" ",t-e.length)+e}function g0(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,u=[0],i=[],s,n=-1;s=r.exec(e.buffer);)i.push(s.index),u.push(s.index+s[0].length),e.position<=s.index&&n<0&&(n=u.length-2);n<0&&(n=u.length-1);var o="",a,D,c=Math.min(e.line+t.linesAfter,i.length).toString().length,l=t.maxLength-(t.indent+c+3);for(a=1;a<=t.linesBefore&&!(n-a<0);a++)D=cu(e.buffer,u[n-a],i[n-a],e.position-(u[n]-u[n-a]),l),o=U.repeat(" ",t.indent)+hu((e.line-a+1).toString(),c)+" | "+D.str+`
160
- `+o;for(D=cu(e.buffer,u[n],i[n],e.position,l),o+=U.repeat(" ",t.indent)+hu((e.line+1).toString(),c)+" | "+D.str+`
161
- `,o+=U.repeat("-",t.indent+c+3+D.pos)+`^
162
- `,a=1;a<=t.linesAfter&&!(n+a>=i.length);a++)D=cu(e.buffer,u[n+a],i[n+a],e.position-(u[n]-u[n+a]),l),o+=U.repeat(" ",t.indent)+hu((e.line+a+1).toString(),c)+" | "+D.str+`
163
- `;return o.replace(/\n$/,"")}var C0=g0,E0=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],y0=["scalar","sequence","mapping"];function A0(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(u){t[String(u)]=r})}),t}function w0(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(E0.indexOf(r)===-1)throw new Z('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=A0(t.styleAliases||null),y0.indexOf(this.kind)===-1)throw new Z('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var K=w0;function wo(e,t){var r=[];return e[t].forEach(function(u){var i=r.length;r.forEach(function(s,n){s.tag===u.tag&&s.kind===u.kind&&s.multi===u.multi&&(i=n)}),r[i]=u}),r}function b0(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function u(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(u);return e}function pu(e){return this.extend(e)}pu.prototype.extend=function(t){var r=[],u=[];if(t instanceof K)u.push(t);else if(Array.isArray(t))u=u.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(u=u.concat(t.explicit));else throw new Z("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof K))throw new Z("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Z("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Z("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),u.forEach(function(s){if(!(s instanceof K))throw new Z("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(pu.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(u),i.compiledImplicit=wo(i,"implicit"),i.compiledExplicit=wo(i,"explicit"),i.compiledTypeMap=b0(i.compiledImplicit,i.compiledExplicit),i};var Mo=pu,Ho=new K("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Uo=new K("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Wo=new K("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Vo=new Mo({explicit:[Ho,Uo,Wo]});function x0(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function v0(){return null}function B0(e){return e===null}var Go=new K("tag:yaml.org,2002:null",{kind:"scalar",resolve:x0,construct:v0,predicate:B0,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function _0(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function S0(e){return e==="true"||e==="True"||e==="TRUE"}function T0(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Yo=new K("tag:yaml.org,2002:bool",{kind:"scalar",resolve:_0,construct:S0,predicate:T0,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function $0(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function k0(e){return 48<=e&&e<=55}function O0(e){return 48<=e&&e<=57}function R0(e){if(e===null)return!1;var t=e.length,r=0,u=!1,i;if(!t)return!1;if(i=e[r],(i==="-"||i==="+")&&(i=e[++r]),i==="0"){if(r+1===t)return!0;if(i=e[++r],i==="b"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;u=!0}return u&&i!=="_"}if(i==="x"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!$0(e.charCodeAt(r)))return!1;u=!0}return u&&i!=="_"}if(i==="o"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!k0(e.charCodeAt(r)))return!1;u=!0}return u&&i!=="_"}}if(i==="_")return!1;for(;r<t;r++)if(i=e[r],i!=="_"){if(!O0(e.charCodeAt(r)))return!1;u=!0}return!(!u||i==="_")}function I0(e){var t=e,r=1,u;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),u=t[0],(u==="-"||u==="+")&&(u==="-"&&(r=-1),t=t.slice(1),u=t[0]),t==="0")return 0;if(u==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function L0(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!U.isNegativeZero(e)}var Ko=new K("tag:yaml.org,2002:int",{kind:"scalar",resolve:R0,construct:I0,predicate:L0,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),N0=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function P0(e){return!(e===null||!N0.test(e)||e[e.length-1]==="_")}function j0(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var M0=/^[-+]?[0-9]+e/;function H0(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(U.isNegativeZero(e))return"-0.0";return r=e.toString(10),M0.test(r)?r.replace("e",".e"):r}function U0(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||U.isNegativeZero(e))}var zo=new K("tag:yaml.org,2002:float",{kind:"scalar",resolve:P0,construct:j0,predicate:U0,represent:H0,defaultStyle:"lowercase"}),qo=Vo.extend({implicit:[Go,Yo,Ko,zo]}),Jo=qo,Zo=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Qo=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function W0(e){return e===null?!1:Zo.exec(e)!==null||Qo.exec(e)!==null}function V0(e){var t,r,u,i,s,n,o,a=0,D=null,c,l,h;if(t=Zo.exec(e),t===null&&(t=Qo.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],u=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,u,i));if(s=+t[4],n=+t[5],o=+t[6],t[7]){for(a=t[7].slice(0,3);a.length<3;)a+="0";a=+a}return t[9]&&(c=+t[10],l=+(t[11]||0),D=(c*60+l)*6e4,t[9]==="-"&&(D=-D)),h=new Date(Date.UTC(r,u,i,s,n,o,a)),D&&h.setTime(h.getTime()-D),h}function G0(e){return e.toISOString()}var Xo=new K("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:W0,construct:V0,instanceOf:Date,represent:G0});function Y0(e){return e==="<<"||e===null}var ea=new K("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Y0}),Cu=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
164
- \r`;function K0(e){if(e===null)return!1;var t,r,u=0,i=e.length,s=Cu;for(r=0;r<i;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;u+=6}return u%8===0}function z0(e){var t,r,u=e.replace(/[\r\n=]/g,""),i=u.length,s=Cu,n=0,o=[];for(t=0;t<i;t++)t%4===0&&t&&(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)),n=n<<6|s.indexOf(u.charAt(t));return r=i%4*6,r===0?(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)):r===18?(o.push(n>>10&255),o.push(n>>2&255)):r===12&&o.push(n>>4&255),new Uint8Array(o)}function q0(e){var t="",r=0,u,i,s=e.length,n=Cu;for(u=0;u<s;u++)u%3===0&&u&&(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]),r=(r<<8)+e[u];return i=s%3,i===0?(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]):i===2?(t+=n[r>>10&63],t+=n[r>>4&63],t+=n[r<<2&63],t+=n[64]):i===1&&(t+=n[r>>2&63],t+=n[r<<4&63],t+=n[64],t+=n[64]),t}function J0(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var ta=new K("tag:yaml.org,2002:binary",{kind:"scalar",resolve:K0,construct:z0,predicate:J0,represent:q0}),Z0=Object.prototype.hasOwnProperty,Q0=Object.prototype.toString;function X0(e){if(e===null)return!0;var t=[],r,u,i,s,n,o=e;for(r=0,u=o.length;r<u;r+=1){if(i=o[r],n=!1,Q0.call(i)!=="[object Object]")return!1;for(s in i)if(Z0.call(i,s))if(!n)n=!0;else return!1;if(!n)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function ed(e){return e!==null?e:[]}var ra=new K("tag:yaml.org,2002:omap",{kind:"sequence",resolve:X0,construct:ed}),td=Object.prototype.toString;function rd(e){if(e===null)return!0;var t,r,u,i,s,n=e;for(s=new Array(n.length),t=0,r=n.length;t<r;t+=1){if(u=n[t],td.call(u)!=="[object Object]"||(i=Object.keys(u),i.length!==1))return!1;s[t]=[i[0],u[i[0]]]}return!0}function nd(e){if(e===null)return[];var t,r,u,i,s,n=e;for(s=new Array(n.length),t=0,r=n.length;t<r;t+=1)u=n[t],i=Object.keys(u),s[t]=[i[0],u[i[0]]];return s}var na=new K("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:rd,construct:nd}),ud=Object.prototype.hasOwnProperty;function id(e){if(e===null)return!0;var t,r=e;for(t in r)if(ud.call(r,t)&&r[t]!==null)return!1;return!0}function sd(e){return e!==null?e:{}}var ua=new K("tag:yaml.org,2002:set",{kind:"mapping",resolve:id,construct:sd}),Eu=Jo.extend({implicit:[Xo,ea],explicit:[ta,ra,na,ua]}),Se=Object.prototype.hasOwnProperty,Ar=1,ia=2,sa=3,wr=4,fu=1,od=2,bo=3,ad=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Dd=/[\x85\u2028\u2029]/,ld=/[,\[\]\{\}]/,oa=/^(?:!|!!|![a-z\-]+!)$/i,aa=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function xo(e){return Object.prototype.toString.call(e)}function Fe(e){return e===10||e===13}function He(e){return e===9||e===32}function Q(e){return e===9||e===32||e===10||e===13}function Qe(e){return e===44||e===91||e===93||e===123||e===125}function cd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function hd(e){return e===120?2:e===117?4:e===85?8:0}function fd(e){return 48<=e&&e<=57?e-48:-1}function vo(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
165
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function pd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var Da=new Array(256),la=new Array(256);for(Me=0;Me<256;Me++)Da[Me]=vo(Me)?1:0,la[Me]=vo(Me);var Me;function dd(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Eu,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ca(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=C0(r),new Z(t,r)}function g(e,t){throw ca(e,t)}function br(e,t){e.onWarning&&e.onWarning.call(null,ca(e,t))}var Bo={YAML:function(t,r,u){var i,s,n;t.version!==null&&g(t,"duplication of %YAML directive"),u.length!==1&&g(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(u[0]),i===null&&g(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),n=parseInt(i[2],10),s!==1&&g(t,"unacceptable YAML version of the document"),t.version=u[0],t.checkLineBreaks=n<2,n!==1&&n!==2&&br(t,"unsupported YAML version of the document")},TAG:function(t,r,u){var i,s;u.length!==2&&g(t,"TAG directive accepts exactly two arguments"),i=u[0],s=u[1],oa.test(i)||g(t,"ill-formed tag handle (first argument) of the TAG directive"),Se.call(t.tagMap,i)&&g(t,'there is a previously declared suffix for "'+i+'" tag handle'),aa.test(s)||g(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{g(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s}};function _e(e,t,r,u){var i,s,n,o;if(t<r){if(o=e.input.slice(t,r),u)for(i=0,s=o.length;i<s;i+=1)n=o.charCodeAt(i),n===9||32<=n&&n<=1114111||g(e,"expected valid JSON character");else ad.test(o)&&g(e,"the stream contains non-printable characters");e.result+=o}}function _o(e,t,r,u){var i,s,n,o;for(U.isObject(r)||g(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),n=0,o=i.length;n<o;n+=1)s=i[n],Se.call(t,s)||(t[s]=r[s],u[s]=!0)}function Xe(e,t,r,u,i,s,n,o,a){var D,c;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),D=0,c=i.length;D<c;D+=1)Array.isArray(i[D])&&g(e,"nested arrays are not supported inside keys"),typeof i=="object"&&xo(i[D])==="[object Object]"&&(i[D]="[object Object]");if(typeof i=="object"&&xo(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),u==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(D=0,c=s.length;D<c;D+=1)_o(e,t,s[D],r);else _o(e,t,s,r);else!e.json&&!Se.call(r,i)&&Se.call(t,i)&&(e.line=n||e.line,e.lineStart=o||e.lineStart,e.position=a||e.position,g(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[i]=s,delete r[i];return t}function yu(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):g(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function j(e,t,r){for(var u=0,i=e.input.charCodeAt(e.position);i!==0;){for(;He(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(Fe(i))for(yu(e),i=e.input.charCodeAt(e.position),u++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return r!==-1&&u!==0&&e.lineIndent<r&&br(e,"deficient indentation"),u}function Br(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Q(r)))}function Au(e,t){t===1?e.result+=" ":t>1&&(e.result+=U.repeat(`
166
- `,t-1))}function Fd(e,t,r){var u,i,s,n,o,a,D,c,l=e.kind,h=e.result,f;if(f=e.input.charCodeAt(e.position),Q(f)||Qe(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(i=e.input.charCodeAt(e.position+1),Q(i)||r&&Qe(i)))return!1;for(e.kind="scalar",e.result="",s=n=e.position,o=!1;f!==0;){if(f===58){if(i=e.input.charCodeAt(e.position+1),Q(i)||r&&Qe(i))break}else if(f===35){if(u=e.input.charCodeAt(e.position-1),Q(u))break}else{if(e.position===e.lineStart&&Br(e)||r&&Qe(f))break;if(Fe(f))if(a=e.line,D=e.lineStart,c=e.lineIndent,j(e,!1,-1),e.lineIndent>=t){o=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=n,e.line=a,e.lineStart=D,e.lineIndent=c;break}}o&&(_e(e,s,n,!1),Au(e,e.line-a),s=n=e.position,o=!1),He(f)||(n=e.position+1),f=e.input.charCodeAt(++e.position)}return _e(e,s,n,!1),e.result?!0:(e.kind=l,e.result=h,!1)}function md(e,t){var r,u,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,u=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(_e(e,u,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)u=e.position,e.position++,i=e.position;else return!0;else Fe(r)?(_e(e,u,i,!0),Au(e,j(e,!1,t)),u=i=e.position):e.position===e.lineStart&&Br(e)?g(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);g(e,"unexpected end of the stream within a single quoted scalar")}function gd(e,t){var r,u,i,s,n,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=u=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return _e(e,r,e.position,!0),e.position++,!0;if(o===92){if(_e(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Fe(o))j(e,!1,t);else if(o<256&&Da[o])e.result+=la[o],e.position++;else if((n=hd(o))>0){for(i=n,s=0;i>0;i--)o=e.input.charCodeAt(++e.position),(n=cd(o))>=0?s=(s<<4)+n:g(e,"expected hexadecimal character");e.result+=pd(s),e.position++}else g(e,"unknown escape sequence");r=u=e.position}else Fe(o)?(_e(e,r,u,!0),Au(e,j(e,!1,t)),r=u=e.position):e.position===e.lineStart&&Br(e)?g(e,"unexpected end of the document within a double quoted scalar"):(e.position++,u=e.position)}g(e,"unexpected end of the stream within a double quoted scalar")}function Cd(e,t){var r=!0,u,i,s,n=e.tag,o,a=e.anchor,D,c,l,h,f,p=Object.create(null),y,C,T,_;if(_=e.input.charCodeAt(e.position),_===91)c=93,f=!1,o=[];else if(_===123)c=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),_=e.input.charCodeAt(++e.position);_!==0;){if(j(e,!0,t),_=e.input.charCodeAt(e.position),_===c)return e.position++,e.tag=n,e.anchor=a,e.kind=f?"mapping":"sequence",e.result=o,!0;r?_===44&&g(e,"expected the node content, but found ','"):g(e,"missed comma between flow collection entries"),C=y=T=null,l=h=!1,_===63&&(D=e.input.charCodeAt(e.position+1),Q(D)&&(l=h=!0,e.position++,j(e,!0,t))),u=e.line,i=e.lineStart,s=e.position,et(e,t,Ar,!1,!0),C=e.tag,y=e.result,j(e,!0,t),_=e.input.charCodeAt(e.position),(h||e.line===u)&&_===58&&(l=!0,_=e.input.charCodeAt(++e.position),j(e,!0,t),et(e,t,Ar,!1,!0),T=e.result),f?Xe(e,o,p,C,y,T,u,i,s):l?o.push(Xe(e,null,p,C,y,T,u,i,s)):o.push(y),j(e,!0,t),_=e.input.charCodeAt(e.position),_===44?(r=!0,_=e.input.charCodeAt(++e.position)):r=!1}g(e,"unexpected end of the stream within a flow collection")}function Ed(e,t){var r,u,i=fu,s=!1,n=!1,o=t,a=0,D=!1,c,l;if(l=e.input.charCodeAt(e.position),l===124)u=!1;else if(l===62)u=!0;else return!1;for(e.kind="scalar",e.result="";l!==0;)if(l=e.input.charCodeAt(++e.position),l===43||l===45)fu===i?i=l===43?bo:od:g(e,"repeat of a chomping mode identifier");else if((c=fd(l))>=0)c===0?g(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?g(e,"repeat of an indentation width identifier"):(o=t+c-1,n=!0);else break;if(He(l)){do l=e.input.charCodeAt(++e.position);while(He(l));if(l===35)do l=e.input.charCodeAt(++e.position);while(!Fe(l)&&l!==0)}for(;l!==0;){for(yu(e),e.lineIndent=0,l=e.input.charCodeAt(e.position);(!n||e.lineIndent<o)&&l===32;)e.lineIndent++,l=e.input.charCodeAt(++e.position);if(!n&&e.lineIndent>o&&(o=e.lineIndent),Fe(l)){a++;continue}if(e.lineIndent<o){i===bo?e.result+=U.repeat(`
167
- `,s?1+a:a):i===fu&&s&&(e.result+=`
168
- `);break}for(u?He(l)?(D=!0,e.result+=U.repeat(`
169
- `,s?1+a:a)):D?(D=!1,e.result+=U.repeat(`
170
- `,a+1)):a===0?s&&(e.result+=" "):e.result+=U.repeat(`
171
- `,a):e.result+=U.repeat(`
172
- `,s?1+a:a),s=!0,n=!0,a=0,r=e.position;!Fe(l)&&l!==0;)l=e.input.charCodeAt(++e.position);_e(e,r,e.position,!1)}return!0}function So(e,t){var r,u=e.tag,i=e.anchor,s=[],n,o=!1,a;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),a=e.input.charCodeAt(e.position);a!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,g(e,"tab characters must not be used in indentation")),!(a!==45||(n=e.input.charCodeAt(e.position+1),!Q(n))));){if(o=!0,e.position++,j(e,!0,-1)&&e.lineIndent<=t){s.push(null),a=e.input.charCodeAt(e.position);continue}if(r=e.line,et(e,t,sa,!1,!0),s.push(e.result),j(e,!0,-1),a=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&a!==0)g(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=u,e.anchor=i,e.kind="sequence",e.result=s,!0):!1}function yd(e,t,r){var u,i,s,n,o,a,D=e.tag,c=e.anchor,l={},h=Object.create(null),f=null,p=null,y=null,C=!1,T=!1,_;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),_=e.input.charCodeAt(e.position);_!==0;){if(!C&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,g(e,"tab characters must not be used in indentation")),u=e.input.charCodeAt(e.position+1),s=e.line,(_===63||_===58)&&Q(u))_===63?(C&&(Xe(e,l,h,f,p,null,n,o,a),f=p=y=null),T=!0,C=!0,i=!0):C?(C=!1,i=!0):g(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,_=u;else{if(n=e.line,o=e.lineStart,a=e.position,!et(e,r,ia,!1,!0))break;if(e.line===s){for(_=e.input.charCodeAt(e.position);He(_);)_=e.input.charCodeAt(++e.position);if(_===58)_=e.input.charCodeAt(++e.position),Q(_)||g(e,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(Xe(e,l,h,f,p,null,n,o,a),f=p=y=null),T=!0,C=!1,i=!1,f=e.tag,p=e.result;else if(T)g(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=D,e.anchor=c,!0}else if(T)g(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=D,e.anchor=c,!0}if((e.line===s||e.lineIndent>t)&&(C&&(n=e.line,o=e.lineStart,a=e.position),et(e,t,wr,!0,i)&&(C?p=e.result:y=e.result),C||(Xe(e,l,h,f,p,y,n,o,a),f=p=y=null),j(e,!0,-1),_=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&_!==0)g(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return C&&Xe(e,l,h,f,p,null,n,o,a),T&&(e.tag=D,e.anchor=c,e.kind="mapping",e.result=l),T}function Ad(e){var t,r=!1,u=!1,i,s,n;if(n=e.input.charCodeAt(e.position),n!==33)return!1;if(e.tag!==null&&g(e,"duplication of a tag property"),n=e.input.charCodeAt(++e.position),n===60?(r=!0,n=e.input.charCodeAt(++e.position)):n===33?(u=!0,i="!!",n=e.input.charCodeAt(++e.position)):i="!",t=e.position,r){do n=e.input.charCodeAt(++e.position);while(n!==0&&n!==62);e.position<e.length?(s=e.input.slice(t,e.position),n=e.input.charCodeAt(++e.position)):g(e,"unexpected end of the stream within a verbatim tag")}else{for(;n!==0&&!Q(n);)n===33&&(u?g(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),oa.test(i)||g(e,"named tag handle cannot contain such characters"),u=!0,t=e.position+1)),n=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),ld.test(s)&&g(e,"tag suffix cannot contain flow indicator characters")}s&&!aa.test(s)&&g(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{g(e,"tag name is malformed: "+s)}return r?e.tag=s:Se.call(e.tagMap,i)?e.tag=e.tagMap[i]+s:i==="!"?e.tag="!"+s:i==="!!"?e.tag="tag:yaml.org,2002:"+s:g(e,'undeclared tag handle "'+i+'"'),!0}function wd(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&g(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Q(r)&&!Qe(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&g(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function bd(e){var t,r,u;if(u=e.input.charCodeAt(e.position),u!==42)return!1;for(u=e.input.charCodeAt(++e.position),t=e.position;u!==0&&!Q(u)&&!Qe(u);)u=e.input.charCodeAt(++e.position);return e.position===t&&g(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Se.call(e.anchorMap,r)||g(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],j(e,!0,-1),!0}function et(e,t,r,u,i){var s,n,o,a=1,D=!1,c=!1,l,h,f,p,y,C;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=n=o=wr===r||sa===r,u&&j(e,!0,-1)&&(D=!0,e.lineIndent>t?a=1:e.lineIndent===t?a=0:e.lineIndent<t&&(a=-1)),a===1)for(;Ad(e)||wd(e);)j(e,!0,-1)?(D=!0,o=s,e.lineIndent>t?a=1:e.lineIndent===t?a=0:e.lineIndent<t&&(a=-1)):o=!1;if(o&&(o=D||i),(a===1||wr===r)&&(Ar===r||ia===r?y=t:y=t+1,C=e.position-e.lineStart,a===1?o&&(So(e,C)||yd(e,C,y))||Cd(e,y)?c=!0:(n&&Ed(e,y)||md(e,y)||gd(e,y)?c=!0:bd(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&g(e,"alias node should not have any properties")):Fd(e,y,Ar===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):a===0&&(c=o&&So(e,C))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&g(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,h=e.implicitTypes.length;l<h;l+=1)if(p=e.implicitTypes[l],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Se.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,f=e.typeMap.multi[e.kind||"fallback"],l=0,h=f.length;l<h;l+=1)if(e.tag.slice(0,f[l].tag.length)===f[l].tag){p=f[l];break}p||g(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&g(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):g(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function xd(e){var t=e.position,r,u,i,s=!1,n;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(n=e.input.charCodeAt(e.position))!==0&&(j(e,!0,-1),n=e.input.charCodeAt(e.position),!(e.lineIndent>0||n!==37));){for(s=!0,n=e.input.charCodeAt(++e.position),r=e.position;n!==0&&!Q(n);)n=e.input.charCodeAt(++e.position);for(u=e.input.slice(r,e.position),i=[],u.length<1&&g(e,"directive name must not be less than one character in length");n!==0;){for(;He(n);)n=e.input.charCodeAt(++e.position);if(n===35){do n=e.input.charCodeAt(++e.position);while(n!==0&&!Fe(n));break}if(Fe(n))break;for(r=e.position;n!==0&&!Q(n);)n=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}n!==0&&yu(e),Se.call(Bo,u)?Bo[u](e,u,i):br(e,'unknown document directive "'+u+'"')}if(j(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,j(e,!0,-1)):s&&g(e,"directives end mark is expected"),et(e,e.lineIndent-1,wr,!1,!0),j(e,!0,-1),e.checkLineBreaks&&Dd.test(e.input.slice(t,e.position))&&br(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Br(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,j(e,!0,-1));return}if(e.position<e.length-1)g(e,"end of the stream or a document separator is expected");else return}function ha(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
173
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new dd(e,t),u=e.indexOf("\0");for(u!==-1&&(r.position=u,g(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)xd(r);return r.documents}function vd(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var u=ha(e,r);if(typeof t!="function")return u;for(var i=0,s=u.length;i<s;i+=1)t(u[i])}function Bd(e,t){var r=ha(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Z("expected a single document in the stream, but found more")}}var _d=vd,Sd=Bd,fa={loadAll:_d,load:Sd},pa=Object.prototype.toString,da=Object.prototype.hasOwnProperty,wu=65279,Td=9,St=10,$d=13,kd=32,Od=33,Rd=34,du=35,Id=37,Ld=38,Nd=39,Pd=42,Fa=44,jd=45,xr=58,Md=61,Hd=62,Ud=63,Wd=64,ma=91,ga=93,Vd=96,Ca=123,Gd=124,Ea=125,q={};q[0]="\\0";q[7]="\\a";q[8]="\\b";q[9]="\\t";q[10]="\\n";q[11]="\\v";q[12]="\\f";q[13]="\\r";q[27]="\\e";q[34]='\\"';q[92]="\\\\";q[133]="\\N";q[160]="\\_";q[8232]="\\L";q[8233]="\\P";var Yd=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Kd=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function zd(e,t){var r,u,i,s,n,o,a;if(t===null)return{};for(r={},u=Object.keys(t),i=0,s=u.length;i<s;i+=1)n=u[i],o=String(t[n]),n.slice(0,2)==="!!"&&(n="tag:yaml.org,2002:"+n.slice(2)),a=e.compiledTypeMap.fallback[n],a&&da.call(a.styleAliases,o)&&(o=a.styleAliases[o]),r[n]=o;return r}function qd(e){var t,r,u;if(t=e.toString(16).toUpperCase(),e<=255)r="x",u=2;else if(e<=65535)r="u",u=4;else if(e<=4294967295)r="U",u=8;else throw new Z("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+U.repeat("0",u-t.length)+t}var Jd=1,Tt=2;function Zd(e){this.schema=e.schema||Eu,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=U.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=zd(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Tt:Jd,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function To(e,t){for(var r=U.repeat(" ",t),u=0,i=-1,s="",n,o=e.length;u<o;)i=e.indexOf(`
145
+ `+e.mark.snippet),u+" "+r):u}function Tt(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Wo(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Tt.prototype=Object.create(Error.prototype);Tt.prototype.constructor=Tt;Tt.prototype.toString=function(t){return this.name+": "+Wo(this,t)};var Q=Tt;function yu(e,t,r,u,i){var s="",n="",o=Math.floor(i/2)-1;return u-t>o&&(s=" ... ",t=u-o+s.length),r-u>o&&(n=" ...",r=u+o-n.length),{str:s+e.slice(t,r).replace(/\t/g,"\u2192")+n,pos:u-t+s.length}}function wu(e,t){return W.repeat(" ",t-e.length)+e}function yd(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,u=[0],i=[],s,n=-1;s=r.exec(e.buffer);)i.push(s.index),u.push(s.index+s[0].length),e.position<=s.index&&n<0&&(n=u.length-2);n<0&&(n=u.length-1);var o="",a,l,c=Math.min(e.line+t.linesAfter,i.length).toString().length,D=t.maxLength-(t.indent+c+3);for(a=1;a<=t.linesBefore&&!(n-a<0);a++)l=yu(e.buffer,u[n-a],i[n-a],e.position-(u[n]-u[n-a]),D),o=W.repeat(" ",t.indent)+wu((e.line-a+1).toString(),c)+" | "+l.str+`
146
+ `+o;for(l=yu(e.buffer,u[n],i[n],e.position,D),o+=W.repeat(" ",t.indent)+wu((e.line+1).toString(),c)+" | "+l.str+`
147
+ `,o+=W.repeat("-",t.indent+c+3+l.pos)+`^
148
+ `,a=1;a<=t.linesAfter&&!(n+a>=i.length);a++)l=yu(e.buffer,u[n+a],i[n+a],e.position-(u[n]-u[n+a]),D),o+=W.repeat(" ",t.indent)+wu((e.line+a+1).toString(),c)+" | "+l.str+`
149
+ `;return o.replace(/\n$/,"")}var wd=yd,Ad=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],bd=["scalar","sequence","mapping"];function xd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(u){t[String(u)]=r})}),t}function vd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Ad.indexOf(r)===-1)throw new Q('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=xd(t.styleAliases||null),bd.indexOf(this.kind)===-1)throw new Q('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var z=vd;function Bo(e,t){var r=[];return e[t].forEach(function(u){var i=r.length;r.forEach(function(s,n){s.tag===u.tag&&s.kind===u.kind&&s.multi===u.multi&&(i=n)}),r[i]=u}),r}function Bd(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function u(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(u);return e}function bu(e){return this.extend(e)}bu.prototype.extend=function(t){var r=[],u=[];if(t instanceof z)u.push(t);else if(Array.isArray(t))u=u.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(u=u.concat(t.explicit));else throw new Q("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof z))throw new Q("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Q("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Q("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),u.forEach(function(s){if(!(s instanceof z))throw new Q("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(bu.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(u),i.compiledImplicit=Bo(i,"implicit"),i.compiledExplicit=Bo(i,"explicit"),i.compiledTypeMap=Bd(i.compiledImplicit,i.compiledExplicit),i};var Vo=bu,Go=new z("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Yo=new z("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Ko=new z("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),zo=new Vo({explicit:[Go,Yo,Ko]});function _d(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Sd(){return null}function $d(e){return e===null}var qo=new z("tag:yaml.org,2002:null",{kind:"scalar",resolve:_d,construct:Sd,predicate:$d,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function kd(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Td(e){return e==="true"||e==="True"||e==="TRUE"}function Od(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Jo=new z("tag:yaml.org,2002:bool",{kind:"scalar",resolve:kd,construct:Td,predicate:Od,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Rd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Id(e){return 48<=e&&e<=55}function Ld(e){return 48<=e&&e<=57}function Pd(e){if(e===null)return!1;var t=e.length,r=0,u=!1,i;if(!t)return!1;if(i=e[r],(i==="-"||i==="+")&&(i=e[++r]),i==="0"){if(r+1===t)return!0;if(i=e[++r],i==="b"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;u=!0}return u&&i!=="_"}if(i==="x"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!Rd(e.charCodeAt(r)))return!1;u=!0}return u&&i!=="_"}if(i==="o"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!Id(e.charCodeAt(r)))return!1;u=!0}return u&&i!=="_"}}if(i==="_")return!1;for(;r<t;r++)if(i=e[r],i!=="_"){if(!Ld(e.charCodeAt(r)))return!1;u=!0}return!(!u||i==="_")}function Nd(e){var t=e,r=1,u;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),u=t[0],(u==="-"||u==="+")&&(u==="-"&&(r=-1),t=t.slice(1),u=t[0]),t==="0")return 0;if(u==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function jd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!W.isNegativeZero(e)}var Zo=new z("tag:yaml.org,2002:int",{kind:"scalar",resolve:Pd,construct:Nd,predicate:jd,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Md=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Hd(e){return!(e===null||!Md.test(e)||e[e.length-1]==="_")}function Ud(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var Wd=/^[-+]?[0-9]+e/;function Vd(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(W.isNegativeZero(e))return"-0.0";return r=e.toString(10),Wd.test(r)?r.replace("e",".e"):r}function Gd(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||W.isNegativeZero(e))}var Qo=new z("tag:yaml.org,2002:float",{kind:"scalar",resolve:Hd,construct:Ud,predicate:Gd,represent:Vd,defaultStyle:"lowercase"}),Xo=zo.extend({implicit:[qo,Jo,Zo,Qo]}),ea=Xo,ta=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ra=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Yd(e){return e===null?!1:ta.exec(e)!==null||ra.exec(e)!==null}function Kd(e){var t,r,u,i,s,n,o,a=0,l=null,c,D,h;if(t=ta.exec(e),t===null&&(t=ra.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],u=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,u,i));if(s=+t[4],n=+t[5],o=+t[6],t[7]){for(a=t[7].slice(0,3);a.length<3;)a+="0";a=+a}return t[9]&&(c=+t[10],D=+(t[11]||0),l=(c*60+D)*6e4,t[9]==="-"&&(l=-l)),h=new Date(Date.UTC(r,u,i,s,n,o,a)),l&&h.setTime(h.getTime()-l),h}function zd(e){return e.toISOString()}var na=new z("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Yd,construct:Kd,instanceOf:Date,represent:zd});function qd(e){return e==="<<"||e===null}var ua=new z("tag:yaml.org,2002:merge",{kind:"scalar",resolve:qd}),Su=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
150
+ \r`;function Jd(e){if(e===null)return!1;var t,r,u=0,i=e.length,s=Su;for(r=0;r<i;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;u+=6}return u%8===0}function Zd(e){var t,r,u=e.replace(/[\r\n=]/g,""),i=u.length,s=Su,n=0,o=[];for(t=0;t<i;t++)t%4===0&&t&&(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)),n=n<<6|s.indexOf(u.charAt(t));return r=i%4*6,r===0?(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)):r===18?(o.push(n>>10&255),o.push(n>>2&255)):r===12&&o.push(n>>4&255),new Uint8Array(o)}function Qd(e){var t="",r=0,u,i,s=e.length,n=Su;for(u=0;u<s;u++)u%3===0&&u&&(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]),r=(r<<8)+e[u];return i=s%3,i===0?(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]):i===2?(t+=n[r>>10&63],t+=n[r>>4&63],t+=n[r<<2&63],t+=n[64]):i===1&&(t+=n[r>>2&63],t+=n[r<<4&63],t+=n[64],t+=n[64]),t}function Xd(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var ia=new z("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Jd,construct:Zd,predicate:Xd,represent:Qd}),e0=Object.prototype.hasOwnProperty,t0=Object.prototype.toString;function r0(e){if(e===null)return!0;var t=[],r,u,i,s,n,o=e;for(r=0,u=o.length;r<u;r+=1){if(i=o[r],n=!1,t0.call(i)!=="[object Object]")return!1;for(s in i)if(e0.call(i,s))if(!n)n=!0;else return!1;if(!n)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function n0(e){return e!==null?e:[]}var sa=new z("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r0,construct:n0}),u0=Object.prototype.toString;function i0(e){if(e===null)return!0;var t,r,u,i,s,n=e;for(s=new Array(n.length),t=0,r=n.length;t<r;t+=1){if(u=n[t],u0.call(u)!=="[object Object]"||(i=Object.keys(u),i.length!==1))return!1;s[t]=[i[0],u[i[0]]]}return!0}function s0(e){if(e===null)return[];var t,r,u,i,s,n=e;for(s=new Array(n.length),t=0,r=n.length;t<r;t+=1)u=n[t],i=Object.keys(u),s[t]=[i[0],u[i[0]]];return s}var oa=new z("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i0,construct:s0}),o0=Object.prototype.hasOwnProperty;function a0(e){if(e===null)return!0;var t,r=e;for(t in r)if(o0.call(r,t)&&r[t]!==null)return!1;return!0}function D0(e){return e!==null?e:{}}var aa=new z("tag:yaml.org,2002:set",{kind:"mapping",resolve:a0,construct:D0}),$u=ea.extend({implicit:[na,ua],explicit:[ia,sa,oa,aa]}),Se=Object.prototype.hasOwnProperty,$r=1,Da=2,la=3,kr=4,Au=1,l0=2,_o=3,c0=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h0=/[\x85\u2028\u2029]/,f0=/[,\[\]\{\}]/,ca=/^(?:!|!!|![a-z\-]+!)$/i,ha=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function So(e){return Object.prototype.toString.call(e)}function ge(e){return e===10||e===13}function Ge(e){return e===9||e===32}function ee(e){return e===9||e===32||e===10||e===13}function it(e){return e===44||e===91||e===93||e===123||e===125}function p0(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function d0(e){return e===120?2:e===117?4:e===85?8:0}function m0(e){return 48<=e&&e<=57?e-48:-1}function $o(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
151
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function F0(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var fa=new Array(256),pa=new Array(256);for(Ve=0;Ve<256;Ve++)fa[Ve]=$o(Ve)?1:0,pa[Ve]=$o(Ve);var Ve;function g0(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||$u,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function da(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=wd(r),new Q(t,r)}function g(e,t){throw da(e,t)}function Tr(e,t){e.onWarning&&e.onWarning.call(null,da(e,t))}var ko={YAML:function(t,r,u){var i,s,n;t.version!==null&&g(t,"duplication of %YAML directive"),u.length!==1&&g(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(u[0]),i===null&&g(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),n=parseInt(i[2],10),s!==1&&g(t,"unacceptable YAML version of the document"),t.version=u[0],t.checkLineBreaks=n<2,n!==1&&n!==2&&Tr(t,"unsupported YAML version of the document")},TAG:function(t,r,u){var i,s;u.length!==2&&g(t,"TAG directive accepts exactly two arguments"),i=u[0],s=u[1],ca.test(i)||g(t,"ill-formed tag handle (first argument) of the TAG directive"),Se.call(t.tagMap,i)&&g(t,'there is a previously declared suffix for "'+i+'" tag handle'),ha.test(s)||g(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{g(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s}};function _e(e,t,r,u){var i,s,n,o;if(t<r){if(o=e.input.slice(t,r),u)for(i=0,s=o.length;i<s;i+=1)n=o.charCodeAt(i),n===9||32<=n&&n<=1114111||g(e,"expected valid JSON character");else c0.test(o)&&g(e,"the stream contains non-printable characters");e.result+=o}}function To(e,t,r,u){var i,s,n,o;for(W.isObject(r)||g(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),n=0,o=i.length;n<o;n+=1)s=i[n],Se.call(t,s)||(t[s]=r[s],u[s]=!0)}function st(e,t,r,u,i,s,n,o,a){var l,c;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,c=i.length;l<c;l+=1)Array.isArray(i[l])&&g(e,"nested arrays are not supported inside keys"),typeof i=="object"&&So(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&So(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),u==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,c=s.length;l<c;l+=1)To(e,t,s[l],r);else To(e,t,s,r);else!e.json&&!Se.call(r,i)&&Se.call(t,i)&&(e.line=n||e.line,e.lineStart=o||e.lineStart,e.position=a||e.position,g(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[i]=s,delete r[i];return t}function ku(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):g(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function M(e,t,r){for(var u=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Ge(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(ge(i))for(ku(e),i=e.input.charCodeAt(e.position),u++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return r!==-1&&u!==0&&e.lineIndent<r&&Tr(e,"deficient indentation"),u}function Ir(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||ee(r)))}function Tu(e,t){t===1?e.result+=" ":t>1&&(e.result+=W.repeat(`
152
+ `,t-1))}function C0(e,t,r){var u,i,s,n,o,a,l,c,D=e.kind,h=e.result,f;if(f=e.input.charCodeAt(e.position),ee(f)||it(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(i=e.input.charCodeAt(e.position+1),ee(i)||r&&it(i)))return!1;for(e.kind="scalar",e.result="",s=n=e.position,o=!1;f!==0;){if(f===58){if(i=e.input.charCodeAt(e.position+1),ee(i)||r&&it(i))break}else if(f===35){if(u=e.input.charCodeAt(e.position-1),ee(u))break}else{if(e.position===e.lineStart&&Ir(e)||r&&it(f))break;if(ge(f))if(a=e.line,l=e.lineStart,c=e.lineIndent,M(e,!1,-1),e.lineIndent>=t){o=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=n,e.line=a,e.lineStart=l,e.lineIndent=c;break}}o&&(_e(e,s,n,!1),Tu(e,e.line-a),s=n=e.position,o=!1),Ge(f)||(n=e.position+1),f=e.input.charCodeAt(++e.position)}return _e(e,s,n,!1),e.result?!0:(e.kind=D,e.result=h,!1)}function E0(e,t){var r,u,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,u=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(_e(e,u,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)u=e.position,e.position++,i=e.position;else return!0;else ge(r)?(_e(e,u,i,!0),Tu(e,M(e,!1,t)),u=i=e.position):e.position===e.lineStart&&Ir(e)?g(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);g(e,"unexpected end of the stream within a single quoted scalar")}function y0(e,t){var r,u,i,s,n,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=u=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return _e(e,r,e.position,!0),e.position++,!0;if(o===92){if(_e(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),ge(o))M(e,!1,t);else if(o<256&&fa[o])e.result+=pa[o],e.position++;else if((n=d0(o))>0){for(i=n,s=0;i>0;i--)o=e.input.charCodeAt(++e.position),(n=p0(o))>=0?s=(s<<4)+n:g(e,"expected hexadecimal character");e.result+=F0(s),e.position++}else g(e,"unknown escape sequence");r=u=e.position}else ge(o)?(_e(e,r,u,!0),Tu(e,M(e,!1,t)),r=u=e.position):e.position===e.lineStart&&Ir(e)?g(e,"unexpected end of the document within a double quoted scalar"):(e.position++,u=e.position)}g(e,"unexpected end of the stream within a double quoted scalar")}function w0(e,t){var r=!0,u,i,s,n=e.tag,o,a=e.anchor,l,c,D,h,f,p=Object.create(null),y,C,$,_;if(_=e.input.charCodeAt(e.position),_===91)c=93,f=!1,o=[];else if(_===123)c=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),_=e.input.charCodeAt(++e.position);_!==0;){if(M(e,!0,t),_=e.input.charCodeAt(e.position),_===c)return e.position++,e.tag=n,e.anchor=a,e.kind=f?"mapping":"sequence",e.result=o,!0;r?_===44&&g(e,"expected the node content, but found ','"):g(e,"missed comma between flow collection entries"),C=y=$=null,D=h=!1,_===63&&(l=e.input.charCodeAt(e.position+1),ee(l)&&(D=h=!0,e.position++,M(e,!0,t))),u=e.line,i=e.lineStart,s=e.position,ot(e,t,$r,!1,!0),C=e.tag,y=e.result,M(e,!0,t),_=e.input.charCodeAt(e.position),(h||e.line===u)&&_===58&&(D=!0,_=e.input.charCodeAt(++e.position),M(e,!0,t),ot(e,t,$r,!1,!0),$=e.result),f?st(e,o,p,C,y,$,u,i,s):D?o.push(st(e,null,p,C,y,$,u,i,s)):o.push(y),M(e,!0,t),_=e.input.charCodeAt(e.position),_===44?(r=!0,_=e.input.charCodeAt(++e.position)):r=!1}g(e,"unexpected end of the stream within a flow collection")}function A0(e,t){var r,u,i=Au,s=!1,n=!1,o=t,a=0,l=!1,c,D;if(D=e.input.charCodeAt(e.position),D===124)u=!1;else if(D===62)u=!0;else return!1;for(e.kind="scalar",e.result="";D!==0;)if(D=e.input.charCodeAt(++e.position),D===43||D===45)Au===i?i=D===43?_o:l0:g(e,"repeat of a chomping mode identifier");else if((c=m0(D))>=0)c===0?g(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?g(e,"repeat of an indentation width identifier"):(o=t+c-1,n=!0);else break;if(Ge(D)){do D=e.input.charCodeAt(++e.position);while(Ge(D));if(D===35)do D=e.input.charCodeAt(++e.position);while(!ge(D)&&D!==0)}for(;D!==0;){for(ku(e),e.lineIndent=0,D=e.input.charCodeAt(e.position);(!n||e.lineIndent<o)&&D===32;)e.lineIndent++,D=e.input.charCodeAt(++e.position);if(!n&&e.lineIndent>o&&(o=e.lineIndent),ge(D)){a++;continue}if(e.lineIndent<o){i===_o?e.result+=W.repeat(`
153
+ `,s?1+a:a):i===Au&&s&&(e.result+=`
154
+ `);break}for(u?Ge(D)?(l=!0,e.result+=W.repeat(`
155
+ `,s?1+a:a)):l?(l=!1,e.result+=W.repeat(`
156
+ `,a+1)):a===0?s&&(e.result+=" "):e.result+=W.repeat(`
157
+ `,a):e.result+=W.repeat(`
158
+ `,s?1+a:a),s=!0,n=!0,a=0,r=e.position;!ge(D)&&D!==0;)D=e.input.charCodeAt(++e.position);_e(e,r,e.position,!1)}return!0}function Oo(e,t){var r,u=e.tag,i=e.anchor,s=[],n,o=!1,a;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),a=e.input.charCodeAt(e.position);a!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,g(e,"tab characters must not be used in indentation")),!(a!==45||(n=e.input.charCodeAt(e.position+1),!ee(n))));){if(o=!0,e.position++,M(e,!0,-1)&&e.lineIndent<=t){s.push(null),a=e.input.charCodeAt(e.position);continue}if(r=e.line,ot(e,t,la,!1,!0),s.push(e.result),M(e,!0,-1),a=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&a!==0)g(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=u,e.anchor=i,e.kind="sequence",e.result=s,!0):!1}function b0(e,t,r){var u,i,s,n,o,a,l=e.tag,c=e.anchor,D={},h=Object.create(null),f=null,p=null,y=null,C=!1,$=!1,_;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=D),_=e.input.charCodeAt(e.position);_!==0;){if(!C&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,g(e,"tab characters must not be used in indentation")),u=e.input.charCodeAt(e.position+1),s=e.line,(_===63||_===58)&&ee(u))_===63?(C&&(st(e,D,h,f,p,null,n,o,a),f=p=y=null),$=!0,C=!0,i=!0):C?(C=!1,i=!0):g(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,_=u;else{if(n=e.line,o=e.lineStart,a=e.position,!ot(e,r,Da,!1,!0))break;if(e.line===s){for(_=e.input.charCodeAt(e.position);Ge(_);)_=e.input.charCodeAt(++e.position);if(_===58)_=e.input.charCodeAt(++e.position),ee(_)||g(e,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(st(e,D,h,f,p,null,n,o,a),f=p=y=null),$=!0,C=!1,i=!1,f=e.tag,p=e.result;else if($)g(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=c,!0}else if($)g(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=c,!0}if((e.line===s||e.lineIndent>t)&&(C&&(n=e.line,o=e.lineStart,a=e.position),ot(e,t,kr,!0,i)&&(C?p=e.result:y=e.result),C||(st(e,D,h,f,p,y,n,o,a),f=p=y=null),M(e,!0,-1),_=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&_!==0)g(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return C&&st(e,D,h,f,p,null,n,o,a),$&&(e.tag=l,e.anchor=c,e.kind="mapping",e.result=D),$}function x0(e){var t,r=!1,u=!1,i,s,n;if(n=e.input.charCodeAt(e.position),n!==33)return!1;if(e.tag!==null&&g(e,"duplication of a tag property"),n=e.input.charCodeAt(++e.position),n===60?(r=!0,n=e.input.charCodeAt(++e.position)):n===33?(u=!0,i="!!",n=e.input.charCodeAt(++e.position)):i="!",t=e.position,r){do n=e.input.charCodeAt(++e.position);while(n!==0&&n!==62);e.position<e.length?(s=e.input.slice(t,e.position),n=e.input.charCodeAt(++e.position)):g(e,"unexpected end of the stream within a verbatim tag")}else{for(;n!==0&&!ee(n);)n===33&&(u?g(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),ca.test(i)||g(e,"named tag handle cannot contain such characters"),u=!0,t=e.position+1)),n=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),f0.test(s)&&g(e,"tag suffix cannot contain flow indicator characters")}s&&!ha.test(s)&&g(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{g(e,"tag name is malformed: "+s)}return r?e.tag=s:Se.call(e.tagMap,i)?e.tag=e.tagMap[i]+s:i==="!"?e.tag="!"+s:i==="!!"?e.tag="tag:yaml.org,2002:"+s:g(e,'undeclared tag handle "'+i+'"'),!0}function v0(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&g(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!ee(r)&&!it(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&g(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function B0(e){var t,r,u;if(u=e.input.charCodeAt(e.position),u!==42)return!1;for(u=e.input.charCodeAt(++e.position),t=e.position;u!==0&&!ee(u)&&!it(u);)u=e.input.charCodeAt(++e.position);return e.position===t&&g(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Se.call(e.anchorMap,r)||g(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],M(e,!0,-1),!0}function ot(e,t,r,u,i){var s,n,o,a=1,l=!1,c=!1,D,h,f,p,y,C;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=n=o=kr===r||la===r,u&&M(e,!0,-1)&&(l=!0,e.lineIndent>t?a=1:e.lineIndent===t?a=0:e.lineIndent<t&&(a=-1)),a===1)for(;x0(e)||v0(e);)M(e,!0,-1)?(l=!0,o=s,e.lineIndent>t?a=1:e.lineIndent===t?a=0:e.lineIndent<t&&(a=-1)):o=!1;if(o&&(o=l||i),(a===1||kr===r)&&($r===r||Da===r?y=t:y=t+1,C=e.position-e.lineStart,a===1?o&&(Oo(e,C)||b0(e,C,y))||w0(e,y)?c=!0:(n&&A0(e,y)||E0(e,y)||y0(e,y)?c=!0:B0(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&g(e,"alias node should not have any properties")):C0(e,y,$r===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):a===0&&(c=o&&Oo(e,C))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&g(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),D=0,h=e.implicitTypes.length;D<h;D+=1)if(p=e.implicitTypes[D],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Se.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,f=e.typeMap.multi[e.kind||"fallback"],D=0,h=f.length;D<h;D+=1)if(e.tag.slice(0,f[D].tag.length)===f[D].tag){p=f[D];break}p||g(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&g(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):g(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function _0(e){var t=e.position,r,u,i,s=!1,n;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(n=e.input.charCodeAt(e.position))!==0&&(M(e,!0,-1),n=e.input.charCodeAt(e.position),!(e.lineIndent>0||n!==37));){for(s=!0,n=e.input.charCodeAt(++e.position),r=e.position;n!==0&&!ee(n);)n=e.input.charCodeAt(++e.position);for(u=e.input.slice(r,e.position),i=[],u.length<1&&g(e,"directive name must not be less than one character in length");n!==0;){for(;Ge(n);)n=e.input.charCodeAt(++e.position);if(n===35){do n=e.input.charCodeAt(++e.position);while(n!==0&&!ge(n));break}if(ge(n))break;for(r=e.position;n!==0&&!ee(n);)n=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}n!==0&&ku(e),Se.call(ko,u)?ko[u](e,u,i):Tr(e,'unknown document directive "'+u+'"')}if(M(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,M(e,!0,-1)):s&&g(e,"directives end mark is expected"),ot(e,e.lineIndent-1,kr,!1,!0),M(e,!0,-1),e.checkLineBreaks&&h0.test(e.input.slice(t,e.position))&&Tr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ir(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,M(e,!0,-1));return}if(e.position<e.length-1)g(e,"end of the stream or a document separator is expected");else return}function ma(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
159
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new g0(e,t),u=e.indexOf("\0");for(u!==-1&&(r.position=u,g(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)_0(r);return r.documents}function S0(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var u=ma(e,r);if(typeof t!="function")return u;for(var i=0,s=u.length;i<s;i+=1)t(u[i])}function $0(e,t){var r=ma(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Q("expected a single document in the stream, but found more")}}var k0=S0,T0=$0,Fa={loadAll:k0,load:T0},ga=Object.prototype.toString,Ca=Object.prototype.hasOwnProperty,Ou=65279,O0=9,Ot=10,R0=13,I0=32,L0=33,P0=34,xu=35,N0=37,j0=38,M0=39,H0=42,Ea=44,U0=45,Or=58,W0=61,V0=62,G0=63,Y0=64,ya=91,wa=93,K0=96,Aa=123,z0=124,ba=125,J={};J[0]="\\0";J[7]="\\a";J[8]="\\b";J[9]="\\t";J[10]="\\n";J[11]="\\v";J[12]="\\f";J[13]="\\r";J[27]="\\e";J[34]='\\"';J[92]="\\\\";J[133]="\\N";J[160]="\\_";J[8232]="\\L";J[8233]="\\P";var q0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],J0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Z0(e,t){var r,u,i,s,n,o,a;if(t===null)return{};for(r={},u=Object.keys(t),i=0,s=u.length;i<s;i+=1)n=u[i],o=String(t[n]),n.slice(0,2)==="!!"&&(n="tag:yaml.org,2002:"+n.slice(2)),a=e.compiledTypeMap.fallback[n],a&&Ca.call(a.styleAliases,o)&&(o=a.styleAliases[o]),r[n]=o;return r}function Q0(e){var t,r,u;if(t=e.toString(16).toUpperCase(),e<=255)r="x",u=2;else if(e<=65535)r="u",u=4;else if(e<=4294967295)r="U",u=8;else throw new Q("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+W.repeat("0",u-t.length)+t}var X0=1,Rt=2;function em(e){this.schema=e.schema||$u,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=W.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Z0(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Rt:X0,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ro(e,t){for(var r=W.repeat(" ",t),u=0,i=-1,s="",n,o=e.length;u<o;)i=e.indexOf(`
174
160
  `,u),i===-1?(n=e.slice(u),u=o):(n=e.slice(u,i+1),u=i+1),n.length&&n!==`
175
- `&&(s+=r),s+=n;return s}function Fu(e,t){return`
176
- `+U.repeat(" ",e.indent*t)}function Qd(e,t){var r,u,i;for(r=0,u=e.implicitTypes.length;r<u;r+=1)if(i=e.implicitTypes[r],i.resolve(t))return!0;return!1}function vr(e){return e===kd||e===Td}function $t(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==wu||65536<=e&&e<=1114111}function $o(e){return $t(e)&&e!==wu&&e!==$d&&e!==St}function ko(e,t,r){var u=$o(e),i=u&&!vr(e);return(r?u:u&&e!==Fa&&e!==ma&&e!==ga&&e!==Ca&&e!==Ea)&&e!==du&&!(t===xr&&!i)||$o(t)&&!vr(t)&&e===du||t===xr&&i}function Xd(e){return $t(e)&&e!==wu&&!vr(e)&&e!==jd&&e!==Ud&&e!==xr&&e!==Fa&&e!==ma&&e!==ga&&e!==Ca&&e!==Ea&&e!==du&&e!==Ld&&e!==Pd&&e!==Od&&e!==Gd&&e!==Md&&e!==Hd&&e!==Nd&&e!==Rd&&e!==Id&&e!==Wd&&e!==Vd}function eF(e){return!vr(e)&&e!==xr}function Bt(e,t){var r=e.charCodeAt(t),u;return r>=55296&&r<=56319&&t+1<e.length&&(u=e.charCodeAt(t+1),u>=56320&&u<=57343)?(r-55296)*1024+u-56320+65536:r}function ya(e){var t=/^\n* /;return t.test(e)}var Aa=1,mu=2,wa=3,ba=4,Ze=5;function tF(e,t,r,u,i,s,n,o){var a,D=0,c=null,l=!1,h=!1,f=u!==-1,p=-1,y=Xd(Bt(e,0))&&eF(Bt(e,e.length-1));if(t||n)for(a=0;a<e.length;D>=65536?a+=2:a++){if(D=Bt(e,a),!$t(D))return Ze;y=y&&ko(D,c,o),c=D}else{for(a=0;a<e.length;D>=65536?a+=2:a++){if(D=Bt(e,a),D===St)l=!0,f&&(h=h||a-p-1>u&&e[p+1]!==" ",p=a);else if(!$t(D))return Ze;y=y&&ko(D,c,o),c=D}h=h||f&&a-p-1>u&&e[p+1]!==" "}return!l&&!h?y&&!n&&!i(e)?Aa:s===Tt?Ze:mu:r>9&&ya(e)?Ze:n?s===Tt?Ze:mu:h?ba:wa}function rF(e,t,r,u,i){e.dump=(function(){if(t.length===0)return e.quotingType===Tt?'""':"''";if(!e.noCompatMode&&(Yd.indexOf(t)!==-1||Kd.test(t)))return e.quotingType===Tt?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),n=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),o=u||e.flowLevel>-1&&r>=e.flowLevel;function a(D){return Qd(e,D)}switch(tF(t,o,e.indent,n,a,e.quotingType,e.forceQuotes&&!u,i)){case Aa:return t;case mu:return"'"+t.replace(/'/g,"''")+"'";case wa:return"|"+Oo(t,e.indent)+Ro(To(t,s));case ba:return">"+Oo(t,e.indent)+Ro(To(nF(t,n),s));case Ze:return'"'+uF(t)+'"';default:throw new Z("impossible error: invalid scalar style")}})()}function Oo(e,t){var r=ya(e)?String(t):"",u=e[e.length-1]===`
161
+ `&&(s+=r),s+=n;return s}function vu(e,t){return`
162
+ `+W.repeat(" ",e.indent*t)}function tm(e,t){var r,u,i;for(r=0,u=e.implicitTypes.length;r<u;r+=1)if(i=e.implicitTypes[r],i.resolve(t))return!0;return!1}function Rr(e){return e===I0||e===O0}function It(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ou||65536<=e&&e<=1114111}function Io(e){return It(e)&&e!==Ou&&e!==R0&&e!==Ot}function Lo(e,t,r){var u=Io(e),i=u&&!Rr(e);return(r?u:u&&e!==Ea&&e!==ya&&e!==wa&&e!==Aa&&e!==ba)&&e!==xu&&!(t===Or&&!i)||Io(t)&&!Rr(t)&&e===xu||t===Or&&i}function rm(e){return It(e)&&e!==Ou&&!Rr(e)&&e!==U0&&e!==G0&&e!==Or&&e!==Ea&&e!==ya&&e!==wa&&e!==Aa&&e!==ba&&e!==xu&&e!==j0&&e!==H0&&e!==L0&&e!==z0&&e!==W0&&e!==V0&&e!==M0&&e!==P0&&e!==N0&&e!==Y0&&e!==K0}function nm(e){return!Rr(e)&&e!==Or}function kt(e,t){var r=e.charCodeAt(t),u;return r>=55296&&r<=56319&&t+1<e.length&&(u=e.charCodeAt(t+1),u>=56320&&u<=57343)?(r-55296)*1024+u-56320+65536:r}function xa(e){var t=/^\n* /;return t.test(e)}var va=1,Bu=2,Ba=3,_a=4,ut=5;function um(e,t,r,u,i,s,n,o){var a,l=0,c=null,D=!1,h=!1,f=u!==-1,p=-1,y=rm(kt(e,0))&&nm(kt(e,e.length-1));if(t||n)for(a=0;a<e.length;l>=65536?a+=2:a++){if(l=kt(e,a),!It(l))return ut;y=y&&Lo(l,c,o),c=l}else{for(a=0;a<e.length;l>=65536?a+=2:a++){if(l=kt(e,a),l===Ot)D=!0,f&&(h=h||a-p-1>u&&e[p+1]!==" ",p=a);else if(!It(l))return ut;y=y&&Lo(l,c,o),c=l}h=h||f&&a-p-1>u&&e[p+1]!==" "}return!D&&!h?y&&!n&&!i(e)?va:s===Rt?ut:Bu:r>9&&xa(e)?ut:n?s===Rt?ut:Bu:h?_a:Ba}function im(e,t,r,u,i){e.dump=(function(){if(t.length===0)return e.quotingType===Rt?'""':"''";if(!e.noCompatMode&&(q0.indexOf(t)!==-1||J0.test(t)))return e.quotingType===Rt?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),n=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),o=u||e.flowLevel>-1&&r>=e.flowLevel;function a(l){return tm(e,l)}switch(um(t,o,e.indent,n,a,e.quotingType,e.forceQuotes&&!u,i)){case va:return t;case Bu:return"'"+t.replace(/'/g,"''")+"'";case Ba:return"|"+Po(t,e.indent)+No(Ro(t,s));case _a:return">"+Po(t,e.indent)+No(Ro(sm(t,n),s));case ut:return'"'+om(t)+'"';default:throw new Q("impossible error: invalid scalar style")}})()}function Po(e,t){var r=xa(e)?String(t):"",u=e[e.length-1]===`
177
163
  `,i=u&&(e[e.length-2]===`
178
164
  `||e===`
179
165
  `),s=i?"+":u?"":"-";return r+s+`
180
- `}function Ro(e){return e[e.length-1]===`
181
- `?e.slice(0,-1):e}function nF(e,t){for(var r=/(\n+)([^\n]*)/g,u=(function(){var D=e.indexOf(`
182
- `);return D=D!==-1?D:e.length,r.lastIndex=D,Io(e.slice(0,D),t)})(),i=e[0]===`
166
+ `}function No(e){return e[e.length-1]===`
167
+ `?e.slice(0,-1):e}function sm(e,t){for(var r=/(\n+)([^\n]*)/g,u=(function(){var l=e.indexOf(`
168
+ `);return l=l!==-1?l:e.length,r.lastIndex=l,jo(e.slice(0,l),t)})(),i=e[0]===`
183
169
  `||e[0]===" ",s,n;n=r.exec(e);){var o=n[1],a=n[2];s=a[0]===" ",u+=o+(!i&&!s&&a!==""?`
184
- `:"")+Io(a,t),i=s}return u}function Io(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,u,i=0,s,n=0,o=0,a="";u=r.exec(e);)o=u.index,o-i>t&&(s=n>i?n:o,a+=`
170
+ `:"")+jo(a,t),i=s}return u}function jo(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,u,i=0,s,n=0,o=0,a="";u=r.exec(e);)o=u.index,o-i>t&&(s=n>i?n:o,a+=`
185
171
  `+e.slice(i,s),i=s+1),n=o;return a+=`
186
172
  `,e.length-i>t&&n>i?a+=e.slice(i,n)+`
187
- `+e.slice(n+1):a+=e.slice(i),a.slice(1)}function uF(e){for(var t="",r=0,u,i=0;i<e.length;r>=65536?i+=2:i++)r=Bt(e,i),u=q[r],!u&&$t(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=u||qd(r);return t}function iF(e,t,r){var u="",i=e.tag,s,n,o;for(s=0,n=r.length;s<n;s+=1)o=r[s],e.replacer&&(o=e.replacer.call(r,String(s),o)),(Ee(e,t,o,!1,!1)||typeof o>"u"&&Ee(e,t,null,!1,!1))&&(u!==""&&(u+=","+(e.condenseFlow?"":" ")),u+=e.dump);e.tag=i,e.dump="["+u+"]"}function Lo(e,t,r,u){var i="",s=e.tag,n,o,a;for(n=0,o=r.length;n<o;n+=1)a=r[n],e.replacer&&(a=e.replacer.call(r,String(n),a)),(Ee(e,t+1,a,!0,!0,!1,!0)||typeof a>"u"&&Ee(e,t+1,null,!0,!0,!1,!0))&&((!u||i!=="")&&(i+=Fu(e,t)),e.dump&&St===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function sF(e,t,r){var u="",i=e.tag,s=Object.keys(r),n,o,a,D,c;for(n=0,o=s.length;n<o;n+=1)c="",u!==""&&(c+=", "),e.condenseFlow&&(c+='"'),a=s[n],D=r[a],e.replacer&&(D=e.replacer.call(r,a,D)),Ee(e,t,a,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ee(e,t,D,!1,!1)&&(c+=e.dump,u+=c));e.tag=i,e.dump="{"+u+"}"}function oF(e,t,r,u){var i="",s=e.tag,n=Object.keys(r),o,a,D,c,l,h;if(e.sortKeys===!0)n.sort();else if(typeof e.sortKeys=="function")n.sort(e.sortKeys);else if(e.sortKeys)throw new Z("sortKeys must be a boolean or a function");for(o=0,a=n.length;o<a;o+=1)h="",(!u||i!=="")&&(h+=Fu(e,t)),D=n[o],c=r[D],e.replacer&&(c=e.replacer.call(r,D,c)),Ee(e,t+1,D,!0,!0,!0)&&(l=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,l&&(e.dump&&St===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,l&&(h+=Fu(e,t)),Ee(e,t+1,c,!0,l)&&(e.dump&&St===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,i+=h));e.tag=s,e.dump=i||"{}"}function No(e,t,r){var u,i,s,n,o,a;for(i=r?e.explicitTypes:e.implicitTypes,s=0,n=i.length;s<n;s+=1)if(o=i[s],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(a=e.styleMap[o.tag]||o.defaultStyle,pa.call(o.represent)==="[object Function]")u=o.represent(t,a);else if(da.call(o.represent,a))u=o.represent[a](t,a);else throw new Z("!<"+o.tag+'> tag resolver accepts not "'+a+'" style');e.dump=u}return!0}return!1}function Ee(e,t,r,u,i,s,n){e.tag=null,e.dump=r,No(e,r,!1)||No(e,r,!0);var o=pa.call(e.dump),a=u,D;u&&(u=e.flowLevel<0||e.flowLevel>t);var c=o==="[object Object]"||o==="[object Array]",l,h;if(c&&(l=e.duplicates.indexOf(r),h=l!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&t>0)&&(i=!1),h&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(c&&h&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),o==="[object Object]")u&&Object.keys(e.dump).length!==0?(oF(e,t,e.dump,i),h&&(e.dump="&ref_"+l+e.dump)):(sF(e,t,e.dump),h&&(e.dump="&ref_"+l+" "+e.dump));else if(o==="[object Array]")u&&e.dump.length!==0?(e.noArrayIndent&&!n&&t>0?Lo(e,t-1,e.dump,i):Lo(e,t,e.dump,i),h&&(e.dump="&ref_"+l+e.dump)):(iF(e,t,e.dump),h&&(e.dump="&ref_"+l+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&rF(e,e.dump,t,s,a);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Z("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(D=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?D="!"+D:D.slice(0,18)==="tag:yaml.org,2002:"?D="!!"+D.slice(18):D="!<"+D+">",e.dump=D+" "+e.dump)}return!0}function aF(e,t){var r=[],u=[],i,s;for(gu(e,r,u),i=0,s=u.length;i<s;i+=1)t.duplicates.push(r[u[i]]);t.usedDuplicates=new Array(s)}function gu(e,t,r){var u,i,s;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,s=e.length;i<s;i+=1)gu(e[i],t,r);else for(u=Object.keys(e),i=0,s=u.length;i<s;i+=1)gu(e[u[i]],t,r)}function DF(e,t){t=t||{};var r=new Zd(t);r.noRefs||aF(e,r);var u=e;return r.replacer&&(u=r.replacer.call({"":u},"",u)),Ee(r,0,u,!0,!0)?r.dump+`
188
- `:""}var lF=DF,cF={dump:lF};function bu(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var hF=K,fF=Mo,pF=Vo,dF=qo,FF=Jo,mF=Eu,gF=fa.load,CF=fa.loadAll,EF=cF.dump,yF=Z,AF={binary:ta,float:zo,map:Wo,null:Go,pairs:na,set:ua,timestamp:Xo,bool:Yo,int:Ko,merge:ea,omap:ra,seq:Uo,str:Ho},wF=bu("safeLoad","load"),bF=bu("safeLoadAll","loadAll"),xF=bu("safeDump","dump"),vF={Type:hF,Schema:fF,FAILSAFE_SCHEMA:pF,JSON_SCHEMA:dF,CORE_SCHEMA:FF,DEFAULT_SCHEMA:mF,load:gF,loadAll:CF,dump:EF,YAMLException:yF,types:AF,safeLoad:wF,safeLoadAll:bF,safeDump:xF},_r=vF;var Rt=Nt(tD(),1);import{readFileSync as wm,writeFileSync as hD,existsSync as Hr,mkdirSync as bm}from"fs";import{dirname as xm}from"path";import{existsSync as Mu,mkdirSync as FD,readFileSync as km,writeFileSync as Om}from"fs";import{homedir as Rm}from"os";import{join as Ou,dirname as mD,isAbsolute as jE,relative as ME,sep as HE}from"path";var I=em();function tm(){let e=process.platform;if(e==="win32"){let t=process.env.APPDATA||b(I,"AppData","Roaming");return{appSupport:t,vscodePath:b(t,"Code","User"),gooseConfigPath:b(t,"Block","goose","config","config.yaml")}}else{if(e==="darwin")return{appSupport:b(I,"Library","Application Support"),vscodePath:b(I,"Library","Application Support","Code","User"),gooseConfigPath:b(I,".config","goose","config.yaml")};{let t=process.env.XDG_CONFIG_HOME||b(I,".config");return{appSupport:t,vscodePath:b(t,"Code","User"),gooseConfigPath:b(t,"goose","config.yaml")}}}}var{appSupport:rt,vscodePath:ku,gooseConfigPath:rD}=tm(),rm=b(I,".gemini","config","mcp_config.json"),nD=b(process.env.CLINE_DIR||b(I,".cline"),"data","settings","cline_mcp_settings.json"),uD=b(ku,"globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),iD=b(process.env.XDG_CONFIG_HOME||b(I,".copilot"),"mcp-config.json"),nm=b(I,".codeium","windsurf","mcp_config.json");function DD(e){let t={};return e.type&&(t.type=e.type),e.url&&(t.url=e.url),e.headers&&Object.keys(e.headers).length>0&&(t.headers=e.headers),typeof e.timeout=="number"&&(t.timeout=e.timeout),t}function Ru(e){let t={command:e.command,args:e.args||[]};return e.env&&Object.keys(e.env).length>0&&(t.env=e.env),t}function Lr(e,t){return t.url?DD(t):Ru(t)}function um(e,t){if(!t.url)return Ru(t);let r=DD(t);return t.oauthScopes&&t.oauthScopes.length>0&&(r.oauth={scopes:t.oauthScopes}),r}function im(e,t){if(t.url){let r=t.type==="sse"?"sse":"streamable_http";return{name:e,description:"",type:r,uri:t.url,headers:t.headers||{},enabled:!0,timeout:300}}return{name:e,description:"",cmd:t.command,args:t.args||[],enabled:!0,envs:t.env||{},type:"stdio",timeout:300}}function sm(e,t){return t.url?{source:"custom",type:t.type||"http",url:t.url,headers:t.headers||{}}:{source:"custom",command:t.command,args:t.args||[],env:t.env||{}}}function om(e,t){return t.url?{type:"remote",url:t.url,enabled:!0,headers:t.headers}:{type:"local",command:[t.command,...t.args||[]],enabled:!0,environment:t.env||{}}}function sD(e,t){return t?t.length===0?(e.default_tools_approval_mode="approve",e):(e.tools=Object.fromEntries(t.map(r=>[r,{approval_mode:"approve"}])),e):e}function am(e,t){if(t.url){let r={type:t.type||"http",url:t.url};return t.headers&&Object.keys(t.headers).length>0&&(r.http_headers=t.headers),sD(r,t.autoApproveTools)}return sD({command:t.command,args:t.args||[],env:t.env},t.autoApproveTools)}function Dm(e,t){if(t.url){let r={url:t.url};return t.headers&&Object.keys(t.headers).length>0&&(r.headers=t.headers),t.oauthScopes&&t.oauthScopes.length>0&&(r.auth={scopes:t.oauthScopes}),r}return Ru(t)}function oD(e,t){if(t.url){let u={url:t.url,type:t.type==="sse"?"sse":"streamableHttp",disabled:!1};return t.headers&&Object.keys(t.headers).length>0&&(u.headers=t.headers),u}let r={command:t.command,args:t.args||[],disabled:!1};return t.env&&Object.keys(t.env).length>0&&(r.env=t.env),r}function aD(e,t){if(t.url){let u={serverUrl:t.url};return t.headers&&Object.keys(t.headers).length>0&&(u.headers=t.headers),u}let r={command:t.command,args:t.args||[]};return t.env&&Object.keys(t.env).length>0&&(r.env=t.env),r}function lm(e,t,r){if(r?.local)return t;if(t.url){let i={type:t.type||"http",url:t.url,tools:["*"]};return t.headers&&Object.keys(t.headers).length>0&&(i.headers=t.headers),i}let u={type:"stdio",command:t.command,args:t.args||[],tools:["*"]};return t.env&&Object.keys(t.env).length>0&&(u.env=t.env),u}function cm(e,t){if(t.local&&e.localConfigPath)return b(t.cwd,e.localConfigPath);let r=e.configPath,u=b(Nr(r),"mcporter.jsonc");return G(r)?r:G(u)?u:r}var N={antigravity:{name:"antigravity",displayName:"Antigravity",configPath:rm,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>G(b(I,".gemini","config")),transformConfig:aD},cline:{name:"cline",displayName:"Cline VSCode Extension",configPath:uD,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>G(Nr(uD)),transformConfig:oD},"cline-cli":{name:"cline-cli",displayName:"Cline CLI",configPath:nD,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>G(Nr(nD)),transformConfig:oD},"claude-code":{name:"claude-code",displayName:"Claude Code",configPath:b(I,".claude.json"),localConfigPath:".mcp.json",projectDetectPaths:[".mcp.json",".claude"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["timeout","autoApprove"],detectGlobalInstall:async()=>G(b(I,".claude")),transformConfig:Lr},"claude-desktop":{name:"claude-desktop",displayName:"Claude Desktop",configPath:b(rt,"Claude","claude_desktop_config.json"),projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio"],supportedFields:[],unsupportedTransportMessage:"Claude Desktop only supports local (stdio) servers via its config file. Add remote servers through Settings \u2192 Connectors in the app instead.",detectGlobalInstall:async()=>G(b(rt,"Claude")),transformConfig:Lr},codex:{name:"codex",displayName:"Codex",configPath:b(process.env.CODEX_HOME||b(I,".codex"),"config.toml"),localConfigPath:".codex/config.toml",projectDetectPaths:[".codex"],configKey:"mcp_servers",format:"toml",supportedTransports:["stdio","http","sse"],supportedFields:["autoApprove"],detectGlobalInstall:async()=>G(b(I,".codex")),transformConfig:am},cursor:{name:"cursor",displayName:"Cursor",configPath:b(I,".cursor","mcp.json"),localConfigPath:".cursor/mcp.json",projectDetectPaths:[".cursor"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["scopes"],detectGlobalInstall:async()=>G(b(I,".cursor")),transformConfig:Dm},"gemini-cli":{name:"gemini-cli",displayName:"Gemini CLI",configPath:b(I,".gemini","settings.json"),localConfigPath:".gemini/settings.json",projectDetectPaths:[".gemini"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["timeout","scopes"],detectGlobalInstall:async()=>G(b(I,".gemini")),transformConfig:um},goose:{name:"goose",displayName:"Goose",configPath:rD,projectDetectPaths:[],configKey:"extensions",format:"yaml",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>G(rD),transformConfig:im},"github-copilot-cli":{name:"github-copilot-cli",displayName:"GitHub Copilot CLI",configPath:iD,localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"mcpServers",localConfigKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>G(Nr(iD)),transformConfig:lm},mcporter:{name:"mcporter",displayName:"MCPorter",configPath:b(I,".mcporter","mcporter.json"),localConfigPath:"config/mcporter.json",projectDetectPaths:["config/mcporter.json"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>G(b(I,".mcporter")),resolveConfigPath:cm,transformConfig:Lr},opencode:{name:"opencode",displayName:"OpenCode",configPath:b(I,".config","opencode","opencode.json"),localConfigPath:"opencode.json",projectDetectPaths:["opencode.json",".opencode"],configKey:"mcp",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>G(b(I,".config","opencode")),transformConfig:om},vscode:{name:"vscode",displayName:"VS Code",configPath:b(ku,"mcp.json"),localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>G(ku),transformConfig:Lr},windsurf:{name:"windsurf",displayName:"Windsurf",configPath:nm,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>G(b(I,".codeium","windsurf")),transformConfig:aD},zed:{name:"zed",displayName:"Zed",configPath:process.platform==="darwin"||process.platform==="win32"?b(rt,"Zed","settings.json"):b(rt,"zed","settings.json"),localConfigPath:".zed/settings.json",projectDetectPaths:[".zed"],configKey:"context_servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>{let e=process.platform==="darwin"||process.platform==="win32"?b(rt,"Zed"):b(rt,"zed");return G(e)},transformConfig:sm}};function nt(){return Object.keys(N)}function Iu(e){let t=e||process.cwd(),r=[];for(let[u,i]of Object.entries(N))if(i.localConfigPath){for(let s of i.projectDetectPaths)if(G(b(t,s))){r.push(u);break}}return r}async function Lu(){let e=[];for(let[t,r]of Object.entries(N))await r.detectGlobalInstall()&&e.push(t);return e}function Ur(e,t){let r={...e};for(let u in t){let i=t[u],s=r[u];i&&typeof i=="object"&&!Array.isArray(i)?r[u]=Ur(s&&typeof s=="object"?s:{},i):r[u]=i}return r}function Wr(e,t){let r=t.split("."),u=e;for(let i of r)if(u&&typeof u=="object"&&i in u)u=u[i];else return;return u}function lD(e){let t=null;return Ao(e,{onObjectProperty:(r,u,i,s,n)=>{if(t===null&&s>0&&n>0){let o=e.lastIndexOf(`
189
- `,u-1)+1,a=e.slice(o,u);t={tabSize:n,insertSpaces:!a.includes(" ")}}}}),t||{tabSize:2,insertSpaces:!0}}function pm(e){if(!jr(e))return{};let t=Nu(e,"utf-8");return yr(t)}function dm(e,t,r){let u=fm(e);jr(u)||hm(u,{recursive:!0});let i="",s={};jr(e)&&(i=Nu(e,"utf-8"),s=yr(i));let n=Ur(s,t);if(i)try{let o=r.split("."),a=Wr(n,r),D=Du(i,o,a,{formattingOptions:lD(i)}),c=lu(i,D);Pr(e,c);return}catch{}Pr(e,JSON.stringify(n,null,2))}function Fm(e,t,r){if(!jr(e))return;let u=Nu(e,"utf-8"),i=t.split(".");try{let o=Du(u,[...i,r],void 0,{formattingOptions:lD(u)}),a=lu(u,o);Pr(e,a);return}catch{}let s=yr(u),n=Wr(s,t);n&&typeof n=="object"&&r in n&&delete n[r],Pr(e,JSON.stringify(s,null,2))}function mm(e,t,r){let u=t.split("."),i=u.pop();if(!i)return;let s=e;for(let n of u)(!s[n]||typeof s[n]!="object")&&(s[n]={}),s=s[n];s[i]=r}function Pu(e){if(!Mr(e))return{};let t=gm(e,"utf-8");return _r.load(t)||{}}function ym(e,t,r){if(!Mr(e))return;let u=Pu(e),i=t.split("."),s=u;for(let o of i)if(s&&typeof s=="object"&&o in s)s=s[o];else return;s&&typeof s=="object"&&r in s&&delete s[r];let n=_r.dump(u,{indent:2,lineWidth:-1,noRefs:!0});cD(e,n)}function Am(e,t){let r=Em(e);Mr(r)||Cm(r,{recursive:!0});let u={};Mr(e)&&(u=Pu(e));let i=Ur(u,t),s=_r.dump(i,{indent:2,lineWidth:-1,noRefs:!0});cD(e,s)}function ju(e){if(!Hr(e))return{};let t=wm(e,"utf-8");return Rt.parse(t)}function vm(e,t,r){if(!Hr(e))return;let u=ju(e),i=t.split("."),s=u;for(let o of i)if(s&&typeof s=="object"&&o in s)s=s[o];else return;s&&typeof s=="object"&&r in s&&delete s[r];let n=Rt.stringify(u);hD(e,n)}function Bm(e,t){let r=xm(e);Hr(r)||bm(r,{recursive:!0});let u={};Hr(e)&&(u=ju(e));let i=Ur(u,t),s=Rt.stringify(i);hD(e,s)}function fD(e,t){switch(t){case"json":return pm(e);case"yaml":return Pu(e);case"toml":return ju(e);default:throw new Error(`Unsupported config format: ${t}`)}}function pD(e,t,r,u){switch(t){case"json":Fm(e,r,u);break;case"yaml":ym(e,r,u);break;case"toml":vm(e,r,u);break;default:throw new Error(`Unsupported config format: ${t}`)}}function _m(e,t,r,u){switch(r){case"json":dm(e,t,u);break;case"yaml":Am(e,t);break;case"toml":Bm(e,t);break;default:throw new Error(`Unsupported config format: ${r}`)}}function Sm(e,t,r){let u={},i={};return i[t]=r,mm(u,e,i),u}var dD={timeout:{label:"request timeout",isSet:e=>typeof e.timeout=="number",clear:e=>{delete e.timeout}},scopes:{label:"OAuth scopes",isSet:e=>Array.isArray(e.oauthScopes)&&e.oauthScopes.length>0,clear:e=>{delete e.oauthScopes}},autoApprove:{label:"tool auto-approval",isSet:e=>Array.isArray(e.autoApproveTools),clear:e=>{delete e.autoApproveTools}}},Tm=Object.keys(dD);function $m(e,t){let r=new Set(t),u={...e};u.oauthScopes&&(u.oauthScopes=[...u.oauthScopes]),u.autoApproveTools&&(u.autoApproveTools=[...u.autoApproveTools]);let i=[];for(let s of Tm){let n=dD[s];n.isSet(u)&&!r.has(s)&&(n.clear(u),i.push(s))}return{config:u,dropped:i}}var Im=Rm();function Lm(e){if(!Mu(e))return{};let t=JSON.parse(km(e,"utf-8"));return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function Nm(e,t){let r=mD(e);Mu(r)||FD(r,{recursive:!0}),Om(e,`${JSON.stringify(t,null,2)}
190
- `,"utf-8")}function Pm(e,t){let r=Array.isArray(e)?e.filter(u=>typeof u=="string"):[];for(let u of t)r.includes(u)||r.push(u);return r}function jm(e,t){return t.length===0?[`mcp__${e}`]:t.map(r=>`mcp__${e}__${r}`)}function Mm(e={}){let t=!!e.local,r=e.cwd||process.cwd();return t?Ou(r,".claude","settings.local.json"):Ou(Im,".claude","settings.json")}function Hm(e,t,r={}){let u=Mm(r);try{let i=Lm(u),s=i.permissions&&typeof i.permissions=="object"&&!Array.isArray(i.permissions)?i.permissions:{};return s.allow=Pm(s.allow,jm(e,t)),i.permissions=s,Nm(u,i),{success:!0,path:u}}catch(i){return{success:!1,path:u,error:i instanceof Error?i.message:"Unknown error"}}}function Vr(e,t={}){let r=!!t.local,u=t.cwd||process.cwd();return e.resolveConfigPath?e.resolveConfigPath(e,{local:r,cwd:u}):r&&e.localConfigPath?Ou(u,e.localConfigPath):e.configPath}function Hu(e,t={}){return t.local&&e.localConfigKey?e.localConfigKey:e.configKey}function gD(e,t,r,u={}){let i=N[r],s=Vr(i,u);try{let n=mD(s);Mu(n)||FD(n,{recursive:!0});let{config:o,dropped:a}=$m(t,i.supportedFields),D=i.transformConfig(e,o,{local:!!u.local}),c=Hu(i,u),l=Sm(c,e,D);_m(s,l,i.format,c);let h=[];if(r==="claude-code"&&o.autoApproveTools){let f=Hm(e,o.autoApproveTools,u);if(!f.success)return{success:!1,path:f.path,error:f.error};h.push(f.path)}return{success:!0,path:s,...a.length>0?{droppedFields:a}:{},...h.length>0?{extraPaths:h}:{}}}catch(n){return{success:!1,path:s,error:n instanceof Error?n.message:"Unknown error"}}}import{existsSync as Um}from"fs";function Wm(e){return Object.prototype.hasOwnProperty.call(N,e)}function CD(e,t){return Wm(e)?t&&!N[e].localConfigPath?`${e} does not support project-level config`:null:`Unknown agent type: ${String(e)}`}function ED(e,t,r,u={}){let i=CD(e,u.local);return i?{success:!1,path:"",error:i}:gD(t,r,e,u)}function Vm(e,t){return!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.hasOwnProperty.call(e,t)}function Gm(e,t,r){let u=N[e],i=Vr(u,r),s=Hu(u,r);if(!Um(i))return{success:!0,path:i,removed:!1};let n=fD(i,u.format);return Vm(Wr(n,s),t)?(pD(i,u.format,s,t),{success:!0,path:i,removed:!0}):{success:!0,path:i,removed:!1}}function yD(e,t,r={}){let u=CD(e,r.local);if(u)return{success:!1,path:"",removed:!1,error:u};let i=e;try{return Gm(i,t,r)}catch(s){return{success:!1,path:Vr(N[i],r),removed:!1,error:s instanceof Error?s.message:"Unknown error"}}}var Ym="https://shaders.com/mcp",Uu="shaders",Vu="https://shaders.com/docs/guide/mcp";function Wu(e){return N[e].supportedTransports.includes("http")}function It(){return nt().filter(Wu)}function AD(e,{requireHttp:t}){let r=new Set(nt()),u=t?It():nt(),i=new Set(u);for(let s of e)if(r.has(s)||he(`Unknown agent "${s}". Supported agents: ${u.join(", ")}`),!i.has(s)){let n=N[s];he(`${n.displayName}: ${n.unsupportedTransportMessage??"this agent does not support remote (HTTP) MCP servers."}`)}return e}async function Km(e,t){if(e.agents.length>0)return{targets:AD(e.agents,{requireHttp:!0}),scope:e.global?"global":"project"};let r=e.global?[]:Iu(t).filter(Wu),u=e.global||r.length===0?"global":"project",i=u==="project"?r:(await Lu()).filter(Wu);if(!(!e.yes&&process.stdout.isTTY&&process.stdin.isTTY))return i.length===0&&he(`No coding agents detected. Pass one explicitly, e.g. npx shaders install-mcp -a cursor
191
- Supported agents: ${It().join(", ")}`),{targets:i,scope:u};let n=await uu({message:`Install the Shaders MCP server to which agents? (${u} config)`,options:It().map(o=>({value:o,label:N[o].displayName,hint:u==="project"&&N[o].localConfigPath?N[o].localConfigPath:N[o].configPath.replace(/^\/Users\/[^/]+|^\/home\/[^/]+|^C:\\Users\\[^\\]+/,"~")})),initialValues:i,required:!0});return At(n)&&(console.log("Cancelled \u2014 nothing was changed."),process.exit(0)),{targets:n,scope:u}}async function wD(e){let t=process.cwd(),{targets:r,scope:u}=await Km(e,t),i=0;for(let s of r){let n=u==="project"&&!!N[s].localConfigPath,o=ED(s,Uu,{type:"http",url:Ym},{local:n,cwd:t});o.success?console.log(`\u2713 ${N[s].displayName} \u2014 ${o.path}`):(i++,console.error(`\u2717 ${N[s].displayName} \u2014 ${o.error}`))}i===r.length&&process.exit(1),console.log(`
192
- Done! Open your agent and connect to the "${Uu}" MCP server \u2014 you'll be
173
+ `+e.slice(n+1):a+=e.slice(i),a.slice(1)}function om(e){for(var t="",r=0,u,i=0;i<e.length;r>=65536?i+=2:i++)r=kt(e,i),u=J[r],!u&&It(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=u||Q0(r);return t}function am(e,t,r){var u="",i=e.tag,s,n,o;for(s=0,n=r.length;s<n;s+=1)o=r[s],e.replacer&&(o=e.replacer.call(r,String(s),o)),(we(e,t,o,!1,!1)||typeof o>"u"&&we(e,t,null,!1,!1))&&(u!==""&&(u+=","+(e.condenseFlow?"":" ")),u+=e.dump);e.tag=i,e.dump="["+u+"]"}function Mo(e,t,r,u){var i="",s=e.tag,n,o,a;for(n=0,o=r.length;n<o;n+=1)a=r[n],e.replacer&&(a=e.replacer.call(r,String(n),a)),(we(e,t+1,a,!0,!0,!1,!0)||typeof a>"u"&&we(e,t+1,null,!0,!0,!1,!0))&&((!u||i!=="")&&(i+=vu(e,t)),e.dump&&Ot===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function Dm(e,t,r){var u="",i=e.tag,s=Object.keys(r),n,o,a,l,c;for(n=0,o=s.length;n<o;n+=1)c="",u!==""&&(c+=", "),e.condenseFlow&&(c+='"'),a=s[n],l=r[a],e.replacer&&(l=e.replacer.call(r,a,l)),we(e,t,a,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),we(e,t,l,!1,!1)&&(c+=e.dump,u+=c));e.tag=i,e.dump="{"+u+"}"}function lm(e,t,r,u){var i="",s=e.tag,n=Object.keys(r),o,a,l,c,D,h;if(e.sortKeys===!0)n.sort();else if(typeof e.sortKeys=="function")n.sort(e.sortKeys);else if(e.sortKeys)throw new Q("sortKeys must be a boolean or a function");for(o=0,a=n.length;o<a;o+=1)h="",(!u||i!=="")&&(h+=vu(e,t)),l=n[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),we(e,t+1,l,!0,!0,!0)&&(D=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,D&&(e.dump&&Ot===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,D&&(h+=vu(e,t)),we(e,t+1,c,!0,D)&&(e.dump&&Ot===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,i+=h));e.tag=s,e.dump=i||"{}"}function Ho(e,t,r){var u,i,s,n,o,a;for(i=r?e.explicitTypes:e.implicitTypes,s=0,n=i.length;s<n;s+=1)if(o=i[s],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(a=e.styleMap[o.tag]||o.defaultStyle,ga.call(o.represent)==="[object Function]")u=o.represent(t,a);else if(Ca.call(o.represent,a))u=o.represent[a](t,a);else throw new Q("!<"+o.tag+'> tag resolver accepts not "'+a+'" style');e.dump=u}return!0}return!1}function we(e,t,r,u,i,s,n){e.tag=null,e.dump=r,Ho(e,r,!1)||Ho(e,r,!0);var o=ga.call(e.dump),a=u,l;u&&(u=e.flowLevel<0||e.flowLevel>t);var c=o==="[object Object]"||o==="[object Array]",D,h;if(c&&(D=e.duplicates.indexOf(r),h=D!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&t>0)&&(i=!1),h&&e.usedDuplicates[D])e.dump="*ref_"+D;else{if(c&&h&&!e.usedDuplicates[D]&&(e.usedDuplicates[D]=!0),o==="[object Object]")u&&Object.keys(e.dump).length!==0?(lm(e,t,e.dump,i),h&&(e.dump="&ref_"+D+e.dump)):(Dm(e,t,e.dump),h&&(e.dump="&ref_"+D+" "+e.dump));else if(o==="[object Array]")u&&e.dump.length!==0?(e.noArrayIndent&&!n&&t>0?Mo(e,t-1,e.dump,i):Mo(e,t,e.dump,i),h&&(e.dump="&ref_"+D+e.dump)):(am(e,t,e.dump),h&&(e.dump="&ref_"+D+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&im(e,e.dump,t,s,a);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Q("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}function cm(e,t){var r=[],u=[],i,s;for(_u(e,r,u),i=0,s=u.length;i<s;i+=1)t.duplicates.push(r[u[i]]);t.usedDuplicates=new Array(s)}function _u(e,t,r){var u,i,s;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,s=e.length;i<s;i+=1)_u(e[i],t,r);else for(u=Object.keys(e),i=0,s=u.length;i<s;i+=1)_u(e[u[i]],t,r)}function hm(e,t){t=t||{};var r=new em(t);r.noRefs||cm(e,r);var u=e;return r.replacer&&(u=r.replacer.call({"":u},"",u)),we(r,0,u,!0,!0)?r.dump+`
174
+ `:""}var fm=hm,pm={dump:fm};function Ru(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var dm=z,mm=Vo,Fm=zo,gm=Xo,Cm=ea,Em=$u,ym=Fa.load,wm=Fa.loadAll,Am=pm.dump,bm=Q,xm={binary:ia,float:Qo,map:Ko,null:qo,pairs:oa,set:aa,timestamp:na,bool:Jo,int:Zo,merge:ua,omap:sa,seq:Yo,str:Go},vm=Ru("safeLoad","load"),Bm=Ru("safeLoadAll","loadAll"),_m=Ru("safeDump","dump"),Sm={Type:dm,Schema:mm,FAILSAFE_SCHEMA:Fm,JSON_SCHEMA:gm,CORE_SCHEMA:Cm,DEFAULT_SCHEMA:Em,load:ym,loadAll:wm,dump:Am,YAMLException:bm,types:xm,safeLoad:vm,safeLoadAll:Bm,safeDump:_m},Lr=Sm;var Ht=zt(iD(),1);import{readFileSync as vF,writeFileSync as FD,existsSync as qr,mkdirSync as BF}from"fs";import{dirname as _F}from"path";import{existsSync as qu,mkdirSync as ED,readFileSync as IF,writeFileSync as LF}from"fs";import{homedir as PF}from"os";import{join as Wu,dirname as yD,isAbsolute as PE,relative as NE,sep as jE}from"path";var L=nF();function uF(){let e=process.platform;if(e==="win32"){let t=process.env.APPDATA||b(L,"AppData","Roaming");return{appSupport:t,vscodePath:b(t,"Code","User"),gooseConfigPath:b(t,"Block","goose","config","config.yaml")}}else{if(e==="darwin")return{appSupport:b(L,"Library","Application Support"),vscodePath:b(L,"Library","Application Support","Code","User"),gooseConfigPath:b(L,".config","goose","config.yaml")};{let t=process.env.XDG_CONFIG_HOME||b(L,".config");return{appSupport:t,vscodePath:b(t,"Code","User"),gooseConfigPath:b(t,"goose","config.yaml")}}}}var{appSupport:Dt,vscodePath:Uu,gooseConfigPath:sD}=uF(),iF=b(L,".gemini","config","mcp_config.json"),oD=b(process.env.CLINE_DIR||b(L,".cline"),"data","settings","cline_mcp_settings.json"),aD=b(Uu,"globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),DD=b(process.env.XDG_CONFIG_HOME||b(L,".copilot"),"mcp-config.json"),sF=b(L,".codeium","windsurf","mcp_config.json");function pD(e){let t={};return e.type&&(t.type=e.type),e.url&&(t.url=e.url),e.headers&&Object.keys(e.headers).length>0&&(t.headers=e.headers),typeof e.timeout=="number"&&(t.timeout=e.timeout),t}function Vu(e){let t={command:e.command,args:e.args||[]};return e.env&&Object.keys(e.env).length>0&&(t.env=e.env),t}function Vr(e,t){return t.url?pD(t):Vu(t)}function oF(e,t){if(!t.url)return Vu(t);let r=pD(t);return t.oauthScopes&&t.oauthScopes.length>0&&(r.oauth={scopes:t.oauthScopes}),r}function aF(e,t){if(t.url){let r=t.type==="sse"?"sse":"streamable_http";return{name:e,description:"",type:r,uri:t.url,headers:t.headers||{},enabled:!0,timeout:300}}return{name:e,description:"",cmd:t.command,args:t.args||[],enabled:!0,envs:t.env||{},type:"stdio",timeout:300}}function DF(e,t){return t.url?{source:"custom",type:t.type||"http",url:t.url,headers:t.headers||{}}:{source:"custom",command:t.command,args:t.args||[],env:t.env||{}}}function lF(e,t){return t.url?{type:"remote",url:t.url,enabled:!0,headers:t.headers}:{type:"local",command:[t.command,...t.args||[]],enabled:!0,environment:t.env||{}}}function lD(e,t){return t?t.length===0?(e.default_tools_approval_mode="approve",e):(e.tools=Object.fromEntries(t.map(r=>[r,{approval_mode:"approve"}])),e):e}function cF(e,t){if(t.url){let r={type:t.type||"http",url:t.url};return t.headers&&Object.keys(t.headers).length>0&&(r.http_headers=t.headers),lD(r,t.autoApproveTools)}return lD({command:t.command,args:t.args||[],env:t.env},t.autoApproveTools)}function hF(e,t){if(t.url){let r={url:t.url};return t.headers&&Object.keys(t.headers).length>0&&(r.headers=t.headers),t.oauthScopes&&t.oauthScopes.length>0&&(r.auth={scopes:t.oauthScopes}),r}return Vu(t)}function cD(e,t){if(t.url){let u={url:t.url,type:t.type==="sse"?"sse":"streamableHttp",disabled:!1};return t.headers&&Object.keys(t.headers).length>0&&(u.headers=t.headers),u}let r={command:t.command,args:t.args||[],disabled:!1};return t.env&&Object.keys(t.env).length>0&&(r.env=t.env),r}function hD(e,t){if(t.url){let u={serverUrl:t.url};return t.headers&&Object.keys(t.headers).length>0&&(u.headers=t.headers),u}let r={command:t.command,args:t.args||[]};return t.env&&Object.keys(t.env).length>0&&(r.env=t.env),r}function fF(e,t,r){if(r?.local)return t;if(t.url){let i={type:t.type||"http",url:t.url,tools:["*"]};return t.headers&&Object.keys(t.headers).length>0&&(i.headers=t.headers),i}let u={type:"stdio",command:t.command,args:t.args||[],tools:["*"]};return t.env&&Object.keys(t.env).length>0&&(u.env=t.env),u}function pF(e,t){if(t.local&&e.localConfigPath)return b(t.cwd,e.localConfigPath);let r=e.configPath,u=b(Gr(r),"mcporter.jsonc");return Y(r)?r:Y(u)?u:r}var I={antigravity:{name:"antigravity",displayName:"Antigravity",configPath:iF,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>Y(b(L,".gemini","config")),transformConfig:hD},cline:{name:"cline",displayName:"Cline VSCode Extension",configPath:aD,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>Y(Gr(aD)),transformConfig:cD},"cline-cli":{name:"cline-cli",displayName:"Cline CLI",configPath:oD,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>Y(Gr(oD)),transformConfig:cD},"claude-code":{name:"claude-code",displayName:"Claude Code",configPath:b(L,".claude.json"),localConfigPath:".mcp.json",projectDetectPaths:[".mcp.json",".claude"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["timeout","autoApprove"],detectGlobalInstall:async()=>Y(b(L,".claude")),transformConfig:Vr},"claude-desktop":{name:"claude-desktop",displayName:"Claude Desktop",configPath:b(Dt,"Claude","claude_desktop_config.json"),projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio"],supportedFields:[],unsupportedTransportMessage:"Claude Desktop only supports local (stdio) servers via its config file. Add remote servers through Settings \u2192 Connectors in the app instead.",detectGlobalInstall:async()=>Y(b(Dt,"Claude")),transformConfig:Vr},codex:{name:"codex",displayName:"Codex",configPath:b(process.env.CODEX_HOME||b(L,".codex"),"config.toml"),localConfigPath:".codex/config.toml",projectDetectPaths:[".codex"],configKey:"mcp_servers",format:"toml",supportedTransports:["stdio","http","sse"],supportedFields:["autoApprove"],detectGlobalInstall:async()=>Y(b(L,".codex")),transformConfig:cF},cursor:{name:"cursor",displayName:"Cursor",configPath:b(L,".cursor","mcp.json"),localConfigPath:".cursor/mcp.json",projectDetectPaths:[".cursor"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["scopes"],detectGlobalInstall:async()=>Y(b(L,".cursor")),transformConfig:hF},"gemini-cli":{name:"gemini-cli",displayName:"Gemini CLI",configPath:b(L,".gemini","settings.json"),localConfigPath:".gemini/settings.json",projectDetectPaths:[".gemini"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["timeout","scopes"],detectGlobalInstall:async()=>Y(b(L,".gemini")),transformConfig:oF},goose:{name:"goose",displayName:"Goose",configPath:sD,projectDetectPaths:[],configKey:"extensions",format:"yaml",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>Y(sD),transformConfig:aF},"github-copilot-cli":{name:"github-copilot-cli",displayName:"GitHub Copilot CLI",configPath:DD,localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"mcpServers",localConfigKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>Y(Gr(DD)),transformConfig:fF},mcporter:{name:"mcporter",displayName:"MCPorter",configPath:b(L,".mcporter","mcporter.json"),localConfigPath:"config/mcporter.json",projectDetectPaths:["config/mcporter.json"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>Y(b(L,".mcporter")),resolveConfigPath:pF,transformConfig:Vr},opencode:{name:"opencode",displayName:"OpenCode",configPath:b(L,".config","opencode","opencode.json"),localConfigPath:"opencode.json",projectDetectPaths:["opencode.json",".opencode"],configKey:"mcp",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>Y(b(L,".config","opencode")),transformConfig:lF},vscode:{name:"vscode",displayName:"VS Code",configPath:b(Uu,"mcp.json"),localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>Y(Uu),transformConfig:Vr},windsurf:{name:"windsurf",displayName:"Windsurf",configPath:sF,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>Y(b(L,".codeium","windsurf")),transformConfig:hD},zed:{name:"zed",displayName:"Zed",configPath:process.platform==="darwin"||process.platform==="win32"?b(Dt,"Zed","settings.json"):b(Dt,"zed","settings.json"),localConfigPath:".zed/settings.json",projectDetectPaths:[".zed"],configKey:"context_servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>{let e=process.platform==="darwin"||process.platform==="win32"?b(Dt,"Zed"):b(Dt,"zed");return Y(e)},transformConfig:DF}};function lt(){return Object.keys(I)}function Nt(e){let t=e||process.cwd(),r=[];for(let[u,i]of Object.entries(I))if(i.localConfigPath){for(let s of i.projectDetectPaths)if(Y(b(t,s))){r.push(u);break}}return r}async function jt(){let e=[];for(let[t,r]of Object.entries(I))await r.detectGlobalInstall()&&e.push(t);return e}function Jr(e,t){let r={...e};for(let u in t){let i=t[u],s=r[u];i&&typeof i=="object"&&!Array.isArray(i)?r[u]=Jr(s&&typeof s=="object"?s:{},i):r[u]=i}return r}function Mt(e,t){let r=t.split("."),u=e;for(let i of r)if(u&&typeof u=="object"&&i in u)u=u[i];else return;return u}function dD(e){let t=null;return vo(e,{onObjectProperty:(r,u,i,s,n)=>{if(t===null&&s>0&&n>0){let o=e.lastIndexOf(`
175
+ `,u-1)+1,a=e.slice(o,u);t={tabSize:n,insertSpaces:!a.includes(" ")}}}}),t||{tabSize:2,insertSpaces:!0}}function FF(e){if(!Kr(e))return{};let t=Gu(e,"utf-8");return Sr(t)}function gF(e,t,r){let u=mF(e);Kr(u)||dF(u,{recursive:!0});let i="",s={};Kr(e)&&(i=Gu(e,"utf-8"),s=Sr(i));let n=Jr(s,t);if(i)try{let o=r.split("."),a=Mt(n,r),l=Cu(i,o,a,{formattingOptions:dD(i)}),c=Eu(i,l);Yr(e,c);return}catch{}Yr(e,JSON.stringify(n,null,2))}function CF(e,t,r){if(!Kr(e))return;let u=Gu(e,"utf-8"),i=t.split(".");try{let o=Cu(u,[...i,r],void 0,{formattingOptions:dD(u)}),a=Eu(u,o);Yr(e,a);return}catch{}let s=Sr(u),n=Mt(s,t);n&&typeof n=="object"&&r in n&&delete n[r],Yr(e,JSON.stringify(s,null,2))}function EF(e,t,r){let u=t.split("."),i=u.pop();if(!i)return;let s=e;for(let n of u)(!s[n]||typeof s[n]!="object")&&(s[n]={}),s=s[n];s[i]=r}function Yu(e){if(!zr(e))return{};let t=yF(e,"utf-8");return Lr.load(t)||{}}function bF(e,t,r){if(!zr(e))return;let u=Yu(e),i=t.split("."),s=u;for(let o of i)if(s&&typeof s=="object"&&o in s)s=s[o];else return;s&&typeof s=="object"&&r in s&&delete s[r];let n=Lr.dump(u,{indent:2,lineWidth:-1,noRefs:!0});mD(e,n)}function xF(e,t){let r=AF(e);zr(r)||wF(r,{recursive:!0});let u={};zr(e)&&(u=Yu(e));let i=Jr(u,t),s=Lr.dump(i,{indent:2,lineWidth:-1,noRefs:!0});mD(e,s)}function Ku(e){if(!qr(e))return{};let t=vF(e,"utf-8");return Ht.parse(t)}function SF(e,t,r){if(!qr(e))return;let u=Ku(e),i=t.split("."),s=u;for(let o of i)if(s&&typeof s=="object"&&o in s)s=s[o];else return;s&&typeof s=="object"&&r in s&&delete s[r];let n=Ht.stringify(u);FD(e,n)}function $F(e,t){let r=_F(e);qr(r)||BF(r,{recursive:!0});let u={};qr(e)&&(u=Ku(e));let i=Jr(u,t),s=Ht.stringify(i);FD(e,s)}function zu(e,t){switch(t){case"json":return FF(e);case"yaml":return Yu(e);case"toml":return Ku(e);default:throw new Error(`Unsupported config format: ${t}`)}}function gD(e,t,r,u){switch(t){case"json":CF(e,r,u);break;case"yaml":bF(e,r,u);break;case"toml":SF(e,r,u);break;default:throw new Error(`Unsupported config format: ${t}`)}}function kF(e,t,r,u){switch(r){case"json":gF(e,t,u);break;case"yaml":xF(e,t);break;case"toml":$F(e,t);break;default:throw new Error(`Unsupported config format: ${r}`)}}function TF(e,t,r){let u={},i={};return i[t]=r,EF(u,e,i),u}var CD={timeout:{label:"request timeout",isSet:e=>typeof e.timeout=="number",clear:e=>{delete e.timeout}},scopes:{label:"OAuth scopes",isSet:e=>Array.isArray(e.oauthScopes)&&e.oauthScopes.length>0,clear:e=>{delete e.oauthScopes}},autoApprove:{label:"tool auto-approval",isSet:e=>Array.isArray(e.autoApproveTools),clear:e=>{delete e.autoApproveTools}}},OF=Object.keys(CD);function RF(e,t){let r=new Set(t),u={...e};u.oauthScopes&&(u.oauthScopes=[...u.oauthScopes]),u.autoApproveTools&&(u.autoApproveTools=[...u.autoApproveTools]);let i=[];for(let s of OF){let n=CD[s];n.isSet(u)&&!r.has(s)&&(n.clear(u),i.push(s))}return{config:u,dropped:i}}var NF=PF();function jF(e){if(!qu(e))return{};let t=JSON.parse(IF(e,"utf-8"));return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function MF(e,t){let r=yD(e);qu(r)||ED(r,{recursive:!0}),LF(e,`${JSON.stringify(t,null,2)}
176
+ `,"utf-8")}function HF(e,t){let r=Array.isArray(e)?e.filter(u=>typeof u=="string"):[];for(let u of t)r.includes(u)||r.push(u);return r}function UF(e,t){return t.length===0?[`mcp__${e}`]:t.map(r=>`mcp__${e}__${r}`)}function WF(e={}){let t=!!e.local,r=e.cwd||process.cwd();return t?Wu(r,".claude","settings.local.json"):Wu(NF,".claude","settings.json")}function VF(e,t,r={}){let u=WF(r);try{let i=jF(u),s=i.permissions&&typeof i.permissions=="object"&&!Array.isArray(i.permissions)?i.permissions:{};return s.allow=HF(s.allow,UF(e,t)),i.permissions=s,MF(u,i),{success:!0,path:u}}catch(i){return{success:!1,path:u,error:i instanceof Error?i.message:"Unknown error"}}}function ct(e,t={}){let r=!!t.local,u=t.cwd||process.cwd();return e.resolveConfigPath?e.resolveConfigPath(e,{local:r,cwd:u}):r&&e.localConfigPath?Wu(u,e.localConfigPath):e.configPath}function Zr(e,t={}){return t.local&&e.localConfigKey?e.localConfigKey:e.configKey}function wD(e,t,r,u={}){let i=I[r],s=ct(i,u);try{let n=yD(s);qu(n)||ED(n,{recursive:!0});let{config:o,dropped:a}=RF(t,i.supportedFields),l=i.transformConfig(e,o,{local:!!u.local}),c=Zr(i,u),D=TF(c,e,l);kF(s,D,i.format,c);let h=[];if(r==="claude-code"&&o.autoApproveTools){let f=VF(e,o.autoApproveTools,u);if(!f.success)return{success:!1,path:f.path,error:f.error};h.push(f.path)}return{success:!0,path:s,...a.length>0?{droppedFields:a}:{},...h.length>0?{extraPaths:h}:{}}}catch(n){return{success:!1,path:s,error:n instanceof Error?n.message:"Unknown error"}}}function GF(e){for(let u of["url","uri","serverUrl"]){let i=e[u];if(typeof i=="string"&&i.length>0)return i}let t=typeof e.command=="string"?e.command:typeof e.cmd=="string"?e.cmd:void 0;if(!t)return"";let r=Array.isArray(e.args)?e.args.filter(u=>typeof u=="string"):Array.isArray(e.command)?e.command.slice(1).filter(u=>typeof u=="string"):[];if(t==="npx"||t==="bunx"){let u=r.indexOf("-y"),i=u>=0?u+1:0,s=r[i];if(s&&!s.startsWith("-"))return s}return Array.isArray(e.command)?e.command.join(" "):r.length>0?`${t} ${r.join(" ")}`:t}function fD(e,t){let r=I[e],u={local:t.scope==="local",cwd:t.cwd},i=ct(r,u),s=Zr(r,u),n=zu(i,r.format),o=Mt(n,s),a=[];if(o&&typeof o=="object"&&!Array.isArray(o)){for(let[l,c]of Object.entries(o))if(c&&typeof c=="object"){let D=c;a.push({serverName:l,config:D,identity:GF(D),agentType:e,scope:t.scope,configPath:i})}}return{agentType:e,displayName:r.displayName,detected:!0,scope:t.scope,configPath:i,servers:a}}async function Qr(e){let t=e.global?"global":"local",r=[];if(e.agents&&e.agents.length>0){let u=new Set(e.global?await jt():Nt(e.cwd));for(let i of e.agents)if(u.has(i))r.push(fD(i,{scope:t,cwd:e.cwd}));else{let n=I[i],o={local:t==="local",cwd:e.cwd};r.push({agentType:i,displayName:n.displayName,detected:!1,scope:t,configPath:ct(n,o),servers:[]})}}else{let u=e.global?await jt():Nt(e.cwd);for(let i of u)r.push(fD(i,{scope:t,cwd:e.cwd}))}return r}import{existsSync as YF}from"fs";function KF(e){return Object.prototype.hasOwnProperty.call(I,e)}function AD(e,t){return KF(e)?t&&!I[e].localConfigPath?`${e} does not support project-level config`:null:`Unknown agent type: ${String(e)}`}function bD(e,t,r,u={}){let i=AD(e,u.local);return i?{success:!1,path:"",error:i}:wD(t,r,e,u)}function zF(e,t){return!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.hasOwnProperty.call(e,t)}function qF(e,t,r){let u=I[e],i=ct(u,r),s=Zr(u,r);if(!YF(i))return{success:!0,path:i,removed:!1};let n=zu(i,u.format);return zF(Mt(n,s),t)?(gD(i,u.format,s,t),{success:!0,path:i,removed:!0}):{success:!0,path:i,removed:!1}}function xD(e,t,r={}){let u=AD(e,r.local);if(u)return{success:!1,path:"",removed:!1,error:u};let i=e;try{return qF(i,t,r)}catch(s){return{success:!1,path:ct(I[i],r),removed:!1,error:s instanceof Error?s.message:"Unknown error"}}}import{lstatSync as ng,realpathSync as kD}from"node:fs";import{mkdir as ug,readFile as ig,writeFile as sg}from"node:fs/promises";import Ce from"node:path";import{createHash as JF}from"node:crypto";import{readFile as ZF,writeFile as QF}from"node:fs/promises";import vD from"node:path";var ze="shaders.lock.json";function Ut(e){return"sha256:"+JF("sha256").update(e).digest("hex")}var XF=["title","component","file","framework","hash","installedAt"];function eg(e){if(!e||typeof e!="object")return!1;let t=e;return(t.kind==="preset"||t.kind==="preview")&&typeof t.presetId=="string"&&(t.slug===null||typeof t.slug=="string")}function tg(e){if(!e||typeof e!="object")return!1;let t=e;return XF.every(r=>typeof t[r]=="string")&&(t.updatedAt===null||typeof t.updatedAt=="string")&&(t.source===void 0||eg(t.source))&&(t.pending===void 0||t.pending===!0)}async function ht(e){let t=vD.join(e,ze),r;try{r=await ZF(t,"utf8")}catch(s){if(s.code==="ENOENT")return{version:1,shaders:{}};throw s}let u;try{u=JSON.parse(r)}catch{throw new Error(`${ze} is not valid JSON \u2014 fix or delete it and re-run`)}if(!u||typeof u!="object")throw new Error(`${ze} is malformed \u2014 fix or delete it and re-run`);let i=u;if(i.version!==1)throw new Error(`${ze} has unsupported version ${String(i.version)} \u2014 update the shaders CLI`);if(!i.shaders||typeof i.shaders!="object"||Array.isArray(i.shaders))throw new Error(`${ze} is malformed (missing "shaders") \u2014 fix or delete it and re-run`);for(let[s,n]of Object.entries(i.shaders))if(!tg(n))throw new Error(`${ze} has an invalid entry for "${s}" \u2014 fix or delete it and re-run`);return{version:1,shaders:i.shaders}}async function qe(e,t){let r={version:1,shaders:Object.fromEntries(Object.entries(t.shaders).sort(([u],[i])=>u.localeCompare(i)))};await QF(vD.join(e,ze),JSON.stringify(r,null,2)+`
177
+ `)}var Ju=Symbol.for("cancel");function Xr(e){return!/^\d+$/.test(e)}function Zu(e){let t=new URL("/pricing",G()+"/");return t.searchParams.set("utm_source","cli"),t.searchParams.set("utm_medium","terminal"),e&&t.searchParams.set("utm_campaign",e),t.toString()}async function Je(e,t){let r;try{r=await j(`/api/plugin/presets/${encodeURIComponent(e.toLowerCase())}`)}catch(i){throw i instanceof P&&i.status===404?new fe(`No preset called "${e}" is available in Shaders \u2014 it may have been retired. Preset names look like offsets-1.`,"preset"):i}if(r.kind==="preset")return r.preset;if(r.variants.length===1||!Fe(t))return r.variants[0];let u=await d.prompt(`"${r.collection.name}" has ${r.variants.length} variants \u2014 which one?`,{type:"select",options:r.variants.map(i=>({value:i.id,label:i.title,hint:i.slug})),cancel:"symbol"});return u===Ju&&X(),r.variants.find(i=>i.id===u)??r.variants[0]}function en(e,t){return{kind:t,presetId:e.id,slug:e.slug}}async function Wt(e,t,r){if(e.project)return e.project;let u=await Ue(t,e.detected,r);if(!u)throw new Error("A Shaders project is needed to hold the preset. Pass --project <id> or run npx shaders connect");return await pe(e.configFile,"project",u.id)?d.success(`Connected project "${u.title}"`):d.warn(`Couldn't update your shaders config automatically \u2014 add project: '${u.id}' to it`),e.project=u.id,u.id}async function BD(e,t,r){try{return await j(`/api/plugin/presets/${encodeURIComponent(t.id)}/clone`,{method:"POST",token:e.accessToken,body:{project_id:r}})}catch(u){throw u instanceof P&&u.isProjectNotFound?ke(r):u}}var rg=e=>new Promise(t=>setTimeout(t,e));async function _D(e,t,r){let u=`${e.title} requires a Shaders Pro subscription`,i=Zu(e.slug);if(!Fe(r))throw new Error(`${u}.
178
+ Get Pro: ${i}
179
+ Then run: npx shaders login && npx shaders install ${e.slug}`);let s=t;for(;;){d.log("");let n=[{value:"pro",label:"Get Shaders Pro",hint:"opens the pricing page in your browser"},...s?[]:[{value:"login",label:"Sign in to an existing account"}],{value:"preview",label:"Install a free watermarked preview instead",hint:"`npx shaders update` swaps in the real thing once you have Pro"}],o=await d.prompt(u,{type:"select",options:n,cancel:"symbol"});if(o===Ju&&X(),o==="preview")return{kind:"preview"};o==="pro"&&(d.info(`Opening ${i}`),Te(i),await d.prompt("Press enter here once you've finished in your browser",{type:"text",placeholder:"",default:"",cancel:"symbol"})===Ju&&X(),await rg(500));let a=s&&o==="pro"?s.credentials:await Ct(),l;try{l=await j("/api/plugin/me",{token:a.accessToken})}catch(c){if(c instanceof P&&c.status===401&&s){s=null;continue}throw c}if(s={credentials:a,me:l},l.isPro)return{kind:"pro",credentials:a,me:l};d.warn(`Signed in${l.email?` as ${l.email}`:""}, but this account doesn't have Shaders Pro yet`)}}function SD(e,t,r){let u=[`Watermarked preview of "${r.title}" from Shaders (${r.slug}).`,"Fetches the preset at runtime. Once your account has Shaders Pro, run","`npx shaders update` to replace this file with the full component source."];switch(e){case"react":case"solid":return[`import { Preview } from 'shaders/${e}'`,"",...u.map(i=>`// ${i}`),`export default function ${t}() {`,` return <Preview presetId="${r.id}" />`,"}",""].join(`
180
+ `);case"vue":return['<script setup lang="ts">',...u.map(i=>`// ${i}`),"import { Preview } from 'shaders/vue'","</script>","","<template>",` <Preview preset-id="${r.id}" />`,"</template>",""].join(`
181
+ `);case"svelte":return['<script lang="ts">',...u.map(i=>` // ${i}`)," import { Preview } from 'shaders/svelte'","</script>","",`<Preview presetId="${r.id}" />`,""].join(`
182
+ `)}}async function $D(e){let t=await Me(e);return!!t&&!!await Ne(t.dir)}async function ft(e){let t=await Me(e);if(!t)throw new Error(`No package.json found in ${e} or its parents. Run this from inside your project.`);let r=await Ne(t.dir);if(!r)throw new Error(`No shaders.config found in ${t.dir}. Run npx shaders connect first.`);let u=await or(r),i=u.framework??t.library;if(!i)throw new Error(`Couldn't read a framework from ${r}. Set framework: 'react' | 'vue' | 'svelte' | 'solid'.`);let s=u.outDir;return s||(s=dr(t.dir,t.framework),await pe(r,"outDir",s)&&d.info(`Added outDir: '${s}' to your shaders config`)),{detected:t,configFile:r,framework:i,project:u.project,outDir:s}}var TD="__all__",og=Symbol.for("cancel"),ag=100,Dg=1e3,lg={react:".tsx",solid:".tsx",vue:".vue",svelte:".svelte"};function RD(e,t){let u=e.normalize("NFKD").replace(/[^\w\s-]/g," ").split(/[\s_-]+/).filter(Boolean).map(i=>i[0].toUpperCase()+i.slice(1)).join("");return u||(u=`Shader${t.replace(/[^a-zA-Z0-9]/g,"").slice(0,8)}`),/^\d/.test(u)&&(u=`Shader${u}`),u}function cg(e,t){return e.replace(/\bShaderEffect\b/g,t)}function hg(e,t){let r=t.file.replace(/\.[^.]+$/,"");if(e.detected.framework==="Nuxt"){let i=Ce.posix.relative("components",Ce.posix.dirname(t.file));return`<${i&&!i.startsWith("..")?i.split("/").map(n=>n?n[0].toUpperCase()+n.slice(1):"").join(""):""}${t.component} /> (auto-imported)`}if(e.detected.framework==="SvelteKit"&&t.file.startsWith("src/lib/"))return`import ${t.component} from '$lib/${t.file.slice(8)}'`;let u=e.framework==="vue"||e.framework==="svelte"?t.file:r;return`import ${t.component} from './${u}' (relative to the project root)`}async function tn(e,t,r){try{return await j(`/api/plugin/shaders/${encodeURIComponent(t)}/code`,{token:e.accessToken,query:{format:r}})}catch(u){if(u instanceof P&&u.status===403&&u.upgradeUrl)throw new Error(`${u.message}
183
+ ${u.upgradeUrl}`);if(u instanceof P&&u.isProjectNotFound)throw ke(t);if(u instanceof P&&u.status===410&&u.code==="shader_deleted"){let i=typeof u.data?.title=="string"?u.data.title:`Shader ${t}`;throw new fe(`"${i}" has been deleted from Shaders. Remove it from shaders.lock.json to stop tracking it.`,"shader")}throw u instanceof P&&u.status===404?new fe(`Shader ${t} has been deleted from Shaders (or isn't in your account). IDs are shown in the design editor's Export Code dialog.`,"shader"):u}}function Qu(e,t){let r=Ce.resolve(e),u=Ce.resolve(r,t),i=(a,l)=>a===l||a.startsWith(l+Ce.sep);if(!i(u,r))throw new Error(`Refusing to write outside the project: ${t}`);let s=a=>{try{return ng(a),!0}catch{return!1}},n=u;for(;!s(n);)n=Ce.dirname(n);let o;try{o=kD(n)}catch{throw new Error(`Refusing to write through a broken symlink: ${t}`)}if(!i(o,kD(r)))throw new Error(`Refusing to write outside the project (symlink escapes it): ${t}`);return u}async function Xu(e){try{return await ig(e,"utf8")}catch(t){if(t.code==="ENOENT")return null;throw t}}function ID(e,t,r,u){let i=e.outDir.split(Ce.sep).join("/"),s=lg[e.framework],n=new Set(Object.entries(u.shaders).filter(([c])=>c!==r).map(([,c])=>c.file)),o=RD(t,r),a=r.replace(/[^a-zA-Z0-9]/g,"").slice(0,8),l=[o,`${o}${a}`];for(let c=2;;c++){for(let D of l){let h=Ce.posix.join(i,`${D}${s}`);if(!n.has(h))return{component:D,relFile:h}}l.splice(0,l.length,`${o}${a}${c}`)}}async function ei(e,t,r,u,i){let{component:s,relFile:n}=r?{component:r.component,relFile:r.file}:ID(e,t.title,t.id,u),o=Qu(e.detected.dir,n),a=cg(t.code,s).replace(/\n?$/,`
184
+ `),l=Ut(a),c=await Xu(o);if(c!==null){let D=Ut(c);if(D===l)return{entry:OD(r,s,n,e.framework,l,t),status:"unchanged"};if(!(r?D===r.hash:!1)&&!i)throw new Error(r?`${n} has local edits \u2014 re-run with --force to overwrite them`:`${n} already exists \u2014 re-run with --force to overwrite it`)}return await ug(Ce.dirname(o),{recursive:!0}),await sg(o,a),{entry:OD(r,s,n,e.framework,l,t),status:c===null?"installed":"updated"}}function ti(e,t,r,u,i,s){return ei(e,{id:t.id,title:t.title,code:t.code,updatedAt:t.updated_at??null,source:s??r?.source},r,u,i)}function OD(e,t,r,u,i,s){let n={title:s.title,component:t,file:r,framework:u,hash:i,updatedAt:s.updatedAt,installedAt:e?.installedAt??new Date().toISOString()};return s.source&&(n.source=s.source),n}async function ri(e,t){let r=[],u=0,i=null;for(;u!==null&&r.length<Dg;){let s;try{s=await j(`/api/plugin/projects/${encodeURIComponent(t)}/shaders`,{token:e.accessToken,query:{limit:String(ag),offset:String(u)}})}catch(n){throw n instanceof P&&n.isProjectNotFound?ke(t):n}i??=s.project,r.push(...s.shaders),u=s.has_more?s.next_offset:null}return{project:i,shaders:r}}async function fg(e,t,r){if(!Fe(r)&&!r.all)throw new Error(`Usage: npx shaders install <id|preset> [...] (or --all to install every shader in the connected project)
185
+ Shader IDs are shown in the design editor's Export Code dialog; presets look like offsets-1.`);let u=e.project;if(!u){d.info("This codebase isn't connected to a Shaders project yet");let a=await Ue(t,e.detected,r);if(!a)throw new Error("No project selected. Pass --project <id> or run npx shaders connect");u=a.id,await pe(e.configFile,"project",u)?d.success(`Connected project "${a.title}"`):d.warn(`Couldn't update ${Ce.basename(e.configFile)} automatically \u2014 add project: '${u}' to it`)}let{project:i,shaders:s}=await ri(t,u);if(s.length===0)return d.info(`"${i.title}" has no shaders yet \u2014 ${G()}/design-editor/${i.id}`),[];if(r.all)return s.map(a=>a.id);let n=await d.prompt(`Which shaders from "${i.title}" do you want to install?`,{type:"multiselect",options:[{value:TD,label:`All ${s.length} shaders`},...s.map(a=>({value:a.id,label:a.title||`Shader ${a.id}`,hint:`id ${a.id}`}))],required:!0,cancel:"symbol"});n===og&&X();let o=n.map(a=>typeof a=="string"?a:a.value);return o.includes(TD)?s.map(a=>a.id):o}function ni(e,t,r,u,i){let s=u==="unchanged"?"Already up to date":u==="updated"?"Updated":"Installed";d.success(`${s} "${t}" \u2192 ${r.file}${i?`
186
+ ${i}`:""}
187
+ ${hg(e,r)}`)}async function LD(e,t,r,u,i){let s=await tn(t,r,e.framework),n=u.shaders[r]??null,{entry:o,status:a}=await ti(e,s,n,u,i.force);u.shaders[r]=o,await qe(e.detected.dir,u),e.project&&s.kind==="shader"&&s.project_id&&s.project_id!==e.project&&d.warn(`"${s.title}" belongs to a different Shaders project than this codebase is connected to`),ni(e,s.title,o,a)}async function pg(e,t,r,u,i){let s=await Je(t,u),n=Object.keys(r.shaders).find(c=>r.shaders[c].source?.kind==="preset"&&r.shaders[c].source?.presetId===s.id&&!r.shaders[c].pending);if(n){let c=i??await ye();return d.info(`"${s.title}" is already in your project as shader ${n} \u2014 refreshing it`),await LD(e,c.credentials,n,r,u),c}let o=Object.keys(r.shaders).find(c=>r.shaders[c].source?.kind==="preview"&&r.shaders[c].source?.presetId===s.id),a=i;if(!a?.me.isPro){let c=await _D(s,a,u);if(c.kind==="preview"){let D=o?r.shaders[o]:null,{entry:h,status:f}=await ei(e,{id:s.id,title:s.title,code:SD(e.framework,D?.component??RD(s.title,s.id),s),updatedAt:null,source:en(s,"preview")},D,r,u.force);return r.shaders[s.id]=h,await qe(e.detected.dir,r),ni(e,s.title,h,f,"Watermarked preview \u2014 run `npx shaders update` once you have Pro to swap in the real component"),a}a={credentials:c.credentials,me:c.me},d.success(`Signed in${a.me.email?` as ${a.me.email}`:""} \u2014 Shaders Pro`)}let l=await Wt(e,a.credentials,u);return await rn(e,a.credentials,s,l,o?r.shaders[o]:null,o,r,u.force),a}async function rn(e,t,r,u,i,s,n,o){let a=Object.keys(n.shaders).find(f=>n.shaders[f].pending&&n.shaders[f].source?.presetId===r.id),l;if(a)l=n.shaders[a],d.info(`Resuming "${l.title}" \u2014 clone ${a} was created earlier but never written`);else{let f=await BD(t,r,u);a=f.id;let p=i?{component:i.component,relFile:i.file}:ID(e,f.title,f.id,n);l={title:f.title,component:p.component,file:p.relFile,framework:e.framework,hash:i?.hash??"",updatedAt:f.updated_at,installedAt:i?.installedAt??new Date().toISOString(),source:en(r,"preset"),pending:!0},s&&s!==a&&delete n.shaders[s],n.shaders[a]=l,await qe(e.detected.dir,n)}let c=await tn(t,a,e.framework),{entry:D,status:h}=await ei(e,{id:a,title:c.title,code:c.code,updatedAt:c.updated_at??l.updatedAt,source:en(r,"preset")},l,n,o);n.shaders[a]=D,await qe(e.detected.dir,n),ni(e,c.title,D,i?"updated":h,`Added to your project as shader ${a} \u2014 edit it with \`npx shaders open\``)}async function Vt(e,t){let r=process.cwd(),u=e.length>0&&e.every(Xr);if(!await $D(r)){if(!Fe(t))throw new Error("No shaders.config found. Run npx shaders connect first.");d.info(`Shaders isn't set up in this project yet \u2014 running connect first
188
+ `),await Er(u?{...t,auth:!1}:t),d.log("")}let i=await ft(r),s=await ht(i.detected.dir),n=await Oe();if((e.length===0||e.some(l=>!Xr(l)))&&!n&&(n=await ye()),e.length===0&&(e=await fg(i,n.credentials,t),e.length===0))return;let a=0;for(let l of e)try{Xr(l)?n=await pg(i,l,s,t,n):await LD(i,n.credentials,l,s,t)}catch(c){a++,d.error(`${l}: ${c instanceof Error?c.message:String(c)}`)}a===e.length&&process.exit(1)}var dg="https://shaders.com/mcp",ui="shaders",si="https://shaders.com/docs/guide/mcp";function ii(e){return I[e].supportedTransports.includes("http")}function Gt(){return lt().filter(ii)}function PD(e,{requireHttp:t}){let r=new Set(lt()),u=t?Gt():lt(),i=new Set(u);for(let s of e)if(r.has(s)||De(`Unknown agent "${s}". Supported agents: ${u.join(", ")}`),!i.has(s)){let n=I[s];De(`${n.displayName}: ${n.unsupportedTransportMessage??"this agent does not support remote (HTTP) MCP servers."}`)}return e}async function mg(e,t){if(e.agents.length>0)return{targets:PD(e.agents,{requireHttp:!0}),scope:e.global?"global":"project"};let r=e.global?[]:Nt(t).filter(ii),u=e.global||r.length===0?"global":"project",i=u==="project"?r:(await jt()).filter(ii);if(!(!e.yes&&process.stdout.isTTY&&process.stdin.isTTY))return i.length===0&&De(`No coding agents detected. Pass one explicitly, e.g. npx shaders install-mcp -a cursor
189
+ Supported agents: ${Gt().join(", ")}`),{targets:i,scope:u};let n=await pu({message:`Install the Shaders MCP server to which agents? (${u} config)`,options:Gt().map(o=>({value:o,label:I[o].displayName,hint:u==="project"&&I[o].localConfigPath?I[o].localConfigPath:I[o].configPath.replace(/^\/Users\/[^/]+|^\/home\/[^/]+|^C:\\Users\\[^\\]+/,"~")})),initialValues:i,required:!0});return vt(n)&&(console.log("Cancelled \u2014 nothing was changed."),process.exit(0)),{targets:n,scope:u}}async function nn(e){let t=process.cwd(),{targets:r,scope:u}=await mg(e,t),i=0;for(let s of r){let n=u==="project"&&!!I[s].localConfigPath,o=bD(s,ui,{type:"http",url:dg},{local:n,cwd:t});o.success?console.log(`\u2713 ${I[s].displayName} \u2014 ${o.path}`):(i++,console.error(`\u2717 ${I[s].displayName} \u2014 ${o.error}`))}i===r.length&&process.exit(1),console.log(`
190
+ Done! Open your agent and connect to the "${ui}" MCP server \u2014 you'll be
193
191
  prompted to sign in to your Shaders account the first time it connects.
194
192
 
195
- Docs: ${Vu}`)}async function bD(e){let t=process.cwd(),r=e.agents.length>0?AD(e.agents,{requireHttp:!1}):nt(),u=0,i=0,s=0;for(let n of r){let o=e.global||!N[n].localConfigPath?[!1]:[!0,!1];for(let a of o){i++;let D=yD(n,Uu,{local:a,cwd:t});D.success&&D.removed?(u++,console.log(`\u2713 Removed from ${N[n].displayName} \u2014 ${D.path}`)):D.success||(s++,console.error(`\u2717 ${N[n].displayName} \u2014 ${D.error}`))}}i>0&&s===i&&process.exit(1),u===0&&s===0&&console.log("No Shaders MCP server entries found.")}function xD(){console.log(`shaders \u2014 Shaders CLI (https://shaders.com)
193
+ Docs: ${si}`)}async function ND(e){let t=process.cwd(),r=e.agents.length>0?PD(e.agents,{requireHttp:!1}):lt(),u=0,i=0,s=0;for(let n of r){let o=e.global||!I[n].localConfigPath?[!1]:[!0,!1];for(let a of o){i++;let l=xD(n,ui,{local:a,cwd:t});l.success&&l.removed?(u++,console.log(`\u2713 Removed from ${I[n].displayName} \u2014 ${l.path}`)):l.success||(s++,console.error(`\u2717 ${I[n].displayName} \u2014 ${l.error}`))}}i>0&&s===i&&process.exit(1),u===0&&s===0&&console.log("No Shaders MCP server entries found.")}async function un(){let e=await ft(process.cwd());if(!e.project)throw new Error("This codebase isn't connected to a Shaders project yet. Run npx shaders connect to set one up.");try{let r=await Oe();if(r){let{projects:u}=await j("/api/plugin/projects",{token:r.credentials.accessToken,query:{id:e.project,limit:"1"}});if(!u.some(i=>i.id===e.project))throw ke(e.project)}}catch(r){if(!(r instanceof P))throw r}let t=`${G()}/design-editor/${e.project}`;d.log(t),Te(t)}var jD=110;function Fg(e){if(!e)return"";let t=e.replace(/\s+/g," ").trim();return t.length>jD?`${t.slice(0,jD-1).trimEnd()}\u2026`:t}async function oi(e,t){let r={q:e};return t&&(r.limit=String(t)),j("/api/plugin/presets/search",{query:r})}function gg(e){let t=new URL("/presets",G()+"/");return t.searchParams.set("q",e),t.toString()}function ai(e,t){let r=Math.max(...t.map(u=>(u.slug??u.id).length));d.log("");for(let u of t){let i=(u.slug??u.id).padEnd(r),s=u.similarity!=null?`${Math.round(u.similarity*100)}%`.padStart(4):" ",n=Fg(u.description);d.log(` ${i} ${s} ${n}`),u.url&&d.log(` ${"".padEnd(r)} ${u.url}`)}d.log(""),d.log(` See them all running: ${gg(e)}`),d.log("")}async function MD(e,t){let r=e.join(" ").trim();if(!r)throw new Error('What are you looking for? e.g. npx shaders search "liquid chrome hero background"');let{results:u,fallback:i}=await oi(r,t.limit);if(t.json){console.log(JSON.stringify({query:r,fallback:i,results:u},null,2));return}if(!u.length){d.info(`No presets match "${r}". Try describing the look differently, or browse ${G()}/presets`);return}ai(r,u),d.log("Install one: npx shaders install <name> (presets require Shaders Pro)"),d.log("Open one: npx shaders preview <name>")}async function sn(e,t){let r=await ft(process.cwd()),u=await ht(r.detected.dir),i=e.length?e:Object.keys(u.shaders);if(i.length===0){d.info("Nothing installed yet \u2014 run npx shaders install <id> first");return}for(let l of i)if(!u.shaders[l])throw new Error(`${l} isn't in shaders.lock.json \u2014 install it first with npx shaders install ${l}`);let{credentials:s,me:n}=await ye(),o={updated:0,unchanged:0,skipped:0,gone:0,interrupted:0,failed:0};for(let[l,c]of i.entries()){let D=u.shaders[c];try{if(D.pending&&D.source){let C=await Je(D.source.presetId,t),$=await Wt(r,s,t);await rn(r,s,C,$,D,c,u,t.force),o.updated++;continue}let h=await Xu(Qu(r.detected.dir,D.file));if(h!==null&&Ut(h)!==D.hash&&!t.force){o.skipped++,d.warn(`Skipped "${D.title}" \u2014 ${D.file} has local edits (use --force to overwrite)`);continue}if(D.source?.kind==="preview"){if(!n.isPro){o.skipped++,d.info(`"${D.title}" is a watermarked preview \u2014 unlock Shaders Pro to swap in the real component: ${Zu(D.source.slug)}`);continue}let C=await Je(D.source.presetId,t),$=await Wt(r,s,t);await rn(r,s,C,$,D,c,u,t.force),o.updated++;continue}let f=await tn(s,c,D.framework),{entry:p,status:y}=await ti(r,f,D,u,t.force);u.shaders[c]=p,await qe(r.detected.dir,u),y==="unchanged"?(o.unchanged++,d.log(` "${p.title}" is up to date`)):(o.updated++,d.success(`${h===null?"Restored":"Updated"} "${p.title}" \u2192 ${p.file}`))}catch(h){if(h instanceof fe){if(o.gone++,d.warn(`${D.title} (${c}): ${h.message}
194
+ ${D.file} was left untouched.`),h.what==="project"){o.interrupted=i.length-l-1,o.interrupted&&d.warn(`Stopped \u2014 ${o.interrupted} more shader${o.interrupted===1?"":"s"} not checked`);break}continue}o.failed++,d.error(`${D.title} (${c}): ${h instanceof Error?h.message:String(h)}`)}}let a=[o.updated&&`${o.updated} updated`,o.unchanged&&`${o.unchanged} up to date`,o.skipped&&`${o.skipped} skipped`,o.gone&&`${o.gone} unavailable in Shaders`,o.interrupted&&`${o.interrupted} not checked`,o.failed&&`${o.failed} failed`].filter(Boolean);d.log(`
195
+ ${a.join(", ")}`),(o.failed||o.interrupted)&&process.exit(1)}var on=Symbol.for("cancel"),UD="shaders",an={yes:!1,auth:!0,install:!0,skill:!1,force:!1,all:!1};function Eg(e){return[[Yt.join(e,".agents/skills",He),"project"],[Yt.join(e,".claude/skills",He),"project"],[Yt.join(e,".cursor/skills",He),"project"],[Yt.join(HD(),".agents/skills",He),"global"],[Yt.join(HD(),".claude/skills",He),"global"]].find(([r])=>Cg(r))?.[1]??null}async function yg(e){try{if((await Qr({cwd:e})).some(u=>u.servers.some(i=>i.serverName===UD&&i.scope==="local")))return"project";if((await Qr({cwd:e,global:!0})).some(u=>u.servers.some(i=>i.serverName===UD)))return"global"}catch{}return null}async function WD(e){let t=e.detected.dir,r=await Ne(t),u=r?await or(r):null,i=await ht(t),s=Object.keys(i.shaders).length,n=null;try{n=await Oe()}catch{n=null}let o=null,a=null;if(n&&u?.project)try{let{project:l,shaders:c}=await ri(n.credentials,u.project);a=l.title,o=c.filter(D=>{let h=i.shaders[D.id];return h&&h.updatedAt&&D.updated_at&&D.updated_at>h.updatedAt}).length}catch{}return{setup:{...e,configFile:r},config:u,installed:s,changed:o,signedIn:n,projectTitle:a,skill:Eg(t),mcp:await yg(t)}}function wg(e){let{setup:t,config:r}=e,u=t.detected.framework&&t.detected.framework!==t.library?`${t.detected.framework} + ${t.library}`:t.library,i=[`Shaders \xB7 ${u[0].toUpperCase()}${u.slice(1)}`];r?.project?i.push(e.projectTitle?`connected to "${e.projectTitle}"`:"connected"):i.push("not connected");let s=[];return e.installed&&s.push(`${e.installed} installed`),e.changed&&s.push(`${e.changed} changed in the editor`),e.skill&&s.push(`skill \u2714${e.skill==="global"?" (global)":""}`),e.mcp&&s.push(`MCP \u2714${e.mcp==="global"?" (global)":""}`),e.signedIn?.me.email&&s.push(e.signedIn.me.email),s.length?[i.join(" \xB7 "),s.join(" \xB7 ")]:[i.join(" \xB7 ")]}async function Ag(e){if(e.config?.project)return e.config.project;let t=e.signedIn;if(!t){let u=await d.prompt("Which account?",{type:"select",options:[{value:"sign-in",label:"Sign in to your Shaders account"},{value:"sign-up",label:"Create a free account"}],cancel:"symbol"});u===on&&X();let i=await Ct(u==="sign-up"?{screen:"sign-up"}:{}),s=await Oe();if(!s)throw new Error("Signed in, but the account could not be verified. Run npx shaders login and try again.");t=s,d.success(`Signed in${t.me.email?` as ${t.me.email}`:""}`)}let r=await Ue(t.credentials,e.setup.detected,an);if(r||X(),e.setup.configFile){if(!await pe(e.setup.configFile,"project",r.id))throw new Error(`Couldn't update your shaders config automatically \u2014 add project: '${r.id}' to it, then run npx shaders open`)}else await Cr(e.setup,r.id);return d.success(`Connected to "${r.title}"`),r.id}async function bg(){for(;;){let e=await d.prompt("Describe the look",{type:"text",placeholder:"liquid chrome hero background",cancel:"symbol"});e===on&&X();let t=String(e??"").trim();if(!t)return;d.start("Searching the library\u2026");let{results:r}=await oi(t);if(!r.length){d.info(`No presets match "${t}". Try different words.`);continue}d.success(`${r.length} preset${r.length===1?"":"s"} for "${t}"`),ai(t,r);let u=await d.prompt("Install one?",{type:"select",options:[...r.map(i=>({value:i.slug??i.id,label:i.slug??i.id,hint:i.similarity!=null?`${Math.round(i.similarity*100)}% match`:void 0})),{value:"__again",label:"Search again"},{value:"__back",label:"Not now"}],cancel:"symbol"});if(u===on&&X(),u==="__back")return;if(u!=="__again"){await Vt([u],an);return}}}function xg(e){let t=!!e.config?.project,r=[];return t&&e.changed&&r.push({value:"update",label:`Update ${e.changed} changed shader${e.changed===1?"":"s"}`,hint:"pull in what changed in the editor"}),r.push({value:"search",label:"Find a preset to drop in",hint:"search the library by describing the look"}),t&&r.push({value:"install",label:"Install a shader from your project",hint:"the ones you designed in the editor"}),r.push({value:"editor",label:"Open the design editor",hint:t?void 0:"signs you in and connects this codebase to a project"}),e.skill||r.push({value:"skill",label:"Install the agent skill",hint:"teaches Claude Code, Cursor, Codex and others how to build with Shaders"}),e.mcp||r.push({value:"mcp",label:"Install the MCP",hint:"lets your agent search presets and read your shaders"}),t&&e.installed&&!e.changed&&r.push({value:"update",label:"Check for updates",hint:`${e.installed} installed`}),r.push({value:"done",label:"Nothing right now"}),r}async function vg(e,t){switch(e){case"update":await sn([],an);break;case"install":await Vt([],an);break;case"search":await bg();break;case"editor":await Ag(t),await un();break;case"skill":await et({global:!1,yes:!1,agents:[],cwd:t.setup.detected.dir});break;case"mcp":await nn({global:!1,yes:!1,agents:[]});break;case"done":break}}async function VD(e){let t=await uu(e,{quiet:!0});t.configFile||(t.configFile=await Cr(t,null));let r=await WD(t);for(;;){d.log("");for(let i of wg(r))d.log(` ${i}`);d.log("");let u=await d.prompt("What do you want to ship?",{type:"select",options:xg(r),cancel:"symbol"});if(u===on||u==="done"){d.log("");return}await vg(u,r),r=await WD(t)}}function Bg(e){let t=new URL(`/p/${encodeURIComponent(e.slug)}`,G()+"/");return t.searchParams.set("utm_source","cli"),t.searchParams.set("utm_medium","terminal"),t.toString()}async function GD(e,t){let r=e[0];if(!r)throw new Error("Which preset? e.g. npx shaders preview offsets-1 (find names with npx shaders search)");if(e.length>1)throw new Error(`Unexpected argument: ${e[1]} \u2014 preview takes one preset name`);let u=await Je(r,t),i=Bg(u);d.info(`Opening ${u.title} \u2014 ${i}`),Te(i),d.log(`Install it with: npx shaders install ${u.slug}`)}function Di(){console.log(`shaders \u2014 Shaders CLI (https://shaders.com)
196
196
 
197
197
  Usage:
198
+ npx shaders Guided flow: set up, find a preset, open the editor, add the skill or MCP
198
199
  npx shaders connect [options] Set up Shaders in this project and connect it to your account
199
200
  npx shaders init [options] Alias for connect
200
201
  npx shaders install [<ref>...] Install shaders: your own by id, presets by name (offsets-1) \u2014 no ref: pick from your project
201
202
  npx shaders i [<ref>...] Alias for install
203
+ npx shaders search <query> Search the preset library by describing the look you want
204
+ npx shaders preview <name> Open a preset on shaders.com to see it running before you install it
202
205
  npx shaders update [<id>...] Refresh installed shaders (all of them when no id is given)
203
206
  npx shaders open Open the connected project in the design editor
204
207
  npx shaders login Sign in to your Shaders account
205
208
  npx shaders logout Forget the stored sign-in
206
209
  npx shaders install-mcp [options] Add the Shaders MCP server to your coding agents
207
210
  npx shaders uninstall-mcp [options] Remove the Shaders MCP server from your coding agents
211
+ npx shaders skill [options] Add the Shaders agent skill to your coding agents
208
212
 
209
213
  connect options:
210
214
  -f, --framework <name> Override detection: react, vue, svelte or solid
211
215
  -p, --project <id> Connect to a specific shaders.com project (non-interactive)
212
216
  --no-install Don't install the shaders package
213
217
  --no-auth Skip sign-in and project connection
218
+ --no-skill Don't add the agent skill
214
219
  -y, --yes Skip prompts (no project is connected unless --project is given)
215
220
 
216
221
  install / update options:
217
222
  --all Install every shader in the connected project without prompting
218
223
  --force Overwrite files that exist or have local edits
219
224
 
220
- install-mcp options:
225
+ search options:
226
+ --limit <n> Number of results (default 8, max 20)
227
+ --json Print results as JSON
228
+
229
+ install-mcp / skill options:
221
230
  -a, --agent <name> Target specific agent(s), repeatable (e.g. -a cursor -a claude-code)
222
231
  -g, --global Use global (user-level) config instead of project config
223
232
  -y, --yes Skip prompts and use auto-detected agents
@@ -227,6 +236,7 @@ General:
227
236
  -v, --version Show version
228
237
 
229
238
  Supported agents:
230
- ${It().join(", ")}
239
+ ${Gt().join(", ")}
231
240
 
232
- Docs: ${Vu}`)}function zm(e){let t={global:!1,yes:!1,agents:[],auth:!0,install:!0,force:!1,all:!1},r,u=[],i=(s,n)=>{let o=e[n];return(!o||o.startsWith("-"))&&he(`Missing value for ${s}`),o};for(let s=0;s<e.length;s++){let n=e[s];switch(n){case"-g":case"--global":t.global=!0;break;case"-y":case"--yes":t.yes=!0;break;case"--no-auth":t.auth=!1;break;case"--no-install":t.install=!1;break;case"--force":t.force=!0;break;case"--all":t.all=!0;break;case"-a":case"--agent":t.agents.push(...i(n,++s).split(",").map(o=>o.trim()).filter(Boolean));break;case"-f":case"--framework":t.framework=i(n,++s);break;case"-p":case"--project":t.project=i(n,++s);break;case"-h":case"--help":xD(),process.exit(0);break;case"-v":case"--version":console.log("4.0.0"),process.exit(0);break;default:n.startsWith("-")&&he(`Unknown option: ${n} (see npx shaders --help)`),r?u.push(n):r=n}}return{command:r,args:u,flags:t}}async function qm(){let{me:e}=await ge();m.success(`Signed in to ${te()}${e.email?` as ${e.email}`:""}`)}async function Jm(){let e=await Ni();m.success(e?"Signed out \u2014 stored credentials removed":"No stored credentials found")}async function Zm(){let{command:e,args:t,flags:r}=zm(process.argv.slice(2)),u=()=>{t.length&&he(`Unexpected argument: ${t[0]}`)};switch(e){case"connect":case"init":u(),await or(r);break;case"install":case"i":await Hs(t,r);break;case"open":u(),await Us();break;case"update":await Ws(t,r);break;case"login":u(),await qm();break;case"logout":u(),await Jm();break;case"install-mcp":u(),await wD(r);break;case"uninstall-mcp":u(),await bD(r);break;case void 0:case"help":xD();break;default:he(`Unknown command "${e}" (see npx shaders --help)`)}}Zm().catch(e=>{he(e instanceof Error?e.message:String(e))});
241
+ Docs: ${si}
242
+ ${mr}`)}function _g(e){let t={global:!1,yes:!1,agents:[],auth:!0,install:!0,skill:!0,force:!1,all:!1,json:!1},r,u=[],i=(s,n)=>{let o=e[n];return(!o||o.startsWith("-"))&&De(`Missing value for ${s}`),o};for(let s=0;s<e.length;s++){let n=e[s];switch(n){case"-g":case"--global":t.global=!0;break;case"-y":case"--yes":t.yes=!0;break;case"--no-auth":t.auth=!1;break;case"--no-install":t.install=!1;break;case"--no-skill":t.skill=!1;break;case"--force":t.force=!0;break;case"--all":t.all=!0;break;case"--json":t.json=!0;break;case"--limit":{let o=i(n,++s),a=/^\d+$/.test(o)?Number(o):NaN;a>=1&&a<=20||De(`--limit needs a whole number from 1 to 20, got "${o}"`),t.limit=a;break}case"-a":case"--agent":t.agents.push(...i(n,++s).split(",").map(o=>o.trim()).filter(Boolean));break;case"-f":case"--framework":t.framework=i(n,++s);break;case"-p":case"--project":t.project=i(n,++s);break;case"-h":case"--help":Di(),process.exit(0);break;case"-v":case"--version":console.log("4.0.2"),process.exit(0);break;default:n.startsWith("-")&&De(`Unknown option: ${n} (see npx shaders --help)`),r?u.push(n):r=n}}return{command:r,args:u,flags:t}}async function Sg(){let{me:e}=await ye();d.success(`Signed in to ${G()}${e.email?` as ${e.email}`:""}`)}async function $g(){let e=await rs();d.success(e?"Signed out \u2014 stored credentials removed":"No stored credentials found")}async function kg(){let{command:e,args:t,flags:r}=_g(process.argv.slice(2)),u=()=>{t.length&&De(`Unexpected argument: ${t[0]}`)};switch(e){case"connect":case"init":u(),await Er(r);break;case"install":case"i":await Vt(t,r);break;case"open":u(),await un();break;case"search":await MD(t,r);break;case"preview":await GD(t,r);break;case"update":await sn(t,r);break;case"login":u(),await Sg();break;case"logout":u(),await $g();break;case"install-mcp":u(),await nn(r);break;case"uninstall-mcp":u(),await ND(r);break;case"skill":u(),await et({...r,cwd:(await Me(process.cwd()))?.dir??process.cwd()});break;case void 0:Fe(r)&&!process.env.CI?await VD(r):Di();break;case"help":Di();break;default:De(`Unknown command "${e}" (see npx shaders --help)`)}}kg().catch(e=>{De(e instanceof Error?e.message:String(e))});