@barbapapazes/content-creation 0.0.0 → 0.1.0
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/LICENSE +21 -0
- package/README.md +29 -0
- package/dist/cli.mjs +49 -0
- package/package.json +37 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 - Estéban Soubiran <esteban@soubiran.dev> (https://soubiran.dev)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @barbapapazes/content-creation
|
|
2
|
+
|
|
3
|
+
A CLI tool to streamline content creation by generating dated directories with content files.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Create dated directories (YYYY-MM-DD format)
|
|
8
|
+
- User-friendly date selection (Today, Tomorrow, Yesterday, or Custom)
|
|
9
|
+
- Automatic `content.md` file creation
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @barbapapazes/content-creation
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Create content directory in current working directory
|
|
21
|
+
content-creation
|
|
22
|
+
|
|
23
|
+
# Create content directory at a specific path
|
|
24
|
+
content-creation --path /path/to/content
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## License
|
|
28
|
+
|
|
29
|
+
MIT
|
package/dist/cli.mjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import e,{stdin as t,stdout as n}from"node:process";import{stripVTControlCharacters as r}from"node:util";import*as i from"node:readline";import a from"node:readline";import{Writable as o}from"node:stream";import{EventEmitter as s}from"events";import{existsSync as c,mkdirSync as l,writeFileSync as u}from"node:fs";import{join as d,resolve as f}from"node:path";var p=Object.create,m=Object.defineProperty,h=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyNames,te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty,re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ie=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ee(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ne.call(e,s)&&s!==n&&m(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=h(t,s))||r.enumerable});return e},ae=(e,t,n)=>(n=e==null?{}:p(te(e)),ie(t||!e||!e.__esModule?m(n,`default`,{value:e,enumerable:!0}):n,e)),oe=re(((e,t)=>{let n={to(e,t){return t?`[${t+1};${e+1}H`:`[${e+1}G`},move(e,t){let n=``;return e<0?n+=`[${-e}D`:e>0&&(n+=`[${e}C`),t<0?n+=`[${-t}A`:t>0&&(n+=`[${t}B`),n},up:(e=1)=>`[${e}A`,down:(e=1)=>`[${e}B`,forward:(e=1)=>`[${e}C`,backward:(e=1)=>`[${e}D`,nextLine:(e=1)=>`\x1B[E`.repeat(e),prevLine:(e=1)=>`\x1B[F`.repeat(e),left:`\x1B[G`,hide:`\x1B[?25l`,show:`\x1B[?25h`,save:`\x1B7`,restore:`\x1B8`};t.exports={cursor:n,scroll:{up:(e=1)=>`\x1B[S`.repeat(e),down:(e=1)=>`\x1B[T`.repeat(e)},erase:{screen:`\x1B[2J`,up:(e=1)=>`\x1B[1J`.repeat(e),down:(e=1)=>`\x1B[J`.repeat(e),line:`\x1B[2K`,lineEnd:`\x1B[K`,lineStart:`\x1B[1K`,lines(e){let t=``;for(let r=0;r<e;r++)t+=this.line+(r<e-1?n.up():``);return e&&(t+=n.left),t}},beep:`\x07`}})),se=re(((e,t)=>{let n=process||{},r=n.argv||[],i=n.env||{},a=!(i.NO_COLOR||r.includes(`--no-color`))&&(!!i.FORCE_COLOR||r.includes(`--color`)||n.platform===`win32`||(n.stdout||{}).isTTY&&i.TERM!==`dumb`||!!i.CI),o=(e,t,n=e)=>r=>{let i=``+r,a=i.indexOf(t,e.length);return~a?e+s(i,t,n,a)+t:e+i+t},s=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},c=(e=a)=>{let t=e?o:()=>String;return{isColorSupported:e,reset:t(`\x1B[0m`,`\x1B[0m`),bold:t(`\x1B[1m`,`\x1B[22m`,`\x1B[22m\x1B[1m`),dim:t(`\x1B[2m`,`\x1B[22m`,`\x1B[22m\x1B[2m`),italic:t(`\x1B[3m`,`\x1B[23m`),underline:t(`\x1B[4m`,`\x1B[24m`),inverse:t(`\x1B[7m`,`\x1B[27m`),hidden:t(`\x1B[8m`,`\x1B[28m`),strikethrough:t(`\x1B[9m`,`\x1B[29m`),black:t(`\x1B[30m`,`\x1B[39m`),red:t(`\x1B[31m`,`\x1B[39m`),green:t(`\x1B[32m`,`\x1B[39m`),yellow:t(`\x1B[33m`,`\x1B[39m`),blue:t(`\x1B[34m`,`\x1B[39m`),magenta:t(`\x1B[35m`,`\x1B[39m`),cyan:t(`\x1B[36m`,`\x1B[39m`),white:t(`\x1B[37m`,`\x1B[39m`),gray:t(`\x1B[90m`,`\x1B[39m`),bgBlack:t(`\x1B[40m`,`\x1B[49m`),bgRed:t(`\x1B[41m`,`\x1B[49m`),bgGreen:t(`\x1B[42m`,`\x1B[49m`),bgYellow:t(`\x1B[43m`,`\x1B[49m`),bgBlue:t(`\x1B[44m`,`\x1B[49m`),bgMagenta:t(`\x1B[45m`,`\x1B[49m`),bgCyan:t(`\x1B[46m`,`\x1B[49m`),bgWhite:t(`\x1B[47m`,`\x1B[49m`),blackBright:t(`\x1B[90m`,`\x1B[39m`),redBright:t(`\x1B[91m`,`\x1B[39m`),greenBright:t(`\x1B[92m`,`\x1B[39m`),yellowBright:t(`\x1B[93m`,`\x1B[39m`),blueBright:t(`\x1B[94m`,`\x1B[39m`),magentaBright:t(`\x1B[95m`,`\x1B[39m`),cyanBright:t(`\x1B[96m`,`\x1B[39m`),whiteBright:t(`\x1B[97m`,`\x1B[39m`),bgBlackBright:t(`\x1B[100m`,`\x1B[49m`),bgRedBright:t(`\x1B[101m`,`\x1B[49m`),bgGreenBright:t(`\x1B[102m`,`\x1B[49m`),bgYellowBright:t(`\x1B[103m`,`\x1B[49m`),bgBlueBright:t(`\x1B[104m`,`\x1B[49m`),bgMagentaBright:t(`\x1B[105m`,`\x1B[49m`),bgCyanBright:t(`\x1B[106m`,`\x1B[49m`),bgWhiteBright:t(`\x1B[107m`,`\x1B[49m`)}};t.exports=c(),t.exports.createColors=c})),g=oe(),_=ae(se(),1);function ce({onlyFirst:e=!1}={}){let t=[`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))`,`(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))`].join(`|`);return new RegExp(t,e?void 0:`g`)}const le=ce();function ue(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(le,``)}function de(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var fe={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(e){var t=e.charCodeAt(0),n=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=n&&n<=57343&&(t&=1023,n&=1023,r=t<<10|n,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?`F`:r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?`H`:4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?`W`:32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?`Na`:r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?`A`:`N`},t.characterLength=function(e){var t=this.eastAsianWidth(e);return t==`F`||t==`W`||t==`A`?2:1};function n(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(e){for(var t=n(e),r=0,i=0;i<t.length;i++)r+=this.characterLength(t[i]);return r},t.slice=function(e,r,i){textLen=t.length(e),r||=0,i||=1,r<0&&(r=textLen+r),i<0&&(i=textLen+i);for(var a=``,o=0,s=n(e),c=0;c<s.length;c++){var l=s[c],u=t.length(l);if(o>=r-(u==2?1:0))if(o+u<=i)a+=l;else break;o+=u}return a}})(fe);var pe=fe.exports;const me=de(pe),he=de(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});function v(e,t={}){if(typeof e!=`string`||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=ue(e),e.length===0))return 0;e=e.replace(he(),` `);let n=t.ambiguousIsNarrow?1:2,r=0;for(let t of e){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159||e>=768&&e<=879))switch(me.eastAsianWidth(t)){case`F`:case`W`:r+=2;break;case`A`:r+=n;break;default:r+=1}}return r}const ge=(e=0)=>t=>`\x1B[${t+e}m`,_e=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,ve=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,y={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(y.modifier);const ye=Object.keys(y.color),be=Object.keys(y.bgColor);[...ye,...be];function xe(){let e=new Map;for(let[t,n]of Object.entries(y)){for(let[t,r]of Object.entries(n))y[t]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[t]=y[t],e.set(r[0],r[1]);Object.defineProperty(y,t,{value:n,enumerable:!1})}return Object.defineProperty(y,`codes`,{value:e,enumerable:!1}),y.color.close=`\x1B[39m`,y.bgColor.close=`\x1B[49m`,y.color.ansi=ge(),y.color.ansi256=_e(),y.color.ansi16m=ve(),y.bgColor.ansi=ge(10),y.bgColor.ansi256=_e(10),y.bgColor.ansi16m=ve(10),Object.defineProperties(y,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?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(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>y.rgbToAnsi256(...y.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>y.ansi256ToAnsi(y.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>y.ansi256ToAnsi(y.hexToAnsi256(e)),enumerable:!1}}),y}const Se=xe(),b=new Set([`\x1B`,``]),Ce=`]8;;`,we=e=>`${b.values().next().value}[${e}m`,Te=e=>`${b.values().next().value}${Ce}${e}`,Ee=e=>e.split(` `).map(e=>v(e)),De=(e,t,n)=>{let r=[...t],i=!1,a=!1,o=v(ue(e[e.length-1]));for(let[t,s]of r.entries()){let c=v(s);if(o+c<=n?e[e.length-1]+=s:(e.push(s),o=0),b.has(s)&&(i=!0,a=r.slice(t+1).join(``).startsWith(Ce)),i){a?s===`\x07`&&(i=!1,a=!1):s===`m`&&(i=!1);continue}o+=c,o===n&&t<r.length-1&&(e.push(``),o=0)}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Oe=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(v(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},ke=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=Ee(e),s=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let e=v(s[s.length-1]);if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),e=0),(e>0||n.trim===!1)&&(s[s.length-1]+=` `,e++)),n.hard&&o[r]>t){let n=t-e,a=1+Math.floor((o[r]-n-1)/t);Math.floor((o[r]-1)/t)<a&&s.push(``),De(s,i,t);continue}if(e+o[r]>t&&e>0&&o[r]>0){if(n.wordWrap===!1&&e<t){De(s,i,t);continue}s.push(``)}if(e+o[r]>t&&n.wordWrap===!1){De(s,i,t);continue}s[s.length-1]+=i}n.trim!==!1&&(s=s.map(e=>Oe(e)));let c=[...s.join(`
|
|
3
|
+
`)];for(let[e,t]of c.entries()){if(r+=t,b.has(t)){let{groups:t}=RegExp(`(?:\\[(?<code>\\d+)m|\\${Ce}(?<uri>.*))`).exec(c.slice(e).join(``))||{groups:{}};if(t.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}let n=Se.codes.get(Number(i));c[e+1]===`
|
|
4
|
+
`?(a&&(r+=Te(``)),i&&n&&(r+=we(n))):t===`
|
|
5
|
+
`&&(i&&n&&(r+=we(i)),a&&(r+=Te(a)))}return r};function Ae(e,t,n){return String(e).normalize().replace(/\r\n/g,`
|
|
6
|
+
`).split(`
|
|
7
|
+
`).map(e=>ke(e,t,n)).join(`
|
|
8
|
+
`)}const x={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 je(e,t){if(typeof e==`string`)return x.aliases.get(e)===t;for(let n of e)if(n!==void 0&&je(n,t))return!0;return!1}function Me(e,t){if(e===t)return;let n=e.split(`
|
|
9
|
+
`),r=t.split(`
|
|
10
|
+
`),i=[];for(let e=0;e<Math.max(n.length,r.length);e++)n[e]!==r[e]&&i.push(e);return i}globalThis.process.platform.startsWith(`win`);const Ne=Symbol(`clack:cancel`);function Pe(e){return e===Ne}function S(e,t){let n=e;n.isTTY&&n.setRawMode(t)}var Fe=Object.defineProperty,Ie=(e,t,n)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,C=(e,t,n)=>(Ie(e,typeof t==`symbol`?t:t+``,n),n),Le=class{constructor(e,r=!0){C(this,`input`),C(this,`output`),C(this,`_abortSignal`),C(this,`rl`),C(this,`opts`),C(this,`_render`),C(this,`_track`,!1),C(this,`_prevFrame`,``),C(this,`_subscribers`,new Map),C(this,`_cursor`,0),C(this,`state`,`initial`),C(this,`error`,``),C(this,`value`);let{input:i=t,output:a=n,render:o,signal:s,...c}=e;this.opts=c,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=o.bind(this),this._track=r,this._abortSignal=s,this.input=i,this.output=a}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let n=this._subscribers.get(e)??[];n.push(t),this._subscribers.set(e,n)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let n=this._subscribers.get(e)??[],r=[];for(let e of n)e.cb(...t),e.once&&r.push(()=>n.splice(n.indexOf(e),1));for(let e of r)e()}prompt(){return new Promise((e,t)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state=`cancel`,this.close(),e(Ne);this._abortSignal.addEventListener(`abort`,()=>{this.state=`cancel`,this.close()},{once:!0})}let n=new o;n._write=(e,t,n)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,``),this._cursor=this.rl?.cursor??0,this.emit(`value`,this.value)),n()},this.input.pipe(n),this.rl=a.createInterface({input:this.input,output:n,tabSize:2,prompt:``,escapeCodeTimeout:50,terminal:!0}),a.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),S(this.input,!0),this.output.on(`resize`,this.render),this.render(),this.once(`submit`,()=>{this.output.write(g.cursor.show),this.output.off(`resize`,this.render),S(this.input,!1),e(this.value)}),this.once(`cancel`,()=>{this.output.write(g.cursor.show),this.output.off(`resize`,this.render),S(this.input,!1),e(Ne)})})}onKeypress(e,t){if(this.state===`error`&&(this.state=`active`),t?.name&&(!this._track&&x.aliases.has(t.name)&&this.emit(`cursor`,x.aliases.get(t.name)),x.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.value&&this.opts.placeholder&&(this.rl?.write(this.opts.placeholder),this.emit(`value`,this.opts.placeholder)),this.opts.validate){let e=this.opts.validate(this.value);e&&(this.error=e instanceof Error?e.message:e,this.state=`error`,this.rl?.write(this.value))}this.state!==`error`&&(this.state=`submit`)}je([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(`
|
|
11
|
+
`),S(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=Ae(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
12
|
+
`).length-1;this.output.write(g.cursor.move(-999,e*-1))}render(){let e=Ae(this._render(this)??``,process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state===`initial`)this.output.write(g.cursor.hide);else{let t=Me(this._prevFrame,e);if(this.restoreCursor(),t&&t?.length===1){let n=t[0];this.output.write(g.cursor.move(0,n)),this.output.write(g.erase.lines(1));let r=e.split(`
|
|
13
|
+
`);this.output.write(r[n]),this._prevFrame=e,this.output.write(g.cursor.move(0,r.length-n-1));return}if(t&&t?.length>1){let n=t[0];this.output.write(g.cursor.move(0,n)),this.output.write(g.erase.down());let r=e.split(`
|
|
14
|
+
`).slice(n);this.output.write(r.join(`
|
|
15
|
+
`)),this._prevFrame=e;return}this.output.write(g.erase.down())}this.output.write(e),this.state===`initial`&&(this.state=`active`),this._prevFrame=e}}};Object.defineProperty,Object.defineProperty,Object.defineProperty;var Re=Object.defineProperty,ze=(e,t,n)=>t in e?Re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Be=(e,t,n)=>(ze(e,typeof t==`symbol`?t:t+``,n),n),Ve=class extends Le{constructor(e){super(e,!1),Be(this,`options`),Be(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`,e=>{switch(e){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}};Object.defineProperty;var He=class extends Le{get valueWithCursor(){if(this.state===`submit`)return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let e=this.value.slice(0,this.cursor),[t,...n]=this.value.slice(this.cursor);return`${e}${_.default.inverse(t)}${n.join(``)}`}get cursor(){return this._cursor}constructor(e){super(e),this.on(`finalize`,()=>{this.value||=e.defaultValue})}};function Ue(){return e.platform===`win32`?!!e.env.CI||!!e.env.WT_SESSION||!!e.env.TERMINUS_SUBLIME||e.env.ConEmuTask===`{cmd::Cmder}`||e.env.TERM_PROGRAM===`Terminus-Sublime`||e.env.TERM_PROGRAM===`vscode`||e.env.TERM===`xterm-256color`||e.env.TERM===`alacritty`||e.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:e.env.TERM!==`linux`}const We=Ue(),w=(e,t)=>We?e:t,Ge=w(`◆`,`*`),Ke=w(`■`,`x`),qe=w(`▲`,`x`),Je=w(`◇`,`o`),Ye=w(`┌`,`T`),T=w(`│`,`|`),E=w(`└`,`—`),Xe=w(`●`,`>`),Ze=w(`○`,` `),Qe=w(`●`,`•`),$e=w(`◆`,`*`),et=w(`▲`,`!`),tt=w(`■`,`x`),nt=e=>{switch(e){case`initial`:case`active`:return _.default.cyan(Ge);case`cancel`:return _.default.red(Ke);case`error`:return _.default.yellow(qe);case`submit`:return _.default.green(Je)}},rt=e=>{let{cursor:t,options:n,style:r}=e,i=e.maxItems??1/0,a=Math.max(process.stdout.rows-4,0),o=Math.min(a,Math.max(i,5)),s=0;t>=s+o-3?s=Math.max(Math.min(t-o+3,n.length-o),0):t<s+2&&(s=Math.max(t-2,0));let c=o<n.length&&s>0,l=o<n.length&&s+o<n.length;return n.slice(s,s+o).map((e,n,i)=>{let a=n===0&&c,o=n===i.length-1&&l;return a||o?_.default.dim(`...`):r(e,n+s===t)})},it=e=>new He({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){let t=`${_.default.gray(T)}
|
|
16
|
+
${nt(this.state)} ${e.message}
|
|
17
|
+
`,n=e.placeholder?_.default.inverse(e.placeholder[0])+_.default.dim(e.placeholder.slice(1)):_.default.inverse(_.default.hidden(`_`)),r=this.value?this.valueWithCursor:n;switch(this.state){case`error`:return`${t.trim()}
|
|
18
|
+
${_.default.yellow(T)} ${r}
|
|
19
|
+
${_.default.yellow(E)} ${_.default.yellow(this.error)}
|
|
20
|
+
`;case`submit`:return`${t}${_.default.gray(T)} ${_.default.dim(this.value||e.placeholder)}`;case`cancel`:return`${t}${_.default.gray(T)} ${_.default.strikethrough(_.default.dim(this.value??``))}${this.value?.trim()?`
|
|
21
|
+
${_.default.gray(T)}`:``}`;default:return`${t}${_.default.cyan(T)} ${r}
|
|
22
|
+
${_.default.cyan(E)}
|
|
23
|
+
`}}}).prompt(),at=e=>{let t=(e,t)=>{let n=e.label??String(e.value);switch(t){case`selected`:return`${_.default.dim(n)}`;case`active`:return`${_.default.green(Xe)} ${n} ${e.hint?_.default.dim(`(${e.hint})`):``}`;case`cancelled`:return`${_.default.strikethrough(_.default.dim(n))}`;default:return`${_.default.dim(Ze)} ${_.default.dim(n)}`}};return new Ve({options:e.options,initialValue:e.initialValue,render(){let n=`${_.default.gray(T)}
|
|
24
|
+
${nt(this.state)} ${e.message}
|
|
25
|
+
`;switch(this.state){case`submit`:return`${n}${_.default.gray(T)} ${t(this.options[this.cursor],`selected`)}`;case`cancel`:return`${n}${_.default.gray(T)} ${t(this.options[this.cursor],`cancelled`)}
|
|
26
|
+
${_.default.gray(T)}`;default:return`${n}${_.default.cyan(T)} ${rt({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(e,n)=>t(e,n?`active`:`inactive`)}).join(`
|
|
27
|
+
${_.default.cyan(T)} `)}
|
|
28
|
+
${_.default.cyan(E)}
|
|
29
|
+
`}}}).prompt()},ot=(e=``)=>{process.stdout.write(`${_.default.gray(Ye)} ${e}
|
|
30
|
+
`)},st=(e=``)=>{process.stdout.write(`${_.default.gray(T)}
|
|
31
|
+
${_.default.gray(E)} ${e}
|
|
32
|
+
|
|
33
|
+
`)},D={message:(e=``,{symbol:t=_.default.gray(T)}={})=>{let n=[`${_.default.gray(T)}`];if(e){let[r,...i]=e.split(`
|
|
34
|
+
`);n.push(`${t} ${r}`,...i.map(e=>`${_.default.gray(T)} ${e}`))}process.stdout.write(`${n.join(`
|
|
35
|
+
`)}
|
|
36
|
+
`)},info:e=>{D.message(e,{symbol:_.default.blue(Qe)})},success:e=>{D.message(e,{symbol:_.default.green($e)})},step:e=>{D.message(e,{symbol:_.default.green(Je)})},warn:e=>{D.message(e,{symbol:_.default.yellow(et)})},warning:e=>{D.warn(e)},error:e=>{D.message(e,{symbol:_.default.red(tt)})}},ct=`${_.default.gray(T)} `,O={message:async(e,{symbol:t=_.default.gray(T)}={})=>{process.stdout.write(`${_.default.gray(T)}
|
|
37
|
+
${t} `);let n=3;for await(let t of e){t=t.replace(/\n/g,`
|
|
38
|
+
${ct}`),t.includes(`
|
|
39
|
+
`)&&(n=3+r(t.slice(t.lastIndexOf(`
|
|
40
|
+
`))).length);let e=r(t).length;n+e<process.stdout.columns?(n+=e,process.stdout.write(t)):(process.stdout.write(`
|
|
41
|
+
${ct}${t.trimStart()}`),n=3+r(t.trimStart()).length)}process.stdout.write(`
|
|
42
|
+
`)},info:e=>O.message(e,{symbol:_.default.blue(Qe)}),success:e=>O.message(e,{symbol:_.default.green($e)}),step:e=>O.message(e,{symbol:_.default.green(Je)}),warn:e=>O.message(e,{symbol:_.default.yellow(et)}),warning:e=>O.warn(e),error:e=>O.message(e,{symbol:_.default.red(tt)})};function k(e){return e==null?[]:Array.isArray(e)?e:[e]}function lt(e,t,n,r){var i,a=e[t],o=~r.string.indexOf(t)?n==null||n===!0?``:String(n):typeof n==`boolean`?n:~r.boolean.indexOf(t)?n===`false`?!1:n===`true`||(e._.push((i=+n,i*0==0?i:n)),!!n):(i=+n,i*0==0?i:n);e[t]=a==null?o:Array.isArray(a)?a.concat(o):[a,o]}function ut(e,t){e||=[],t||={};var n,r,i,a,o,s={_:[]},c=0,l=0,u=0,d=e.length;let f=t.alias!==void 0,p=t.unknown!==void 0,m=t.default!==void 0;if(t.alias=t.alias||{},t.string=k(t.string),t.boolean=k(t.boolean),f)for(n in t.alias)for(r=t.alias[n]=k(t.alias[n]),c=0;c<r.length;c++)(t.alias[r[c]]=r.concat(n)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(r=t.alias[t.boolean[c]]||[],l=r.length;l-- >0;)t.boolean.push(r[l]);for(c=t.string.length;c-- >0;)for(r=t.alias[t.string[c]]||[],l=r.length;l-- >0;)t.string.push(r[l]);if(m){for(n in t.default)if(a=typeof t.default[n],r=t.alias[n]=t.alias[n]||[],t[a]!==void 0)for(t[a].push(n),c=0;c<r.length;c++)t[a].push(r[c])}let h=p?Object.keys(t.alias):[];for(c=0;c<d;c++){if(i=e[c],i===`--`){s._=s._.concat(e.slice(++c));break}for(l=0;l<i.length&&i.charCodeAt(l)===45;l++);if(l===0)s._.push(i);else if(i.substring(l,l+3)===`no-`){if(a=i.substring(l+3),p&&!~h.indexOf(a))return t.unknown(i);s[a]=!1}else{for(u=l+1;u<i.length&&i.charCodeAt(u)!==61;u++);for(a=i.substring(l,u),o=i.substring(++u)||c+1===d||(``+e[c+1]).charCodeAt(0)===45||e[++c],r=l===2?[a]:a,u=0;u<r.length;u++){if(a=r[u],p&&!~h.indexOf(a))return t.unknown(`-`.repeat(l)+a);lt(s,a,u+1<r.length||o,t)}}}if(m)for(n in t.default)s[n]===void 0&&(s[n]=t.default[n]);if(f)for(n in s)for(r=t.alias[n]||[];r.length>0;)s[r.shift()]=s[n];return s}const dt=e=>e.replace(/[<[].+/,``).trim(),ft=e=>{let t=/<([^>]+)>/g,n=/\[([^\]]+)\]/g,r=[],i=e=>{let t=!1,n=e[1];return n.startsWith(`...`)&&(n=n.slice(3),t=!0),{required:e[0].startsWith(`<`),value:n,variadic:t}},a;for(;a=t.exec(e);)r.push(i(a));let o;for(;o=n.exec(e);)r.push(i(o));return r},pt=e=>{let t={alias:{},boolean:[]};for(let[n,r]of e.entries())r.names.length>1&&(t.alias[r.names[0]]=r.names.slice(1)),r.isBoolean&&(r.negated&&e.some((e,t)=>t!==n&&e.names.some(e=>r.names.includes(e))&&typeof e.required==`boolean`)||t.boolean.push(r.names[0]));return t},mt=e=>e.sort((e,t)=>e.length>t.length?-1:1)[0],ht=(e,t)=>e.length>=t?e:`${e}${` `.repeat(t-e.length)}`,gt=e=>e.replace(/([a-z])-([a-z])/g,(e,t,n)=>t+n.toUpperCase()),_t=(e,t,n)=>{let r=0,i=t.length,a=e,o;for(;r<i;++r)o=a[t[r]],a=a[t[r]]=r===i-1?n:o??(~t[r+1].indexOf(`.`)||!(+t[r+1]>-1)?{}:[])},vt=(e,t)=>{for(let n of Object.keys(t)){let r=t[n];r.shouldTransform&&(e[n]=Array.prototype.concat.call([],e[n]),typeof r.transformFunction==`function`&&(e[n]=e[n].map(r.transformFunction)))}},yt=e=>{let t=/([^\\\/]+)$/.exec(e);return t?t[1]:``},bt=e=>e.split(`.`).map((e,t)=>t===0?gt(e):e).join(`.`);var A=class extends Error{constructor(e){super(e),this.name=this.constructor.name,typeof Error.captureStackTrace==`function`?Error.captureStackTrace(this,this.constructor):this.stack=Error(e).stack}},xt=class{constructor(e,t,n){this.rawName=e,this.description=t,this.config=Object.assign({},n),e=e.replace(/\.\*/g,``),this.negated=!1,this.names=dt(e).split(`,`).map(e=>{let t=e.trim().replace(/^-{1,2}/,``);return t.startsWith(`no-`)&&(this.negated=!0,t=t.replace(/^no-/,``)),bt(t)}).sort((e,t)=>e.length>t.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null&&(this.config.default=!0),e.includes(`<`)?this.required=!0:e.includes(`[`)?this.required=!1:this.isBoolean=!0}};const St=process.argv,Ct=`${process.platform}-${process.arch} node-${process.version}`;var wt=class{constructor(e,t,n={},r){this.rawName=e,this.description=t,this.config=n,this.cli=r,this.options=[],this.aliasNames=[],this.name=dt(e),this.args=ft(e),this.examples=[]}usage(e){return this.usageText=e,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(e,t=`-v, --version`){return this.versionNumber=e,this.option(t,`Display version number`),this}example(e){return this.examples.push(e),this}option(e,t,n){let r=new xt(e,t,n);return this.options.push(r),this}alias(e){return this.aliasNames.push(e),this}action(e){return this.commandAction=e,this}isMatched(e){return this.name===e||this.aliasNames.includes(e)}get isDefaultCommand(){return this.name===``||this.aliasNames.includes(`!`)}get isGlobalCommand(){return this instanceof Tt}hasOption(e){return e=e.split(`.`)[0],this.options.find(t=>t.names.includes(e))}outputHelp(){let{name:e,commands:t}=this.cli,{versionNumber:n,options:r,helpCallback:i}=this.cli.globalCommand,a=[{body:`${e}${n?`/${n}`:``}`}];if(a.push({title:`Usage`,body:` $ ${e} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&t.length>0){let n=mt(t.map(e=>e.rawName));a.push({title:`Commands`,body:t.map(e=>` ${ht(e.rawName,n.length)} ${e.description}`).join(`
|
|
43
|
+
`)}),a.push({title:"For more info, run any command with the `--help` flag",body:t.map(t=>` $ ${e}${t.name===``?``:` ${t.name}`} --help`).join(`
|
|
44
|
+
`)})}let o=this.isGlobalCommand?r:[...this.options,...r||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(o=o.filter(e=>e.name!==`version`)),o.length>0){let e=mt(o.map(e=>e.rawName));a.push({title:`Options`,body:o.map(t=>` ${ht(t.rawName,e.length)} ${t.description} ${t.config.default===void 0?``:`(default: ${t.config.default})`}`).join(`
|
|
45
|
+
`)})}this.examples.length>0&&a.push({title:`Examples`,body:this.examples.map(t=>typeof t==`function`?t(e):t).join(`
|
|
46
|
+
`)}),i&&(a=i(a)||a),console.log(a.map(e=>e.title?`${e.title}:
|
|
47
|
+
${e.body}`:e.body).join(`
|
|
48
|
+
|
|
49
|
+
`))}outputVersion(){let{name:e}=this.cli,{versionNumber:t}=this.cli.globalCommand;t&&console.log(`${e}/${t} ${Ct}`)}checkRequiredArgs(){let e=this.args.filter(e=>e.required).length;if(this.cli.args.length<e)throw new A(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:e,globalCommand:t}=this.cli;if(!this.config.allowUnknownOptions){for(let n of Object.keys(e))if(n!==`--`&&!this.hasOption(n)&&!t.hasOption(n))throw new A(`Unknown option \`${n.length>1?`--${n}`:`-${n}`}\``)}}checkOptionValue(){let{options:e,globalCommand:t}=this.cli,n=[...t.options,...this.options];for(let t of n){let r=e[t.name.split(`.`)[0]];if(t.required){let e=n.some(e=>e.negated&&e.names.includes(t.name));if(r===!0||r===!1&&!e)throw new A(`option \`${t.rawName}\` value is missing`)}}}},Tt=class extends wt{constructor(e){super(`@@global@@`,``,{},e)}},j=Object.assign,Et=class extends s{constructor(e=``){super(),this.name=e,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new Tt(this),this.globalCommand.usage(`<command> [options]`)}usage(e){return this.globalCommand.usage(e),this}command(e,t,n){let r=new wt(e,t||``,n,this);return r.globalCommand=this.globalCommand,this.commands.push(r),r}option(e,t,n){return this.globalCommand.option(e,t,n),this}help(e){return this.globalCommand.option(`-h, --help`,`Display this message`),this.globalCommand.helpCallback=e,this.showHelpOnExit=!0,this}version(e,t=`-v, --version`){return this.globalCommand.version(e,t),this.showVersionOnExit=!0,this}example(e){return this.globalCommand.example(e),this}outputHelp(){this.matchedCommand?this.matchedCommand.outputHelp():this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:e,options:t},n,r){return this.args=e,this.options=t,n&&(this.matchedCommand=n),r&&(this.matchedCommandName=r),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(e=St,{run:t=!0}={}){this.rawArgs=e,this.name||=e[1]?yt(e[1]):`cli`;let n=!0;for(let t of this.commands){let r=this.mri(e.slice(2),t),i=r.args[0];if(t.isMatched(i)){n=!1;let e=j(j({},r),{args:r.args.slice(1)});this.setParsedInfo(e,t,i),this.emit(`command:${i}`,t)}}if(n){for(let t of this.commands)if(t.name===``){n=!1;let r=this.mri(e.slice(2),t);this.setParsedInfo(r,t),this.emit(`command:!`,t)}}if(n){let t=this.mri(e.slice(2));this.setParsedInfo(t)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),t=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),t=!1,this.unsetMatchedCommand());let r={args:this.args,options:this.options};return t&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit(`command:*`),r}mri(e,t){let n=[...this.globalCommand.options,...t?t.options:[]],r=pt(n),i=[],a=e.indexOf(`--`);a>-1&&(i=e.slice(a+1),e=e.slice(0,a));let o=ut(e,r);o=Object.keys(o).reduce((e,t)=>j(j({},e),{[bt(t)]:o[t]}),{_:[]});let s=o._,c={"--":i},l=t&&t.config.ignoreOptionDefaultValue?t.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,u=Object.create(null);for(let e of n){if(!l&&e.config.default!==void 0)for(let t of e.names)c[t]=e.config.default;Array.isArray(e.config.type)&&u[e.name]===void 0&&(u[e.name]=Object.create(null),u[e.name].shouldTransform=!0,u[e.name].transformFunction=e.config.type[0])}for(let e of Object.keys(o))e!==`_`&&(_t(c,e.split(`.`),o[e]),vt(c,u));return{args:s,options:c}}runMatchedCommand(){let{args:e,options:t,matchedCommand:n}=this;if(!n||!n.commandAction)return;n.checkUnknownOptions(),n.checkOptionValue(),n.checkRequiredArgs();let r=[];return n.args.forEach((t,n)=>{t.variadic?r.push(e.slice(n)):r.push(e[n])}),r.push(t),n.commandAction.apply(this,r)}};const Dt=(e=``)=>new Et(e),Ot=6048e5,kt=3600*24;kt*7,kt*365.2425;const At=Symbol.for(`constructDateFrom`);function M(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&At in e?e[At](t):e instanceof Date?new e.constructor(t):new Date(t)}function N(e,t){return M(t||e,e)}function P(e,t,n){let r=N(e,n?.in);return isNaN(t)?M(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}let jt={};function F(){return jt}function I(e,t){let n=F(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=N(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function L(e,t){return I(e,{...t,weekStartsOn:1})}function Mt(e,t){let n=N(e,t?.in),r=n.getFullYear(),i=M(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=L(i),o=M(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=L(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function R(e){let t=N(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function Nt(e,...t){let n=M.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function Pt(e,t){let n=N(e,t?.in);return n.setHours(0,0,0,0),n}function Ft(e,t,n){let[r,i]=Nt(n?.in,e,t),a=Pt(r),o=Pt(i),s=+a-R(a),c=+o-R(o);return Math.round((s-c)/864e5)}function It(e,t){let n=Mt(e,t),r=M(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),L(r)}function Lt(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function Rt(e){return!(!Lt(e)&&typeof e!=`number`||isNaN(+N(e)))}function zt(e,t){let n=N(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Bt={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},Vt=(e,t,n)=>{let r,i=Bt[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function Ht(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ut={date:Ht({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:Ht({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:Ht({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},Wt={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},Gt=(e,t,n,r)=>Wt[e];function z(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const Kt={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:z({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:z({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:z({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:z({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:z({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function B(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?Jt(s,e=>e.test(o)):qt(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function qt(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Jt(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Yt(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}const Xt={code:`en-US`,formatDistance:Vt,formatLong:Ut,formatRelative:Gt,localize:Kt,match:{ordinalNumber:Yt({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:B({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:B({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:B({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:B({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:B({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Zt(e,t){let n=N(e,t?.in);return Ft(n,zt(n))+1}function Qt(e,t){let n=N(e,t?.in),r=L(n)-+It(n);return Math.round(r/Ot)+1}function $t(e,t){let n=N(e,t?.in),r=n.getFullYear(),i=F(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=M(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=I(o,t),c=M(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=I(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function en(e,t){let n=F(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=$t(e,t),a=M(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),I(a,t)}function tn(e,t){let n=N(e,t?.in),r=I(n,t)-+en(n,t);return Math.round(r/Ot)+1}function V(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}const H={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return V(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):V(n+1,2)},d(e,t){return V(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];case`aaaa`:default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return V(e.getHours()%12||12,t.length)},H(e,t){return V(e.getHours(),t.length)},m(e,t){return V(e.getMinutes(),t.length)},s(e,t){return V(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return V(Math.trunc(r*10**(n-3)),t.length)}},U={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},nn={G:function(e,t,n){let r=e.getFullYear()>0?1:0;switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});case`GGGG`:default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return H.y(e,t)},Y:function(e,t,n,r){let i=$t(e,r),a=i>0?i:1-i;return t===`YY`?V(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):V(a,t.length)},R:function(e,t){return V(Mt(e),t.length)},u:function(e,t){return V(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return V(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});case`QQQQ`:default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return V(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});case`qqqq`:default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return H.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});case`MMMM`:default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return V(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});case`LLLL`:default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=tn(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):V(i,t.length)},I:function(e,t,n){let r=Qt(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):V(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):H.d(e,t)},D:function(e,t,n){let r=Zt(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):V(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});case`EEEE`:default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return V(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});case`eeee`:default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return V(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});case`cccc`:default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return V(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});case`iiii`:default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});case`aaaa`:default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?U.noon:r===0?U.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`bbbb`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?U.evening:r>=12?U.afternoon:r>=4?U.morning:U.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`BBBB`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return H.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):H.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):V(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):V(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):H.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):H.s(e,t)},S:function(e,t){return H.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return an(r);case`XXXX`:case`XX`:return W(r);case`XXXXX`:case`XXX`:default:return W(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return an(r);case`xxxx`:case`xx`:return W(r);case`xxxxx`:case`xxx`:default:return W(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+rn(r,`:`);case`OOOO`:default:return`GMT`+W(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+rn(r,`:`);case`zzzz`:default:return`GMT`+W(r,`:`)}},t:function(e,t,n){return V(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return V(+e,t.length)}};function rn(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+V(a,2)}function an(e,t){return e%60==0?(e>0?`-`:`+`)+V(Math.abs(e)/60,2):W(e,t)}function W(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=V(Math.trunc(r/60),2),a=V(r%60,2);return n+i+t+a}const on=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});case`PPPP`:default:return t.date({width:`full`})}},sn=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});case`pppp`:default:return t.time({width:`full`})}},cn={p:sn,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return on(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;case`PPPP`:default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,on(r,t)).replace(`{{time}}`,sn(i,t))}},ln=/^D+$/,un=/^Y+$/,dn=[`D`,`DD`,`YY`,`YYYY`];function fn(e){return ln.test(e)}function pn(e){return un.test(e)}function mn(e,t,n){let r=hn(e,t,n);if(console.warn(r),dn.includes(e))throw RangeError(r)}function hn(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const gn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_n=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vn=/^'([^]*?)'?$/,yn=/''/g,bn=/[a-zA-Z]/;function G(e,t,n){let r=F(),i=n?.locale??r.locale??Xt,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=N(e,n?.in);if(!Rt(s))throw RangeError(`Invalid time value`);let c=t.match(_n).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=cn[t];return n(e,i.formatLong)}return e}).join(``).match(gn).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:xn(e)};if(nn[t])return{isToken:!0,value:e};if(t.match(bn))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&pn(a)||!n?.useAdditionalDayOfYearTokens&&fn(a))&&mn(a,t,String(e));let o=nn[a[0]];return o(s,a,i.localize,l)}).join(``)}function xn(e){let t=e.match(vn);return t?t[1].replace(yn,`'`):e}function Sn(){return Object.assign({},F())}function Cn(e,t){let n=N(e,t?.in).getDay();return n===0?7:n}function wn(e,t){let n=Tn(t)?new t(0):M(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Tn(e){return typeof e==`function`&&e.prototype?.constructor===e}var En=class{subPriority=0;validate(e,t){return!0}},Dn=class extends En{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}},On=class extends En{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>M(t,e))}set(e,t){return t.timestampIsSet?e:M(e,wn(e,this.context))}},K=class{run(e,t,n,r){let i=this.parse(e,t,n,r);return i?{setter:new Dn(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}},kn=class extends K{priority=140;parse(e,t,n){switch(t){case`G`:case`GG`:case`GGG`:return n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`});case`GGGGG`:return n.era(e,{width:`narrow`});case`GGGG`:default:return n.era(e,{width:`wide`})||n.era(e,{width:`abbreviated`})||n.era(e,{width:`narrow`})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`R`,`u`,`t`,`T`]};const q={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},J={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Y(e,t){return e&&{value:t(e.value),rest:e.rest}}function X(e,t){let n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Z(e,t){let n=t.match(e);if(!n)return null;if(n[0]===`Z`)return{value:0,rest:t.slice(1)};let r=n[1]===`+`?1:-1,i=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(i*36e5+a*6e4+o*1e3),rest:t.slice(n[0].length)}}function An(e){return X(q.anyDigitsSigned,e)}function Q(e,t){switch(e){case 1:return X(q.singleDigit,t);case 2:return X(q.twoDigits,t);case 3:return X(q.threeDigits,t);case 4:return X(q.fourDigits,t);default:return X(RegExp(`^\\d{1,`+e+`}`),t)}}function jn(e,t){switch(e){case 1:return X(q.singleDigitSigned,t);case 2:return X(q.twoDigitsSigned,t);case 3:return X(q.threeDigitsSigned,t);case 4:return X(q.fourDigitsSigned,t);default:return X(RegExp(`^-?\\d{1,`+e+`}`),t)}}function Mn(e){switch(e){case`morning`:return 4;case`evening`:return 17;case`pm`:case`noon`:case`afternoon`:return 12;case`am`:case`midnight`:case`night`:default:return 0}}function Nn(e,t){let n=t>0,r=n?t:1-t,i;if(r<=50)i=e||100;else{let t=r+50,n=Math.trunc(t/100)*100,a=e>=t%100;i=e+n-(a?100:0)}return n?i:1-i}function Pn(e){return e%400==0||e%4==0&&e%100!=0}var Fn=class extends K{priority=130;incompatibleTokens=[`Y`,`R`,`u`,`w`,`I`,`i`,`e`,`c`,`t`,`T`];parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`yy`});switch(t){case`y`:return Y(Q(4,e),r);case`yo`:return Y(n.ordinalNumber(e,{unit:`year`}),r);default:return Y(Q(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){let r=e.getFullYear();if(n.isTwoDigitYear){let t=Nn(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}let i=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},In=class extends K{priority=130;parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:t===`YY`});switch(t){case`Y`:return Y(Q(4,e),r);case`Yo`:return Y(n.ordinalNumber(e,{unit:`year`}),r);default:return Y(Q(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){let i=$t(e,r);if(n.isTwoDigitYear){let t=Nn(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),I(e,r)}let a=!(`era`in t)||t.era===1?n.year:1-n.year;return e.setFullYear(a,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),I(e,r)}incompatibleTokens=[`y`,`R`,`u`,`Q`,`q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`]},Ln=class extends K{priority=130;parse(e,t){return jn(t===`R`?4:t.length,e)}set(e,t,n){let r=M(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),L(r)}incompatibleTokens=[`G`,`y`,`Y`,`u`,`Q`,`q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`]},Rn=class extends K{priority=130;parse(e,t){return jn(t===`u`?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`G`,`y`,`Y`,`R`,`w`,`I`,`i`,`e`,`c`,`t`,`T`]},zn=class extends K{priority=120;parse(e,t,n){switch(t){case`Q`:case`QQ`:return Q(t.length,e);case`Qo`:return n.ordinalNumber(e,{unit:`quarter`});case`QQQ`:return n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`});case`QQQQQ`:return n.quarter(e,{width:`narrow`,context:`formatting`});case`QQQQ`:default:return n.quarter(e,{width:`wide`,context:`formatting`})||n.quarter(e,{width:`abbreviated`,context:`formatting`})||n.quarter(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`]},Bn=class extends K{priority=120;parse(e,t,n){switch(t){case`q`:case`qq`:return Q(t.length,e);case`qo`:return n.ordinalNumber(e,{unit:`quarter`});case`qqq`:return n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`});case`qqqqq`:return n.quarter(e,{width:`narrow`,context:`standalone`});case`qqqq`:default:return n.quarter(e,{width:`wide`,context:`standalone`})||n.quarter(e,{width:`abbreviated`,context:`standalone`})||n.quarter(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`Q`,`M`,`L`,`w`,`I`,`d`,`D`,`i`,`e`,`c`,`t`,`T`]},Vn=class extends K{incompatibleTokens=[`Y`,`R`,`q`,`Q`,`L`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`];priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case`M`:return Y(X(q.month,e),r);case`MM`:return Y(Q(2,e),r);case`Mo`:return Y(n.ordinalNumber(e,{unit:`month`}),r);case`MMM`:return n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`});case`MMMMM`:return n.month(e,{width:`narrow`,context:`formatting`});case`MMMM`:default:return n.month(e,{width:`wide`,context:`formatting`})||n.month(e,{width:`abbreviated`,context:`formatting`})||n.month(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},Hn=class extends K{priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case`L`:return Y(X(q.month,e),r);case`LL`:return Y(Q(2,e),r);case`Lo`:return Y(n.ordinalNumber(e,{unit:`month`}),r);case`LLL`:return n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`});case`LLLLL`:return n.month(e,{width:`narrow`,context:`standalone`});case`LLLL`:default:return n.month(e,{width:`wide`,context:`standalone`})||n.month(e,{width:`abbreviated`,context:`standalone`})||n.month(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`M`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`]};function Un(e,t,n){let r=N(e,n?.in),i=tn(r,n)-t;return r.setDate(r.getDate()-i*7),N(r,n?.in)}var Wn=class extends K{priority=100;parse(e,t,n){switch(t){case`w`:return X(q.week,e);case`wo`:return n.ordinalNumber(e,{unit:`week`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return I(Un(e,n,r),r)}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`i`,`t`,`T`]};function Gn(e,t,n){let r=N(e,n?.in),i=Qt(r,n)-t;return r.setDate(r.getDate()-i*7),r}var Kn=class extends K{priority=100;parse(e,t,n){switch(t){case`I`:return X(q.week,e);case`Io`:return n.ordinalNumber(e,{unit:`week`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return L(Gn(e,n))}incompatibleTokens=[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`e`,`c`,`t`,`T`]};const qn=[31,28,31,30,31,30,31,31,30,31,30,31],Jn=[31,29,31,30,31,30,31,31,30,31,30,31];var Yn=class extends K{priority=90;subPriority=1;parse(e,t,n){switch(t){case`d`:return X(q.date,e);case`do`:return n.ordinalNumber(e,{unit:`date`});default:return Q(t.length,e)}}validate(e,t){let n=Pn(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=Jn[r]:t>=1&&t<=qn[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`w`,`I`,`D`,`i`,`e`,`c`,`t`,`T`]},Xn=class extends K{priority=90;subpriority=1;parse(e,t,n){switch(t){case`D`:case`DD`:return X(q.dayOfYear,e);case`Do`:return n.ordinalNumber(e,{unit:`date`});default:return Q(t.length,e)}}validate(e,t){return Pn(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=[`Y`,`R`,`q`,`Q`,`M`,`L`,`w`,`I`,`d`,`E`,`i`,`e`,`c`,`t`,`T`]};function Zn(e,t,n){let r=F(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=N(e,n?.in),o=a.getDay(),s=(t%7+7)%7,c=7-i;return P(a,t<0||t>6?t-(o+c)%7:(s+c)%7-(o+c)%7,n)}var Qn=class extends K{priority=90;parse(e,t,n){switch(t){case`E`:case`EE`:case`EEE`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`EEEEE`:return n.day(e,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`EEEE`:default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=Zn(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`D`,`i`,`e`,`c`,`t`,`T`]},$n=class extends K{priority=90;parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`e`:case`ee`:return Y(Q(t.length,e),i);case`eo`:return Y(n.ordinalNumber(e,{unit:`day`}),i);case`eee`:return n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`eeeee`:return n.day(e,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`});case`eeee`:default:return n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=Zn(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`c`,`t`,`T`]},er=class extends K{priority=90;parse(e,t,n,r){let i=e=>{let t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case`c`:case`cc`:return Y(Q(t.length,e),i);case`co`:return Y(n.ordinalNumber(e,{unit:`day`}),i);case`ccc`:return n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});case`ccccc`:return n.day(e,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`});case`cccc`:default:return n.day(e,{width:`wide`,context:`standalone`})||n.day(e,{width:`abbreviated`,context:`standalone`})||n.day(e,{width:`short`,context:`standalone`})||n.day(e,{width:`narrow`,context:`standalone`})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=Zn(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`R`,`u`,`q`,`Q`,`M`,`L`,`I`,`d`,`D`,`E`,`i`,`e`,`t`,`T`]};function tr(e,t,n){let r=N(e,n?.in);return P(r,t-Cn(r,n),n)}var nr=class extends K{priority=90;parse(e,t,n){let r=e=>e===0?7:e;switch(t){case`i`:case`ii`:return Q(t.length,e);case`io`:return n.ordinalNumber(e,{unit:`day`});case`iii`:return Y(n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiii`:return Y(n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiiiii`:return Y(n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r);case`iiii`:default:return Y(n.day(e,{width:`wide`,context:`formatting`})||n.day(e,{width:`abbreviated`,context:`formatting`})||n.day(e,{width:`short`,context:`formatting`})||n.day(e,{width:`narrow`,context:`formatting`}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return e=tr(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=[`y`,`Y`,`u`,`q`,`Q`,`M`,`L`,`w`,`d`,`D`,`E`,`e`,`c`,`t`,`T`]},rr=class extends K{priority=80;parse(e,t,n){switch(t){case`a`:case`aa`:case`aaa`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`aaaaa`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`aaaa`:default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Mn(n),0,0,0),e}incompatibleTokens=[`b`,`B`,`H`,`k`,`t`,`T`]},ir=class extends K{priority=80;parse(e,t,n){switch(t){case`b`:case`bb`:case`bbb`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`bbbbb`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`bbbb`:default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Mn(n),0,0,0),e}incompatibleTokens=[`a`,`B`,`H`,`k`,`t`,`T`]},ar=class extends K{priority=80;parse(e,t,n){switch(t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`BBBBB`:return n.dayPeriod(e,{width:`narrow`,context:`formatting`});case`BBBB`:default:return n.dayPeriod(e,{width:`wide`,context:`formatting`})||n.dayPeriod(e,{width:`abbreviated`,context:`formatting`})||n.dayPeriod(e,{width:`narrow`,context:`formatting`})}}set(e,t,n){return e.setHours(Mn(n),0,0,0),e}incompatibleTokens=[`a`,`b`,`t`,`T`]},or=class extends K{priority=70;parse(e,t,n){switch(t){case`h`:return X(q.hour12h,e);case`ho`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){let r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):!r&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=[`H`,`K`,`k`,`t`,`T`]},sr=class extends K{priority=70;parse(e,t,n){switch(t){case`H`:return X(q.hour23h,e);case`Ho`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=[`a`,`b`,`h`,`K`,`k`,`t`,`T`]},cr=class extends K{priority=70;parse(e,t,n){switch(t){case`K`:return X(q.hour11h,e);case`Ko`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=[`h`,`H`,`k`,`t`,`T`]},lr=class extends K{priority=70;parse(e,t,n){switch(t){case`k`:return X(q.hour24h,e);case`ko`:return n.ordinalNumber(e,{unit:`hour`});default:return Q(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){let r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=[`a`,`b`,`h`,`H`,`K`,`t`,`T`]},ur=class extends K{priority=60;parse(e,t,n){switch(t){case`m`:return X(q.minute,e);case`mo`:return n.ordinalNumber(e,{unit:`minute`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=[`t`,`T`]},dr=class extends K{priority=50;parse(e,t,n){switch(t){case`s`:return X(q.second,e);case`so`:return n.ordinalNumber(e,{unit:`second`});default:return Q(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=[`t`,`T`]},fr=class extends K{priority=30;parse(e,t){return Y(Q(t.length,e),e=>Math.trunc(e*10**(-t.length+3)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=[`t`,`T`]},pr=class extends K{priority=10;parse(e,t){switch(t){case`X`:return Z(J.basicOptionalMinutes,e);case`XX`:return Z(J.basic,e);case`XXXX`:return Z(J.basicOptionalSeconds,e);case`XXXXX`:return Z(J.extendedOptionalSeconds,e);case`XXX`:default:return Z(J.extended,e)}}set(e,t,n){return t.timestampIsSet?e:M(e,e.getTime()-R(e)-n)}incompatibleTokens=[`t`,`T`,`x`]},mr=class extends K{priority=10;parse(e,t){switch(t){case`x`:return Z(J.basicOptionalMinutes,e);case`xx`:return Z(J.basic,e);case`xxxx`:return Z(J.basicOptionalSeconds,e);case`xxxxx`:return Z(J.extendedOptionalSeconds,e);case`xxx`:default:return Z(J.extended,e)}}set(e,t,n){return t.timestampIsSet?e:M(e,e.getTime()-R(e)-n)}incompatibleTokens=[`t`,`T`,`X`]},hr=class extends K{priority=40;parse(e){return An(e)}set(e,t,n){return[M(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens=`*`},gr=class extends K{priority=20;parse(e){return An(e)}set(e,t,n){return[M(e,n),{timestampIsSet:!0}]}incompatibleTokens=`*`};const _r={G:new kn,y:new Fn,Y:new In,R:new Ln,u:new Rn,Q:new zn,q:new Bn,M:new Vn,L:new Hn,w:new Wn,I:new Kn,d:new Yn,D:new Xn,E:new Qn,e:new $n,c:new er,i:new nr,a:new rr,b:new ir,B:new ar,h:new or,H:new sr,K:new cr,k:new lr,m:new ur,s:new dr,S:new fr,X:new pr,x:new mr,t:new hr,T:new gr},vr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,br=/^'([^]*?)'?$/,xr=/''/g,Sr=/\S/,Cr=/[a-zA-Z]/;function wr(e,t,n,r){let i=()=>M(r?.in||n,NaN),a=Sn(),o=r?.locale??a.locale??Xt,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,c=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?i():N(n,r?.in);let l={firstWeekContainsDate:s,weekStartsOn:c,locale:o},u=[new On(r?.in,n)],d=t.match(yr).map(e=>{let t=e[0];if(t in cn){let n=cn[t];return n(e,o.formatLong)}return e}).join(``).match(vr),f=[];for(let n of d){!r?.useAdditionalWeekYearTokens&&pn(n)&&mn(n,t,e),!r?.useAdditionalDayOfYearTokens&&fn(n)&&mn(n,t,e);let a=n[0],s=_r[a];if(s){let{incompatibleTokens:t}=s;if(Array.isArray(t)){let e=f.find(e=>t.includes(e.token)||e.token===a);if(e)throw RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if(s.incompatibleTokens===`*`&&f.length>0)throw RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);f.push({token:a,fullToken:n});let r=s.run(e,n,o.match,l);if(!r)return i();u.push(r.setter),e=r.rest}else{if(a.match(Cr))throw RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");if(n===`''`?n=`'`:a===`'`&&(n=Tr(n)),e.indexOf(n)===0)e=e.slice(n.length);else return i()}}if(e.length>0&&Sr.test(e))return i();let p=u.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>u.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]),m=N(n,r?.in);if(isNaN(+m))return i();let h={};for(let e of p){if(!e.validate(m,l))return i();let t=e.set(m,h,l);Array.isArray(t)?(m=t[0],Object.assign(h,t[1])):m=t}return m}function Tr(e){return e.match(br)[1].replace(xr,`'`)}var Er=`0.1.0`;function Dr(t,n=e.cwd()){let r=f(d(n,G(t,`yyyy-MM-dd`))),i=d(r,`content.md`);if(c(r)){if(D.warn(`Directory already exists: ${r}`),c(i))return D.info(`content.md already exists at: ${i}`),r}else l(r,{recursive:!0}),D.success(`Created directory: ${r}`);return u(i,``,`utf-8`),D.success(`Created content.md at: ${i}`),r}async function Or(){let t=new Date,n=[];for(let e=0;e<7;e++){let r=G(P(t,e),`yyyy-MM-dd`),i=r,a=`Create content for ${r}`;e===0?(i=`Today (${r})`,a=`Create content for today`):e===1?(i=`Tomorrow (${r})`,a=`Create content for tomorrow`):(i=`In ${e} days (${r})`,a=`Create content for ${r}`),n.push({label:i,value:`day-${e}`,hint:a})}n.push({label:`Custom date`,value:`custom`,hint:`Enter a specific date`});let r=await at({message:`When do you want to create content?`,options:n});if(Pe(r)&&(D.error(`Operation cancelled.`),e.exit(0)),r!==`custom`)return P(t,Number.parseInt(r.split(`-`)[1]));let i=await it({message:`Enter date (YYYY-MM-DD):`,placeholder:G(t,`yyyy-MM-dd`),validate:e=>{if(!e)return`Date is required`;if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return`Invalid date format. Please use YYYY-MM-DD`;try{let t=wr(e,`yyyy-MM-dd`,new Date);if(Number.isNaN(t.getTime()))return`Invalid date`}catch{return`Invalid date`}}});return Pe(i)&&(D.error(`Operation cancelled.`),e.exit(0)),wr(i,`yyyy-MM-dd`,new Date)}const $=Dt(`content-creation`);$.command(`[path]`,`Create a dated content directory with content.md file`).option(`--path <path>`,`Base path for content directory (defaults to current directory)`).action(async(t,n)=>{ot(`Content Creation - Create dated content directory`);let r=await Or();Dr(r,t||n?.path||e.cwd()),st(`✓ Content directory created: ${G(r,`yyyy-MM-dd`)}/content.md`)}),$.help(),$.version(Er),$.parse();export{};
|
package/package.json
CHANGED
|
@@ -1,4 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barbapapazes/content-creation",
|
|
3
|
-
"
|
|
4
|
-
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"author": "Estéban Soubiran <esteban@soubiran.dev>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"funding": "https://github.com/sponsors/Barbapapazes",
|
|
8
|
+
"homepage": "https://github.com/Barbapapazes/platform",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/Barbapapazes/platform",
|
|
12
|
+
"directory": "packages/@barbapapazes/content-creation"
|
|
13
|
+
},
|
|
14
|
+
"bugs": "https://github.com/Barbapapazes/platform/issues",
|
|
15
|
+
"bin": {
|
|
16
|
+
"content-creation": "./dist/cli.mjs"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=24"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@clack/prompts": "^0.10.1",
|
|
26
|
+
"cac": "^6.7.14",
|
|
27
|
+
"date-fns": "^4.1.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@tsconfig/node24": "^24.0.3",
|
|
31
|
+
"@types/node": "^22.19.3",
|
|
32
|
+
"tsdown": "^0.18.3",
|
|
33
|
+
"typescript": "^5.9.3"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"start": "node ./dist/cli.mjs",
|
|
37
|
+
"build": "tsdown"
|
|
38
|
+
}
|
|
39
|
+
}
|