@zd~/iconfont-cli
Version:
一个基于 Iconfont 自动生成 React/Vue 组件的 CLI 工具,免除字体依赖,提供多种实现方式,支持 TaroJS 和 UniApp。
2 lines • 44 kB
JavaScript
;var u=Object.create,D=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,r=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty,s=(u,D)=>function(){return D||(0,u[t(u)[0]])((D={exports:{}}).exports,D),D.exports},i=(s,i,n)=>(n=null!=s?u(r(s)):{},((u,r,s,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let n of t(r))F.call(u,n)||n===s||D(u,n,{get:()=>r[n],enumerable:!(i=e(r,n))||i.enumerable});return u})(!i&&s&&s.__esModule?n:D(n,"default",{value:s,enumerable:!0}),s)),n=s({"node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(u,D){var e="[",t={to:(u,D)=>D?`${e}${D+1};${u+1}H`:`${e}${u+1}G`,move(u,D){let t="";return u<0?t+=`${e}${-u}D`:u>0&&(t+=`${e}${u}C`),D<0?t+=`${e}${-D}A`:D>0&&(t+=`${e}${D}B`),t},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:"7",restore:"8"},r={up:(u=1)=>`${e}S`.repeat(u),down:(u=1)=>`${e}T`.repeat(u)},F={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 D="";for(let e=0;e<u;e++)D+=this.line+(e<u-1?t.up():"");return u&&(D+=t.left),D}};D.exports={cursor:t,scroll:r,erase:F,beep:""}}}),C=s({"node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(u,D){var e=process||{},t=e.argv||[],r=e.env||{},F=!(r.NO_COLOR||t.includes("--no-color"))&&(!!r.FORCE_COLOR||t.includes("--color")||"win32"===e.platform||(e.stdout||{}).isTTY&&"dumb"!==r.TERM||!!r.CI),s=(u,D,e=u)=>t=>{let r=""+t,F=r.indexOf(D,u.length);return~F?u+i(r,D,e,F)+D:u+r+D},i=(u,D,e,t)=>{let r="",F=0;do{r+=u.substring(F,t)+e,F=t+D.length,t=u.indexOf(D,F)}while(~t);return r+u.substring(F)},n=(u=F)=>{let D=u?s:()=>String;return{isColorSupported:u,reset:D("[0m","[0m"),bold:D("[1m","[22m","[22m[1m"),dim:D("[2m","[22m","[22m[2m"),italic:D("[3m","[23m"),underline:D("[4m","[24m"),inverse:D("[7m","[27m"),hidden:D("[8m","[28m"),strikethrough:D("[9m","[29m"),black:D("[30m","[39m"),red:D("[31m","[39m"),green:D("[32m","[39m"),yellow:D("[33m","[39m"),blue:D("[34m","[39m"),magenta:D("[35m","[39m"),cyan:D("[36m","[39m"),white:D("[37m","[39m"),gray:D("[90m","[39m"),bgBlack:D("[40m","[49m"),bgRed:D("[41m","[49m"),bgGreen:D("[42m","[49m"),bgYellow:D("[43m","[49m"),bgBlue:D("[44m","[49m"),bgMagenta:D("[45m","[49m"),bgCyan:D("[46m","[49m"),bgWhite:D("[47m","[49m"),blackBright:D("[90m","[39m"),redBright:D("[91m","[39m"),greenBright:D("[92m","[39m"),yellowBright:D("[93m","[39m"),blueBright:D("[94m","[39m"),magentaBright:D("[95m","[39m"),cyanBright:D("[96m","[39m"),whiteBright:D("[97m","[39m"),bgBlackBright:D("[100m","[49m"),bgRedBright:D("[101m","[49m"),bgGreenBright:D("[102m","[49m"),bgYellowBright:D("[103m","[49m"),bgBlueBright:D("[104m","[49m"),bgMagentaBright:D("[105m","[49m"),bgCyanBright:D("[106m","[49m"),bgWhiteBright:D("[107m","[49m")}};D.exports=n(),D.exports.createColors=n}}),a=i(require("fs")),o=i(require("path")),l=i(require("process")),E=(require("util"),i(n(),1)),c=require("process"),h=(i(require("readline"),1),i(require("readline"),1)),B=require("tty"),d=i(C(),1);var f=function({onlyFirst:u=!1}={}){const D=["[\\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(D,u?void 0:"g")}();function m(u){if("string"!=typeof u)throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(f,"")}function p(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var g={exports:{}};!function(){var u={};function D(u){return u.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}g.exports=u,u.eastAsianWidth=function(u){var D=u.charCodeAt(0),e=2==u.length?u.charCodeAt(1):0,t=D;return 55296<=D&&D<=56319&&56320<=e&&e<=57343&&(t=(D&=1023)<<10|(e&=1023),t+=65536),12288==t||65281<=t&&t<=65376||65504<=t&&t<=65510?"F":8361==t||65377<=t&&t<=65470||65474<=t&&t<=65479||65482<=t&&t<=65487||65490<=t&&t<=65495||65498<=t&&t<=65500||65512<=t&&t<=65518?"H":4352<=t&&t<=4447||4515<=t&&t<=4519||4602<=t&&t<=4607||9001<=t&&t<=9002||11904<=t&&t<=11929||11931<=t&&t<=12019||12032<=t&&t<=12245||12272<=t&&t<=12283||12289<=t&&t<=12350||12353<=t&&t<=12438||12441<=t&&t<=12543||12549<=t&&t<=12589||12593<=t&&t<=12686||12688<=t&&t<=12730||12736<=t&&t<=12771||12784<=t&&t<=12830||12832<=t&&t<=12871||12880<=t&&t<=13054||13056<=t&&t<=19903||19968<=t&&t<=42124||42128<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||55216<=t&&t<=55238||55243<=t&&t<=55291||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65106||65108<=t&&t<=65126||65128<=t&&t<=65131||110592<=t&&t<=110593||127488<=t&&t<=127490||127504<=t&&t<=127546||127552<=t&&t<=127560||127568<=t&&t<=127569||131072<=t&&t<=194367||177984<=t&&t<=196605||196608<=t&&t<=262141?"W":32<=t&&t<=126||162<=t&&t<=163||165<=t&&t<=166||172==t||175==t||10214<=t&&t<=10221||10629<=t&&t<=10630?"Na":161==t||164==t||167<=t&&t<=168||170==t||173<=t&&t<=174||176<=t&&t<=180||182<=t&&t<=186||188<=t&&t<=191||198==t||208==t||215<=t&&t<=216||222<=t&&t<=225||230==t||232<=t&&t<=234||236<=t&&t<=237||240==t||242<=t&&t<=243||247<=t&&t<=250||252==t||254==t||257==t||273==t||275==t||283==t||294<=t&&t<=295||299==t||305<=t&&t<=307||312==t||319<=t&&t<=322||324==t||328<=t&&t<=331||333==t||338<=t&&t<=339||358<=t&&t<=359||363==t||462==t||464==t||466==t||468==t||470==t||472==t||474==t||476==t||593==t||609==t||708==t||711==t||713<=t&&t<=715||717==t||720==t||728<=t&&t<=731||733==t||735==t||768<=t&&t<=879||913<=t&&t<=929||931<=t&&t<=937||945<=t&&t<=961||963<=t&&t<=969||1025==t||1040<=t&&t<=1103||1105==t||8208==t||8211<=t&&t<=8214||8216<=t&&t<=8217||8220<=t&&t<=8221||8224<=t&&t<=8226||8228<=t&&t<=8231||8240==t||8242<=t&&t<=8243||8245==t||8251==t||8254==t||8308==t||8319==t||8321<=t&&t<=8324||8364==t||8451==t||8453==t||8457==t||8467==t||8470==t||8481<=t&&t<=8482||8486==t||8491==t||8531<=t&&t<=8532||8539<=t&&t<=8542||8544<=t&&t<=8555||8560<=t&&t<=8569||8585==t||8592<=t&&t<=8601||8632<=t&&t<=8633||8658==t||8660==t||8679==t||8704==t||8706<=t&&t<=8707||8711<=t&&t<=8712||8715==t||8719==t||8721==t||8725==t||8730==t||8733<=t&&t<=8736||8739==t||8741==t||8743<=t&&t<=8748||8750==t||8756<=t&&t<=8759||8764<=t&&t<=8765||8776==t||8780==t||8786==t||8800<=t&&t<=8801||8804<=t&&t<=8807||8810<=t&&t<=8811||8814<=t&&t<=8815||8834<=t&&t<=8835||8838<=t&&t<=8839||8853==t||8857==t||8869==t||8895==t||8978==t||9312<=t&&t<=9449||9451<=t&&t<=9547||9552<=t&&t<=9587||9600<=t&&t<=9615||9618<=t&&t<=9621||9632<=t&&t<=9633||9635<=t&&t<=9641||9650<=t&&t<=9651||9654<=t&&t<=9655||9660<=t&&t<=9661||9664<=t&&t<=9665||9670<=t&&t<=9672||9675==t||9678<=t&&t<=9681||9698<=t&&t<=9701||9711==t||9733<=t&&t<=9734||9737==t||9742<=t&&t<=9743||9748<=t&&t<=9749||9756==t||9758==t||9792==t||9794==t||9824<=t&&t<=9825||9827<=t&&t<=9829||9831<=t&&t<=9834||9836<=t&&t<=9837||9839==t||9886<=t&&t<=9887||9918<=t&&t<=9919||9924<=t&&t<=9933||9935<=t&&t<=9953||9955==t||9960<=t&&t<=9983||10045==t||10071==t||10102<=t&&t<=10111||11093<=t&&t<=11097||12872<=t&&t<=12879||57344<=t&&t<=63743||65024<=t&&t<=65039||65533==t||127232<=t&&t<=127242||127248<=t&&t<=127277||127280<=t&&t<=127337||127344<=t&&t<=127386||917760<=t&&t<=917999||983040<=t&&t<=1048573||1048576<=t&&t<=1114109?"A":"N"},u.characterLength=function(u){var D=this.eastAsianWidth(u);return"F"==D||"W"==D||"A"==D?2:1},u.length=function(u){for(var e=D(u),t=0,r=0;r<e.length;r++)t+=this.characterLength(e[r]);return t},u.slice=function(e,t,r){textLen=u.length(e),r=r||1,(t=t||0)<0&&(t=textLen+t),r<0&&(r=textLen+r);for(var F="",s=0,i=D(e),n=0;n<i.length;n++){var C=i[n],a=u.length(C);if(s>=t-(2==a?1:0)){if(!(s+a<=r))break;F+=C}s+=a}return F}}();var A=p(g.exports),v=p((function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\u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D\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|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DC81\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}));function b(u,D={}){if("string"!=typeof u||0===u.length||(D={ambiguousIsNarrow:!0,...D},0===(u=m(u)).length))return 0;u=u.replace(v()," ");const e=D.ambiguousIsNarrow?1:2;let t=0;for(const D of u){const u=D.codePointAt(0);if(!(u<=31||u>=127&&u<=159||u>=768&&u<=879))switch(A.eastAsianWidth(D)){case"F":case"W":t+=2;break;case"A":t+=e;break;default:t+=1}}return t}var $=(u=0)=>D=>`[${D+u}m`,y=(u=0)=>D=>`[${38+u};5;${D}m`,w=(u=0)=>(D,e,t)=>`[${38+u};2;${D};${e};${t}m`,x={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(x.modifier);Object.keys(x.color),Object.keys(x.bgColor);var _=function(){const u=new Map;for(const[D,e]of Object.entries(x)){for(const[D,t]of Object.entries(e))x[D]={open:`[${t[0]}m`,close:`[${t[1]}m`},e[D]=x[D],u.set(t[0],t[1]);Object.defineProperty(x,D,{value:e,enumerable:!1})}return Object.defineProperty(x,"codes",{value:u,enumerable:!1}),x.color.close="[39m",x.bgColor.close="[49m",x.color.ansi=$(),x.color.ansi256=y(),x.color.ansi16m=w(),x.bgColor.ansi=$(10),x.bgColor.ansi256=y(10),x.bgColor.ansi16m=w(10),Object.defineProperties(x,{rgbToAnsi256:{value:(u,D,e)=>u===D&&D===e?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(D/255*5)+Math.round(e/255*5),enumerable:!1},hexToRgb:{value:u=>{const D=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!D)return[0,0,0];let[e]=D;3===e.length&&(e=[...e].map((u=>u+u)).join(""));const t=Number.parseInt(e,16);return[t>>16&255,t>>8&255,255&t]},enumerable:!1},hexToAnsi256:{value:u=>x.rgbToAnsi256(...x.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return u-8+90;let D,e,t;if(u>=232)D=(10*(u-232)+8)/255,e=D,t=D;else{const r=(u-=16)%36;D=Math.floor(u/36)/5,e=Math.floor(r/6)/5,t=r%6/5}const r=2*Math.max(D,e,t);if(0===r)return 30;let F=30+(Math.round(t)<<2|Math.round(e)<<1|Math.round(D));return 2===r&&(F+=60),F},enumerable:!1},rgbToAnsi:{value:(u,D,e)=>x.ansi256ToAnsi(x.rgbToAnsi256(u,D,e)),enumerable:!1},hexToAnsi:{value:u=>x.ansi256ToAnsi(x.hexToAnsi256(u)),enumerable:!1}}),x}(),j=new Set(["",""]),S="]8;;",k=u=>`${j.values().next().value}[${u}m`,T=u=>`${j.values().next().value}${S}${u}`,O=(u,D,e)=>{const t=[...D];let r=!1,F=!1,s=b(m(u[u.length-1]));for(const[D,i]of t.entries()){const n=b(i);(s+n<=e?u[u.length-1]+=i:(u.push(i),s=0),j.has(i)&&(r=!0,F=t.slice(D+1).join("").startsWith(S)),r)?F?""===i&&(r=!1,F=!1):"m"===i&&(r=!1):(s+=n,s===e&&D<t.length-1&&(u.push(""),s=0))}!s&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},M=(u,D,e={})=>{if(!1!==e.trim&&""===u.trim())return"";let t,r,F="";const s=(u=>u.split(" ").map((u=>b(u))))(u);let i=[""];for(const[t,r]of u.split(" ").entries()){!1!==e.trim&&(i[i.length-1]=i[i.length-1].trimStart());let u=b(i[i.length-1]);if(0!==t&&(u>=D&&(!1===e.wordWrap||!1===e.trim)&&(i.push(""),u=0),(u>0||!1===e.trim)&&(i[i.length-1]+=" ",u++)),e.hard&&s[t]>D){const e=D-u,F=1+Math.floor((s[t]-e-1)/D);Math.floor((s[t]-1)/D)<F&&i.push(""),O(i,r,D)}else{if(u+s[t]>D&&u>0&&s[t]>0){if(!1===e.wordWrap&&u<D){O(i,r,D);continue}i.push("")}u+s[t]>D&&!1===e.wordWrap?O(i,r,D):i[i.length-1]+=r}}!1!==e.trim&&(i=i.map((u=>(u=>{const D=u.split(" ");let e=D.length;for(;e>0&&!(b(D[e-1])>0);)e--;return e===D.length?u:D.slice(0,e).join(" ")+D.slice(e).join("")})(u))));const n=[...i.join("\n")];for(const[u,D]of n.entries()){if(F+=D,j.has(D)){const{groups:D}=new RegExp(`(?:\\[(?<code>\\d+)m|\\${S}(?<uri>.*))`).exec(n.slice(u).join(""))||{groups:{}};if(void 0!==D.code){const u=Number.parseFloat(D.code);t=39===u?void 0:u}else void 0!==D.uri&&(r=0===D.uri.length?void 0:D.uri)}const e=_.codes.get(Number(t));"\n"===n[u+1]?(r&&(F+=T("")),t&&e&&(F+=k(e))):"\n"===D&&(t&&e&&(F+=k(t)),r&&(F+=T(r)))}return F};function R(u,D,e){return String(u).normalize().replace(/\r\n/g,"\n").split("\n").map((u=>M(u,D,e))).join("\n")}var I={actions:new Set(["up","down","left","right","space","enter","cancel"]),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function P(u,D){if("string"==typeof u)return I.aliases.get(u)===D;for(const e of u)if(void 0!==e&&P(e,D))return!0;return!1}globalThis.process.platform.startsWith("win");var V=Symbol("clack:cancel");function L(u){return u===V}function W(u,D){const e=u;e.isTTY&&e.setRawMode(D)}var N=Object.defineProperty,q=(u,D,e)=>(((u,D,e)=>{D in u?N(u,D,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[D]=e})(u,"symbol"!=typeof D?D+"":D,e),e),z=class{constructor(u,D=!0){q(this,"input"),q(this,"output"),q(this,"_abortSignal"),q(this,"rl"),q(this,"opts"),q(this,"_render"),q(this,"_track",!1),q(this,"_prevFrame",""),q(this,"_subscribers",new Map),q(this,"_cursor",0),q(this,"state","initial"),q(this,"error",""),q(this,"value");const{input:e=c.stdin,output:t=c.stdout,render:r,signal:F,...s}=u;this.opts=s,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=r.bind(this),this._track=D,this._abortSignal=F,this.input=e,this.output=t}unsubscribe(){this._subscribers.clear()}setSubscriber(u,D){const e=this._subscribers.get(u)??[];e.push(D),this._subscribers.set(u,e)}on(u,D){this.setSubscriber(u,{cb:D})}once(u,D){this.setSubscriber(u,{cb:D,once:!0})}emit(u,...D){const e=this._subscribers.get(u)??[],t=[];for(const u of e)u.cb(...D),u.once&&t.push((()=>e.splice(e.indexOf(u),1)));for(const u of t)u()}prompt(){return new Promise(((u,D)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),u(V);this._abortSignal.addEventListener("abort",(()=>{this.state="cancel",this.close()}),{once:!0})}const e=new B.WriteStream(0);e._write=(u,D,e)=>{var t,r;this._track&&(this.value=null==(t=this.rl)?void 0:t.line.replace(/\t/g,""),this._cursor=(null==(r=this.rl)?void 0:r.cursor)??0,this.emit("value",this.value)),e()},this.input.pipe(e),this.rl=h.default.createInterface({input:this.input,output:e,tabSize:2,prompt:"",escapeCodeTimeout:50}),h.default.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),void 0!==this.opts.initialValue&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),W(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",(()=>{this.output.write(E.cursor.show),this.output.off("resize",this.render),W(this.input,!1),u(this.value)})),this.once("cancel",(()=>{this.output.write(E.cursor.show),this.output.off("resize",this.render),W(this.input,!1),u(V)}))}))}onKeypress(u,D){var e,t;if("error"===this.state&&(this.state="active"),(null==D?void 0:D.name)&&(!this._track&&I.aliases.has(D.name)&&this.emit("cursor",I.aliases.get(D.name)),I.actions.has(D.name)&&this.emit("cursor",D.name)),u&&("y"===u.toLowerCase()||"n"===u.toLowerCase())&&this.emit("confirm","y"===u.toLowerCase()),"\t"===u&&this.opts.placeholder&&(this.value||(null==(e=this.rl)||e.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),u&&this.emit("key",u.toLowerCase()),"return"===(null==D?void 0:D.name)){if(this.opts.validate){const u=this.opts.validate(this.value);u&&(this.error=u instanceof Error?u.message:u,this.state="error",null==(t=this.rl)||t.write(this.value))}"error"!==this.state&&(this.state="submit")}P([u,null==D?void 0:D.name,null==D?void 0:D.sequence],"cancel")&&(this.state="cancel"),("submit"===this.state||"cancel"===this.state)&&this.emit("finalize"),this.render(),("submit"===this.state||"cancel"===this.state)&&this.close()}close(){var u;this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write("\n"),W(this.input,!1),null==(u=this.rl)||u.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const u=R(this._prevFrame,process.stdout.columns,{hard:!0}).split("\n").length-1;this.output.write(E.cursor.move(-999,-1*u))}render(){const u=R(this._render(this)??"",process.stdout.columns,{hard:!0});if(u!==this._prevFrame){if("initial"===this.state)this.output.write(E.cursor.hide);else{const D=function(u,D){if(u===D)return;const e=u.split("\n"),t=D.split("\n"),r=[];for(let u=0;u<Math.max(e.length,t.length);u++)e[u]!==t[u]&&r.push(u);return r}(this._prevFrame,u);if(this.restoreCursor(),D&&1===(null==D?void 0:D.length)){const e=D[0];this.output.write(E.cursor.move(0,e)),this.output.write(E.erase.lines(1));const t=u.split("\n");return this.output.write(t[e]),this._prevFrame=u,void this.output.write(E.cursor.move(0,t.length-e-1))}if(D&&(null==D?void 0:D.length)>1){const e=D[0];this.output.write(E.cursor.move(0,e)),this.output.write(E.erase.down());const t=u.split("\n").slice(e);return this.output.write(t.join("\n")),void(this._prevFrame=u)}this.output.write(E.erase.down())}this.output.write(u),"initial"===this.state&&(this.state="active"),this._prevFrame=u}}},G=class extends z{get cursor(){return this.value?0:1}get _value(){return 0===this.cursor}constructor(u){super(u,!1),this.value=!!u.initialValue,this.on("value",(()=>{this.value=this._value})),this.on("confirm",(u=>{this.output.write(E.cursor.move(0,-1)),this.value=u,this.state="submit",this.close()})),this.on("cursor",(()=>{this.value=!this.value}))}},K=Object.defineProperty,J=(u,D,e)=>(((u,D,e)=>{D in u?K(u,D,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[D]=e})(u,"symbol"!=typeof D?D+"":D,e),e),U=class extends z{constructor(u){super(u,!1),J(this,"options"),J(this,"cursor",0),this.options=u.options,this.cursor=this.options.findIndex((({value:D})=>D===u.initialValue)),-1===this.cursor&&(this.cursor=0),this.changeValue(),this.on("cursor",(u=>{switch(u){case"left":case"up":this.cursor=0===this.cursor?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1}this.changeValue()}))}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}},Y=class extends z{get valueWithCursor(){if("submit"===this.state)return this.value;if(this.cursor>=this.value.length)return`${this.value}█`;const u=this.value.slice(0,this.cursor),[D,...e]=this.value.slice(this.cursor);return`${u}${d.default.inverse(D)}${e.join("")}`}get cursor(){return this._cursor}constructor(u){super(u),this.on("finalize",(()=>{this.value||(this.value=u.defaultValue)}))}},Z=i(require("process"),1),H=i(C(),1);i(n(),1);var Q="win32"!==Z.default.platform?"linux"!==Z.default.env.TERM:!!Z.default.env.CI||!!Z.default.env.WT_SESSION||!!Z.default.env.TERMINUS_SUBLIME||"{cmd::Cmder}"===Z.default.env.ConEmuTask||"Terminus-Sublime"===Z.default.env.TERM_PROGRAM||"vscode"===Z.default.env.TERM_PROGRAM||"xterm-256color"===Z.default.env.TERM||"alacritty"===Z.default.env.TERM||"JetBrains-JediTerm"===Z.default.env.TERMINAL_EMULATOR,X=(u,D)=>Q?u:D,uu=X("◆","*"),Du=X("■","x"),eu=X("▲","x"),tu=X("◇","o"),ru=(X("┌","T"),X("│","|")),Fu=X("└","—"),su=X("●",">"),iu=X("○"," "),nu=(X("◻","[•]"),X("◼","[+]"),X("◻","[ ]"),X("▪","•"),X("─","-"),X("╮","+"),X("├","+"),X("╯","+"),X("●","•"),X("◆","*"),X("▲","!"),X("■","x"),u=>{switch(u){case"initial":case"active":return H.default.cyan(uu);case"cancel":return H.default.red(Du);case"error":return H.default.yellow(eu);case"submit":return H.default.green(tu)}}),Cu=u=>new Y({validate:u.validate,placeholder:u.placeholder,defaultValue:u.defaultValue,initialValue:u.initialValue,render(){var D;const e=`${H.default.gray(ru)}\n${nu(this.state)} ${u.message}\n`,t=u.placeholder?H.default.inverse(u.placeholder[0])+H.default.dim(u.placeholder.slice(1)):H.default.inverse(H.default.hidden("_")),r=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${e.trim()}\n${H.default.yellow(ru)} ${r}\n${H.default.yellow(Fu)} ${H.default.yellow(this.error)}\n`;case"submit":return`${e}${H.default.gray(ru)} ${H.default.dim(this.value||u.placeholder)}`;case"cancel":return`${e}${H.default.gray(ru)} ${H.default.strikethrough(H.default.dim(this.value??""))}${(null==(D=this.value)?void 0:D.trim())?`\n${H.default.gray(ru)}`:""}`;default:return`${e}${H.default.cyan(ru)} ${r}\n${H.default.cyan(Fu)}\n`}}}).prompt(),au=u=>{const D=u.active??"Yes",e=u.inactive??"No";return new G({active:D,inactive:e,initialValue:u.initialValue??!0,render(){const t=`${H.default.gray(ru)}\n${nu(this.state)} ${u.message}\n`,r=this.value?D:e;switch(this.state){case"submit":return`${t}${H.default.gray(ru)} ${H.default.dim(r)}`;case"cancel":return`${t}${H.default.gray(ru)} ${H.default.strikethrough(H.default.dim(r))}\n${H.default.gray(ru)}`;default:return`${t}${H.default.cyan(ru)} ${this.value?`${H.default.green(su)} ${D}`:`${H.default.dim(iu)} ${H.default.dim(D)}`} ${H.default.dim("/")} ${this.value?`${H.default.dim(iu)} ${H.default.dim(e)}`:`${H.default.green(su)} ${e}`}\n${H.default.cyan(Fu)}\n`}}}).prompt()},ou=u=>{const D=(u,D)=>{const e=u.label??String(u.value);switch(D){case"selected":return`${H.default.dim(e)}`;case"active":return`${H.default.green(su)} ${e} ${u.hint?H.default.dim(`(${u.hint})`):""}`;case"cancelled":return`${H.default.strikethrough(H.default.dim(e))}`;default:return`${H.default.dim(iu)} ${H.default.dim(e)}`}};return new U({options:u.options,initialValue:u.initialValue,render(){const e=`${H.default.gray(ru)}\n${nu(this.state)} ${u.message}\n`;switch(this.state){case"submit":return`${e}${H.default.gray(ru)} ${D(this.options[this.cursor],"selected")}`;case"cancel":return`${e}${H.default.gray(ru)} ${D(this.options[this.cursor],"cancelled")}\n${H.default.gray(ru)}`;default:return`${e}${H.default.cyan(ru)} ${(u=>{const{cursor:D,options:e,style:t}=u,r=u.maxItems??Number.POSITIVE_INFINITY,F=Math.max(process.stdout.rows-4,0),s=Math.min(F,Math.max(r,5));let i=0;D>=i+s-3?i=Math.max(Math.min(D-s+3,e.length-s),0):D<i+2&&(i=Math.max(D-2,0));const n=s<e.length&&i>0,C=s<e.length&&i+s<e.length;return e.slice(i,i+s).map(((u,e,r)=>{const F=0===e&&n,s=e===r.length-1&&C;return F||s?H.default.dim("..."):t(u,e+i===D)}))})({cursor:this.cursor,options:this.options,maxItems:u.maxItems,style:(u,e)=>D(u,e?"active":"inactive")}).join(`\n${H.default.cyan(ru)} `)}\n${H.default.cyan(Fu)}\n`}}}).prompt()},lu=(u="")=>{process.stdout.write(`${H.default.gray(Fu)} ${H.default.red(u)}\n\n`)},Eu=async(u,D)=>{var e;const t={},r=Object.keys(u);for(const F of r){const r=u[F],s=await(null==(e=r({results:t}))?void 0:e.catch((u=>{throw u})));"function"==typeof(null==D?void 0:D.onCancel)&&L(s)?(t[F]="canceled",D.onCancel({results:t})):t[F]=s}return t},cu=i(require("cheerio")),hu=i(require("ejs")),Bu=require("fs-extra"),du=i(require("kolorist")),fu=require("util"),{values:mu,positionals:pu}=(0,fu.parseArgs)({allowPositionals:!0,options:{force:{type:"boolean",short:"f"}}}),gu=require("kolorist"),Au=`${(0,gu.cyan)("欢迎使用@zd~/iconfont-cli@0.0.24")}\n${(0,gu.gray)("如果您使用中遇到任何问题,请联系我!")}\n`,vu=i(require("kolorist")),bu=[{label:vu.cyan("React"),value:"react"},{label:vu.green("Vue"),value:"vue"}],$u="data:image/svg+xml;charset=utf-8,",yu=i(require("fs"));function wu(u){try{return yu.default.accessSync(u,yu.default.constants.F_OK),!0}catch{return!1}}var xu=l.default.cwd(),_u=o.default.resolve(xu,"iconfont-cli-config.json");!async function(){console.log(Au);try{if(!wu(_u)){const u=await Eu({jsLink:()=>Cu({message:"请输入 Symbol 字体图标的在线 JS 链接(参考readme文件)",placeholder:"例如: //at.alicdn.com/t/c/font_4807277_enrwdyz7swf.js",validate:u=>""===u?"在线js链接不能为空":u.endsWith(".js")&&u.startsWith("//")?void 0:"在线js链接不正确"}),framework:()=>ou({message:"请选择一个框架",options:bu}),useTs:()=>au({message:"是否使用ts",initialValue:!0}),achieve:()=>ou({message:"请选择图标实现方式",options:[{value:"mask",label:"mask 遮罩(新特性)"},{value:"bg",label:"background-image 背景图(兼容性好)"}]}),iconfontPath:()=>Cu({message:"设置 Iconfont 组件路径文件夹",initialValue:"src/components/iconfont",defaultValue:"src/components/iconfont",placeholder:"src/components/iconfont"})},{onCancel:()=>{lu("Operation cancelled."),l.default.exit(0)}}),D="react"===u.framework?await Eu({set:()=>au({message:"是否具名导出每一个图标组件",initialValue:!0}),iconPrefix:()=>Cu({message:"设置具名导出组件的组件前缀",initialValue:"iconfont",defaultValue:""})},{onCancel:()=>{lu("Operation cancelled."),l.default.exit(0)}}):{};a.default.writeFileSync(_u,JSON.stringify(Object.assign(u,D),null,2))}const u=JSON.parse(a.default.readFileSync(_u).toString());await async function(u){var D;const e=await fetch(`https://${u.jsLink}`).then((u=>u.text())),t=o.default.resolve(xu,u.iconfontPath);await(0,Bu.ensureDir)(t),u.iconfontPath=t;const r=/<svg[^>]*>([\s\S]*?)<\/svg>/,F=(null==(D=e.match(r))?void 0:D[1])??"",s=cu.load(`<div>${F}<div/>`),i={},n=[];s("symbol").each(((u,D)=>{var e;const t=(null==(e=s(D).attr("id"))?void 0:e.replace("icon-",""))??"";s("path").attr("fill","currentColor"),s(D).attr("width","1em"),s(D).attr("height","1em"),s(D).attr("xmlns","http://www.w3.org/2000/svg");const r=s(D).prop("outerHTML")??"";i[t]=r.replace(/symbol/g,"svg").replace(/viewbox/gi,"viewBox"),n.push(t)}));const C={data:i,config:u,types:n};(function({data:u,config:{iconfontPath:D,useTs:e,achieve:t}}){const r="bg"===t?"iconfont-data":"iconfont-css",F="bg"===t?decodeURIComponent(JSON.stringify(u,null,2)):`${Object.entries(u).map((([u,D])=>`.iconfont.${u} { \n mask-image: url('data:image/svg+xml;charset=utf-8,${encodeURIComponent(D)}');\n -webkit-mask-image: url('data:image/svg+xml;charset=utf-8,${encodeURIComponent(D)}');\n}`)).join("\n\n")}`,s=hu.render(a.default.readFileSync(o.default.resolve(__dirname,`../template/${r}.ejs`),"utf-8"),{data:F}),i=`${r}${"bg"===t?e?".ts":".js":".css"}`;a.default.writeFileSync(o.default.resolve(D,i),s)})(C),function({config:{useTs:u,iconfontPath:D},types:e}){if(!u)return;const t="iconfont-types.ts",r=hu.render(a.default.readFileSync(o.default.resolve(__dirname,`../template/${t}.ejs`),"utf-8"),{types:e.map((u=>`"${u}"`)).join(" | ")});a.default.writeFileSync(o.default.resolve(D,t),r)}(C),function({config:{useTs:u,framework:D,iconfontPath:e,achieve:t},types:r}){const F=u?"ts":"js",s="iconfont"+("react"===D?u?".tsx":".jsx":".vue"),i=o.default.resolve(e,s),n=!1===wu(i)||mu.force,C=r.map((u=>`"${u}"`)).join(" | ");if(!n){if(console.log("\n"),console.log(du.bgGray("提示")),console.log(du.gray(`组件 ${i} 已存在!\n当前操作只会替换当前组件的"IconfontTypes"的类型声明和其他文件\n如果需要覆盖重新生成请使用 --force 或者 -f 参数\n`)),"js"===F&&wu(i)){const u=a.default.readFileSync(i).toString().replace(/@typedef\s*\{[^}]+\}\s*IconfontTypes/,`@typedef { ${C} } IconfontTypes`);a.default.writeFileSync(i,u)}return}const l=`iconfont_${D}_${F}.ejs`,E=hu.render(a.default.readFileSync(o.default.resolve(__dirname,`../template/${l}`),"utf-8"),{types:C,achieve:t});a.default.writeFileSync(i,E)}(C),function({data:u,config:{set:D,framework:e,iconfontPath:t,useTs:r,iconPrefix:F},types:s}){if(!D)return;const i=`iconfont_${e}_set.ejs`;if("react"===e){const D=hu.render(a.default.readFileSync(o.default.resolve(__dirname,`../template/${i}`),"utf-8"),{useTs:r,sets:s.map((D=>{const e=u[D].replace(/currentColor/g,"#ffffff"),t=F?`${F.replace(/[^a-z0-9]/gi,"")}-`:"";return{componentName:(t+D).split("-").map((u=>u.charAt(0).toUpperCase()+u.slice(1).toLowerCase())).join(""),name:D,svgImage:`${$u}${encodeURIComponent(e)}`}}))});a.default.writeFileSync(o.default.resolve(t,"iconfont-set"+(r?".tsx":".jsx")),D)}}(C)}(u),console.log(du.green("✨✨✨ 操作成功"))}catch(u){console.warn(u),l.default.exit("")}}();