shaders 3.2.472 → 3.2.473
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 +169 -159
- package/dist/js/bundle.js +2 -2
- package/dist/js/createShader.js +1 -1
- package/dist/react/Shader.js +1 -1
- package/dist/react/bundle.js +2 -2
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,196 +1,205 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/* shaders@3.2.
|
|
2
|
+
/* shaders@3.2.473 CLI — npx shaders init | install-mcp. https://shaders.com */
|
|
3
3
|
import { createRequire as __cliCreateRequire } from "module";
|
|
4
4
|
const require = __cliCreateRequire(import.meta.url);
|
|
5
|
-
var
|
|
5
|
+
var bD=Object.create;var Gr=Object.defineProperty;var xD=Object.getOwnPropertyDescriptor;var vD=Object.getOwnPropertyNames;var BD=Object.getPrototypeOf,_D=Object.prototype.hasOwnProperty;var SD=(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 Wu=(e,t)=>()=>(e&&(t=e(e=0)),t);var Y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),TD=(e,t)=>{for(var r in t)Gr(e,r,{get:t[r],enumerable:!0})},$D=(e,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of vD(t))!_D.call(e,i)&&i!==r&&Gr(e,i,{get:()=>t[i],enumerable:!(u=xD(t,i))||u.enumerable});return e};var Rt=(e,t,r)=>(r=e!=null?bD(BD(e)):{},$D(t||!e||!e.__esModule?Gr(r,"default",{value:e,enumerable:!0}):r,e));var Ei={};TD(Ei,{kCancel:()=>gi,prompt:()=>Ci});import ie,{stdin as ZD,stdout as QD}from"node:process";import Xu from"node:readline";import{WriteStream as XD}from"node:tty";function el(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function tl(){if(ei)return Xr;ei=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 Xr={cursor:u,scroll:i,erase:s,beep:r},Xr}function rl(){if(ti)return Lt.exports;ti=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)=>l=>{let c=""+l,f=c.indexOf(a,o.length);return~f?o+s(c,a,D,f)+a:o+c+a},s=(o,a,D,l)=>{let c="",f=0;do c+=o.substring(f,l)+D,f=l+a.length,l=o.indexOf(a,f);while(~l);return c+o.substring(f)},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 Lt.exports=n(),Lt.exports.createColors=n,Lt.exports}function ul({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 fi(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(il,"")}function hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=fi(e),e.length===0))return 0;e=e.replace(Dl()," ");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(ol.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(k)){for(let[u,i]of Object.entries(r))k[u]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[u]=k[u],e.set(i[0],i[1]);Object.defineProperty(k,t,{value:r,enumerable:!1})}return Object.defineProperty(k,"codes",{value:e,enumerable:!1}),k.color.close="\x1B[39m",k.bgColor.close="\x1B[49m",k.color.ansi=ri(),k.color.ansi256=ni(),k.color.ansi16m=ui(),k.bgColor.ansi=ri(en),k.bgColor.ansi256=ni(en),k.bgColor.ansi16m=ui(en),Object.defineProperties(k,{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=>k.rgbToAnsi256(...k.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)=>k.ansi256ToAnsi(k.rgbToAnsi256(t,r,u)),enumerable:!1},hexToAnsi:{value:t=>k.ansi256ToAnsi(k.hexToAnsi256(t)),enumerable:!1}}),k}function oi(e,t,r){return String(e).normalize().replace(/\r\n/g,`
|
|
6
6
|
`).split(`
|
|
7
|
-
`).map(
|
|
8
|
-
`)}function
|
|
9
|
-
`),
|
|
10
|
-
`),i=[];for(let s=0;s<Math.max(u.length,n.length);s++)u[s]!==n[s]&&i.push(s);return i}function xt(e,t){let u=e;u.isTTY&&u.setRawMode(t)}function il(){return re.platform!=="win32"?re.env.TERM!=="linux":!!re.env.CI||!!re.env.WT_SESSION||!!re.env.TERMINUS_SUBLIME||re.env.ConEmuTask==="{cmd::Cmder}"||re.env.TERM_PROGRAM==="Terminus-Sublime"||re.env.TERM_PROGRAM==="vscode"||re.env.TERM==="xterm-256color"||re.env.TERM==="alacritty"||re.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}async function ui(e,t={}){let u=n=>{if(typeof n!="symbol"||n.toString()!=="Symbol(clack:cancel)")return n;switch(t.cancel){case"reject":{let i=new Error("Prompt cancelled.");throw i.name="ConsolaPromptCancelledError",Error.captureStackTrace&&Error.captureStackTrace(i,ui),i}case"undefined":return;case"null":return null;case"symbol":return ri;default:case"default":return t.default??t.initial}};if(!t.type||t.type==="text")return await hl({message:e,defaultValue:t.default,placeholder:t.placeholder,initialValue:t.initial}).then(u);if(t.type==="confirm")return await pl({message:e,initialValue:t.initial}).then(u);if(t.type==="select")return await dl({message:e,options:t.options.map(n=>typeof n=="string"?{value:n,label:n}:n),initialValue:t.initial}).then(u);if(t.type==="multiselect")return await Fl({message:e,options:t.options.map(n=>typeof n=="string"?{value:n,label:n}:n),required:t.required,initialValues:t.initial}).then(u);throw new Error(`Unknown prompt type: ${t.type}`)}var Mr,Pn,ue,bt,jn,Ra,d,La,Qn,Na,Pa,ja,Ma,Hr,Mn,Hn,Un,k,Ha,Ua,Va,vt,Ga,qr,Xn,Ya,ei,Jr,Wn,Vn,za,Ur,Ka,qa,Ja,Bt,Yn,Qa,Xa,Q,Pe,Wr,el,tl,zn,rl,ul,nl,Kn,Vr,Gr,sl,ne,ol,Dl,al,ll,T,je,Yr,zr,cl,qn,fl,_t,Kr,hl,pl,dl,Fl,ri,ii=vn(()=>{ue=ka(),bt={exports:{}};Ra=Oa(),d=$a(Ra);La=Ia();Qn={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var i=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,r=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,r=i<<10|s,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"},t.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function u(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var i=u(n),s=0,r=0;r<i.length;r++)s=s+this.characterLength(i[r]);return s},t.slice=function(n,i,s){textLen=t.length(n),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var r="",o=0,D=u(n),a=0;a<D.length;a++){var c=D[a],l=t.length(c);if(o>=i-(l==2?1:0))if(o+l<=s)r+=c;else break;o+=l}return r}})(Qn);Na=Qn.exports,Pa=Zn(Na),ja=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},Ma=Zn(ja);Hr=10,Mn=(e=0)=>t=>`\x1B[${t+e}m`,Hn=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Un=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,k={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(k.modifier);Ha=Object.keys(k.color),Ua=Object.keys(k.bgColor);[...Ha,...Ua];Va=Wa(),vt=new Set(["\x1B","\x9B"]),Ga=39,qr="\x07",Xn="[",Ya="]",ei="m",Jr=`${Ya}8;;`,Wn=e=>`${vt.values().next().value}${Xn}${e}${ei}`,Vn=e=>`${vt.values().next().value}${Jr}${e}${qr}`,za=e=>e.split(" ").map(t=>Qe(t)),Ur=(e,t,u)=>{let n=[...t],i=!1,s=!1,r=Qe(Jn(e[e.length-1]));for(let[o,D]of n.entries()){let a=Qe(D);if(r+a<=u?e[e.length-1]+=D:(e.push(D),r=0),vt.has(D)&&(i=!0,s=n.slice(o+1).join("").startsWith(Jr)),i){s?D===qr&&(i=!1,s=!1):D===ei&&(i=!1);continue}r+=a,r===u&&o<n.length-1&&(e.push(""),r=0)}!r&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Ka=e=>{let t=e.split(" "),u=t.length;for(;u>0&&!(Qe(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},qa=(e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",i,s,r=za(e),o=[""];for(let[a,c]of e.split(" ").entries()){u.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let l=Qe(o[o.length-1]);if(a!==0&&(l>=t&&(u.wordWrap===!1||u.trim===!1)&&(o.push(""),l=0),(l>0||u.trim===!1)&&(o[o.length-1]+=" ",l++)),u.hard&&r[a]>t){let f=t-l,h=1+Math.floor((r[a]-f-1)/t);Math.floor((r[a]-1)/t)<h&&o.push(""),Ur(o,c,t);continue}if(l+r[a]>t&&l>0&&r[a]>0){if(u.wordWrap===!1&&l<t){Ur(o,c,t);continue}o.push("")}if(l+r[a]>t&&u.wordWrap===!1){Ur(o,c,t);continue}o[o.length-1]+=c}u.trim!==!1&&(o=o.map(a=>Ka(a)));let D=[...o.join(`
|
|
11
|
-
`)];for(let[
|
|
12
|
-
`?(s&&(
|
|
13
|
-
`&&(i&&
|
|
14
|
-
`),
|
|
15
|
-
`).length-1;this.output.write(
|
|
16
|
-
`);this.output.write(i[
|
|
17
|
-
`).slice(
|
|
18
|
-
`)),this._prevFrame=t;return}this.output.write(
|
|
19
|
-
${
|
|
20
|
-
`,
|
|
21
|
-
${d.yellow(T)} ${
|
|
22
|
-
${d.yellow(
|
|
7
|
+
`).map(u=>gl(u,t,r)).join(`
|
|
8
|
+
`)}function mi(e,t){if(typeof e=="string")return Pt.aliases.get(e)===t;for(let r of e)if(r!==void 0&&mi(r,t))return!0;return!1}function El(e,t){if(e===t)return;let r=e.split(`
|
|
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 Nt(e,t){let r=e;r.isTTY&&r.setRawMode(t)}function _l(){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 Ci(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,Ci),i}case"undefined":return;case"null":return null;case"symbol":return gi;default:case"default":return t.default??t.initial}};if(!t.type||t.type==="text")return await Ll({message:e,defaultValue:t.default,placeholder:t.placeholder,initialValue:t.initial}).then(r);if(t.type==="confirm")return await Nl({message:e,initialValue:t.initial}).then(r);if(t.type==="select")return await Pl({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 jl({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 Xr,ei,se,Lt,ti,nl,d,il,pi,sl,ol,al,Dl,en,ri,ni,ui,k,ll,cl,hl,jt,pl,Dn,di,dl,Fi,ln,ii,si,Fl,tn,ml,gl,Cl,Pt,ai,yl,Al,te,Ue,rn,wl,bl,Di,xl,vl,Bl,li,nn,un,Sl,oe,Tl,$l,kl,Ol,T,We,sn,on,Rl,ci,Il,Mt,an,Ll,Nl,Pl,jl,gi,yi=Wu(()=>{se=tl(),Lt={exports:{}};nl=rl(),d=el(nl);il=ul();pi={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 l=a[D],c=t.length(l);if(o>=i-(c==2?1:0))if(o+c<=s)n+=l;else break;o+=c}return n}})(pi);sl=pi.exports,ol=hi(sl),al=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},Dl=hi(al);en=10,ri=(e=0)=>t=>`\x1B[${t+e}m`,ni=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,ui=(e=0)=>(t,r,u)=>`\x1B[${38+e};2;${t};${r};${u}m`,k={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(k.modifier);ll=Object.keys(k.color),cl=Object.keys(k.bgColor);[...ll,...cl];hl=fl(),jt=new Set(["\x1B","\x9B"]),pl=39,Dn="\x07",di="[",dl="]",Fi="m",ln=`${dl}8;;`,ii=e=>`${jt.values().next().value}${di}${e}${Fi}`,si=e=>`${jt.values().next().value}${ln}${e}${Dn}`,Fl=e=>e.split(" ").map(t=>nt(t)),tn=(e,t,r)=>{let u=[...t],i=!1,s=!1,n=nt(fi(e[e.length-1]));for(let[o,a]of u.entries()){let D=nt(a);if(n+D<=r?e[e.length-1]+=a:(e.push(a),n=0),jt.has(a)&&(i=!0,s=u.slice(o+1).join("").startsWith(ln)),i){s?a===Dn&&(i=!1,s=!1):a===Fi&&(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())},ml=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(nt(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},gl=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let u="",i,s,n=Fl(e),o=[""];for(let[D,l]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let c=nt(o[o.length-1]);if(D!==0&&(c>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),c=0),(c>0||r.trim===!1)&&(o[o.length-1]+=" ",c++)),r.hard&&n[D]>t){let f=t-c,h=1+Math.floor((n[D]-f-1)/t);Math.floor((n[D]-1)/t)<h&&o.push(""),tn(o,l,t);continue}if(c+n[D]>t&&c>0&&n[D]>0){if(r.wordWrap===!1&&c<t){tn(o,l,t);continue}o.push("")}if(c+n[D]>t&&r.wordWrap===!1){tn(o,l,t);continue}o[o.length-1]+=l}r.trim!==!1&&(o=o.map(D=>ml(D)));let a=[...o.join(`
|
|
11
|
+
`)];for(let[D,l]of a.entries()){if(u+=l,jt.has(l)){let{groups:f}=new RegExp(`(?:\\${di}(?<code>\\d+)m|\\${ln}(?<uri>.*)${Dn})`).exec(a.slice(D).join(""))||{groups:{}};if(f.code!==void 0){let h=Number.parseFloat(f.code);i=h===pl?void 0:h}else f.uri!==void 0&&(s=f.uri.length===0?void 0:f.uri)}let c=hl.codes.get(Number(i));a[D+1]===`
|
|
12
|
+
`?(s&&(u+=si("")),i&&c&&(u+=ii(c))):l===`
|
|
13
|
+
`&&(i&&c&&(u+=ii(i)),s&&(u+=si(s)))}return u};Cl=["up","down","left","right","space","enter","cancel"],Pt={actions:new Set(Cl),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};globalThis.process.platform.startsWith("win");ai=Symbol("clack:cancel");yl=Object.defineProperty,Al=(e,t,r)=>t in e?yl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,te=(e,t,r)=>(Al(e,typeof t!="symbol"?t+"":t,r),r),Ue=class{constructor(t,r=!0){te(this,"input"),te(this,"output"),te(this,"_abortSignal"),te(this,"rl"),te(this,"opts"),te(this,"_render"),te(this,"_track",!1),te(this,"_prevFrame",""),te(this,"_subscribers",new Map),te(this,"_cursor",0),te(this,"state","initial"),te(this,"error",""),te(this,"value");let{input:u=ZD,output:i=QD,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(ai);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let u=new XD(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=Xu.createInterface({input:this.input,output:u,tabSize:2,prompt:"",escapeCodeTimeout:50}),Xu.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),Nt(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),Nt(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(se.cursor.show),this.output.off("resize",this.render),Nt(this.input,!1),t(ai)})})}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&Pt.aliases.has(r.name)&&this.emit("cursor",Pt.aliases.get(r.name)),Pt.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")}mi([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
|
+
`),Nt(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=oi(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
15
|
+
`).length-1;this.output.write(se.cursor.move(-999,t*-1))}render(){let t=oi(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=El(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(`
|
|
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}}},rn=class extends Ue{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})}},wl=Object.defineProperty,bl=(e,t,r)=>t in e?wl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Di=(e,t,r)=>(bl(e,typeof t!="symbol"?t+"":t,r),r),xl=class extends Ue{constructor(e){super(e,!1),Di(this,"options"),Di(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]}},vl=Object.defineProperty,Bl=(e,t,r)=>t in e?vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,li=(e,t,r)=>(Bl(e,typeof t!="symbol"?t+"":t,r),r),nn=class extends Ue{constructor(t){super(t,!1),li(this,"options"),li(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}},un=class extends Ue{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)})}};Sl=_l(),oe=(e,t)=>Sl?e:t,Tl=oe("\u276F",">"),$l=oe("\u25A0","x"),kl=oe("\u25B2","x"),Ol=oe("\u2714","\u221A"),T=oe(""),We=oe(""),sn=oe("\u25CF",">"),on=oe("\u25CB"," "),Rl=oe("\u25FB","[\u2022]"),ci=oe("\u25FC","[+]"),Il=oe("\u25FB","[ ]"),Mt=e=>{switch(e){case"initial":case"active":return d.cyan(Tl);case"cancel":return d.red($l);case"error":return d.yellow(kl);case"submit":return d.green(Ol)}},an=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((l,c,f)=>{let h=c===0&&a,p=c===f.length-1&&D;return h||p?d.dim("..."):u(l,c+o===t)})},Ll=e=>new un({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){let t=`${d.gray(T)}
|
|
19
|
+
${Mt(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(T)} ${u}
|
|
22
|
+
${d.yellow(We)} ${d.yellow(this.error)}
|
|
23
23
|
`;case"submit":return`${t}${d.gray(T)} ${d.dim(this.value||e.placeholder)}`;case"cancel":return`${t}${d.gray(T)} ${d.strikethrough(d.dim(this.value??""))}${this.value?.trim()?`
|
|
24
|
-
${d.gray(T)}`:""}`;default:return`${t}${d.cyan(T)} ${
|
|
25
|
-
${d.cyan(
|
|
26
|
-
`}}}).prompt(),
|
|
27
|
-
${
|
|
28
|
-
`,i=this.value?t:
|
|
29
|
-
${d.gray(T)}`;default:return`${
|
|
30
|
-
${d.cyan(
|
|
31
|
-
`}}}).prompt()},
|
|
32
|
-
${
|
|
33
|
-
`;switch(this.state){case"submit":return`${
|
|
34
|
-
${d.gray(T)}`;default:return`${
|
|
24
|
+
${d.gray(T)}`:""}`;default:return`${t}${d.cyan(T)} ${u}
|
|
25
|
+
${d.cyan(We)}
|
|
26
|
+
`}}}).prompt(),Nl=e=>{let t=e.active??"Yes",r=e.inactive??"No";return new rn({active:t,inactive:r,initialValue:e.initialValue??!0,render(){let u=`${d.gray(T)}
|
|
27
|
+
${Mt(this.state)} ${e.message}
|
|
28
|
+
`,i=this.value?t:r;switch(this.state){case"submit":return`${u}${d.gray(T)} ${d.dim(i)}`;case"cancel":return`${u}${d.gray(T)} ${d.strikethrough(d.dim(i))}
|
|
29
|
+
${d.gray(T)}`;default:return`${u}${d.cyan(T)} ${this.value?`${d.green(sn)} ${t}`:`${d.dim(on)} ${d.dim(t)}`} ${d.dim("/")} ${this.value?`${d.dim(on)} ${d.dim(r)}`:`${d.green(sn)} ${r}`}
|
|
30
|
+
${d.cyan(We)}
|
|
31
|
+
`}}}).prompt()},Pl=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(sn)} ${i} ${r.hint?d.dim(`(${r.hint})`):""}`;case"cancelled":return`${d.strikethrough(d.dim(i))}`;default:return`${d.dim(on)} ${d.dim(i)}`}};return new nn({options:e.options,initialValue:e.initialValue,render(){let r=`${d.gray(T)}
|
|
32
|
+
${Mt(this.state)} ${e.message}
|
|
33
|
+
`;switch(this.state){case"submit":return`${r}${d.gray(T)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${r}${d.gray(T)} ${t(this.options[this.cursor],"cancelled")}
|
|
34
|
+
${d.gray(T)}`;default:return`${r}${d.cyan(T)} ${an({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(u,i)=>t(u,i?"active":"inactive")}).join(`
|
|
35
35
|
${d.cyan(T)} `)}
|
|
36
|
-
${d.cyan(
|
|
37
|
-
`}}}).prompt()},
|
|
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
|
|
39
|
-
${
|
|
40
|
-
`,
|
|
36
|
+
${d.cyan(We)}
|
|
37
|
+
`}}}).prompt()},jl=e=>{let t=(r,u)=>{let i=r.label??String(r.value);return u==="active"?`${d.cyan(Rl)} ${i} ${r.hint?d.dim(`(${r.hint})`):""}`:u==="selected"?`${d.green(ci)} ${d.dim(i)}`:u==="cancelled"?`${d.strikethrough(d.dim(i))}`:u==="active-selected"?`${d.green(ci)} ${i} ${r.hint?d.dim(`(${r.hint})`):""}`:u==="submitted"?`${d.dim(i)}`:`${d.dim(Il)} ${d.dim(i)}`};return new xl({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(T)}
|
|
39
|
+
${Mt(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(T)} ${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(T)} ${i.trim()?`${i}
|
|
41
41
|
${d.gray(T)}`:""}`}case"error":{let i=this.error.split(`
|
|
42
|
-
`).map((s,
|
|
43
|
-
`);return`${
|
|
42
|
+
`).map((s,n)=>n===0?`${d.yellow(We)} ${d.yellow(s)}`:` ${s}`).join(`
|
|
43
|
+
`);return`${r+d.yellow(T)} ${an({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
|
|
44
44
|
${d.yellow(T)} `)}
|
|
45
45
|
${i}
|
|
46
|
-
`}default:return`${
|
|
46
|
+
`}default:return`${r}${d.cyan(T)} ${an({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
|
|
47
47
|
${d.cyan(T)} `)}
|
|
48
|
-
${d.cyan(
|
|
49
|
-
`}}}).prompt()};`${d.gray(T)}`;
|
|
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(n){let i=this.ctx,s=n.key.pop();for(let r of n.key){if(hasKey(i,r)&&(!isTable(i[r])||i[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[r]=i[r]||Table()}if(hasKey(i,s))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(n.value)||isFloat(n.value)?i[s]=n.value.valueOf():i[s]=n.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(n){return this.state.resultTable?this.state.resultTable.push(n):this.state.resultTable=[n],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(n){return this.returnNow({key:this.state.resultTable,value:n})}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(n){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,n)&&(!isTable(this.ctx[n])||this.ctx[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[n]=this.ctx[n]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,n))this.ctx=this.ctx[n]=Table();else if(isTable(this.ctx[n]))this.ctx=this.ctx[n];else if(isList(this.ctx[n]))this.ctx=this.ctx[n][this.ctx[n].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(n){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,n)||(this.ctx[n]=List()),isInlineList(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[n])){let i=Table();this.ctx[n].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,n))this.ctx=this.ctx[n]=Table();else{if(isInlineList(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[n]))this.ctx=this.ctx[n][this.ctx[n].length-1];else if(isTable(this.ctx[n]))this.ctx=this.ctx[n];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(n){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(n){return this.returnNow(n)}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(n){return this.state.buf+=n,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 n="\\u00";return this.char<16&&(n+="0"),n+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${n} instead`))}recordMultiEscapeReplacement(n){return this.state.buf+=n,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(n){try{let i=parseInt(n,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 n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}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 n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}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(n){if(this.state.resultArr){let i=this.state.resultArr[_contentType],s=tomlType(n);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(n));return isFloat(n)||isInteger(n)?this.state.resultArr.push(n.valueOf()):this.state.resultArr.push(n),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(n){let i=this.state.resultTable,s=n.key.pop();for(let r of n.key){if(hasKey(i,r)&&(!isTable(i[r])||i[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[r]=i[r]||Table()}if(hasKey(i,s))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(n.value)||isFloat(n.value)?i[s]=n.value.valueOf():i[s]=n.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 mr=Y((_C,lD)=>{"use strict";lD.exports=eF;function eF(e,t){if(e.pos==null||e.line==null)return e;let u=e.message;if(u+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
|
|
51
|
-
`,t&&t.split){let
|
|
52
|
-
`,
|
|
53
|
-
`}else
|
|
54
|
-
`}}return e.message=
|
|
55
|
-
`,e}});var
|
|
56
|
-
`)}function
|
|
48
|
+
${d.cyan(We)}
|
|
49
|
+
`}}}).prompt()};`${d.gray(T)}`;gi=Symbol.for("cancel")});function Dt(e){return e.charCodeAt(0)===65279?e.slice(1):e}function kf(e,t={}){return{sample:t.indent===void 0&&t.preserveIndentation!==!1&&Dt(e).slice(0,t?.sampleSize||1024),whiteSpace:t.preserveWhitespace===!1?void 0:{start:Tf.exec(e)?.[0]||"",end:$f.exec(e)?.[0]||""}}}function Kt(e,t,r){!t||typeof t!="object"||Object.defineProperty(t,Sf,{enumerable:!1,configurable:!0,writable:!0,value:kf(e,r)})}var Sf,Tf,$f,bn=Wu(()=>{Sf=Symbol.for("__confbox_fmt__"),Tf=/^(\s+)/,$f=/(\s+)$/});var zn=Y((CC,Ms)=>{"use strict";var Yn={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"},fp={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},hp={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?Yn.up():"");return e&&(t+=Yn.left),t}};Ms.exports={cursor:Yn,scroll:fp,erase:hp,beep:"\x07"}});var Ws=Y((EC,Kn)=>{var cr=process||{},Hs=cr.argv||[],lr=cr.env||{},pp=!(lr.NO_COLOR||Hs.includes("--no-color"))&&(!!lr.FORCE_COLOR||Hs.includes("--color")||cr.platform==="win32"||(cr.stdout||{}).isTTY&&lr.TERM!=="dumb"||!!lr.CI),dp=(e,t,r=e)=>u=>{let i=""+u,s=i.indexOf(t,e.length);return~s?e+Fp(i,t,r,s)+t:e+i+t},Fp=(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)},Us=(e=pp)=>{let t=e?dp:()=>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")}};Kn.exports=Us();Kn.exports.createColors=Us});var Aa=Y((aE,ya)=>{"use strict";var Me=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)}},vr=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},St=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 vr(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 Me("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 vr(t)}callNow(t,r){return this.call(t,r),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new Me("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 Me("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 Me("Must declare a parseStart method")}};St.END=1114112;St.Error=Me;ya.exports=St});var ba=Y((DE,wa)=>{"use strict";wa.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Br=Y((lE,xa)=>{"use strict";xa.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var Ba=Y((cE,va)=>{"use strict";var Xe=Br(),Au=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${Xe(2,this.getUTCMonth()+1)}-${Xe(2,this.getUTCDate())}`,r=`${Xe(2,this.getUTCHours())}:${Xe(2,this.getUTCMinutes())}:${Xe(2,this.getUTCSeconds())}.${Xe(3,this.getUTCMilliseconds())}`;return`${t}T${r}`}};va.exports=e=>{let t=new Au(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Ta=Y((fE,Sa)=>{"use strict";var _a=Br(),bF=global.Date,wu=class extends bF{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${_a(2,this.getUTCMonth()+1)}-${_a(2,this.getUTCDate())}`}};Sa.exports=e=>{let t=new wu(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var ka=Y((hE,$a)=>{"use strict";var _r=Br(),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())}`}};$a.exports=e=>{let t=new bu(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Sr=Y((exports,module)=>{"use strict";module.exports=makeParserClass(Aa());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=ba(),createDateTimeFloat=Ba(),createDate=Ta(),createTime=ka(),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 Tr=Y((pE,Oa)=>{"use strict";Oa.exports=xF;function xF(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
|
+
`,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
|
+
`,r+=s+" ";for(let a=0;a<e.col;++a)r+=" ";r+=`^
|
|
53
|
+
`}else r+=o+": "+u[n]+`
|
|
54
|
+
`}}return e.message=r+`
|
|
55
|
+
`,e}});var Ia=Y((dE,Ra)=>{"use strict";Ra.exports=_F;var vF=Sr(),BF=Tr();function _F(e){global.Buffer&&global.Buffer.isBuffer(e)&&(e=e.toString("utf8"));let t=new vF;try{return t.parse(e),t.finish()}catch(r){throw BF(r,e)}}});var Pa=Y((FE,Na)=>{"use strict";Na.exports=TF;var SF=Sr(),La=Tr();function TF(e,t){t||(t={});let r=0,u=t.blocksize||40960,i=new SF;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(l){return D(La(l,e))}try{i.parse(e.slice(n,n+o)),setImmediate(s,n+o,o,a,D)}catch(l){D(La(l,e))}}}});var Ha=Y((mE,Ma)=>{"use strict";Ma.exports=kF;var $F=SD("stream"),ja=Sr();function kF(e){return e?OF(e):RF(e)}function OF(e){let t=new ja;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(l){u(l)}}function a(l){n=!0,u(l)}e.once("end",o),e.once("error",a),D();function D(){i=!0;let l;for(;(l=e.read())!==null;)try{t.parse(l)}catch(c){return a(c)}if(i=!1,s)return o();n||e.once("readable",D)}})}function RF(){let e=new ja;return new $F.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 Ua=Y((gE,Tt)=>{"use strict";Tt.exports=Ia();Tt.exports.async=Pa();Tt.exports.stream=Ha();Tt.exports.prettyError=Tr()});var Ja=Y((CE,Bu)=>{"use strict";Bu.exports=IF;Bu.exports.value=vu;function IF(e){if(e===null)throw He("null");if(e===void 0)throw He("undefined");if(typeof e!="object")throw He(typeof e);if(typeof e.toJSON=="function"&&(e=e.toJSON()),e==null)return null;let t=ee(e);if(t!=="table")throw He(t);return xu("","",e)}function He(e){return new Error("Can only stringify objects, not "+e)}function LF(){return new Error("Array values can't have mixed types")}function Wa(e){return Object.keys(e).filter(t=>Va(e[t]))}function NF(e){return Object.keys(e).filter(t=>!Va(e[t]))}function $r(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 xu(e,t,r){r=$r(r);var u,i;u=Wa(r),i=NF(r);var s=[],n=t||"";u.forEach(a=>{var D=ee(r[a]);D!=="undefined"&&D!=="null"&&s.push(n+kr(a)+" = "+za(r[a],!0))}),s.length>0&&s.push("");var o=e&&u.length>0?t+" ":"";return i.forEach(a=>{s.push(KF(e,o,a,r[a]))}),s.join(`
|
|
56
|
+
`)}function Va(e){switch(ee(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||ee(e[0])!=="table";case"table":return Object.keys(e).length===0;default:return!1}}function ee(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 kr(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:Ga(t)}function Ga(e){return'"'+Ya(e).replace(/"/g,'\\"')+'"'}function PF(e){return"'"+e+"'"}function jF(e,t){for(;t.length<e;)t="0"+t;return t}function Ya(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"+jF(4,t.codePointAt(0).toString(16)))}function MF(e){let t=e.split(/\n/).map(r=>Ya(r).replace(/"(?="")/g,'\\"')).join(`
|
|
57
57
|
`);return t.slice(-1)==='"'&&(t+=`\\
|
|
58
58
|
`),`"""
|
|
59
|
-
`+t+'"""'}function
|
|
60
|
-
`+
|
|
59
|
+
`+t+'"""'}function za(e,t){let r=ee(e);return r==="string"&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),vu(e,r)}function vu(e,t){switch(t||(t=ee(e)),t){case"string-multiline":return MF(e);case"string":return Ga(e);case"string-literal":return PF(e);case"integer":return Ka(e);case"float":return HF(e);case"boolean":return UF(e);case"datetime":return WF(e);case"array":return YF(e.filter(r=>ee(r)!=="null"&&ee(r)!=="undefined"&&ee(r)!=="nan"));case"table":return zF(e);default:throw He(t)}}function Ka(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function HF(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 Ka(r)+"."+u}function UF(e){return String(e)}function WF(e){return e.toISOString()}function VF(e){return e==="float"||e==="integer"}function GF(e){var t=ee(e[0]);return e.every(r=>ee(r)===t)?t:e.every(r=>VF(ee(r)))?"float":"mixed"}function qa(e){let t=GF(e);if(t==="mixed")throw LF();return t}function YF(e){e=$r(e);let t=qa(e);var r="[",u=e.map(i=>vu(i,t));return u.join(", ").length>60||/\n/.test(u)?r+=`
|
|
60
|
+
`+u.join(`,
|
|
61
61
|
`)+`
|
|
62
|
-
`:
|
|
63
|
-
`),
|
|
64
|
-
`,
|
|
65
|
-
`),s+
|
|
62
|
+
`:r+=" "+u.join(", ")+(u.length>0?" ":""),r+"]"}function zF(e){e=$r(e);var t=[];return Object.keys(e).forEach(r=>{t.push(kr(r)+" = "+za(e[r],!1))}),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}function KF(e,t,r,u){var i=ee(u);if(i==="array")return qF(e,t,r,u);if(i==="table")return JF(e,t,r,u);throw He(i)}function qF(e,t,r,u){u=$r(u),qa(u);var i=ee(u[0]);if(i!=="table")throw He(i);var s=e+kr(r),n="";return u.forEach(o=>{n.length>0&&(n+=`
|
|
63
|
+
`),n+=t+"[["+s+`]]
|
|
64
|
+
`,n+=xu(s+".",t,o)}),n}function JF(e,t,r,u){var i=e+kr(r),s="";return Wa(u).length>0&&(s+=t+"["+i+`]
|
|
65
|
+
`),s+xu(i+".",t,u)}});var Za=Y(_u=>{"use strict";_u.parse=Ua();_u.stringify=Ja()});var V={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:V.fatal},error:{level:V.error},warn:{level:V.warn},log:{level:V.log},info:{level:V.info},success:{level:V.success},fail:{level:V.fail},ready:{level:V.info},start:{level:V.info},box:{level:V.info},debug:{level:V.debug},trace:{level:V.trace},verbose:{level:V.verbose}};function Yr(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 Jr(e,t,r=".",u){if(!Yr(t))return Jr(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]]:Yr(n)&&Yr(i[s])?i[s]=Jr(n,i[s],(r?`${r}.`:"")+s.toString(),u):i[s]=n))}return i}function kD(e){return(...t)=>t.reduce((r,u)=>Jr(r,u,"",e),{})}var OD=kD();function RD(e){return Object.prototype.toString.call(e)==="[object Object]"}function ID(e){return!(!RD(e)||!e.message&&!e.args||e.stack)}var zr=!1,Vu=[],U=class e{options;_lastLog;_mockFn;constructor(t={}){let r=t.types||qr;this.options=OD({...t,defaults:{...t.defaults},level:Kr(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=Kr(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(){zr=!0}resumeLogs(){zr=!1;let t=Vu.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(zr){Vu.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:Kr(t.level,this.options.types)};!u&&r.length===1&&ID(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
|
|
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 Kr(e,t={},r=3){return e===void 0?r:typeof e=="number"?e:t[e]&&t[e].level!==void 0?t[e].level:r}U.prototype.add=U.prototype.addReporter;U.prototype.remove=U.prototype.removeReporter;U.prototype.clear=U.prototype.removeReporter;U.prototype.withScope=U.prototype.withTag;U.prototype.mock=U.prototype.mockTypes;U.prototype.pause=U.prototype.pauseLogs;U.prototype.resume=U.prototype.resumeLogs;function Gu(e={}){return new U(e)}import{formatWithOptions as Yu}from"node:util";import{sep as LD}from"node:path";function Qr(e,t){let r=process.cwd()+LD;return e.split(`
|
|
69
69
|
`).splice(t.split(`
|
|
70
|
-
`).length).map(i=>i.trim().replace("file://","").replace(
|
|
71
|
-
${i}`)}formatError(t,
|
|
70
|
+
`).length).map(i=>i.trim().replace("file://","").replace(r,""))}function ND(e,t){return(t.__write||t.write).call(t,e)}var Zr=e=>e?`[${e}]`:"",rt=class{formatStack(t,r,u){let i=" ".repeat((u?.errorLevel||0)+1);return i+Qr(t,r).join(`
|
|
71
|
+
${i}`)}formatError(t,r){let u=t.message??Yu(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
|
-
`+this.formatError(t.cause,{...
|
|
74
|
-
`+i+o}formatArgs(t,
|
|
75
|
-
`+[
|
|
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 Yu(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
|
+
`+[Zr(t.tag),t.title&&t.title,...u.split(`
|
|
76
76
|
`)].filter(Boolean).map(i=>" > "+i).join(`
|
|
77
77
|
`)+`
|
|
78
|
-
`:this.filterAndJoin([
|
|
79
|
-
`,t.level<2?
|
|
80
|
-
`),i=[],s=
|
|
81
|
-
`)}var Tt=Object.create(null),Xe=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Tt:globalThis),Ee=new Proxy(Tt,{get(e,t){return Xe()[t]??Tt[t]},has(e,t){let u=Xe();return t in u||t in Tt},set(e,t,u){let n=Xe(!0);return n[t]=u,!0},deleteProperty(e,t){if(!t)return!1;let u=Xe(!0);return delete u[t],!0},ownKeys(){let e=Xe(!0);return Object.keys(e)}}),ml=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 Cl(){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 li=Cl();li.name;function Be(e){return e?e!=="false":!1}var El=globalThis.process?.platform||"",Qr=Be(Ee.CI)||li.ci!==!1,ci=Be(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),yl=Be(Ee.DEBUG),Xr=ml==="test"||Be(Ee.TEST);Be(Ee.MINIMAL);var Al=/^win/i.test(El);!Be(Ee.NO_COLOR)&&(Be(Ee.FORCE_COLOR)||(ci||Al)&&Ee.TERM);var wl=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(wl?.split(".")[0]);var bl=globalThis.process||Object.create(null),oi={versions:{}};new Proxy(bl,{get(e,t){if(t==="env")return Ee;if(t in e)return e[t];if(t in oi)return oi[t]}});var xl=globalThis.process?.release?.name==="node",Bl=!!globalThis.Bun||!!globalThis.process?.versions?.bun,vl=!!globalThis.Deno,_l=!!globalThis.fastly,Sl=!!globalThis.Netlify,Tl=!!globalThis.EdgeRuntime,$l=globalThis.navigator?.userAgent==="Cloudflare-Workers",kl=[[Sl,"netlify"],[Tl,"edge-light"],[$l,"workerd"],[_l,"fastly"],[vl,"deno"],[Bl,"bun"],[xl,"node"]];function Ol(){let e=kl.find(t=>t[0]);if(e)return{name:e[1]}}var Rl=Ol();Rl?.name;function Il({onlyFirst:e=!1}={}){let u=["[\\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(u,e?void 0:"g")}var Ll=Il();function Nl(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Ll,"")}function Pl(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 jl(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Ml(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 Hl(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Ul(e,{ambiguousAsWide:t=!1}={}){return Hl(e),jl(e)||Ml(e)||t&&Pl(e)?2:1}var Wl=()=>/[#*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,Vl=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:e=>e.split("")},Gl=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Yl(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=Nl(e)),e.length===0)return 0;let i=0,s={ambiguousAsWide:!u};for(let{segment:r}of Vl.segment(e)){let o=r.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)&&!Gl.test(r)){if(Wl().test(r)){i+=2;continue}i+=Ul(o,s)}}return i}function zl(){let{env:e}=si,{TERM:t,TERM_PROGRAM:u}=e;return si.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||u==="Terminus-Sublime"||u==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Kl={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},ql={0:"red",1:"yellow"},Jl=zl(),ae=(e,t)=>Jl?e:t,Di={error:ae("\u2716","\xD7"),fatal:ae("\u2716","\xD7"),ready:ae("\u2714","\u221A"),warn:ae("\u26A0","\u203C"),info:ae("\u2139","i"),success:ae("\u2714","\u221A"),debug:ae("\u2699","D"),trace:ae("\u2192","\u2192"),fail:ae("\u2716","\xD7"),start:ae("\u25D0","o"),log:""};function ai(e){return!(typeof Intl=="object")||!Intl.Segmenter?ge(e).length:Yl(e)}var Zr=class extends Ze{formatStack(t,u,n){let i=" ".repeat((n?.errorLevel||0)+1);return`
|
|
82
|
-
${i}`+
|
|
83
|
-
${i}`)}formatType(t,u
|
|
84
|
-
`);if(t.type==="box")return
|
|
78
|
+
`:this.filterAndJoin([Zr(t.type),Zr(t.tag),u])}log(t,r){let u=this.formatLogObj(t,{columns:r.options.stdout.columns||0,...r.options.formatOptions});return ND(u+`
|
|
79
|
+
`,t.level<2?r.options.stderr||process.stderr:r.options.stdout||process.stdout)}};import Ai from"node:process";import*as It from"node:tty";var{env:ye={},argv:qu=[],platform:PD=""}=typeof process>"u"?{}:process,jD="NO_COLOR"in ye||qu.includes("--no-color"),MD="FORCE_COLOR"in ye||qu.includes("--color"),HD=PD==="win32",Ju=ye.TERM==="dumb",UD=It&&It.isatty&&It.isatty(1)&&ye.TERM&&!Ju,WD="CI"in ye&&("GITHUB_ACTIONS"in ye||"GITLAB_CI"in ye||"CIRCLECI"in ye),VD=!jD&&(MD||HD&&!Ju||UD||WD);function Zu(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:Zu(n,s,r,u))}function GD(e,t,r,u,i){return e<0?r+t+u:r+Zu(e,t,u,i)+u}function YD(e,t,r=e,u=e.length+1){return i=>i||!(i===""||i===void 0)?GD((""+i).indexOf(t,u),i,e,t,r):""}function w(e,t,r){return YD(`\x1B[${e}m`,`\x1B[${t}m`,r)}var zu={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=VD){return e?zu:Object.fromEntries(Object.keys(zu).map(t=>[t,String]))}var q=zD();function KD(e,t="reset"){return q[e]||q[t]}var qD=[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 Ee(e){return e.replace(new RegExp(qD,"g"),"")}var Ku={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"}},JD={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1};function Qu(e,t={}){let r={...t,style:{...JD,...t.style}},u=e.split(`
|
|
80
|
+
`),i=[],s=KD(r.style.borderColor),n={...typeof r.style.borderStyle=="string"?Ku[r.style.borderStyle]||Ku.solid:r.style.borderStyle};if(s)for(let h in n)n[h]=s(n[h]);let o=r.style.padding%2===0?r.style.padding:r.style.padding+1,a=u.length+o,D=Math.max(...u.map(h=>Ee(h).length),r.title?Ee(r.title).length:0)+o,l=D+o,c=r.style.marginLeft>0?" ".repeat(r.style.marginLeft):"";if(r.style.marginTop>0&&i.push("".repeat(r.style.marginTop)),r.title){let h=s?s(r.title):r.title,p=n.h.repeat(Math.floor((D-Ee(r.title).length)/2)),E=n.h.repeat(D-Ee(r.title).length-Ee(p).length+o);i.push(`${c}${n.tl}${p}${h}${E}${n.tr}`)}else i.push(`${c}${n.tl}${n.h.repeat(l)}${n.tr}`);let f=r.style.valign==="center"?Math.floor((a-u.length)/2):r.style.valign==="top"?a-u.length-o:a-u.length;for(let h=0;h<a;h++)if(h<f||h>=f+u.length)i.push(`${c}${n.v}${" ".repeat(l)}${n.v}`);else{let p=u[h-f],E=" ".repeat(o),C=" ".repeat(D-Ee(p).length);i.push(`${c}${n.v}${E}${p}${C}${n.v}`)}return i.push(`${c}${n.bl}${n.h.repeat(l)}${n.br}`),r.style.marginBottom>0&&i.push("".repeat(r.style.marginBottom)),i.join(`
|
|
81
|
+
`)}var Ut=Object.create(null),ut=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Ut:globalThis),Ae=new Proxy(Ut,{get(e,t){return ut()[t]??Ut[t]},has(e,t){let r=ut();return t in r||t in Ut},set(e,t,r){let u=ut(!0);return u[t]=r,!0},deleteProperty(e,t){if(!t)return!1;let r=ut(!0);return delete r[t],!0},ownKeys(){let e=ut(!0);return Object.keys(e)}}),Ml=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",Hl=[["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 Ul(){if(globalThis.process?.env)for(let e of Hl){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 vi=Ul();vi.name;function Se(e){return e?e!=="false":!1}var Wl=globalThis.process?.platform||"",fn=Se(Ae.CI)||vi.ci!==!1,Bi=Se(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),Vl=Se(Ae.DEBUG),hn=Ml==="test"||Se(Ae.TEST);Se(Ae.MINIMAL);var Gl=/^win/i.test(Wl);!Se(Ae.NO_COLOR)&&(Se(Ae.FORCE_COLOR)||(Bi||Gl)&&Ae.TERM);var Yl=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(Yl?.split(".")[0]);var zl=globalThis.process||Object.create(null),wi={versions:{}};new Proxy(zl,{get(e,t){if(t==="env")return Ae;if(t in e)return e[t];if(t in wi)return wi[t]}});var Kl=globalThis.process?.release?.name==="node",ql=!!globalThis.Bun||!!globalThis.process?.versions?.bun,Jl=!!globalThis.Deno,Zl=!!globalThis.fastly,Ql=!!globalThis.Netlify,Xl=!!globalThis.EdgeRuntime,ec=globalThis.navigator?.userAgent==="Cloudflare-Workers",tc=[[Ql,"netlify"],[Xl,"edge-light"],[ec,"workerd"],[Zl,"fastly"],[Jl,"deno"],[ql,"bun"],[Kl,"node"]];function rc(){let e=tc.find(t=>t[0]);if(e)return{name:e[1]}}var nc=rc();nc?.name;function uc({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 ic=uc();function sc(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(ic,"")}function oc(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 ac(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Dc(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 lc(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function cc(e,{ambiguousAsWide:t=!1}={}){return lc(e),ac(e)||Dc(e)||t&&oc(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,hc=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:e=>e.split("")},pc=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function dc(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:u=!1}=t;if(u||(e=sc(e)),e.length===0)return 0;let i=0,s={ambiguousAsWide:!r};for(let{segment:n}of hc.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)&&!pc.test(n)){if(fc().test(n)){i+=2;continue}i+=cc(o,s)}}return i}function Fc(){let{env:e}=Ai,{TERM:t,TERM_PROGRAM:r}=e;return Ai.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 mc={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},gc={0:"red",1:"yellow"},Cc=Fc(),le=(e,t)=>Cc?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 xi(e){return!(typeof Intl=="object")||!Intl.Segmenter?Ee(e).length:dc(e)}var cn=class extends rt{formatStack(t,r,u){let i=" ".repeat((u?.errorLevel||0)+1);return`
|
|
82
|
+
${i}`+Qr(t,r).map(s=>" "+s.replace(/^at +/,n=>q.gray(n)).replace(/\((.+)\)/,(n,o)=>`(${q.cyan(o)})`)).join(`
|
|
83
|
+
${i}`)}formatType(t,r,u){let i=mc[t.type]||gc[t.level]||"gray";if(r)return yc(i)(q.black(` ${t.type.toUpperCase()} `));let s=typeof bi[t.type]=="string"?bi[t.type]:t.icon||t.type;return s?Ec(i)(s):""}formatLogObj(t,r){let[u,...i]=this.formatArgs(t.args,r).split(`
|
|
84
|
+
`);if(t.type==="box")return Qu(Ht(u+(i.length>0?`
|
|
85
85
|
`+i.join(`
|
|
86
|
-
`):"")),{title:t.title?
|
|
86
|
+
`):"")),{title:t.title?Ht(t.title):void 0,style:t.style});let s=this.formatDate(t.date,r),n=s&&q.gray(s),o=t.badge??t.level<2,a=this.formatType(t,o,r),D=t.tag?q.gray(t.tag):"",l,c=this.filterAndJoin([a,Ht(u)]),f=this.filterAndJoin(r.columns?[D,n]:[D]),h=(r.columns||0)-xi(c)-xi(f)-2;if(l=h>0&&(r.columns||0)>=80?c+" ".repeat(h)+f:(f?`${q.gray(`[${f}]`)} `:"")+c,l+=Ht(i.length>0?`
|
|
87
87
|
`+i.join(`
|
|
88
|
-
`):""),t.type==="trace"){let p=new Error("Trace: "+t.message);
|
|
89
|
-
`+
|
|
90
|
-
`:
|
|
91
|
-
`,{mode:384}),await
|
|
88
|
+
`):""),t.type==="trace"){let p=new Error("Trace: "+t.message);l+=this.formatStack(p.stack||"",p.message)}return o?`
|
|
89
|
+
`+l+`
|
|
90
|
+
`:l}};function Ht(e){return e.replace(/`([^`]+)`/gm,(t,r)=>q.cyan(r)).replace(/\s+_([^_]+)_\s+/gm,(t,r)=>` ${q.underline(r)} `)}function Ec(e="white"){return q[e]||q.white}function yc(e="bgWhite"){return q[`bg${e[0].toUpperCase()}${e.slice(1)}`]||q.bgWhite}function Ac(e={}){let t=wc();return process.env.CONSOLA_LEVEL&&(t=Number.parseInt(process.env.CONSOLA_LEVEL)??t),Gu({level:t,defaults:{level:t},stdout:process.stdout,stderr:process.stderr,prompt:(...u)=>Promise.resolve().then(()=>(yi(),Ei)).then(i=>i.prompt(...u)),reporters:e.reporters||[e.fancy??!(fn||hn)?new cn:new rt],...e})}function wc(){return Vl?V.debug:hn?V.warn:V.info}var m=Ac();var bc="https://shaders.com";function Z(){return(process.env.SHADERS_API_URL||bc).replace(/\/+$/,"")}var J=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}};async function z(e,t={}){let r=new URL(e,Z()+"/");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 J(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 J(i.status,o,n&&typeof n=="object"?n:null)}return n}import{spawn as xc}from"node:child_process";import{chmod as vc,mkdir as Bc,readFile as _c,rm as Sc,writeFile as Tc}from"node:fs/promises";import{homedir as $c}from"node:os";import _i from"node:path";var kc=2e3,Oc=10*6e4,Si=6e4;function Ti(){return process.env.SHADERS_HOME||_i.join($c(),".shaders")}function Wt(){return _i.join(Ti(),"credentials.json")}async function pn(){try{let e=JSON.parse(await _c(Wt(),"utf8"));return typeof e.accessToken!="string"||e.host!==Z()?null:e}catch{return null}}async function $i(e){await Bc(Ti(),{recursive:!0,mode:448}),await Tc(Wt(),JSON.stringify(e,null,2)+`
|
|
91
|
+
`,{mode:384}),await vc(Wt(),384).catch(()=>{})}async function ki(){let e=await pn();return await Sc(Wt(),{force:!0}),e!==null}function Oi(e){return{host:Z(),accessToken:e.access_token,refreshToken:e.refresh_token,expiresAt:e.expires_in?Date.now()+e.expires_in*1e3:void 0}}function st(e){let[t,r]=process.platform==="darwin"?["open",[e]]:process.platform==="win32"?["cmd",["/c","start","",e.replace(/&/g,"^&")]]:["xdg-open",[e]];try{let u=xc(t,r,{stdio:"ignore",detached:!0});u.on("error",()=>{}),u.unref()}catch{}}var Rc=e=>new Promise(t=>setTimeout(t,e));async function dn(){let{url:e,readKey:t}=await z("/api/plugin-auth/authorize",{method:"POST"});m.info(`Opening your browser to sign in to Shaders\u2026
|
|
92
92
|
If it doesn't open, visit:
|
|
93
|
-
${e}`),fc(e),_.start("Waiting for you to finish signing in");let u=Date.now()+lc;for(;Date.now()<u;){await hc(ac);let n;try{n=await se("/api/plugin-auth/poll",{method:"POST",query:{readKey:t}})}catch(i){if(i instanceof ie&&(i.status===404||i.status===410))throw new Error("The sign-in session expired. Run the command again to start over.");continue}if(n&&typeof n.access_token=="string"){let i=gi(n);return await Fi(i),i}}throw new Error("Timed out waiting for sign-in. Run the command again to start over.")}async function fi(e){if(!e.refreshToken)return null;try{let t=await se("/api/plugin-auth/refresh",{method:"POST",body:{refresh_token:e.refreshToken}}),u=gi({...t,refresh_token:t.refresh_token??e.refreshToken});return await Fi(u),u}catch{return null}}async function eu(e){return se("/api/plugin/me",{token:e.accessToken})}async function ye(){let e=await di();if(e&&(e.expiresAt&&e.expiresAt-cc<Date.now()&&(e=await fi(e)),e))try{return{credentials:e,me:await eu(e)}}catch(u){if(!(u instanceof ie)||u.status!==401)throw u;let n=await fi(e);if(n)try{return{credentials:n,me:await eu(n)}}catch(i){if(!(i instanceof ie)||i.status!==401)throw i}}let t=await pc();return{credentials:t,me:await eu(t)}}function le(e){console.error(`\u2717 ${e}`),process.exit(1)}import zt from"node:path";import{createRequire as Kc}from"node:module";import{existsSync as et}from"node:fs";import{readFile as uu}from"node:fs/promises";var dc=/^[A-Za-z]:\//;function Ci(e=""){return e&&e.replace(/\\/g,"/").replace(dc,t=>t.toUpperCase())}var Fc=/^[/\\]{2}/,mc=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,gc=/^[A-Za-z]:$/;var _e=function(e){if(e.length===0)return".";e=Ci(e);let t=e.match(Fc),u=ve(e),n=e[e.length-1]==="/";return e=tu(e,!u),e.length===0?u?"/":n?"./":".":(n&&(e+="/"),gc.test(e)&&(e+="/"),t?u?`//${e}`:`//./${e}`:u&&!ve(e)?`/${e}`:e)},Se=function(...e){let t="";for(let u of e)if(u)if(t.length>0){let n=t[t.length-1]==="/",i=u[0]==="/";n&&i?t+=u.slice(1):t+=n||i?u:`/${u}`}else t+=u;return _e(t)};function Cc(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var Te=function(...e){e=e.map(n=>Ci(n));let t="",u=!1;for(let n=e.length-1;n>=-1&&!u;n--){let i=n>=0?e[n]:Cc();!i||i.length===0||(t=`${i}/${t}`,u=ve(i))}return t=tu(t,!u),u&&!ve(t)?`/${t}`:t.length>0?t:"."};function tu(e,t){let u="",n=0,i=-1,s=0,r=null;for(let o=0;o<=e.length;++o){if(o<e.length)r=e[o];else{if(r==="/")break;r="/"}if(r==="/"){if(!(i===o-1||s===1))if(s===2){if(u.length<2||n!==2||u[u.length-1]!=="."||u[u.length-2]!=="."){if(u.length>2){let D=u.lastIndexOf("/");D===-1?(u="",n=0):(u=u.slice(0,D),n=u.length-1-u.lastIndexOf("/")),i=o,s=0;continue}else if(u.length>0){u="",n=0,i=o,s=0;continue}}t&&(u+=u.length>0?"/..":"..",n=2)}else u.length>0?u+=`/${e.slice(i+1,o)}`:u=e.slice(i+1,o),n=o-i-1;i=o,s=0}else r==="."&&s!==-1?++s:s=-1}return u}var ve=function(e){return mc.test(e)};import{spawn as yc,spawnSync as o2}from"node:child_process";import{cwd as xi}from"node:process";import{basename as Ac,delimiter as kt,dirname as Ei,normalize as wc,resolve as Bi}from"node:path";import{fileURLToPath as bc}from"node:url";import{pipeline as xc}from"node:stream/promises";import{PassThrough as Bc}from"node:stream";import vc from"node:readline";import{closeSync as _c,openSync as Sc,readSync as Tc,statSync as $c}from"node:fs";var kc=/^path$/i,yi={key:"PATH",value:""};function vi(e){for(let t in e){if(!Object.prototype.hasOwnProperty.call(e,t)||!kc.test(t))continue;let u=e[t];return u?{key:t,value:u}:yi}return yi}function Oc(e,t){let u=t.value.split(kt),n=[],i=typeof e=="string"?e:bc(e,{windows:!1}),s;do n.push(Bi(i,"node_modules",".bin")),s=i,i=Ei(i);while(i!==s);n.push(Ei(process.execPath));let r=n.concat(u).join(kt);return{key:t.key,value:r}}function Rc(e,t,u=!0){let n={...process.env,...t};if(!u)return n;let i=Oc(e,vi(n));return n[i.key]=i.value,n}var Ic=e=>{let t=e.length,u=new Bc,n=()=>{--t===0&&u.end()};for(let i of e)xc(i,u,{end:!1}).then(n).catch(n);return u},ru=/([()\][%!^"`<>&|;, *?])/g,Lc=/^#!\s*(.+)/,Nc=/\.(?:com|exe)$/i,Pc=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,jc=process.platform==="win32",Mc=[".EXE",".CMD",".BAT",".COM"],Hc=[""];function Uc(e,t=[],u={}){if(u.shell===!0||!jc)return{command:e,args:t,options:u};let n=Ai(e,u),i=null;if(n!==null){let r=Buffer.alloc(150),o=null;try{o=Sc(n,"r"),Tc(o,r,0,150,0)}catch{}finally{o!==null&&_c(o)}let D=r.toString().match(Lc);if(D!==null){let a=D[1].trim(),c=a.indexOf(" "),l=c!==-1?a.slice(0,c):a,f=c!==-1?a.slice(c+1):"",h=Ac(l);i=h==="env"?f||null:h}}if(i!==null&&n!==null&&(t=[n,...t],e=i,n=Ai(e,u)),n===null||!Nc.test(n)){let s=n!==null&&Pc.test(n);e=wc(e),e=e.replace(ru,"^$1"),t=t.map(r=>(r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),r=r.replace(/(?=(\\+?)?)\1$/,"$1$1"),r=`"${r}"`,r=r.replace(ru,"^$1"),s&&(r=r.replace(ru,"^$1")),r)),t=["/d","/s","/c",`"${[e,...t].join(" ")}"`],e=u.env?.comspec??"cmd.exe",u={...u,windowsVerbatimArguments:!0}}return{command:e,args:t,options:u}}function Ai(e,t){let u=(t.cwd??xi()).toString(),n=t.env??process.env,i=vi(n).value,s=e.includes("/")||e.includes("\\")?[""]:[u,...i.split(kt)],r=n.PATHEXT?n.PATHEXT.split(kt):Mc;e.includes(".")&&r[0]!==""&&(r=["",...r]);for(let o of[r,Hc])for(let D of s){let a=D.startsWith('"')&&D.endsWith('"')&&D.length>1?D.slice(1,-1):D,c=Bi(u,a,e);for(let l of o){let f=c+l;try{if($c(f).isFile())return f}catch{}}}return null}var wi=class extends Error{result;output;exitCode;get signalCode(){return this.result.signalCode}constructor(e,t,u,n){let i="The process";u&&(i=`The command \`${n?.length?`${u} ${n.map(r=>/[ "'`()]/.test(r)?JSON.stringify(r):r).join(" ")}`:u}\``);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 Wc={timeout:void 0,persist:!1};var Vc={windowsHide:!0};function Gc(e){let t=new AbortController;for(let u of e){if(u.aborted)return t.abort(),u;let n=()=>{t.abort(u.reason)};u.addEventListener("abort",n,{signal:t.signal})}return t.signal}async function bi(e){let t="";try{for await(let u of e)t+=u.toString()}catch{}return t}var Yc=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,u){this._options={...Wc,...u},this._command=e,this._args=t??[],this._processClosed=new Promise(n=>{this._resolveClose=n})}kill(e){return this._process?.kill(e)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(e,t,u){return zc(e,t,{...u,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 u=Ic(t),n=vc.createInterface({input:u});for await(let i of n)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,u]=await Promise.all([this._streamOut?bi(this._streamOut):"",this._streamErr?bi(this._streamErr):""]);await this._processClosed;let{stdin:n}=this._options;if(n&&typeof n!="string"&&await n,e.removeAllListeners(),this._thrownError)throw this._thrownError;let i={stderr:u,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={...Vc,...e.nodeOptions},u=t?.cwd??xi(),n=[];this._resetState(),e.timeout!==void 0&&n.push(AbortSignal.timeout(e.timeout)),e.signal!==void 0&&n.push(e.signal),e.persist===!0&&(t.detached=!0),n.length>0&&(t.signal=Gc(n)),t.env=Rc(u,t.env,e.nodePath);let i=Uc(this._command,this._args,t),s=yc(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:r}=e;typeof r=="string"?s.stdin.end(r):r?.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 Ot=(e,t,u)=>{let n=new Yc(e,t,u);return n.spawn(),n},zc=Ot;import{join as nu}from"node:path";async function iu(e,t,u={}){let n=_e(e).split("/");for(;n.length>0;){let i=await t(n.join("/")||"/");if(i||!u.includeParentDirs)return i;n.pop()}}async function Si(e,t={}){return iu(e,u=>{let n=nu(u,"package.json");if(et(n))return uu(n,"utf8").then(i=>JSON.parse(i))},t)}async function qc(e,t){let u=await iu(t,n=>{let i=nu(n,"node_modules",e,"package.json");if(et(i))return i},{includeParentDirs:!0});if(!u)return null;try{return JSON.parse(await uu(u,"utf8"))}catch{return null}}async function Jc(e,t){let u;try{u=e.resolve(t)}catch{return null}return Si(u,{includeParentDirs:!0})}function Zc(e){let t;return()=>(t===void 0&&(t=e().then(u=>(t=u,t))),t)}var Qc=Zc(async()=>{if(globalThis.process?.versions?.webcontainer)return!1;try{let{exitCode:e}=await Ot("corepack",["--version"]);return e===0}catch{return!1}});async function Xc(e,t,u={}){let n=e!=="npm"&&e!=="bun"&&e!=="deno"&&e!=="aube"&&e!=="nub"&&u.corepack!==!1&&await Qc()?["corepack",[e,...t]]:[e,t],i=process.stdin.isTTY?"inherit":"ignore",s=u.silent?[i,"pipe","pipe"]:[i,"inherit","inherit"],{exitCode:r,stdout:o,stderr:D}=await Ot(n[0],n[1],{nodeOptions:{cwd:Te(u.cwd||process.cwd()),env:u.env,stdio:s}});if(r!==0)throw new Error(`\`${n.flat().join(" ")}\` failed.${u.silent?["",o,D].join(`
|
|
94
|
-
`):""}`)}var
|
|
95
|
-
`)}async function
|
|
96
|
-
${
|
|
97
|
-
${
|
|
98
|
-
`){
|
|
99
|
-
`)s=!1,o+=
|
|
100
|
-
`&&(o+=e.slice(r,l),r=l,a=-1))}let c=s===Pt?n(e,r):e.slice(r);return D+o+c}au();function Pi(e,t){let u=JSON.parse(tt(e),t?.reviver);return Nt(e,u,t),u}function ji(e,t){let u=JSON.parse(Ni(tt(e),{trailingCommas:t?.allowTrailingComma}));return Nt(e,u,t),u}import Ff,{lstatSync as mf,realpathSync as Ji,statSync as du}from"node:fs";import{URL as M,fileURLToPath as B,pathToFileURL as ce}from"node:url";import Fu,{isAbsolute as gf}from"node:path";import fe from"node:assert";import $e from"node:process";import{format as Zi,inspect as pu}from"node:util";var mu=["_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"],Cf=/^([A-Z][a-z\d]*)+$/,Ef=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),gu=new Map;function lu(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 Qi(e){let t=0,u=/%[dfijoOs]/g;for(;u.exec(e)!==null;)t++;return t}function oe(e,t,u){return gu.set(e,t),yf(u,e)}var cu=Symbol("kIsNodeError");function yf(e,t){let u=gu.get(t),n=typeof u=="string"?Qi(u):-1;switch(n){case 0:{class i extends e{code=t;constructor(...r){fe.ok(r.length===0,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),super(u)}get["constructor"](){return e}get[cu](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}case-1:{class i extends e{code=t;constructor(...r){super(),Object.defineProperty(this,"message",{value:Af(t,r,this),enumerable:!1,writable:!0,configurable:!0})}get["constructor"](){return e}get[cu](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}default:{class i extends e{code=t;constructor(...r){fe.ok(r.length===n,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.unshift(u),super(Reflect.apply(Zi,null,r))}get["constructor"](){return e}get[cu](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}}}function Af(e,t,u){let n=gu.get(e);if(fe.ok(n!==void 0,"expected `message` to be found"),typeof n=="function")return fe.ok(n.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${n.length}).`),Reflect.apply(n,u,t);let i=Qi(n);return fe.ok(i===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${i}).`),t.length===0?n:(t.unshift(n),Reflect.apply(Zi,null,t))}function wf(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}`:`${pu(e,{depth:-1})}`;case"string":{let u=e;return u.length>28&&(u=`${u.slice(0,25)}...`),u.includes("'")?`type string (${JSON.stringify(u)})`:`type string ('${u}')`}default:{let u=pu(e,{colors:!1});return u.length>28&&(u=`${u.slice(0,25)}...`),`type ${t} (${u})`}}}oe("ERR_INVALID_ARG_TYPE",(e,t,u)=>{fe.ok(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";if(e.endsWith(" argument"))n+=`${e} `;else{let o=e.includes(".")?"property":"argument";n+=`"${e}" ${o} `}n+="must be ";let i=[],s=[],r=[];for(let o of t)fe.ok(typeof o=="string","All expected entries have to be of type string"),Ef.has(o)?i.push(o.toLowerCase()):Cf.exec(o)===null?(fe.ok(o!=="object",'The value "object" should be written as "Object"'),r.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&&(n+=`${i.length>1?"one of type":"of type"} ${lu(i,"or")}`,(s.length>0||r.length>0)&&(n+=" or ")),s.length>0&&(n+=`an instance of ${lu(s,"or")}`,r.length>0&&(n+=" or ")),r.length>0&&(r.length>1?n+=`one of ${lu(r,"or")}`:(r[0]?.toLowerCase()!==r[0]&&(n+="an "),n+=`${r[0]}`)),n+=`. Received ${wf(u)}`,n},TypeError);var Ut=oe("ERR_INVALID_MODULE_SPECIFIER",(e,t,u)=>`Invalid module "${e}" ${t}${u?` imported from ${u}`:""}`,TypeError),Cu=oe("ERR_INVALID_PACKAGE_CONFIG",(e,t,u)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${u?`. ${u}`:""}`,Error),bf=oe("ERR_INVALID_PACKAGE_TARGET",(e,t,u,n=!1,i)=>{let s=typeof u=="string"&&!n&&u.length>0&&!u.startsWith("./");return t==="."?(fe.ok(n===!1),`Invalid "exports" main target ${JSON.stringify(u)} defined in the package config ${e}package.json${i?` imported from ${i}`:""}${s?'; targets must start with "./"':""}`):`Invalid "${n?"imports":"exports"}" target ${JSON.stringify(u)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:""}${s?'; targets must start with "./"':""}`},Error),Eu=oe("ERR_MODULE_NOT_FOUND",function(e,t,u=!1){return u&&typeof u=="string"&&(this.url=`${u}`),`Cannot find ${u?"module":"package"} '${e}' imported from ${t}`},Error),xf=oe("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,u)=>`Package import specifier "${e}" is not defined${t?` in package ${t||""}package.json`:""} imported from ${u}`,TypeError),Bf=oe("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,u)=>t==="."?`No "exports" main defined in ${e}package.json${u?` imported from ${u}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${u?` imported from ${u}`:""}`,Error),vf=oe("ERR_UNSUPPORTED_DIR_IMPORT",function(e,t,u=void 0){return this.url=u,`Directory import '${e}' is not supported resolving ES modules imported from ${t}`},Error),Mi=oe("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),_f=oe("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);oe("ERR_INVALID_ARG_VALUE",(e,t,u="is invalid")=>{let n=pu(t);return n.length>128&&(n=`${n.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${u}. Received ${n}`},TypeError);var rt={}.hasOwnProperty,Hi=new Map;function Xi(e,{base:t,specifier:u}){let n=Hi.get(e);if(n)return n;let i;try{i=Ff.readFileSync(Fu.toNamespacedPath(e),"utf8")}catch(r){let o=r;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 r;try{r=JSON.parse(i)}catch(o){let D=new Cu(e,(t?`"${u}" from `:"")+B(t||u),o.message);throw D.cause=o,D}s.exists=!0,rt.call(r,"name")&&typeof r.name=="string"&&(s.name=r.name),rt.call(r,"main")&&typeof r.main=="string"&&(s.main=r.main),rt.call(r,"exports")&&(s.exports=r.exports),rt.call(r,"imports")&&(s.imports=r.imports),rt.call(r,"type")&&(r.type==="commonjs"||r.type==="module")&&(s.type=r.type)}return Hi.set(e,s),s}function Ht(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let u=Xi(B(t),{specifier:e});if(u.exists)return u;let n=t;if(t=new URL("../package.json",t),t.pathname===n.pathname)break}return{pjsonPath:B(t),exists:!1,type:"none"}}var Sf={}.hasOwnProperty,Tf={__proto__:null,".json":"json",".cjs":"commonjs",".cts":"commonjs",".js":"module",".ts":"module",".mts":"module",".mjs":"module"},Ui={__proto__:null,"data:":kf,"file:":If,"node:":()=>"builtin"};function $f(e){return e&&/^\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?$/i.test(e)?"module":e==="application/json"?"json":null}function kf(e){let{1:t}=/^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/.exec(e.pathname)||[null,null,null];return $f(t)}var Of=46,Wi=47;function Rf(e){let t=e.pathname;for(let u=t.length-1;u>0;u--)switch(t.charCodeAt(u)){case Wi:return"";case Of:return t.charCodeAt(u-1)===Wi?"":t.slice(u)}return""}function If(e,t,u){let n=Rf(e);if(n===".js"){let{type:s}=Ht(e);return s!=="none"?s:"commonjs"}if(n===""){let{type:s}=Ht(e);return s==="module"?"module":s!=="none"?s:"commonjs"}let i=Tf[n];if(i)return i;if(!u)throw new _f(n,B(e))}function Lf(e,t){let u=e.protocol;return Sf.call(Ui,u)&&Ui[u](e,t,!0)||null}var jt=RegExp.prototype[Symbol.replace],es={}.hasOwnProperty,Vi=/(^|\\|\/)((\.|%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,Gi=/(^|\\|\/)((\.|%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,Nf=/^\.|%|\\/,Mt=/\*/g,Pf=/%2f|%5c/i,Yi=new Set,jf=/[/\\]{2}/;function zi(e,t,u,n,i,s,r){if($e.noDeprecation)return;let o=B(n),D=jf.exec(r?e:t)!==null;$e.emitWarning(`Use of deprecated ${D?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===u?"":`matched to "${u}" `}in the "${i?"imports":"exports"}" field module resolution of the package at ${o}${s?` imported from ${B(s)}`:""}.`,"DeprecationWarning","DEP0166")}function Ki(e,t,u,n){if($e.noDeprecation||Lf(e,{parentURL:u.href})!=="module")return;let i=B(e.href),s=B(new M(".",t)),r=B(u);n?Fu.resolve(s,n)!==i&&$e.emitWarning(`Package ${s} has a "main" field set to "${n}", excluding the full filename and extension to the resolved file at "${i.slice(s.length)}", imported from ${r}.
|
|
101
|
-
Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151")
|
|
102
|
-
Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function ts(e){try{return du(e)}catch{}}function fu(e){let t=du(e,{throwIfNoEntry:!1}),u=t?t.isFile():void 0;return u??!1}function Mf(e,t,u){let n;if(t.main!==void 0){if(n=new M(t.main,e),fu(n))return n;let r=[`./${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<r.length&&(n=new M(r[o],e),!fu(n));)n=void 0;if(n)return Ki(n,e,u,t.main),n}let i=["./index.js","./index.json","./index.node"],s=-1;for(;++s<i.length&&(n=new M(i[s],e),!fu(n));)n=void 0;if(n)return Ki(n,e,u,t.main),n;throw new Eu(B(new M(".",e)),B(u))}function Hf(e,t,u){if(Pf.exec(e.pathname)!==null)throw new Ut(e.pathname,String.raw`must not include encoded "/" or "\" characters`,B(t));let n;try{n=B(e)}catch(s){throw Object.defineProperty(s,"input",{value:String(e)}),Object.defineProperty(s,"module",{value:String(t)}),s}let i=ts(n.endsWith("/")?n.slice(-1):n);if(i&&i.isDirectory()){let s=new vf(n,B(t));throw s.url=String(e),s}if(!i||!i.isFile()){let s=new Eu(n||e.pathname,t&&B(t),!0);throw s.url=String(e),s}if(!u){let s=Ji(n),{search:r,hash:o}=e;e=ce(s+(n.endsWith(Fu.sep)?"/":"")),e.search=r,e.hash=o}return e}function Uf(e,t,u){return new xf(e,t&&B(new M(".",t)),B(u))}function hu(e,t,u){return new Bf(B(new M(".",t)),e,u&&B(u))}function Wf(e,t,u,n,i){throw new Ut(e,`request is not a valid match in pattern "${t}" for the "${n?"imports":"exports"}" resolution of ${B(u)}`,i&&B(i))}function ut(e,t,u,n,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new bf(B(new M(".",u)),e,t,n,i&&B(i))}function Vf(e,t,u,n,i,s,r,o,D){if(t!==""&&!s&&e.at(-1)!=="/")throw ut(u,e,n,r,i);if(!e.startsWith("./")){if(r&&!e.startsWith("../")&&!e.startsWith("/")){let f=!1;try{new M(e),f=!0}catch{}if(!f)return us(s?jt.call(Mt,e,()=>t):e+t,n,D)}throw ut(u,e,n,r,i)}if(Vi.exec(e.slice(2))!==null)if(Gi.exec(e.slice(2))===null){if(!o){let f=s?u.replace("*",()=>t):u+t;zi(s?jt.call(Mt,e,()=>t):e,f,u,n,r,i,!0)}}else throw ut(u,e,n,r,i);let a=new M(e,n),c=a.pathname,l=new M(".",n).pathname;if(!c.startsWith(l))throw ut(u,e,n,r,i);if(t==="")return a;if(Vi.exec(t)!==null){let f=s?u.replace("*",()=>t):u+t;Gi.exec(t)===null?o||zi(s?jt.call(Mt,e,()=>t):e,f,u,n,r,i,!1):Wf(f,u,n,r,i)}return s?new M(jt.call(Mt,a.href,()=>t)):new M(t,a)}function Gf(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function Me(e,t,u,n,i,s,r,o,D){if(typeof t=="string")return Vf(t,u,n,e,i,s,r,o,D);if(Array.isArray(t)){let a=t;if(a.length===0)return null;let c,l=-1;for(;++l<a.length;){let f=a[l],h;try{h=Me(e,f,u,n,i,s,r,o,D)}catch(p){let E=p;if(c=E,E.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw p}if(h!==void 0){if(h===null){c=null;continue}return h}}if(c==null)return c;throw c}if(typeof t=="object"&&t!==null){let a=Object.getOwnPropertyNames(t),c=-1;for(;++c<a.length;){let l=a[c];if(Gf(l))throw new Cu(B(e),B(i),'"exports" cannot contain numeric property keys.')}for(c=-1;++c<a.length;){let l=a[c];if(l==="default"||D&&D.has(l)){let f=t[l],h=Me(e,f,u,n,i,s,r,o,D);if(h===void 0)continue;return h}}return}if(t===null)return null;throw ut(n,t,e,r,i)}function Yf(e,t,u){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let n=Object.getOwnPropertyNames(e),i=!1,s=0,r=-1;for(;++r<n.length;){let o=n[r],D=o===""||o[0]!==".";if(s++===0)i=D;else if(i!==D)throw new Cu(B(t),B(u),`"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 zf(e,t,u){if($e.noDeprecation)return;let n=B(t);Yi.has(n+"|"+e)||(Yi.add(n+"|"+e),$e.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${n}${u?` imported from ${B(u)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function qi(e,t,u,n,i){let s=u.exports;if(Yf(s,e,n)&&(s={".":s}),es.call(s,t)&&!t.includes("*")&&!t.endsWith("/")){let c=s[t],l=Me(e,c,"",t,n,!1,!1,!1,i);if(l==null)throw hu(t,e,n);return l}let r="",o="",D=Object.getOwnPropertyNames(s),a=-1;for(;++a<D.length;){let c=D[a],l=c.indexOf("*");if(l!==-1&&t.startsWith(c.slice(0,l))){t.endsWith("/")&&zf(t,e,n);let f=c.slice(l+1);t.length>=c.length&&t.endsWith(f)&&rs(r,c)===1&&c.lastIndexOf("*")===l&&(r=c,o=t.slice(l,t.length-f.length))}}if(r){let c=s[r],l=Me(e,c,o,r,n,!0,!1,t.endsWith("/"),i);if(l==null)throw hu(t,e,n);return l}throw hu(t,e,n)}function rs(e,t){let u=e.indexOf("*"),n=t.indexOf("*"),i=u===-1?e.length:u+1,s=n===-1?t.length:n+1;return i>s?-1:s>i||u===-1?1:n===-1||e.length>t.length?-1:t.length>e.length?1:0}function Kf(e,t,u){if(e==="#"||e.endsWith("/"))throw new Ut(e,"is not a valid internal imports specifier name",B(t));let n,i=Ht(t);if(i.exists){n=ce(i.pjsonPath);let s=i.imports;if(s)if(es.call(s,e)&&!e.includes("*")){let r=Me(n,s[e],"",e,t,!1,!0,!1,u);if(r!=null)return r}else{let r="",o="",D=Object.getOwnPropertyNames(s),a=-1;for(;++a<D.length;){let c=D[a],l=c.indexOf("*");if(l!==-1&&e.startsWith(c.slice(0,l))){let f=c.slice(l+1);e.length>=c.length&&e.endsWith(f)&&rs(r,c)===1&&c.lastIndexOf("*")===l&&(r=c,o=e.slice(l,e.length-f.length))}}if(r){let c=s[r],l=Me(n,c,o,r,t,!0,!0,!1,u);if(l!=null)return l}}}throw Uf(e,n,t)}function qf(e,t){let u=e.indexOf("/"),n=!0,i=!1;e[0]==="@"&&(i=!0,u===-1||e.length===0?n=!1:u=e.indexOf("/",u+1));let s=u===-1?e:e.slice(0,u);if(Nf.exec(s)!==null&&(n=!1),!n)throw new Ut(e,"is not a valid package name",B(t));return{packageName:s,packageSubpath:"."+(u===-1?"":e.slice(u)),isScoped:i}}function us(e,t,u){if(mu.includes(e))return new M("node:"+e);let{packageName:n,packageSubpath:i,isScoped:s}=qf(e,t),r=Ht(t);if(r.exists&&r.name===n&&r.exports!==void 0&&r.exports!==null)return qi(ce(r.pjsonPath),i,r,t,u);let o=new M("./node_modules/"+n+"/package.json",t),D=B(o),a;do{let c=ts(D.slice(0,-13));if(!c||!c.isDirectory()){a=D,o=new M((s?"../../../../node_modules/":"../../../node_modules/")+n+"/package.json",o),D=B(o);continue}let l=Xi(D,{base:t,specifier:e});return l.exports!==void 0&&l.exports!==null?qi(o,i,l,t,u):i==="."?Mf(o,l,t):new M(i,o)}while(D.length!==a.length);throw new Eu(n,B(t),!1)}function Jf(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Zf(e){return e===""?!1:e[0]==="/"?!0:Jf(e)}function Qf(e,t,u,n){let i=t.protocol,s=i==="data:",r;if(Zf(e))try{r=new M(e,t)}catch(o){let D=new Mi(e,t);throw D.cause=o,D}else if(i==="file:"&&e[0]==="#")r=Kf(e,t,u);else try{r=new M(e)}catch(o){if(s&&!mu.includes(e)){let D=new Mi(e,t);throw D.cause=o,D}r=us(e,t,u)}return fe.ok(r!==void 0,"expected to be defined"),r.protocol!=="file:"?r:Hf(r,t,n)}var Xf=new Set(["node","import"]),eh="2:6:import4:node",th=process.platform==="win32",rh=globalThis.__EXSOLVE_CACHE__||=new Map;function uh(e,t){let u=fh(e);if("external"in u)return u.external;let n=u.specifier,i=u.url,s=u.absolutePath,r,o;if(t?.cache!==!1&&(r=Dh(s||n,t),o=t?.cache&&typeof t?.cache=="object"?t.cache:rh),o){let p=o.get(r);if(typeof p=="string")return p;if(p instanceof Error){if(t?.try)return;throw p}}if(s)try{let p=mf(s);if(p.isSymbolicLink()&&(s=Ji(s),i=ce(s)),p.isFile())return o&&o.set(r,i.href),i.href}catch(p){if(p?.code!=="ENOENT")throw o&&o.set(r,p),p}let D=t?.conditions?new Set(t.conditions):Xf,a=n||i.href,c=ih(t?.from),l=t?.suffixes||[""],f=t?.extensions?["",...t.extensions]:[""],h;for(let p of c){for(let E of l){let C=lh(a,E);C==="."&&(C+="/.");for(let R of f)if(h=nh(C+R,p,D),h)break;if(h)break}if(h)break}if(!h){let p=new Error(`Cannot resolve module "${e}" (from: ${c.map(E=>oh(E)).join(", ")})`);if(p.code="ERR_MODULE_NOT_FOUND",o&&o.set(r,p),t?.try)return;throw p}return o&&o.set(r,h.href),h.href}function ns(e,t){let u=uh(e,t);if(!u||!u.startsWith("file://")&&t?.try)return;let n=B(u);return th?ch(n):n}function nh(e,t,u){try{return Qf(e,t,u)}catch{}}function ih(e){let t=(Array.isArray(e)?e:[e]).flatMap(u=>sh(u));return t.length===0?[ce("./")]:t}function sh(e){if(!e)return[];if(is(e))return[e];if(typeof e!="string")return[];if(/^(?:node|data|http|https|file):/.test(e))return new URL(e);try{return e.endsWith("/")||du(e).isDirectory()?ce(e+"/"):ce(e)}catch{return[ce(e+"/"),ce(e)]}}function oh(e){try{return B(e)}catch{return e}}function Dh(e,t){let u;return Array.isArray(t?.from)?u=t.from:t?.from&&(u=[t.from]),nt([e])+ah(t?.conditions)+nt(t?.extensions)+nt(u)+nt(t?.suffixes)}function ah(e){return e?nt([...new Set(e)].sort()):eh}function nt(e){if(!e)return"-";let t=`${e.length}:`;for(let u of e){let n=String(u);t+=`${n.length}:${n}`}return t}function lh(e,t){return!e||!t||t==="/"?e:(e.endsWith("/")?e:e+"/")+(t.startsWith("/")?t.slice(1):t)}function ch(e){return e.replace(/\\/g,"/").replace(/^[a-z]:\//,t=>t.toUpperCase())}function is(e){return e instanceof URL||e?.constructor?.name==="URL"}function fh(e){if(typeof e=="string"){if(e.startsWith("file:")){let t=new URL(e);return{url:t,absolutePath:B(t)}}return gf(e)?{url:ce(e),absolutePath:e}:/^(?:node|data|http|https):/.test(e)?{external:e}:mu.includes(e)&&!e.includes(":")?{external:`node:${e}`}:{specifier:e}}if(is(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 dh}from"node:url";var Fh={startingFrom:".",rootPattern:/^node_modules$/,reverse:!1,test:e=>{try{if(ph(e).isFile())return!0}catch{}}};async function mh(e,t={}){let u=Array.isArray(e)?e:[e],n={...Fh,...t},i=Te(n.startingFrom),s=i[0]==="/",r=i.split("/").filter(Boolean);if(u.includes(r.at(-1))&&await n.test(i))return i;s&&(r[0]="/"+r[0]);let o=r.findIndex(D=>D.match(n.rootPattern));if(o===-1&&(o=0),n.reverse)for(let D=o+1;D<=r.length;D++)for(let a of u){let c=Se(...r.slice(0,D),a);if(await n.test(c))return c}else for(let D=r.length;D>o;D--)for(let a of u){let c=Se(...r.slice(0,D),a);if(await n.test(c))return c}throw new Error(`Cannot find matching ${e} in ${n.startingFrom} or parent directories`)}function gh(e,t={}){return mh(e,t)}function Ch(e,t={}){return e instanceof URL||e.startsWith("file://")?_e(dh(e)):ve(e)?_e(e):ns(e,{...t,from:t.from||t.parent||t.url})}var Eh=new Map;async function ss(e,t={}){let u=await yu(e,t),n=t.cache&&typeof t.cache!="boolean"?t.cache:Eh;if(t.cache&&n.has(u))return n.get(u);let i=await hh.readFile(u,"utf8"),s;try{s=Pi(i)}catch{s=ji(i)}return n.set(u,s),s}async function yu(e=process.cwd(),t={}){return gh("package.json",{...t,startingFrom:Ch(e,t)})}var Wt={react:"React",vue:"Vue",svelte:"Svelte",solid:"Solid"},yh=[{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}],Ah=[{dep:"react",library:"react"},{dep:"vue",library:"vue"},{dep:"svelte",library:"svelte"},{dep:"solid-js",library:"solid"}];function wh(e){return{...e.dependencies??{},...e.devDependencies??{},...e.peerDependencies??{}}}async function Vt(e){let t;try{t=await yu(e)}catch{return null}let u=await ss(t),n=wh(u),i=t.replace(/[\\/]package\.json$/,""),s=yh.find(o=>o.dep in n)??null,r=s?.library??Ah.find(o=>o.dep in n)?.library??null;return{dir:i,pkg:u,framework:s?.name??null,library:r,usesTypeScript:"typescript"in n,shadersVersion:n.shaders??null}}function as(e,t){let u=Wt[t];return!e||e===u?u:`${e} + ${u}`}function Gt(e,t){return t==="Nuxt"?"components/shaders":t==="SvelteKit"?"src/lib/components/shaders":t==="Remix"||t==="React Router"?"app/components/shaders":os(Ds.join(e,"src"))?"src/components/shaders":os(Ds.join(e,"app"))&&t!=="Next.js"?"app/components/shaders":"components/shaders"}var wu=Symbol.for("cancel"),Yt=Object.keys(Wt);function ls(e){return!e.yes&&!!process.stdout.isTTY&&!!process.stdin.isTTY}function bu(){_.log("Cancelled."),process.exit(0)}async function bh(e,t){if(t.framework){if(!Yt.includes(t.framework))throw new Error(`Unknown framework "${t.framework}". Use one of: ${Yt.join(", ")}`);return t.framework}if(e.library)return e.library;if(!ls(t))throw new Error(`Couldn't detect a UI framework in ${zt.join(e.dir,"package.json")}. Pass one with --framework <${Yt.join("|")}>`);let u=await _.prompt("Which framework does this project use?",{type:"select",options:Yt.map(n=>({value:n,label:Wt[n]})),cancel:"symbol"});return u===wu&&bu(),u}async function xh(e,t){if(e.shadersVersion){_.success(`shaders already installed (${e.shadersVersion})`);return}if(!t.install){_.info("Skipped installing shaders (--no-install)");return}let u=(await su(e.dir))?.name??"npm";_.start(`Installing shaders with ${u}\u2026`);try{await Rt("shaders",{cwd:e.dir,silent:!0,packageManager:u})}catch(n){throw new Error(`Failed to install shaders: ${n instanceof Error?n.message:String(n)}
|
|
103
|
-
Install it manually, then re-run npx shaders init`)}
|
|
104
|
-
${
|
|
105
|
-
Next: npx shaders install <id> to add a shader from your account, or import { Shader } from 'shaders/${
|
|
106
|
-
`)}
|
|
107
|
-
|
|
108
|
-
`)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
${o.join(", ")}`),r.failed===i.length&&process.exit(1)}var te=At(Tu(),1);import{stdin as Yh,stdout as zh}from"node:process";import ys from"node:readline";import{WriteStream as Kh}from"node:tty";function qh({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 Jh=qh();function Ss(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Jh,"")}function Ts(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $s={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var i=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,r=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,r=i<<10|s,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"},t.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function u(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var i=u(n),s=0,r=0;r<i.length;r++)s=s+this.characterLength(i[r]);return s},t.slice=function(n,i,s){textLen=t.length(n),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var r="",o=0,D=u(n),a=0;a<D.length;a++){var c=D[a],l=t.length(c);if(o>=i-(l==2?1:0))if(o+l<=s)r+=c;else break;o+=l}return r}})($s);var Zh=$s.exports,Qh=Ts(Zh),Xh=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},ep=Ts(Xh);function st(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Ss(e),e.length===0))return 0;e=e.replace(ep()," ");let u=t.ambiguousIsNarrow?1:2,n=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(Qh.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=u;break;default:n+=1}}return n}var ku=10,As=(e=0)=>t=>`\x1B[${t+e}m`,ws=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,bs=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}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);var tp=Object.keys(O.color),rp=Object.keys(O.bgColor);[...tp,...rp];function up(){let e=new Map;for(let[t,u]of Object.entries(O)){for(let[n,i]of Object.entries(u))O[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},u[n]=O[n],e.set(i[0],i[1]);Object.defineProperty(O,t,{value:u,enumerable:!1})}return Object.defineProperty(O,"codes",{value:e,enumerable:!1}),O.color.close="\x1B[39m",O.bgColor.close="\x1B[49m",O.color.ansi=As(),O.color.ansi256=ws(),O.color.ansi16m=bs(),O.bgColor.ansi=As(ku),O.bgColor.ansi256=ws(ku),O.bgColor.ansi16m=bs(ku),Object.defineProperties(O,{rgbToAnsi256:{value:(t,u,n)=>t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,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 u,n,i;if(t>=232)u=((t-232)*10+8)/255,n=u,i=u;else{t-=16;let o=t%36;u=Math.floor(t/36)/5,n=Math.floor(o/6)/5,i=o%6/5}let s=Math.max(u,n,i)*2;if(s===0)return 30;let r=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(u));return s===2&&(r+=60),r},enumerable:!1},rgbToAnsi:{value:(t,u,n)=>O.ansi256ToAnsi(O.rgbToAnsi256(t,u,n)),enumerable:!1},hexToAnsi:{value:t=>O.ansi256ToAnsi(O.hexToAnsi256(t)),enumerable:!1}}),O}var np=up(),tr=new Set(["\x1B","\x9B"]),ip=39,Lu="\x07",ks="[",sp="]",Os="m",Nu=`${sp}8;;`,xs=e=>`${tr.values().next().value}${ks}${e}${Os}`,Bs=e=>`${tr.values().next().value}${Nu}${e}${Lu}`,op=e=>e.split(" ").map(t=>st(t)),Ou=(e,t,u)=>{let n=[...t],i=!1,s=!1,r=st(Ss(e[e.length-1]));for(let[o,D]of n.entries()){let a=st(D);if(r+a<=u?e[e.length-1]+=D:(e.push(D),r=0),tr.has(D)&&(i=!0,s=n.slice(o+1).join("").startsWith(Nu)),i){s?D===Lu&&(i=!1,s=!1):D===Os&&(i=!1);continue}r+=a,r===u&&o<n.length-1&&(e.push(""),r=0)}!r&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Dp=e=>{let t=e.split(" "),u=t.length;for(;u>0&&!(st(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},ap=(e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",i,s,r=op(e),o=[""];for(let[a,c]of e.split(" ").entries()){u.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let l=st(o[o.length-1]);if(a!==0&&(l>=t&&(u.wordWrap===!1||u.trim===!1)&&(o.push(""),l=0),(l>0||u.trim===!1)&&(o[o.length-1]+=" ",l++)),u.hard&&r[a]>t){let f=t-l,h=1+Math.floor((r[a]-f-1)/t);Math.floor((r[a]-1)/t)<h&&o.push(""),Ou(o,c,t);continue}if(l+r[a]>t&&l>0&&r[a]>0){if(u.wordWrap===!1&&l<t){Ou(o,c,t);continue}o.push("")}if(l+r[a]>t&&u.wordWrap===!1){Ou(o,c,t);continue}o[o.length-1]+=c}u.trim!==!1&&(o=o.map(a=>Dp(a)));let D=[...o.join(`
|
|
112
|
-
`)
|
|
113
|
-
|
|
114
|
-
|
|
93
|
+
${e}`),st(e),m.start("Waiting for you to finish signing in");let r=Date.now()+Oc;for(;Date.now()<r;){await Rc(kc);let u;try{u=await z("/api/plugin-auth/poll",{method:"POST",query:{readKey:t}})}catch(i){if(i instanceof J&&(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=Oi(u);return await $i(i),i}}throw new Error("Timed out waiting for sign-in. Run the command again to start over.")}async function Vt(e){if(!e.refreshToken)return null;try{let t=await z("/api/plugin-auth/refresh",{method:"POST",body:{refresh_token:e.refreshToken}}),r=Oi({...t,refresh_token:t.refresh_token??e.refreshToken});return await $i(r),r}catch{return null}}async function it(e){return z("/api/plugin/me",{token:e.accessToken})}async function Ri(){let e=await pn();if(!e||e.expiresAt&&e.expiresAt-Si<Date.now()&&(e=await Vt(e),!e))return null;try{return{credentials:e,me:await it(e)}}catch(t){if(!(t instanceof J)||t.status!==401)throw t;let r=await Vt(e);if(!r)return null;try{return{credentials:r,me:await it(r)}}catch(u){if(u instanceof J&&u.status===401)return null;throw u}}}async function me(){let e=await pn();if(e&&(e.expiresAt&&e.expiresAt-Si<Date.now()&&(e=await Vt(e)),e))try{return{credentials:e,me:await it(e)}}catch(r){if(!(r instanceof J)||r.status!==401)throw r;let u=await Vt(e);if(u)try{return{credentials:u,me:await it(u)}}catch(i){if(!(i instanceof J)||i.status!==401)throw i}}let t=await dn();return{credentials:t,me:await it(t)}}function ce(e){console.error(`\u2717 ${e}`),process.exit(1)}import nr from"node:path";import{createRequire as df}from"node:module";import{existsSync as ot}from"node:fs";import{readFile as gn}from"node:fs/promises";var Ic=/^[A-Za-z]:\//;function Ii(e=""){return e&&e.replace(/\\/g,"/").replace(Ic,t=>t.toUpperCase())}var Lc=/^[/\\]{2}/,Nc=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Pc=/^[A-Za-z]:$/;var $e=function(e){if(e.length===0)return".";e=Ii(e);let t=e.match(Lc),r=Te(e),u=e[e.length-1]==="/";return e=Fn(e,!r),e.length===0?r?"/":u?"./":".":(u&&(e+="/"),Pc.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!Te(e)?`/${e}`:e)},ke=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 $e(t)};function jc(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var Oe=function(...e){e=e.map(u=>Ii(u));let t="",r=!1;for(let u=e.length-1;u>=-1&&!r;u--){let i=u>=0?e[u]:jc();!i||i.length===0||(t=`${i}/${t}`,r=Te(i))}return t=Fn(t,!r),r&&!Te(t)?`/${t}`:t.length>0?t:"."};function Fn(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 Te=function(e){return Nc.test(e)};import{spawn as Hc,spawnSync as k2}from"node:child_process";import{cwd as Hi}from"node:process";import{basename as Uc,delimiter as Gt,dirname as Li,normalize as Wc,resolve as Ui}from"node:path";import{fileURLToPath as Vc}from"node:url";import{pipeline as Gc}from"node:stream/promises";import{PassThrough as Yc}from"node:stream";import zc from"node:readline";import{closeSync as Kc,openSync as qc,readSync as Jc,statSync as Zc}from"node:fs";var Qc=/^path$/i,Ni={key:"PATH",value:""};function Wi(e){for(let t in e){if(!Object.prototype.hasOwnProperty.call(e,t)||!Qc.test(t))continue;let r=e[t];return r?{key:t,value:r}:Ni}return Ni}function Xc(e,t){let r=t.value.split(Gt),u=[],i=typeof e=="string"?e:Vc(e,{windows:!1}),s;do u.push(Ui(i,"node_modules",".bin")),s=i,i=Li(i);while(i!==s);u.push(Li(process.execPath));let n=u.concat(r).join(Gt);return{key:t.key,value:n}}function ef(e,t,r=!0){let u={...process.env,...t};if(!r)return u;let i=Xc(e,Wi(u));return u[i.key]=i.value,u}var tf=e=>{let t=e.length,r=new Yc,u=()=>{--t===0&&r.end()};for(let i of e)Gc(i,r,{end:!1}).then(u).catch(u);return r},mn=/([()\][%!^"`<>&|;, *?])/g,rf=/^#!\s*(.+)/,nf=/\.(?:com|exe)$/i,uf=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,sf=process.platform==="win32",of=[".EXE",".CMD",".BAT",".COM"],af=[""];function Df(e,t=[],r={}){if(r.shell===!0||!sf)return{command:e,args:t,options:r};let u=Pi(e,r),i=null;if(u!==null){let n=Buffer.alloc(150),o=null;try{o=qc(u,"r"),Jc(o,n,0,150,0)}catch{}finally{o!==null&&Kc(o)}let a=n.toString().match(rf);if(a!==null){let D=a[1].trim(),l=D.indexOf(" "),c=l!==-1?D.slice(0,l):D,f=l!==-1?D.slice(l+1):"",h=Uc(c);i=h==="env"?f||null:h}}if(i!==null&&u!==null&&(t=[u,...t],e=i,u=Pi(e,r)),u===null||!nf.test(u)){let s=u!==null&&uf.test(u);e=Wc(e),e=e.replace(mn,"^$1"),t=t.map(n=>(n=n.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),n=n.replace(/(?=(\\+?)?)\1$/,"$1$1"),n=`"${n}"`,n=n.replace(mn,"^$1"),s&&(n=n.replace(mn,"^$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 Pi(e,t){let r=(t.cwd??Hi()).toString(),u=t.env??process.env,i=Wi(u).value,s=e.includes("/")||e.includes("\\")?[""]:[r,...i.split(Gt)],n=u.PATHEXT?u.PATHEXT.split(Gt):of;e.includes(".")&&n[0]!==""&&(n=["",...n]);for(let o of[n,af])for(let a of s){let D=a.startsWith('"')&&a.endsWith('"')&&a.length>1?a.slice(1,-1):a,l=Ui(r,D,e);for(let c of o){let f=l+c;try{if(Zc(f).isFile())return f}catch{}}}return null}var ji=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 lf={timeout:void 0,persist:!1};var cf={windowsHide:!0};function ff(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 Mi(e){let t="";try{for await(let r of e)t+=r.toString()}catch{}return t}var hf=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={...lf,...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 pf(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=tf(t),u=zc.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 ji(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?Mi(this._streamOut):"",this._streamErr?Mi(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 ji(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={...cf,...e.nodeOptions},r=t?.cwd??Hi(),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=ff(u)),t.env=ef(r,t.env,e.nodePath);let i=Df(this._command,this._args,t),s=Hc(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 Yt=(e,t,r)=>{let u=new hf(e,t,r);return u.spawn(),u},pf=Yt;import{join as Cn}from"node:path";async function En(e,t,r={}){let u=$e(e).split("/");for(;u.length>0;){let i=await t(u.join("/")||"/");if(i||!r.includeParentDirs)return i;u.pop()}}async function Gi(e,t={}){return En(e,r=>{let u=Cn(r,"package.json");if(ot(u))return gn(u,"utf8").then(i=>JSON.parse(i))},t)}async function Ff(e,t){let r=await En(t,u=>{let i=Cn(u,"node_modules",e,"package.json");if(ot(i))return i},{includeParentDirs:!0});if(!r)return null;try{return JSON.parse(await gn(r,"utf8"))}catch{return null}}async function mf(e,t){let r;try{r=e.resolve(t)}catch{return null}return Gi(r,{includeParentDirs:!0})}function gf(e){let t;return()=>(t===void 0&&(t=e().then(r=>(t=r,t))),t)}var Cf=gf(async()=>{if(globalThis.process?.versions?.webcontainer)return!1;try{let{exitCode:e}=await Yt("corepack",["--version"]);return e===0}catch{return!1}});async function Ef(e,t,r={}){let u=e!=="npm"&&e!=="bun"&&e!=="deno"&&e!=="aube"&&e!=="nub"&&r.corepack!==!1&&await Cf()?["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 Yt(u[0],u[1],{nodeOptions:{cwd:Oe(r.cwd||process.cwd()),env:r.env,stdio:s}});if(n!==0)throw new Error(`\`${u.flat().join(" ")}\` failed.${r.silent?["",o,a].join(`
|
|
94
|
+
`):""}`)}var yf="No package manager auto-detected.";async function Af(e={}){let t=e.cwd||process.cwd(),r={...process.env,...e.env},u=(typeof e.packageManager=="string"?we.find(i=>i.name===e.packageManager):e.packageManager)||await yn(e.cwd||process.cwd());if(!u)throw new Error(yf);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 Vi(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 Yi=/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;function wf(e){let[t,r]=(e||"").split("@"),[u,i]=r?.split("+")||[];if(t&&t!=="-"&&Yi.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 bf(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(!Yi.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 we=[{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 yn(e,t={}){let r=await En(Oe(e||"."),async u=>{if(!t.ignorePackageJSON){let i=ke(u,"package.json");if(ot(i)){let n=JSON.parse(await gn(i,"utf8"));if(n?.packageManager){let{name:a,version:D="0.0.0",buildMeta:l,warnings:c}=wf(n.packageManager);if(a){let f=D.split(".")[0],h=we.find(p=>p.name===a&&p.majorVersion===f)||we.find(p=>p.name===a);return{name:a,command:a,version:D,majorVersion:f,buildMeta:l,warnings:c,files:h?.files,lockFile:h?.lockFile}}}let o=bf(n?.devEngines);if(o.name){let{name:a,version:D,warnings:l}=o,c=D?.match(/\d+/)?.[0],f=we.find(h=>h.name===a&&h.majorVersion===c)||we.find(h=>h.name===a);return{name:a,command:a,version:D,majorVersion:c,warnings:l,files:f?.files,lockFile:f?.lockFile}}}let s=ke(u,"deno.json");if(ot(s))return we.find(n=>n.name==="deno")}if(!t.ignoreLockFile){for(let i of we)if([i.lockFile,i.files].flat().filter(Boolean).some(s=>ot(Oe(u,s))))return{...i}}},{includeParentDirs:t.includeParentDirs??!0});if(!r&&!t.ignoreArgv){let u=process.argv[1];if(u){for(let i of we)if(new RegExp(`[/\\\\]\\.?${i.command}`).test(u))return i}}return r}async function zt(e,t={}){let r=await Af(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"?[...Vi(r),r.global&&r.packageManager.majorVersion==="1"?"global":"","add",r.dev?"-D":"",...u]:[r.packageManager.name==="npm"?"install":"add",...Vi(r),r.dev?"-D":"",r.global?"-g":"",...u]).filter(Boolean);if(r.dry||await Ef(r.packageManager.command,i,{cwd:r.cwd,silent:r.silent,corepack:r.corepack}),!r.dry&&t.installPeerDependencies){let s=await Gi(r.cwd),n=[],o=[],a=df(Cn(r.cwd,"/_.js"));for(let D of u){let l=D.match(/^(.[^@]+)/)?.[0];if(!l)continue;let c=await mf(a,l);if(c?.name!==l&&(c=await Ff(l,r.cwd)),!!c?.peerDependencies)for(let[f,h]of Object.entries(c.peerDependencies))c.peerDependenciesMeta?.[f]?.optional||s?.dependencies?.[f]||s?.devDependencies?.[f]||(c.peerDependenciesMeta?.[f]?.dev?o:n).push(`${f}@${h}`)}n.length>0&&await zt(n,{...r}),o.length>0&&await xf(o,{...r})}return{exec:{command:r.packageManager.command,args:i}}}async function xf(e,t={}){return await zt(e,{...t,dev:!0})}import{readFile as wn,writeFile as zi}from"node:fs/promises";import Ki from"node:path";var vf=["shaders.config.ts","shaders.config.mts","shaders.config.js","shaders.config.mjs"],Bf=["react","vue","svelte","solid"],qi={framework:e=>`Components are imported from 'shaders/${e}'`,project:()=>"shaders.com project this codebase is connected to",outDir:()=>"Where `npx shaders install` writes component files"};async function at(e){for(let t of vf){let r=Ki.join(e,t);try{return await wn(r),r}catch{}}return null}function An(e,t){let r=new RegExp(`\\b${t}\\s*:\\s*(['"\`])([^'"\`]*)\\1`).exec(e);return r?r[2]:null}async function Ji(e){let t=await wn(e,"utf8"),r=An(t,"framework");return{framework:Bf.includes(r)?r:null,project:An(t,"project"),outDir:An(t,"outDir")}}function _f(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(` // ${qi[r](u)}`,` ${r}: '${u}',`)}return t.push("})",""),t.join(`
|
|
95
|
+
`)}async function Zi(e,t,r){let u=Ki.join(e,r?"shaders.config.ts":"shaders.config.js");return await zi(u,_f(t)),u}async function be(e,t,r){let u=await wn(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 c=n.exec(u);c;c=n.exec(u))o=c;if(!o)return!1;let a=o[1],l=`${o[0].trimEnd().endsWith(",")?o[0]:o[0].trimEnd()+","}
|
|
96
|
+
${a}// ${qi[t](r)}
|
|
97
|
+
${a}${t}: '${r}',`;s=u.slice(0,o.index)+l+u.slice(o.index+o[0].length)}return await zi(e,s),!0}import{existsSync as ws}from"node:fs";import bs from"node:path";import{promises as Oh,statSync as Rh}from"node:fs";bn();var qt=Symbol("singleComment"),Qi=Symbol("multiComment"),Of=()=>"",Rf=(e,t,r)=>e.slice(t,r).replace(/[^ \t\r\n]/g," "),If=(e,t)=>{let r=t-1,u=0;for(;e[r]==="\\";)--r,u+=1;return!!(u%2)};function Xi(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:Of,i=!1,s=!1,n=0,o="",a="",D=-1;for(let c=0;c<e.length;c++){let f=e[c],h=e[c+1];if(!s&&f==='"'&&(If(e,c)||(i=!i)),!i)if(!s&&f+h==="//")o+=e.slice(n,c),n=c,s=qt,c++;else if(s===qt&&f+h===`\r
|
|
98
|
+
`){c++,s=!1,o+=u(e,n,c),n=c;continue}else if(s===qt&&f===`
|
|
99
|
+
`)s=!1,o+=u(e,n,c),n=c;else if(!s&&f+h==="/*"){o+=e.slice(n,c),n=c,s=Qi,c++;continue}else if(s===Qi&&f+h==="*/"){c++,s=!1,o+=u(e,n,c+1),n=c+1;continue}else r&&!s&&(D===-1?f===","&&(a+=o+e.slice(n,c),o="",n=c,D=c):f==="}"||f==="]"?(o+=e.slice(n,c),a+=u(o,0,1)+o.slice(1),o="",n=c,D=-1):f!==" "&&f!==" "&&f!=="\r"&&f!==`
|
|
100
|
+
`&&(o+=e.slice(n,c),n=c,D=-1))}let l=s===qt?u(e,n):e.slice(n);return a+o+l}bn();function es(e,t){let r=JSON.parse(Dt(e),t?.reviver);return Kt(e,r,t),r}function ts(e,t){let r=JSON.parse(Xi(Dt(e),{trailingCommas:t?.allowTrailingComma}));return Kt(e,r,t),r}import Lf,{lstatSync as Nf,realpathSync as fs,statSync as Tn}from"node:fs";import{URL as M,fileURLToPath as B,pathToFileURL as fe}from"node:url";import $n,{isAbsolute as Pf}from"node:path";import he from"node:assert";import Re from"node:process";import{format as hs,inspect as Sn}from"node:util";var kn=["_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"],jf=/^([A-Z][a-z\d]*)+$/,Mf=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),On=new Map;function xn(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 ps(e){let t=0,r=/%[dfijoOs]/g;for(;r.exec(e)!==null;)t++;return t}function ae(e,t,r){return On.set(e,t),Hf(r,e)}var vn=Symbol("kIsNodeError");function Hf(e,t){let r=On.get(t),u=typeof r=="string"?ps(r):-1;switch(u){case 0:{class i extends e{code=t;constructor(...n){he.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[vn](){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:Uf(t,n,this),enumerable:!1,writable:!0,configurable:!0})}get["constructor"](){return e}get[vn](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}default:{class i extends e{code=t;constructor(...n){he.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(hs,null,n))}get["constructor"](){return e}get[vn](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}}}function Uf(e,t,r){let u=On.get(e);if(he.ok(u!==void 0,"expected `message` to be found"),typeof u=="function")return he.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=ps(u);return he.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(hs,null,t))}function Wf(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}`:`${Sn(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=Sn(e,{colors:!1});return r.length>28&&(r=`${r.slice(0,25)}...`),`type ${t} (${r})`}}}ae("ERR_INVALID_ARG_TYPE",(e,t,r)=>{he.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)he.ok(typeof o=="string","All expected entries have to be of type string"),Mf.has(o)?i.push(o.toLowerCase()):jf.exec(o)===null?(he.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"} ${xn(i,"or")}`,(s.length>0||n.length>0)&&(u+=" or ")),s.length>0&&(u+=`an instance of ${xn(s,"or")}`,n.length>0&&(u+=" or ")),n.length>0&&(n.length>1?u+=`one of ${xn(n,"or")}`:(n[0]?.toLowerCase()!==n[0]&&(u+="an "),u+=`${n[0]}`)),u+=`. Received ${Wf(r)}`,u},TypeError);var Xt=ae("ERR_INVALID_MODULE_SPECIFIER",(e,t,r)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError),Rn=ae("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error),Vf=ae("ERR_INVALID_PACKAGE_TARGET",(e,t,r,u=!1,i)=>{let s=typeof r=="string"&&!u&&r.length>0&&!r.startsWith("./");return t==="."?(he.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),In=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),Gf=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),Yf=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),zf=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),rs=ae("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),Kf=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=Sn(t);return u.length>128&&(u=`${u.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${u}`},TypeError);var lt={}.hasOwnProperty,ns=new Map;function ds(e,{base:t,specifier:r}){let u=ns.get(e);if(u)return u;let i;try{i=Lf.readFileSync($n.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 Rn(e,(t?`"${r}" from `:"")+B(t||r),o.message);throw a.cause=o,a}s.exists=!0,lt.call(n,"name")&&typeof n.name=="string"&&(s.name=n.name),lt.call(n,"main")&&typeof n.main=="string"&&(s.main=n.main),lt.call(n,"exports")&&(s.exports=n.exports),lt.call(n,"imports")&&(s.imports=n.imports),lt.call(n,"type")&&(n.type==="commonjs"||n.type==="module")&&(s.type=n.type)}return ns.set(e,s),s}function Qt(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let r=ds(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 qf={}.hasOwnProperty,Jf={__proto__:null,".json":"json",".cjs":"commonjs",".cts":"commonjs",".js":"module",".ts":"module",".mts":"module",".mjs":"module"},us={__proto__:null,"data:":Qf,"file:":th,"node:":()=>"builtin"};function Zf(e){return e&&/^\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?$/i.test(e)?"module":e==="application/json"?"json":null}function Qf(e){let{1:t}=/^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/.exec(e.pathname)||[null,null,null];return Zf(t)}var Xf=46,is=47;function eh(e){let t=e.pathname;for(let r=t.length-1;r>0;r--)switch(t.charCodeAt(r)){case is:return"";case Xf:return t.charCodeAt(r-1)===is?"":t.slice(r)}return""}function th(e,t,r){let u=eh(e);if(u===".js"){let{type:s}=Qt(e);return s!=="none"?s:"commonjs"}if(u===""){let{type:s}=Qt(e);return s==="module"?"module":s!=="none"?s:"commonjs"}let i=Jf[u];if(i)return i;if(!r)throw new Kf(u,B(e))}function rh(e,t){let r=e.protocol;return qf.call(us,r)&&us[r](e,t,!0)||null}var Jt=RegExp.prototype[Symbol.replace],Fs={}.hasOwnProperty,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,os=/(^|\\|\/)((\.|%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,nh=/^\.|%|\\/,Zt=/\*/g,uh=/%2f|%5c/i,as=new Set,ih=/[/\\]{2}/;function Ds(e,t,r,u,i,s,n){if(Re.noDeprecation)return;let o=B(u),a=ih.exec(n?e:t)!==null;Re.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 ls(e,t,r,u){if(Re.noDeprecation||rh(e,{parentURL:r.href})!=="module")return;let i=B(e.href),s=B(new M(".",t)),n=B(r);u?$n.resolve(s,u)!==i&&Re.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}.
|
|
101
|
+
Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):Re.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}.
|
|
102
|
+
Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function ms(e){try{return Tn(e)}catch{}}function Bn(e){let t=Tn(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function sh(e,t,r){let u;if(t.main!==void 0){if(u=new M(t.main,e),Bn(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 M(n[o],e),!Bn(u));)u=void 0;if(u)return ls(u,e,r,t.main),u}let i=["./index.js","./index.json","./index.node"],s=-1;for(;++s<i.length&&(u=new M(i[s],e),!Bn(u));)u=void 0;if(u)return ls(u,e,r,t.main),u;throw new In(B(new M(".",e)),B(r))}function oh(e,t,r){if(uh.exec(e.pathname)!==null)throw new Xt(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=ms(u.endsWith("/")?u.slice(-1):u);if(i&&i.isDirectory()){let s=new zf(u,B(t));throw s.url=String(e),s}if(!i||!i.isFile()){let s=new In(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($n.sep)?"/":"")),e.search=n,e.hash=o}return e}function ah(e,t,r){return new Gf(e,t&&B(new M(".",t)),B(r))}function _n(e,t,r){return new Yf(B(new M(".",t)),e,r&&B(r))}function Dh(e,t,r,u,i){throw new Xt(e,`request is not a valid match in pattern "${t}" for the "${u?"imports":"exports"}" resolution of ${B(r)}`,i&&B(i))}function ct(e,t,r,u,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new Vf(B(new M(".",r)),e,t,u,i&&B(i))}function lh(e,t,r,u,i,s,n,o,a){if(t!==""&&!s&&e.at(-1)!=="/")throw ct(r,e,u,n,i);if(!e.startsWith("./")){if(n&&!e.startsWith("../")&&!e.startsWith("/")){let f=!1;try{new M(e),f=!0}catch{}if(!f)return Cs(s?Jt.call(Zt,e,()=>t):e+t,u,a)}throw ct(r,e,u,n,i)}if(ss.exec(e.slice(2))!==null)if(os.exec(e.slice(2))===null){if(!o){let f=s?r.replace("*",()=>t):r+t;Ds(s?Jt.call(Zt,e,()=>t):e,f,r,u,n,i,!0)}}else throw ct(r,e,u,n,i);let D=new M(e,u),l=D.pathname,c=new M(".",u).pathname;if(!l.startsWith(c))throw ct(r,e,u,n,i);if(t==="")return D;if(ss.exec(t)!==null){let f=s?r.replace("*",()=>t):r+t;os.exec(t)===null?o||Ds(s?Jt.call(Zt,e,()=>t):e,f,r,u,n,i,!1):Dh(f,r,u,n,i)}return s?new M(Jt.call(Zt,D.href,()=>t)):new M(t,D)}function ch(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function Ve(e,t,r,u,i,s,n,o,a){if(typeof t=="string")return lh(t,r,u,e,i,s,n,o,a);if(Array.isArray(t)){let D=t;if(D.length===0)return null;let l,c=-1;for(;++c<D.length;){let f=D[c],h;try{h=Ve(e,f,r,u,i,s,n,o,a)}catch(p){let E=p;if(l=E,E.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw p}if(h!==void 0){if(h===null){l=null;continue}return h}}if(l==null)return l;throw l}if(typeof t=="object"&&t!==null){let D=Object.getOwnPropertyNames(t),l=-1;for(;++l<D.length;){let c=D[l];if(ch(c))throw new Rn(B(e),B(i),'"exports" cannot contain numeric property keys.')}for(l=-1;++l<D.length;){let c=D[l];if(c==="default"||a&&a.has(c)){let f=t[c],h=Ve(e,f,r,u,i,s,n,o,a);if(h===void 0)continue;return h}}return}if(t===null)return null;throw ct(u,t,e,n,i)}function fh(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 Rn(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 hh(e,t,r){if(Re.noDeprecation)return;let u=B(t);as.has(u+"|"+e)||(as.add(u+"|"+e),Re.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 cs(e,t,r,u,i){let s=r.exports;if(fh(s,e,u)&&(s={".":s}),Fs.call(s,t)&&!t.includes("*")&&!t.endsWith("/")){let l=s[t],c=Ve(e,l,"",t,u,!1,!1,!1,i);if(c==null)throw _n(t,e,u);return c}let n="",o="",a=Object.getOwnPropertyNames(s),D=-1;for(;++D<a.length;){let l=a[D],c=l.indexOf("*");if(c!==-1&&t.startsWith(l.slice(0,c))){t.endsWith("/")&&hh(t,e,u);let f=l.slice(c+1);t.length>=l.length&&t.endsWith(f)&&gs(n,l)===1&&l.lastIndexOf("*")===c&&(n=l,o=t.slice(c,t.length-f.length))}}if(n){let l=s[n],c=Ve(e,l,o,n,u,!0,!1,t.endsWith("/"),i);if(c==null)throw _n(t,e,u);return c}throw _n(t,e,u)}function gs(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 ph(e,t,r){if(e==="#"||e.endsWith("/"))throw new Xt(e,"is not a valid internal imports specifier name",B(t));let u,i=Qt(t);if(i.exists){u=fe(i.pjsonPath);let s=i.imports;if(s)if(Fs.call(s,e)&&!e.includes("*")){let n=Ve(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 l=a[D],c=l.indexOf("*");if(c!==-1&&e.startsWith(l.slice(0,c))){let f=l.slice(c+1);e.length>=l.length&&e.endsWith(f)&&gs(n,l)===1&&l.lastIndexOf("*")===c&&(n=l,o=e.slice(c,e.length-f.length))}}if(n){let l=s[n],c=Ve(u,l,o,n,t,!0,!0,!1,r);if(c!=null)return c}}}throw ah(e,u,t)}function dh(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(nh.exec(s)!==null&&(u=!1),!u)throw new Xt(e,"is not a valid package name",B(t));return{packageName:s,packageSubpath:"."+(r===-1?"":e.slice(r)),isScoped:i}}function Cs(e,t,r){if(kn.includes(e))return new M("node:"+e);let{packageName:u,packageSubpath:i,isScoped:s}=dh(e,t),n=Qt(t);if(n.exists&&n.name===u&&n.exports!==void 0&&n.exports!==null)return cs(fe(n.pjsonPath),i,n,t,r);let o=new M("./node_modules/"+u+"/package.json",t),a=B(o),D;do{let l=ms(a.slice(0,-13));if(!l||!l.isDirectory()){D=a,o=new M((s?"../../../../node_modules/":"../../../node_modules/")+u+"/package.json",o),a=B(o);continue}let c=ds(a,{base:t,specifier:e});return c.exports!==void 0&&c.exports!==null?cs(o,i,c,t,r):i==="."?sh(o,c,t):new M(i,o)}while(a.length!==D.length);throw new In(u,B(t),!1)}function Fh(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function mh(e){return e===""?!1:e[0]==="/"?!0:Fh(e)}function gh(e,t,r,u){let i=t.protocol,s=i==="data:",n;if(mh(e))try{n=new M(e,t)}catch(o){let a=new rs(e,t);throw a.cause=o,a}else if(i==="file:"&&e[0]==="#")n=ph(e,t,r);else try{n=new M(e)}catch(o){if(s&&!kn.includes(e)){let a=new rs(e,t);throw a.cause=o,a}n=Cs(e,t,r)}return he.ok(n!==void 0,"expected to be defined"),n.protocol!=="file:"?n:oh(n,t,u)}var Ch=new Set(["node","import"]),Eh="2:6:import4:node",yh=process.platform==="win32",Ah=globalThis.__EXSOLVE_CACHE__||=new Map;function wh(e,t){let r=kh(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=_h(s||u,t),o=t?.cache&&typeof t?.cache=="object"?t.cache:Ah),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=Nf(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):Ch,D=u||i.href,l=xh(t?.from),c=t?.suffixes||[""],f=t?.extensions?["",...t.extensions]:[""],h;for(let p of l){for(let E of c){let C=Th(D,E);C==="."&&(C+="/.");for(let R of f)if(h=bh(C+R,p,a),h)break;if(h)break}if(h)break}if(!h){let p=new Error(`Cannot resolve module "${e}" (from: ${l.map(E=>Bh(E)).join(", ")})`);if(p.code="ERR_MODULE_NOT_FOUND",o&&o.set(n,p),t?.try)return;throw p}return o&&o.set(n,h.href),h.href}function Es(e,t){let r=wh(e,t);if(!r||!r.startsWith("file://")&&t?.try)return;let u=B(r);return yh?$h(u):u}function bh(e,t,r){try{return gh(e,t,r)}catch{}}function xh(e){let t=(Array.isArray(e)?e:[e]).flatMap(r=>vh(r));return t.length===0?[fe("./")]:t}function vh(e){if(!e)return[];if(ys(e))return[e];if(typeof e!="string")return[];if(/^(?:node|data|http|https|file):/.test(e))return new URL(e);try{return e.endsWith("/")||Tn(e).isDirectory()?fe(e+"/"):fe(e)}catch{return[fe(e+"/"),fe(e)]}}function Bh(e){try{return B(e)}catch{return e}}function _h(e,t){let r;return Array.isArray(t?.from)?r=t.from:t?.from&&(r=[t.from]),ft([e])+Sh(t?.conditions)+ft(t?.extensions)+ft(r)+ft(t?.suffixes)}function Sh(e){return e?ft([...new Set(e)].sort()):Eh}function ft(e){if(!e)return"-";let t=`${e.length}:`;for(let r of e){let u=String(r);t+=`${u.length}:${u}`}return t}function Th(e,t){return!e||!t||t==="/"?e:(e.endsWith("/")?e:e+"/")+(t.startsWith("/")?t.slice(1):t)}function $h(e){return e.replace(/\\/g,"/").replace(/^[a-z]:\//,t=>t.toUpperCase())}function ys(e){return e instanceof URL||e?.constructor?.name==="URL"}function kh(e){if(typeof e=="string"){if(e.startsWith("file:")){let t=new URL(e);return{url:t,absolutePath:B(t)}}return Pf(e)?{url:fe(e),absolutePath:e}:/^(?:node|data|http|https):/.test(e)?{external:e}:kn.includes(e)&&!e.includes(":")?{external:`node:${e}`}:{specifier:e}}if(ys(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 Ih}from"node:url";var Lh={startingFrom:".",rootPattern:/^node_modules$/,reverse:!1,test:e=>{try{if(Rh(e).isFile())return!0}catch{}}};async function Nh(e,t={}){let r=Array.isArray(e)?e:[e],u={...Lh,...t},i=Oe(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 l=ke(...n.slice(0,a),D);if(await u.test(l))return l}else for(let a=n.length;a>o;a--)for(let D of r){let l=ke(...n.slice(0,a),D);if(await u.test(l))return l}throw new Error(`Cannot find matching ${e} in ${u.startingFrom} or parent directories`)}function Ph(e,t={}){return Nh(e,t)}function jh(e,t={}){return e instanceof URL||e.startsWith("file://")?$e(Ih(e)):Te(e)?$e(e):Es(e,{...t,from:t.from||t.parent||t.url})}var Mh=new Map;async function As(e,t={}){let r=await Ln(e,t),u=t.cache&&typeof t.cache!="boolean"?t.cache:Mh;if(t.cache&&u.has(r))return u.get(r);let i=await Oh.readFile(r,"utf8"),s;try{s=es(i)}catch{s=ts(i)}return u.set(r,s),s}async function Ln(e=process.cwd(),t={}){return Ph("package.json",{...t,startingFrom:jh(e,t)})}var er={react:"React",vue:"Vue",svelte:"Svelte",solid:"Solid"},Hh=[{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}],Uh=[{dep:"react",library:"react"},{dep:"vue",library:"vue"},{dep:"svelte",library:"svelte"},{dep:"solid-js",library:"solid"}];function Wh(e){return{...e.dependencies??{},...e.devDependencies??{},...e.peerDependencies??{}}}async function ht(e){let t;try{t=await Ln(e)}catch{return null}let r=await As(t),u=Wh(r),i=t.replace(/[\\/]package\.json$/,""),s=Hh.find(o=>o.dep in u)??null,n=s?.library??Uh.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 xs(e,t){let r=er[t];return!e||e===r?r:`${e} + ${r}`}function tr(e,t){return t==="Nuxt"?"components/shaders":t==="SvelteKit"?"src/lib/components/shaders":t==="Remix"||t==="React Router"?"app/components/shaders":ws(bs.join(e,"src"))?"src/components/shaders":ws(bs.join(e,"app"))&&t!=="Next.js"?"app/components/shaders":"components/shaders"}var Pn=Symbol.for("cancel"),rr=Object.keys(er);function xe(e){return!e.yes&&!!process.stdout.isTTY&&!!process.stdin.isTTY}function ge(){m.log("Cancelled."),process.exit(0)}async function Vh(e,t){if(t.framework){if(!rr.includes(t.framework))throw new Error(`Unknown framework "${t.framework}". Use one of: ${rr.join(", ")}`);return t.framework}if(e.library)return e.library;if(!xe(t))throw new Error(`Couldn't detect a UI framework in ${nr.join(e.dir,"package.json")}. Pass one with --framework <${rr.join("|")}>`);let r=await m.prompt("Which framework does this project use?",{type:"select",options:rr.map(u=>({value:u,label:er[u]})),cancel:"symbol"});return r===Pn&&ge(),r}async function Gh(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 yn(e.dir))?.name??"npm";m.start(`Installing shaders with ${r}\u2026`);try{await zt("shaders",{cwd:e.dir,silent:!0,packageManager:r})}catch(u){throw new Error(`Failed to install shaders: ${u instanceof Error?u.message:String(u)}
|
|
103
|
+
Install it manually, then re-run npx shaders init`)}m.success("Installed shaders")}function Nn(e,t){return nr.relative(e,t)||nr.basename(t)}async function pt(e,t,r){if(r.project){let{projects:l}=await z("/api/plugin/projects",{token:e.accessToken,query:{id:r.project,limit:"1"}}),c=l.find(f=>f.id===r.project);if(!c)throw new Error(`Project ${r.project} not found in your account`);return c}if(!xe(r))return m.info("Skipped connecting a project \u2014 pass --project <id> to connect non-interactively"),null;let{projects:u}=await z("/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(l=>({value:l.id,label:l.title||"Untitled Project",hint:`${l.shader_count} shader${l.shader_count===1?"":"s"}`}))],n=await m.prompt("Which shaders.com project should this codebase connect to?",{type:"select",options:s,cancel:"symbol"});if(n===Pn&&ge(),n!==i)return u.find(l=>l.id===n)??null;let o=typeof t.pkg.name=="string"&&t.pkg.name?t.pkg.name.replace(/^@[^/]+\//,""):nr.basename(t.dir),a=await m.prompt("Project name",{type:"text",default:o,placeholder:o,cancel:"symbol"});a===Pn&&ge();let D=await z("/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 ur(e){let t=process.cwd(),r=await ht(t);if(!r)throw new Error(`No package.json found in ${t} or its parents. Run npx shaders init from inside your project.`);let u=await Vh(r,e);m.log(`Detected: ${xs(r.framework,u)}`),await Gh(r,e);let i=await at(r.dir);i&&m.success(`Found ${Nn(r.dir,i)}`);let s=null,n=null;if(e.auth){let{credentials:o,me:a}=await me();m.success(`Signed in${a.email?` as ${a.email}`:""}`);let D=await pt(o,r,e);D&&(s=D.id,n=D.title)}else m.info("Skipped sign-in (--no-auth)");if(i)s&&(await be(i,"project",s)||m.warn(`Couldn't update ${Nn(r.dir,i)} automatically \u2014 add project: '${s}' to it`));else{let o=tr(r.dir,r.framework);i=await Zi(r.dir,{framework:u,project:s??void 0,outDir:o},r.usesTypeScript),m.success(`Created ${Nn(r.dir,i)} (components will install to ${o}/)`)}s&&m.success(`Connected project to Shaders${n?` (${n})`:""}
|
|
104
|
+
${Z()}/design-editor/${s}`),m.log(`
|
|
105
|
+
Next: npx shaders install <id> to add a shader from your account, or import { Shader } from 'shaders/${u}' \u2014 docs at ${Z()}/docs`)}import{lstatSync as Xh,realpathSync as $s}from"node:fs";import{mkdir as ep,readFile as tp,writeFile as rp}from"node:fs/promises";import pe from"node:path";import{createHash as Yh}from"node:crypto";import{readFile as zh,writeFile as Kh}from"node:fs/promises";import vs from"node:path";var Ie="shaders.lock.json";function dt(e){return"sha256:"+Yh("sha256").update(e).digest("hex")}var qh=["title","component","file","framework","hash","installedAt"];function Jh(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 Zh(e){if(!e||typeof e!="object")return!1;let t=e;return qh.every(r=>typeof t[r]=="string")&&(t.updatedAt===null||typeof t.updatedAt=="string")&&(t.source===void 0||Jh(t.source))&&(t.pending===void 0||t.pending===!0)}async function ir(e){let t=vs.join(e,Ie),r;try{r=await zh(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(`${Ie} is not valid JSON \u2014 fix or delete it and re-run`)}if(!u||typeof u!="object")throw new Error(`${Ie} is malformed \u2014 fix or delete it and re-run`);let i=u;if(i.version!==1)throw new Error(`${Ie} 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(`${Ie} is malformed (missing "shaders") \u2014 fix or delete it and re-run`);for(let[s,n]of Object.entries(i.shaders))if(!Zh(n))throw new Error(`${Ie} has an invalid entry for "${s}" \u2014 fix or delete it and re-run`);return{version:1,shaders:i.shaders}}async function Le(e,t){let r={version:1,shaders:Object.fromEntries(Object.entries(t.shaders).sort(([u],[i])=>u.localeCompare(i)))};await Kh(vs.join(e,Ie),JSON.stringify(r,null,2)+`
|
|
106
|
+
`)}var jn=Symbol.for("cancel");function sr(e){return!/^\d+$/.test(e)}function Mn(e){let t=new URL("/pricing",Z()+"/");return t.searchParams.set("utm_source","cli"),t.searchParams.set("utm_medium","terminal"),e&&t.searchParams.set("utm_campaign",e),t.toString()}async function Ft(e,t){let r=await z(`/api/plugin/presets/${encodeURIComponent(e.toLowerCase())}`);if(r.kind==="preset")return r.preset;if(r.variants.length===1||!xe(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===jn&&ge(),r.variants.find(i=>i.id===u)??r.variants[0]}function or(e,t){return{kind:t,presetId:e.id,slug:e.slug}}async function mt(e,t,r){if(e.project)return e.project;let u=await pt(t,e.detected,r);if(!u)throw new Error("A shaders.com project is needed to hold the preset. Pass --project <id> or run npx shaders init");return await be(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 Bs(e,t,r){return z(`/api/plugin/presets/${encodeURIComponent(t.id)}/clone`,{method:"POST",token:e.accessToken,body:{project_id:r}})}var Qh=e=>new Promise(t=>setTimeout(t,e));async function _s(e,t,r){let u=`${e.title} requires a Shaders Pro subscription`,i=Mn(e.slug);if(!xe(r))throw new Error(`${u}.
|
|
107
|
+
Get Pro: ${i}
|
|
108
|
+
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 shaders.com/pricing"},...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===jn&&ge(),o==="preview")return{kind:"preview"};o==="pro"&&(m.info(`Opening ${i}`),st(i),await m.prompt("Press enter here once you've finished on shaders.com",{type:"text",placeholder:"",default:"",cancel:"symbol"})===jn&&ge(),await Qh(500));let a=s&&o==="pro"?s.credentials:await dn(),D;try{D=await z("/api/plugin/me",{token:a.accessToken})}catch(l){if(l instanceof J&&l.status===401&&s){s=null;continue}throw l}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 Ss(e,t,r){let u=[`Watermarked preview of "${r.title}" from shaders.com (${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(`
|
|
109
|
+
`);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(`
|
|
110
|
+
`);case"svelte":return['<script lang="ts">',...u.map(i=>` // ${i}`)," import { Preview } from 'shaders/svelte'","</script>","",`<Preview presetId="${r.id}" />`,""].join(`
|
|
111
|
+
`)}}async function Ts(e){let t=await ht(e);return!!t&&!!await at(t.dir)}async function Ge(e){let t=await ht(e);if(!t)throw new Error(`No package.json found in ${e} or its parents. Run this from inside your project.`);let r=await at(t.dir);if(!r)throw new Error(`No shaders.config found in ${t.dir}. Run npx shaders init first.`);let u=await Ji(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=tr(t.dir,t.framework),await be(r,"outDir",s)&&m.info(`Added outDir: '${s}' to your shaders config`)),{detected:t,configFile:r,framework:i,project:u.project,outDir:s}}var ks="__all__",np=Symbol.for("cancel"),up=100,ip=1e3,sp={react:".tsx",solid:".tsx",vue:".vue",svelte:".svelte"};function Rs(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 op(e,t){return e.replace(/\bShaderEffect\b/g,t)}function ap(e,t){let r=t.file.replace(/\.[^.]+$/,"");if(e.detected.framework==="Nuxt"){let i=pe.posix.relative("components",pe.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 ar(e,t,r){try{return await z(`/api/plugin/shaders/${encodeURIComponent(t)}/code`,{token:e.accessToken,query:{format:r}})}catch(u){throw u instanceof J&&u.status===403&&u.upgradeUrl?new Error(`${u.message}
|
|
112
|
+
${u.upgradeUrl}`):u instanceof J&&u.status===404?new Error(`Shader ${t} not found (or not yours). IDs are shown in the design editor's Export Code dialog.`):u}}function Hn(e,t){let r=pe.resolve(e),u=pe.resolve(r,t),i=(a,D)=>a===D||a.startsWith(D+pe.sep);if(!i(u,r))throw new Error(`Refusing to write outside the project: ${t}`);let s=a=>{try{return Xh(a),!0}catch{return!1}},n=u;for(;!s(n);)n=pe.dirname(n);let o;try{o=$s(n)}catch{throw new Error(`Refusing to write through a broken symlink: ${t}`)}if(!i(o,$s(r)))throw new Error(`Refusing to write outside the project (symlink escapes it): ${t}`);return u}async function Un(e){try{return await tp(e,"utf8")}catch(t){if(t.code==="ENOENT")return null;throw t}}function Is(e,t,r,u){let i=e.outDir.split(pe.sep).join("/"),s=sp[e.framework],n=new Set(Object.entries(u.shaders).filter(([l])=>l!==r).map(([,l])=>l.file)),o=Rs(t,r),a=r.replace(/[^a-zA-Z0-9]/g,"").slice(0,8),D=[o,`${o}${a}`];for(let l=2;;l++){for(let c of D){let f=pe.posix.join(i,`${c}${s}`);if(!n.has(f))return{component:c,relFile:f}}D.splice(0,D.length,`${o}${a}${l}`)}}async function Wn(e,t,r,u,i){let{component:s,relFile:n}=r?{component:r.component,relFile:r.file}:Is(e,t.title,t.id,u),o=Hn(e.detected.dir,n),a=op(t.code,s).replace(/\n?$/,`
|
|
113
|
+
`),D=dt(a),l=await Un(o);if(l!==null){let c=dt(l);if(c===D)return{entry:Os(r,s,n,e.framework,D,t),status:"unchanged"};if(!(r?c===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 ep(pe.dirname(o),{recursive:!0}),await rp(o,a),{entry:Os(r,s,n,e.framework,D,t),status:l===null?"installed":"updated"}}function Vn(e,t,r,u,i,s){return Wn(e,{id:t.id,title:t.title,code:t.code,updatedAt:t.updated_at??null,source:s??r?.source},r,u,i)}function Os(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 Dp(e,t){let r=[],u=0,i=null;for(;u!==null&&r.length<ip;){let s=await z(`/api/plugin/projects/${encodeURIComponent(t)}/shaders`,{token:e.accessToken,query:{limit:String(up),offset:String(u)}});i??=s.project,r.push(...s.shaders),u=s.has_more?s.next_offset:null}return{project:i,shaders:r}}async function lp(e,t,r){if(!xe(r)&&!r.all)throw new Error(`Usage: npx shaders install <id|preset> [...] (or --all to install every shader in the connected project)
|
|
114
|
+
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.com project yet");let a=await pt(t,e.detected,r);if(!a)throw new Error("No project selected. Pass --project <id> or run npx shaders init");u=a.id,await be(e.configFile,"project",u)?m.success(`Connected project "${a.title}"`):m.warn(`Couldn't update ${pe.basename(e.configFile)} automatically \u2014 add project: '${u}' to it`)}let{project:i,shaders:s}=await Dp(t,u);if(s.length===0)return m.info(`"${i.title}" has no shaders yet \u2014 ${Z()}/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:ks,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===np&&ge();let o=n.map(a=>typeof a=="string"?a:a.value);return o.includes(ks)?s.map(a=>a.id):o}function Gn(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?`
|
|
115
|
+
${i}`:""}
|
|
116
|
+
${ap(e,r)}`)}async function Ls(e,t,r,u,i){let s=await ar(t,r,e.framework),n=u.shaders[r]??null,{entry:o,status:a}=await Vn(e,s,n,u,i.force);u.shaders[r]=o,await Le(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.com project than this codebase is connected to`),Gn(e,s.title,o,a)}async function cp(e,t,r,u,i){let s=await Ft(t,u),n=Object.keys(r.shaders).find(l=>r.shaders[l].source?.kind==="preset"&&r.shaders[l].source?.presetId===s.id&&!r.shaders[l].pending);if(n){let l=i??await me();return m.info(`"${s.title}" is already in your project as shader ${n} \u2014 refreshing it`),await Ls(e,l.credentials,n,r,u),l}let o=Object.keys(r.shaders).find(l=>r.shaders[l].source?.kind==="preview"&&r.shaders[l].source?.presetId===s.id),a=i;if(!a?.me.isPro){let l=await _s(s,a,u);if(l.kind==="preview"){let c=o?r.shaders[o]:null,{entry:f,status:h}=await Wn(e,{id:s.id,title:s.title,code:Ss(e.framework,c?.component??Rs(s.title,s.id),s),updatedAt:null,source:or(s,"preview")},c,r,u.force);return r.shaders[s.id]=f,await Le(e.detected.dir,r),Gn(e,s.title,f,h,"Watermarked preview \u2014 run `npx shaders update` once you have Pro to swap in the real component"),a}a={credentials:l.credentials,me:l.me},m.success(`Signed in${a.me.email?` as ${a.me.email}`:""} \u2014 Shaders Pro`)}let D=await mt(e,a.credentials,u);return await Dr(e,a.credentials,s,D,o?r.shaders[o]:null,o,r,u.force),a}async function Dr(e,t,r,u,i,s,n,o){let a=Object.keys(n.shaders).find(h=>n.shaders[h].pending&&n.shaders[h].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 h=await Bs(t,r,u);a=h.id;let p=i?{component:i.component,relFile:i.file}:Is(e,h.title,h.id,n);D={title:h.title,component:p.component,file:p.relFile,framework:e.framework,hash:i?.hash??"",updatedAt:h.updated_at,installedAt:i?.installedAt??new Date().toISOString(),source:or(r,"preset"),pending:!0},s&&s!==a&&delete n.shaders[s],n.shaders[a]=D,await Le(e.detected.dir,n)}let l=await ar(t,a,e.framework),{entry:c,status:f}=await Wn(e,{id:a,title:l.title,code:l.code,updatedAt:l.updated_at??D.updatedAt,source:or(r,"preset")},D,n,o);n.shaders[a]=c,await Le(e.detected.dir,n),Gn(e,l.title,c,i?"updated":f,`Added to your project as shader ${a} \u2014 edit it with \`npx shaders open\``)}async function Ns(e,t){let r=process.cwd(),u=e.length>0&&e.every(sr);if(!await Ts(r)){if(!xe(t))throw new Error("No shaders.config found. Run npx shaders init first.");m.info(`Shaders isn't set up in this project yet \u2014 running init first
|
|
117
|
+
`),await ur(u?{...t,auth:!1}:t),m.log("")}let i=await Ge(r),s=await ir(i.detected.dir),n=await Ri();if((e.length===0||e.some(D=>!sr(D)))&&!n&&(n=await me()),e.length===0&&(e=await lp(i,n.credentials,t),e.length===0))return;let a=0;for(let D of e)try{sr(D)?n=await cp(i,D,s,t,n):await Ls(i,n.credentials,D,s,t)}catch(l){a++,m.error(`${D}: ${l instanceof Error?l.message:String(l)}`)}a===e.length&&process.exit(1)}async function Ps(){let e=await Ge(process.cwd());if(!e.project)throw new Error("This codebase isn't connected to a shaders.com project yet. Run npx shaders init to connect one.");let t=`${Z()}/design-editor/${e.project}`;m.log(t),st(t)}async function js(e,t){let r=await Ge(process.cwd()),u=await ir(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 me(),o={updated:0,unchanged:0,skipped:0,failed:0};for(let D of i){let l=u.shaders[D];try{if(l.pending&&l.source){let E=await Ft(l.source.presetId,t),C=await mt(r,s,t);await Dr(r,s,E,C,l,D,u,t.force),o.updated++;continue}let c=await Un(Hn(r.detected.dir,l.file));if(c!==null&&dt(c)!==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: ${Mn(l.source.slug)}`);continue}let E=await Ft(l.source.presetId,t),C=await mt(r,s,t);await Dr(r,s,E,C,l,D,u,t.force),o.updated++;continue}let f=await ar(s,D,l.framework),{entry:h,status:p}=await Vn(r,f,l,u,t.force);u.shaders[D]=h,await Le(r.detected.dir,u),p==="unchanged"?(o.unchanged++,m.log(` "${h.title}" is up to date`)):(o.updated++,m.success(`${c===null?"Restored":"Updated"} "${h.title}" \u2192 ${h.file}`))}catch(c){o.failed++,m.error(`${l.title} (${D}): ${c instanceof Error?c.message:String(c)}`)}}let a=[o.updated&&`${o.updated} updated`,o.unchanged&&`${o.unchanged} up to date`,o.skipped&&`${o.skipped} skipped`,o.failed&&`${o.failed} failed`].filter(Boolean);m.log(`
|
|
118
|
+
${a.join(", ")}`),o.failed===i.length&&process.exit(1)}var ue=Rt(zn(),1);import{stdin as mp,stdout as gp}from"node:process";import Vs from"node:readline";import{WriteStream as Cp}from"node:tty";function Ep({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 yp=Ep();function Qs(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(yp,"")}function Xs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eo={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 l=a[D],c=t.length(l);if(o>=i-(c==2?1:0))if(o+c<=s)n+=l;else break;o+=c}return n}})(eo);var Ap=eo.exports,wp=Xs(Ap),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},xp=Xs(bp);function gt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Qs(e),e.length===0))return 0;e=e.replace(xp()," ");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(wp.eastAsianWidth(i)){case"F":case"W":u+=2;break;case"A":u+=r;break;default:u+=1}}return u}var qn=10,Gs=(e=0)=>t=>`\x1B[${t+e}m`,Ys=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,zs=(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);var vp=Object.keys(O.color),Bp=Object.keys(O.bgColor);[...vp,...Bp];function _p(){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=Gs(),O.color.ansi256=Ys(),O.color.ansi16m=zs(),O.bgColor.ansi=Gs(qn),O.bgColor.ansi256=Ys(qn),O.bgColor.ansi16m=zs(qn),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}var Sp=_p(),pr=new Set(["\x1B","\x9B"]),Tp=39,Xn="\x07",to="[",$p="]",ro="m",eu=`${$p}8;;`,Ks=e=>`${pr.values().next().value}${to}${e}${ro}`,qs=e=>`${pr.values().next().value}${eu}${e}${Xn}`,kp=e=>e.split(" ").map(t=>gt(t)),Jn=(e,t,r)=>{let u=[...t],i=!1,s=!1,n=gt(Qs(e[e.length-1]));for(let[o,a]of u.entries()){let D=gt(a);if(n+D<=r?e[e.length-1]+=a:(e.push(a),n=0),pr.has(a)&&(i=!0,s=u.slice(o+1).join("").startsWith(eu)),i){s?a===Xn&&(i=!1,s=!1):a===ro&&(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())},Op=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(gt(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Rp=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let u="",i,s,n=kp(e),o=[""];for(let[D,l]of e.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let c=gt(o[o.length-1]);if(D!==0&&(c>=t&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),c=0),(c>0||r.trim===!1)&&(o[o.length-1]+=" ",c++)),r.hard&&n[D]>t){let f=t-c,h=1+Math.floor((n[D]-f-1)/t);Math.floor((n[D]-1)/t)<h&&o.push(""),Jn(o,l,t);continue}if(c+n[D]>t&&c>0&&n[D]>0){if(r.wordWrap===!1&&c<t){Jn(o,l,t);continue}o.push("")}if(c+n[D]>t&&r.wordWrap===!1){Jn(o,l,t);continue}o[o.length-1]+=l}r.trim!==!1&&(o=o.map(D=>Op(D)));let a=[...o.join(`
|
|
119
|
+
`)];for(let[D,l]of a.entries()){if(u+=l,pr.has(l)){let{groups:f}=new RegExp(`(?:\\${to}(?<code>\\d+)m|\\${eu}(?<uri>.*)${Xn})`).exec(a.slice(D).join(""))||{groups:{}};if(f.code!==void 0){let h=Number.parseFloat(f.code);i=h===Tp?void 0:h}else f.uri!==void 0&&(s=f.uri.length===0?void 0:f.uri)}let c=Sp.codes.get(Number(i));a[D+1]===`
|
|
120
|
+
`?(s&&(u+=qs("")),i&&c&&(u+=Ks(c))):l===`
|
|
121
|
+
`&&(i&&c&&(u+=Ks(i)),s&&(u+=qs(s)))}return u};function Js(e,t,r){return String(e).normalize().replace(/\r\n/g,`
|
|
115
122
|
`).split(`
|
|
116
|
-
`).map(
|
|
117
|
-
`)}var
|
|
118
|
-
`),
|
|
119
|
-
`),i=[];for(let s=0;s<Math.max(
|
|
120
|
-
`),
|
|
121
|
-
`).length-1;this.output.write(
|
|
122
|
-
`);this.output.write(i[
|
|
123
|
-
`).slice(
|
|
124
|
-
`)),this._prevFrame=t;return}this.output.write(
|
|
125
|
-
${
|
|
126
|
-
${
|
|
127
|
-
`,
|
|
128
|
-
${
|
|
129
|
-
`).map((s,
|
|
130
|
-
`);return`${
|
|
131
|
-
${
|
|
123
|
+
`).map(u=>Rp(u,t,r)).join(`
|
|
124
|
+
`)}var Ip=["up","down","left","right","space","enter","cancel"],hr={actions:new Set(Ip),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function no(e,t){if(typeof e=="string")return hr.aliases.get(e)===t;for(let r of e)if(r!==void 0&&no(r,t))return!0;return!1}function Lp(e,t){if(e===t)return;let r=e.split(`
|
|
125
|
+
`),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 bC=globalThis.process.platform.startsWith("win"),Zn=Symbol("clack:cancel");function Ct(e){return e===Zn}function fr(e,t){let r=e;r.isTTY&&r.setRawMode(t)}var Np=Object.defineProperty,Pp=(e,t,r)=>t in e?Np(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,re=(e,t,r)=>(Pp(e,typeof t!="symbol"?t+"":t,r),r),Qn=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=mp,output:i=gp,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(Zn);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let u=new Cp(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=Vs.createInterface({input:this.input,output:u,tabSize:2,prompt:"",escapeCodeTimeout:50}),Vs.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),fr(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),fr(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(ue.cursor.show),this.output.off("resize",this.render),fr(this.input,!1),t(Zn)})})}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&hr.aliases.has(r.name)&&this.emit("cursor",hr.aliases.get(r.name)),hr.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")}no([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
|
+
`),fr(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=Js(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
128
|
+
`).length-1;this.output.write(ue.cursor.move(-999,t*-1))}render(){let t=Js(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=Lp(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(`
|
|
130
|
+
`).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 jp=Object.defineProperty,Mp=(e,t,r)=>t in e?jp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zs=(e,t,r)=>(Mp(e,typeof t!="symbol"?t+"":t,r),r),uo=class extends Qn{constructor(e){super(e,!1),Zs(this,"options"),Zs(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=Rt(Ws(),1),ao=Rt(zn(),1);import De from"node:process";function Hp(){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 Up=Hp(),N=(e,t)=>Up?e:t,Wp=N("\u25C6","*"),Vp=N("\u25A0","x"),Gp=N("\u25B2","x"),Yp=N("\u25C7","o"),NC=N("\u250C","T"),ve=N("\u2502","|"),io=N("\u2514","\u2014"),PC=N("\u25CF",">"),jC=N("\u25CB"," "),zp=N("\u25FB","[\u2022]"),so=N("\u25FC","[+]"),Kp=N("\u25FB","[ ]"),MC=N("\u25AA","\u2022"),HC=N("\u2500","-"),UC=N("\u256E","+"),WC=N("\u251C","+"),VC=N("\u256F","+"),GC=N("\u25CF","\u2022"),YC=N("\u25C6","*"),zC=N("\u25B2","!"),KC=N("\u25A0","x"),qp=e=>{switch(e){case"initial":case"active":return v.default.cyan(Wp);case"cancel":return v.default.red(Vp);case"error":return v.default.yellow(Gp);case"submit":return v.default.green(Yp)}},oo=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((l,c,f)=>{let h=c===0&&a,p=c===f.length-1&&D;return h||p?v.default.dim("..."):u(l,c+o===t)})};var tu=e=>{let t=(r,u)=>{let i=r.label??String(r.value);return u==="active"?`${v.default.cyan(zp)} ${i} ${r.hint?v.default.dim(`(${r.hint})`):""}`:u==="selected"?`${v.default.green(so)} ${v.default.dim(i)}`:u==="cancelled"?`${v.default.strikethrough(v.default.dim(i))}`:u==="active-selected"?`${v.default.green(so)} ${i} ${r.hint?v.default.dim(`(${r.hint})`):""}`:u==="submitted"?`${v.default.dim(i)}`:`${v.default.dim(Kp)} ${v.default.dim(i)}`};return new uo({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
|
+
${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(ve)}
|
|
133
|
+
${qp(this.state)} ${e.message}
|
|
134
|
+
`,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(ve)} ${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(ve)} ${i.trim()?`${i}
|
|
135
|
+
${v.default.gray(ve)}`:""}`}case"error":{let i=this.error.split(`
|
|
136
|
+
`).map((s,n)=>n===0?`${v.default.yellow(io)} ${v.default.yellow(s)}`:` ${s}`).join(`
|
|
137
|
+
`);return`${r+v.default.yellow(ve)} ${oo({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
|
|
138
|
+
${v.default.yellow(ve)} `)}
|
|
132
139
|
${i}
|
|
133
|
-
`}default:return`${
|
|
134
|
-
${
|
|
135
|
-
${
|
|
136
|
-
`}}}).prompt()};import{homedir as
|
|
137
|
-
`;break;case 114:
|
|
138
|
-
`),o++,
|
|
139
|
-
`+" ".repeat(t)),"\r":new Array(
|
|
140
|
-
`+" ".repeat(t))}," ":{"\n":new Array(
|
|
141
|
-
`+" ".repeat(t)),"\r":new Array(
|
|
142
|
-
`+" ".repeat(t))}},
|
|
140
|
+
`}default:return`${r}${v.default.cyan(ve)} ${oo({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:u}).join(`
|
|
141
|
+
${v.default.cyan(ve)} `)}
|
|
142
|
+
${v.default.cyan(io)}
|
|
143
|
+
`}}}).prompt()};import{homedir as ZF}from"os";import{dirname as Rr,join as b}from"path";import{existsSync as W}from"fs";import{readFileSync as Ru,writeFileSync as Ir,existsSync as Lr,mkdirSync as Dm}from"fs";import{dirname as lm}from"path";function yt(e,t=!1){let r=e.length,u=0,i="",s=0,n=16,o=0,a=0,D=0,l=0,c=0;function f(y,$){let x=0,A=0;for(;x<y||!$;){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<y&&(A=-1),A}function h(y){u=y,i="",s=0,n=16,c=0}function p(){let y=u;if(e.charCodeAt(u)===48)u++;else for(u++;u<e.length&&Ye(e.charCodeAt(u));)u++;if(u<e.length&&e.charCodeAt(u)===46)if(u++,u<e.length&&Ye(e.charCodeAt(u)))for(u++;u<e.length&&Ye(e.charCodeAt(u));)u++;else return c=3,e.substring(y,u);let $=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&&Ye(e.charCodeAt(u))){for(u++;u<e.length&&Ye(e.charCodeAt(u));)u++;$=u}else c=3;return e.substring(y,$)}function E(){let y="",$=u;for(;;){if(u>=r){y+=e.substring($,u),c=2;break}let x=e.charCodeAt(u);if(x===34){y+=e.substring($,u),u++;break}if(x===92){if(y+=e.substring($,u),u++,u>=r){c=2;break}switch(e.charCodeAt(u++)){case 34:y+='"';break;case 92:y+="\\";break;case 47:y+="/";break;case 98:y+="\b";break;case 102:y+="\f";break;case 110:y+=`
|
|
144
|
+
`;break;case 114:y+="\r";break;case 116:y+=" ";break;case 117:let F=f(4,!0);F>=0?y+=String.fromCharCode(F):c=4;break;default:c=5}$=u;continue}if(x>=0&&x<=31)if(Et(x)){y+=e.substring($,u),c=2;break}else c=6;u++}return y}function C(){if(i="",c=0,s=u,a=o,l=D,u>=r)return s=r,n=17;let y=e.charCodeAt(u);if(ru(y)){do u++,i+=String.fromCharCode(y),y=e.charCodeAt(u);while(ru(y));return n=15}if(Et(y))return u++,i+=String.fromCharCode(y),y===13&&e.charCodeAt(u)===10&&(u++,i+=`
|
|
145
|
+
`),o++,D=u,n=14;switch(y){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=E(),n=10;case 47:let $=u-1;if(e.charCodeAt(u+1)===47){for(u+=2;u<r&&!Et(e.charCodeAt(u));)u++;return i=e.substring($,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++,Et(F)&&(F===13&&e.charCodeAt(u)===10&&u++,o++,D=u)}return A||(u++,c=1),i=e.substring($,u),n=13}return i+=String.fromCharCode(y),u++,n=16;case 45:if(i+=String.fromCharCode(y),u++,u===r||!Ye(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&&R(y);)u++,y=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(y),u++,n=16}}function R(y){if(ru(y)||Et(y))return!1;switch(y){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function _(){let y;do y=C();while(y>=12&&y<=15);return y}return{setPosition:h,getPosition:()=>u,scan:t?_:C,getToken:()=>n,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>u-s,getTokenStartLine:()=>a,getTokenStartCharacter:()=>s-l,getTokenError:()=>c}}function ru(e){return e===32||e===9}function Et(e){return e===10||e===13}function Ye(e){return e>=48&&e<=57}var lo;(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"})(lo||(lo={}));var ne=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),ze=200,nu={" ":{"\n":new Array(ze).fill(0).map((e,t)=>`
|
|
146
|
+
`+" ".repeat(t)),"\r":new Array(ze).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(ze).fill(0).map((e,t)=>`\r
|
|
147
|
+
`+" ".repeat(t))}," ":{"\n":new Array(ze).fill(0).map((e,t)=>`
|
|
148
|
+
`+" ".repeat(t)),"\r":new Array(ze).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(ze).fill(0).map((e,t)=>`\r
|
|
149
|
+
`+" ".repeat(t))}},co=[`
|
|
143
150
|
`,"\r",`\r
|
|
144
|
-
`];function
|
|
151
|
+
`];function uu(e,t,r){let u,i,s,n,o;if(t){for(n=t.offset,o=n+t.length,s=n;s>0&&!At(e,s-1);)s--;let x=o;for(;x<e.length&&!At(e,x);)x++;i=e.substring(s,x),u=Zp(i,r)}else i=e,u=0,s=0,n=0,o=e.length;let a=Qp(r,e),D=co.includes(a),l=0,c=0,f;r.insertSpaces?f=ne[r.tabSize||4]??Ke(ne[1],r.tabSize||4):f=" ";let h=f===" "?" ":" ",p=yt(i,!1),E=!1;function C(){if(l>1)return Ke(a,l)+Ke(f,u+c);let x=f.length*(u+c);return!D||x>nu[h][a].length?a+Ke(f,u+c):x<=0?a:nu[h][a][x]}function R(){let x=p.scan();for(l=0;x===15||x===14;)x===14&&r.keepLines?l+=1:x===14&&(l=1),x=p.scan();return E=x===16||p.getTokenError()!==0,x}let _=[];function y(x,A,F){!E&&(!t||A<o&&F>n)&&e.substring(A,F)!==x&&_.push({offset:A,length:F-A,content:x})}let $=R();if(r.keepLines&&l>0&&y(Ke(a,l),0,0),$!==17){let x=p.getTokenOffset()+s,A=f.length*u<20&&r.insertSpaces?ne[f.length*u]:Ke(f,u);y(A,s,x)}for(;$!==17;){let x=p.getTokenOffset()+p.getTokenLength()+s,A=R(),F="",Fe=!1;for(;l===0&&(A===12||A===13);){let Wr=p.getTokenOffset()+s;y(ne[1],x,Wr),x=p.getTokenOffset()+p.getTokenLength()+s,Fe=A===12,F=Fe?C():"",A=R()}if(A===2)$!==1&&c--,r.keepLines&&l>0||!r.keepLines&&$!==1?F=C():r.keepLines&&(F=ne[1]);else if(A===4)$!==3&&c--,r.keepLines&&l>0||!r.keepLines&&$!==3?F=C():r.keepLines&&(F=ne[1]);else{switch($){case 3:case 1:c++,r.keepLines&&l>0||!r.keepLines?F=C():F=ne[1];break;case 5:r.keepLines&&l>0||!r.keepLines?F=C():F=ne[1];break;case 12:F=C();break;case 13:l>0?F=C():Fe||(F=ne[1]);break;case 6:r.keepLines&&l>0?F=C():Fe||(F=ne[1]);break;case 10:r.keepLines&&l>0?F=C():A===6&&!Fe&&(F="");break;case 7:case 8:case 9:case 11:case 2:case 4:r.keepLines&&l>0?F=C():(A===12||A===13)&&!Fe?F=ne[1]:A!==5&&A!==17&&(E=!0);break;case 16:E=!0;break}l>0&&(A===12||A===13)&&(F=C())}A===17&&(r.keepLines&&l>0?F=C():F=r.insertFinalNewline?a:"");let Ur=p.getTokenOffset()+s;y(F,x,Ur),$=A}return _}function Ke(e,t){let r="";for(let u=0;u<t;u++)r+=e;return r}function Zp(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 Qp(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)===`
|
|
145
152
|
`?`\r
|
|
146
|
-
`:"\r";if(
|
|
153
|
+
`:"\r";if(u===`
|
|
147
154
|
`)return`
|
|
148
155
|
`}return e&&e.eol||`
|
|
149
|
-
`}function
|
|
150
|
-
`.indexOf(e.charAt(t))!==-1}var ct;(function(e){e.DEFAULT={allowTrailingComma:!1}})(ct||(ct={}));function Ws(e,t=[],u=ct.DEFAULT){let n=null,i=[],s=[];function r(D){Array.isArray(i)?i.push(D):n!==null&&(i[n]=D)}return ur(e,{onObjectBegin:()=>{let D={};r(D),s.push(i),i=D,n=null},onObjectProperty:D=>{n=D},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{let D=[];r(D),s.push(i),i=D,n=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:r,onError:(D,a,c)=>{t.push({error:D,offset:a,length:c})}},u),i[0]}function Uu(e,t=[],u=ct.DEFAULT){let n={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(D){n.type==="property"&&(n.length=D-n.offset,n=n.parent)}function s(D){return n.children.push(D),D}ur(e,{onObjectBegin:D=>{n=s({type:"object",offset:D,length:-1,parent:n,children:[]})},onObjectProperty:(D,a,c)=>{n=s({type:"property",offset:a,length:-1,parent:n,children:[]}),n.children.push({type:"string",value:D,offset:a,length:c,parent:n})},onObjectEnd:(D,a)=>{i(D+a),n.length=D+a-n.offset,n=n.parent,i(D+a)},onArrayBegin:(D,a)=>{n=s({type:"array",offset:D,length:-1,parent:n,children:[]})},onArrayEnd:(D,a)=>{n.length=D+a-n.offset,n=n.parent,i(D+a)},onLiteralValue:(D,a,c)=>{s({type:Sp(D),offset:a,length:c,parent:n,value:D}),i(a+c)},onSeparator:(D,a,c)=>{n.type==="property"&&(D===":"?n.colonOffset=a:D===","&&i(a))},onError:(D,a,c)=>{t.push({error:D,offset:a,length:c})}},u);let o=n.children[0];return o&&delete o.parent,o}function rr(e,t){if(!e)return;let u=e;for(let n of t)if(typeof n=="string"){if(u.type!=="object"||!Array.isArray(u.children))return;let i=!1;for(let s of u.children)if(Array.isArray(s.children)&&s.children[0].value===n&&s.children.length===2){u=s.children[1],i=!0;break}if(!i)return}else{let i=n;if(u.type!=="array"||i<0||!Array.isArray(u.children)||i>=u.children.length)return;u=u.children[i]}return u}function ur(e,t,u=ct.DEFAULT){let n=at(e,!1),i=[],s=0;function r(S){return S?()=>s===0&&S(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function o(S){return S?j=>s===0&&S(j,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function D(S){return S?j=>s===0&&S(j,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}function a(S){return S?()=>{s>0?s++:S(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}function c(S){return S?()=>{s>0&&s--,s===0&&S(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}let l=a(t.onObjectBegin),f=D(t.onObjectProperty),h=c(t.onObjectEnd),p=a(t.onArrayBegin),E=c(t.onArrayEnd),C=D(t.onLiteralValue),R=o(t.onSeparator),v=r(t.onComment),g=o(t.onError),$=u&&u.disallowComments,b=u&&u.allowTrailingComma;function y(){for(;;){let S=n.scan();switch(n.getTokenError()){case 4:F(14);break;case 5:F(15);break;case 3:F(13);break;case 1:$||F(11);break;case 2:F(12);break;case 6:F(16);break}switch(S){case 12:case 13:$?F(10):v();break;case 16:F(1);break;case 15:case 14:break;default:return S}}}function F(S,j=[],Bn=[]){if(g(S),j.length+Bn.length>0){let yt=n.getToken();for(;yt!==17;){if(j.indexOf(yt)!==-1){y();break}else if(Bn.indexOf(yt)!==-1)break;yt=y()}}}function pe(S){let j=n.getTokenValue();return S?C(j):(f(j),i.push(j)),y(),!0}function Sr(){switch(n.getToken()){case 11:let S=n.getTokenValue(),j=Number(S);isNaN(j)&&(F(2),j=0),C(j);break;case 7:C(null);break;case 8:C(!0);break;case 9:C(!1);break;default:return!1}return y(),!0}function Tr(){return n.getToken()!==10?(F(3,[],[2,5]),!1):(pe(!1),n.getToken()===6?(R(":"),y(),$r()||F(4,[],[2,5])):F(5,[],[2,5]),i.pop(),!0)}function XD(){l(),y();let S=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(S||F(4,[],[]),R(","),y(),n.getToken()===2&&b)break}else S&&F(6,[],[]);Tr()||F(4,[],[2,5]),S=!0}return h(),n.getToken()!==2?F(7,[2],[]):y(),!0}function ea(){p(),y();let S=!0,j=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(j||F(4,[],[]),R(","),y(),n.getToken()===4&&b)break}else j&&F(6,[],[]);S?(i.push(0),S=!1):i[i.length-1]++,$r()||F(4,[],[4,5]),j=!0}return E(),S||i.pop(),n.getToken()!==4?F(8,[4],[]):y(),!0}function $r(){switch(n.getToken()){case 3:return ea();case 1:return XD();case 10:return pe(!0);default:return Sr()}}return y(),n.getToken()===17?u.allowEmptyContent?!0:(F(4,[],[]),!1):$r()?(n.getToken()!==17&&F(9,[],[]),!0):(F(4,[],[]),!1)}function Sp(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 Vs(e,t,u,n){let i=t.slice(),r=Uu(e,[]),o,D;for(;i.length>0&&(D=i.pop(),o=rr(r,i),o===void 0&&u!==void 0);)typeof D=="string"?u={[D]:u}:u=[u];if(o)if(o.type==="object"&&typeof D=="string"&&Array.isArray(o.children)){let a=rr(o,[D]);if(a!==void 0)if(u===void 0){if(!a.parent)throw new Error("Malformed AST");let c=o.children.indexOf(a.parent),l,f=a.parent.offset+a.parent.length;if(c>0){let h=o.children[c-1];l=h.offset+h.length}else l=o.offset+1,o.children.length>1&&(f=o.children[1].offset);return Oe(e,{offset:l,length:f-l,content:""},n)}else return Oe(e,{offset:a.offset,length:a.length,content:JSON.stringify(u)},n);else{if(u===void 0)return[];let c=`${JSON.stringify(D)}: ${JSON.stringify(u)}`,l=n.getInsertionIndex?n.getInsertionIndex(o.children.map(h=>h.children[0].value)):o.children.length,f;if(l>0){let h=o.children[l-1];f={offset:h.offset+h.length,length:0,content:","+c}}else o.children.length===0?f={offset:o.offset+1,length:0,content:c}:f={offset:o.offset+1,length:0,content:c+","};return Oe(e,f,n)}}else if(o.type==="array"&&typeof D=="number"&&Array.isArray(o.children)){let a=D;if(a===-1){let c=`${JSON.stringify(u)}`,l;if(o.children.length===0)l={offset:o.offset+1,length:0,content:c};else{let f=o.children[o.children.length-1];l={offset:f.offset+f.length,length:0,content:","+c}}return Oe(e,l,n)}else if(u===void 0&&o.children.length>=0){let c=D,l=o.children[c],f;if(o.children.length===1)f={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===c){let h=o.children[c-1],p=h.offset+h.length,E=o.offset+o.length;f={offset:p,length:E-2-p,content:""}}else f={offset:l.offset,length:o.children[c+1].offset-l.offset,content:""};return Oe(e,f,n)}else if(u!==void 0){let c,l=`${JSON.stringify(u)}`;if(!n.isArrayInsertion&&o.children.length>D){let f=o.children[D];c={offset:f.offset,length:f.length,content:l}}else if(o.children.length===0||D===0)c={offset:o.offset+1,length:0,content:o.children.length===0?l:l+","};else{let f=D>o.children.length?o.children.length:D,h=o.children[f-1];c={offset:h.offset+h.length,length:0,content:","+l}}return Oe(e,c,n)}else throw new Error(`Can not ${u===void 0?"remove":n.isArrayInsertion?"insert":"modify"} Array index ${a} as length is not sufficient`)}else throw new Error(`Can not add ${typeof D!="number"?"index":"property"} to parent of type ${o.type}`);else{if(u===void 0)throw new Error("Can not delete in empty document");return Oe(e,{offset:r?r.offset:0,length:r?r.length:0,content:JSON.stringify(u)},n)}}function Oe(e,t,u){if(!u.formattingOptions)return[t];let n=nr(e,t),i=t.offset,s=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!lt(n,i-1);)i--;for(;s<n.length&&!lt(n,s);)s++}let r=Hu(n,{offset:i,length:s-i},{...u.formattingOptions,keepLines:!1});for(let D=r.length-1;D>=0;D--){let a=r[D];n=nr(n,a),i=Math.min(i,a.offset),s=Math.max(s,a.offset+a.length),s+=a.content.length-a.length}let o=e.length-(n.length-s)-i;return[{offset:i,length:o,content:n.substring(i,s)}]}function nr(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var Gs;(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"})(Gs||(Gs={}));var Ys;(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"})(Ys||(Ys={}));var ir=Ws;var Ks=ur;var zs;(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"})(zs||(zs={}));function Wu(e,t,u,n){return Vs(e,t,u,n)}function Vu(e,t){let u=t.slice(0).sort((i,s)=>{let r=i.offset-s.offset;return r===0?i.length-s.length:r}),n=e.length;for(let i=u.length-1;i>=0;i--){let s=u[i];if(s.offset+s.length<=n)e=nr(e,s);else throw new Error("Overlapping edit");n=s.offset}return e}import{readFileSync as VF,writeFileSync as PD,existsSync as br,mkdirSync as GF}from"fs";import{dirname as YF}from"path";function lo(e){return typeof e>"u"||e===null}function Op(e){return typeof e=="object"&&e!==null}function Rp(e){return Array.isArray(e)?e:lo(e)?[]:[e]}function Ip(e,t){var u,n,i,s;if(t)for(s=Object.keys(t),u=0,n=s.length;u<n;u+=1)i=s[u],e[i]=t[i];return e}function Lp(e,t){var u="",n;for(n=0;n<t;n+=1)u+=e;return u}function Np(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Pp=lo,jp=Op,Mp=Rp,Hp=Lp,Up=Np,Wp=Ip,H={isNothing:Pp,isObject:jp,toArray:Mp,repeat:Hp,isNegativeZero:Up,extend:Wp};function co(e,t){var u="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(u+='in "'+e.mark.name+'" '),u+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(u+=`
|
|
156
|
+
`}function At(e,t){return`\r
|
|
157
|
+
`.indexOf(e.charAt(t))!==-1}var wt;(function(e){e.DEFAULT={allowTrailingComma:!1}})(wt||(wt={}));function fo(e,t=[],r=wt.DEFAULT){let u=null,i=[],s=[];function n(a){Array.isArray(i)?i.push(a):u!==null&&(i[u]=a)}return Fr(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,l)=>{t.push({error:a,offset:D,length:l})}},r),i[0]}function iu(e,t=[],r=wt.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}Fr(e,{onObjectBegin:a=>{u=s({type:"object",offset:a,length:-1,parent:u,children:[]})},onObjectProperty:(a,D,l)=>{u=s({type:"property",offset:D,length:-1,parent:u,children:[]}),u.children.push({type:"string",value:a,offset:D,length:l,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,l)=>{s({type:e0(a),offset:D,length:l,parent:u,value:a}),i(D+l)},onSeparator:(a,D,l)=>{u.type==="property"&&(a===":"?u.colonOffset=D:a===","&&i(D))},onError:(a,D,l)=>{t.push({error:a,offset:D,length:l})}},r);let o=u.children[0];return o&&delete o.parent,o}function dr(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 Fr(e,t,r=wt.DEFAULT){let u=yt(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?j=>s===0&&S(j,u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter()):()=>!0}function a(S){return S?j=>s===0&&S(j,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 l(S){return S?()=>{s>0&&s--,s===0&&S(u.getTokenOffset(),u.getTokenLength(),u.getTokenStartLine(),u.getTokenStartCharacter())}:()=>!0}let c=D(t.onObjectBegin),f=a(t.onObjectProperty),h=l(t.onObjectEnd),p=D(t.onArrayBegin),E=l(t.onArrayEnd),C=a(t.onLiteralValue),R=o(t.onSeparator),_=n(t.onComment),y=o(t.onError),$=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:$||F(11);break;case 2:F(12);break;case 6:F(16);break}switch(S){case 12:case 13:$?F(10):_();break;case 16:F(1);break;case 15:case 14:break;default:return S}}}function F(S,j=[],Uu=[]){if(y(S),j.length+Uu.length>0){let Ot=u.getToken();for(;Ot!==17;){if(j.indexOf(Ot)!==-1){A();break}else if(Uu.indexOf(Ot)!==-1)break;Ot=A()}}}function Fe(S){let j=u.getTokenValue();return S?C(j):(f(j),i.push(j)),A(),!0}function Ur(){switch(u.getToken()){case 11:let S=u.getTokenValue(),j=Number(S);isNaN(j)&&(F(2),j=0),C(j);break;case 7:C(null);break;case 8:C(!0);break;case 9:C(!1);break;default:return!1}return A(),!0}function Wr(){return u.getToken()!==10?(F(3,[],[2,5]),!1):(Fe(!1),u.getToken()===6?(R(":"),A(),Vr()||F(4,[],[2,5])):F(5,[],[2,5]),i.pop(),!0)}function AD(){c(),A();let S=!1;for(;u.getToken()!==2&&u.getToken()!==17;){if(u.getToken()===5){if(S||F(4,[],[]),R(","),A(),u.getToken()===2&&x)break}else S&&F(6,[],[]);Wr()||F(4,[],[2,5]),S=!0}return h(),u.getToken()!==2?F(7,[2],[]):A(),!0}function wD(){p(),A();let S=!0,j=!1;for(;u.getToken()!==4&&u.getToken()!==17;){if(u.getToken()===5){if(j||F(4,[],[]),R(","),A(),u.getToken()===4&&x)break}else j&&F(6,[],[]);S?(i.push(0),S=!1):i[i.length-1]++,Vr()||F(4,[],[4,5]),j=!0}return E(),S||i.pop(),u.getToken()!==4?F(8,[4],[]):A(),!0}function Vr(){switch(u.getToken()){case 3:return wD();case 1:return AD();case 10:return Fe(!0);default:return Ur()}}return A(),u.getToken()===17?r.allowEmptyContent?!0:(F(4,[],[]),!1):Vr()?(u.getToken()!==17&&F(9,[],[]),!0):(F(4,[],[]),!1)}function e0(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 ho(e,t,r,u){let i=t.slice(),n=iu(e,[]),o,a;for(;i.length>0&&(a=i.pop(),o=dr(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=dr(o,[a]);if(D!==void 0)if(r===void 0){if(!D.parent)throw new Error("Malformed AST");let l=o.children.indexOf(D.parent),c,f=D.parent.offset+D.parent.length;if(l>0){let h=o.children[l-1];c=h.offset+h.length}else c=o.offset+1,o.children.length>1&&(f=o.children[1].offset);return Ne(e,{offset:c,length:f-c,content:""},u)}else return Ne(e,{offset:D.offset,length:D.length,content:JSON.stringify(r)},u);else{if(r===void 0)return[];let l=`${JSON.stringify(a)}: ${JSON.stringify(r)}`,c=u.getInsertionIndex?u.getInsertionIndex(o.children.map(h=>h.children[0].value)):o.children.length,f;if(c>0){let h=o.children[c-1];f={offset:h.offset+h.length,length:0,content:","+l}}else o.children.length===0?f={offset:o.offset+1,length:0,content:l}:f={offset:o.offset+1,length:0,content:l+","};return Ne(e,f,u)}}else if(o.type==="array"&&typeof a=="number"&&Array.isArray(o.children)){let D=a;if(D===-1){let l=`${JSON.stringify(r)}`,c;if(o.children.length===0)c={offset:o.offset+1,length:0,content:l};else{let f=o.children[o.children.length-1];c={offset:f.offset+f.length,length:0,content:","+l}}return Ne(e,c,u)}else if(r===void 0&&o.children.length>=0){let l=a,c=o.children[l],f;if(o.children.length===1)f={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===l){let h=o.children[l-1],p=h.offset+h.length,E=o.offset+o.length;f={offset:p,length:E-2-p,content:""}}else f={offset:c.offset,length:o.children[l+1].offset-c.offset,content:""};return Ne(e,f,u)}else if(r!==void 0){let l,c=`${JSON.stringify(r)}`;if(!u.isArrayInsertion&&o.children.length>a){let f=o.children[a];l={offset:f.offset,length:f.length,content:c}}else if(o.children.length===0||a===0)l={offset:o.offset+1,length:0,content:o.children.length===0?c:c+","};else{let f=a>o.children.length?o.children.length:a,h=o.children[f-1];l={offset:h.offset+h.length,length:0,content:","+c}}return Ne(e,l,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 Ne(e,{offset:n?n.offset:0,length:n?n.length:0,content:JSON.stringify(r)},u)}}function Ne(e,t,r){if(!r.formattingOptions)return[t];let u=mr(e,t),i=t.offset,s=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!At(u,i-1);)i--;for(;s<u.length&&!At(u,s);)s++}let n=uu(u,{offset:i,length:s-i},{...r.formattingOptions,keepLines:!1});for(let a=n.length-1;a>=0;a--){let D=n[a];u=mr(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 mr(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var po;(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"})(po||(po={}));var Fo;(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"})(Fo||(Fo={}));var gr=fo;var go=Fr;var mo;(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"})(mo||(mo={}));function su(e,t,r,u){return ho(e,t,r,u)}function ou(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=mr(e,s);else throw new Error("Overlapping edit");u=s.offset}return e}import{readFileSync as dm,writeFileSync as oD,existsSync as Nr,mkdirSync as Fm}from"fs";import{dirname as mm}from"path";function Ro(e){return typeof e>"u"||e===null}function u0(e){return typeof e=="object"&&e!==null}function i0(e){return Array.isArray(e)?e:Ro(e)?[]:[e]}function s0(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 o0(e,t){var r="",u;for(u=0;u<t;u+=1)r+=e;return r}function a0(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var D0=Ro,l0=u0,c0=i0,f0=o0,h0=a0,p0=s0,H={isNothing:D0,isObject:l0,toArray:c0,repeat:f0,isNegativeZero:h0,extend:p0};function Io(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+=`
|
|
151
158
|
|
|
152
|
-
`+e.mark.snippet),
|
|
153
|
-
`+o;for(
|
|
154
|
-
`,o+=H.repeat("-",t.indent+
|
|
155
|
-
`,
|
|
156
|
-
`;return o.replace(/\n$/,"")}var
|
|
157
|
-
\r`;function
|
|
158
|
-
`: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
|
|
159
|
-
`,t-1))}function
|
|
160
|
-
`,s?1+
|
|
161
|
-
`);break}for(
|
|
162
|
-
`,s?1+
|
|
163
|
-
`,
|
|
164
|
-
`,
|
|
165
|
-
`,s?1+
|
|
166
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var
|
|
167
|
-
`,
|
|
168
|
-
`&&(s+=
|
|
169
|
-
`+H.repeat(" ",e.indent*t)}function
|
|
170
|
-
`,i=
|
|
159
|
+
`+e.mark.snippet),u+" "+r):u}function xt(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Io(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}xt.prototype=Object.create(Error.prototype);xt.prototype.constructor=xt;xt.prototype.toString=function(t){return this.name+": "+Io(this,t)};var Q=xt;function au(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 Du(e,t){return H.repeat(" ",t-e.length)+e}function d0(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,l=Math.min(e.line+t.linesAfter,i.length).toString().length,c=t.maxLength-(t.indent+l+3);for(a=1;a<=t.linesBefore&&!(n-a<0);a++)D=au(e.buffer,u[n-a],i[n-a],e.position-(u[n]-u[n-a]),c),o=H.repeat(" ",t.indent)+Du((e.line-a+1).toString(),l)+" | "+D.str+`
|
|
160
|
+
`+o;for(D=au(e.buffer,u[n],i[n],e.position,c),o+=H.repeat(" ",t.indent)+Du((e.line+1).toString(),l)+" | "+D.str+`
|
|
161
|
+
`,o+=H.repeat("-",t.indent+l+3+D.pos)+`^
|
|
162
|
+
`,a=1;a<=t.linesAfter&&!(n+a>=i.length);a++)D=au(e.buffer,u[n+a],i[n+a],e.position-(u[n]-u[n+a]),c),o+=H.repeat(" ",t.indent)+Du((e.line+a+1).toString(),l)+" | "+D.str+`
|
|
163
|
+
`;return o.replace(/\n$/,"")}var F0=d0,m0=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],g0=["scalar","sequence","mapping"];function C0(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(u){t[String(u)]=r})}),t}function E0(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(m0.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=C0(t.styleAliases||null),g0.indexOf(this.kind)===-1)throw new Q('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var G=E0;function Co(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 y0(){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 cu(e){return this.extend(e)}cu.prototype.extend=function(t){var r=[],u=[];if(t instanceof G)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 G))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 G))throw new Q("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(cu.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(u),i.compiledImplicit=Co(i,"implicit"),i.compiledExplicit=Co(i,"explicit"),i.compiledTypeMap=y0(i.compiledImplicit,i.compiledExplicit),i};var Lo=cu,No=new G("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Po=new G("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),jo=new G("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Mo=new Lo({explicit:[No,Po,jo]});function A0(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function w0(){return null}function b0(e){return e===null}var Ho=new G("tag:yaml.org,2002:null",{kind:"scalar",resolve:A0,construct:w0,predicate:b0,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function x0(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 v0(e){return e==="true"||e==="True"||e==="TRUE"}function B0(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Uo=new G("tag:yaml.org,2002:bool",{kind:"scalar",resolve:x0,construct:v0,predicate:B0,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 S0(e){return 48<=e&&e<=55}function T0(e){return 48<=e&&e<=57}function $0(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(!S0(e.charCodeAt(r)))return!1;u=!0}return u&&i!=="_"}}if(i==="_")return!1;for(;r<t;r++)if(i=e[r],i!=="_"){if(!T0(e.charCodeAt(r)))return!1;u=!0}return!(!u||i==="_")}function k0(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 O0(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!H.isNegativeZero(e)}var Wo=new G("tag:yaml.org,2002:int",{kind:"scalar",resolve:$0,construct:k0,predicate:O0,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"]}}),R0=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function I0(e){return!(e===null||!R0.test(e)||e[e.length-1]==="_")}function L0(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 N0=/^[-+]?[0-9]+e/;function P0(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(H.isNegativeZero(e))return"-0.0";return r=e.toString(10),N0.test(r)?r.replace("e",".e"):r}function j0(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||H.isNegativeZero(e))}var Vo=new G("tag:yaml.org,2002:float",{kind:"scalar",resolve:I0,construct:L0,predicate:j0,represent:P0,defaultStyle:"lowercase"}),Go=Mo.extend({implicit:[Ho,Uo,Wo,Vo]}),Yo=Go,zo=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ko=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 M0(e){return e===null?!1:zo.exec(e)!==null||Ko.exec(e)!==null}function H0(e){var t,r,u,i,s,n,o,a=0,D=null,l,c,f;if(t=zo.exec(e),t===null&&(t=Ko.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]&&(l=+t[10],c=+(t[11]||0),D=(l*60+c)*6e4,t[9]==="-"&&(D=-D)),f=new Date(Date.UTC(r,u,i,s,n,o,a)),D&&f.setTime(f.getTime()-D),f}function U0(e){return e.toISOString()}var qo=new G("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:M0,construct:H0,instanceOf:Date,represent:U0});function W0(e){return e==="<<"||e===null}var Jo=new G("tag:yaml.org,2002:merge",{kind:"scalar",resolve:W0}),Fu=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
164
|
+
\r`;function V0(e){if(e===null)return!1;var t,r,u=0,i=e.length,s=Fu;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 G0(e){var t,r,u=e.replace(/[\r\n=]/g,""),i=u.length,s=Fu,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 Y0(e){var t="",r=0,u,i,s=e.length,n=Fu;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 z0(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Zo=new G("tag:yaml.org,2002:binary",{kind:"scalar",resolve:V0,construct:G0,predicate:z0,represent:Y0}),K0=Object.prototype.hasOwnProperty,q0=Object.prototype.toString;function J0(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(K0.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 Z0(e){return e!==null?e:[]}var Qo=new G("tag:yaml.org,2002:omap",{kind:"sequence",resolve:J0,construct:Z0}),Q0=Object.prototype.toString;function X0(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],Q0.call(u)!=="[object Object]"||(i=Object.keys(u),i.length!==1))return!1;s[t]=[i[0],u[i[0]]]}return!0}function ed(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 Xo=new G("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:X0,construct:ed}),td=Object.prototype.hasOwnProperty;function rd(e){if(e===null)return!0;var t,r=e;for(t in r)if(td.call(r,t)&&r[t]!==null)return!1;return!0}function nd(e){return e!==null?e:{}}var ea=new G("tag:yaml.org,2002:set",{kind:"mapping",resolve:rd,construct:nd}),mu=Yo.extend({implicit:[qo,Jo],explicit:[Zo,Qo,Xo,ea]}),_e=Object.prototype.hasOwnProperty,Cr=1,ta=2,ra=3,Er=4,lu=1,ud=2,Eo=3,id=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,sd=/[\x85\u2028\u2029]/,od=/[,\[\]\{\}]/,na=/^(?:!|!!|![a-z\-]+!)$/i,ua=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function yo(e){return Object.prototype.toString.call(e)}function de(e){return e===10||e===13}function je(e){return e===9||e===32}function X(e){return e===9||e===32||e===10||e===13}function Je(e){return e===44||e===91||e===93||e===123||e===125}function ad(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Dd(e){return e===120?2:e===117?4:e===85?8:0}function ld(e){return 48<=e&&e<=57?e-48:-1}function Ao(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 cd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var ia=new Array(256),sa=new Array(256);for(Pe=0;Pe<256;Pe++)ia[Pe]=Ao(Pe)?1:0,sa[Pe]=Ao(Pe);var Pe;function fd(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||mu,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 oa(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=F0(r),new Q(t,r)}function g(e,t){throw oa(e,t)}function yr(e,t){e.onWarning&&e.onWarning.call(null,oa(e,t))}var wo={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&&yr(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],na.test(i)||g(t,"ill-formed tag handle (first argument) of the TAG directive"),_e.call(t.tagMap,i)&&g(t,'there is a previously declared suffix for "'+i+'" tag handle'),ua.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 Be(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 id.test(o)&&g(e,"the stream contains non-printable characters");e.result+=o}}function bo(e,t,r,u){var i,s,n,o;for(H.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],_e.call(t,s)||(t[s]=r[s],u[s]=!0)}function Ze(e,t,r,u,i,s,n,o,a){var D,l;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),D=0,l=i.length;D<l;D+=1)Array.isArray(i[D])&&g(e,"nested arrays are not supported inside keys"),typeof i=="object"&&yo(i[D])==="[object Object]"&&(i[D]="[object Object]");if(typeof i=="object"&&yo(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,l=s.length;D<l;D+=1)bo(e,t,s[D],r);else bo(e,t,s,r);else!e.json&&!_e.call(r,i)&&_e.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 gu(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 P(e,t,r){for(var u=0,i=e.input.charCodeAt(e.position);i!==0;){for(;je(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(de(i))for(gu(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&&yr(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||X(r)))}function Cu(e,t){t===1?e.result+=" ":t>1&&(e.result+=H.repeat(`
|
|
166
|
+
`,t-1))}function hd(e,t,r){var u,i,s,n,o,a,D,l,c=e.kind,f=e.result,h;if(h=e.input.charCodeAt(e.position),X(h)||Je(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(i=e.input.charCodeAt(e.position+1),X(i)||r&&Je(i)))return!1;for(e.kind="scalar",e.result="",s=n=e.position,o=!1;h!==0;){if(h===58){if(i=e.input.charCodeAt(e.position+1),X(i)||r&&Je(i))break}else if(h===35){if(u=e.input.charCodeAt(e.position-1),X(u))break}else{if(e.position===e.lineStart&&br(e)||r&&Je(h))break;if(de(h))if(a=e.line,D=e.lineStart,l=e.lineIndent,P(e,!1,-1),e.lineIndent>=t){o=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=n,e.line=a,e.lineStart=D,e.lineIndent=l;break}}o&&(Be(e,s,n,!1),Cu(e,e.line-a),s=n=e.position,o=!1),je(h)||(n=e.position+1),h=e.input.charCodeAt(++e.position)}return Be(e,s,n,!1),e.result?!0:(e.kind=c,e.result=f,!1)}function pd(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(Be(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 de(r)?(Be(e,u,i,!0),Cu(e,P(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 dd(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 Be(e,r,e.position,!0),e.position++,!0;if(o===92){if(Be(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),de(o))P(e,!1,t);else if(o<256&&ia[o])e.result+=sa[o],e.position++;else if((n=Dd(o))>0){for(i=n,s=0;i>0;i--)o=e.input.charCodeAt(++e.position),(n=ad(o))>=0?s=(s<<4)+n:g(e,"expected hexadecimal character");e.result+=cd(s),e.position++}else g(e,"unknown escape sequence");r=u=e.position}else de(o)?(Be(e,r,u,!0),Cu(e,P(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 Fd(e,t){var r=!0,u,i,s,n=e.tag,o,a=e.anchor,D,l,c,f,h,p=Object.create(null),E,C,R,_;if(_=e.input.charCodeAt(e.position),_===91)l=93,h=!1,o=[];else if(_===123)l=125,h=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),_=e.input.charCodeAt(++e.position);_!==0;){if(P(e,!0,t),_=e.input.charCodeAt(e.position),_===l)return e.position++,e.tag=n,e.anchor=a,e.kind=h?"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=E=R=null,c=f=!1,_===63&&(D=e.input.charCodeAt(e.position+1),X(D)&&(c=f=!0,e.position++,P(e,!0,t))),u=e.line,i=e.lineStart,s=e.position,Qe(e,t,Cr,!1,!0),C=e.tag,E=e.result,P(e,!0,t),_=e.input.charCodeAt(e.position),(f||e.line===u)&&_===58&&(c=!0,_=e.input.charCodeAt(++e.position),P(e,!0,t),Qe(e,t,Cr,!1,!0),R=e.result),h?Ze(e,o,p,C,E,R,u,i,s):c?o.push(Ze(e,null,p,C,E,R,u,i,s)):o.push(E),P(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 md(e,t){var r,u,i=lu,s=!1,n=!1,o=t,a=0,D=!1,l,c;if(c=e.input.charCodeAt(e.position),c===124)u=!1;else if(c===62)u=!0;else return!1;for(e.kind="scalar",e.result="";c!==0;)if(c=e.input.charCodeAt(++e.position),c===43||c===45)lu===i?i=c===43?Eo:ud:g(e,"repeat of a chomping mode identifier");else if((l=ld(c))>=0)l===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+l-1,n=!0);else break;if(je(c)){do c=e.input.charCodeAt(++e.position);while(je(c));if(c===35)do c=e.input.charCodeAt(++e.position);while(!de(c)&&c!==0)}for(;c!==0;){for(gu(e),e.lineIndent=0,c=e.input.charCodeAt(e.position);(!n||e.lineIndent<o)&&c===32;)e.lineIndent++,c=e.input.charCodeAt(++e.position);if(!n&&e.lineIndent>o&&(o=e.lineIndent),de(c)){a++;continue}if(e.lineIndent<o){i===Eo?e.result+=H.repeat(`
|
|
167
|
+
`,s?1+a:a):i===lu&&s&&(e.result+=`
|
|
168
|
+
`);break}for(u?je(c)?(D=!0,e.result+=H.repeat(`
|
|
169
|
+
`,s?1+a:a)):D?(D=!1,e.result+=H.repeat(`
|
|
170
|
+
`,a+1)):a===0?s&&(e.result+=" "):e.result+=H.repeat(`
|
|
171
|
+
`,a):e.result+=H.repeat(`
|
|
172
|
+
`,s?1+a:a),s=!0,n=!0,a=0,r=e.position;!de(c)&&c!==0;)c=e.input.charCodeAt(++e.position);Be(e,r,e.position,!1)}return!0}function xo(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),!X(n))));){if(o=!0,e.position++,P(e,!0,-1)&&e.lineIndent<=t){s.push(null),a=e.input.charCodeAt(e.position);continue}if(r=e.line,Qe(e,t,ra,!1,!0),s.push(e.result),P(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 gd(e,t,r){var u,i,s,n,o,a,D=e.tag,l=e.anchor,c={},f=Object.create(null),h=null,p=null,E=null,C=!1,R=!1,_;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),_=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)&&X(u))_===63?(C&&(Ze(e,c,f,h,p,null,n,o,a),h=p=E=null),R=!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,!Qe(e,r,ta,!1,!0))break;if(e.line===s){for(_=e.input.charCodeAt(e.position);je(_);)_=e.input.charCodeAt(++e.position);if(_===58)_=e.input.charCodeAt(++e.position),X(_)||g(e,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(Ze(e,c,f,h,p,null,n,o,a),h=p=E=null),R=!0,C=!1,i=!1,h=e.tag,p=e.result;else if(R)g(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=D,e.anchor=l,!0}else if(R)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=l,!0}if((e.line===s||e.lineIndent>t)&&(C&&(n=e.line,o=e.lineStart,a=e.position),Qe(e,t,Er,!0,i)&&(C?p=e.result:E=e.result),C||(Ze(e,c,f,h,p,E,n,o,a),h=p=E=null),P(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&&Ze(e,c,f,h,p,null,n,o,a),R&&(e.tag=D,e.anchor=l,e.kind="mapping",e.result=c),R}function Cd(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&&!X(n);)n===33&&(u?g(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),na.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),od.test(s)&&g(e,"tag suffix cannot contain flow indicator characters")}s&&!ua.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:_e.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 Ed(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&&!X(r)&&!Je(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 yd(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&&!X(u)&&!Je(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),_e.call(e.anchorMap,r)||g(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],P(e,!0,-1),!0}function Qe(e,t,r,u,i){var s,n,o,a=1,D=!1,l=!1,c,f,h,p,E,C;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=n=o=Er===r||ra===r,u&&P(e,!0,-1)&&(D=!0,e.lineIndent>t?a=1:e.lineIndent===t?a=0:e.lineIndent<t&&(a=-1)),a===1)for(;Cd(e)||Ed(e);)P(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||Er===r)&&(Cr===r||ta===r?E=t:E=t+1,C=e.position-e.lineStart,a===1?o&&(xo(e,C)||gd(e,C,E))||Fd(e,E)?l=!0:(n&&md(e,E)||pd(e,E)||dd(e,E)?l=!0:yd(e)?(l=!0,(e.tag!==null||e.anchor!==null)&&g(e,"alias node should not have any properties")):hd(e,E,Cr===r)&&(l=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):a===0&&(l=o&&xo(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+'"'),c=0,f=e.implicitTypes.length;c<f;c+=1)if(p=e.implicitTypes[c],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(_e.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,h=e.typeMap.multi[e.kind||"fallback"],c=0,f=h.length;c<f;c+=1)if(e.tag.slice(0,h[c].tag.length)===h[c].tag){p=h[c];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||l}function Ad(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&&(P(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&&!X(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(;je(n);)n=e.input.charCodeAt(++e.position);if(n===35){do n=e.input.charCodeAt(++e.position);while(n!==0&&!de(n));break}if(de(n))break;for(r=e.position;n!==0&&!X(n);)n=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}n!==0&&gu(e),_e.call(wo,u)?wo[u](e,u,i):yr(e,'unknown document directive "'+u+'"')}if(P(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,P(e,!0,-1)):s&&g(e,"directives end mark is expected"),Qe(e,e.lineIndent-1,Er,!1,!0),P(e,!0,-1),e.checkLineBreaks&&sd.test(e.input.slice(t,e.position))&&yr(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,P(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 aa(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 fd(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;)Ad(r);return r.documents}function wd(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var u=aa(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=aa(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 xd=wd,vd=bd,Da={loadAll:xd,load:vd},la=Object.prototype.toString,ca=Object.prototype.hasOwnProperty,Eu=65279,Bd=9,vt=10,_d=13,Sd=32,Td=33,$d=34,fu=35,kd=37,Od=38,Rd=39,Id=42,fa=44,Ld=45,Ar=58,Nd=61,Pd=62,jd=63,Md=64,ha=91,pa=93,Hd=96,da=123,Ud=124,Fa=125,K={};K[0]="\\0";K[7]="\\a";K[8]="\\b";K[9]="\\t";K[10]="\\n";K[11]="\\v";K[12]="\\f";K[13]="\\r";K[27]="\\e";K[34]='\\"';K[92]="\\\\";K[133]="\\N";K[160]="\\_";K[8232]="\\L";K[8233]="\\P";var Wd=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Vd=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Gd(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 Yd(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+H.repeat("0",u-t.length)+t}var zd=1,Bt=2;function Kd(e){this.schema=e.schema||mu,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=H.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Gd(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==='"'?Bt:zd,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 vo(e,t){for(var r=H.repeat(" ",t),u=0,i=-1,s="",n,o=e.length;u<o;)i=e.indexOf(`
|
|
174
|
+
`,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 hu(e,t){return`
|
|
176
|
+
`+H.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 wr(e){return e===Sd||e===Bd}function _t(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Eu||65536<=e&&e<=1114111}function Bo(e){return _t(e)&&e!==Eu&&e!==_d&&e!==vt}function _o(e,t,r){var u=Bo(e),i=u&&!wr(e);return(r?u:u&&e!==fa&&e!==ha&&e!==pa&&e!==da&&e!==Fa)&&e!==fu&&!(t===Ar&&!i)||Bo(t)&&!wr(t)&&e===fu||t===Ar&&i}function Jd(e){return _t(e)&&e!==Eu&&!wr(e)&&e!==Ld&&e!==jd&&e!==Ar&&e!==fa&&e!==ha&&e!==pa&&e!==da&&e!==Fa&&e!==fu&&e!==Od&&e!==Id&&e!==Td&&e!==Ud&&e!==Nd&&e!==Pd&&e!==Rd&&e!==$d&&e!==kd&&e!==Md&&e!==Hd}function Zd(e){return!wr(e)&&e!==Ar}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 ma(e){var t=/^\n* /;return t.test(e)}var ga=1,pu=2,Ca=3,Ea=4,qe=5;function Qd(e,t,r,u,i,s,n,o){var a,D=0,l=null,c=!1,f=!1,h=u!==-1,p=-1,E=Jd(bt(e,0))&&Zd(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 qe;E=E&&_o(D,l,o),l=D}else{for(a=0;a<e.length;D>=65536?a+=2:a++){if(D=bt(e,a),D===vt)c=!0,h&&(f=f||a-p-1>u&&e[p+1]!==" ",p=a);else if(!_t(D))return qe;E=E&&_o(D,l,o),l=D}f=f||h&&a-p-1>u&&e[p+1]!==" "}return!c&&!f?E&&!n&&!i(e)?ga:s===Bt?qe:pu:r>9&&ma(e)?qe:n?s===Bt?qe:pu:f?Ea:Ca}function Xd(e,t,r,u,i){e.dump=(function(){if(t.length===0)return e.quotingType===Bt?'""':"''";if(!e.noCompatMode&&(Wd.indexOf(t)!==-1||Vd.test(t)))return e.quotingType===Bt?'"'+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(Qd(t,o,e.indent,n,a,e.quotingType,e.forceQuotes&&!u,i)){case ga:return t;case pu:return"'"+t.replace(/'/g,"''")+"'";case Ca:return"|"+So(t,e.indent)+To(vo(t,s));case Ea:return">"+So(t,e.indent)+To(vo(eF(t,n),s));case qe:return'"'+tF(t)+'"';default:throw new Q("impossible error: invalid scalar style")}})()}function So(e,t){var r=ma(e)?String(t):"",u=e[e.length-1]===`
|
|
177
|
+
`,i=u&&(e[e.length-2]===`
|
|
171
178
|
`||e===`
|
|
172
|
-
`),s=i?"+":
|
|
173
|
-
`}function
|
|
174
|
-
`?e.slice(0,-1):e}function
|
|
175
|
-
`);return
|
|
176
|
-
`||e[0]===" ",s,
|
|
177
|
-
`:"")
|
|
178
|
-
`+e.slice(i,s),i=s+1),
|
|
179
|
-
`,e.length-i>t&&
|
|
180
|
-
`+e.slice(
|
|
181
|
-
`:""}var Ld=Id,Nd={dump:Ld};function nn(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 Pd=G,jd=fo,Md=mo,Hd=Ao,Ud=wo,Wd=en,Vd=Mo.load,Gd=Mo.loadAll,Yd=Nd.dump,zd=q,Kd={binary:_o,float:yo,map:Fo,null:go,pairs:To,set:$o,timestamp:Bo,bool:Co,int:Eo,merge:vo,omap:So,seq:po,str:ho},qd=nn("safeLoad","load"),Jd=nn("safeLoadAll","loadAll"),Zd=nn("safeDump","dump"),Qd={Type:Pd,Schema:jd,FAILSAFE_SCHEMA:Md,JSON_SCHEMA:Hd,CORE_SCHEMA:Ud,DEFAULT_SCHEMA:Wd,load:Vd,loadAll:Gd,dump:Yd,YAMLException:zd,types:Kd,safeLoad:qd,safeLoadAll:Jd,safeDump:Zd},fr=Qd;var Ct=At(_D(),1);import{readFileSync as qF,writeFileSync as jD,existsSync as xr,mkdirSync as JF}from"fs";import{dirname as ZF}from"path";import{existsSync as yn,mkdirSync as WD,readFileSync as nm,writeFileSync as im}from"fs";import{homedir as sm}from"os";import{join as pn,dirname as VD,isAbsolute as qC,relative as JC,sep as ZC}from"path";var I=BF();function vF(){let e=process.platform;if(e==="win32"){let t=process.env.APPDATA||w(I,"AppData","Roaming");return{appSupport:t,vscodePath:w(t,"Code","User"),gooseConfigPath:w(t,"Block","goose","config","config.yaml")}}else{if(e==="darwin")return{appSupport:w(I,"Library","Application Support"),vscodePath:w(I,"Library","Application Support","Code","User"),gooseConfigPath:w(I,".config","goose","config.yaml")};{let t=process.env.XDG_CONFIG_HOME||w(I,".config");return{appSupport:t,vscodePath:w(t,"Code","User"),gooseConfigPath:w(t,"goose","config.yaml")}}}}var{appSupport:qe,vscodePath:hn,gooseConfigPath:SD}=vF(),_F=w(I,".gemini","config","mcp_config.json"),TD=w(process.env.CLINE_DIR||w(I,".cline"),"data","settings","cline_mcp_settings.json"),$D=w(hn,"globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),kD=w(process.env.XDG_CONFIG_HOME||w(I,".copilot"),"mcp-config.json"),SF=w(I,".codeium","windsurf","mcp_config.json");function LD(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 dn(e){let t={command:e.command,args:e.args||[]};return e.env&&Object.keys(e.env).length>0&&(t.env=e.env),t}function Er(e,t){return t.url?LD(t):dn(t)}function TF(e,t){if(!t.url)return dn(t);let u=LD(t);return t.oauthScopes&&t.oauthScopes.length>0&&(u.oauth={scopes:t.oauthScopes}),u}function $F(e,t){if(t.url){let u=t.type==="sse"?"sse":"streamable_http";return{name:e,description:"",type:u,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 kF(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 OF(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 OD(e,t){return t?t.length===0?(e.default_tools_approval_mode="approve",e):(e.tools=Object.fromEntries(t.map(u=>[u,{approval_mode:"approve"}])),e):e}function RF(e,t){if(t.url){let u={type:t.type||"http",url:t.url};return t.headers&&Object.keys(t.headers).length>0&&(u.http_headers=t.headers),OD(u,t.autoApproveTools)}return OD({command:t.command,args:t.args||[],env:t.env},t.autoApproveTools)}function IF(e,t){if(t.url){let u={url:t.url};return t.headers&&Object.keys(t.headers).length>0&&(u.headers=t.headers),t.oauthScopes&&t.oauthScopes.length>0&&(u.auth={scopes:t.oauthScopes}),u}return dn(t)}function RD(e,t){if(t.url){let n={url:t.url,type:t.type==="sse"?"sse":"streamableHttp",disabled:!1};return t.headers&&Object.keys(t.headers).length>0&&(n.headers=t.headers),n}let u={command:t.command,args:t.args||[],disabled:!1};return t.env&&Object.keys(t.env).length>0&&(u.env=t.env),u}function ID(e,t){if(t.url){let n={serverUrl:t.url};return t.headers&&Object.keys(t.headers).length>0&&(n.headers=t.headers),n}let u={command:t.command,args:t.args||[]};return t.env&&Object.keys(t.env).length>0&&(u.env=t.env),u}function LF(e,t,u){if(u?.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 n={type:"stdio",command:t.command,args:t.args||[],tools:["*"]};return t.env&&Object.keys(t.env).length>0&&(n.env=t.env),n}function NF(e,t){if(t.local&&e.localConfigPath)return w(t.cwd,e.localConfigPath);let u=e.configPath,n=w(yr(u),"mcporter.jsonc");return W(u)?u:W(n)?n:u}var L={antigravity:{name:"antigravity",displayName:"Antigravity",configPath:_F,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(w(I,".gemini","config")),transformConfig:ID},cline:{name:"cline",displayName:"Cline VSCode Extension",configPath:$D,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(yr($D)),transformConfig:RD},"cline-cli":{name:"cline-cli",displayName:"Cline CLI",configPath:TD,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(yr(TD)),transformConfig:RD},"claude-code":{name:"claude-code",displayName:"Claude Code",configPath:w(I,".claude.json"),localConfigPath:".mcp.json",projectDetectPaths:[".mcp.json",".claude"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["timeout","autoApprove"],detectGlobalInstall:async()=>W(w(I,".claude")),transformConfig:Er},"claude-desktop":{name:"claude-desktop",displayName:"Claude Desktop",configPath:w(qe,"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()=>W(w(qe,"Claude")),transformConfig:Er},codex:{name:"codex",displayName:"Codex",configPath:w(process.env.CODEX_HOME||w(I,".codex"),"config.toml"),localConfigPath:".codex/config.toml",projectDetectPaths:[".codex"],configKey:"mcp_servers",format:"toml",supportedTransports:["stdio","http","sse"],supportedFields:["autoApprove"],detectGlobalInstall:async()=>W(w(I,".codex")),transformConfig:RF},cursor:{name:"cursor",displayName:"Cursor",configPath:w(I,".cursor","mcp.json"),localConfigPath:".cursor/mcp.json",projectDetectPaths:[".cursor"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["scopes"],detectGlobalInstall:async()=>W(w(I,".cursor")),transformConfig:IF},"gemini-cli":{name:"gemini-cli",displayName:"Gemini CLI",configPath:w(I,".gemini","settings.json"),localConfigPath:".gemini/settings.json",projectDetectPaths:[".gemini"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["timeout","scopes"],detectGlobalInstall:async()=>W(w(I,".gemini")),transformConfig:TF},goose:{name:"goose",displayName:"Goose",configPath:SD,projectDetectPaths:[],configKey:"extensions",format:"yaml",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(SD),transformConfig:$F},"github-copilot-cli":{name:"github-copilot-cli",displayName:"GitHub Copilot CLI",configPath:kD,localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"mcpServers",localConfigKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(yr(kD)),transformConfig:LF},mcporter:{name:"mcporter",displayName:"MCPorter",configPath:w(I,".mcporter","mcporter.json"),localConfigPath:"config/mcporter.json",projectDetectPaths:["config/mcporter.json"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(w(I,".mcporter")),resolveConfigPath:NF,transformConfig:Er},opencode:{name:"opencode",displayName:"OpenCode",configPath:w(I,".config","opencode","opencode.json"),localConfigPath:"opencode.json",projectDetectPaths:["opencode.json",".opencode"],configKey:"mcp",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(w(I,".config","opencode")),transformConfig:OF},vscode:{name:"vscode",displayName:"VS Code",configPath:w(hn,"mcp.json"),localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(hn),transformConfig:Er},windsurf:{name:"windsurf",displayName:"Windsurf",configPath:SF,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(w(I,".codeium","windsurf")),transformConfig:ID},zed:{name:"zed",displayName:"Zed",configPath:process.platform==="darwin"||process.platform==="win32"?w(qe,"Zed","settings.json"):w(qe,"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"?w(qe,"Zed"):w(qe,"zed");return W(e)},transformConfig:kF}};function Je(){return Object.keys(L)}function Fn(e){let t=e||process.cwd(),u=[];for(let[n,i]of Object.entries(L))if(i.localConfigPath){for(let s of i.projectDetectPaths)if(W(w(t,s))){u.push(n);break}}return u}async function mn(){let e=[];for(let[t,u]of Object.entries(L))await u.detectGlobalInstall()&&e.push(t);return e}function Br(e,t){let u={...e};for(let n in t){let i=t[n],s=u[n];i&&typeof i=="object"&&!Array.isArray(i)?u[n]=Br(s&&typeof s=="object"?s:{},i):u[n]=i}return u}function vr(e,t){let u=t.split("."),n=e;for(let i of u)if(n&&typeof n=="object"&&i in n)n=n[i];else return;return n}function ND(e){let t=null;return Ks(e,{onObjectProperty:(u,n,i,s,r)=>{if(t===null&&s>0&&r>0){let o=e.lastIndexOf(`
|
|
182
|
-
`,
|
|
183
|
-
`,"utf-8")}function
|
|
184
|
-
Supported agents: ${
|
|
185
|
-
Done! Open your agent and connect to the "${
|
|
179
|
+
`),s=i?"+":u?"":"-";return r+s+`
|
|
180
|
+
`}function To(e){return e[e.length-1]===`
|
|
181
|
+
`?e.slice(0,-1):e}function eF(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,$o(e.slice(0,D),t)})(),i=e[0]===`
|
|
183
|
+
`||e[0]===" ",s,n;n=r.exec(e);){var o=n[1],a=n[2];s=a[0]===" ",u+=o+(!i&&!s&&a!==""?`
|
|
184
|
+
`:"")+$o(a,t),i=s}return u}function $o(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
|
+
`+e.slice(i,s),i=s+1),n=o;return a+=`
|
|
186
|
+
`,e.length-i>t&&n>i?a+=e.slice(i,n)+`
|
|
187
|
+
`+e.slice(n+1):a+=e.slice(i),a.slice(1)}function tF(e){for(var t="",r=0,u,i=0;i<e.length;r>=65536?i+=2:i++)r=bt(e,i),u=K[r],!u&&_t(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=u||Yd(r);return t}function rF(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)),(Ce(e,t,o,!1,!1)||typeof o>"u"&&Ce(e,t,null,!1,!1))&&(u!==""&&(u+=","+(e.condenseFlow?"":" ")),u+=e.dump);e.tag=i,e.dump="["+u+"]"}function ko(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)),(Ce(e,t+1,a,!0,!0,!1,!0)||typeof a>"u"&&Ce(e,t+1,null,!0,!0,!1,!0))&&((!u||i!=="")&&(i+=hu(e,t)),e.dump&&vt===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function nF(e,t,r){var u="",i=e.tag,s=Object.keys(r),n,o,a,D,l;for(n=0,o=s.length;n<o;n+=1)l="",u!==""&&(l+=", "),e.condenseFlow&&(l+='"'),a=s[n],D=r[a],e.replacer&&(D=e.replacer.call(r,a,D)),Ce(e,t,a,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ce(e,t,D,!1,!1)&&(l+=e.dump,u+=l));e.tag=i,e.dump="{"+u+"}"}function uF(e,t,r,u){var i="",s=e.tag,n=Object.keys(r),o,a,D,l,c,f;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)f="",(!u||i!=="")&&(f+=hu(e,t)),D=n[o],l=r[D],e.replacer&&(l=e.replacer.call(r,D,l)),Ce(e,t+1,D,!0,!0,!0)&&(c=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,c&&(e.dump&&vt===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,c&&(f+=hu(e,t)),Ce(e,t+1,l,!0,c)&&(e.dump&&vt===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,i+=f));e.tag=s,e.dump=i||"{}"}function Oo(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,la.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 Ce(e,t,r,u,i,s,n){e.tag=null,e.dump=r,Oo(e,r,!1)||Oo(e,r,!0);var o=la.call(e.dump),a=u,D;u&&(u=e.flowLevel<0||e.flowLevel>t);var l=o==="[object Object]"||o==="[object Array]",c,f;if(l&&(c=e.duplicates.indexOf(r),f=c!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(l&&f&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),o==="[object Object]")u&&Object.keys(e.dump).length!==0?(uF(e,t,e.dump,i),f&&(e.dump="&ref_"+c+e.dump)):(nF(e,t,e.dump),f&&(e.dump="&ref_"+c+" "+e.dump));else if(o==="[object Array]")u&&e.dump.length!==0?(e.noArrayIndent&&!n&&t>0?ko(e,t-1,e.dump,i):ko(e,t,e.dump,i),f&&(e.dump="&ref_"+c+e.dump)):(rF(e,t,e.dump),f&&(e.dump="&ref_"+c+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Xd(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!=="?"&&(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 iF(e,t){var r=[],u=[],i,s;for(du(e,r,u),i=0,s=u.length;i<s;i+=1)t.duplicates.push(r[u[i]]);t.usedDuplicates=new Array(s)}function du(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)du(e[i],t,r);else for(u=Object.keys(e),i=0,s=u.length;i<s;i+=1)du(e[u[i]],t,r)}function sF(e,t){t=t||{};var r=new Kd(t);r.noRefs||iF(e,r);var u=e;return r.replacer&&(u=r.replacer.call({"":u},"",u)),Ce(r,0,u,!0,!0)?r.dump+`
|
|
188
|
+
`:""}var oF=sF,aF={dump:oF};function yu(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 DF=G,lF=Lo,cF=Mo,fF=Go,hF=Yo,pF=mu,dF=Da.load,FF=Da.loadAll,mF=aF.dump,gF=Q,CF={binary:Zo,float:Vo,map:jo,null:Ho,pairs:Xo,set:ea,timestamp:qo,bool:Uo,int:Wo,merge:Jo,omap:Qo,seq:Po,str:No},EF=yu("safeLoad","load"),yF=yu("safeLoadAll","loadAll"),AF=yu("safeDump","dump"),wF={Type:DF,Schema:lF,FAILSAFE_SCHEMA:cF,JSON_SCHEMA:fF,CORE_SCHEMA:hF,DEFAULT_SCHEMA:pF,load:dF,loadAll:FF,dump:mF,YAMLException:gF,types:CF,safeLoad:EF,safeLoadAll:yF,safeDump:AF},xr=wF;var $t=Rt(Za(),1);import{readFileSync as Em,writeFileSync as aD,existsSync as Pr,mkdirSync as ym}from"fs";import{dirname as Am}from"path";import{existsSync as Nu,mkdirSync as fD,readFileSync as Sm,writeFileSync as Tm}from"fs";import{homedir as $m}from"os";import{join as Tu,dirname as hD,isAbsolute as IE,relative as LE,sep as NE}from"path";var I=ZF();function QF(){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:et,vscodePath:Su,gooseConfigPath:Qa}=QF(),XF=b(I,".gemini","config","mcp_config.json"),Xa=b(process.env.CLINE_DIR||b(I,".cline"),"data","settings","cline_mcp_settings.json"),eD=b(Su,"globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),tD=b(process.env.XDG_CONFIG_HOME||b(I,".copilot"),"mcp-config.json"),em=b(I,".codeium","windsurf","mcp_config.json");function iD(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 $u(e){let t={command:e.command,args:e.args||[]};return e.env&&Object.keys(e.env).length>0&&(t.env=e.env),t}function Or(e,t){return t.url?iD(t):$u(t)}function tm(e,t){if(!t.url)return $u(t);let r=iD(t);return t.oauthScopes&&t.oauthScopes.length>0&&(r.oauth={scopes:t.oauthScopes}),r}function rm(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 nm(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 um(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 rD(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 im(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),rD(r,t.autoApproveTools)}return rD({command:t.command,args:t.args||[],env:t.env},t.autoApproveTools)}function sm(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 $u(t)}function nD(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 uD(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 om(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 am(e,t){if(t.local&&e.localConfigPath)return b(t.cwd,e.localConfigPath);let r=e.configPath,u=b(Rr(r),"mcporter.jsonc");return W(r)?r:W(u)?u:r}var L={antigravity:{name:"antigravity",displayName:"Antigravity",configPath:XF,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(b(I,".gemini","config")),transformConfig:uD},cline:{name:"cline",displayName:"Cline VSCode Extension",configPath:eD,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(Rr(eD)),transformConfig:nD},"cline-cli":{name:"cline-cli",displayName:"Cline CLI",configPath:Xa,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(Rr(Xa)),transformConfig:nD},"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()=>W(b(I,".claude")),transformConfig:Or},"claude-desktop":{name:"claude-desktop",displayName:"Claude Desktop",configPath:b(et,"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()=>W(b(et,"Claude")),transformConfig:Or},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()=>W(b(I,".codex")),transformConfig:im},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()=>W(b(I,".cursor")),transformConfig:sm},"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()=>W(b(I,".gemini")),transformConfig:tm},goose:{name:"goose",displayName:"Goose",configPath:Qa,projectDetectPaths:[],configKey:"extensions",format:"yaml",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(Qa),transformConfig:rm},"github-copilot-cli":{name:"github-copilot-cli",displayName:"GitHub Copilot CLI",configPath:tD,localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"mcpServers",localConfigKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(Rr(tD)),transformConfig:om},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()=>W(b(I,".mcporter")),resolveConfigPath:am,transformConfig:Or},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()=>W(b(I,".config","opencode")),transformConfig:um},vscode:{name:"vscode",displayName:"VS Code",configPath:b(Su,"mcp.json"),localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(Su),transformConfig:Or},windsurf:{name:"windsurf",displayName:"Windsurf",configPath:em,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(b(I,".codeium","windsurf")),transformConfig:uD},zed:{name:"zed",displayName:"Zed",configPath:process.platform==="darwin"||process.platform==="win32"?b(et,"Zed","settings.json"):b(et,"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(et,"Zed"):b(et,"zed");return W(e)},transformConfig:nm}};function tt(){return Object.keys(L)}function ku(e){let t=e||process.cwd(),r=[];for(let[u,i]of Object.entries(L))if(i.localConfigPath){for(let s of i.projectDetectPaths)if(W(b(t,s))){r.push(u);break}}return r}async function Ou(){let e=[];for(let[t,r]of Object.entries(L))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 Mr(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 sD(e){let t=null;return go(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 cm(e){if(!Lr(e))return{};let t=Ru(e,"utf-8");return gr(t)}function fm(e,t,r){let u=lm(e);Lr(u)||Dm(u,{recursive:!0});let i="",s={};Lr(e)&&(i=Ru(e,"utf-8"),s=gr(i));let n=jr(s,t);if(i)try{let o=r.split("."),a=Mr(n,r),D=su(i,o,a,{formattingOptions:sD(i)}),l=ou(i,D);Ir(e,l);return}catch{}Ir(e,JSON.stringify(n,null,2))}function hm(e,t,r){if(!Lr(e))return;let u=Ru(e,"utf-8"),i=t.split(".");try{let o=su(u,[...i,r],void 0,{formattingOptions:sD(u)}),a=ou(u,o);Ir(e,a);return}catch{}let s=gr(u),n=Mr(s,t);n&&typeof n=="object"&&r in n&&delete n[r],Ir(e,JSON.stringify(s,null,2))}function pm(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 Iu(e){if(!Nr(e))return{};let t=dm(e,"utf-8");return xr.load(t)||{}}function gm(e,t,r){if(!Nr(e))return;let u=Iu(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=xr.dump(u,{indent:2,lineWidth:-1,noRefs:!0});oD(e,n)}function Cm(e,t){let r=mm(e);Nr(r)||Fm(r,{recursive:!0});let u={};Nr(e)&&(u=Iu(e));let i=jr(u,t),s=xr.dump(i,{indent:2,lineWidth:-1,noRefs:!0});oD(e,s)}function Lu(e){if(!Pr(e))return{};let t=Em(e,"utf-8");return $t.parse(t)}function wm(e,t,r){if(!Pr(e))return;let u=Lu(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=$t.stringify(u);aD(e,n)}function bm(e,t){let r=Am(e);Pr(r)||ym(r,{recursive:!0});let u={};Pr(e)&&(u=Lu(e));let i=jr(u,t),s=$t.stringify(i);aD(e,s)}function DD(e,t){switch(t){case"json":return cm(e);case"yaml":return Iu(e);case"toml":return Lu(e);default:throw new Error(`Unsupported config format: ${t}`)}}function lD(e,t,r,u){switch(t){case"json":hm(e,r,u);break;case"yaml":gm(e,r,u);break;case"toml":wm(e,r,u);break;default:throw new Error(`Unsupported config format: ${t}`)}}function xm(e,t,r,u){switch(r){case"json":fm(e,t,u);break;case"yaml":Cm(e,t);break;case"toml":bm(e,t);break;default:throw new Error(`Unsupported config format: ${r}`)}}function vm(e,t,r){let u={},i={};return i[t]=r,pm(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}}},Bm=Object.keys(cD);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 Bm){let n=cD[s];n.isSet(u)&&!r.has(s)&&(n.clear(u),i.push(s))}return{config:u,dropped:i}}var km=$m();function Om(e){if(!Nu(e))return{};let t=JSON.parse(Sm(e,"utf-8"));return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function Rm(e,t){let r=hD(e);Nu(r)||fD(r,{recursive:!0}),Tm(e,`${JSON.stringify(t,null,2)}
|
|
190
|
+
`,"utf-8")}function Im(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 Lm(e,t){return t.length===0?[`mcp__${e}`]:t.map(r=>`mcp__${e}__${r}`)}function Nm(e={}){let t=!!e.local,r=e.cwd||process.cwd();return t?Tu(r,".claude","settings.local.json"):Tu(km,".claude","settings.json")}function Pm(e,t,r={}){let u=Nm(r);try{let i=Om(u),s=i.permissions&&typeof i.permissions=="object"&&!Array.isArray(i.permissions)?i.permissions:{};return s.allow=Im(s.allow,Lm(e,t)),i.permissions=s,Rm(u,i),{success:!0,path:u}}catch(i){return{success:!1,path:u,error:i instanceof Error?i.message:"Unknown error"}}}function Hr(e,t={}){let r=!!t.local,u=t.cwd||process.cwd();return e.resolveConfigPath?e.resolveConfigPath(e,{local:r,cwd:u}):r&&e.localConfigPath?Tu(u,e.localConfigPath):e.configPath}function Pu(e,t={}){return t.local&&e.localConfigKey?e.localConfigKey:e.configKey}function pD(e,t,r,u={}){let i=L[r],s=Hr(i,u);try{let n=hD(s);Nu(n)||fD(n,{recursive:!0});let{config:o,dropped:a}=_m(t,i.supportedFields),D=i.transformConfig(e,o,{local:!!u.local}),l=Pu(i,u),c=vm(l,e,D);xm(s,c,i.format,l);let f=[];if(r==="claude-code"&&o.autoApproveTools){let h=Pm(e,o.autoApproveTools,u);if(!h.success)return{success:!1,path:h.path,error:h.error};f.push(h.path)}return{success:!0,path:s,...a.length>0?{droppedFields:a}:{},...f.length>0?{extraPaths:f}:{}}}catch(n){return{success:!1,path:s,error:n instanceof Error?n.message:"Unknown error"}}}import{existsSync as jm}from"fs";function Mm(e){return Object.prototype.hasOwnProperty.call(L,e)}function dD(e,t){return Mm(e)?t&&!L[e].localConfigPath?`${e} does not support project-level config`:null:`Unknown agent type: ${String(e)}`}function FD(e,t,r,u={}){let i=dD(e,u.local);return i?{success:!1,path:"",error:i}:pD(t,r,e,u)}function Hm(e,t){return!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.hasOwnProperty.call(e,t)}function Um(e,t,r){let u=L[e],i=Hr(u,r),s=Pu(u,r);if(!jm(i))return{success:!0,path:i,removed:!1};let n=DD(i,u.format);return Hm(Mr(n,s),t)?(lD(i,u.format,s,t),{success:!0,path:i,removed:!0}):{success:!0,path:i,removed:!1}}function mD(e,t,r={}){let u=dD(e,r.local);if(u)return{success:!1,path:"",removed:!1,error:u};let i=e;try{return Um(i,t,r)}catch(s){return{success:!1,path:Hr(L[i],r),removed:!1,error:s instanceof Error?s.message:"Unknown error"}}}var Wm="https://shaders.com/mcp",ju="shaders",Hu="https://shaders.com/docs/guide/mcp";function Mu(e){return L[e].supportedTransports.includes("http")}function kt(){return tt().filter(Mu)}function gD(e,{requireHttp:t}){let r=new Set(tt()),u=t?kt():tt(),i=new Set(u);for(let s of e)if(r.has(s)||ce(`Unknown agent "${s}". Supported agents: ${u.join(", ")}`),!i.has(s)){let n=L[s];ce(`${n.displayName}: ${n.unsupportedTransportMessage??"this agent does not support remote (HTTP) MCP servers."}`)}return e}async function Vm(e,t){if(e.agents.length>0)return{targets:gD(e.agents,{requireHttp:!0}),scope:e.global?"global":"project"};let r=e.global?[]:ku(t).filter(Mu),u=e.global||r.length===0?"global":"project",i=u==="project"?r:(await Ou()).filter(Mu);if(!(!e.yes&&process.stdout.isTTY&&process.stdin.isTTY))return i.length===0&&ce(`No coding agents detected. Pass one explicitly, e.g. npx shaders install-mcp -a cursor
|
|
191
|
+
Supported agents: ${kt().join(", ")}`),{targets:i,scope:u};let n=await tu({message:`Install the Shaders MCP server to which agents? (${u} config)`,options:kt().map(o=>({value:o,label:L[o].displayName,hint:u==="project"&&L[o].localConfigPath?L[o].localConfigPath:L[o].configPath.replace(/^\/Users\/[^/]+|^\/home\/[^/]+|^C:\\Users\\[^\\]+/,"~")})),initialValues:i,required:!0});return Ct(n)&&(console.log("Cancelled \u2014 nothing was changed."),process.exit(0)),{targets:n,scope:u}}async function CD(e){let t=process.cwd(),{targets:r,scope:u}=await Vm(e,t),i=0;for(let s of r){let n=u==="project"&&!!L[s].localConfigPath,o=FD(s,ju,{type:"http",url:Wm},{local:n,cwd:t});o.success?console.log(`\u2713 ${L[s].displayName} \u2014 ${o.path}`):(i++,console.error(`\u2717 ${L[s].displayName} \u2014 ${o.error}`))}i===r.length&&process.exit(1),console.log(`
|
|
192
|
+
Done! Open your agent and connect to the "${ju}" MCP server \u2014 you'll be
|
|
186
193
|
prompted to sign in to your Shaders account the first time it connects.
|
|
187
194
|
|
|
188
|
-
Docs: ${
|
|
195
|
+
Docs: ${Hu}`)}async function ED(e){let t=process.cwd(),r=e.agents.length>0?gD(e.agents,{requireHttp:!1}):tt(),u=0,i=0,s=0;for(let n of r){let o=e.global||!L[n].localConfigPath?[!1]:[!0,!1];for(let a of o){i++;let D=mD(n,ju,{local:a,cwd:t});D.success&&D.removed?(u++,console.log(`\u2713 Removed from ${L[n].displayName} \u2014 ${D.path}`)):D.success||(s++,console.error(`\u2717 ${L[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 yD(){console.log(`shaders \u2014 Shaders CLI (https://shaders.com)
|
|
189
196
|
|
|
190
197
|
Usage:
|
|
191
198
|
npx shaders init [options] Set up Shaders in this project and connect it to your account
|
|
192
|
-
npx shaders install
|
|
199
|
+
npx shaders install [<ref>...] Install shaders: your own by id, presets by name (offsets-1) \u2014 no ref: pick from your project
|
|
200
|
+
npx shaders i [<ref>...] Alias for install
|
|
193
201
|
npx shaders update [<id>...] Refresh installed shaders (all of them when no id is given)
|
|
202
|
+
npx shaders open Open the connected project in the design editor
|
|
194
203
|
npx shaders login Sign in to your Shaders account
|
|
195
204
|
npx shaders logout Forget the stored sign-in
|
|
196
205
|
npx shaders install-mcp [options] Add the Shaders MCP server to your coding agents
|
|
@@ -204,6 +213,7 @@ init options:
|
|
|
204
213
|
-y, --yes Skip prompts (no project is connected unless --project is given)
|
|
205
214
|
|
|
206
215
|
install / update options:
|
|
216
|
+
--all Install every shader in the connected project without prompting
|
|
207
217
|
--force Overwrite files that exist or have local edits
|
|
208
218
|
|
|
209
219
|
install-mcp options:
|
|
@@ -216,6 +226,6 @@ General:
|
|
|
216
226
|
-v, --version Show version
|
|
217
227
|
|
|
218
228
|
Supported agents:
|
|
219
|
-
${
|
|
229
|
+
${kt().join(", ")}
|
|
220
230
|
|
|
221
|
-
Docs: ${
|
|
231
|
+
Docs: ${Hu}`)}function Gm(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("-"))&&ce(`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":yD(),process.exit(0);break;case"-v":case"--version":console.log("3.2.473"),process.exit(0);break;default:n.startsWith("-")&&ce(`Unknown option: ${n} (see npx shaders --help)`),r?u.push(n):r=n}}return{command:r,args:u,flags:t}}async function Ym(){let{me:e}=await me();m.success(`Signed in to ${Z()}${e.email?` as ${e.email}`:""}`)}async function zm(){let e=await ki();m.success(e?"Signed out \u2014 stored credentials removed":"No stored credentials found")}async function Km(){let{command:e,args:t,flags:r}=Gm(process.argv.slice(2)),u=()=>{t.length&&ce(`Unexpected argument: ${t[0]}`)};switch(e){case"init":u(),await ur(r);break;case"install":case"i":await Ns(t,r);break;case"open":u(),await Ps();break;case"update":await js(t,r);break;case"login":u(),await Ym();break;case"logout":u(),await zm();break;case"install-mcp":u(),await CD(r);break;case"uninstall-mcp":u(),await ED(r);break;case void 0:case"help":yD();break;default:ce(`Unknown command "${e}" (see npx shaders --help)`)}}Km().catch(e=>{ce(e instanceof Error?e.message:String(e))});
|