create-pixi-vn 1.7.13 → 1.7.15
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/index.mjs +34 -34
- package/package.json +2 -1
- package/template-lib/.eslintrc.cjs +22 -0
- package/template-lib/.vscode/extensions.json +8 -0
- package/template-lib/.vscode/settings.json +30 -0
- package/template-lib/README.md +25 -0
- package/template-lib/_github/workflows/npm-publish.yml +55 -0
- package/template-lib/_gitignore +23 -0
- package/template-lib/package.json +50 -0
- package/template-lib/scripts/replace-pixi.js +30 -0
- package/template-lib/src/index.ts +1 -0
- package/template-lib/src/utils/example.ts +1 -0
- package/template-lib/src/utils/index.ts +1 -0
- package/template-lib/tests/setup.test.ts +6 -0
- package/template-lib/tsconfig.json +108 -0
- package/template-lib/tsup.config.ts +24 -0
- package/template-lib/vitest.config.ts +8 -0
package/dist/index.mjs
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import"node:util";import V,{stdin as wu,stdout as yu}from"node:process";import*as eu from"node:readline";import $u from"node:readline";import{Writable as DD}from"node:stream";import{execa as W}from"execa";import $ from"node:path";import xu from"which";import d from"node:fs";import{fileURLToPath as eD}from"node:url";function ku(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var cu,Su;function tD(){if(Su)return cu;Su=1;const D="\x1B",e=`${D}[`,t="\x07",r={to(u,n){return n?`${e}${n+1};${u+1}H`:`${e}${u+1}G`},move(u,n){let a="";return u<0?a+=`${e}${-u}D`:u>0&&(a+=`${e}${u}C`),n<0?a+=`${e}${-n}A`:n>0&&(a+=`${e}${n}B`),a},up:(u=1)=>`${e}${u}A`,down:(u=1)=>`${e}${u}B`,forward:(u=1)=>`${e}${u}C`,backward:(u=1)=>`${e}${u}D`,nextLine:(u=1)=>`${e}E`.repeat(u),prevLine:(u=1)=>`${e}F`.repeat(u),left:`${e}G`,hide:`${e}?25l`,show:`${e}?25h`,save:`${D}7`,restore:`${D}8`},i={up:(u=1)=>`${e}S`.repeat(u),down:(u=1)=>`${e}T`.repeat(u)},s={screen:`${e}2J`,up:(u=1)=>`${e}1J`.repeat(u),down:(u=1)=>`${e}J`.repeat(u),line:`${e}2K`,lineEnd:`${e}K`,lineStart:`${e}1K`,lines(u){let n="";for(let a=0;a<u;a++)n+=this.line+(a<u-1?r.up():"");return u&&(n+=r.left),n}};return cu={cursor:r,scroll:i,erase:s,beep:t},cu}var T=tD(),tu={exports:{}},Ou;function rD(){if(Ou)return tu.exports;Ou=1;let D=process||{},e=D.argv||[],t=D.env||{},r=!(t.NO_COLOR||e.includes("--no-color"))&&(!!t.FORCE_COLOR||e.includes("--color")||D.platform==="win32"||(D.stdout||{}).isTTY&&t.TERM!=="dumb"||!!t.CI),i=(n,a,c=n)=>h=>{let C=""+h,l=C.indexOf(a,n.length);return~l?n+s(C,a,c,l)+a:n+C+a},s=(n,a,c,h)=>{let C="",l=0;do C+=n.substring(l,h)+c,l=h+a.length,h=n.indexOf(a,l);while(~h);return C+n.substring(l)},u=(n=r)=>{let a=n?i:()=>String;return{isColorSupported:n,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 tu.exports=u(),tu.exports.createColors=u,tu.exports}var iD=rD();const o=ku(iD);function sD({onlyFirst:D=!1}={}){const e=["[\\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(e,D?void 0:"g")}const aD=sD();function Tu(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(aD,"")}function Iu(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var _u={exports:{}};(function(D){var e={};D.exports=e,e.eastAsianWidth=function(r){var i=r.charCodeAt(0),s=r.length==2?r.charCodeAt(1):0,u=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,u=i<<10|s,u+=65536),u==12288||65281<=u&&u<=65376||65504<=u&&u<=65510?"F":u==8361||65377<=u&&u<=65470||65474<=u&&u<=65479||65482<=u&&u<=65487||65490<=u&&u<=65495||65498<=u&&u<=65500||65512<=u&&u<=65518?"H":4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12289<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||110592<=u&&u<=110593||127488<=u&&u<=127490||127504<=u&&u<=127546||127552<=u&&u<=127560||127568<=u&&u<=127569||131072<=u&&u<=194367||177984<=u&&u<=196605||196608<=u&&u<=262141?"W":32<=u&&u<=126||162<=u&&u<=163||165<=u&&u<=166||u==172||u==175||10214<=u&&u<=10221||10629<=u&&u<=10630?"Na":u==161||u==164||167<=u&&u<=168||u==170||173<=u&&u<=174||176<=u&&u<=180||182<=u&&u<=186||188<=u&&u<=191||u==198||u==208||215<=u&&u<=216||222<=u&&u<=225||u==230||232<=u&&u<=234||236<=u&&u<=237||u==240||242<=u&&u<=243||247<=u&&u<=250||u==252||u==254||u==257||u==273||u==275||u==283||294<=u&&u<=295||u==299||305<=u&&u<=307||u==312||319<=u&&u<=322||u==324||328<=u&&u<=331||u==333||338<=u&&u<=339||358<=u&&u<=359||u==363||u==462||u==464||u==466||u==468||u==470||u==472||u==474||u==476||u==593||u==609||u==708||u==711||713<=u&&u<=715||u==717||u==720||728<=u&&u<=731||u==733||u==735||768<=u&&u<=879||913<=u&&u<=929||931<=u&&u<=937||945<=u&&u<=961||963<=u&&u<=969||u==1025||1040<=u&&u<=1103||u==1105||u==8208||8211<=u&&u<=8214||8216<=u&&u<=8217||8220<=u&&u<=8221||8224<=u&&u<=8226||8228<=u&&u<=8231||u==8240||8242<=u&&u<=8243||u==8245||u==8251||u==8254||u==8308||u==8319||8321<=u&&u<=8324||u==8364||u==8451||u==8453||u==8457||u==8467||u==8470||8481<=u&&u<=8482||u==8486||u==8491||8531<=u&&u<=8532||8539<=u&&u<=8542||8544<=u&&u<=8555||8560<=u&&u<=8569||u==8585||8592<=u&&u<=8601||8632<=u&&u<=8633||u==8658||u==8660||u==8679||u==8704||8706<=u&&u<=8707||8711<=u&&u<=8712||u==8715||u==8719||u==8721||u==8725||u==8730||8733<=u&&u<=8736||u==8739||u==8741||8743<=u&&u<=8748||u==8750||8756<=u&&u<=8759||8764<=u&&u<=8765||u==8776||u==8780||u==8786||8800<=u&&u<=8801||8804<=u&&u<=8807||8810<=u&&u<=8811||8814<=u&&u<=8815||8834<=u&&u<=8835||8838<=u&&u<=8839||u==8853||u==8857||u==8869||u==8895||u==8978||9312<=u&&u<=9449||9451<=u&&u<=9547||9552<=u&&u<=9587||9600<=u&&u<=9615||9618<=u&&u<=9621||9632<=u&&u<=9633||9635<=u&&u<=9641||9650<=u&&u<=9651||9654<=u&&u<=9655||9660<=u&&u<=9661||9664<=u&&u<=9665||9670<=u&&u<=9672||u==9675||9678<=u&&u<=9681||9698<=u&&u<=9701||u==9711||9733<=u&&u<=9734||u==9737||9742<=u&&u<=9743||9748<=u&&u<=9749||u==9756||u==9758||u==9792||u==9794||9824<=u&&u<=9825||9827<=u&&u<=9829||9831<=u&&u<=9834||9836<=u&&u<=9837||u==9839||9886<=u&&u<=9887||9918<=u&&u<=9919||9924<=u&&u<=9933||9935<=u&&u<=9953||u==9955||9960<=u&&u<=9983||u==10045||u==10071||10102<=u&&u<=10111||11093<=u&&u<=11097||12872<=u&&u<=12879||57344<=u&&u<=63743||65024<=u&&u<=65039||u==65533||127232<=u&&u<=127242||127248<=u&&u<=127277||127280<=u&&u<=127337||127344<=u&&u<=127386||917760<=u&&u<=917999||983040<=u&&u<=1048573||1048576<=u&&u<=1114109?"A":"N"},e.characterLength=function(r){var i=this.eastAsianWidth(r);return i=="F"||i=="W"||i=="A"?2:1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(r){for(var i=t(r),s=0,u=0;u<i.length;u++)s=s+this.characterLength(i[u]);return s},e.slice=function(r,i,s){textLen=e.length(r),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var u="",n=0,a=t(r),c=0;c<a.length;c++){var h=a[c],C=e.length(h);if(n>=i-(C==2?1:0))if(n+C<=s)u+=h;else break;n+=C}return u}})(_u);var nD=_u.exports;const oD=Iu(nD);var cD=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};const lD=Iu(cD);function X(D,e={}){if(typeof D!="string"||D.length===0||(e={ambiguousIsNarrow:!0,...e},D=Tu(D),D.length===0))return 0;D=D.replace(lD()," ");const t=e.ambiguousIsNarrow?1:2;let r=0;for(const i of D){const s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(oD.eastAsianWidth(i)){case"F":case"W":r+=2;break;case"A":r+=t;break;default:r+=1}}return r}const lu=10,ju=(D=0)=>e=>`\x1B[${e+D}m`,Ru=(D=0)=>e=>`\x1B[${38+D};5;${e}m`,Mu=(D=0)=>(e,t,r)=>`\x1B[${38+D};2;${e};${t};${r}m`,v={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(v.modifier);const FD=Object.keys(v.color),CD=Object.keys(v.bgColor);[...FD,...CD];function ED(){const D=new Map;for(const[e,t]of Object.entries(v)){for(const[r,i]of Object.entries(t))v[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[r]=v[r],D.set(i[0],i[1]);Object.defineProperty(v,e,{value:t,enumerable:!1})}return Object.defineProperty(v,"codes",{value:D,enumerable:!1}),v.color.close="\x1B[39m",v.bgColor.close="\x1B[49m",v.color.ansi=ju(),v.color.ansi256=Ru(),v.color.ansi16m=Mu(),v.bgColor.ansi=ju(lu),v.bgColor.ansi256=Ru(lu),v.bgColor.ansi16m=Mu(lu),Object.defineProperties(v,{rgbToAnsi256:{value:(e,t,r)=>e===t&&t===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:e=>{const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[r]=t;r.length===3&&(r=[...r].map(s=>s+s).join(""));const i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>v.rgbToAnsi256(...v.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,r,i;if(e>=232)t=((e-232)*10+8)/255,r=t,i=t;else{e-=16;const n=e%36;t=Math.floor(e/36)/5,r=Math.floor(n/6)/5,i=n%6/5}const s=Math.max(t,r,i)*2;if(s===0)return 30;let u=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(t));return s===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(e,t,r)=>v.ansi256ToAnsi(v.rgbToAnsi256(e,t,r)),enumerable:!1},hexToAnsi:{value:e=>v.ansi256ToAnsi(v.hexToAnsi256(e)),enumerable:!1}}),v}const pD=ED(),ru=new Set(["\x1B","\x9B"]),hD=39,Fu="\x07",Nu="[",mD="]",Vu="m",Cu=`${mD}8;;`,Lu=D=>`${ru.values().next().value}${Nu}${D}${Vu}`,Pu=D=>`${ru.values().next().value}${Cu}${D}${Fu}`,fD=D=>D.split(" ").map(e=>X(e)),Eu=(D,e,t)=>{const r=[...e];let i=!1,s=!1,u=X(Tu(D[D.length-1]));for(const[n,a]of r.entries()){const c=X(a);if(u+c<=t?D[D.length-1]+=a:(D.push(a),u=0),ru.has(a)&&(i=!0,s=r.slice(n+1).join("").startsWith(Cu)),i){s?a===Fu&&(i=!1,s=!1):a===Vu&&(i=!1);continue}u+=c,u===t&&n<r.length-1&&(D.push(""),u=0)}!u&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},dD=D=>{const e=D.split(" ");let t=e.length;for(;t>0&&!(X(e[t-1])>0);)t--;return t===e.length?D:e.slice(0,t).join(" ")+e.slice(t).join("")},BD=(D,e,t={})=>{if(t.trim!==!1&&D.trim()==="")return"";let r="",i,s;const u=fD(D);let n=[""];for(const[c,h]of D.split(" ").entries()){t.trim!==!1&&(n[n.length-1]=n[n.length-1].trimStart());let C=X(n[n.length-1]);if(c!==0&&(C>=e&&(t.wordWrap===!1||t.trim===!1)&&(n.push(""),C=0),(C>0||t.trim===!1)&&(n[n.length-1]+=" ",C++)),t.hard&&u[c]>e){const l=e-C,b=1+Math.floor((u[c]-l-1)/e);Math.floor((u[c]-1)/e)<b&&n.push(""),Eu(n,h,e);continue}if(C+u[c]>e&&C>0&&u[c]>0){if(t.wordWrap===!1&&C<e){Eu(n,h,e);continue}n.push("")}if(C+u[c]>e&&t.wordWrap===!1){Eu(n,h,e);continue}n[n.length-1]+=h}t.trim!==!1&&(n=n.map(c=>dD(c)));const a=[...n.join(`
|
|
2
|
-
`)];for(const[
|
|
3
|
-
`?(s&&(r+=Pu("")),i&&C&&(r+=
|
|
4
|
-
`&&(i&&C&&(r+=
|
|
1
|
+
import"node:util";import L,{stdin as wu,stdout as yu}from"node:process";import*as eu from"node:readline";import $u from"node:readline";import{Writable as DD}from"node:stream";import{execa as W}from"execa";import $ from"node:path";import xu from"which";import d from"node:fs";import{fileURLToPath as eD}from"node:url";function ku(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var lu,Su;function tD(){if(Su)return lu;Su=1;const D="\x1B",e=`${D}[`,t="\x07",r={to(u,n){return n?`${e}${n+1};${u+1}H`:`${e}${u+1}G`},move(u,n){let a="";return u<0?a+=`${e}${-u}D`:u>0&&(a+=`${e}${u}C`),n<0?a+=`${e}${-n}A`:n>0&&(a+=`${e}${n}B`),a},up:(u=1)=>`${e}${u}A`,down:(u=1)=>`${e}${u}B`,forward:(u=1)=>`${e}${u}C`,backward:(u=1)=>`${e}${u}D`,nextLine:(u=1)=>`${e}E`.repeat(u),prevLine:(u=1)=>`${e}F`.repeat(u),left:`${e}G`,hide:`${e}?25l`,show:`${e}?25h`,save:`${D}7`,restore:`${D}8`},i={up:(u=1)=>`${e}S`.repeat(u),down:(u=1)=>`${e}T`.repeat(u)},s={screen:`${e}2J`,up:(u=1)=>`${e}1J`.repeat(u),down:(u=1)=>`${e}J`.repeat(u),line:`${e}2K`,lineEnd:`${e}K`,lineStart:`${e}1K`,lines(u){let n="";for(let a=0;a<u;a++)n+=this.line+(a<u-1?r.up():"");return u&&(n+=r.left),n}};return lu={cursor:r,scroll:i,erase:s,beep:t},lu}var T=tD(),tu={exports:{}},Ou;function rD(){if(Ou)return tu.exports;Ou=1;let D=process||{},e=D.argv||[],t=D.env||{},r=!(t.NO_COLOR||e.includes("--no-color"))&&(!!t.FORCE_COLOR||e.includes("--color")||D.platform==="win32"||(D.stdout||{}).isTTY&&t.TERM!=="dumb"||!!t.CI),i=(n,a,o=n)=>E=>{let C=""+E,c=C.indexOf(a,n.length);return~c?n+s(C,a,o,c)+a:n+C+a},s=(n,a,o,E)=>{let C="",c=0;do C+=n.substring(c,E)+o,c=E+a.length,E=n.indexOf(a,c);while(~E);return C+n.substring(c)},u=(n=r)=>{let a=n?i:()=>String;return{isColorSupported:n,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 tu.exports=u(),tu.exports.createColors=u,tu.exports}var iD=rD();const l=ku(iD);function sD({onlyFirst:D=!1}={}){const e=["[\\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(e,D?void 0:"g")}const aD=sD();function Tu(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(aD,"")}function Iu(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var _u={exports:{}};(function(D){var e={};D.exports=e,e.eastAsianWidth=function(r){var i=r.charCodeAt(0),s=r.length==2?r.charCodeAt(1):0,u=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,u=i<<10|s,u+=65536),u==12288||65281<=u&&u<=65376||65504<=u&&u<=65510?"F":u==8361||65377<=u&&u<=65470||65474<=u&&u<=65479||65482<=u&&u<=65487||65490<=u&&u<=65495||65498<=u&&u<=65500||65512<=u&&u<=65518?"H":4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12289<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||110592<=u&&u<=110593||127488<=u&&u<=127490||127504<=u&&u<=127546||127552<=u&&u<=127560||127568<=u&&u<=127569||131072<=u&&u<=194367||177984<=u&&u<=196605||196608<=u&&u<=262141?"W":32<=u&&u<=126||162<=u&&u<=163||165<=u&&u<=166||u==172||u==175||10214<=u&&u<=10221||10629<=u&&u<=10630?"Na":u==161||u==164||167<=u&&u<=168||u==170||173<=u&&u<=174||176<=u&&u<=180||182<=u&&u<=186||188<=u&&u<=191||u==198||u==208||215<=u&&u<=216||222<=u&&u<=225||u==230||232<=u&&u<=234||236<=u&&u<=237||u==240||242<=u&&u<=243||247<=u&&u<=250||u==252||u==254||u==257||u==273||u==275||u==283||294<=u&&u<=295||u==299||305<=u&&u<=307||u==312||319<=u&&u<=322||u==324||328<=u&&u<=331||u==333||338<=u&&u<=339||358<=u&&u<=359||u==363||u==462||u==464||u==466||u==468||u==470||u==472||u==474||u==476||u==593||u==609||u==708||u==711||713<=u&&u<=715||u==717||u==720||728<=u&&u<=731||u==733||u==735||768<=u&&u<=879||913<=u&&u<=929||931<=u&&u<=937||945<=u&&u<=961||963<=u&&u<=969||u==1025||1040<=u&&u<=1103||u==1105||u==8208||8211<=u&&u<=8214||8216<=u&&u<=8217||8220<=u&&u<=8221||8224<=u&&u<=8226||8228<=u&&u<=8231||u==8240||8242<=u&&u<=8243||u==8245||u==8251||u==8254||u==8308||u==8319||8321<=u&&u<=8324||u==8364||u==8451||u==8453||u==8457||u==8467||u==8470||8481<=u&&u<=8482||u==8486||u==8491||8531<=u&&u<=8532||8539<=u&&u<=8542||8544<=u&&u<=8555||8560<=u&&u<=8569||u==8585||8592<=u&&u<=8601||8632<=u&&u<=8633||u==8658||u==8660||u==8679||u==8704||8706<=u&&u<=8707||8711<=u&&u<=8712||u==8715||u==8719||u==8721||u==8725||u==8730||8733<=u&&u<=8736||u==8739||u==8741||8743<=u&&u<=8748||u==8750||8756<=u&&u<=8759||8764<=u&&u<=8765||u==8776||u==8780||u==8786||8800<=u&&u<=8801||8804<=u&&u<=8807||8810<=u&&u<=8811||8814<=u&&u<=8815||8834<=u&&u<=8835||8838<=u&&u<=8839||u==8853||u==8857||u==8869||u==8895||u==8978||9312<=u&&u<=9449||9451<=u&&u<=9547||9552<=u&&u<=9587||9600<=u&&u<=9615||9618<=u&&u<=9621||9632<=u&&u<=9633||9635<=u&&u<=9641||9650<=u&&u<=9651||9654<=u&&u<=9655||9660<=u&&u<=9661||9664<=u&&u<=9665||9670<=u&&u<=9672||u==9675||9678<=u&&u<=9681||9698<=u&&u<=9701||u==9711||9733<=u&&u<=9734||u==9737||9742<=u&&u<=9743||9748<=u&&u<=9749||u==9756||u==9758||u==9792||u==9794||9824<=u&&u<=9825||9827<=u&&u<=9829||9831<=u&&u<=9834||9836<=u&&u<=9837||u==9839||9886<=u&&u<=9887||9918<=u&&u<=9919||9924<=u&&u<=9933||9935<=u&&u<=9953||u==9955||9960<=u&&u<=9983||u==10045||u==10071||10102<=u&&u<=10111||11093<=u&&u<=11097||12872<=u&&u<=12879||57344<=u&&u<=63743||65024<=u&&u<=65039||u==65533||127232<=u&&u<=127242||127248<=u&&u<=127277||127280<=u&&u<=127337||127344<=u&&u<=127386||917760<=u&&u<=917999||983040<=u&&u<=1048573||1048576<=u&&u<=1114109?"A":"N"},e.characterLength=function(r){var i=this.eastAsianWidth(r);return i=="F"||i=="W"||i=="A"?2:1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(r){for(var i=t(r),s=0,u=0;u<i.length;u++)s=s+this.characterLength(i[u]);return s},e.slice=function(r,i,s){textLen=e.length(r),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var u="",n=0,a=t(r),o=0;o<a.length;o++){var E=a[o],C=e.length(E);if(n>=i-(C==2?1:0))if(n+C<=s)u+=E;else break;n+=C}return u}})(_u);var nD=_u.exports;const oD=Iu(nD);var lD=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};const cD=Iu(lD);function X(D,e={}){if(typeof D!="string"||D.length===0||(e={ambiguousIsNarrow:!0,...e},D=Tu(D),D.length===0))return 0;D=D.replace(cD()," ");const t=e.ambiguousIsNarrow?1:2;let r=0;for(const i of D){const s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(oD.eastAsianWidth(i)){case"F":case"W":r+=2;break;case"A":r+=t;break;default:r+=1}}return r}const cu=10,Ru=(D=0)=>e=>`\x1B[${e+D}m`,ju=(D=0)=>e=>`\x1B[${38+D};5;${e}m`,Mu=(D=0)=>(e,t,r)=>`\x1B[${38+D};2;${e};${t};${r}m`,A={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(A.modifier);const FD=Object.keys(A.color),CD=Object.keys(A.bgColor);[...FD,...CD];function ED(){const D=new Map;for(const[e,t]of Object.entries(A)){for(const[r,i]of Object.entries(t))A[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[r]=A[r],D.set(i[0],i[1]);Object.defineProperty(A,e,{value:t,enumerable:!1})}return Object.defineProperty(A,"codes",{value:D,enumerable:!1}),A.color.close="\x1B[39m",A.bgColor.close="\x1B[49m",A.color.ansi=Ru(),A.color.ansi256=ju(),A.color.ansi16m=Mu(),A.bgColor.ansi=Ru(cu),A.bgColor.ansi256=ju(cu),A.bgColor.ansi16m=Mu(cu),Object.defineProperties(A,{rgbToAnsi256:{value:(e,t,r)=>e===t&&t===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:e=>{const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[r]=t;r.length===3&&(r=[...r].map(s=>s+s).join(""));const i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>A.rgbToAnsi256(...A.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,r,i;if(e>=232)t=((e-232)*10+8)/255,r=t,i=t;else{e-=16;const n=e%36;t=Math.floor(e/36)/5,r=Math.floor(n/6)/5,i=n%6/5}const s=Math.max(t,r,i)*2;if(s===0)return 30;let u=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(t));return s===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(e,t,r)=>A.ansi256ToAnsi(A.rgbToAnsi256(e,t,r)),enumerable:!1},hexToAnsi:{value:e=>A.ansi256ToAnsi(A.hexToAnsi256(e)),enumerable:!1}}),A}const pD=ED(),ru=new Set(["\x1B","\x9B"]),hD=39,Fu="\x07",Nu="[",mD="]",Lu="m",Cu=`${mD}8;;`,Vu=D=>`${ru.values().next().value}${Nu}${D}${Lu}`,Pu=D=>`${ru.values().next().value}${Cu}${D}${Fu}`,fD=D=>D.split(" ").map(e=>X(e)),Eu=(D,e,t)=>{const r=[...e];let i=!1,s=!1,u=X(Tu(D[D.length-1]));for(const[n,a]of r.entries()){const o=X(a);if(u+o<=t?D[D.length-1]+=a:(D.push(a),u=0),ru.has(a)&&(i=!0,s=r.slice(n+1).join("").startsWith(Cu)),i){s?a===Fu&&(i=!1,s=!1):a===Lu&&(i=!1);continue}u+=o,u===t&&n<r.length-1&&(D.push(""),u=0)}!u&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},dD=D=>{const e=D.split(" ");let t=e.length;for(;t>0&&!(X(e[t-1])>0);)t--;return t===e.length?D:e.slice(0,t).join(" ")+e.slice(t).join("")},BD=(D,e,t={})=>{if(t.trim!==!1&&D.trim()==="")return"";let r="",i,s;const u=fD(D);let n=[""];for(const[o,E]of D.split(" ").entries()){t.trim!==!1&&(n[n.length-1]=n[n.length-1].trimStart());let C=X(n[n.length-1]);if(o!==0&&(C>=e&&(t.wordWrap===!1||t.trim===!1)&&(n.push(""),C=0),(C>0||t.trim===!1)&&(n[n.length-1]+=" ",C++)),t.hard&&u[o]>e){const c=e-C,b=1+Math.floor((u[o]-c-1)/e);Math.floor((u[o]-1)/e)<b&&n.push(""),Eu(n,E,e);continue}if(C+u[o]>e&&C>0&&u[o]>0){if(t.wordWrap===!1&&C<e){Eu(n,E,e);continue}n.push("")}if(C+u[o]>e&&t.wordWrap===!1){Eu(n,E,e);continue}n[n.length-1]+=E}t.trim!==!1&&(n=n.map(o=>dD(o)));const a=[...n.join(`
|
|
2
|
+
`)];for(const[o,E]of a.entries()){if(r+=E,ru.has(E)){const{groups:c}=new RegExp(`(?:\\${Nu}(?<code>\\d+)m|\\${Cu}(?<uri>.*)${Fu})`).exec(a.slice(o).join(""))||{groups:{}};if(c.code!==void 0){const b=Number.parseFloat(c.code);i=b===hD?void 0:b}else c.uri!==void 0&&(s=c.uri.length===0?void 0:c.uri)}const C=pD.codes.get(Number(i));a[o+1]===`
|
|
3
|
+
`?(s&&(r+=Pu("")),i&&C&&(r+=Vu(C))):E===`
|
|
4
|
+
`&&(i&&C&&(r+=Vu(i)),s&&(r+=Pu(s)))}return r};function Uu(D,e,t){return String(D).normalize().replace(/\r\n/g,`
|
|
5
5
|
`).split(`
|
|
6
6
|
`).map(r=>BD(r,e,t)).join(`
|
|
7
7
|
`)}const gD=["up","down","left","right","space","enter","cancel"],iu={actions:new Set(gD),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function pu(D,e){if(typeof D=="string")return iu.aliases.get(D)===e;for(const t of D)if(t!==void 0&&pu(t,e))return!0;return!1}function bD(D,e){if(D===e)return;const t=D.split(`
|
|
8
8
|
`),r=e.split(`
|
|
9
|
-
`),i=[];for(let s=0;s<Math.max(t.length,r.length);s++)t[s]!==r[s]&&i.push(s);return i}const
|
|
9
|
+
`),i=[];for(let s=0;s<Math.max(t.length,r.length);s++)t[s]!==r[s]&&i.push(s);return i}const vD=globalThis.process.platform.startsWith("win"),hu=Symbol("clack:cancel");function I(D){return D===hu}function su(D,e){const t=D;t.isTTY&&t.setRawMode(e)}function AD({input:D=wu,output:e=yu,overwrite:t=!0,hideCursor:r=!0}={}){const i=eu.createInterface({input:D,output:e,prompt:"",tabSize:1});eu.emitKeypressEvents(D,i),D.isTTY&&D.setRawMode(!0);const s=(u,{name:n,sequence:a})=>{const o=String(u);if(pu([o,n,a],"cancel")){r&&e.write(T.cursor.show),process.exit(0);return}if(!t)return;const E=n==="return"?0:-1,C=n==="return"?-1:0;eu.moveCursor(e,E,C,()=>{eu.clearLine(e,1,()=>{D.once("keypress",s)})})};return r&&e.write(T.cursor.hide),D.once("keypress",s),()=>{D.off("keypress",s),r&&e.write(T.cursor.show),D.isTTY&&!vD&&D.setRawMode(!1),i.terminal=!1,i.close()}}var wD=Object.defineProperty,yD=(D,e,t)=>e in D?wD(D,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):D[e]=t,R=(D,e,t)=>(yD(D,typeof e!="symbol"?e+"":e,t),t);let mu=class{constructor(e,t=!0){R(this,"input"),R(this,"output"),R(this,"_abortSignal"),R(this,"rl"),R(this,"opts"),R(this,"_render"),R(this,"_track",!1),R(this,"_prevFrame",""),R(this,"_subscribers",new Map),R(this,"_cursor",0),R(this,"state","initial"),R(this,"error",""),R(this,"value");const{input:r=wu,output:i=yu,render:s,signal:u,...n}=e;this.opts=n,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=t,this._abortSignal=u,this.input=r,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){const r=this._subscribers.get(e)??[];r.push(t),this._subscribers.set(e,r)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){const r=this._subscribers.get(e)??[],i=[];for(const s of r)s.cb(...t),s.once&&i.push(()=>r.splice(r.indexOf(s),1));for(const s of i)s()}prompt(){return new Promise((e,t)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),e(hu);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}const r=new DD;r._write=(i,s,u)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),u()},this.input.pipe(r),this.rl=$u.createInterface({input:this.input,output:r,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),$u.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),su(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(T.cursor.show),this.output.off("resize",this.render),su(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(T.cursor.show),this.output.off("resize",this.render),su(this.input,!1),e(hu)})})}onKeypress(e,t){if(this.state==="error"&&(this.state="active"),t?.name&&(!this._track&&iu.aliases.has(t.name)&&this.emit("cursor",iu.aliases.get(t.name)),iu.actions.has(t.name)&&this.emit("cursor",t.name)),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),e===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),e&&this.emit("key",e.toLowerCase()),t?.name==="return"){if(this.opts.validate){const r=this.opts.validate(this.value);r&&(this.error=r instanceof Error?r.message:r,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}pu([e,t?.name,t?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
10
10
|
`),su(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const e=Uu(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
11
11
|
`).length-1;this.output.write(T.cursor.move(-999,e*-1))}render(){const e=Uu(this._render(this)??"",process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(T.cursor.hide);else{const t=bD(this._prevFrame,e);if(this.restoreCursor(),t&&t?.length===1){const r=t[0];this.output.write(T.cursor.move(0,r)),this.output.write(T.erase.lines(1));const i=e.split(`
|
|
12
12
|
`);this.output.write(i[r]),this._prevFrame=e,this.output.write(T.cursor.move(0,i.length-r-1));return}if(t&&t?.length>1){const r=t[0];this.output.write(T.cursor.move(0,r)),this.output.write(T.erase.down());const i=e.split(`
|
|
13
13
|
`).slice(r);this.output.write(i.join(`
|
|
14
|
-
`)),this._prevFrame=e;return}this.output.write(T.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}}class $D extends mu{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",t=>{this.output.write(T.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var xD=Object.defineProperty,kD=(D,e,t)=>e in D?xD(D,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):D[e]=t,Gu=(D,e,t)=>(kD(D,typeof e!="symbol"?e+"":e,t),t);class SD extends mu{constructor(e){super(e,!1),Gu(this,"options"),Gu(this,"cursor",0),this.options=e.options,this.cursor=this.options.findIndex(({value:t})=>t===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",t=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}}class OD extends mu{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;const e=this.value.slice(0,this.cursor),[t,...r]=this.value.slice(this.cursor);return`${e}${
|
|
14
|
+
`)),this._prevFrame=e;return}this.output.write(T.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}};class $D extends mu{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",t=>{this.output.write(T.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var xD=Object.defineProperty,kD=(D,e,t)=>e in D?xD(D,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):D[e]=t,Gu=(D,e,t)=>(kD(D,typeof e!="symbol"?e+"":e,t),t);class SD extends mu{constructor(e){super(e,!1),Gu(this,"options"),Gu(this,"cursor",0),this.options=e.options,this.cursor=this.options.findIndex(({value:t})=>t===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",t=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}}class OD extends mu{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;const e=this.value.slice(0,this.cursor),[t,...r]=this.value.slice(this.cursor);return`${e}${l.inverse(t)}${r.join("")}`}get cursor(){return this._cursor}constructor(e){super(e),this.on("finalize",()=>{this.value||(this.value=e.defaultValue)})}}function TD(){return L.platform!=="win32"?L.env.TERM!=="linux":!!L.env.CI||!!L.env.WT_SESSION||!!L.env.TERMINUS_SUBLIME||L.env.ConEmuTask==="{cmd::Cmder}"||L.env.TERM_PROGRAM==="Terminus-Sublime"||L.env.TERM_PROGRAM==="vscode"||L.env.TERM==="xterm-256color"||L.env.TERM==="alacritty"||L.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const fu=TD(),j=(D,e)=>fu?D:e,ID=j("\u25C6","*"),Wu=j("\u25A0","x"),zu=j("\u25B2","x"),du=j("\u25C7","o"),_D=j("\u250C","T"),w=j("\u2502","|"),H=j("\u2514","\u2014"),Bu=j("\u25CF",">"),gu=j("\u25CB"," "),RD=j("\u25CF","\u2022"),jD=j("\u25C6","*"),MD=j("\u25B2","!"),ND=j("\u25A0","x"),bu=D=>{switch(D){case"initial":case"active":return l.cyan(ID);case"cancel":return l.red(Wu);case"error":return l.yellow(zu);case"submit":return l.green(du)}},LD=D=>{const{cursor:e,options:t,style:r}=D,i=D.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),u=Math.min(s,Math.max(i,5));let n=0;e>=n+u-3?n=Math.max(Math.min(e-u+3,t.length-u),0):e<n+2&&(n=Math.max(e-2,0));const a=u<t.length&&n>0,o=u<t.length&&n+u<t.length;return t.slice(n,n+u).map((E,C,c)=>{const b=C===0&&a,m=C===c.length-1&&o;return b||m?l.dim("..."):r(E,C+n===e)})},uu=D=>new OD({validate:D.validate,placeholder:D.placeholder,defaultValue:D.defaultValue,initialValue:D.initialValue,render(){const e=`${l.gray(w)}
|
|
15
15
|
${bu(this.state)} ${D.message}
|
|
16
|
-
`,t=D.placeholder?
|
|
17
|
-
${
|
|
18
|
-
${
|
|
19
|
-
`;case"submit":return`${e}${
|
|
20
|
-
${
|
|
21
|
-
${
|
|
22
|
-
`}}}).prompt(),Yu=D=>{const e=D.active??"Yes",t=D.inactive??"No";return new $D({active:e,inactive:t,initialValue:D.initialValue??!0,render(){const r=`${
|
|
16
|
+
`,t=D.placeholder?l.inverse(D.placeholder[0])+l.dim(D.placeholder.slice(1)):l.inverse(l.hidden("_")),r=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${e.trim()}
|
|
17
|
+
${l.yellow(w)} ${r}
|
|
18
|
+
${l.yellow(H)} ${l.yellow(this.error)}
|
|
19
|
+
`;case"submit":return`${e}${l.gray(w)} ${l.dim(this.value||D.placeholder)}`;case"cancel":return`${e}${l.gray(w)} ${l.strikethrough(l.dim(this.value??""))}${this.value?.trim()?`
|
|
20
|
+
${l.gray(w)}`:""}`;default:return`${e}${l.cyan(w)} ${r}
|
|
21
|
+
${l.cyan(H)}
|
|
22
|
+
`}}}).prompt(),Yu=D=>{const e=D.active??"Yes",t=D.inactive??"No";return new $D({active:e,inactive:t,initialValue:D.initialValue??!0,render(){const r=`${l.gray(w)}
|
|
23
23
|
${bu(this.state)} ${D.message}
|
|
24
|
-
`,i=this.value?e:t;switch(this.state){case"submit":return`${r}${
|
|
25
|
-
${
|
|
26
|
-
${
|
|
27
|
-
`}}}).prompt()},z=D=>{const e=(t,r)=>{const i=t.label??String(t.value);switch(r){case"selected":return`${
|
|
24
|
+
`,i=this.value?e:t;switch(this.state){case"submit":return`${r}${l.gray(w)} ${l.dim(i)}`;case"cancel":return`${r}${l.gray(w)} ${l.strikethrough(l.dim(i))}
|
|
25
|
+
${l.gray(w)}`;default:return`${r}${l.cyan(w)} ${this.value?`${l.green(Bu)} ${e}`:`${l.dim(gu)} ${l.dim(e)}`} ${l.dim("/")} ${this.value?`${l.dim(gu)} ${l.dim(t)}`:`${l.green(Bu)} ${t}`}
|
|
26
|
+
${l.cyan(H)}
|
|
27
|
+
`}}}).prompt()},z=D=>{const e=(t,r)=>{const i=t.label??String(t.value);switch(r){case"selected":return`${l.dim(i)}`;case"active":return`${l.green(Bu)} ${i} ${t.hint?l.dim(`(${t.hint})`):""}`;case"cancelled":return`${l.strikethrough(l.dim(i))}`;default:return`${l.dim(gu)} ${l.dim(i)}`}};return new SD({options:D.options,initialValue:D.initialValue,render(){const t=`${l.gray(w)}
|
|
28
28
|
${bu(this.state)} ${D.message}
|
|
29
|
-
`;switch(this.state){case"submit":return`${t}${
|
|
30
|
-
${
|
|
31
|
-
${
|
|
32
|
-
${
|
|
33
|
-
`}}}).prompt()},B=(D="")=>{process.stdout.write(`${
|
|
29
|
+
`;switch(this.state){case"submit":return`${t}${l.gray(w)} ${e(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${l.gray(w)} ${e(this.options[this.cursor],"cancelled")}
|
|
30
|
+
${l.gray(w)}`;default:return`${t}${l.cyan(w)} ${LD({cursor:this.cursor,options:this.options,maxItems:D.maxItems,style:(r,i)=>e(r,i?"active":"inactive")}).join(`
|
|
31
|
+
${l.cyan(w)} `)}
|
|
32
|
+
${l.cyan(H)}
|
|
33
|
+
`}}}).prompt()},B=(D="")=>{process.stdout.write(`${l.gray(H)} ${l.red(D)}
|
|
34
34
|
|
|
35
|
-
`)},
|
|
36
|
-
`)},PD=(D="")=>{process.stdout.write(`${
|
|
37
|
-
${
|
|
35
|
+
`)},VD=(D="")=>{process.stdout.write(`${l.gray(_D)} ${D}
|
|
36
|
+
`)},PD=(D="")=>{process.stdout.write(`${l.gray(w)}
|
|
37
|
+
${l.gray(H)} ${D}
|
|
38
38
|
|
|
39
|
-
`)},M={message:(D="",{symbol:e=
|
|
40
|
-
`);t.push(`${e} ${r}`,...i.map(s=>`${
|
|
39
|
+
`)},M={message:(D="",{symbol:e=l.gray(w)}={})=>{const t=[`${l.gray(w)}`];if(D){const[r,...i]=D.split(`
|
|
40
|
+
`);t.push(`${e} ${r}`,...i.map(s=>`${l.gray(w)} ${s}`))}process.stdout.write(`${t.join(`
|
|
41
41
|
`)}
|
|
42
|
-
`)},info:D=>{M.message(D,{symbol:
|
|
42
|
+
`)},info:D=>{M.message(D,{symbol:l.blue(RD)})},success:D=>{M.message(D,{symbol:l.green(jD)})},step:D=>{M.message(D,{symbol:l.green(du)})},warn:D=>{M.message(D,{symbol:l.yellow(MD)})},warning:D=>{M.warn(D)},error:D=>{M.message(D,{symbol:l.red(ND)})}};`${l.gray(w)}`;const UD=({indicator:D="dots"}={})=>{const e=fu?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=fu?80:120,r=process.env.CI==="true";let i,s,u=!1,n="",a,o=performance.now();const E=f=>{const S=f>1?"Something went wrong":"Canceled";u&&N(S,f)},C=()=>E(2),c=()=>E(1),b=()=>{process.on("uncaughtExceptionMonitor",C),process.on("unhandledRejection",C),process.on("SIGINT",c),process.on("SIGTERM",c),process.on("exit",E)},m=()=>{process.removeListener("uncaughtExceptionMonitor",C),process.removeListener("unhandledRejection",C),process.removeListener("SIGINT",c),process.removeListener("SIGTERM",c),process.removeListener("exit",E)},F=()=>{if(a===void 0)return;r&&process.stdout.write(`
|
|
43
43
|
`);const f=a.split(`
|
|
44
|
-
`);process.stdout.write(T.cursor.move(-999,f.length-1)),process.stdout.write(T.erase.down(f.length))},
|
|
45
|
-
`);let S=0,
|
|
46
|
-
`):process.stdout.write(`${
|
|
47
|
-
`),m(),i()};return{start:
|
|
48
|
-
GitHub Desktop: https://github.com/apps/desktop`)}}var J=(D=>(D.VisualStudioCode="vscode",D.Cursor="cursor",D.VSCodium="codium",D.Other="other",D))(J||{});async function JD({rootFolder:D,fileToOpen:e}){const t=await z({message:"Which IDE do you want to use?",options:[{value:J.VisualStudioCode,label:"Visual Studio Code"},{value:J.Cursor,label:"Cursor"},{value:J.VSCodium,label:"VSCodium"},{value:J.Other,label:"Other"}],initialValue:J.VisualStudioCode});if(I(t)&&(B("Operation cancelled."),process.exit(0)),t===void 0)return;let r,i;switch(t){case"vscode":i="Opening in Visual Studio Code...",r="code";break;case"cursor":i="Opening in Cursor...",r="cursor";break;case"codium":i="Opening in VSCodium...",r="codium";break;default:return}await au([{title:i,task:async s=>{try{await xu(r);const u=await W(r,[D]);s(u.stdout);const n=await W(r,[`${D}/README.md`]);if(s(n.stdout),e){const a=await W(r,[`${D}/${e}`]);s(a.stdout)}return`Opened project using ${t}`}catch{return`Could not open project using ${t}, since ${t} was not in your PATH`}}}])}var G=(D=>(D[D.VisualNovel=0]="VisualNovel",D[D.TextStory=1]="TextStory",D[D.PointAndClick=2]="PointAndClick",D[D.GameEngine=3]="GameEngine",D))(G||{}),k=(D=>(D[D.Ink=0]="Ink",D[D.Renpy=1]="Renpy",D[D.Typescript=2]="Typescript",D))(k||{}),_=(D=>(D[D.React=0]="React",D[D.Vue=1]="Vue",D[D.Angular=2]="Angular",D))(_||{});const Hu="My Game",Ju="my-game",Z=[{type:G.VisualNovel,name:"Visual Novel",availableUI:[_.React],availableNarrativeLanguages:[k.Ink,k.Typescript]},{type:G.TextStory,name:"Text-based Story",availableUI:[_.React],availableNarrativeLanguages:[k.Ink,k.Typescript]},{type:G.PointAndClick,name:"Point & Click Adventure",availableUI:[_.React],availableNarrativeLanguages:[k.Ink,k.Typescript]},{type:G.GameEngine,name:"Game Engine",availableUI:[],availableNarrativeLanguages:[]}];async function ZD({packageName:D}){const e=await z({message:"Select the type of game you want to create:",options:Z.map(a=>({label:a.name,value:a.type})),initialValue:Z[0].type});I(e)&&(B("Operation cancelled."),process.exit(0));const t=Z.find(a=>a.type===e)?.availableUI.map(a=>{let c="";switch(a){case _.React:c=ou("React");break;case _.Vue:c=WD("Vue");break;case _.Angular:c=GD("Angular");break}return{label:c,value:a}})||[];let r;t.length===1?(M.warning(`Only one UI framework available: ${t[0].label}. Using it by default.`),r=t[0].value):t.length>0?(r=await z({message:"Select the UI framework you want to use:",options:t,initialValue:Z.find(a=>a.type===e)?.availableUI[0]}),I(r)&&(B("Operation cancelled."),process.exit(0))):r=void 0;const i=Z.find(a=>a.type===e)?.availableNarrativeLanguages.map(a=>{let c="";switch(a){case k.Ink:c="Ink + Typescript";break;case k.Renpy:c=zD("Renpy");break;case k.Typescript:c=ou("Typescript");break}return{label:c,value:a}})||[];let s;i.length===1?(M.warning(`Only one narrative language available: ${i[0].label}. Using it by default.`),s=i[0].value):i.length>0?(s=await z({message:"Select the narrative language you want to use:",options:i,initialValue:Z.find(a=>a.type===e)?.availableNarrativeLanguages[0]}),I(s)&&(B("Operation cancelled."),process.exit(0))):s=void 0;const u=await z({message:"Which devices is the project intended for?",options:[{label:"Web page",value:!1},{label:"Web page + Desktop + Mobile (Tauri)",value:!0}],initialValue:!1});I(u)&&(B("Operation cancelled."),process.exit(0));let n;return u?(n=await uu({message:"Project identifier:",initialValue:`com.${D}.app`,validate:a=>{if(!a)return"Identifier is required.";if(!/^[a-zA-Z0-9_.\-]+$/.test(a))return"Identifier can only contain letters, numbers, underscores, dots and dashes."}}),I(n)&&(B("Operation cancelled."),process.exit(0))):n="",{gameType:e,UIFramework:r,narrativeLanguage:s,multidevice:u,identifier:n}}var O=(D=>(D.Delete="delete",D.Overwrite="overwrite",D.Skip="skip",D.Ask="ask",D.Cancel="cancel",D))(O||{});function QD(D){const e=d.readdirSync(D);return e.length===0||e.length===1&&e[0]===".git"}function Zu(D,e,t){if(!d.existsSync(e))return;const r=d.statSync(e);if(r.isFile())(t===O.Overwrite||t===O.Delete)&&d.rmSync(e,{force:!0});else if(r.isDirectory()){const i=d.readdirSync(D);for(const s of i){const u=$.join(D,s),n=$.join(e,s);Zu(u,n,t)}}}function vu(D,e,t){if(d.statSync(D).isDirectory()){d.mkdirSync(e,{recursive:!0});for(const r of d.readdirSync(D)){const i=$.join(D,r),s=$.join(e,r);vu(i,s,t)}}else{if(t!==void 0&&d.existsSync(e)){if(t===O.Skip)return;(t===O.Overwrite||t===O.Delete)&&d.rmSync(e,{force:!0})}d.copyFileSync(D,e)}}function XD(D){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(D)}function Qu(D){return D.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}async function ue(){const D=await uu({message:"Project name:",defaultValue:Hu,placeholder:Hu,validate:u=>{if(!u)return"Project name cannot be empty"}});I(D)&&(B("Operation cancelled."),process.exit(0));const e=await uu({message:"Project description:",defaultValue:"A new game project",placeholder:"A new game project",validate:u=>{if(!u)return"Project description cannot be empty"}});I(e)&&(B("Operation cancelled."),process.exit(0));const t=await uu({message:"Package name:",defaultValue:Qu(Ju),placeholder:Qu(Ju),validate:u=>{if(!u)return"Package name cannot be empty";if(!XD(u))return"Invalid package name. The name can only include URL-friendly characters."}});I(t)&&(B("Operation cancelled."),process.exit(0));const r=$.basename($.resolve()),i=await uu({message:"Target directory:",defaultValue:t,placeholder:`${t} (If is equal to ".", the current directory (${r}) will be used)`});I(i)&&(B("Operation cancelled."),process.exit(0));let s;return d.existsSync(i)&&!QD(i)?(s=await z({message:"Overwrite existing files?",options:[{hint:"Delete all existing files and create a new project",label:"Delete all",value:O.Delete},{hint:"Overwrite existing conflicting files",label:"Overwrite",value:O.Overwrite},{hint:"Skip existing conflicting files",label:"Skip",value:O.Skip},{hint:"Ask for each file",label:"Ask",value:O.Ask},{hint:"Cancel operation",label:"Cancel",value:O.Cancel}],initialValue:O.Overwrite}),(I(s)||s===O.Cancel)&&(B("Operation cancelled."),process.exit(0))):s=void 0,{projectName:D,foltderName:i,description:e,packageName:t,overwrite:s}}const Xu={_gitignore:".gitignore"};async function De({rootFolder:D,overwrite:e,template:t,packageName:r,description:i,projectName:s,identifier:u}){const n=await au([{title:`Creating project in ${D}...`,task:async()=>{d.existsSync(D)||d.mkdirSync(D,{recursive:!0});const a=$.resolve(eD(import.meta.url),"../..",`${t}`),c=(b,m)=>{const F=$.join(D,Xu[b]??b);m?d.writeFileSync(F,m):vu($.join(a,b),F,e)},h=d.readdirSync(a).map(async b=>{const m=$.join(a,b),F=$.join(D,Xu[b]??b);if(d.existsSync(F))switch(e){case O.Ask:if(d.statSync(F).isFile()){const p=await Yu({message:`File ${F} already exists. Do you want to overwrite it?`,initialValue:!1});if(I(p)&&(B("Operation cancelled."),process.exit(0)),!p)return;d.rmSync(F,{force:!0})}else{const p=d.readdirSync(m);for(const x of p){const K=$.join(m,x),N=$.join(F,x);if(d.existsSync(N)){const f=await Yu({message:`File ${N} already exists. Do you want to overwrite it?`,initialValue:!1});if(I(f)&&(B("Operation cancelled."),process.exit(0)),!f)continue;d.rmSync(N,{force:!0})}vu(K,N,e)}return}break;case O.Skip:return;case O.Overwrite:case O.Delete:Zu(m,F,e);break}switch(b){case"package.json":case"vite.config.ts":case"index.html":let p=d.readFileSync(m,"utf-8");p=p.replace(/my-app-package-name/g,r),p=p.replace(/my-app-description/g,i),p=p.replace(/my-app-project-name/g,s),c(b,p);break;case".git":case"package-lock.json":break;default:c(b)}});await Promise.all(h);const C=$.join(D,"src-tauri");if(d.existsSync(C)){const b=d.readdirSync(C).map(async m=>{switch(m){case"Cargo.lock":case"Cargo.toml":case"tauri.conf.json":let F=d.readFileSync($.join(C,m),"utf-8");F=F.replace(/my-app-package-name/g,r),F=F.replace(/my-app-description/g,i),F=F.replace(/my-app-project-name/g,s),F=F.replace(/com.my-app-project-name.app/g,u),c($.join("src-tauri",m),F)}});await Promise.all(b)}const l=$.join(D,"_github");return d.existsSync(l)&&d.renameSync(l,$.join(D,".github")),"Project created"}}]);I(n)&&(B("Operation cancelled."),process.exit(0))}const ee=process.cwd();async function te(){let D,{description:e,overwrite:t,packageName:r,projectName:i,foltderName:s}=await ue(),{UIFramework:u,gameType:n,narrativeLanguage:a,multidevice:c,identifier:h}=await ZD({packageName:r});const C=$.join(ee,s);let l;switch(n){case G.VisualNovel:switch(u){case _.React:switch(a){case k.Typescript:c?l="template-react-vite-muijoy-tauri":l="template-react-vite-muijoy",D="src/labels/startLabel.ts";break;case k.Ink:c?l="template-react-vite-muijoy-ink-tauri":l="template-react-vite-muijoy-ink",D="src/ink/start.ink";break;case k.Renpy:B("Error: There are no templates for this narrative language"),process.exit(0);default:B("Error: Unknown narrative language"),process.exit(0)}break;case _.Vue:case _.Angular:B("Error: There are no templates for this game type and UI framework"),process.exit(0);default:B("Error: Unknown UI framework"),process.exit(0)}break;case G.TextStory:switch(u){case _.React:switch(a){case k.Typescript:c?l="template-story-react-vite-muijoy-tauri":l="template-story-react-vite-muijoy",D="src/labels/startLabel.ts";break;case k.Ink:c?l="template-story-react-vite-muijoy-ink-tauri":l="template-story-react-vite-muijoy-ink",D="src/ink/start.ink";break;case k.Renpy:B("Error: There are no templates for this narrative language"),process.exit(0);default:B("Error: Unknown narrative language"),process.exit(0)}break;case _.Vue:case _.Angular:B("Error: There are no templates for this game type and UI framework"),process.exit(0);default:B("Error: Unknown UI framework"),process.exit(0)}break;case G.PointAndClick:switch(u){case _.React:switch(a){case k.Typescript:c?l="template-nqtr-react-vite-muijoy-tauri":l="template-nqtr-react-vite-muijoy",D="src/labels/startLabel.ts";break;case k.Ink:c?l="template-nqtr-react-vite-muijoy-ink-tauri":l="template-nqtr-react-vite-muijoy-ink",D="src/ink/variousActionsLabels.ink";break;case k.Renpy:B("Error: There are no templates for this narrative language"),process.exit(0);default:B("Error: Unknown narrative language"),process.exit(0)}break;case _.Vue:case _.Angular:B("Error: There are no templates for this game type and UI framework"),process.exit(0);default:B("Error: Unknown UI framework"),process.exit(0)}break;case G.GameEngine:l="template-game-engine",D="src/index.ts";break;default:B("Error: Unknown game type"),process.exit(0)}return await De({rootFolder:C,template:l,packageName:r,description:e,projectName:i,overwrite:t,identifier:h}),{rootFolder:C,fileToOpen:D}}function re(){console.info(`
|
|
44
|
+
`);process.stdout.write(T.cursor.move(-999,f.length-1)),process.stdout.write(T.erase.down(f.length))},h=f=>f.replace(/\.+$/,""),x=f=>{const S=(performance.now()-f)/1e3,v=Math.floor(S/60),p=Math.floor(S%60);return v>0?`[${v}m ${p}s]`:`[${p}s]`},q=(f="")=>{u=!0,i=AD(),n=h(f),o=performance.now(),process.stdout.write(`${l.gray(w)}
|
|
45
|
+
`);let S=0,v=0;b(),s=setInterval(()=>{if(r&&n===a)return;F(),a=n;const p=l.magenta(e[S]);if(r)process.stdout.write(`${p} ${n}...`);else if(D==="timer")process.stdout.write(`${p} ${n} ${x(o)}`);else{const y=".".repeat(Math.floor(v)).slice(0,3);process.stdout.write(`${p} ${n}${y}`)}S=S+1<e.length?S+1:0,v=v<e.length?v+.125:0},t)},N=(f="",S=0)=>{u=!1,clearInterval(s),F();const v=S===0?l.green(du):S===1?l.red(Wu):l.red(zu);n=h(f??n),D==="timer"?process.stdout.write(`${v} ${n} ${x(o)}
|
|
46
|
+
`):process.stdout.write(`${v} ${n}
|
|
47
|
+
`),m(),i()};return{start:q,stop:N,message:(f="")=>{n=h(f??n)}}},au=async D=>{for(const e of D){if(e.enabled===!1)continue;const t=UD();t.start(e.title);const r=await e.task(t.message);t.stop(r||e.title)}};let Y=!0;const J=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Du=0;if(J.process&&J.process.env&&J.process.stdout){const{FORCE_COLOR:D,NODE_DISABLE_COLORS:e,NO_COLOR:t,TERM:r,COLORTERM:i}=J.process.env;e||t||D==="0"?Y=!1:D==="1"||D==="2"||D==="3"?Y=!0:r==="dumb"?Y=!1:"CI"in J.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(s=>s in J.process.env)?Y=!0:Y=process.stdout.isTTY,Y&&(process.platform==="win32"||i&&(i==="truecolor"||i==="24bit")?Du=3:r&&(r.endsWith("-256color")||r.endsWith("256"))?Du=2:Du=1)}let Ku={enabled:Y,supportLevel:Du};function nu(D,e,t=1){const r=`\x1B[${D}m`,i=`\x1B[${e}m`,s=new RegExp(`\\x1b\\[${e}m`,"g");return u=>Ku.enabled&&Ku.supportLevel>=t?r+(""+u).replace(s,r)+i:""+u}const GD=nu(31,39),ou=nu(36,39),WD=nu(90,39),zD=nu(91,39);var vu,qu;function YD(){if(qu)return vu;qu=1;function D(r,i){var s=r;i.slice(0,-1).forEach(function(n){s=s[n]||{}});var u=i[i.length-1];return u in s}function e(r){return typeof r=="number"||/^0x[0-9a-f]+$/i.test(r)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(r)}function t(r,i){return i==="constructor"&&typeof r[i]=="function"||i==="__proto__"}return vu=function(r,i){i||(i={});var s={bools:{},strings:{},unknownFn:null};typeof i.unknown=="function"&&(s.unknownFn=i.unknown),typeof i.boolean=="boolean"&&i.boolean?s.allBools=!0:[].concat(i.boolean).filter(Boolean).forEach(function(p){s.bools[p]=!0});var u={};function n(p){return u[p].some(function(y){return s.bools[y]})}Object.keys(i.alias||{}).forEach(function(p){u[p]=[].concat(i.alias[p]),u[p].forEach(function(y){u[y]=[p].concat(u[p].filter(function(U){return y!==U}))})}),[].concat(i.string).filter(Boolean).forEach(function(p){s.strings[p]=!0,u[p]&&[].concat(u[p]).forEach(function(y){s.strings[y]=!0})});var a=i.default||{},o={_:[]};function E(p,y){return s.allBools&&/^--[^=]+$/.test(y)||s.strings[p]||s.bools[p]||u[p]}function C(p,y,U){for(var g=p,Q=0;Q<y.length-1;Q++){var P=y[Q];if(t(g,P))return;g[P]===void 0&&(g[P]={}),(g[P]===Object.prototype||g[P]===Number.prototype||g[P]===String.prototype)&&(g[P]={}),g[P]===Array.prototype&&(g[P]=[]),g=g[P]}var G=y[y.length-1];t(g,G)||((g===Object.prototype||g===Number.prototype||g===String.prototype)&&(g={}),g===Array.prototype&&(g=[]),g[G]===void 0||s.bools[G]||typeof g[G]=="boolean"?g[G]=U:Array.isArray(g[G])?g[G].push(U):g[G]=[g[G],U])}function c(p,y,U){if(!(U&&s.unknownFn&&!E(p,U)&&s.unknownFn(U)===!1)){var g=!s.strings[p]&&e(y)?Number(y):y;C(o,p.split("."),g),(u[p]||[]).forEach(function(Q){C(o,Q.split("."),g)})}}Object.keys(s.bools).forEach(function(p){c(p,a[p]===void 0?!1:a[p])});var b=[];r.indexOf("--")!==-1&&(b=r.slice(r.indexOf("--")+1),r=r.slice(0,r.indexOf("--")));for(var m=0;m<r.length;m++){var F=r[m],h,x;if(/^--.+=/.test(F)){var q=F.match(/^--([^=]+)=([\s\S]*)$/);h=q[1];var N=q[2];s.bools[h]&&(N=N!=="false"),c(h,N,F)}else if(/^--no-.+/.test(F))h=F.match(/^--no-(.+)/)[1],c(h,!1,F);else if(/^--.+/.test(F))h=F.match(/^--(.+)/)[1],x=r[m+1],x!==void 0&&!/^(-|--)[^-]/.test(x)&&!s.bools[h]&&!s.allBools&&(!u[h]||!n(h))?(c(h,x,F),m+=1):/^(true|false)$/.test(x)?(c(h,x==="true",F),m+=1):c(h,s.strings[h]?"":!0,F);else if(/^-[^-]+/.test(F)){for(var f=F.slice(1,-1).split(""),S=!1,v=0;v<f.length;v++){if(x=F.slice(v+2),x==="-"){c(f[v],x,F);continue}if(/[A-Za-z]/.test(f[v])&&x[0]==="="){c(f[v],x.slice(1),F),S=!0;break}if(/[A-Za-z]/.test(f[v])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(x)){c(f[v],x,F),S=!0;break}if(f[v+1]&&f[v+1].match(/\W/)){c(f[v],F.slice(v+2),F),S=!0;break}else c(f[v],s.strings[f[v]]?"":!0,F)}h=F.slice(-1)[0],!S&&h!=="-"&&(r[m+1]&&!/^(-|--)[^-]/.test(r[m+1])&&!s.bools[h]&&(!u[h]||!n(h))?(c(h,r[m+1],F),m+=1):r[m+1]&&/^(true|false)$/.test(r[m+1])?(c(h,r[m+1]==="true",F),m+=1):c(h,s.strings[h]?"":!0,F))}else if((!s.unknownFn||s.unknownFn(F)!==!1)&&o._.push(s.strings._||!e(F)?F:Number(F)),i.stopEarly){o._.push.apply(o._,r.slice(m+1));break}}return Object.keys(a).forEach(function(p){D(o,p.split("."))||(C(o,p.split("."),a[p]),(u[p]||[]).forEach(function(y){C(o,y.split("."),a[p])}))}),i["--"]?o["--"]=b.slice():b.forEach(function(p){o._.push(p)}),o},vu}var KD=YD();const qD=ku(KD);async function HD({rootFolder:D}){const e=$.join(D,".git");try{if(d.existsSync(e)){M.warn("Git repository already exists.");return}}catch(r){M.error(`Error checking git folder: ${r}`);return}const t=await z({message:"Do you want to initialize a git repository? (recommended)",options:[{value:!0,label:"Yes",hint:"You can use GitHub to track changes and collaborate with others."},{value:!1,label:"No",hint:"It is not recommended to skip this step."}],initialValue:!0});if(I(t)&&(B("Operation cancelled."),process.exit(0)),t){const r=await au([{title:"Initializing git repository...",task:async i=>{const s=await W("git",["init","-b","main"],{cwd:D});i(s.stdout);const u=await W("git",["add","."],{cwd:D});return i(u.stdout),"Git repository initialized."}}]);I(r)&&(B("Operation cancelled."),process.exit(0)),M.message(`Now, you can use GitHub Desktop upload your project to GitHub.
|
|
48
|
+
GitHub Desktop: https://github.com/apps/desktop`)}}var Z=(D=>(D.VisualStudioCode="vscode",D.Cursor="cursor",D.VSCodium="codium",D.Other="other",D))(Z||{});async function JD({rootFolder:D,fileToOpen:e}){const t=await z({message:"Which IDE do you want to use?",options:[{value:Z.VisualStudioCode,label:"Visual Studio Code"},{value:Z.Cursor,label:"Cursor"},{value:Z.VSCodium,label:"VSCodium"},{value:Z.Other,label:"Other"}],initialValue:Z.VisualStudioCode});if(I(t)&&(B("Operation cancelled."),process.exit(0)),t===void 0)return;let r,i;switch(t){case"vscode":i="Opening in Visual Studio Code...",r="code";break;case"cursor":i="Opening in Cursor...",r="cursor";break;case"codium":i="Opening in VSCodium...",r="codium";break;default:return}await au([{title:i,task:async s=>{try{await xu(r);const u=await W(r,[D]);s(u.stdout);const n=await W(r,[`${D}/README.md`]);if(s(n.stdout),e){const a=await W(r,[`${D}/${e}`]);s(a.stdout)}return`Opened project using ${t}`}catch{return`Could not open project using ${t}, since ${t} was not in your PATH`}}}])}var V=(D=>(D[D.VisualNovel=0]="VisualNovel",D[D.TextStory=1]="TextStory",D[D.PointAndClick=2]="PointAndClick",D[D.GameEngine=3]="GameEngine",D[D.Library=4]="Library",D))(V||{}),k=(D=>(D[D.Ink=0]="Ink",D[D.Renpy=1]="Renpy",D[D.Typescript=2]="Typescript",D))(k||{}),_=(D=>(D[D.React=0]="React",D[D.Vue=1]="Vue",D[D.Angular=2]="Angular",D))(_||{});const Hu="My Game",Ju="my-game",K=[{type:V.VisualNovel,name:"Visual Novel",availableUI:[_.React],availableNarrativeLanguages:[k.Ink,k.Typescript],isMultidevice:!0},{type:V.TextStory,name:"Text-based Story",availableUI:[_.React],availableNarrativeLanguages:[k.Ink,k.Typescript],isMultidevice:!0},{type:V.PointAndClick,name:"Point & Click Adventure",availableUI:[_.React],availableNarrativeLanguages:[k.Ink,k.Typescript],isMultidevice:!0},{type:V.GameEngine,name:"Game Engine",availableUI:[],availableNarrativeLanguages:[],isMultidevice:!1},{type:V.Library,name:"Library",availableUI:[],availableNarrativeLanguages:[],isMultidevice:!1}];async function ZD({packageName:D}){const e=await z({message:"Select the type of game you want to create:",options:K.map(o=>({label:o.name,value:o.type})),initialValue:K[0].type});I(e)&&(B("Operation cancelled."),process.exit(0));const t=K.find(o=>o.type===e)?.availableUI.map(o=>{let E="";switch(o){case _.React:E=ou("React");break;case _.Vue:E=WD("Vue");break;case _.Angular:E=GD("Angular");break}return{label:E,value:o}})||[];let r;t.length===1?(M.warning(`Only one UI framework available: ${t[0].label}. Using it by default.`),r=t[0].value):t.length>0?(r=await z({message:"Select the UI framework you want to use:",options:t,initialValue:K.find(o=>o.type===e)?.availableUI[0]}),I(r)&&(B("Operation cancelled."),process.exit(0))):r=void 0;const i=K.find(o=>o.type===e)?.availableNarrativeLanguages.map(o=>{let E="";switch(o){case k.Ink:E="Ink + Typescript";break;case k.Renpy:E=zD("Renpy");break;case k.Typescript:E=ou("Typescript");break}return{label:E,value:o}})||[];let s;i.length===1?(M.warning(`Only one narrative language available: ${i[0].label}. Using it by default.`),s=i[0].value):i.length>0?(s=await z({message:"Select the narrative language you want to use:",options:i,initialValue:K.find(o=>o.type===e)?.availableNarrativeLanguages[0]}),I(s)&&(B("Operation cancelled."),process.exit(0))):s=void 0;const u=K.find(o=>o.type===e)?.isMultidevice;let n=!1,a="";return u&&(n=await z({message:"Which devices is the project intended for?",options:[{label:"Web page",value:!1},{label:"Web page + Desktop + Mobile (Tauri)",value:!0}],initialValue:!1}),I(n)&&(B("Operation cancelled."),process.exit(0)),n?(a=await uu({message:"Project identifier:",initialValue:`com.${D}.app`,validate:o=>{if(!o)return"Identifier is required.";if(!/^[a-zA-Z0-9_.\-]+$/.test(o))return"Identifier can only contain letters, numbers, underscores, dots and dashes."}}),I(a)&&(B("Operation cancelled."),process.exit(0))):a=""),{gameType:e,UIFramework:r,narrativeLanguage:s,multidevice:n,identifier:a}}var O=(D=>(D.Delete="delete",D.Overwrite="overwrite",D.Skip="skip",D.Ask="ask",D.Cancel="cancel",D))(O||{});function QD(D){const e=d.readdirSync(D);return e.length===0||e.length===1&&e[0]===".git"}function Zu(D,e,t){if(!d.existsSync(e))return;const r=d.statSync(e);if(r.isFile())(t===O.Overwrite||t===O.Delete)&&d.rmSync(e,{force:!0});else if(r.isDirectory()){const i=d.readdirSync(D);for(const s of i){const u=$.join(D,s),n=$.join(e,s);Zu(u,n,t)}}}function Au(D,e,t){if(d.statSync(D).isDirectory()){d.mkdirSync(e,{recursive:!0});for(const r of d.readdirSync(D)){const i=$.join(D,r),s=$.join(e,r);Au(i,s,t)}}else{if(t!==void 0&&d.existsSync(e)){if(t===O.Skip)return;(t===O.Overwrite||t===O.Delete)&&d.rmSync(e,{force:!0})}d.copyFileSync(D,e)}}function XD(D){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(D)}function Qu(D){return D.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}async function ue(){const D=await uu({message:"Project name:",defaultValue:Hu,placeholder:Hu,validate:u=>{if(!u)return"Project name cannot be empty"}});I(D)&&(B("Operation cancelled."),process.exit(0));const e=await uu({message:"Project description:",defaultValue:"A new game project",placeholder:"A new game project",validate:u=>{if(!u)return"Project description cannot be empty"}});I(e)&&(B("Operation cancelled."),process.exit(0));const t=await uu({message:"Package name:",defaultValue:Qu(Ju),placeholder:Qu(Ju),validate:u=>{if(!u)return"Package name cannot be empty";if(!XD(u))return"Invalid package name. The name can only include URL-friendly characters."}});I(t)&&(B("Operation cancelled."),process.exit(0));const r=$.basename($.resolve()),i=await uu({message:"Target directory:",defaultValue:t,placeholder:`${t} (If is equal to ".", the current directory (${r}) will be used)`});I(i)&&(B("Operation cancelled."),process.exit(0));let s;return d.existsSync(i)&&!QD(i)?(s=await z({message:"Overwrite existing files?",options:[{hint:"Delete all existing files and create a new project",label:"Delete all",value:O.Delete},{hint:"Overwrite existing conflicting files",label:"Overwrite",value:O.Overwrite},{hint:"Skip existing conflicting files",label:"Skip",value:O.Skip},{hint:"Ask for each file",label:"Ask",value:O.Ask},{hint:"Cancel operation",label:"Cancel",value:O.Cancel}],initialValue:O.Overwrite}),(I(s)||s===O.Cancel)&&(B("Operation cancelled."),process.exit(0))):s=void 0,{projectName:D,foltderName:i,description:e,packageName:t,overwrite:s}}const Xu={_gitignore:".gitignore"};async function De({rootFolder:D,overwrite:e,template:t,packageName:r,description:i,projectName:s,identifier:u}){const n=await au([{title:`Creating project in ${D}...`,task:async()=>{d.existsSync(D)||d.mkdirSync(D,{recursive:!0});const a=$.resolve(eD(import.meta.url),"../..",`${t}`),o=(b,m)=>{const F=$.join(D,Xu[b]??b);m?d.writeFileSync(F,m):Au($.join(a,b),F,e)},E=d.readdirSync(a).map(async b=>{const m=$.join(a,b),F=$.join(D,Xu[b]??b);if(d.existsSync(F))switch(e){case O.Ask:if(d.statSync(F).isFile()){const h=await Yu({message:`File ${F} already exists. Do you want to overwrite it?`,initialValue:!1});if(I(h)&&(B("Operation cancelled."),process.exit(0)),!h)return;d.rmSync(F,{force:!0})}else{const h=d.readdirSync(m);for(const x of h){const q=$.join(m,x),N=$.join(F,x);if(d.existsSync(N)){const f=await Yu({message:`File ${N} already exists. Do you want to overwrite it?`,initialValue:!1});if(I(f)&&(B("Operation cancelled."),process.exit(0)),!f)continue;d.rmSync(N,{force:!0})}Au(q,N,e)}return}break;case O.Skip:return;case O.Overwrite:case O.Delete:Zu(m,F,e);break}switch(b){case"package.json":case"vite.config.ts":case"index.html":let h=d.readFileSync(m,"utf-8");h=h.replace(/my-app-package-name/g,r),h=h.replace(/my-app-description/g,i),h=h.replace(/my-app-project-name/g,s),o(b,h);break;case".git":case"package-lock.json":break;default:o(b)}});await Promise.all(E);const C=$.join(D,"src-tauri");if(d.existsSync(C)){const b=d.readdirSync(C).map(async m=>{switch(m){case"Cargo.lock":case"Cargo.toml":case"tauri.conf.json":let F=d.readFileSync($.join(C,m),"utf-8");F=F.replace(/my-app-package-name/g,r),F=F.replace(/my-app-description/g,i),F=F.replace(/my-app-project-name/g,s),F=F.replace(/com.my-app-project-name.app/g,u),o($.join("src-tauri",m),F)}});await Promise.all(b)}const c=$.join(D,"_github");return d.existsSync(c)&&d.renameSync(c,$.join(D,".github")),"Project created"}}]);I(n)&&(B("Operation cancelled."),process.exit(0))}const ee=process.cwd();async function te(){let D,{description:e,overwrite:t,packageName:r,projectName:i,foltderName:s}=await ue(),{UIFramework:u,gameType:n,narrativeLanguage:a,multidevice:o,identifier:E}=await ZD({packageName:r});const C=$.join(ee,s);let c;switch(n){case V.VisualNovel:switch(u){case _.React:switch(a){case k.Typescript:o?c="template-react-vite-muijoy-tauri":c="template-react-vite-muijoy",D="src/labels/startLabel.ts";break;case k.Ink:o?c="template-react-vite-muijoy-ink-tauri":c="template-react-vite-muijoy-ink",D="src/ink/start.ink";break;case k.Renpy:B("Error: There are no templates for this narrative language"),process.exit(0);default:B("Error: Unknown narrative language"),process.exit(0)}break;case _.Vue:case _.Angular:B("Error: There are no templates for this game type and UI framework"),process.exit(0);default:B("Error: Unknown UI framework"),process.exit(0)}break;case V.TextStory:switch(u){case _.React:switch(a){case k.Typescript:o?c="template-story-react-vite-muijoy-tauri":c="template-story-react-vite-muijoy",D="src/labels/startLabel.ts";break;case k.Ink:o?c="template-story-react-vite-muijoy-ink-tauri":c="template-story-react-vite-muijoy-ink",D="src/ink/start.ink";break;case k.Renpy:B("Error: There are no templates for this narrative language"),process.exit(0);default:B("Error: Unknown narrative language"),process.exit(0)}break;case _.Vue:case _.Angular:B("Error: There are no templates for this game type and UI framework"),process.exit(0);default:B("Error: Unknown UI framework"),process.exit(0)}break;case V.PointAndClick:switch(u){case _.React:switch(a){case k.Typescript:o?c="template-nqtr-react-vite-muijoy-tauri":c="template-nqtr-react-vite-muijoy",D="src/labels/startLabel.ts";break;case k.Ink:o?c="template-nqtr-react-vite-muijoy-ink-tauri":c="template-nqtr-react-vite-muijoy-ink",D="src/ink/variousActionsLabels.ink";break;case k.Renpy:B("Error: There are no templates for this narrative language"),process.exit(0);default:B("Error: Unknown narrative language"),process.exit(0)}break;case _.Vue:case _.Angular:B("Error: There are no templates for this game type and UI framework"),process.exit(0);default:B("Error: Unknown UI framework"),process.exit(0)}break;case V.GameEngine:c="template-game-engine",D="src/index.ts";break;case V.Library:c="template-lib",D="src/index.ts";break;default:B("Error: Unknown game type"),process.exit(0)}return await De({rootFolder:C,template:c,packageName:r,description:e,projectName:i,overwrite:t,identifier:E}),{rootFolder:C,fileToOpen:D}}function re(){console.info(`
|
|
49
49
|
\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557
|
|
50
50
|
\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551
|
|
51
51
|
\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551
|
|
@@ -61,7 +61,7 @@ Options:
|
|
|
61
61
|
-t, --template NAME use a specific template
|
|
62
62
|
|
|
63
63
|
Available templates:
|
|
64
|
-
${ou("basic-visual-novel react")}`;async function ne(){try{if(re(),
|
|
64
|
+
${ou("basic-visual-novel react")}`;async function ne(){try{if(re(),VD(`Welcome to ${ou("Pixi\u2019VN")}! \u{1F3A8}\u2728`),se.help){console.log(ae);return}const{rootFolder:D,fileToOpen:e}=await te();await HD({rootFolder:D});const t=ie(process.env.npm_config_user_agent),r=t?t.name:"npm",i=$.relative(uD,D);await JD({rootFolder:D,fileToOpen:e}),await au([{title:"Installing dependencies...",task:async u=>{try{await xu(r),r==="yarn"?await W("yarn",[],{cwd:D}):await W(r,["install"],{cwd:D})}catch{return`Could not use ${r} to install dependencies`}return"Dependencies installed."}}]),M.message("Refer to the README.md file for detailed information about the project.");let s="To run the game:";switch(D!==uD&&(s+=`
|
|
65
65
|
cd ${i.includes(" ")?`"${i}"`:i}`),r){case"yarn":s+=`
|
|
66
66
|
yarn dev`;break;default:s+=`
|
|
67
67
|
${r} run start`;break}M.message(s),PD("You're all set! \u{1F389} Now go build your game! \u{1F680}"),console.log()}catch(D){console.error(D)}}ne().catch(D=>{console.error(D)});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pixi-vn",
|
|
3
3
|
"description": "Create a new Pixi’VN project",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.15",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "GPL-3.0",
|
|
7
7
|
"author": "DRincs-Productions",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"template-nqtr-react-vite-muijoy-ink",
|
|
26
26
|
"template-nqtr-react-vite-muijoy-ink-tauri",
|
|
27
27
|
"template-nqtr-react-vite-muijoy-tauri",
|
|
28
|
+
"template-lib",
|
|
28
29
|
"dist"
|
|
29
30
|
],
|
|
30
31
|
"scripts": {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
env: { browser: true, es2020: true },
|
|
4
|
+
extends: [
|
|
5
|
+
'eslint:recommended',
|
|
6
|
+
'plugin:@typescript-eslint/recommended',
|
|
7
|
+
'plugin:react-hooks/recommended',
|
|
8
|
+
],
|
|
9
|
+
ignorePatterns: ['dist', '.eslintrc.cjs'],
|
|
10
|
+
parser: '@typescript-eslint/parser',
|
|
11
|
+
plugins: ['react-refresh'],
|
|
12
|
+
rules: {
|
|
13
|
+
'react-refresh/only-export-components': [
|
|
14
|
+
'warn',
|
|
15
|
+
{ allowConstantExport: true },
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
"prefer-const": ["error", {
|
|
19
|
+
"destructuring": "all",
|
|
20
|
+
"ignoreReadBeforeAssign": true
|
|
21
|
+
}],
|
|
22
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Formatter
|
|
3
|
+
"[typescript]": {
|
|
4
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
5
|
+
"editor.formatOnSave": true
|
|
6
|
+
},
|
|
7
|
+
"[javascript]": {
|
|
8
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
9
|
+
"editor.formatOnSave": true
|
|
10
|
+
},
|
|
11
|
+
"prettier.jsxSingleQuote": true,
|
|
12
|
+
"prettier.printWidth": 120,
|
|
13
|
+
"prettier.useTabs": false,
|
|
14
|
+
"prettier.singleAttributePerLine": false,
|
|
15
|
+
"prettier.tabWidth": 4,
|
|
16
|
+
// reorganise imports
|
|
17
|
+
"editor.codeActionsOnSave": {
|
|
18
|
+
"source.organizeImports": "explicit"
|
|
19
|
+
},
|
|
20
|
+
// references
|
|
21
|
+
"javascript.referencesCodeLens.enabled": true,
|
|
22
|
+
"javascript.referencesCodeLens.showOnAllFunctions": true,
|
|
23
|
+
"typescript.referencesCodeLens.enabled": true,
|
|
24
|
+
"typescript.referencesCodeLens.showOnAllFunctions": true,
|
|
25
|
+
// move file
|
|
26
|
+
"javascript.updateImportsOnFileMove.enabled": "always",
|
|
27
|
+
"typescript.updateImportsOnFileMove.enabled": "always",
|
|
28
|
+
// olther
|
|
29
|
+
"extensions.ignoreRecommendations": false,
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Pixi’VN Library Template (tsup + Vitest)
|
|
2
|
+
|
|
3
|
+
This is a template repository for creating visual novel libraries using PixiJS, bundled with `tsup` and tested with `Vitest`. It provides a basic structure to get you started quickly with your own Pixi’VN library.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- TypeScript support for type safety and modern JavaScript features.
|
|
8
|
+
- Bundling with `tsup` for efficient and optimized builds.
|
|
9
|
+
- Testing with `Vitest` for reliable and maintainable code.
|
|
10
|
+
- Pre-configured scripts for building and testing your library.
|
|
11
|
+
- Post-build script to replace Pixi.js imports with Pixi’VN compatible imports.
|
|
12
|
+
- Ready-to-use `package.json` with essential dependencies and configurations.
|
|
13
|
+
- Example source files to demonstrate library structure and usage.
|
|
14
|
+
- GitHub Actions workflow for automated testing on push and pull requests.
|
|
15
|
+
- ESLint configuration for maintaining code quality and consistency.
|
|
16
|
+
- Prettier configuration for consistent code formatting.
|
|
17
|
+
- .gitignore file to exclude unnecessary files from version control.
|
|
18
|
+
|
|
19
|
+
## How build
|
|
20
|
+
|
|
21
|
+
To build the library, run the following command:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run build
|
|
25
|
+
```
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Node.js Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags:
|
|
9
|
+
- 'v*'
|
|
10
|
+
|
|
11
|
+
run-name: Deploy to ${{ inputs.deploy_target }} by @${{ github.actor }}
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
name: Build
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v3
|
|
19
|
+
- uses: actions/setup-node@v3
|
|
20
|
+
with:
|
|
21
|
+
node-version: 20
|
|
22
|
+
- run: npm i
|
|
23
|
+
- run: npm ci
|
|
24
|
+
- run: npm run build
|
|
25
|
+
- run: npm test
|
|
26
|
+
|
|
27
|
+
publish-npm:
|
|
28
|
+
name: Publish to NPM
|
|
29
|
+
needs: build
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v3
|
|
33
|
+
- uses: actions/setup-node@v3
|
|
34
|
+
with:
|
|
35
|
+
node-version: 20
|
|
36
|
+
registry-url: https://registry.npmjs.org/
|
|
37
|
+
- run: |
|
|
38
|
+
npm i
|
|
39
|
+
npm ci
|
|
40
|
+
npm run build
|
|
41
|
+
- run: npm publish -f
|
|
42
|
+
env:
|
|
43
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
44
|
+
|
|
45
|
+
create-release:
|
|
46
|
+
name: Create Release
|
|
47
|
+
needs: publish-npm
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
permissions:
|
|
50
|
+
contents: write
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v3
|
|
53
|
+
- uses: ncipollo/release-action@v1
|
|
54
|
+
with:
|
|
55
|
+
body: "Release ${{ github.ref }}"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist
|
|
12
|
+
dist-ssr
|
|
13
|
+
*.local
|
|
14
|
+
|
|
15
|
+
# Editor directories and files
|
|
16
|
+
.idea
|
|
17
|
+
.DS_Store
|
|
18
|
+
*.suo
|
|
19
|
+
*.ntvs*
|
|
20
|
+
*.njsproj
|
|
21
|
+
*.sln
|
|
22
|
+
*.sw?
|
|
23
|
+
package-lock.json
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-app-package-name",
|
|
3
|
+
"description": "my-app-description",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build:post": "node scripts/replace-pixi.js",
|
|
14
|
+
"build": "tsup --config tsup.config.ts && npm run build:post",
|
|
15
|
+
"test": "vitest"
|
|
16
|
+
},
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.mjs",
|
|
21
|
+
"require": "./dist/index.cjs",
|
|
22
|
+
"default": "./dist/index.mjs"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@esotericsoftware/spine-pixi-v8": "^4.2.96",
|
|
27
|
+
"@types/crypto-js": "^4.2.2",
|
|
28
|
+
"crypto-js": "^4.2.0",
|
|
29
|
+
"jsdom": "^27.0.0",
|
|
30
|
+
"ts-node": "^10.9.2",
|
|
31
|
+
"tsup": "^8.5.0",
|
|
32
|
+
"typescript": "^5.9.3"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@drincs/pixi-vn": ">=1.3.31",
|
|
36
|
+
"pixi.js": ">=8.0.0"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"game",
|
|
40
|
+
"js",
|
|
41
|
+
"novel",
|
|
42
|
+
"pixi",
|
|
43
|
+
"pixi-vn",
|
|
44
|
+
"visual",
|
|
45
|
+
"visual-novel"
|
|
46
|
+
],
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"vitest": "^3.2.4"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
|
|
4
|
+
const DIST_DIR = path.resolve("dist");
|
|
5
|
+
|
|
6
|
+
function walk(dir) {
|
|
7
|
+
const files = fs.readdirSync(dir);
|
|
8
|
+
for (const file of files) {
|
|
9
|
+
const fullPath = path.join(dir, file);
|
|
10
|
+
const stat = fs.statSync(fullPath);
|
|
11
|
+
|
|
12
|
+
if (stat.isDirectory()) {
|
|
13
|
+
walk(fullPath);
|
|
14
|
+
} else if (/\.(js|mjs|cjs|d\.ts)$/.test(file)) {
|
|
15
|
+
let content = fs.readFileSync(fullPath, "utf8");
|
|
16
|
+
|
|
17
|
+
const replaced = content.replace(
|
|
18
|
+
/(['"])pixi\.js(\/[^'"]*)?\1/g,
|
|
19
|
+
(_, quote, subpath = "") => `${quote}@drincs/pixi-vn/pixi.js${subpath}${quote}`
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
if (replaced !== content) {
|
|
23
|
+
fs.writeFileSync(fullPath, replaced, "utf8");
|
|
24
|
+
console.log(`✔ patched: ${fullPath}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
walk(DIST_DIR);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./utils";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export async function example() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { example } from "./example";
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
4
|
+
|
|
5
|
+
/* Projects */
|
|
6
|
+
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
|
7
|
+
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
8
|
+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
|
9
|
+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
10
|
+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
11
|
+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
12
|
+
|
|
13
|
+
/* Language and Environment */
|
|
14
|
+
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
|
15
|
+
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
16
|
+
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
17
|
+
"experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
|
18
|
+
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
19
|
+
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
20
|
+
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
21
|
+
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
|
22
|
+
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
|
23
|
+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
24
|
+
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
25
|
+
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
26
|
+
|
|
27
|
+
/* Modules */
|
|
28
|
+
"module": "commonjs", /* Specify what module code is generated. */
|
|
29
|
+
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
30
|
+
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
|
31
|
+
"baseUrl": ".", /* Specify the base directory to resolve non-relative module names. */
|
|
32
|
+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
33
|
+
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
34
|
+
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
|
35
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
36
|
+
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
37
|
+
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|
|
38
|
+
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
|
39
|
+
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
|
40
|
+
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
|
41
|
+
// "resolveJsonModule": true, /* Enable importing .json files. */
|
|
42
|
+
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
|
43
|
+
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
44
|
+
|
|
45
|
+
/* JavaScript Support */
|
|
46
|
+
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
47
|
+
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
48
|
+
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
49
|
+
|
|
50
|
+
/* Emit */
|
|
51
|
+
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
52
|
+
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
53
|
+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
54
|
+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
55
|
+
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
56
|
+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
|
57
|
+
"outDir": "dist", /* Specify an output folder for all emitted files. */
|
|
58
|
+
// "removeComments": true, /* Disable emitting comments. */
|
|
59
|
+
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
60
|
+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
61
|
+
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
|
62
|
+
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
63
|
+
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
64
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
65
|
+
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
66
|
+
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
67
|
+
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
68
|
+
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
|
69
|
+
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
|
70
|
+
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
71
|
+
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
|
72
|
+
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
73
|
+
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
74
|
+
|
|
75
|
+
/* Interop Constraints */
|
|
76
|
+
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
77
|
+
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
|
78
|
+
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
79
|
+
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
|
80
|
+
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
81
|
+
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
|
82
|
+
|
|
83
|
+
/* Type Checking */
|
|
84
|
+
"strict": true, /* Enable all strict type-checking options. */
|
|
85
|
+
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
86
|
+
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
87
|
+
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
88
|
+
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
|
89
|
+
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
90
|
+
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
91
|
+
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
92
|
+
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
93
|
+
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
94
|
+
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
95
|
+
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
96
|
+
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
97
|
+
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
98
|
+
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
|
99
|
+
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
100
|
+
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
101
|
+
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
102
|
+
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
103
|
+
|
|
104
|
+
/* Completeness */
|
|
105
|
+
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
106
|
+
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// tsup.config.ts per l'index
|
|
2
|
+
import { defineConfig } from "tsup";
|
|
3
|
+
|
|
4
|
+
// https://dev.to/orabazu/how-to-bundle-a-tree-shakable-typescript-library-with-tsup-and-publish-with-npm-3c46
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
target: "es2020",
|
|
7
|
+
entry: {
|
|
8
|
+
index: "src/index.ts",
|
|
9
|
+
},
|
|
10
|
+
format: ["cjs", "esm"], // Build for commonJS and ESmodules
|
|
11
|
+
dts: true, // Generate declaration file (.d.ts)
|
|
12
|
+
treeshake: true,
|
|
13
|
+
// sourcemap: true, // Generate sourcemap, it was removed because otherwise it would explode
|
|
14
|
+
clean: true,
|
|
15
|
+
minify: true,
|
|
16
|
+
bundle: true,
|
|
17
|
+
skipNodeModulesBundle: false, // Skip bundling of node_modules
|
|
18
|
+
external: ["@drincs/pixi-vn", "pixi.js"],
|
|
19
|
+
outExtension({ format }) {
|
|
20
|
+
return {
|
|
21
|
+
js: format === "esm" ? ".mjs" : ".cjs",
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
});
|