mdat 1.0.3 → 1.0.4
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/bin/cli.js +60 -60
- package/dist/index.js +46 -46
- package/dist/readme/rules/utilities/cli-help/is-executable.d.ts +9 -0
- package/package.json +5 -6
- package/readme.md +1 -1
package/bin/cli.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var kk=Object.create;var Zl=Object.defineProperty;var wk=Object.getOwnPropertyDescriptor;var Ck=Object.getOwnPropertyNames;var Tk=Object.getPrototypeOf,_k=Object.prototype.hasOwnProperty;var Er=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var sa=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Od=(t,e)=>{for(var r in e)Zl(t,r,{get:e[r],enumerable:!0})},Sk=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ck(e))!_k.call(t,i)&&i!==r&&Zl(t,i,{get:()=>e[i],enumerable:!(n=wk(e,i))||n.enumerable});return t};var ns=(t,e,r)=>(r=t!=null?kk(Tk(t)):{},Sk(e||!t||!t.__esModule?Zl(r,"default",{value:t,enumerable:!0}):r,t));var la=sa((VL,Xl)=>{"use strict";var ua=process||{},vd=ua.argv||[],aa=ua.env||{},Ik=!(aa.NO_COLOR||vd.includes("--no-color"))&&(!!aa.FORCE_COLOR||vd.includes("--color")||ua.platform==="win32"||(ua.stdout||{}).isTTY&&aa.TERM!=="dumb"||!!aa.CI),Ok=(t,e,r=t)=>n=>{let i=""+n,o=i.indexOf(e,t.length);return~o?t+vk(i,e,r,o)+e:t+i+e},vk=(t,e,r,n)=>{let i="",o=0;do i+=t.substring(o,n)+r,o=n+e.length,n=t.indexOf(e,o);while(~n);return i+t.substring(o)},Dd=(t=Ik)=>{let e=t?Ok:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Xl.exports=Dd();Xl.exports.createColors=Dd});var Mh=sa((nj,Pw)=>{Pw.exports={addendum:"addenda",aircraft:"aircraft",alga:"algae",alumna:"alumnae",alumnus:"alumni",alveolus:"alveoli",amoeba:"amoebae",analysis:"analyses",antenna:"antennae",antithesis:"antitheses",apex:"apices",appendix:"appendices",automaton:"automata",axis:"axes",bacillus:"bacilli",bacterium:"bacteria",baculum:"bacula",barracks:"barracks",basis:"bases",beau:"beaux",bison:"bison",buffalo:"buffalo",bureau:"bureaus",cactus:"cacti",calf:"calves",carcinoma:"carcinomata",carp:"carp",census:"censuses",chassis:"chassis",cherub:"cherubim",child:"children",ch\u00E2teau:"ch\xE2teaus",cloaca:"cloacae",cod:"cod",codex:"codices",concerto:"concerti",consortium:"consortia",corpus:"corpora",crisis:"crises",criterion:"criteria",curriculum:"curricula",cystoma:"cystomata",datum:"data",deer:"deer",diagnosis:"diagnoses",die:"dice",dwarf:"dwarfs",echo:"echoes",elf:"elves",elk:"elk",ellipsis:"ellipses",embargo:"embargoes",emphasis:"emphases",erratum:"errata","faux pas":"faux pas",fez:"fezes",firmware:"firmware",fish:"fish",focus:"foci",foot:"feet",formula:"formulae",fungus:"fungi",gallows:"gallows",genus:"genera",glomerulus:"glomeruli",goose:"geese",graffito:"graffiti",grouse:"grouse",half:"halves",hamulus:"hamuli",hero:"heroes",hippopotamus:"hippopotami",hoof:"hooves",hovercraft:"hovercraft",hypothesis:"hypotheses",iliac:"ilia",incubus:"incubi",index:"indices",interstitium:"interstitia",kakapo:"kakapo",knife:"knives",larva:"larvae",leaf:"leaves",libretto:"libretti",life:"lives",loaf:"loaves",loculus:"loculi",locus:"loci",louse:"lice",man:"men",matrix:"matrices",means:"means",measles:"measles",media:"media",medium:"media",memorandum:"memoranda",millennium:"millennia",minutia:"minutiae",moose:"moose",mouse:"mice",nebula:"nebulae",nemesis:"nemeses",neurosis:"neuroses",news:"news",nucleolus:"nucleoli",nucleus:"nuclei",oasis:"oases",occiput:"occipita",offspring:"offspring",omphalos:"omphaloi",opus:"opera",ovum:"ova",ox:"oxen",paralysis:"paralyses",parenthesis:"parentheses",person:"people",phenomenon:"phenomena",phylum:"phyla",pike:"pike",polyhedron:"polyhedra",potato:"potatoes",primus:"primi",prognosis:"prognoses",quiz:"quizzes",radius:"radii",referendum:"referenda",salmon:"salmon",scarf:"scarves",scrotum:"scrota",self:"selves",seminoma:"seminomata",series:"series",sheep:"sheep",shelf:"shelves",shrimp:"shrimp",simulacrum:"simulacra",soliloquy:"soliloquies",spacecraft:"spacecraft",species:"species",spectrum:"spectra",squid:"squid",stimulus:"stimuli",stratum:"strata",swine:"swine",syconium:"syconia",syllabus:"syllabi",symposium:"symposia",synopsis:"synopses",synthesis:"syntheses",tableau:"tableaus",testis:"testes",that:"those",thesis:"theses",thief:"thieves",this:"these",thrombus:"thrombi",tomato:"tomatoes",tooth:"teeth",torus:"tori",trout:"trout",tuna:"tuna",umbilicus:"umbilici",uterus:"uteri",vertebra:"vertebrae",vertex:"vertices",veto:"vetoes",vita:"vitae",vortex:"vortices",watercraft:"watercraft",wharf:"wharves",wife:"wives",wolf:"wolves",woman:"women"}});var jh=sa((ij,Bh)=>{"use strict";var Lw=Mh();Bh.exports=new Map(Object.entries(Lw))});var wg=sa((E3,kg)=>{"use strict";var iu=Object.prototype.hasOwnProperty,Ag=Object.prototype.toString,mg=Object.defineProperty,gg=Object.getOwnPropertyDescriptor,xg=function(e){return typeof Array.isArray=="function"?Array.isArray(e):Ag.call(e)==="[object Array]"},yg=function(e){if(!e||Ag.call(e)!=="[object Object]")return!1;var r=iu.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&iu.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||iu.call(e,i)},bg=function(e,r){mg&&r.name==="__proto__"?mg(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},Eg=function(e,r){if(r==="__proto__")if(iu.call(e,r)){if(gg)return gg(e,r).value}else return;return e[r]};kg.exports=function t(){var e,r,n,i,o,s,a=arguments[0],u=1,l=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<l;++u)if(e=arguments[u],e!=null)for(r in e)n=Eg(a,r),i=Eg(e,r),a!==i&&(c&&i&&(yg(i)||(o=xg(i)))?(o?(o=!1,s=n&&xg(n)?n:[]):s=n&&yg(n)?n:{},bg(a,{name:r,newValue:t(c,s,i)})):typeof i<"u"&&bg(a,{name:r,newValue:i}));return a}});var es=ns(la(),1);var Rd=t=>Number.isFinite(t)?t:0;function Dk(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(Rd(t*1e3)%1e3),nanoseconds:Math.trunc(Rd(t*1e6)%1e3)}}function Rk(t){return{days:t/86400000n,hours:t/3600000n%24n,minutes:t/60000n%60n,seconds:t/1000n%60n,milliseconds:t%1000n,microseconds:0n,nanoseconds:0n}}function Jl(t){switch(typeof t){case"number":{if(Number.isFinite(t))return Dk(t);break}case"bigint":return Rk(t)}throw new TypeError("Expected a finite number or bigint")}var Fk=t=>t===0||t===0n,Nk=(t,e)=>e===1||e===1n?t:`${t}s`,Pk=1e-7,Lk=24n*60n*60n*1000n;function Gr(t,e){let r=typeof t=="bigint";if(!r&&!Number.isFinite(t))throw new TypeError("Expected a finite number or bigint");e={...e};let n=t<0?"-":"";t=t<0?-t:t,e.colonNotation&&(e.compact=!1,e.formatSubMilliseconds=!1,e.separateMilliseconds=!1,e.verbose=!1),e.compact&&(e.unitCount=1,e.secondsDecimalDigits=0,e.millisecondsDecimalDigits=0);let i=[],o=(c,f)=>{let p=Math.floor(c*10**f+Pk);return(Math.round(p)/10**f).toFixed(f)},s=(c,f,p,d)=>{if(!((i.length===0||!e.colonNotation)&&Fk(c)&&!(e.colonNotation&&p==="m"))){if(d??=String(c),e.colonNotation){let m=d.includes(".")?d.split(".")[0].length:d.length,y=i.length>0?2:1;d="0".repeat(Math.max(0,y-m))+d}else d+=e.verbose?" "+Nk(f,c):p;i.push(d)}},a=Jl(t),u=BigInt(a.days);if(e.hideYearAndDays?s(BigInt(u)*24n+BigInt(a.hours),"hour","h"):(e.hideYear?s(u,"day","d"):(s(u/365n,"year","y"),s(u%365n,"day","d")),s(Number(a.hours),"hour","h")),s(Number(a.minutes),"minute","m"),!e.hideSeconds)if(e.separateMilliseconds||e.formatSubMilliseconds||!e.colonNotation&&t<1e3){let c=Number(a.seconds),f=Number(a.milliseconds),p=Number(a.microseconds),d=Number(a.nanoseconds);if(s(c,"second","s"),e.formatSubMilliseconds)s(f,"millisecond","ms"),s(p,"microsecond","\xB5s"),s(d,"nanosecond","ns");else{let m=f+p/1e3+d/1e6,y=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,g=m>=1?Math.round(m):Math.ceil(m),b=y?m.toFixed(y):g;s(Number.parseFloat(b),"millisecond","ms",b)}}else{let c=(r?Number(t%Lk):t)/1e3%60,f=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,p=o(c,f),d=e.keepDecimalsOnWholeSeconds?p:p.replace(/\.0+$/,"");s(Number.parseFloat(d),"second","s",d)}if(i.length===0)return n+"0"+(e.verbose?" milliseconds":"ms");let l=e.colonNotation?":":" ";return typeof e.unitCount=="number"&&(i=i.slice(0,Math.max(e.unitCount,1))),n+i.join(l)}import{getMdatReports as $L,log as ht,reporterMdat as Xo}from"remark-mdat";import Fd from"fs";import Nd from"path";import{VFile as Mk}from"vfile";function Ql(t,e,r){let n=ec(t);if(!r&&typeof e=="function"&&(r=e,e=void 0),!r)return new Promise(o);o(i,r);function i(s){r(void 0,s)}function o(s,a){let u;try{u=Nd.resolve(n.cwd,n.path)}catch(c){return a(c)}Fd.readFile(u,e,l);function l(c,f){c?a(c):(n.value=f,s(n))}}}function ec(t){return typeof t=="string"||t instanceof URL?t={path:t}:jk(t)&&(t={path:new TextDecoder().decode(t)}),Bk(t)?t:new Mk(t)}function ln(t,e,r){let n=ec(t);if(!r&&typeof e=="function"&&(r=e,e=void 0),!r)return new Promise(o);o(i,r);function i(s){r(void 0,s)}function o(s,a){let u;try{u=Nd.resolve(n.cwd,n.path)}catch(c){return a(c)}Fd.writeFile(u,n.value||"",e||void 0,l);function l(c){c?a(c):s(n)}}}function Bk(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function jk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}import{notStrictEqual as cw,strictEqual as fw}from"assert";var Uk={right:Gk,center:Wk},zk=0,ca=1,$k=2,fa=3,tc=class{constructor(e){var r;this.width=e.width,this.wrap=(r=e.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...e){let r=this.div(...e);r.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);let r=e.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let r=e.split(`
|
|
2
|
+
var wk=Object.create;var Zl=Object.defineProperty;var Ck=Object.getOwnPropertyDescriptor;var Tk=Object.getOwnPropertyNames;var _k=Object.getPrototypeOf,Sk=Object.prototype.hasOwnProperty;var Er=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var sa=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Od=(t,e)=>{for(var r in e)Zl(t,r,{get:e[r],enumerable:!0})},Ik=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Tk(e))!Sk.call(t,i)&&i!==r&&Zl(t,i,{get:()=>e[i],enumerable:!(n=Ck(e,i))||n.enumerable});return t};var ns=(t,e,r)=>(r=t!=null?wk(_k(t)):{},Ik(e||!t||!t.__esModule?Zl(r,"default",{value:t,enumerable:!0}):r,t));var la=sa((qL,Xl)=>{"use strict";var ua=process||{},vd=ua.argv||[],aa=ua.env||{},Ok=!(aa.NO_COLOR||vd.includes("--no-color"))&&(!!aa.FORCE_COLOR||vd.includes("--color")||ua.platform==="win32"||(ua.stdout||{}).isTTY&&aa.TERM!=="dumb"||!!aa.CI),vk=(t,e,r=t)=>n=>{let i=""+n,o=i.indexOf(e,t.length);return~o?t+Dk(i,e,r,o)+e:t+i+e},Dk=(t,e,r,n)=>{let i="",o=0;do i+=t.substring(o,n)+r,o=n+e.length,n=t.indexOf(e,o);while(~n);return i+t.substring(o)},Dd=(t=Ok)=>{let e=t?vk:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Xl.exports=Dd();Xl.exports.createColors=Dd});var Mh=sa((rj,Lw)=>{Lw.exports={addendum:"addenda",aircraft:"aircraft",alga:"algae",alumna:"alumnae",alumnus:"alumni",alveolus:"alveoli",amoeba:"amoebae",analysis:"analyses",antenna:"antennae",antithesis:"antitheses",apex:"apices",appendix:"appendices",automaton:"automata",axis:"axes",bacillus:"bacilli",bacterium:"bacteria",baculum:"bacula",barracks:"barracks",basis:"bases",beau:"beaux",bison:"bison",buffalo:"buffalo",bureau:"bureaus",cactus:"cacti",calf:"calves",carcinoma:"carcinomata",carp:"carp",census:"censuses",chassis:"chassis",cherub:"cherubim",child:"children",ch\u00E2teau:"ch\xE2teaus",cloaca:"cloacae",cod:"cod",codex:"codices",concerto:"concerti",consortium:"consortia",corpus:"corpora",crisis:"crises",criterion:"criteria",curriculum:"curricula",cystoma:"cystomata",datum:"data",deer:"deer",diagnosis:"diagnoses",die:"dice",dwarf:"dwarfs",echo:"echoes",elf:"elves",elk:"elk",ellipsis:"ellipses",embargo:"embargoes",emphasis:"emphases",erratum:"errata","faux pas":"faux pas",fez:"fezes",firmware:"firmware",fish:"fish",focus:"foci",foot:"feet",formula:"formulae",fungus:"fungi",gallows:"gallows",genus:"genera",glomerulus:"glomeruli",goose:"geese",graffito:"graffiti",grouse:"grouse",half:"halves",hamulus:"hamuli",hero:"heroes",hippopotamus:"hippopotami",hoof:"hooves",hovercraft:"hovercraft",hypothesis:"hypotheses",iliac:"ilia",incubus:"incubi",index:"indices",interstitium:"interstitia",kakapo:"kakapo",knife:"knives",larva:"larvae",leaf:"leaves",libretto:"libretti",life:"lives",loaf:"loaves",loculus:"loculi",locus:"loci",louse:"lice",man:"men",matrix:"matrices",means:"means",measles:"measles",media:"media",medium:"media",memorandum:"memoranda",millennium:"millennia",minutia:"minutiae",moose:"moose",mouse:"mice",nebula:"nebulae",nemesis:"nemeses",neurosis:"neuroses",news:"news",nucleolus:"nucleoli",nucleus:"nuclei",oasis:"oases",occiput:"occipita",offspring:"offspring",omphalos:"omphaloi",opus:"opera",ovum:"ova",ox:"oxen",paralysis:"paralyses",parenthesis:"parentheses",person:"people",phenomenon:"phenomena",phylum:"phyla",pike:"pike",polyhedron:"polyhedra",potato:"potatoes",primus:"primi",prognosis:"prognoses",quiz:"quizzes",radius:"radii",referendum:"referenda",salmon:"salmon",scarf:"scarves",scrotum:"scrota",self:"selves",seminoma:"seminomata",series:"series",sheep:"sheep",shelf:"shelves",shrimp:"shrimp",simulacrum:"simulacra",soliloquy:"soliloquies",spacecraft:"spacecraft",species:"species",spectrum:"spectra",squid:"squid",stimulus:"stimuli",stratum:"strata",swine:"swine",syconium:"syconia",syllabus:"syllabi",symposium:"symposia",synopsis:"synopses",synthesis:"syntheses",tableau:"tableaus",testis:"testes",that:"those",thesis:"theses",thief:"thieves",this:"these",thrombus:"thrombi",tomato:"tomatoes",tooth:"teeth",torus:"tori",trout:"trout",tuna:"tuna",umbilicus:"umbilici",uterus:"uteri",vertebra:"vertebrae",vertex:"vertices",veto:"vetoes",vita:"vitae",vortex:"vortices",watercraft:"watercraft",wharf:"wharves",wife:"wives",wolf:"wolves",woman:"women"}});var jh=sa((nj,Bh)=>{"use strict";var Mw=Mh();Bh.exports=new Map(Object.entries(Mw))});var wg=sa((b3,kg)=>{"use strict";var iu=Object.prototype.hasOwnProperty,Ag=Object.prototype.toString,mg=Object.defineProperty,gg=Object.getOwnPropertyDescriptor,xg=function(e){return typeof Array.isArray=="function"?Array.isArray(e):Ag.call(e)==="[object Array]"},yg=function(e){if(!e||Ag.call(e)!=="[object Object]")return!1;var r=iu.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&iu.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||iu.call(e,i)},bg=function(e,r){mg&&r.name==="__proto__"?mg(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},Eg=function(e,r){if(r==="__proto__")if(iu.call(e,r)){if(gg)return gg(e,r).value}else return;return e[r]};kg.exports=function t(){var e,r,n,i,o,s,a=arguments[0],u=1,l=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<l;++u)if(e=arguments[u],e!=null)for(r in e)n=Eg(a,r),i=Eg(e,r),a!==i&&(c&&i&&(yg(i)||(o=xg(i)))?(o?(o=!1,s=n&&xg(n)?n:[]):s=n&&yg(n)?n:{},bg(a,{name:r,newValue:t(c,s,i)})):typeof i<"u"&&bg(a,{name:r,newValue:i}));return a}});var es=ns(la(),1);var Rd=t=>Number.isFinite(t)?t:0;function Rk(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(Rd(t*1e3)%1e3),nanoseconds:Math.trunc(Rd(t*1e6)%1e3)}}function Fk(t){return{days:t/86400000n,hours:t/3600000n%24n,minutes:t/60000n%60n,seconds:t/1000n%60n,milliseconds:t%1000n,microseconds:0n,nanoseconds:0n}}function Jl(t){switch(typeof t){case"number":{if(Number.isFinite(t))return Rk(t);break}case"bigint":return Fk(t)}throw new TypeError("Expected a finite number or bigint")}var Nk=t=>t===0||t===0n,Pk=(t,e)=>e===1||e===1n?t:`${t}s`,Lk=1e-7,Mk=24n*60n*60n*1000n;function Gr(t,e){let r=typeof t=="bigint";if(!r&&!Number.isFinite(t))throw new TypeError("Expected a finite number or bigint");e={...e};let n=t<0?"-":"";t=t<0?-t:t,e.colonNotation&&(e.compact=!1,e.formatSubMilliseconds=!1,e.separateMilliseconds=!1,e.verbose=!1),e.compact&&(e.unitCount=1,e.secondsDecimalDigits=0,e.millisecondsDecimalDigits=0);let i=[],o=(c,f)=>{let p=Math.floor(c*10**f+Lk);return(Math.round(p)/10**f).toFixed(f)},s=(c,f,p,d)=>{if(!((i.length===0||!e.colonNotation)&&Nk(c)&&!(e.colonNotation&&p==="m"))){if(d??=String(c),e.colonNotation){let m=d.includes(".")?d.split(".")[0].length:d.length,y=i.length>0?2:1;d="0".repeat(Math.max(0,y-m))+d}else d+=e.verbose?" "+Pk(f,c):p;i.push(d)}},a=Jl(t),u=BigInt(a.days);if(e.hideYearAndDays?s(BigInt(u)*24n+BigInt(a.hours),"hour","h"):(e.hideYear?s(u,"day","d"):(s(u/365n,"year","y"),s(u%365n,"day","d")),s(Number(a.hours),"hour","h")),s(Number(a.minutes),"minute","m"),!e.hideSeconds)if(e.separateMilliseconds||e.formatSubMilliseconds||!e.colonNotation&&t<1e3){let c=Number(a.seconds),f=Number(a.milliseconds),p=Number(a.microseconds),d=Number(a.nanoseconds);if(s(c,"second","s"),e.formatSubMilliseconds)s(f,"millisecond","ms"),s(p,"microsecond","\xB5s"),s(d,"nanosecond","ns");else{let m=f+p/1e3+d/1e6,y=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,g=m>=1?Math.round(m):Math.ceil(m),b=y?m.toFixed(y):g;s(Number.parseFloat(b),"millisecond","ms",b)}}else{let c=(r?Number(t%Mk):t)/1e3%60,f=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,p=o(c,f),d=e.keepDecimalsOnWholeSeconds?p:p.replace(/\.0+$/,"");s(Number.parseFloat(d),"second","s",d)}if(i.length===0)return n+"0"+(e.verbose?" milliseconds":"ms");let l=e.colonNotation?":":" ";return typeof e.unitCount=="number"&&(i=i.slice(0,Math.max(e.unitCount,1))),n+i.join(l)}import{getMdatReports as zL,log as ht,reporterMdat as Xo}from"remark-mdat";import Fd from"fs";import Nd from"path";import{VFile as Bk}from"vfile";function Ql(t,e,r){let n=ec(t);if(!r&&typeof e=="function"&&(r=e,e=void 0),!r)return new Promise(o);o(i,r);function i(s){r(void 0,s)}function o(s,a){let u;try{u=Nd.resolve(n.cwd,n.path)}catch(c){return a(c)}Fd.readFile(u,e,l);function l(c,f){c?a(c):(n.value=f,s(n))}}}function ec(t){return typeof t=="string"||t instanceof URL?t={path:t}:Uk(t)&&(t={path:new TextDecoder().decode(t)}),jk(t)?t:new Bk(t)}function ln(t,e,r){let n=ec(t);if(!r&&typeof e=="function"&&(r=e,e=void 0),!r)return new Promise(o);o(i,r);function i(s){r(void 0,s)}function o(s,a){let u;try{u=Nd.resolve(n.cwd,n.path)}catch(c){return a(c)}Fd.writeFile(u,n.value||"",e||void 0,l);function l(c){c?a(c):s(n)}}}function jk(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Uk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}import{notStrictEqual as fw,strictEqual as pw}from"assert";var zk={right:Wk,center:Hk},$k=0,ca=1,qk=2,fa=3,tc=class{constructor(e){var r;this.width=e.width,this.wrap=(r=e.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...e){let r=this.div(...e);r.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);let r=e.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let r=e.split(`
|
|
3
3
|
`).map(i=>i.split(" ")),n=0;return r.forEach(i=>{i.length>1&&Kt.stringWidth(i[0])>n&&(n=Math.min(Math.floor(this.width*.5),Kt.stringWidth(i[0])))}),r.forEach(i=>{this.div(...i.map((o,s)=>({text:o.trim(),padding:this.measurePadding(o),width:s===0&&i.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let r=Kt.stripAnsi(e);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(r=>{this.rowToString(r,e)}),e.filter(r=>!r.hidden).map(r=>r.text).join(`
|
|
4
|
-
`)}rowToString(e,r){return this.rasterize(e).forEach((n,i)=>{let o="";n.forEach((s,a)=>{let{width:u}=e[a],l=this.negatePadding(e[a]),c=s;if(l>Kt.stringWidth(s)&&(c+=" ".repeat(l-Kt.stringWidth(s))),e[a].align&&e[a].align!=="left"&&this.wrap){let p=
|
|
4
|
+
`)}rowToString(e,r){return this.rasterize(e).forEach((n,i)=>{let o="";n.forEach((s,a)=>{let{width:u}=e[a],l=this.negatePadding(e[a]),c=s;if(l>Kt.stringWidth(s)&&(c+=" ".repeat(l-Kt.stringWidth(s))),e[a].align&&e[a].align!=="left"&&this.wrap){let p=zk[e[a].align];c=p(c,l),Kt.stringWidth(c)<l&&(c+=" ".repeat((u||0)-Kt.stringWidth(c)-1))}let f=e[a].padding||[0,0,0,0];f[fa]&&(o+=" ".repeat(f[fa])),o+=Pd(e[a],c,"| "),o+=c,o+=Pd(e[a],c," |"),f[ca]&&(o+=" ".repeat(f[ca])),i===0&&r.length>0&&(o=this.renderInline(o,r[r.length-1]))}),r.push({text:o.replace(/ +$/,""),span:e.span})}),r}renderInline(e,r){let n=e.match(/^ */),i=n?n[0].length:0,o=r.text,s=Kt.stringWidth(o.trimRight());return r.span?this.wrap?i<s?e:(r.hidden=!0,o.trimRight()+" ".repeat(i-s)+e.trimLeft()):(r.hidden=!0,o+e):e}rasterize(e){let r=[],n=this.columnWidths(e),i;return e.forEach((o,s)=>{o.width=n[s],this.wrap?i=Kt.wrap(o.text,this.negatePadding(o),{hard:!0}).split(`
|
|
5
5
|
`):i=o.text.split(`
|
|
6
|
-
`),o.border&&(i.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(i.unshift(...new Array(o.padding[
|
|
7
|
-
`),i+=t.charAt(o);return r&&n&&(i=`${r}${i}${n}`),i}function nc(t){return Ld(t,{stringWidth:e=>[...e].length,stripAnsi:rc,wrap:Bd})}import{dirname as jd,resolve as Ud}from"path";import{readdirSync as Hk,statSync as Kk}from"fs";function zd(t,e){let r=Ud(".",t),n;for(Kk(r).isDirectory()||(r=jd(r));;){if(n=e(r,Hk(r)),n)return Ud(r,n);if(r=jd(n=r),n===r)break}}import{inspect as pw}from"util";import{readFileSync as dw}from"fs";import{fileURLToPath as hw}from"url";import{format as Xk}from"util";import{normalize as Jk,resolve as Qk}from"path";function Vn(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let r="",n=!1,i=t.match(/^-+/);for(let o=i?i[0].length:0;o<t.length;o++){let s=t.charAt(o);n&&(n=!1,s=s.toUpperCase()),o!==0&&(s==="-"||s==="_")?n=!0:s!=="-"&&s!=="_"&&(r+=s)}return r}}function pa(t,e){let r=t.toLowerCase();e=e||"-";let n="";for(let i=0;i<t.length;i++){let o=r.charAt(i),s=t.charAt(i);o!==s&&i>0?n+=`${e}${r.charAt(i)}`:n+=s}return n}function da(t){return t==null?!1:typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^0[^.]/.test(t)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function $d(t){if(Array.isArray(t))return t.map(s=>typeof s!="string"?s+"":s);t=t.trim();let e=0,r=null,n=null,i=null,o=[];for(let s=0;s<t.length;s++){if(r=n,n=t.charAt(s),n===" "&&!i){r!==" "&&e++;continue}n===i?i=null:(n==="'"||n==='"')&&!i&&(i=n),o[e]||(o[e]=""),o[e]+=n}return o}var tr;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(tr||(tr={}));var Wr,ha=class{constructor(e){Wr=e}parse(e,r){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),i=$d(e),o=typeof e=="string",s=Yk(Object.assign(Object.create(null),n.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),u=Object.assign(Object.create(null),n.default),l=n.configObjects||[],c=n.envPrefix,f=a["populate--"],p=f?"--":"_",d=Object.create(null),m=Object.create(null),y=n.__||Wr.format,g={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},b=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,w=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(A){let C=typeof A=="object"?A.key:A,M=Object.keys(A).map(function(O){return{boolean:"bools",string:"strings",number:"numbers"}[O]}).filter(Boolean).pop();M&&(g[M][C]=!0),g.arrays[C]=!0,g.keys.push(C)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(A){g.bools[A]=!0,g.keys.push(A)}),[].concat(n.string||[]).filter(Boolean).forEach(function(A){g.strings[A]=!0,g.keys.push(A)}),[].concat(n.number||[]).filter(Boolean).forEach(function(A){g.numbers[A]=!0,g.keys.push(A)}),[].concat(n.count||[]).filter(Boolean).forEach(function(A){g.counts[A]=!0,g.keys.push(A)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(A){g.normalize[A]=!0,g.keys.push(A)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([A,C])=>{typeof C=="number"&&(g.nargs[A]=C,g.keys.push(A))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([A,C])=>{typeof C=="function"&&(g.coercions[A]=C,g.keys.push(A))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(A){g.configs[A]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([A,C])=>{(typeof C=="boolean"||typeof C=="function")&&(g.configs[A]=C)})),E(n.key,s,n.default,g.arrays),Object.keys(u).forEach(function(A){(g.aliases[A]||[]).forEach(function(C){u[C]=u[A]})});let k=null;Ut();let D=[],R=Object.assign(Object.create(null),{_:[]}),S={};for(let A=0;A<i.length;A++){let C=i[A],M=C.replace(/^-{3,}/,"---"),O,T,Y,$,te,lt;if(C!=="--"&&/^-/.test(C)&&oe(C))de(C);else if(M.match(/^---+(=|$)/)){de(C);continue}else if(C.match(/^--.+=/)||!a["short-option-groups"]&&C.match(/^-.+=/))$=C.match(/^--?([^=]+)=([\s\S]*)$/),$!==null&&Array.isArray($)&&$.length>=3&&(W($[1],g.arrays)?A=be(A,$[1],i,$[2]):W($[1],g.nargs)!==!1?A=ye(A,$[1],i,$[2]):_($[1],$[2],!0));else if(C.match(w)&&a["boolean-negation"])$=C.match(w),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],_(T,W(T,g.arrays)?[!1]:!1));else if(C.match(/^--.+/)||!a["short-option-groups"]&&C.match(/^-[^-]+/))$=C.match(/^--?(.+)/),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],W(T,g.arrays)?A=be(A,T,i):W(T,g.nargs)!==!1?A=ye(A,T,i):(te=i[A+1],te!==void 0&&(!te.match(/^-/)||te.match(b))&&!W(T,g.bools)&&!W(T,g.counts)||/^(true|false)$/.test(te)?(_(T,te),A++):_(T,me(T))));else if(C.match(/^-.\..+=/))$=C.match(/^-([^=]+)=([\s\S]*)$/),$!==null&&Array.isArray($)&&$.length>=3&&_($[1],$[2]);else if(C.match(/^-.\..+/)&&!C.match(b))te=i[A+1],$=C.match(/^-(.\..+)/),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],te!==void 0&&!te.match(/^-/)&&!W(T,g.bools)&&!W(T,g.counts)?(_(T,te),A++):_(T,me(T)));else if(C.match(/^-[^-]+/)&&!C.match(b)){Y=C.slice(1,-1).split(""),O=!1;for(let wt=0;wt<Y.length;wt++){if(te=C.slice(wt+2),Y[wt+1]&&Y[wt+1]==="="){lt=C.slice(wt+3),T=Y[wt],W(T,g.arrays)?A=be(A,T,i,lt):W(T,g.nargs)!==!1?A=ye(A,T,i,lt):_(T,lt),O=!0;break}if(te==="-"){_(Y[wt],te);continue}if(/[A-Za-z]/.test(Y[wt])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(te)&&W(te,g.bools)===!1){_(Y[wt],te),O=!0;break}if(Y[wt+1]&&Y[wt+1].match(/\W/)){_(Y[wt],te),O=!0;break}else _(Y[wt],me(Y[wt]))}T=C.slice(-1)[0],!O&&T!=="-"&&(W(T,g.arrays)?A=be(A,T,i):W(T,g.nargs)!==!1?A=ye(A,T,i):(te=i[A+1],te!==void 0&&(!/^(-|--)[^-]/.test(te)||te.match(b))&&!W(T,g.bools)&&!W(T,g.counts)||/^(true|false)$/.test(te)?(_(T,te),A++):_(T,me(T))))}else if(C.match(/^-[0-9]$/)&&C.match(b)&&W(C.slice(1),g.bools))T=C.slice(1),_(T,me(T));else if(C==="--"){D=i.slice(A+1);break}else if(a["halt-at-non-option"]){D=i.slice(A);break}else de(C)}ee(R,!0),ee(R,!1),P(R),ae(),x(R,g.aliases,u,!0),Se(R),a["set-placeholder-key"]&&rt(R),Object.keys(g.counts).forEach(function(A){Ue(R,A.split("."))||_(A,0)}),f&&D.length&&(R[p]=[]),D.forEach(function(A){R[p].push(A)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(R).filter(A=>A!=="--"&&A.includes("-")).forEach(A=>{delete R[A]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(A=>s[A])).forEach(A=>{a["camel-case-expansion"]&&A.includes("-")&&delete R[A.split(".").map(C=>Vn(C)).join(".")],delete R[A]});function de(A){let C=I("_",A);(typeof C=="string"||typeof C=="number")&&R._.push(C)}function ye(A,C,M,O){let T,Y=W(C,g.nargs);if(Y=typeof Y!="number"||isNaN(Y)?1:Y,Y===0)return ze(O)||(k=Error(y("Argument unexpected for: %s",C))),_(C,me(C)),A;let $=ze(O)?0:1;if(a["nargs-eats-options"])M.length-(A+1)+$<Y&&(k=Error(y("Not enough arguments following: %s",C))),$=Y;else{for(T=A+1;T<M.length&&(!M[T].match(/^-[^0-9]/)||M[T].match(b)||oe(M[T]));T++)$++;$<Y&&(k=Error(y("Not enough arguments following: %s",C)))}let te=Math.min($,Y);for(!ze(O)&&te>0&&(_(C,O),te--),T=A+1;T<te+A+1;T++)_(C,M[T]);return A+te}function be(A,C,M,O){let T=[],Y=O||M[A+1],$=W(C,g.nargs);if(W(C,g.bools)&&!/^(true|false)$/.test(Y))T.push(!0);else if(ze(Y)||ze(O)&&/^-/.test(Y)&&!b.test(Y)&&!oe(Y)){if(u[C]!==void 0){let te=u[C];T=Array.isArray(te)?te:[te]}}else{ze(O)||T.push(F(C,O,!0));for(let te=A+1;te<M.length&&!(!a["greedy-arrays"]&&T.length>0||$&&typeof $=="number"&&T.length>=$||(Y=M[te],/^-/.test(Y)&&!b.test(Y)&&!oe(Y)));te++)A=te,T.push(F(C,Y,o))}return typeof $=="number"&&($&&T.length<$||isNaN($)&&T.length===0)&&(k=Error(y("Not enough arguments following: %s",C))),_(C,T),A}function _(A,C,M=o){if(/-/.test(A)&&a["camel-case-expansion"]){let Y=A.split(".").map(function($){return Vn($)}).join(".");L(A,Y)}let O=F(A,C,M),T=A.split(".");Je(R,T,O),g.aliases[A]&&g.aliases[A].forEach(function(Y){let $=Y.split(".");Je(R,$,O)}),T.length>1&&a["dot-notation"]&&(g.aliases[T[0]]||[]).forEach(function(Y){let $=Y.split("."),te=[].concat(T);te.shift(),$=$.concat(te),(g.aliases[A]||[]).includes($.join("."))||Je(R,$,O)}),W(A,g.normalize)&&!W(A,g.arrays)&&[A].concat(g.aliases[A]||[]).forEach(function($){Object.defineProperty(S,$,{enumerable:!0,get(){return C},set(te){C=typeof te=="string"?Wr.normalize(te):te}})})}function L(A,C){g.aliases[A]&&g.aliases[A].length||(g.aliases[A]=[C],d[C]=!0),g.aliases[C]&&g.aliases[C].length||L(C,A)}function F(A,C,M){M&&(C=Zk(C)),(W(A,g.bools)||W(A,g.counts))&&typeof C=="string"&&(C=C==="true");let O=Array.isArray(C)?C.map(function(T){return I(A,T)}):I(A,C);return W(A,g.counts)&&(ze(O)||typeof O=="boolean")&&(O=ic()),W(A,g.normalize)&&W(A,g.arrays)&&(Array.isArray(C)?O=C.map(T=>Wr.normalize(T)):O=Wr.normalize(C)),O}function I(A,C){return!a["parse-positional-numbers"]&&A==="_"||!W(A,g.strings)&&!W(A,g.bools)&&!Array.isArray(C)&&(da(C)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${C}`)))||!ze(C)&&W(A,g.numbers))&&(C=Number(C)),C}function P(A){let C=Object.create(null);x(C,g.aliases,u),Object.keys(g.configs).forEach(function(M){let O=A[M]||C[M];if(O)try{let T=null,Y=Wr.resolve(Wr.cwd(),O),$=g.configs[M];if(typeof $=="function"){try{T=$(Y)}catch(te){T=te}if(T instanceof Error){k=T;return}}else T=Wr.require(Y);j(T)}catch(T){T.name==="PermissionDenied"?k=T:A[M]&&(k=Error(y("Invalid JSON config file: %s",O)))}})}function j(A,C){Object.keys(A).forEach(function(M){let O=A[M],T=C?C+"."+M:M;typeof O=="object"&&O!==null&&!Array.isArray(O)&&a["dot-notation"]?j(O,T):(!Ue(R,T.split("."))||W(T,g.arrays)&&a["combine-arrays"])&&_(T,O)})}function ae(){typeof l<"u"&&l.forEach(function(A){j(A)})}function ee(A,C){if(typeof c>"u")return;let M=typeof c=="string"?c:"",O=Wr.env();Object.keys(O).forEach(function(T){if(M===""||T.lastIndexOf(M,0)===0){let Y=T.split("__").map(function($,te){return te===0&&($=$.substring(M.length)),Vn($)});(C&&g.configs[Y.join(".")]||!C)&&!Ue(A,Y)&&_(Y.join("."),O[T])}})}function Se(A){let C,M=new Set;Object.keys(A).forEach(function(O){if(!M.has(O)&&(C=W(O,g.coercions),typeof C=="function"))try{let T=I(O,C(A[O]));[].concat(g.aliases[O]||[],O).forEach(Y=>{M.add(Y),A[Y]=T})}catch(T){k=T}})}function rt(A){return g.keys.forEach(C=>{~C.indexOf(".")||typeof A[C]>"u"&&(A[C]=void 0)}),A}function x(A,C,M,O=!1){Object.keys(M).forEach(function(T){Ue(A,T.split("."))||(Je(A,T.split("."),M[T]),O&&(m[T]=!0),(C[T]||[]).forEach(function(Y){Ue(A,Y.split("."))||Je(A,Y.split("."),M[T])}))})}function Ue(A,C){let M=A;a["dot-notation"]||(C=[C.join(".")]),C.slice(0,-1).forEach(function(T){M=M[T]||{}});let O=C[C.length-1];return typeof M!="object"?!1:O in M}function Je(A,C,M){let O=A;a["dot-notation"]||(C=[C.join(".")]),C.slice(0,-1).forEach(function(lt){lt=qd(lt),typeof O=="object"&&O[lt]===void 0&&(O[lt]={}),typeof O[lt]!="object"||Array.isArray(O[lt])?(Array.isArray(O[lt])?O[lt].push({}):O[lt]=[O[lt],{}],O=O[lt][O[lt].length-1]):O=O[lt]});let T=qd(C[C.length-1]),Y=W(C.join("."),g.arrays),$=Array.isArray(M),te=a["duplicate-arguments-array"];!te&&W(T,g.nargs)&&(te=!0,(!ze(O[T])&&g.nargs[T]===1||Array.isArray(O[T])&&O[T].length===g.nargs[T])&&(O[T]=void 0)),M===ic()?O[T]=ic(O[T]):Array.isArray(O[T])?te&&Y&&$?O[T]=a["flatten-duplicate-arrays"]?O[T].concat(M):(Array.isArray(O[T][0])?O[T]:[O[T]]).concat([M]):!te&&!!Y==!!$?O[T]=M:O[T]=O[T].concat([M]):O[T]===void 0&&Y?O[T]=$?M:[M]:te&&!(O[T]===void 0||W(T,g.counts)||W(T,g.bools))?O[T]=[O[T],M]:O[T]=M}function E(...A){A.forEach(function(C){Object.keys(C||{}).forEach(function(M){g.aliases[M]||(g.aliases[M]=[].concat(s[M]||[]),g.aliases[M].concat(M).forEach(function(O){if(/-/.test(O)&&a["camel-case-expansion"]){let T=Vn(O);T!==M&&g.aliases[M].indexOf(T)===-1&&(g.aliases[M].push(T),d[T]=!0)}}),g.aliases[M].concat(M).forEach(function(O){if(O.length>1&&/[A-Z]/.test(O)&&a["camel-case-expansion"]){let T=pa(O,"-");T!==M&&g.aliases[M].indexOf(T)===-1&&(g.aliases[M].push(T),d[T]=!0)}}),g.aliases[M].forEach(function(O){g.aliases[O]=[M].concat(g.aliases[M].filter(function(T){return O!==T}))}))})})}function W(A,C){let M=[].concat(g.aliases[A]||[],A),O=Object.keys(C),T=M.find(Y=>O.includes(Y));return T?C[T]:!1}function Ke(A){let C=Object.keys(g);return[].concat(C.map(O=>g[O])).some(function(O){return Array.isArray(O)?O.includes(A):O[A]})}function ne(A,...C){return[].concat(...C).some(function(O){let T=A.match(O);return T&&Ke(T[1])})}function he(A){if(A.match(b)||!A.match(/^-[^-]+/))return!1;let C=!0,M,O=A.slice(1).split("");for(let T=0;T<O.length;T++){if(M=A.slice(T+2),!Ke(O[T])){C=!1;break}if(O[T+1]&&O[T+1]==="="||M==="-"||/[A-Za-z]/.test(O[T])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(M)||O[T+1]&&O[T+1].match(/\W/))break}return C}function oe(A){return a["unknown-options-as-args"]&&fe(A)}function fe(A){return A=A.replace(/^-{3,}/,"--"),A.match(b)||he(A)?!1:!ne(A,/^-+([^=]+?)=[\s\S]*$/,w,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function me(A){return!W(A,g.bools)&&!W(A,g.counts)&&`${A}`in u?u[A]:we(Fe(A))}function we(A){return{[tr.BOOLEAN]:!0,[tr.STRING]:"",[tr.NUMBER]:void 0,[tr.ARRAY]:[]}[A]}function Fe(A){let C=tr.BOOLEAN;return W(A,g.strings)?C=tr.STRING:W(A,g.numbers)?C=tr.NUMBER:W(A,g.bools)?C=tr.BOOLEAN:W(A,g.arrays)&&(C=tr.ARRAY),C}function ze(A){return A===void 0}function Ut(){Object.keys(g.counts).find(A=>W(A,g.arrays)?(k=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",A)),!0):W(A,g.nargs)?(k=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",A)),!0):!1)}return{aliases:Object.assign({},g.aliases),argv:Object.assign(S,R),configuration:a,defaulted:Object.assign({},m),error:k,newAliases:Object.assign({},d)}}};function Yk(t){let e=[],r=Object.create(null),n=!0;for(Object.keys(t).forEach(function(i){e.push([].concat(t[i],i))});n;){n=!1;for(let i=0;i<e.length;i++)for(let o=i+1;o<e.length;o++)if(e[i].filter(function(a){return e[o].indexOf(a)!==-1}).length){e[i]=e[i].concat(e[o]),e.splice(o,1),n=!0;break}}return e.forEach(function(i){i=i.filter(function(s,a,u){return u.indexOf(s)===a});let o=i.pop();o!==void 0&&typeof o=="string"&&(r[o]=i)}),r}function ic(t){return t!==void 0?t+1:1}function qd(t){return t==="__proto__"?"___proto___":t}function Zk(t){return typeof t=="string"&&(t[0]==="'"||t[0]==='"')&&t[t.length-1]===t[0]?t.substring(1,t.length-1):t}import{readFileSync as ew}from"fs";var oc,sc,ac,Vd=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Gd=(sc=(oc=process==null?void 0:process.versions)===null||oc===void 0?void 0:oc.node)!==null&&sc!==void 0?sc:(ac=process==null?void 0:process.version)===null||ac===void 0?void 0:ac.slice(1);if(Gd&&Number(Gd.match(/^([^.]+)/)[1])<Vd)throw Error(`yargs parser supports a minimum Node.js version of ${Vd}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var tw=process?process.env:{},Wd=new ha({cwd:process.cwd,env:()=>tw,format:Xk,normalize:Jk,resolve:Qk,require:t=>{if(typeof Er<"u")return Er(t);if(t.match(/\.json$/))return JSON.parse(ew(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),is=function(e,r){return Wd.parse(e.slice(),r).argv};is.detailed=function(t,e){return Wd.parse(t.slice(),e)};is.camelCase=Vn;is.decamelize=pa;is.looksLikeNumber=da;var uc=is;import{basename as mw,dirname as gw,extname as xw,relative as yw,resolve as Jd}from"path";function Hd(){return rw()?0:1}function rw(){return nw()&&!process.defaultApp}function nw(){return!!process.versions.electron}function lc(t){return t.slice(Hd()+1)}function Kd(){return process.argv[Hd()]}var $e=class t extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}};import{readFileSync as iw,statSync as ow,writeFile as sw}from"fs";import{format as aw}from"util";import{resolve as uw}from"path";var Yd={fs:{readFileSync:iw,writeFile:sw},format:aw,resolve:uw,exists:t=>{try{return ow(t).isFile()}catch{return!1}}};var hr,cc=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=e.shift(),n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),hr.format.apply(hr.format,[this.cache[this.locale][r]||r].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),i=e.shift(),o=function(){};typeof e[e.length-1]=="function"&&(o=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=i===1?r:n;this.cache[this.locale][r]&&(s=this.cache[this.locale][r][i===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let a=[s];return~s.indexOf("%d")&&a.push(i),hr.format.apply(hr.format,a.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(i,o){let s=r[o+1];n+=i,typeof s<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,r=this.writeQueue[0],n=r.directory,i=r.locale,o=r.cb,s=this._resolveLocaleFile(n,i),a=JSON.stringify(this.cache[i],null,2);hr.fs.writeFile(s,a,"utf-8",function(u){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),o(u)})}_readLocaleFile(){let e={},r=this._resolveLocaleFile(this.directory,this.locale);try{hr.fs.readFileSync&&(e=JSON.parse(hr.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=hr.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let i=hr.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(i)&&(n=i)}return n}_fileExistsSync(e){return hr.exists(e)}};function Zd(t,e){hr=e;let r=new cc(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var lw=t=>Zd(t,Yd),Xd=lw;var bw="require is not supported by ESM",Qd="loading a directory of commands is not supported yet for ESM",os;try{os=hw(import.meta.url)}catch{os=process.cwd()}var Ew=os.substring(0,os.lastIndexOf("node_modules")),fc={assert:{notStrictEqual:cw,strictEqual:fw},cliui:nc,findUp:zd,getEnv:t=>process.env[t],inspect:pw,getCallerFile:()=>{throw new $e(Qd)},getProcessArgvBin:Kd,mainFilename:Ew||process.cwd(),Parser:uc,path:{basename:mw,dirname:gw,extname:xw,relative:yw,resolve:Jd},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:dw,require:()=>{throw new $e(bw)},requireDirectory:()=>{throw new $e(Qd)},stringWidth:t=>[...t].length,y18n:Xd({directory:Jd(os,"../../../locales"),updateFiles:!1})};function Rt(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function pc(t,e){e.assert.strictEqual(typeof t,"string")}function Vi(t){return Object.keys(t)}function qe(t){return!!t&&!!t.then&&typeof t.then=="function"}function cn(t){let r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,i=r.shift();if(!i)throw new Error(`No command found in: ${t}`);let o={cmd:i.replace(n,""),demanded:[],optional:[]};return r.forEach((s,a)=>{let u=!1;s=s.replace(/\s/g,""),/\.+[\]>]/.test(s)&&a===r.length-1&&(u=!0),/^\[/.test(s)?o.optional.push({cmd:s.replace(n,"").split("|"),variadic:u}):o.demanded.push({cmd:s.replace(n,"").split("|"),variadic:u})}),o}var Aw=["first","second","third","fourth","fifth","sixth"];function H(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[cn(`cmd ${t}`),e,r]}try{let i=0,[o,s,a]=n(),u=[].slice.call(s);for(;u.length&&u[u.length-1]===void 0;)u.pop();let l=a||u.length;if(l<o.demanded.length)throw new $e(`Not enough arguments provided. Expected ${o.demanded.length} but received ${u.length}.`);let c=o.demanded.length+o.optional.length;if(l>c)throw new $e(`Too many arguments provided. Expected max ${c} but received ${l}.`);o.demanded.forEach(f=>{let p=u.shift(),d=eh(p);f.cmd.filter(y=>y===d||y==="*").length===0&&th(d,f.cmd,i),i+=1}),o.optional.forEach(f=>{if(u.length===0)return;let p=u.shift(),d=eh(p);f.cmd.filter(y=>y===d||y==="*").length===0&&th(d,f.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}function eh(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function th(t,e,r){throw new $e(`Invalid ${Aw[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}var ma=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,i=!1){if(H("<array|function> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let o=0;o<e.length;o++){if(typeof e[o]!="function")throw Error("middleware must be a function");let s=e[o];s.applyBeforeValidation=r,s.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let o=e;o.applyBeforeValidation=r,o.global=n,o.mutates=i,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(i=>{let o=[...n[r]||[],r];return i.option?!o.includes(i.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function rh(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function Gn(t,e,r,n){return r.reduce((i,o)=>{if(o.applyBeforeValidation!==n)return i;if(o.mutates){if(o.applied)return i;o.applied=!0}if(qe(i))return i.then(s=>Promise.all([s,o(s,e)])).then(([s,a])=>Object.assign(s,a));{let s=o(i,e);return qe(s)?s.then(a=>Object.assign(i,a)):Object.assign(i,s)}},t)}function Wn(t,e,r=n=>{throw n}){try{let n=kw(t)?t():t;return qe(n)?n.then(i=>e(i)):e(n)}catch(n){return r(n)}}function kw(t){return typeof t=="function"}function dc(t){if(typeof Er>"u")return null;for(let e=0,r=Object.keys(Er.cache),n;e<r.length;e++)if(n=Er.cache[r[e]],n.exports===t)return n;return null}var Gi=/(^\*)|(^\$0)/,hc=class{constructor(e,r,n,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);let o=typeof i.visit=="function"?i.visit:s=>s;i.visit=(s,a,u)=>{let l=o(s,a,u);if(l){if(this.requireCache.has(a))return l;this.requireCache.add(a),this.addHandler(l)}return l},this.shim.requireDirectory({require:r,filename:n},e,i)}addHandler(e,r,n,i,o,s){let a=[],u=rh(o);if(i=i||(()=>{}),Array.isArray(e))if(ww(e))[e,...a]=e;else for(let l of e)this.addHandler(l);else if(Tw(e)){let l=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(l=[].concat(l).concat(e.aliases)),this.addHandler(l,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(nh(n)){this.addHandler([e].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let l=cn(e);a=a.map(p=>cn(p).cmd);let c=!1,f=[l.cmd].concat(a).filter(p=>Gi.test(p)?(c=!0,!1):!0);f.length===0&&c&&f.push("$0"),c&&(l.cmd=f[0],a=f.slice(1),e=e.replace(Gi,l.cmd)),a.forEach(p=>{this.aliasMap[p]=l.cmd}),r!==!1&&this.usage.command(e,r,c,a,s),this.handlers[l.cmd]={original:e,description:r,handler:i,builder:n||{},middlewares:u,deprecated:s,demanded:l.demanded,optional:l.optional},c&&(this.defaultCommand=this.handlers[l.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,i,o,s){let a=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,u=r.getInternalMethods().getContext(),l=u.commands.slice(),c=!e;e&&(u.commands.push(e),u.fullCommands.push(a.original));let f=this.applyBuilderUpdateUsageAndParse(c,a,r,n.aliases,l,i,o,s);return qe(f)?f.then(p=>this.applyMiddlewareAndGetResult(c,a,p.innerArgv,u,o,p.aliases,r)):this.applyMiddlewareAndGetResult(c,a,f.innerArgv,u,o,f.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,i,o,s,a,u){let l=r.builder,c=n;if(ga(l)){n.getInternalMethods().getUsageInstance().freeze();let f=l(n.getInternalMethods().reset(i),u);if(qe(f))return f.then(p=>(c=oh(p)?p:n,this.parseAndUpdateUsage(e,r,c,o,s,a)))}else Cw(l)&&(n.getInternalMethods().getUsageInstance().freeze(),c=n.getInternalMethods().reset(i),Object.keys(r.builder).forEach(f=>{c.option(f,l[f])}));return this.parseAndUpdateUsage(e,r,c,o,s,a)}parseAndUpdateUsage(e,r,n,i,o,s){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,r),r.description);let a=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,o,s);return qe(a)?a.then(u=>({aliases:n.parsed.aliases,innerArgv:u})):{aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){let n=Gi.test(r.original)?r.original.replace(Gi,"").trim():r.original,i=e.filter(o=>!Gi.test(o));return i.push(n),`$0 ${i.join(" ")}`}handleValidationAndGetResult(e,r,n,i,o,s,a,u){if(!s.getInternalMethods().getHasOutput()){let l=s.getInternalMethods().runValidation(o,u,s.parsed.error,e);n=Wn(n,c=>(l(c),c))}if(r.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();let l=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(n,l,!1,!1),n=Gn(n,s,a,!1),n=Wn(n,c=>{let f=r.handler(c);return qe(f)?f.then(()=>c):c}),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),qe(n)&&!s.getInternalMethods().hasParseCallback()&&n.catch(c=>{try{s.getInternalMethods().getUsageInstance().fail(null,c)}catch{}})}return e||(i.commands.pop(),i.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,i,o,s,a){let u={};if(o)return n;a.getInternalMethods().getHasOutput()||(u=this.populatePositionals(r,n,i,a));let l=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),c=Gn(n,a,l,!0);return qe(c)?c.then(f=>this.handleValidationAndGetResult(e,r,f,i,s,a,l,u)):this.handleValidationAndGetResult(e,r,c,i,s,a,l,u)}populatePositionals(e,r,n,i){r._=r._.slice(n.commands.length);let o=e.demanded.slice(0),s=e.optional.slice(0),a={};for(this.validation.positionalCount(o.length,r._.length);o.length;){let u=o.shift();this.populatePositional(u,r,a)}for(;s.length;){let u=s.shift();this.populatePositional(u,r,a)}return r._=n.commands.concat(r._.map(u=>""+u)),this.postProcessPositionals(r,a,this.cmdToParseOptions(e.original),i),a}populatePositional(e,r,n){let i=e.cmd[0];e.variadic?n[i]=r._.splice(0).map(String):r._.length&&(n[i]=[String(r._.shift())])}cmdToParseOptions(e){let r={array:[],default:{},alias:{},demand:{}},n=cn(e);return n.demanded.forEach(i=>{let[o,...s]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=s,r.demand[o]=!0}),n.optional.forEach(i=>{let[o,...s]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=s}),r}postProcessPositionals(e,r,n,i){let o=Object.assign({},i.getOptions());o.default=Object.assign(n.default,o.default);for(let l of Object.keys(n.alias))o.alias[l]=(o.alias[l]||[]).concat(n.alias[l]);o.array=o.array.concat(n.array),o.config={};let s=[];if(Object.keys(r).forEach(l=>{r[l].map(c=>{o.configuration["unknown-options-as-args"]&&(o.key[l]=!0),s.push(`--${l}`),s.push(c)})}),!s.length)return;let a=Object.assign({},o.configuration,{"populate--":!1}),u=this.shim.Parser.detailed(s,Object.assign({},o,{configuration:a}));if(u.error)i.getInternalMethods().getUsageInstance().fail(u.error.message,u.error);else{let l=Object.keys(r);Object.keys(r).forEach(c=>{l.push(...u.aliases[c])}),Object.keys(u.argv).forEach(c=>{l.includes(c)&&(r[c]||(r[c]=u.argv[c]),!this.isInConfigs(i,c)&&!this.isDefaulted(i,c)&&Object.prototype.hasOwnProperty.call(e,c)&&Object.prototype.hasOwnProperty.call(u.argv,c)&&(Array.isArray(e[c])||Array.isArray(u.argv[c]))?e[c]=[].concat(e[c],u.argv[c]):e[c]=u.argv[c])})}}isDefaulted(e,r){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){let{configObjects:n}=e.getOptions();return n.some(i=>Object.prototype.hasOwnProperty.call(i,r))||n.some(i=>Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=Gi.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(ga(r))return r(e,!0);nh(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){let r=dc(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(let i of[e,r,n]){if(typeof i=="string"||i===!1)return i;Rt(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();Rt(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function ih(t,e,r,n){return new hc(t,e,r,n)}function nh(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function ww(t){return t.every(e=>typeof e=="string")}function ga(t){return typeof t=="function"}function Cw(t){return typeof t=="object"}function Tw(t){return typeof t=="object"&&!Array.isArray(t)}function fn(t={},e=()=>!0){let r={};return Vi(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function pn(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function _w(t){return typeof t=="boolean"}function ah(t,e){let r=e.y18n.__,n={},i=[];n.failFn=function(F){i.push(F)};let o=null,s=null,a=!0;n.showHelpOnFail=function(F=!0,I){let[P,j]=typeof F=="string"?[!0,F]:[F,I];return t.getInternalMethods().isGlobalContext()&&(s=j),o=j,a=P,n};let u=!1;n.fail=function(F,I){let P=t.getInternalMethods().getLoggerInstance();if(i.length)for(let j=i.length-1;j>=0;--j){let ae=i[j];if(_w(ae)){if(I)throw I;if(F)throw Error(F)}else ae(F,I,n)}else{if(t.getExitProcess()&&pn(!0),!u){u=!0,a&&(t.showHelp("error"),P.error()),(F||I)&&P.error(F||I);let j=o||s;j&&((F||I)&&P.error(""),P.error(j))}if(I=I||new $e(F),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,I);throw I}};let l=[],c=!1;n.usage=(L,F)=>L===null?(c=!0,l=[],n):(c=!1,l.push([L,F||""]),n),n.getUsage=()=>l,n.getUsageDisabled=()=>c,n.getPositionalGroupName=()=>r("Positionals:");let f=[];n.example=(L,F)=>{f.push([L,F||""])};let p=[];n.command=function(F,I,P,j,ae=!1){P&&(p=p.map(ee=>(ee[2]=!1,ee))),p.push([F,I||"",P,j,ae])},n.getCommands=()=>p;let d={};n.describe=function(F,I){Array.isArray(F)?F.forEach(P=>{n.describe(P,I)}):typeof F=="object"?Object.keys(F).forEach(P=>{n.describe(P,F[P])}):d[F]=I},n.getDescriptions=()=>d;let m=[];n.epilog=L=>{m.push(L)};let y=!1,g;n.wrap=L=>{y=!0,g=L},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(y||(g=ye(),y=!0),g);let b="__yargsString__:";n.deferY18nLookup=L=>b+L,n.help=function(){if(D)return D;k();let F=t.customScriptName?t.$0:e.path.basename(t.$0),I=t.getDemandedOptions(),P=t.getDemandedCommands(),j=t.getDeprecatedOptions(),ae=t.getGroups(),ee=t.getOptions(),Se=[];Se=Se.concat(Object.keys(d)),Se=Se.concat(Object.keys(I)),Se=Se.concat(Object.keys(P)),Se=Se.concat(Object.keys(ee.default)),Se=Se.filter(S),Se=Object.keys(Se.reduce((ne,he)=>(he!=="_"&&(ne[he]=!0),ne),{}));let rt=n.getWrap(),x=e.cliui({width:rt,wrap:!!rt});if(!c){if(l.length)l.forEach(ne=>{x.div({text:`${ne[0].replace(/\$0/g,F)}`}),ne[1]&&x.div({text:`${ne[1]}`,padding:[1,0,0,0]})}),x.div();else if(p.length){let ne=null;P._?ne=`${F} <${r("command")}>
|
|
6
|
+
`),o.border&&(i.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(i.unshift(...new Array(o.padding[$k]||0).fill("")),i.push(...new Array(o.padding[qk]||0).fill(""))),i.forEach((a,u)=>{r[u]||r.push([]);let l=r[u];for(let c=0;c<s;c++)l[c]===void 0&&l.push("");l.push(a)})}),r}negatePadding(e){let r=e.width||0;return e.padding&&(r-=(e.padding[fa]||0)+(e.padding[ca]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(s=>s.width||Kt.stringWidth(s.text));let r=e.length,n=this.width,i=e.map(s=>{if(s.width)return r--,n-=s.width,s.width}),o=r?Math.floor(n/r):0;return i.map((s,a)=>s===void 0?Math.max(o,Vk(e[a])):s)}};function Pd(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function Vk(t){let e=t.padding||[],r=1+(e[fa]||0)+(e[ca]||0);return t.border?r+4:r}function Gk(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Wk(t,e){t=t.trim();let r=Kt.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function Hk(t,e){t=t.trim();let r=Kt.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}var Kt;function Ld(t,e){return Kt=e,new tc({width:t?.width||Gk(),wrap:t?.wrap})}var Md=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function rc(t){return t.replace(Md,"")}function Bd(t,e){let[r,n]=t.match(Md)||["",""];t=rc(t);let i="";for(let o=0;o<t.length;o++)o!==0&&o%e===0&&(i+=`
|
|
7
|
+
`),i+=t.charAt(o);return r&&n&&(i=`${r}${i}${n}`),i}function nc(t){return Ld(t,{stringWidth:e=>[...e].length,stripAnsi:rc,wrap:Bd})}import{dirname as jd,resolve as Ud}from"path";import{readdirSync as Kk,statSync as Yk}from"fs";function zd(t,e){let r=Ud(".",t),n;for(Yk(r).isDirectory()||(r=jd(r));;){if(n=e(r,Kk(r)),n)return Ud(r,n);if(r=jd(n=r),n===r)break}}import{inspect as dw}from"util";import{readFileSync as hw}from"fs";import{fileURLToPath as mw}from"url";import{format as Jk}from"util";import{normalize as Qk,resolve as ew}from"path";function Vn(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let r="",n=!1,i=t.match(/^-+/);for(let o=i?i[0].length:0;o<t.length;o++){let s=t.charAt(o);n&&(n=!1,s=s.toUpperCase()),o!==0&&(s==="-"||s==="_")?n=!0:s!=="-"&&s!=="_"&&(r+=s)}return r}}function pa(t,e){let r=t.toLowerCase();e=e||"-";let n="";for(let i=0;i<t.length;i++){let o=r.charAt(i),s=t.charAt(i);o!==s&&i>0?n+=`${e}${r.charAt(i)}`:n+=s}return n}function da(t){return t==null?!1:typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^0[^.]/.test(t)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function $d(t){if(Array.isArray(t))return t.map(s=>typeof s!="string"?s+"":s);t=t.trim();let e=0,r=null,n=null,i=null,o=[];for(let s=0;s<t.length;s++){if(r=n,n=t.charAt(s),n===" "&&!i){r!==" "&&e++;continue}n===i?i=null:(n==="'"||n==='"')&&!i&&(i=n),o[e]||(o[e]=""),o[e]+=n}return o}var tr;(function(t){t.BOOLEAN="boolean",t.STRING="string",t.NUMBER="number",t.ARRAY="array"})(tr||(tr={}));var Wr,ha=class{constructor(e){Wr=e}parse(e,r){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),i=$d(e),o=typeof e=="string",s=Zk(Object.assign(Object.create(null),n.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),u=Object.assign(Object.create(null),n.default),l=n.configObjects||[],c=n.envPrefix,f=a["populate--"],p=f?"--":"_",d=Object.create(null),m=Object.create(null),y=n.__||Wr.format,g={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},b=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,w=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(A){let C=typeof A=="object"?A.key:A,M=Object.keys(A).map(function(O){return{boolean:"bools",string:"strings",number:"numbers"}[O]}).filter(Boolean).pop();M&&(g[M][C]=!0),g.arrays[C]=!0,g.keys.push(C)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(A){g.bools[A]=!0,g.keys.push(A)}),[].concat(n.string||[]).filter(Boolean).forEach(function(A){g.strings[A]=!0,g.keys.push(A)}),[].concat(n.number||[]).filter(Boolean).forEach(function(A){g.numbers[A]=!0,g.keys.push(A)}),[].concat(n.count||[]).filter(Boolean).forEach(function(A){g.counts[A]=!0,g.keys.push(A)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(A){g.normalize[A]=!0,g.keys.push(A)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([A,C])=>{typeof C=="number"&&(g.nargs[A]=C,g.keys.push(A))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([A,C])=>{typeof C=="function"&&(g.coercions[A]=C,g.keys.push(A))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(A){g.configs[A]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([A,C])=>{(typeof C=="boolean"||typeof C=="function")&&(g.configs[A]=C)})),E(n.key,s,n.default,g.arrays),Object.keys(u).forEach(function(A){(g.aliases[A]||[]).forEach(function(C){u[C]=u[A]})});let k=null;Ut();let D=[],R=Object.assign(Object.create(null),{_:[]}),S={};for(let A=0;A<i.length;A++){let C=i[A],M=C.replace(/^-{3,}/,"---"),O,T,Y,$,te,lt;if(C!=="--"&&/^-/.test(C)&&oe(C))de(C);else if(M.match(/^---+(=|$)/)){de(C);continue}else if(C.match(/^--.+=/)||!a["short-option-groups"]&&C.match(/^-.+=/))$=C.match(/^--?([^=]+)=([\s\S]*)$/),$!==null&&Array.isArray($)&&$.length>=3&&(W($[1],g.arrays)?A=be(A,$[1],i,$[2]):W($[1],g.nargs)!==!1?A=ye(A,$[1],i,$[2]):_($[1],$[2],!0));else if(C.match(w)&&a["boolean-negation"])$=C.match(w),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],_(T,W(T,g.arrays)?[!1]:!1));else if(C.match(/^--.+/)||!a["short-option-groups"]&&C.match(/^-[^-]+/))$=C.match(/^--?(.+)/),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],W(T,g.arrays)?A=be(A,T,i):W(T,g.nargs)!==!1?A=ye(A,T,i):(te=i[A+1],te!==void 0&&(!te.match(/^-/)||te.match(b))&&!W(T,g.bools)&&!W(T,g.counts)||/^(true|false)$/.test(te)?(_(T,te),A++):_(T,me(T))));else if(C.match(/^-.\..+=/))$=C.match(/^-([^=]+)=([\s\S]*)$/),$!==null&&Array.isArray($)&&$.length>=3&&_($[1],$[2]);else if(C.match(/^-.\..+/)&&!C.match(b))te=i[A+1],$=C.match(/^-(.\..+)/),$!==null&&Array.isArray($)&&$.length>=2&&(T=$[1],te!==void 0&&!te.match(/^-/)&&!W(T,g.bools)&&!W(T,g.counts)?(_(T,te),A++):_(T,me(T)));else if(C.match(/^-[^-]+/)&&!C.match(b)){Y=C.slice(1,-1).split(""),O=!1;for(let wt=0;wt<Y.length;wt++){if(te=C.slice(wt+2),Y[wt+1]&&Y[wt+1]==="="){lt=C.slice(wt+3),T=Y[wt],W(T,g.arrays)?A=be(A,T,i,lt):W(T,g.nargs)!==!1?A=ye(A,T,i,lt):_(T,lt),O=!0;break}if(te==="-"){_(Y[wt],te);continue}if(/[A-Za-z]/.test(Y[wt])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(te)&&W(te,g.bools)===!1){_(Y[wt],te),O=!0;break}if(Y[wt+1]&&Y[wt+1].match(/\W/)){_(Y[wt],te),O=!0;break}else _(Y[wt],me(Y[wt]))}T=C.slice(-1)[0],!O&&T!=="-"&&(W(T,g.arrays)?A=be(A,T,i):W(T,g.nargs)!==!1?A=ye(A,T,i):(te=i[A+1],te!==void 0&&(!/^(-|--)[^-]/.test(te)||te.match(b))&&!W(T,g.bools)&&!W(T,g.counts)||/^(true|false)$/.test(te)?(_(T,te),A++):_(T,me(T))))}else if(C.match(/^-[0-9]$/)&&C.match(b)&&W(C.slice(1),g.bools))T=C.slice(1),_(T,me(T));else if(C==="--"){D=i.slice(A+1);break}else if(a["halt-at-non-option"]){D=i.slice(A);break}else de(C)}ee(R,!0),ee(R,!1),P(R),ae(),x(R,g.aliases,u,!0),Se(R),a["set-placeholder-key"]&&rt(R),Object.keys(g.counts).forEach(function(A){Ue(R,A.split("."))||_(A,0)}),f&&D.length&&(R[p]=[]),D.forEach(function(A){R[p].push(A)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(R).filter(A=>A!=="--"&&A.includes("-")).forEach(A=>{delete R[A]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(A=>s[A])).forEach(A=>{a["camel-case-expansion"]&&A.includes("-")&&delete R[A.split(".").map(C=>Vn(C)).join(".")],delete R[A]});function de(A){let C=I("_",A);(typeof C=="string"||typeof C=="number")&&R._.push(C)}function ye(A,C,M,O){let T,Y=W(C,g.nargs);if(Y=typeof Y!="number"||isNaN(Y)?1:Y,Y===0)return ze(O)||(k=Error(y("Argument unexpected for: %s",C))),_(C,me(C)),A;let $=ze(O)?0:1;if(a["nargs-eats-options"])M.length-(A+1)+$<Y&&(k=Error(y("Not enough arguments following: %s",C))),$=Y;else{for(T=A+1;T<M.length&&(!M[T].match(/^-[^0-9]/)||M[T].match(b)||oe(M[T]));T++)$++;$<Y&&(k=Error(y("Not enough arguments following: %s",C)))}let te=Math.min($,Y);for(!ze(O)&&te>0&&(_(C,O),te--),T=A+1;T<te+A+1;T++)_(C,M[T]);return A+te}function be(A,C,M,O){let T=[],Y=O||M[A+1],$=W(C,g.nargs);if(W(C,g.bools)&&!/^(true|false)$/.test(Y))T.push(!0);else if(ze(Y)||ze(O)&&/^-/.test(Y)&&!b.test(Y)&&!oe(Y)){if(u[C]!==void 0){let te=u[C];T=Array.isArray(te)?te:[te]}}else{ze(O)||T.push(F(C,O,!0));for(let te=A+1;te<M.length&&!(!a["greedy-arrays"]&&T.length>0||$&&typeof $=="number"&&T.length>=$||(Y=M[te],/^-/.test(Y)&&!b.test(Y)&&!oe(Y)));te++)A=te,T.push(F(C,Y,o))}return typeof $=="number"&&($&&T.length<$||isNaN($)&&T.length===0)&&(k=Error(y("Not enough arguments following: %s",C))),_(C,T),A}function _(A,C,M=o){if(/-/.test(A)&&a["camel-case-expansion"]){let Y=A.split(".").map(function($){return Vn($)}).join(".");L(A,Y)}let O=F(A,C,M),T=A.split(".");Je(R,T,O),g.aliases[A]&&g.aliases[A].forEach(function(Y){let $=Y.split(".");Je(R,$,O)}),T.length>1&&a["dot-notation"]&&(g.aliases[T[0]]||[]).forEach(function(Y){let $=Y.split("."),te=[].concat(T);te.shift(),$=$.concat(te),(g.aliases[A]||[]).includes($.join("."))||Je(R,$,O)}),W(A,g.normalize)&&!W(A,g.arrays)&&[A].concat(g.aliases[A]||[]).forEach(function($){Object.defineProperty(S,$,{enumerable:!0,get(){return C},set(te){C=typeof te=="string"?Wr.normalize(te):te}})})}function L(A,C){g.aliases[A]&&g.aliases[A].length||(g.aliases[A]=[C],d[C]=!0),g.aliases[C]&&g.aliases[C].length||L(C,A)}function F(A,C,M){M&&(C=Xk(C)),(W(A,g.bools)||W(A,g.counts))&&typeof C=="string"&&(C=C==="true");let O=Array.isArray(C)?C.map(function(T){return I(A,T)}):I(A,C);return W(A,g.counts)&&(ze(O)||typeof O=="boolean")&&(O=ic()),W(A,g.normalize)&&W(A,g.arrays)&&(Array.isArray(C)?O=C.map(T=>Wr.normalize(T)):O=Wr.normalize(C)),O}function I(A,C){return!a["parse-positional-numbers"]&&A==="_"||!W(A,g.strings)&&!W(A,g.bools)&&!Array.isArray(C)&&(da(C)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${C}`)))||!ze(C)&&W(A,g.numbers))&&(C=Number(C)),C}function P(A){let C=Object.create(null);x(C,g.aliases,u),Object.keys(g.configs).forEach(function(M){let O=A[M]||C[M];if(O)try{let T=null,Y=Wr.resolve(Wr.cwd(),O),$=g.configs[M];if(typeof $=="function"){try{T=$(Y)}catch(te){T=te}if(T instanceof Error){k=T;return}}else T=Wr.require(Y);j(T)}catch(T){T.name==="PermissionDenied"?k=T:A[M]&&(k=Error(y("Invalid JSON config file: %s",O)))}})}function j(A,C){Object.keys(A).forEach(function(M){let O=A[M],T=C?C+"."+M:M;typeof O=="object"&&O!==null&&!Array.isArray(O)&&a["dot-notation"]?j(O,T):(!Ue(R,T.split("."))||W(T,g.arrays)&&a["combine-arrays"])&&_(T,O)})}function ae(){typeof l<"u"&&l.forEach(function(A){j(A)})}function ee(A,C){if(typeof c>"u")return;let M=typeof c=="string"?c:"",O=Wr.env();Object.keys(O).forEach(function(T){if(M===""||T.lastIndexOf(M,0)===0){let Y=T.split("__").map(function($,te){return te===0&&($=$.substring(M.length)),Vn($)});(C&&g.configs[Y.join(".")]||!C)&&!Ue(A,Y)&&_(Y.join("."),O[T])}})}function Se(A){let C,M=new Set;Object.keys(A).forEach(function(O){if(!M.has(O)&&(C=W(O,g.coercions),typeof C=="function"))try{let T=I(O,C(A[O]));[].concat(g.aliases[O]||[],O).forEach(Y=>{M.add(Y),A[Y]=T})}catch(T){k=T}})}function rt(A){return g.keys.forEach(C=>{~C.indexOf(".")||typeof A[C]>"u"&&(A[C]=void 0)}),A}function x(A,C,M,O=!1){Object.keys(M).forEach(function(T){Ue(A,T.split("."))||(Je(A,T.split("."),M[T]),O&&(m[T]=!0),(C[T]||[]).forEach(function(Y){Ue(A,Y.split("."))||Je(A,Y.split("."),M[T])}))})}function Ue(A,C){let M=A;a["dot-notation"]||(C=[C.join(".")]),C.slice(0,-1).forEach(function(T){M=M[T]||{}});let O=C[C.length-1];return typeof M!="object"?!1:O in M}function Je(A,C,M){let O=A;a["dot-notation"]||(C=[C.join(".")]),C.slice(0,-1).forEach(function(lt){lt=qd(lt),typeof O=="object"&&O[lt]===void 0&&(O[lt]={}),typeof O[lt]!="object"||Array.isArray(O[lt])?(Array.isArray(O[lt])?O[lt].push({}):O[lt]=[O[lt],{}],O=O[lt][O[lt].length-1]):O=O[lt]});let T=qd(C[C.length-1]),Y=W(C.join("."),g.arrays),$=Array.isArray(M),te=a["duplicate-arguments-array"];!te&&W(T,g.nargs)&&(te=!0,(!ze(O[T])&&g.nargs[T]===1||Array.isArray(O[T])&&O[T].length===g.nargs[T])&&(O[T]=void 0)),M===ic()?O[T]=ic(O[T]):Array.isArray(O[T])?te&&Y&&$?O[T]=a["flatten-duplicate-arrays"]?O[T].concat(M):(Array.isArray(O[T][0])?O[T]:[O[T]]).concat([M]):!te&&!!Y==!!$?O[T]=M:O[T]=O[T].concat([M]):O[T]===void 0&&Y?O[T]=$?M:[M]:te&&!(O[T]===void 0||W(T,g.counts)||W(T,g.bools))?O[T]=[O[T],M]:O[T]=M}function E(...A){A.forEach(function(C){Object.keys(C||{}).forEach(function(M){g.aliases[M]||(g.aliases[M]=[].concat(s[M]||[]),g.aliases[M].concat(M).forEach(function(O){if(/-/.test(O)&&a["camel-case-expansion"]){let T=Vn(O);T!==M&&g.aliases[M].indexOf(T)===-1&&(g.aliases[M].push(T),d[T]=!0)}}),g.aliases[M].concat(M).forEach(function(O){if(O.length>1&&/[A-Z]/.test(O)&&a["camel-case-expansion"]){let T=pa(O,"-");T!==M&&g.aliases[M].indexOf(T)===-1&&(g.aliases[M].push(T),d[T]=!0)}}),g.aliases[M].forEach(function(O){g.aliases[O]=[M].concat(g.aliases[M].filter(function(T){return O!==T}))}))})})}function W(A,C){let M=[].concat(g.aliases[A]||[],A),O=Object.keys(C),T=M.find(Y=>O.includes(Y));return T?C[T]:!1}function Ke(A){let C=Object.keys(g);return[].concat(C.map(O=>g[O])).some(function(O){return Array.isArray(O)?O.includes(A):O[A]})}function ne(A,...C){return[].concat(...C).some(function(O){let T=A.match(O);return T&&Ke(T[1])})}function he(A){if(A.match(b)||!A.match(/^-[^-]+/))return!1;let C=!0,M,O=A.slice(1).split("");for(let T=0;T<O.length;T++){if(M=A.slice(T+2),!Ke(O[T])){C=!1;break}if(O[T+1]&&O[T+1]==="="||M==="-"||/[A-Za-z]/.test(O[T])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(M)||O[T+1]&&O[T+1].match(/\W/))break}return C}function oe(A){return a["unknown-options-as-args"]&&fe(A)}function fe(A){return A=A.replace(/^-{3,}/,"--"),A.match(b)||he(A)?!1:!ne(A,/^-+([^=]+?)=[\s\S]*$/,w,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function me(A){return!W(A,g.bools)&&!W(A,g.counts)&&`${A}`in u?u[A]:we(Fe(A))}function we(A){return{[tr.BOOLEAN]:!0,[tr.STRING]:"",[tr.NUMBER]:void 0,[tr.ARRAY]:[]}[A]}function Fe(A){let C=tr.BOOLEAN;return W(A,g.strings)?C=tr.STRING:W(A,g.numbers)?C=tr.NUMBER:W(A,g.bools)?C=tr.BOOLEAN:W(A,g.arrays)&&(C=tr.ARRAY),C}function ze(A){return A===void 0}function Ut(){Object.keys(g.counts).find(A=>W(A,g.arrays)?(k=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",A)),!0):W(A,g.nargs)?(k=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",A)),!0):!1)}return{aliases:Object.assign({},g.aliases),argv:Object.assign(S,R),configuration:a,defaulted:Object.assign({},m),error:k,newAliases:Object.assign({},d)}}};function Zk(t){let e=[],r=Object.create(null),n=!0;for(Object.keys(t).forEach(function(i){e.push([].concat(t[i],i))});n;){n=!1;for(let i=0;i<e.length;i++)for(let o=i+1;o<e.length;o++)if(e[i].filter(function(a){return e[o].indexOf(a)!==-1}).length){e[i]=e[i].concat(e[o]),e.splice(o,1),n=!0;break}}return e.forEach(function(i){i=i.filter(function(s,a,u){return u.indexOf(s)===a});let o=i.pop();o!==void 0&&typeof o=="string"&&(r[o]=i)}),r}function ic(t){return t!==void 0?t+1:1}function qd(t){return t==="__proto__"?"___proto___":t}function Xk(t){return typeof t=="string"&&(t[0]==="'"||t[0]==='"')&&t[t.length-1]===t[0]?t.substring(1,t.length-1):t}import{readFileSync as tw}from"fs";var oc,sc,ac,Vd=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Gd=(sc=(oc=process==null?void 0:process.versions)===null||oc===void 0?void 0:oc.node)!==null&&sc!==void 0?sc:(ac=process==null?void 0:process.version)===null||ac===void 0?void 0:ac.slice(1);if(Gd&&Number(Gd.match(/^([^.]+)/)[1])<Vd)throw Error(`yargs parser supports a minimum Node.js version of ${Vd}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var rw=process?process.env:{},Wd=new ha({cwd:process.cwd,env:()=>rw,format:Jk,normalize:Qk,resolve:ew,require:t=>{if(typeof Er<"u")return Er(t);if(t.match(/\.json$/))return JSON.parse(tw(t,"utf8"));throw Error("only .json config files are supported in ESM")}}),is=function(e,r){return Wd.parse(e.slice(),r).argv};is.detailed=function(t,e){return Wd.parse(t.slice(),e)};is.camelCase=Vn;is.decamelize=pa;is.looksLikeNumber=da;var uc=is;import{basename as gw,dirname as xw,extname as yw,relative as bw,resolve as Jd}from"path";function Hd(){return nw()?0:1}function nw(){return iw()&&!process.defaultApp}function iw(){return!!process.versions.electron}function lc(t){return t.slice(Hd()+1)}function Kd(){return process.argv[Hd()]}var $e=class t extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}};import{readFileSync as ow,statSync as sw,writeFile as aw}from"fs";import{format as uw}from"util";import{resolve as lw}from"path";var Yd={fs:{readFileSync:ow,writeFile:aw},format:uw,resolve:lw,exists:t=>{try{return sw(t).isFile()}catch{return!1}}};var hr,cc=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=e.shift(),n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),hr.format.apply(hr.format,[this.cache[this.locale][r]||r].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),i=e.shift(),o=function(){};typeof e[e.length-1]=="function"&&(o=e.pop()),this.cache[this.locale]||this._readLocaleFile();let s=i===1?r:n;this.cache[this.locale][r]&&(s=this.cache[this.locale][r][i===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let a=[s];return~s.indexOf("%d")&&a.push(i),hr.format.apply(hr.format,a.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(i,o){let s=r[o+1];n+=i,typeof s<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,r=this.writeQueue[0],n=r.directory,i=r.locale,o=r.cb,s=this._resolveLocaleFile(n,i),a=JSON.stringify(this.cache[i],null,2);hr.fs.writeFile(s,a,"utf-8",function(u){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),o(u)})}_readLocaleFile(){let e={},r=this._resolveLocaleFile(this.directory,this.locale);try{hr.fs.readFileSync&&(e=JSON.parse(hr.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=hr.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let i=hr.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(i)&&(n=i)}return n}_fileExistsSync(e){return hr.exists(e)}};function Zd(t,e){hr=e;let r=new cc(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var cw=t=>Zd(t,Yd),Xd=cw;var Ew="require is not supported by ESM",Qd="loading a directory of commands is not supported yet for ESM",os;try{os=mw(import.meta.url)}catch{os=process.cwd()}var Aw=os.substring(0,os.lastIndexOf("node_modules")),fc={assert:{notStrictEqual:fw,strictEqual:pw},cliui:nc,findUp:zd,getEnv:t=>process.env[t],inspect:dw,getCallerFile:()=>{throw new $e(Qd)},getProcessArgvBin:Kd,mainFilename:Aw||process.cwd(),Parser:uc,path:{basename:gw,dirname:xw,extname:yw,relative:bw,resolve:Jd},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:hw,require:()=>{throw new $e(Ew)},requireDirectory:()=>{throw new $e(Qd)},stringWidth:t=>[...t].length,y18n:Xd({directory:Jd(os,"../../../locales"),updateFiles:!1})};function Rt(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function pc(t,e){e.assert.strictEqual(typeof t,"string")}function Vi(t){return Object.keys(t)}function qe(t){return!!t&&!!t.then&&typeof t.then=="function"}function cn(t){let r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,i=r.shift();if(!i)throw new Error(`No command found in: ${t}`);let o={cmd:i.replace(n,""),demanded:[],optional:[]};return r.forEach((s,a)=>{let u=!1;s=s.replace(/\s/g,""),/\.+[\]>]/.test(s)&&a===r.length-1&&(u=!0),/^\[/.test(s)?o.optional.push({cmd:s.replace(n,"").split("|"),variadic:u}):o.demanded.push({cmd:s.replace(n,"").split("|"),variadic:u})}),o}var kw=["first","second","third","fourth","fifth","sixth"];function H(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[cn(`cmd ${t}`),e,r]}try{let i=0,[o,s,a]=n(),u=[].slice.call(s);for(;u.length&&u[u.length-1]===void 0;)u.pop();let l=a||u.length;if(l<o.demanded.length)throw new $e(`Not enough arguments provided. Expected ${o.demanded.length} but received ${u.length}.`);let c=o.demanded.length+o.optional.length;if(l>c)throw new $e(`Too many arguments provided. Expected max ${c} but received ${l}.`);o.demanded.forEach(f=>{let p=u.shift(),d=eh(p);f.cmd.filter(y=>y===d||y==="*").length===0&&th(d,f.cmd,i),i+=1}),o.optional.forEach(f=>{if(u.length===0)return;let p=u.shift(),d=eh(p);f.cmd.filter(y=>y===d||y==="*").length===0&&th(d,f.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}function eh(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function th(t,e,r){throw new $e(`Invalid ${kw[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}var ma=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,i=!1){if(H("<array|function> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let o=0;o<e.length;o++){if(typeof e[o]!="function")throw Error("middleware must be a function");let s=e[o];s.applyBeforeValidation=r,s.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let o=e;o.applyBeforeValidation=r,o.global=n,o.mutates=i,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(i=>{let o=[...n[r]||[],r];return i.option?!o.includes(i.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function rh(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function Gn(t,e,r,n){return r.reduce((i,o)=>{if(o.applyBeforeValidation!==n)return i;if(o.mutates){if(o.applied)return i;o.applied=!0}if(qe(i))return i.then(s=>Promise.all([s,o(s,e)])).then(([s,a])=>Object.assign(s,a));{let s=o(i,e);return qe(s)?s.then(a=>Object.assign(i,a)):Object.assign(i,s)}},t)}function Wn(t,e,r=n=>{throw n}){try{let n=ww(t)?t():t;return qe(n)?n.then(i=>e(i)):e(n)}catch(n){return r(n)}}function ww(t){return typeof t=="function"}function dc(t){if(typeof Er>"u")return null;for(let e=0,r=Object.keys(Er.cache),n;e<r.length;e++)if(n=Er.cache[r[e]],n.exports===t)return n;return null}var Gi=/(^\*)|(^\$0)/,hc=class{constructor(e,r,n,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);let o=typeof i.visit=="function"?i.visit:s=>s;i.visit=(s,a,u)=>{let l=o(s,a,u);if(l){if(this.requireCache.has(a))return l;this.requireCache.add(a),this.addHandler(l)}return l},this.shim.requireDirectory({require:r,filename:n},e,i)}addHandler(e,r,n,i,o,s){let a=[],u=rh(o);if(i=i||(()=>{}),Array.isArray(e))if(Cw(e))[e,...a]=e;else for(let l of e)this.addHandler(l);else if(_w(e)){let l=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(l=[].concat(l).concat(e.aliases)),this.addHandler(l,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(nh(n)){this.addHandler([e].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let l=cn(e);a=a.map(p=>cn(p).cmd);let c=!1,f=[l.cmd].concat(a).filter(p=>Gi.test(p)?(c=!0,!1):!0);f.length===0&&c&&f.push("$0"),c&&(l.cmd=f[0],a=f.slice(1),e=e.replace(Gi,l.cmd)),a.forEach(p=>{this.aliasMap[p]=l.cmd}),r!==!1&&this.usage.command(e,r,c,a,s),this.handlers[l.cmd]={original:e,description:r,handler:i,builder:n||{},middlewares:u,deprecated:s,demanded:l.demanded,optional:l.optional},c&&(this.defaultCommand=this.handlers[l.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,i,o,s){let a=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,u=r.getInternalMethods().getContext(),l=u.commands.slice(),c=!e;e&&(u.commands.push(e),u.fullCommands.push(a.original));let f=this.applyBuilderUpdateUsageAndParse(c,a,r,n.aliases,l,i,o,s);return qe(f)?f.then(p=>this.applyMiddlewareAndGetResult(c,a,p.innerArgv,u,o,p.aliases,r)):this.applyMiddlewareAndGetResult(c,a,f.innerArgv,u,o,f.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,i,o,s,a,u){let l=r.builder,c=n;if(ga(l)){n.getInternalMethods().getUsageInstance().freeze();let f=l(n.getInternalMethods().reset(i),u);if(qe(f))return f.then(p=>(c=oh(p)?p:n,this.parseAndUpdateUsage(e,r,c,o,s,a)))}else Tw(l)&&(n.getInternalMethods().getUsageInstance().freeze(),c=n.getInternalMethods().reset(i),Object.keys(r.builder).forEach(f=>{c.option(f,l[f])}));return this.parseAndUpdateUsage(e,r,c,o,s,a)}parseAndUpdateUsage(e,r,n,i,o,s){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,r),r.description);let a=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,o,s);return qe(a)?a.then(u=>({aliases:n.parsed.aliases,innerArgv:u})):{aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){let n=Gi.test(r.original)?r.original.replace(Gi,"").trim():r.original,i=e.filter(o=>!Gi.test(o));return i.push(n),`$0 ${i.join(" ")}`}handleValidationAndGetResult(e,r,n,i,o,s,a,u){if(!s.getInternalMethods().getHasOutput()){let l=s.getInternalMethods().runValidation(o,u,s.parsed.error,e);n=Wn(n,c=>(l(c),c))}if(r.handler&&!s.getInternalMethods().getHasOutput()){s.getInternalMethods().setHasOutput();let l=!!s.getOptions().configuration["populate--"];s.getInternalMethods().postProcess(n,l,!1,!1),n=Gn(n,s,a,!1),n=Wn(n,c=>{let f=r.handler(c);return qe(f)?f.then(()=>c):c}),e||s.getInternalMethods().getUsageInstance().cacheHelpMessage(),qe(n)&&!s.getInternalMethods().hasParseCallback()&&n.catch(c=>{try{s.getInternalMethods().getUsageInstance().fail(null,c)}catch{}})}return e||(i.commands.pop(),i.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,i,o,s,a){let u={};if(o)return n;a.getInternalMethods().getHasOutput()||(u=this.populatePositionals(r,n,i,a));let l=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),c=Gn(n,a,l,!0);return qe(c)?c.then(f=>this.handleValidationAndGetResult(e,r,f,i,s,a,l,u)):this.handleValidationAndGetResult(e,r,c,i,s,a,l,u)}populatePositionals(e,r,n,i){r._=r._.slice(n.commands.length);let o=e.demanded.slice(0),s=e.optional.slice(0),a={};for(this.validation.positionalCount(o.length,r._.length);o.length;){let u=o.shift();this.populatePositional(u,r,a)}for(;s.length;){let u=s.shift();this.populatePositional(u,r,a)}return r._=n.commands.concat(r._.map(u=>""+u)),this.postProcessPositionals(r,a,this.cmdToParseOptions(e.original),i),a}populatePositional(e,r,n){let i=e.cmd[0];e.variadic?n[i]=r._.splice(0).map(String):r._.length&&(n[i]=[String(r._.shift())])}cmdToParseOptions(e){let r={array:[],default:{},alias:{},demand:{}},n=cn(e);return n.demanded.forEach(i=>{let[o,...s]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=s,r.demand[o]=!0}),n.optional.forEach(i=>{let[o,...s]=i.cmd;i.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=s}),r}postProcessPositionals(e,r,n,i){let o=Object.assign({},i.getOptions());o.default=Object.assign(n.default,o.default);for(let l of Object.keys(n.alias))o.alias[l]=(o.alias[l]||[]).concat(n.alias[l]);o.array=o.array.concat(n.array),o.config={};let s=[];if(Object.keys(r).forEach(l=>{r[l].map(c=>{o.configuration["unknown-options-as-args"]&&(o.key[l]=!0),s.push(`--${l}`),s.push(c)})}),!s.length)return;let a=Object.assign({},o.configuration,{"populate--":!1}),u=this.shim.Parser.detailed(s,Object.assign({},o,{configuration:a}));if(u.error)i.getInternalMethods().getUsageInstance().fail(u.error.message,u.error);else{let l=Object.keys(r);Object.keys(r).forEach(c=>{l.push(...u.aliases[c])}),Object.keys(u.argv).forEach(c=>{l.includes(c)&&(r[c]||(r[c]=u.argv[c]),!this.isInConfigs(i,c)&&!this.isDefaulted(i,c)&&Object.prototype.hasOwnProperty.call(e,c)&&Object.prototype.hasOwnProperty.call(u.argv,c)&&(Array.isArray(e[c])||Array.isArray(u.argv[c]))?e[c]=[].concat(e[c],u.argv[c]):e[c]=u.argv[c])})}}isDefaulted(e,r){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){let{configObjects:n}=e.getOptions();return n.some(i=>Object.prototype.hasOwnProperty.call(i,r))||n.some(i=>Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=Gi.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(ga(r))return r(e,!0);nh(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){let r=dc(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(let i of[e,r,n]){if(typeof i=="string"||i===!1)return i;Rt(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();Rt(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function ih(t,e,r,n){return new hc(t,e,r,n)}function nh(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function Cw(t){return t.every(e=>typeof e=="string")}function ga(t){return typeof t=="function"}function Tw(t){return typeof t=="object"}function _w(t){return typeof t=="object"&&!Array.isArray(t)}function fn(t={},e=()=>!0){let r={};return Vi(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function pn(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function Sw(t){return typeof t=="boolean"}function ah(t,e){let r=e.y18n.__,n={},i=[];n.failFn=function(F){i.push(F)};let o=null,s=null,a=!0;n.showHelpOnFail=function(F=!0,I){let[P,j]=typeof F=="string"?[!0,F]:[F,I];return t.getInternalMethods().isGlobalContext()&&(s=j),o=j,a=P,n};let u=!1;n.fail=function(F,I){let P=t.getInternalMethods().getLoggerInstance();if(i.length)for(let j=i.length-1;j>=0;--j){let ae=i[j];if(Sw(ae)){if(I)throw I;if(F)throw Error(F)}else ae(F,I,n)}else{if(t.getExitProcess()&&pn(!0),!u){u=!0,a&&(t.showHelp("error"),P.error()),(F||I)&&P.error(F||I);let j=o||s;j&&((F||I)&&P.error(""),P.error(j))}if(I=I||new $e(F),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,I);throw I}};let l=[],c=!1;n.usage=(L,F)=>L===null?(c=!0,l=[],n):(c=!1,l.push([L,F||""]),n),n.getUsage=()=>l,n.getUsageDisabled=()=>c,n.getPositionalGroupName=()=>r("Positionals:");let f=[];n.example=(L,F)=>{f.push([L,F||""])};let p=[];n.command=function(F,I,P,j,ae=!1){P&&(p=p.map(ee=>(ee[2]=!1,ee))),p.push([F,I||"",P,j,ae])},n.getCommands=()=>p;let d={};n.describe=function(F,I){Array.isArray(F)?F.forEach(P=>{n.describe(P,I)}):typeof F=="object"?Object.keys(F).forEach(P=>{n.describe(P,F[P])}):d[F]=I},n.getDescriptions=()=>d;let m=[];n.epilog=L=>{m.push(L)};let y=!1,g;n.wrap=L=>{y=!0,g=L},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(y||(g=ye(),y=!0),g);let b="__yargsString__:";n.deferY18nLookup=L=>b+L,n.help=function(){if(D)return D;k();let F=t.customScriptName?t.$0:e.path.basename(t.$0),I=t.getDemandedOptions(),P=t.getDemandedCommands(),j=t.getDeprecatedOptions(),ae=t.getGroups(),ee=t.getOptions(),Se=[];Se=Se.concat(Object.keys(d)),Se=Se.concat(Object.keys(I)),Se=Se.concat(Object.keys(P)),Se=Se.concat(Object.keys(ee.default)),Se=Se.filter(S),Se=Object.keys(Se.reduce((ne,he)=>(he!=="_"&&(ne[he]=!0),ne),{}));let rt=n.getWrap(),x=e.cliui({width:rt,wrap:!!rt});if(!c){if(l.length)l.forEach(ne=>{x.div({text:`${ne[0].replace(/\$0/g,F)}`}),ne[1]&&x.div({text:`${ne[1]}`,padding:[1,0,0,0]})}),x.div();else if(p.length){let ne=null;P._?ne=`${F} <${r("command")}>
|
|
8
8
|
`:ne=`${F} [${r("command")}]
|
|
9
|
-
`,x.div(`${ne}`)}}if(p.length>1||p.length===1&&!p[0][2]){x.div(r("Commands:"));let ne=t.getInternalMethods().getContext(),he=ne.commands.length?`${ne.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(p=p.sort((fe,me)=>fe[0].localeCompare(me[0])));let oe=F?`${F} `:"";p.forEach(fe=>{let me=`${oe}${he}${fe[0].replace(/^\$0 ?/,"")}`;x.span({text:me,padding:[0,2,0,2],width:w(p,rt,`${F}${he}`)+4},{text:fe[1]});let we=[];fe[2]&&we.push(`[${r("default")}]`),fe[3]&&fe[3].length&&we.push(`[${r("aliases:")} ${fe[3].join(", ")}]`),fe[4]&&(typeof fe[4]=="string"?we.push(`[${r("deprecated: %s",fe[4])}]`):we.push(`[${r("deprecated")}]`)),we.length?x.div({text:we.join(" "),padding:[0,0,0,2],align:"right"}):x.div()}),x.div()}let Ue=(Object.keys(ee.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);Se=Se.filter(ne=>!t.parsed.newAliases[ne]&&Ue.every(he=>(ee.alias[he]||[]).indexOf(ne)===-1));let Je=r("Options:");ae[Je]||(ae[Je]=[]),R(Se,ee.alias,ae,Je);let E=ne=>/^--/.test(xa(ne)),W=Object.keys(ae).filter(ne=>ae[ne].length>0).map(ne=>{let he=ae[ne].filter(S).map(oe=>{if(Ue.includes(oe))return oe;for(let fe=0,me;(me=Ue[fe])!==void 0;fe++)if((ee.alias[me]||[]).includes(oe))return me;return oe});return{groupName:ne,normalizedKeys:he}}).filter(({normalizedKeys:ne})=>ne.length>0).map(({groupName:ne,normalizedKeys:he})=>{let oe=he.reduce((fe,me)=>(fe[me]=[me].concat(ee.alias[me]||[]).map(we=>ne===n.getPositionalGroupName()?we:(/^[0-9]$/.test(we)?ee.boolean.includes(me)?"-":"--":we.length>1?"--":"-")+we).sort((we,Fe)=>E(we)===E(Fe)?0:E(we)?1:-1).join(", "),fe),{});return{groupName:ne,normalizedKeys:he,switches:oe}});if(W.filter(({groupName:ne})=>ne!==n.getPositionalGroupName()).some(({normalizedKeys:ne,switches:he})=>!ne.every(oe=>E(he[oe])))&&W.filter(({groupName:ne})=>ne!==n.getPositionalGroupName()).forEach(({normalizedKeys:ne,switches:he})=>{ne.forEach(oe=>{E(he[oe])&&(he[oe]=
|
|
9
|
+
`,x.div(`${ne}`)}}if(p.length>1||p.length===1&&!p[0][2]){x.div(r("Commands:"));let ne=t.getInternalMethods().getContext(),he=ne.commands.length?`${ne.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(p=p.sort((fe,me)=>fe[0].localeCompare(me[0])));let oe=F?`${F} `:"";p.forEach(fe=>{let me=`${oe}${he}${fe[0].replace(/^\$0 ?/,"")}`;x.span({text:me,padding:[0,2,0,2],width:w(p,rt,`${F}${he}`)+4},{text:fe[1]});let we=[];fe[2]&&we.push(`[${r("default")}]`),fe[3]&&fe[3].length&&we.push(`[${r("aliases:")} ${fe[3].join(", ")}]`),fe[4]&&(typeof fe[4]=="string"?we.push(`[${r("deprecated: %s",fe[4])}]`):we.push(`[${r("deprecated")}]`)),we.length?x.div({text:we.join(" "),padding:[0,0,0,2],align:"right"}):x.div()}),x.div()}let Ue=(Object.keys(ee.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);Se=Se.filter(ne=>!t.parsed.newAliases[ne]&&Ue.every(he=>(ee.alias[he]||[]).indexOf(ne)===-1));let Je=r("Options:");ae[Je]||(ae[Je]=[]),R(Se,ee.alias,ae,Je);let E=ne=>/^--/.test(xa(ne)),W=Object.keys(ae).filter(ne=>ae[ne].length>0).map(ne=>{let he=ae[ne].filter(S).map(oe=>{if(Ue.includes(oe))return oe;for(let fe=0,me;(me=Ue[fe])!==void 0;fe++)if((ee.alias[me]||[]).includes(oe))return me;return oe});return{groupName:ne,normalizedKeys:he}}).filter(({normalizedKeys:ne})=>ne.length>0).map(({groupName:ne,normalizedKeys:he})=>{let oe=he.reduce((fe,me)=>(fe[me]=[me].concat(ee.alias[me]||[]).map(we=>ne===n.getPositionalGroupName()?we:(/^[0-9]$/.test(we)?ee.boolean.includes(me)?"-":"--":we.length>1?"--":"-")+we).sort((we,Fe)=>E(we)===E(Fe)?0:E(we)?1:-1).join(", "),fe),{});return{groupName:ne,normalizedKeys:he,switches:oe}});if(W.filter(({groupName:ne})=>ne!==n.getPositionalGroupName()).some(({normalizedKeys:ne,switches:he})=>!ne.every(oe=>E(he[oe])))&&W.filter(({groupName:ne})=>ne!==n.getPositionalGroupName()).forEach(({normalizedKeys:ne,switches:he})=>{ne.forEach(oe=>{E(he[oe])&&(he[oe]=Iw(he[oe],4))})}),W.forEach(({groupName:ne,normalizedKeys:he,switches:oe})=>{x.div(ne),he.forEach(fe=>{let me=oe[fe],we=d[fe]||"",Fe=null;we.includes(b)&&(we=r(we.substring(b.length))),ee.boolean.includes(fe)&&(Fe=`[${r("boolean")}]`),ee.count.includes(fe)&&(Fe=`[${r("count")}]`),ee.string.includes(fe)&&(Fe=`[${r("string")}]`),ee.normalize.includes(fe)&&(Fe=`[${r("string")}]`),ee.array.includes(fe)&&(Fe=`[${r("array")}]`),ee.number.includes(fe)&&(Fe=`[${r("number")}]`);let ze=C=>typeof C=="string"?`[${r("deprecated: %s",C)}]`:`[${r("deprecated")}]`,Ut=[fe in j?ze(j[fe]):null,Fe,fe in I?`[${r("required")}]`:null,ee.choices&&ee.choices[fe]?`[${r("choices:")} ${n.stringifiedValues(ee.choices[fe])}]`:null,de(ee.default[fe],ee.defaultDescription[fe])].filter(Boolean).join(" ");x.span({text:xa(me),padding:[0,2,0,2+sh(me)],width:w(oe,rt)+4},we);let A=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;Ut&&!A?x.div({text:Ut,padding:[0,0,0,2],align:"right"}):x.div()}),x.div()}),f.length&&(x.div(r("Examples:")),f.forEach(ne=>{ne[0]=ne[0].replace(/\$0/g,F)}),f.forEach(ne=>{ne[1]===""?x.div({text:ne[0],padding:[0,2,0,2]}):x.div({text:ne[0],padding:[0,2,0,2],width:w(f,rt)+4},{text:ne[1]})}),x.div()),m.length>0){let ne=m.map(he=>he.replace(/\$0/g,F)).join(`
|
|
10
10
|
`);x.div(`${ne}
|
|
11
|
-
`)}return x.toString().replace(/\s*$/,"")};function w(L,F,I){let P=0;return Array.isArray(L)||(L=Object.values(L).map(j=>[j])),L.forEach(j=>{P=Math.max(e.stringWidth(I?`${I} ${xa(j[0])}`:xa(j[0]))+sh(j[0]),P)}),F&&(P=Math.min(P,parseInt((F*.5).toString(),10))),P}function k(){let L=t.getDemandedOptions(),F=t.getOptions();(Object.keys(F.alias)||[]).forEach(I=>{F.alias[I].forEach(P=>{d[P]&&n.describe(I,d[P]),P in L&&t.demandOption(I,L[P]),F.boolean.includes(P)&&t.boolean(I),F.count.includes(P)&&t.count(I),F.string.includes(P)&&t.string(I),F.normalize.includes(P)&&t.normalize(I),F.array.includes(P)&&t.array(I),F.number.includes(P)&&t.number(I)})})}let D;n.cacheHelpMessage=function(){D=this.help()},n.clearCachedHelpMessage=function(){D=void 0},n.hasCachedHelpMessage=function(){return!!D};function R(L,F,I,P){let j=[],ae=null;return Object.keys(I).forEach(ee=>{j=j.concat(I[ee])}),L.forEach(ee=>{ae=[ee].concat(F[ee]),ae.some(Se=>j.indexOf(Se)!==-1)||I[P].push(ee)}),j}function S(L){return t.getOptions().hiddenOptions.indexOf(L)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}n.showHelp=L=>{let F=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:F[L])(n.help())},n.functionDescription=L=>["(",L.name?e.Parser.decamelize(L.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=function(F,I){let P="",j=I||", ",ae=[].concat(F);return!F||!ae.length||ae.forEach(ee=>{P.length&&(P+=j),P+=JSON.stringify(ee)}),P};function de(L,F){let I=`[${r("default:")} `;if(L===void 0&&!F)return null;if(F)I+=F;else switch(typeof L){case"string":I+=`"${L}"`;break;case"object":I+=JSON.stringify(L);break;default:I+=L}return`${I}]`}function ye(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let be=null;n.version=L=>{be=L},n.showVersion=L=>{let F=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:F[L])(be)},n.reset=function(F){return o=null,u=!1,l=[],c=!1,m=[],f=[],p=[],d=fn(d,I=>!F[I]),n};let _=[];return n.freeze=function(){_.push({failMessage:o,failureOutput:u,usages:l,usageDisabled:c,epilogs:m,examples:f,commands:p,descriptions:d})},n.unfreeze=function(F=!1){let I=_.pop();I&&(F?(d={...I.descriptions,...d},p=[...I.commands,...p],l=[...I.usages,...l],f=[...I.examples,...f],m=[...I.epilogs,...m]):{failMessage:o,failureOutput:u,usages:l,usageDisabled:c,epilogs:m,examples:f,commands:p,descriptions:d}=I)},n}function mc(t){return typeof t=="object"}function
|
|
11
|
+
`)}return x.toString().replace(/\s*$/,"")};function w(L,F,I){let P=0;return Array.isArray(L)||(L=Object.values(L).map(j=>[j])),L.forEach(j=>{P=Math.max(e.stringWidth(I?`${I} ${xa(j[0])}`:xa(j[0]))+sh(j[0]),P)}),F&&(P=Math.min(P,parseInt((F*.5).toString(),10))),P}function k(){let L=t.getDemandedOptions(),F=t.getOptions();(Object.keys(F.alias)||[]).forEach(I=>{F.alias[I].forEach(P=>{d[P]&&n.describe(I,d[P]),P in L&&t.demandOption(I,L[P]),F.boolean.includes(P)&&t.boolean(I),F.count.includes(P)&&t.count(I),F.string.includes(P)&&t.string(I),F.normalize.includes(P)&&t.normalize(I),F.array.includes(P)&&t.array(I),F.number.includes(P)&&t.number(I)})})}let D;n.cacheHelpMessage=function(){D=this.help()},n.clearCachedHelpMessage=function(){D=void 0},n.hasCachedHelpMessage=function(){return!!D};function R(L,F,I,P){let j=[],ae=null;return Object.keys(I).forEach(ee=>{j=j.concat(I[ee])}),L.forEach(ee=>{ae=[ee].concat(F[ee]),ae.some(Se=>j.indexOf(Se)!==-1)||I[P].push(ee)}),j}function S(L){return t.getOptions().hiddenOptions.indexOf(L)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}n.showHelp=L=>{let F=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:F[L])(n.help())},n.functionDescription=L=>["(",L.name?e.Parser.decamelize(L.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=function(F,I){let P="",j=I||", ",ae=[].concat(F);return!F||!ae.length||ae.forEach(ee=>{P.length&&(P+=j),P+=JSON.stringify(ee)}),P};function de(L,F){let I=`[${r("default:")} `;if(L===void 0&&!F)return null;if(F)I+=F;else switch(typeof L){case"string":I+=`"${L}"`;break;case"object":I+=JSON.stringify(L);break;default:I+=L}return`${I}]`}function ye(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let be=null;n.version=L=>{be=L},n.showVersion=L=>{let F=t.getInternalMethods().getLoggerInstance();L||(L="error"),(typeof L=="function"?L:F[L])(be)},n.reset=function(F){return o=null,u=!1,l=[],c=!1,m=[],f=[],p=[],d=fn(d,I=>!F[I]),n};let _=[];return n.freeze=function(){_.push({failMessage:o,failureOutput:u,usages:l,usageDisabled:c,epilogs:m,examples:f,commands:p,descriptions:d})},n.unfreeze=function(F=!1){let I=_.pop();I&&(F?(d={...I.descriptions,...d},p=[...I.commands,...p],l=[...I.usages,...l],f=[...I.examples,...f],m=[...I.epilogs,...m]):{failMessage:o,failureOutput:u,usages:l,usageDisabled:c,epilogs:m,examples:f,commands:p,descriptions:d}=I)},n}function mc(t){return typeof t=="object"}function Iw(t,e){return mc(t)?{text:t.text,indentation:t.indentation+e}:{text:t,indentation:e}}function sh(t){return mc(t)?t.indentation:0}function xa(t){return mc(t)?t.text:t}var uh=`###-begin-{{app_name}}-completions-###
|
|
12
12
|
#
|
|
13
13
|
# yargs command completion script
|
|
14
14
|
#
|
|
@@ -55,30 +55,30 @@ _{{app_name}}_yargs_completions()
|
|
|
55
55
|
}
|
|
56
56
|
compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
57
57
|
###-end-{{app_name}}-completions-###
|
|
58
|
-
`;var gc=class{constructor(e,r,n,i){var o,s,a;this.yargs=e,this.usage=r,this.command=n,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((o=this.shim.getEnv("SHELL"))===null||o===void 0?void 0:o.includes("zsh"))||((s=this.shim.getEnv("ZSH_NAME"))===null||s===void 0?void 0:s.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(e,r,n,i){let o=this.command.getCommandHandlers();for(let a=0,u=e.length;a<u;++a)if(o[e[a]]&&o[e[a]].builder){let l=o[e[a]].builder;if(ga(l)){this.indexAfterLastReset=a+1;let c=this.yargs.getInternalMethods().reset();return l(c,!0),c.argv}}let s=[];this.commandCompletions(s,e,n),this.optionCompletions(s,e,r,n),this.choicesFromOptionsCompletions(s,e,r,n),this.choicesFromPositionalsCompletions(s,e,r,n),i(null,s)}commandCompletions(e,r,n){let i=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&i[i.length-1]!==n&&!this.previousArgHasChoices(r)&&this.usage.getCommands().forEach(o=>{let s=cn(o[0]).cmd;if(r.indexOf(s)===-1)if(!this.zshShell)e.push(s);else{let a=o[1]||"";e.push(s.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(e,r,n,i){if((i.match(/^-/)||i===""&&e.length===0)&&!this.previousArgHasChoices(r)){let o=this.yargs.getOptions(),s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(o.key).forEach(a=>{let u=!!o.configuration["boolean-negation"]&&o.boolean.includes(a);!s.includes(a)&&!o.hiddenOptions.includes(a)&&!this.argsContainKey(r,a,u)&&this.completeOptionKey(a,e,i,u&&!!o.default[a])})}}choicesFromOptionsCompletions(e,r,n,i){if(this.previousArgHasChoices(r)){let o=this.getPreviousArgChoices(r);o&&o.length>0&&e.push(...o.map(s=>s.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,r,n,i){if(i===""&&e.length>0&&this.previousArgHasChoices(r))return;let o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],s=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),a=o[n._.length-s-1];if(!a)return;let u=this.yargs.getOptions().choices[a]||[];for(let l of u)l.startsWith(i)&&e.push(l.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let r=e[e.length-1],n="";if(!r.startsWith("-")&&e.length>1&&(n=r,r=e[e.length-2]),!r.startsWith("-"))return;let i=r.replace(/^-+/,""),o=this.yargs.getOptions(),s=[i,...this.yargs.getAliases()[i]||[]],a;for(let u of s)if(Object.prototype.hasOwnProperty.call(o.key,u)&&Array.isArray(o.choices[u])){a=o.choices[u];break}if(a)return a.filter(u=>!n||u.startsWith(n))}previousArgHasChoices(e){let r=this.getPreviousArgChoices(e);return r!==void 0&&r.length>0}argsContainKey(e,r,n){let i=o=>e.indexOf((/^[^0-9]$/.test(o)?"-":"--")+o)!==-1;if(i(r)||n&&i(`no-${r}`))return!0;if(this.aliases){for(let o of this.aliases[r])if(i(o))return!0}return!1}completeOptionKey(e,r,n,i){var o,s,a,u;let l=e;if(this.zshShell){let d=this.usage.getDescriptions(),m=(s=(o=this===null||this===void 0?void 0:this.aliases)===null||o===void 0?void 0:o[e])===null||s===void 0?void 0:s.find(b=>{let w=d[b];return typeof w=="string"&&w.length>0}),y=m?d[m]:void 0,g=(u=(a=d[e])!==null&&a!==void 0?a:y)!==null&&u!==void 0?u:"";l=`${e.replace(/:/g,"\\:")}:${g.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let c=d=>/^--/.test(d),f=d=>/^[^0-9]$/.test(d),p=!c(n)&&f(e)?"-":"--";r.push(p+l),i&&r.push(p+"no-"+l)}customCompletion(e,r,n,i){if(Rt(this.customCompletionFunction,null,this.shim),
|
|
58
|
+
`;var gc=class{constructor(e,r,n,i){var o,s,a;this.yargs=e,this.usage=r,this.command=n,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((o=this.shim.getEnv("SHELL"))===null||o===void 0?void 0:o.includes("zsh"))||((s=this.shim.getEnv("ZSH_NAME"))===null||s===void 0?void 0:s.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(e,r,n,i){let o=this.command.getCommandHandlers();for(let a=0,u=e.length;a<u;++a)if(o[e[a]]&&o[e[a]].builder){let l=o[e[a]].builder;if(ga(l)){this.indexAfterLastReset=a+1;let c=this.yargs.getInternalMethods().reset();return l(c,!0),c.argv}}let s=[];this.commandCompletions(s,e,n),this.optionCompletions(s,e,r,n),this.choicesFromOptionsCompletions(s,e,r,n),this.choicesFromPositionalsCompletions(s,e,r,n),i(null,s)}commandCompletions(e,r,n){let i=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&i[i.length-1]!==n&&!this.previousArgHasChoices(r)&&this.usage.getCommands().forEach(o=>{let s=cn(o[0]).cmd;if(r.indexOf(s)===-1)if(!this.zshShell)e.push(s);else{let a=o[1]||"";e.push(s.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(e,r,n,i){if((i.match(/^-/)||i===""&&e.length===0)&&!this.previousArgHasChoices(r)){let o=this.yargs.getOptions(),s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(o.key).forEach(a=>{let u=!!o.configuration["boolean-negation"]&&o.boolean.includes(a);!s.includes(a)&&!o.hiddenOptions.includes(a)&&!this.argsContainKey(r,a,u)&&this.completeOptionKey(a,e,i,u&&!!o.default[a])})}}choicesFromOptionsCompletions(e,r,n,i){if(this.previousArgHasChoices(r)){let o=this.getPreviousArgChoices(r);o&&o.length>0&&e.push(...o.map(s=>s.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,r,n,i){if(i===""&&e.length>0&&this.previousArgHasChoices(r))return;let o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],s=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),a=o[n._.length-s-1];if(!a)return;let u=this.yargs.getOptions().choices[a]||[];for(let l of u)l.startsWith(i)&&e.push(l.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let r=e[e.length-1],n="";if(!r.startsWith("-")&&e.length>1&&(n=r,r=e[e.length-2]),!r.startsWith("-"))return;let i=r.replace(/^-+/,""),o=this.yargs.getOptions(),s=[i,...this.yargs.getAliases()[i]||[]],a;for(let u of s)if(Object.prototype.hasOwnProperty.call(o.key,u)&&Array.isArray(o.choices[u])){a=o.choices[u];break}if(a)return a.filter(u=>!n||u.startsWith(n))}previousArgHasChoices(e){let r=this.getPreviousArgChoices(e);return r!==void 0&&r.length>0}argsContainKey(e,r,n){let i=o=>e.indexOf((/^[^0-9]$/.test(o)?"-":"--")+o)!==-1;if(i(r)||n&&i(`no-${r}`))return!0;if(this.aliases){for(let o of this.aliases[r])if(i(o))return!0}return!1}completeOptionKey(e,r,n,i){var o,s,a,u;let l=e;if(this.zshShell){let d=this.usage.getDescriptions(),m=(s=(o=this===null||this===void 0?void 0:this.aliases)===null||o===void 0?void 0:o[e])===null||s===void 0?void 0:s.find(b=>{let w=d[b];return typeof w=="string"&&w.length>0}),y=m?d[m]:void 0,g=(u=(a=d[e])!==null&&a!==void 0?a:y)!==null&&u!==void 0?u:"";l=`${e.replace(/:/g,"\\:")}:${g.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let c=d=>/^--/.test(d),f=d=>/^[^0-9]$/.test(d),p=!c(n)&&f(e)?"-":"--";r.push(p+l),i&&r.push(p+"no-"+l)}customCompletion(e,r,n,i){if(Rt(this.customCompletionFunction,null,this.shim),vw(this.customCompletionFunction)){let o=this.customCompletionFunction(n,r);return qe(o)?o.then(s=>{this.shim.process.nextTick(()=>{i(null,s)})}).catch(s=>{this.shim.process.nextTick(()=>{i(s,void 0)})}):i(null,o)}else return Dw(this.customCompletionFunction)?this.customCompletionFunction(n,r,(o=i)=>this.defaultCompletion(e,r,n,o),o=>{i(null,o)}):this.customCompletionFunction(n,r,o=>{i(null,o)})}getCompletion(e,r){let n=e.length?e[e.length-1]:"",i=this.yargs.parse(e,!0),o=this.customCompletionFunction?s=>this.customCompletion(e,s,n,r):s=>this.defaultCompletion(e,s,n,r);return qe(i)?i.then(o):o(i)}generateCompletionScript(e,r){let n=this.zshShell?lh:uh,i=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,i),n=n.replace(/{{completion_command}}/g,r),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function ch(t,e,r,n){return new gc(t,e,r,n)}function vw(t){return t.length<3}function Dw(t){return t.length>3}function fh(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;let r=[],n;for(n=0;n<=e.length;n++)r[n]=[n];let i;for(i=0;i<=t.length;i++)r[0][i]=i;for(n=1;n<=e.length;n++)for(i=1;i<=t.length;i++)e.charAt(n-1)===t.charAt(i-1)?r[n][i]=r[n-1][i-1]:n>1&&i>1&&e.charAt(n-2)===t.charAt(i-1)&&e.charAt(n-1)===t.charAt(i-2)?r[n][i]=r[n-2][i-2]+1:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[e.length][t.length]}var ph=["$0","--","_"];function dh(t,e,r){let n=r.y18n.__,i=r.y18n.__n,o={};o.nonOptionCount=function(f){let p=t.getDemandedCommands(),m=f._.length+(f["--"]?f["--"].length:0)-t.getInternalMethods().getContext().commands.length;p._&&(m<p._.min||m>p._.max)&&(m<p._.min?p._.minMsg!==void 0?e.fail(p._.minMsg?p._.minMsg.replace(/\$0/g,m.toString()).replace(/\$1/,p._.min.toString()):null):e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",m,m.toString(),p._.min.toString())):m>p._.max&&(p._.maxMsg!==void 0?e.fail(p._.maxMsg?p._.maxMsg.replace(/\$0/g,m.toString()).replace(/\$1/,p._.max.toString()):null):e.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",m,m.toString(),p._.max.toString()))))},o.positionalCount=function(f,p){p<f&&e.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",p,p+"",f+""))},o.requiredArguments=function(f,p){let d=null;for(let m of Object.keys(p))(!Object.prototype.hasOwnProperty.call(f,m)||typeof f[m]>"u")&&(d=d||{},d[m]=p[m]);if(d){let m=[];for(let g of Object.keys(d)){let b=d[g];b&&m.indexOf(b)<0&&m.push(b)}let y=m.length?`
|
|
59
59
|
${m.join(`
|
|
60
60
|
`)}`:"";e.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(d).length,Object.keys(d).join(", ")+y))}},o.unknownArguments=function(f,p,d,m,y=!0){var g;let b=t.getInternalMethods().getCommandInstance().getCommands(),w=[],k=t.getInternalMethods().getContext();if(Object.keys(f).forEach(D=>{!ph.includes(D)&&!Object.prototype.hasOwnProperty.call(d,D)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),D)&&!o.isValidAndSomeAliasIsNotNew(D,p)&&w.push(D)}),y&&(k.commands.length>0||b.length>0||m)&&f._.slice(k.commands.length).forEach(D=>{b.includes(""+D)||w.push(""+D)}),y){let R=((g=t.getDemandedCommands()._)===null||g===void 0?void 0:g.max)||0,S=k.commands.length+R;S<f._.length&&f._.slice(S).forEach(de=>{de=String(de),!k.commands.includes(de)&&!w.includes(de)&&w.push(de)})}w.length&&e.fail(i("Unknown argument: %s","Unknown arguments: %s",w.length,w.map(D=>D.trim()?D:`"${D}"`).join(", ")))},o.unknownCommands=function(f){let p=t.getInternalMethods().getCommandInstance().getCommands(),d=[],m=t.getInternalMethods().getContext();return(m.commands.length>0||p.length>0)&&f._.slice(m.commands.length).forEach(y=>{p.includes(""+y)||d.push(""+y)}),d.length>0?(e.fail(i("Unknown command: %s","Unknown commands: %s",d.length,d.join(", "))),!0):!1},o.isValidAndSomeAliasIsNotNew=function(f,p){if(!Object.prototype.hasOwnProperty.call(p,f))return!1;let d=t.parsed.newAliases;return[f,...p[f]].some(m=>!Object.prototype.hasOwnProperty.call(d,m)||!d[f])},o.limitedChoices=function(f){let p=t.getOptions(),d={};if(!Object.keys(p.choices).length)return;Object.keys(f).forEach(g=>{ph.indexOf(g)===-1&&Object.prototype.hasOwnProperty.call(p.choices,g)&&[].concat(f[g]).forEach(b=>{p.choices[g].indexOf(b)===-1&&b!==void 0&&(d[g]=(d[g]||[]).concat(b))})});let m=Object.keys(d);if(!m.length)return;let y=n("Invalid values:");m.forEach(g=>{y+=`
|
|
61
61
|
${n("Argument: %s, Given: %s, Choices: %s",g,e.stringifiedValues(d[g]),e.stringifiedValues(p.choices[g]))}`}),e.fail(y)};let s={};o.implies=function(f,p){H("<string|object> [array|number|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach(d=>{o.implies(d,f[d])}):(t.global(f),s[f]||(s[f]=[]),Array.isArray(p)?p.forEach(d=>o.implies(f,d)):(Rt(p,void 0,r),s[f].push(p)))},o.getImplied=function(){return s};function a(c,f){let p=Number(f);return f=isNaN(p)?f:p,typeof f=="number"?f=c._.length>=f:f.match(/^--no-.+/)?(f=f.match(/^--no-(.+)/)[1],f=!Object.prototype.hasOwnProperty.call(c,f)):f=Object.prototype.hasOwnProperty.call(c,f),f}o.implications=function(f){let p=[];if(Object.keys(s).forEach(d=>{let m=d;(s[d]||[]).forEach(y=>{let g=m,b=y;g=a(f,g),y=a(f,y),g&&!y&&p.push(` ${m} -> ${b}`)})}),p.length){let d=`${n("Implications failed:")}
|
|
62
|
-
`;p.forEach(m=>{d+=m}),e.fail(d)}};let u={};o.conflicts=function(f,p){H("<string|object> [array|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach(d=>{o.conflicts(d,f[d])}):(t.global(f),u[f]||(u[f]=[]),Array.isArray(p)?p.forEach(d=>o.conflicts(f,d)):u[f].push(p))},o.getConflicting=()=>u,o.conflicting=function(f){Object.keys(f).forEach(p=>{u[p]&&u[p].forEach(d=>{d&&f[p]!==void 0&&f[d]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",p,d))})}),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(u).forEach(p=>{u[p].forEach(d=>{d&&f[r.Parser.camelCase(p)]!==void 0&&f[r.Parser.camelCase(d)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",p,d))})})},o.recommendCommands=function(f,p){p=p.sort((g,b)=>b.length-g.length);let m=null,y=1/0;for(let g=0,b;(b=p[g])!==void 0;g++){let w=fh(f,b);w<=3&&w<y&&(y=w,m=b)}m&&e.fail(n("Did you mean %s?",m))},o.reset=function(f){return s=fn(s,p=>!f[p]),u=fn(u,p=>!f[p]),o};let l=[];return o.freeze=function(){l.push({implied:s,conflicting:u})},o.unfreeze=function(){let f=l.pop();Rt(f,void 0,r),{implied:s,conflicting:u}=f},o}var xc=[],ss;function as(t,e,r,n){ss=n;let i={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if(typeof t.extends!="string")return i;let o=/\.json|\..*rc$/.test(t.extends),s=null;if(o)s=Rw(e,t.extends);else try{s=Er.resolve(t.extends)}catch{return t}Dw(s),xc.push(s),i=o?JSON.parse(ss.readFileSync(s,"utf8")):Er(t.extends),delete t.extends,i=as(i,ss.path.dirname(s),r,ss)}return xc=[],r?hh(i,t):Object.assign({},i,t)}function Dw(t){if(xc.indexOf(t)>-1)throw new $e(`Circular extended configurations: '${t}'.`)}function Rw(t,e){return ss.path.resolve(t,e)}function hh(t,e){let r={};function n(i){return i&&typeof i=="object"&&!Array.isArray(i)}Object.assign(r,t);for(let i of Object.keys(e))n(e[i])&&n(r[i])?r[i]=hh(t[i],e[i]):r[i]=e[i];return r}var Z=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},h=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},nt,Hn,us,rr,Yt,ya,dn,Kn,ba,nr,Ea,ir,Ar,Zt,or,Aa,Wi,Et,re,ka,wa,Xt,Yn,Hi,Zn,hn,Ca,pe,Xn,Jn,Qn,ge,Ta,kr,Qe;function Nh(t){return(e=[],r=t.process.cwd(),n)=>{let i=new Ic(e,r,n,t);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}var mh=Symbol("copyDoubleDash"),gh=Symbol("copyDoubleDash"),yc=Symbol("deleteFromParserHintObject"),xh=Symbol("emitWarning"),yh=Symbol("freeze"),bh=Symbol("getDollarZero"),ei=Symbol("getParserConfiguration"),Eh=Symbol("getUsageConfiguration"),bc=Symbol("guessLocale"),Ah=Symbol("guessVersion"),kh=Symbol("parsePositionalNumbers"),Ec=Symbol("pkgUp"),mn=Symbol("populateParserHintArray"),Ki=Symbol("populateParserHintSingleValueDictionary"),Ac=Symbol("populateParserHintArrayDictionary"),kc=Symbol("populateParserHintDictionary"),wc=Symbol("sanitizeKey"),Cc=Symbol("setKey"),Tc=Symbol("unfreeze"),wh=Symbol("validateAsync"),Ch=Symbol("getCommandInstance"),Th=Symbol("getContext"),_h=Symbol("getHasOutput"),Sh=Symbol("getLoggerInstance"),Ih=Symbol("getParseContext"),Oh=Symbol("getUsageInstance"),vh=Symbol("getValidationInstance"),_a=Symbol("hasParseCallback"),Dh=Symbol("isGlobalContext"),ti=Symbol("postProcess"),Rh=Symbol("rebase"),_c=Symbol("reset"),ls=Symbol("runYargsParserAndExecuteCommands"),Sc=Symbol("runValidation"),Fh=Symbol("setHasOutput"),ri=Symbol("kTrackManuallySetKeys"),Ic=class{constructor(e=[],r,n,i){this.customScriptName=!1,this.parsed=!1,nt.set(this,void 0),Hn.set(this,void 0),us.set(this,{commands:[],fullCommands:[]}),rr.set(this,null),Yt.set(this,null),ya.set(this,"show-hidden"),dn.set(this,null),Kn.set(this,!0),ba.set(this,{}),nr.set(this,!0),Ea.set(this,[]),ir.set(this,void 0),Ar.set(this,{}),Zt.set(this,!1),or.set(this,null),Aa.set(this,!0),Wi.set(this,void 0),Et.set(this,""),re.set(this,void 0),ka.set(this,void 0),wa.set(this,{}),Xt.set(this,null),Yn.set(this,null),Hi.set(this,{}),Zn.set(this,{}),hn.set(this,void 0),Ca.set(this,!1),pe.set(this,void 0),Xn.set(this,!1),Jn.set(this,!1),Qn.set(this,!1),ge.set(this,void 0),Ta.set(this,{}),kr.set(this,null),Qe.set(this,void 0),Z(this,pe,i,"f"),Z(this,hn,e,"f"),Z(this,Hn,r,"f"),Z(this,ka,n,"f"),Z(this,ir,new ma(this),"f"),this.$0=this[bh](),this[_c](),Z(this,nt,h(this,nt,"f"),"f"),Z(this,ge,h(this,ge,"f"),"f"),Z(this,Qe,h(this,Qe,"f"),"f"),Z(this,re,h(this,re,"f"),"f"),h(this,re,"f").showHiddenOpt=h(this,ya,"f"),Z(this,Wi,this[gh](),"f")}addHelpOpt(e,r){let n="help";return H("[string|boolean] [string]",[e,r],arguments.length),h(this,or,"f")&&(this[yc](h(this,or,"f")),Z(this,or,null,"f")),e===!1&&r===void 0?this:(Z(this,or,typeof e=="string"?e:n,"f"),this.boolean(h(this,or,"f")),this.describe(h(this,or,"f"),r||h(this,ge,"f").deferY18nLookup("Show help")),this)}help(e,r){return this.addHelpOpt(e,r)}addShowHiddenOpt(e,r){if(H("[string|boolean] [string]",[e,r],arguments.length),e===!1&&r===void 0)return this;let n=typeof e=="string"?e:h(this,ya,"f");return this.boolean(n),this.describe(n,r||h(this,ge,"f").deferY18nLookup("Show hidden options")),h(this,re,"f").showHiddenOpt=n,this}showHidden(e,r){return this.addShowHiddenOpt(e,r)}alias(e,r){return H("<object|string|array> [string|array]",[e,r],arguments.length),this[Ac](this.alias.bind(this),"alias",e,r),this}array(e){return H("<array|string>",[e],arguments.length),this[mn]("array",e),this[ri](e),this}boolean(e){return H("<array|string>",[e],arguments.length),this[mn]("boolean",e),this[ri](e),this}check(e,r){return H("<function> [boolean]",[e,r],arguments.length),this.middleware((n,i)=>Wn(()=>e(n,i.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&h(this,ge,"f").fail(o.toString(),o):h(this,ge,"f").fail(h(this,pe,"f").y18n.__("Argument check failed: %s",e.toString())),n),o=>(h(this,ge,"f").fail(o.message?o.message:o.toString(),o),n)),!1,r),this}choices(e,r){return H("<object|string|array> [string|array]",[e,r],arguments.length),this[Ac](this.choices.bind(this),"choices",e,r),this}coerce(e,r){if(H("<object|string|array> [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new $e("coerce callback must be provided");for(let n of e)this.coerce(n,r);return this}else if(typeof e=="object"){for(let n of Object.keys(e))this.coerce(n,e[n]);return this}if(!r)throw new $e("coerce callback must be provided");return h(this,re,"f").key[e]=!0,h(this,ir,"f").addCoerceMiddleware((n,i)=>{let o;return Object.prototype.hasOwnProperty.call(n,e)?Wn(()=>(o=i.getAliases(),r(n[e])),a=>{n[e]=a;let u=i.getInternalMethods().getParserConfiguration()["strip-aliased"];if(o[e]&&u!==!0)for(let l of o[e])n[l]=a;return n},a=>{throw new $e(a.message)}):n},e),this}conflicts(e,r){return H("<string|object> [string|array]",[e,r],arguments.length),h(this,Qe,"f").conflicts(e,r),this}config(e="config",r,n){return H("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=as(e,h(this,Hn,"f"),this[ei]()["deep-merge-config"]||!1,h(this,pe,"f")),h(this,re,"f").configObjects=(h(this,re,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||h(this,ge,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(i=>{h(this,re,"f").config[i]=n||!0}),this)}completion(e,r,n){return H("[string] [string|boolean|function] [function]",[e,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),Z(this,Yt,e||h(this,Yt,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(h(this,Yt,"f"),r),n&&h(this,rr,"f").registerFunction(n),this}command(e,r,n,i,o,s){return H("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,i,o,s],arguments.length),h(this,nt,"f").addHandler(e,r,n,i,o,s),this}commands(e,r,n,i,o,s){return this.command(e,r,n,i,o,s)}commandDir(e,r){H("<string> [object]",[e,r],arguments.length);let n=h(this,ka,"f")||h(this,pe,"f").require;return h(this,nt,"f").addDirectory(e,n,h(this,pe,"f").getCallerFile(),r),this}count(e){return H("<array|string>",[e],arguments.length),this[mn]("count",e),this[ri](e),this}default(e,r,n){return H("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(pc(e,h(this,pe,"f")),h(this,re,"f").defaultDescription[e]=n),typeof r=="function"&&(pc(e,h(this,pe,"f")),h(this,re,"f").defaultDescription[e]||(h(this,re,"f").defaultDescription[e]=h(this,ge,"f").functionDescription(r)),r=r.call()),this[Ki](this.default.bind(this),"default",e,r),this}defaults(e,r,n){return this.default(e,r,n)}demandCommand(e=1,r,n,i){return H("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,i],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),h(this,re,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:i},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(i=>{Rt(n,!0,h(this,pe,"f")),this.demandOption(i,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(Rt(n,!0,h(this,pe,"f")),this.demandCommand(e,r,n,n)):Array.isArray(e)?e.forEach(i=>{Rt(n,!0,h(this,pe,"f")),this.demandOption(i,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,r){return H("<object|string|array> [string]",[e,r],arguments.length),this[Ki](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return H("<string> [string|boolean]",[e,r],arguments.length),h(this,re,"f").deprecatedOptions[e]=r,this}describe(e,r){return H("<object|string|array> [string]",[e,r],arguments.length),this[Cc](e,!0),h(this,ge,"f").describe(e,r),this}detectLocale(e){return H("<boolean>",[e],arguments.length),Z(this,Kn,e,"f"),this}env(e){return H("[string|boolean]",[e],arguments.length),e===!1?delete h(this,re,"f").envPrefix:h(this,re,"f").envPrefix=e||"",this}epilogue(e){return H("<string>",[e],arguments.length),h(this,ge,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return H("<string|array> [string]",[e,r],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):h(this,ge,"f").example(e,r),this}exit(e,r){Z(this,Zt,!0,"f"),Z(this,dn,r,"f"),h(this,nr,"f")&&h(this,pe,"f").process.exit(e)}exitProcess(e=!0){return H("[boolean]",[e],arguments.length),Z(this,nr,e,"f"),this}fail(e){if(H("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new $e("Invalid first argument. Expected function or boolean 'false'");return h(this,ge,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){return H("<array> [function]",[e,r],arguments.length),r?h(this,rr,"f").getCompletion(e,r):new Promise((n,i)=>{h(this,rr,"f").getCompletion(e,(o,s)=>{o?i(o):n(s)})})}getDemandedOptions(){return H([],0),h(this,re,"f").demandedOptions}getDemandedCommands(){return H([],0),h(this,re,"f").demandedCommands}getDeprecatedOptions(){return H([],0),h(this,re,"f").deprecatedOptions}getDetectLocale(){return h(this,Kn,"f")}getExitProcess(){return h(this,nr,"f")}getGroups(){return Object.assign({},h(this,Ar,"f"),h(this,Zn,"f"))}getHelp(){if(Z(this,Zt,!0,"f"),!h(this,ge,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[ls](h(this,hn,"f"),void 0,void 0,0,!0);if(qe(r))return r.then(()=>h(this,ge,"f").help())}let e=h(this,nt,"f").runDefaultBuilderOn(this);if(qe(e))return e.then(()=>h(this,ge,"f").help())}return Promise.resolve(h(this,ge,"f").help())}getOptions(){return h(this,re,"f")}getStrict(){return h(this,Xn,"f")}getStrictCommands(){return h(this,Jn,"f")}getStrictOptions(){return h(this,Qn,"f")}global(e,r){return H("<string|array> [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?h(this,re,"f").local=h(this,re,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{h(this,re,"f").local.includes(n)||h(this,re,"f").local.push(n)}),this}group(e,r){H("<string|array> <string>",[e,r],arguments.length);let n=h(this,Zn,"f")[r]||h(this,Ar,"f")[r];h(this,Zn,"f")[r]&&delete h(this,Zn,"f")[r];let i={};return h(this,Ar,"f")[r]=(n||[]).concat(e).filter(o=>i[o]?!1:i[o]=!0),this}hide(e){return H("<string>",[e],arguments.length),h(this,re,"f").hiddenOptions.push(e),this}implies(e,r){return H("<string|object> [number|string|array]",[e,r],arguments.length),h(this,Qe,"f").implies(e,r),this}locale(e){return H("[string]",[e],arguments.length),e===void 0?(this[bc](),h(this,pe,"f").y18n.getLocale()):(Z(this,Kn,!1,"f"),h(this,pe,"f").y18n.setLocale(e),this)}middleware(e,r,n){return h(this,ir,"f").addMiddleware(e,!!r,n)}nargs(e,r){return H("<string|object|array> [number]",[e,r],arguments.length),this[Ki](this.nargs.bind(this),"narg",e,r),this}normalize(e){return H("<array|string>",[e],arguments.length),this[mn]("normalize",e),this}number(e){return H("<array|string>",[e],arguments.length),this[mn]("number",e),this[ri](e),this}option(e,r){if(H("<string|object> [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[ri](e),h(this,kr,"f")&&(e==="version"||r?.alias==="version")&&this[xh](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
62
|
+
`;p.forEach(m=>{d+=m}),e.fail(d)}};let u={};o.conflicts=function(f,p){H("<string|object> [array|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach(d=>{o.conflicts(d,f[d])}):(t.global(f),u[f]||(u[f]=[]),Array.isArray(p)?p.forEach(d=>o.conflicts(f,d)):u[f].push(p))},o.getConflicting=()=>u,o.conflicting=function(f){Object.keys(f).forEach(p=>{u[p]&&u[p].forEach(d=>{d&&f[p]!==void 0&&f[d]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",p,d))})}),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(u).forEach(p=>{u[p].forEach(d=>{d&&f[r.Parser.camelCase(p)]!==void 0&&f[r.Parser.camelCase(d)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",p,d))})})},o.recommendCommands=function(f,p){p=p.sort((g,b)=>b.length-g.length);let m=null,y=1/0;for(let g=0,b;(b=p[g])!==void 0;g++){let w=fh(f,b);w<=3&&w<y&&(y=w,m=b)}m&&e.fail(n("Did you mean %s?",m))},o.reset=function(f){return s=fn(s,p=>!f[p]),u=fn(u,p=>!f[p]),o};let l=[];return o.freeze=function(){l.push({implied:s,conflicting:u})},o.unfreeze=function(){let f=l.pop();Rt(f,void 0,r),{implied:s,conflicting:u}=f},o}var xc=[],ss;function as(t,e,r,n){ss=n;let i={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if(typeof t.extends!="string")return i;let o=/\.json|\..*rc$/.test(t.extends),s=null;if(o)s=Fw(e,t.extends);else try{s=Er.resolve(t.extends)}catch{return t}Rw(s),xc.push(s),i=o?JSON.parse(ss.readFileSync(s,"utf8")):Er(t.extends),delete t.extends,i=as(i,ss.path.dirname(s),r,ss)}return xc=[],r?hh(i,t):Object.assign({},i,t)}function Rw(t){if(xc.indexOf(t)>-1)throw new $e(`Circular extended configurations: '${t}'.`)}function Fw(t,e){return ss.path.resolve(t,e)}function hh(t,e){let r={};function n(i){return i&&typeof i=="object"&&!Array.isArray(i)}Object.assign(r,t);for(let i of Object.keys(e))n(e[i])&&n(r[i])?r[i]=hh(t[i],e[i]):r[i]=e[i];return r}var Z=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},h=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},nt,Hn,us,rr,Yt,ya,dn,Kn,ba,nr,Ea,ir,Ar,Zt,or,Aa,Wi,Et,re,ka,wa,Xt,Yn,Hi,Zn,hn,Ca,pe,Xn,Jn,Qn,ge,Ta,kr,Qe;function Nh(t){return(e=[],r=t.process.cwd(),n)=>{let i=new Ic(e,r,n,t);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}var mh=Symbol("copyDoubleDash"),gh=Symbol("copyDoubleDash"),yc=Symbol("deleteFromParserHintObject"),xh=Symbol("emitWarning"),yh=Symbol("freeze"),bh=Symbol("getDollarZero"),ei=Symbol("getParserConfiguration"),Eh=Symbol("getUsageConfiguration"),bc=Symbol("guessLocale"),Ah=Symbol("guessVersion"),kh=Symbol("parsePositionalNumbers"),Ec=Symbol("pkgUp"),mn=Symbol("populateParserHintArray"),Ki=Symbol("populateParserHintSingleValueDictionary"),Ac=Symbol("populateParserHintArrayDictionary"),kc=Symbol("populateParserHintDictionary"),wc=Symbol("sanitizeKey"),Cc=Symbol("setKey"),Tc=Symbol("unfreeze"),wh=Symbol("validateAsync"),Ch=Symbol("getCommandInstance"),Th=Symbol("getContext"),_h=Symbol("getHasOutput"),Sh=Symbol("getLoggerInstance"),Ih=Symbol("getParseContext"),Oh=Symbol("getUsageInstance"),vh=Symbol("getValidationInstance"),_a=Symbol("hasParseCallback"),Dh=Symbol("isGlobalContext"),ti=Symbol("postProcess"),Rh=Symbol("rebase"),_c=Symbol("reset"),ls=Symbol("runYargsParserAndExecuteCommands"),Sc=Symbol("runValidation"),Fh=Symbol("setHasOutput"),ri=Symbol("kTrackManuallySetKeys"),Ic=class{constructor(e=[],r,n,i){this.customScriptName=!1,this.parsed=!1,nt.set(this,void 0),Hn.set(this,void 0),us.set(this,{commands:[],fullCommands:[]}),rr.set(this,null),Yt.set(this,null),ya.set(this,"show-hidden"),dn.set(this,null),Kn.set(this,!0),ba.set(this,{}),nr.set(this,!0),Ea.set(this,[]),ir.set(this,void 0),Ar.set(this,{}),Zt.set(this,!1),or.set(this,null),Aa.set(this,!0),Wi.set(this,void 0),Et.set(this,""),re.set(this,void 0),ka.set(this,void 0),wa.set(this,{}),Xt.set(this,null),Yn.set(this,null),Hi.set(this,{}),Zn.set(this,{}),hn.set(this,void 0),Ca.set(this,!1),pe.set(this,void 0),Xn.set(this,!1),Jn.set(this,!1),Qn.set(this,!1),ge.set(this,void 0),Ta.set(this,{}),kr.set(this,null),Qe.set(this,void 0),Z(this,pe,i,"f"),Z(this,hn,e,"f"),Z(this,Hn,r,"f"),Z(this,ka,n,"f"),Z(this,ir,new ma(this),"f"),this.$0=this[bh](),this[_c](),Z(this,nt,h(this,nt,"f"),"f"),Z(this,ge,h(this,ge,"f"),"f"),Z(this,Qe,h(this,Qe,"f"),"f"),Z(this,re,h(this,re,"f"),"f"),h(this,re,"f").showHiddenOpt=h(this,ya,"f"),Z(this,Wi,this[gh](),"f")}addHelpOpt(e,r){let n="help";return H("[string|boolean] [string]",[e,r],arguments.length),h(this,or,"f")&&(this[yc](h(this,or,"f")),Z(this,or,null,"f")),e===!1&&r===void 0?this:(Z(this,or,typeof e=="string"?e:n,"f"),this.boolean(h(this,or,"f")),this.describe(h(this,or,"f"),r||h(this,ge,"f").deferY18nLookup("Show help")),this)}help(e,r){return this.addHelpOpt(e,r)}addShowHiddenOpt(e,r){if(H("[string|boolean] [string]",[e,r],arguments.length),e===!1&&r===void 0)return this;let n=typeof e=="string"?e:h(this,ya,"f");return this.boolean(n),this.describe(n,r||h(this,ge,"f").deferY18nLookup("Show hidden options")),h(this,re,"f").showHiddenOpt=n,this}showHidden(e,r){return this.addShowHiddenOpt(e,r)}alias(e,r){return H("<object|string|array> [string|array]",[e,r],arguments.length),this[Ac](this.alias.bind(this),"alias",e,r),this}array(e){return H("<array|string>",[e],arguments.length),this[mn]("array",e),this[ri](e),this}boolean(e){return H("<array|string>",[e],arguments.length),this[mn]("boolean",e),this[ri](e),this}check(e,r){return H("<function> [boolean]",[e,r],arguments.length),this.middleware((n,i)=>Wn(()=>e(n,i.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&h(this,ge,"f").fail(o.toString(),o):h(this,ge,"f").fail(h(this,pe,"f").y18n.__("Argument check failed: %s",e.toString())),n),o=>(h(this,ge,"f").fail(o.message?o.message:o.toString(),o),n)),!1,r),this}choices(e,r){return H("<object|string|array> [string|array]",[e,r],arguments.length),this[Ac](this.choices.bind(this),"choices",e,r),this}coerce(e,r){if(H("<object|string|array> [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new $e("coerce callback must be provided");for(let n of e)this.coerce(n,r);return this}else if(typeof e=="object"){for(let n of Object.keys(e))this.coerce(n,e[n]);return this}if(!r)throw new $e("coerce callback must be provided");return h(this,re,"f").key[e]=!0,h(this,ir,"f").addCoerceMiddleware((n,i)=>{let o;return Object.prototype.hasOwnProperty.call(n,e)?Wn(()=>(o=i.getAliases(),r(n[e])),a=>{n[e]=a;let u=i.getInternalMethods().getParserConfiguration()["strip-aliased"];if(o[e]&&u!==!0)for(let l of o[e])n[l]=a;return n},a=>{throw new $e(a.message)}):n},e),this}conflicts(e,r){return H("<string|object> [string|array]",[e,r],arguments.length),h(this,Qe,"f").conflicts(e,r),this}config(e="config",r,n){return H("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=as(e,h(this,Hn,"f"),this[ei]()["deep-merge-config"]||!1,h(this,pe,"f")),h(this,re,"f").configObjects=(h(this,re,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||h(this,ge,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(i=>{h(this,re,"f").config[i]=n||!0}),this)}completion(e,r,n){return H("[string] [string|boolean|function] [function]",[e,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),Z(this,Yt,e||h(this,Yt,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(h(this,Yt,"f"),r),n&&h(this,rr,"f").registerFunction(n),this}command(e,r,n,i,o,s){return H("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,i,o,s],arguments.length),h(this,nt,"f").addHandler(e,r,n,i,o,s),this}commands(e,r,n,i,o,s){return this.command(e,r,n,i,o,s)}commandDir(e,r){H("<string> [object]",[e,r],arguments.length);let n=h(this,ka,"f")||h(this,pe,"f").require;return h(this,nt,"f").addDirectory(e,n,h(this,pe,"f").getCallerFile(),r),this}count(e){return H("<array|string>",[e],arguments.length),this[mn]("count",e),this[ri](e),this}default(e,r,n){return H("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(pc(e,h(this,pe,"f")),h(this,re,"f").defaultDescription[e]=n),typeof r=="function"&&(pc(e,h(this,pe,"f")),h(this,re,"f").defaultDescription[e]||(h(this,re,"f").defaultDescription[e]=h(this,ge,"f").functionDescription(r)),r=r.call()),this[Ki](this.default.bind(this),"default",e,r),this}defaults(e,r,n){return this.default(e,r,n)}demandCommand(e=1,r,n,i){return H("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,i],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),h(this,re,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:i},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(i=>{Rt(n,!0,h(this,pe,"f")),this.demandOption(i,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(Rt(n,!0,h(this,pe,"f")),this.demandCommand(e,r,n,n)):Array.isArray(e)?e.forEach(i=>{Rt(n,!0,h(this,pe,"f")),this.demandOption(i,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,r){return H("<object|string|array> [string]",[e,r],arguments.length),this[Ki](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return H("<string> [string|boolean]",[e,r],arguments.length),h(this,re,"f").deprecatedOptions[e]=r,this}describe(e,r){return H("<object|string|array> [string]",[e,r],arguments.length),this[Cc](e,!0),h(this,ge,"f").describe(e,r),this}detectLocale(e){return H("<boolean>",[e],arguments.length),Z(this,Kn,e,"f"),this}env(e){return H("[string|boolean]",[e],arguments.length),e===!1?delete h(this,re,"f").envPrefix:h(this,re,"f").envPrefix=e||"",this}epilogue(e){return H("<string>",[e],arguments.length),h(this,ge,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return H("<string|array> [string]",[e,r],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):h(this,ge,"f").example(e,r),this}exit(e,r){Z(this,Zt,!0,"f"),Z(this,dn,r,"f"),h(this,nr,"f")&&h(this,pe,"f").process.exit(e)}exitProcess(e=!0){return H("[boolean]",[e],arguments.length),Z(this,nr,e,"f"),this}fail(e){if(H("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new $e("Invalid first argument. Expected function or boolean 'false'");return h(this,ge,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){return H("<array> [function]",[e,r],arguments.length),r?h(this,rr,"f").getCompletion(e,r):new Promise((n,i)=>{h(this,rr,"f").getCompletion(e,(o,s)=>{o?i(o):n(s)})})}getDemandedOptions(){return H([],0),h(this,re,"f").demandedOptions}getDemandedCommands(){return H([],0),h(this,re,"f").demandedCommands}getDeprecatedOptions(){return H([],0),h(this,re,"f").deprecatedOptions}getDetectLocale(){return h(this,Kn,"f")}getExitProcess(){return h(this,nr,"f")}getGroups(){return Object.assign({},h(this,Ar,"f"),h(this,Zn,"f"))}getHelp(){if(Z(this,Zt,!0,"f"),!h(this,ge,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[ls](h(this,hn,"f"),void 0,void 0,0,!0);if(qe(r))return r.then(()=>h(this,ge,"f").help())}let e=h(this,nt,"f").runDefaultBuilderOn(this);if(qe(e))return e.then(()=>h(this,ge,"f").help())}return Promise.resolve(h(this,ge,"f").help())}getOptions(){return h(this,re,"f")}getStrict(){return h(this,Xn,"f")}getStrictCommands(){return h(this,Jn,"f")}getStrictOptions(){return h(this,Qn,"f")}global(e,r){return H("<string|array> [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?h(this,re,"f").local=h(this,re,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{h(this,re,"f").local.includes(n)||h(this,re,"f").local.push(n)}),this}group(e,r){H("<string|array> <string>",[e,r],arguments.length);let n=h(this,Zn,"f")[r]||h(this,Ar,"f")[r];h(this,Zn,"f")[r]&&delete h(this,Zn,"f")[r];let i={};return h(this,Ar,"f")[r]=(n||[]).concat(e).filter(o=>i[o]?!1:i[o]=!0),this}hide(e){return H("<string>",[e],arguments.length),h(this,re,"f").hiddenOptions.push(e),this}implies(e,r){return H("<string|object> [number|string|array]",[e,r],arguments.length),h(this,Qe,"f").implies(e,r),this}locale(e){return H("[string]",[e],arguments.length),e===void 0?(this[bc](),h(this,pe,"f").y18n.getLocale()):(Z(this,Kn,!1,"f"),h(this,pe,"f").y18n.setLocale(e),this)}middleware(e,r,n){return h(this,ir,"f").addMiddleware(e,!!r,n)}nargs(e,r){return H("<string|object|array> [number]",[e,r],arguments.length),this[Ki](this.nargs.bind(this),"narg",e,r),this}normalize(e){return H("<array|string>",[e],arguments.length),this[mn]("normalize",e),this}number(e){return H("<array|string>",[e],arguments.length),this[mn]("number",e),this[ri](e),this}option(e,r){if(H("<string|object> [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[ri](e),h(this,kr,"f")&&(e==="version"||r?.alias==="version")&&this[xh](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
63
63
|
`),void 0,"versionWarning"),h(this,re,"f").key[e]=!0,r.alias&&this.alias(e,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(e,n);let i=r.demand||r.required||r.require;i&&this.demand(e,i),r.demandOption&&this.demandOption(e,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(e,r.conflicts),"default"in r&&this.default(e,r.default),r.implies!==void 0&&this.implies(e,r.implies),r.nargs!==void 0&&this.nargs(e,r.nargs),r.config&&this.config(e,r.configParser),r.normalize&&this.normalize(e),r.choices&&this.choices(e,r.choices),r.coerce&&this.coerce(e,r.coerce),r.group&&this.group(e,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(e),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(e),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(e),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(e),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(e),typeof r.global=="boolean"&&this.global(e,r.global),r.defaultDescription&&(h(this,re,"f").defaultDescription[e]=r.defaultDescription),r.skipValidation&&this.skipValidation(e);let o=r.describe||r.description||r.desc,s=h(this,ge,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(s,e)||typeof o=="string")&&this.describe(e,o),r.hidden&&this.hide(e),r.requiresArg&&this.requiresArg(e)}return this}options(e,r){return this.option(e,r)}parse(e,r,n){H("[string|array] [function|boolean|object] [function]",[e,r,n],arguments.length),this[yh](),typeof e>"u"&&(e=h(this,hn,"f")),typeof r=="object"&&(Z(this,Yn,r,"f"),r=n),typeof r=="function"&&(Z(this,Xt,r,"f"),r=!1),r||Z(this,hn,e,"f"),h(this,Xt,"f")&&Z(this,nr,!1,"f");let i=this[ls](e,!!r),o=this.parsed;return h(this,rr,"f").setParsed(this.parsed),qe(i)?i.then(s=>(h(this,Xt,"f")&&h(this,Xt,"f").call(this,h(this,dn,"f"),s,h(this,Et,"f")),s)).catch(s=>{throw h(this,Xt,"f")&&h(this,Xt,"f")(s,this.parsed.argv,h(this,Et,"f")),s}).finally(()=>{this[Tc](),this.parsed=o}):(h(this,Xt,"f")&&h(this,Xt,"f").call(this,h(this,dn,"f"),i,h(this,Et,"f")),this[Tc](),this.parsed=o,i)}parseAsync(e,r,n){let i=this.parse(e,r,n);return qe(i)?i:Promise.resolve(i)}parseSync(e,r,n){let i=this.parse(e,r,n);if(qe(i))throw new $e(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return i}parserConfiguration(e){return H("<object>",[e],arguments.length),Z(this,wa,e,"f"),this}pkgConf(e,r){H("<string> [string]",[e,r],arguments.length);let n=null,i=this[Ec](r||h(this,Hn,"f"));return i[e]&&typeof i[e]=="object"&&(n=as(i[e],r||h(this,Hn,"f"),this[ei]()["deep-merge-config"]||!1,h(this,pe,"f")),h(this,re,"f").configObjects=(h(this,re,"f").configObjects||[]).concat(n)),this}positional(e,r){H("<string> <object>",[e,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=fn(r,(s,a)=>s==="type"&&!["string","number","boolean"].includes(a)?!1:n.includes(s));let i=h(this,us,"f").fullCommands[h(this,us,"f").fullCommands.length-1],o=i?h(this,nt,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return Vi(o).forEach(s=>{let a=o[s];Array.isArray(a)?a.indexOf(e)!==-1&&(r[s]=!0):a[e]&&!(s in r)&&(r[s]=a[e])}),this.group(e,h(this,ge,"f").getPositionalGroupName()),this.option(e,r)}recommendCommands(e=!0){return H("[boolean]",[e],arguments.length),Z(this,Ca,e,"f"),this}required(e,r,n){return this.demand(e,r,n)}require(e,r,n){return this.demand(e,r,n)}requiresArg(e){return H("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&h(this,re,"f").narg[e]?this:(this[Ki](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,r){return H("[string] [string]",[e,r],arguments.length),e=e||this.$0,h(this,Wi,"f").log(h(this,rr,"f").generateCompletionScript(e,r||h(this,Yt,"f")||"completion")),this}showHelp(e){if(H("[string|function]",[e],arguments.length),Z(this,Zt,!0,"f"),!h(this,ge,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[ls](h(this,hn,"f"),void 0,void 0,0,!0);if(qe(n))return n.then(()=>{h(this,ge,"f").showHelp(e)}),this}let r=h(this,nt,"f").runDefaultBuilderOn(this);if(qe(r))return r.then(()=>{h(this,ge,"f").showHelp(e)}),this}return h(this,ge,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,r){return H("[boolean|string] [string]",[e,r],arguments.length),h(this,ge,"f").showHelpOnFail(e,r),this}showVersion(e){return H("[string|function]",[e],arguments.length),h(this,ge,"f").showVersion(e),this}skipValidation(e){return H("<array|string>",[e],arguments.length),this[mn]("skipValidation",e),this}strict(e){return H("[boolean]",[e],arguments.length),Z(this,Xn,e!==!1,"f"),this}strictCommands(e){return H("[boolean]",[e],arguments.length),Z(this,Jn,e!==!1,"f"),this}strictOptions(e){return H("[boolean]",[e],arguments.length),Z(this,Qn,e!==!1,"f"),this}string(e){return H("<array|string>",[e],arguments.length),this[mn]("string",e),this[ri](e),this}terminalWidth(){return H([],0),h(this,pe,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return H("<object>",[e],arguments.length),Z(this,Kn,!1,"f"),h(this,pe,"f").y18n.updateLocale(e),this}usage(e,r,n,i){if(H("<string|null|undefined> [string|boolean] [function|object] [function]",[e,r,n,i],arguments.length),r!==void 0){if(Rt(e,null,h(this,pe,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,r,n,i);throw new $e(".usage() description must start with $0 if being used as alias for .command()")}else return h(this,ge,"f").usage(e),this}usageConfiguration(e){return H("<object>",[e],arguments.length),Z(this,Ta,e,"f"),this}version(e,r,n){let i="version";if(H("[boolean|string] [string] [string]",[e,r,n],arguments.length),h(this,kr,"f")&&(this[yc](h(this,kr,"f")),h(this,ge,"f").version(void 0),Z(this,kr,null,"f")),arguments.length===0)n=this[Ah](),e=i;else if(arguments.length===1){if(e===!1)return this;n=e,e=i}else arguments.length===2&&(n=r,r=void 0);return Z(this,kr,typeof e=="string"?e:i,"f"),r=r||h(this,ge,"f").deferY18nLookup("Show version number"),h(this,ge,"f").version(n||void 0),this.boolean(h(this,kr,"f")),this.describe(h(this,kr,"f"),r),this}wrap(e){return H("<number|null|undefined>",[e],arguments.length),h(this,ge,"f").wrap(e),this}[(nt=new WeakMap,Hn=new WeakMap,us=new WeakMap,rr=new WeakMap,Yt=new WeakMap,ya=new WeakMap,dn=new WeakMap,Kn=new WeakMap,ba=new WeakMap,nr=new WeakMap,Ea=new WeakMap,ir=new WeakMap,Ar=new WeakMap,Zt=new WeakMap,or=new WeakMap,Aa=new WeakMap,Wi=new WeakMap,Et=new WeakMap,re=new WeakMap,ka=new WeakMap,wa=new WeakMap,Xt=new WeakMap,Yn=new WeakMap,Hi=new WeakMap,Zn=new WeakMap,hn=new WeakMap,Ca=new WeakMap,pe=new WeakMap,Xn=new WeakMap,Jn=new WeakMap,Qn=new WeakMap,ge=new WeakMap,Ta=new WeakMap,kr=new WeakMap,Qe=new WeakMap,mh)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[gh](){return{log:(...e)=>{this[_a]()||console.log(...e),Z(this,Zt,!0,"f"),h(this,Et,"f").length&&Z(this,Et,h(this,Et,"f")+`
|
|
64
64
|
`,"f"),Z(this,Et,h(this,Et,"f")+e.join(" "),"f")},error:(...e)=>{this[_a]()||console.error(...e),Z(this,Zt,!0,"f"),h(this,Et,"f").length&&Z(this,Et,h(this,Et,"f")+`
|
|
65
|
-
`,"f"),Z(this,Et,h(this,Et,"f")+e.join(" "),"f")}}}[yc](e){Vi(h(this,re,"f")).forEach(r=>{if((i=>i==="configObjects")(r))return;let n=h(this,re,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete h(this,ge,"f").getDescriptions()[e]}[xh](e,r,n){h(this,ba,"f")[n]||(h(this,pe,"f").process.emitWarning(e,r),h(this,ba,"f")[n]=!0)}[yh](){h(this,Ea,"f").push({options:h(this,re,"f"),configObjects:h(this,re,"f").configObjects.slice(0),exitProcess:h(this,nr,"f"),groups:h(this,Ar,"f"),strict:h(this,Xn,"f"),strictCommands:h(this,Jn,"f"),strictOptions:h(this,Qn,"f"),completionCommand:h(this,Yt,"f"),output:h(this,Et,"f"),exitError:h(this,dn,"f"),hasOutput:h(this,Zt,"f"),parsed:this.parsed,parseFn:h(this,Xt,"f"),parseContext:h(this,Yn,"f")}),h(this,ge,"f").freeze(),h(this,Qe,"f").freeze(),h(this,nt,"f").freeze(),h(this,ir,"f").freeze()}[bh](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(h(this,pe,"f").process.argv()[0])?r=h(this,pe,"f").process.argv().slice(1,2):r=h(this,pe,"f").process.argv().slice(0,1),e=r.map(n=>{let i=this[Rh](h(this,Hn,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<n.length?i:n}).join(" ").trim(),h(this,pe,"f").getEnv("_")&&h(this,pe,"f").getProcessArgvBin()===h(this,pe,"f").getEnv("_")&&(e=h(this,pe,"f").getEnv("_").replace(`${h(this,pe,"f").path.dirname(h(this,pe,"f").process.execPath())}/`,"")),e}[ei](){return h(this,wa,"f")}[Eh](){return h(this,Ta,"f")}[bc](){if(!h(this,Kn,"f"))return;let e=h(this,pe,"f").getEnv("LC_ALL")||h(this,pe,"f").getEnv("LC_MESSAGES")||h(this,pe,"f").getEnv("LANG")||h(this,pe,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Ah](){return this[Ec]().version||"unknown"}[kh](e){let r=e["--"]?e["--"]:e._;for(let n=0,i;(i=r[n])!==void 0;n++)h(this,pe,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(r[n]=Number(i));return e}[Ec](e){let r=e||"*";if(h(this,Hi,"f")[r])return h(this,Hi,"f")[r];let n={};try{let i=e||h(this,pe,"f").mainFilename;!e&&h(this,pe,"f").path.extname(i)&&(i=h(this,pe,"f").path.dirname(i));let o=h(this,pe,"f").findUp(i,(s,a)=>{if(a.includes("package.json"))return"package.json"});Rt(o,void 0,h(this,pe,"f")),n=JSON.parse(h(this,pe,"f").readFileSync(o,"utf8"))}catch{}return h(this,Hi,"f")[r]=n||{},h(this,Hi,"f")[r]}[mn](e,r){r=[].concat(r),r.forEach(n=>{n=this[wc](n),h(this,re,"f")[e].push(n)})}[Ki](e,r,n,i){this[kc](e,r,n,i,(o,s,a)=>{h(this,re,"f")[o][s]=a})}[Ac](e,r,n,i){this[kc](e,r,n,i,(o,s,a)=>{h(this,re,"f")[o][s]=(h(this,re,"f")[o][s]||[]).concat(a)})}[kc](e,r,n,i,o){if(Array.isArray(n))n.forEach(s=>{e(s,i)});else if((s=>typeof s=="object")(n))for(let s of Vi(n))e(s,n[s]);else o(r,this[wc](n),i)}[wc](e){return e==="__proto__"?"___proto___":e}[Cc](e,r){return this[Ki](this[Cc].bind(this),"key",e,r),this}[Tc](){var e,r,n,i,o,s,a,u,l,c,f,p;let d=h(this,Ea,"f").pop();Rt(d,void 0,h(this,pe,"f"));let m;e=this,r=this,n=this,i=this,o=this,s=this,a=this,u=this,l=this,c=this,f=this,p=this,{options:{set value(y){Z(e,re,y,"f")}}.value,configObjects:m,exitProcess:{set value(y){Z(r,nr,y,"f")}}.value,groups:{set value(y){Z(n,Ar,y,"f")}}.value,output:{set value(y){Z(i,Et,y,"f")}}.value,exitError:{set value(y){Z(o,dn,y,"f")}}.value,hasOutput:{set value(y){Z(s,Zt,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){Z(a,Xn,y,"f")}}.value,strictCommands:{set value(y){Z(u,Jn,y,"f")}}.value,strictOptions:{set value(y){Z(l,Qn,y,"f")}}.value,completionCommand:{set value(y){Z(c,Yt,y,"f")}}.value,parseFn:{set value(y){Z(f,Xt,y,"f")}}.value,parseContext:{set value(y){Z(p,Yn,y,"f")}}.value}=d,h(this,re,"f").configObjects=m,h(this,ge,"f").unfreeze(),h(this,Qe,"f").unfreeze(),h(this,nt,"f").unfreeze(),h(this,ir,"f").unfreeze()}[wh](e,r){return Wn(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[Ch].bind(this),getContext:this[Th].bind(this),getHasOutput:this[_h].bind(this),getLoggerInstance:this[Sh].bind(this),getParseContext:this[Ih].bind(this),getParserConfiguration:this[ei].bind(this),getUsageConfiguration:this[Eh].bind(this),getUsageInstance:this[Oh].bind(this),getValidationInstance:this[vh].bind(this),hasParseCallback:this[_a].bind(this),isGlobalContext:this[Dh].bind(this),postProcess:this[ti].bind(this),reset:this[_c].bind(this),runValidation:this[Sc].bind(this),runYargsParserAndExecuteCommands:this[ls].bind(this),setHasOutput:this[Fh].bind(this)}}[Ch](){return h(this,nt,"f")}[Th](){return h(this,us,"f")}[_h](){return h(this,Zt,"f")}[Sh](){return h(this,Wi,"f")}[Ih](){return h(this,Yn,"f")||{}}[Oh](){return h(this,ge,"f")}[vh](){return h(this,Qe,"f")}[_a](){return!!h(this,Xt,"f")}[Dh](){return h(this,Aa,"f")}[ti](e,r,n,i){return n||qe(e)||(r||(e=this[mh](e)),(this[ei]()["parse-positional-numbers"]||this[ei]()["parse-positional-numbers"]===void 0)&&(e=this[kh](e)),i&&(e=Gn(e,this,h(this,ir,"f").getMiddleware(),!1))),e}[_c](e={}){Z(this,re,h(this,re,"f")||{},"f");let r={};r.local=h(this,re,"f").local||[],r.configObjects=h(this,re,"f").configObjects||[];let n={};r.local.forEach(s=>{n[s]=!0,(e[s]||[]).forEach(a=>{n[a]=!0})}),Object.assign(h(this,Zn,"f"),Object.keys(h(this,Ar,"f")).reduce((s,a)=>{let u=h(this,Ar,"f")[a].filter(l=>!(l in n));return u.length>0&&(s[a]=u),s},{})),Z(this,Ar,{},"f");let i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(s=>{r[s]=(h(this,re,"f")[s]||[]).filter(a=>!n[a])}),o.forEach(s=>{r[s]=fn(h(this,re,"f")[s],a=>!n[a])}),r.envPrefix=h(this,re,"f").envPrefix,Z(this,re,r,"f"),Z(this,ge,h(this,ge,"f")?h(this,ge,"f").reset(n):ah(this,h(this,pe,"f")),"f"),Z(this,Qe,h(this,Qe,"f")?h(this,Qe,"f").reset(n):dh(this,h(this,ge,"f"),h(this,pe,"f")),"f"),Z(this,nt,h(this,nt,"f")?h(this,nt,"f").reset():ih(h(this,ge,"f"),h(this,Qe,"f"),h(this,ir,"f"),h(this,pe,"f")),"f"),h(this,rr,"f")||Z(this,rr,ch(this,h(this,ge,"f"),h(this,nt,"f"),h(this,pe,"f")),"f"),h(this,ir,"f").reset(),Z(this,Yt,null,"f"),Z(this,Et,"","f"),Z(this,dn,null,"f"),Z(this,Zt,!1,"f"),this.parsed=!1,this}[Rh](e,r){return h(this,pe,"f").path.relative(e,r)}[ls](e,r,n,i=0,o=!1){let s=!!n||o;e=e||h(this,hn,"f"),h(this,re,"f").__=h(this,pe,"f").y18n.__,h(this,re,"f").configuration=this[ei]();let a=!!h(this,re,"f").configuration["populate--"],u=Object.assign({},h(this,re,"f").configuration,{"populate--":!0}),l=h(this,pe,"f").Parser.detailed(e,Object.assign({},h(this,re,"f"),{configuration:{"parse-positional-numbers":!1,...u}})),c=Object.assign(l.argv,h(this,Yn,"f")),f,p=l.aliases,d=!1,m=!1;Object.keys(c).forEach(y=>{y===h(this,or,"f")&&c[y]?d=!0:y===h(this,kr,"f")&&c[y]&&(m=!0)}),c.$0=this.$0,this.parsed=l,i===0&&h(this,ge,"f").clearCachedHelpMessage();try{if(this[bc](),r)return this[ti](c,a,!!n,!1);h(this,or,"f")&&[h(this,or,"f")].concat(p[h(this,or,"f")]||[]).filter(k=>k.length>1).includes(""+c._[c._.length-1])&&(c._.pop(),d=!0),Z(this,Aa,!1,"f");let y=h(this,nt,"f").getCommands(),g=h(this,rr,"f").completionKey in c,b=d||g||o;if(c._.length){if(y.length){let w;for(let k=i||0,D;c._[k]!==void 0;k++)if(D=String(c._[k]),y.includes(D)&&D!==h(this,Yt,"f")){let R=h(this,nt,"f").runCommand(D,this,l,k+1,o,d||m||o);return this[ti](R,a,!!n,!1)}else if(!w&&D!==h(this,Yt,"f")){w=D;break}!h(this,nt,"f").hasDefaultCommand()&&h(this,Ca,"f")&&w&&!b&&h(this,Qe,"f").recommendCommands(w,y)}h(this,Yt,"f")&&c._.includes(h(this,Yt,"f"))&&!g&&(h(this,nr,"f")&&pn(!0),this.showCompletionScript(),this.exit(0))}if(h(this,nt,"f").hasDefaultCommand()&&!b){let w=h(this,nt,"f").runCommand(null,this,l,0,o,d||m||o);return this[ti](w,a,!!n,!1)}if(g){h(this,nr,"f")&&pn(!0),e=[].concat(e);let w=e.slice(e.indexOf(`--${h(this,rr,"f").completionKey}`)+1);return h(this,rr,"f").getCompletion(w,(k,D)=>{if(k)throw new $e(k.message);(D||[]).forEach(R=>{h(this,Wi,"f").log(R)}),this.exit(0)}),this[ti](c,!a,!!n,!1)}if(h(this,Zt,"f")||(d?(h(this,nr,"f")&&pn(!0),s=!0,this.showHelp("log"),this.exit(0)):m&&(h(this,nr,"f")&&pn(!0),s=!0,h(this,ge,"f").showVersion("log"),this.exit(0))),!s&&h(this,re,"f").skipValidation.length>0&&(s=Object.keys(c).some(w=>h(this,re,"f").skipValidation.indexOf(w)>=0&&c[w]===!0)),!s){if(l.error)throw new $e(l.error.message);if(!g){let w=this[Sc](p,{},l.error);n||(f=Gn(c,this,h(this,ir,"f").getMiddleware(),!0)),f=this[wh](w,f??c),qe(f)&&!n&&(f=f.then(()=>Gn(c,this,h(this,ir,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof $e)h(this,ge,"f").fail(y.message,y);else throw y}return this[ti](f??c,a,!!n,!0)}[Sc](e,r,n,i){let o={...this.getDemandedOptions()};return s=>{if(n)throw new $e(n.message);h(this,Qe,"f").nonOptionCount(s),h(this,Qe,"f").requiredArguments(s,o);let a=!1;h(this,Jn,"f")&&(a=h(this,Qe,"f").unknownCommands(s)),h(this,Xn,"f")&&!a?h(this,Qe,"f").unknownArguments(s,e,r,!!i):h(this,Qn,"f")&&h(this,Qe,"f").unknownArguments(s,e,{},!1,!1),h(this,Qe,"f").limitedChoices(s),h(this,Qe,"f").implications(s),h(this,Qe,"f").conflicting(s)}}[Fh](){Z(this,Zt,!0,"f")}[ri](e){if(typeof e=="string")h(this,re,"f").key[e]=!0;else for(let r of e)h(this,re,"f").key[r]=!0}};function oh(t){return!!t&&typeof t.getInternalMethods=="function"}var Fw=Nh(fc),Ph=Fw;var Lh="1.0.3";var Pa=ns(la(),1);import{cosmiconfig as om}from"cosmiconfig";import{TypeScriptLoader as sm}from"cosmiconfig-typescript-loader";import sT from"fs/promises";import lm from"path";var Oc=ns(jh(),1);function vc(t,e,r){if(typeof e=="number"&&(r=e),Oc.default.has(t.toLowerCase())){e=Oc.default.get(t.toLowerCase());let n=t.charAt(0);n===n.toUpperCase()&&(e=n+e.slice(1)),t===t.toUpperCase()&&(e=e.toUpperCase())}else typeof e!="string"&&(e=(t.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,n=>t.slice(-1)===t.slice(-1).toLowerCase()?n.toLowerCase():n.toUpperCase()));return Math.abs(r)===1?t:e}import{readPackage as aT}from"read-pkg";import{deepMergeDefined as jc,log as lr,optionsSchema as uT,rulesSchema as lT}from"remark-mdat";var K={};Od(K,{BRAND:()=>uC,DIRTY:()=>ni,EMPTY_PATH:()=>Uw,INVALID:()=>ue,NEVER:()=>WC,OK:()=>_t,ParseStatus:()=>Ct,Schema:()=>ke,ZodAny:()=>yn,ZodArray:()=>Zr,ZodBigInt:()=>oi,ZodBoolean:()=>si,ZodBranded:()=>fs,ZodCatch:()=>xi,ZodDate:()=>ai,ZodDefault:()=>gi,ZodDiscriminatedUnion:()=>Oa,ZodEffects:()=>ur,ZodEnum:()=>hi,ZodError:()=>zt,ZodFirstPartyTypeKind:()=>ce,ZodFunction:()=>Da,ZodIntersection:()=>fi,ZodIssueCode:()=>N,ZodLazy:()=>pi,ZodLiteral:()=>di,ZodMap:()=>eo,ZodNaN:()=>ro,ZodNativeEnum:()=>mi,ZodNever:()=>mr,ZodNull:()=>li,ZodNullable:()=>Tr,ZodNumber:()=>ii,ZodObject:()=>$t,ZodOptional:()=>sr,ZodParsedType:()=>q,ZodPipeline:()=>ps,ZodPromise:()=>bn,ZodReadonly:()=>yi,ZodRecord:()=>va,ZodSchema:()=>ke,ZodSet:()=>to,ZodString:()=>xn,ZodSymbol:()=>Ji,ZodTransformer:()=>ur,ZodTuple:()=>Cr,ZodType:()=>ke,ZodUndefined:()=>ui,ZodUnion:()=>ci,ZodUnknown:()=>Yr,ZodVoid:()=>Qi,addIssueToContext:()=>U,any:()=>xC,array:()=>AC,bigint:()=>pC,boolean:()=>Zh,coerce:()=>GC,custom:()=>Hh,date:()=>dC,datetimeRegex:()=>Gh,defaultErrorMap:()=>Hr,discriminatedUnion:()=>TC,effect:()=>MC,enum:()=>NC,function:()=>DC,getErrorMap:()=>Yi,getParsedType:()=>wr,instanceof:()=>cC,intersection:()=>_C,isAborted:()=>Sa,isAsync:()=>Zi,isDirty:()=>Ia,isValid:()=>gn,late:()=>lC,lazy:()=>RC,literal:()=>FC,makeIssue:()=>cs,map:()=>OC,nan:()=>fC,nativeEnum:()=>PC,never:()=>bC,null:()=>gC,nullable:()=>jC,number:()=>Yh,object:()=>kC,objectUtil:()=>Dc,oboolean:()=>VC,onumber:()=>qC,optional:()=>BC,ostring:()=>$C,pipeline:()=>zC,preprocess:()=>UC,promise:()=>LC,quotelessJson:()=>Mw,record:()=>IC,set:()=>vC,setErrorMap:()=>jw,strictObject:()=>wC,string:()=>Kh,symbol:()=>hC,transformer:()=>MC,tuple:()=>SC,undefined:()=>mC,union:()=>CC,unknown:()=>yC,util:()=>_e,void:()=>EC});var _e;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let s of i)o[s]=s;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(let a of o)s[a]=i[a];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},t.find=(i,o)=>{for(let s of i)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(_e||(_e={}));var Dc;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Dc||(Dc={}));var q=_e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),wr=t=>{switch(typeof t){case"undefined":return q.undefined;case"string":return q.string;case"number":return Number.isNaN(t)?q.nan:q.number;case"boolean":return q.boolean;case"function":return q.function;case"bigint":return q.bigint;case"symbol":return q.symbol;case"object":return Array.isArray(t)?q.array:t===null?q.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?q.promise:typeof Map<"u"&&t instanceof Map?q.map:typeof Set<"u"&&t instanceof Set?q.set:typeof Date<"u"&&t instanceof Date?q.date:q.object;default:return q.unknown}};var N=_e.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Mw=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),zt=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,u=0;for(;u<s.path.length;){let l=s.path[u];u===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(s))):a[l]=a[l]||{_errors:[]},a=a[l],u++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,_e.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)if(i.path.length>0){let o=i.path[0];r[o]=r[o]||[],r[o].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};zt.create=t=>new zt(t);var Bw=(t,e)=>{let r;switch(t.code){case N.invalid_type:t.received===q.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,_e.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:r=`Unrecognized key(s) in object: ${_e.joinValues(t.keys,", ")}`;break;case N.invalid_union:r="Invalid input";break;case N.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${_e.joinValues(t.options)}`;break;case N.invalid_enum_value:r=`Invalid enum value. Expected ${_e.joinValues(t.options)}, received '${t.received}'`;break;case N.invalid_arguments:r="Invalid function arguments";break;case N.invalid_return_type:r="Invalid function return type";break;case N.invalid_date:r="Invalid date";break;case N.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:_e.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case N.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case N.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case N.custom:r="Invalid input";break;case N.invalid_intersection_types:r="Intersection results could not be merged";break;case N.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case N.not_finite:r="Number must be finite";break;default:r=e.defaultError,_e.assertNever(t)}return{message:r}},Hr=Bw;var Uh=Hr;function jw(t){Uh=t}function Yi(){return Uh}var cs=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="",u=n.filter(l=>!!l).slice().reverse();for(let l of u)a=l(s,{data:e,defaultError:a}).message;return{...i,path:o,message:a}},Uw=[];function U(t,e){let r=Yi(),n=cs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Hr?void 0:Hr].filter(i=>!!i)});t.common.issues.push(n)}var Ct=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return ue;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,s=await i.value;n.push({key:o,value:s})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return ue;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[o.value]=s.value)}return{status:e.value,value:n}}},ue=Object.freeze({status:"aborted"}),ni=t=>({status:"dirty",value:t}),_t=t=>({status:"valid",value:t}),Sa=t=>t.status==="aborted",Ia=t=>t.status==="dirty",gn=t=>t.status==="valid",Zi=t=>typeof Promise<"u"&&t instanceof Promise;var J;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(J||(J={}));var ar=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},zh=(t,e)=>{if(gn(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new zt(t.common.issues);return this._error=r,this._error}}};function Ae(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,a)=>{let{message:u}=t;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:u??n??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:u??r??a.defaultError}},description:i}}var ke=class{get description(){return this._def.description}_getType(e){return wr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:wr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ct,ctx:{common:e.parent.common,data:e.data,parsedType:wr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Zi(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wr(e)},i=this._parseSync({data:e,path:n.path,parent:n});return zh(n,i)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wr(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return gn(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>gn(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wr(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(Zi(i)?i:Promise.resolve(i));return zh(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let s=e(i),a=()=>o.addIssue({code:N.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(u=>u?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new ur({schema:this,typeName:ce.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return sr.create(this,this._def)}nullable(){return Tr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Zr.create(this)}promise(){return bn.create(this,this._def)}or(e){return ci.create([this,e],this._def)}and(e){return fi.create(this,e,this._def)}transform(e){return new ur({...Ae(this._def),schema:this,typeName:ce.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new gi({...Ae(this._def),innerType:this,defaultValue:r,typeName:ce.ZodDefault})}brand(){return new fs({typeName:ce.ZodBranded,type:this,...Ae(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new xi({...Ae(this._def),innerType:this,catchValue:r,typeName:ce.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ps.create(this,e)}readonly(){return yi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},zw=/^c[^\s-]{8,}$/i,$w=/^[0-9a-z]+$/,qw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Vw=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Gw=/^[a-z0-9_-]{21}$/i,Ww=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Hw=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Kw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Rc,Zw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Xw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Jw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Qw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,qh="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",rC=new RegExp(`^${qh}$`);function Vh(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function nC(t){return new RegExp(`^${Vh(t)}$`)}function Gh(t){let e=`${qh}T${Vh(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function iC(t,e){return!!((e==="v4"||!e)&&Zw.test(t)||(e==="v6"||!e)&&Jw.test(t))}function oC(t,e){if(!Ww.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function sC(t,e){return!!((e==="v4"||!e)&&Xw.test(t)||(e==="v6"||!e)&&Qw.test(t))}var xn=class t extends ke{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==q.string){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:q.string,received:o.parsedType}),ue}let n=new Ct,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(e,i),s?U(i,{code:N.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&U(i,{code:N.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Kw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"email",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Rc||(Rc=new RegExp(Yw,"u")),Rc.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"emoji",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Vw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"uuid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Gw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"nanoid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")zw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cuid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")$w.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cuid2",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")qw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"ulid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),U(i,{validation:"url",code:N.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"regex",code:N.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Gh(o).test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?rC.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?nC(o).test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Hw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"duration",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?iC(e.data,o.version)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"ip",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?oC(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"jwt",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?sC(e.data,o.version)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cidr",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?eC.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?tC.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64url",code:N.invalid_string,message:o.message}),n.dirty()):_e.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:N.invalid_string,...J.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...J.errToObj(e)})}url(e){return this._addCheck({kind:"url",...J.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...J.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...J.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...J.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...J.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...J.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...J.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...J.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...J.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...J.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...J.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...J.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...J.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...J.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...J.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...J.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...J.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...J.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...J.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...J.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...J.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...J.errToObj(r)})}nonempty(e){return this.min(1,J.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};xn.create=t=>new xn({checks:[],typeName:ce.ZodString,coerce:t?.coerce??!1,...Ae(t)});function aC(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return o%s/10**i}var ii=class t extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==q.number){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:q.number,received:o.parsedType}),ue}let n,i=new Ct;for(let o of this._def.checks)o.kind==="int"?_e.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:N.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?aC(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_finite,message:o.message}),i.dirty()):_e.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,J.toString(r))}gt(e,r){return this.setLimit("min",e,!1,J.toString(r))}lte(e,r){return this.setLimit("max",e,!0,J.toString(r))}lt(e,r){return this.setLimit("max",e,!1,J.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:J.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:J.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:J.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:J.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:J.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:J.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:J.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:J.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:J.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:J.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_e.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};ii.create=t=>new ii({checks:[],typeName:ce.ZodNumber,coerce:t?.coerce||!1,...Ae(t)});var oi=class t extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==q.bigint)return this._getInvalidInput(e);let n,i=new Ct;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):_e.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:q.bigint,received:r.parsedType}),ue}gte(e,r){return this.setLimit("min",e,!0,J.toString(r))}gt(e,r){return this.setLimit("min",e,!1,J.toString(r))}lte(e,r){return this.setLimit("max",e,!0,J.toString(r))}lt(e,r){return this.setLimit("max",e,!1,J.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:J.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:J.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:J.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:J.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:J.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:J.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};oi.create=t=>new oi({checks:[],typeName:ce.ZodBigInt,coerce:t?.coerce??!1,...Ae(t)});var si=class extends ke{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==q.boolean){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.boolean,received:n.parsedType}),ue}return _t(e.data)}};si.create=t=>new si({typeName:ce.ZodBoolean,coerce:t?.coerce||!1,...Ae(t)});var ai=class t extends ke{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==q.date){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:q.date,received:o.parsedType}),ue}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_date}),ue}let n=new Ct,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):_e.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:J.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:J.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};ai.create=t=>new ai({checks:[],coerce:t?.coerce||!1,typeName:ce.ZodDate,...Ae(t)});var Ji=class extends ke{_parse(e){if(this._getType(e)!==q.symbol){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.symbol,received:n.parsedType}),ue}return _t(e.data)}};Ji.create=t=>new Ji({typeName:ce.ZodSymbol,...Ae(t)});var ui=class extends ke{_parse(e){if(this._getType(e)!==q.undefined){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.undefined,received:n.parsedType}),ue}return _t(e.data)}};ui.create=t=>new ui({typeName:ce.ZodUndefined,...Ae(t)});var li=class extends ke{_parse(e){if(this._getType(e)!==q.null){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.null,received:n.parsedType}),ue}return _t(e.data)}};li.create=t=>new li({typeName:ce.ZodNull,...Ae(t)});var yn=class extends ke{constructor(){super(...arguments),this._any=!0}_parse(e){return _t(e.data)}};yn.create=t=>new yn({typeName:ce.ZodAny,...Ae(t)});var Yr=class extends ke{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _t(e.data)}};Yr.create=t=>new Yr({typeName:ce.ZodUnknown,...Ae(t)});var mr=class extends ke{_parse(e){let r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:q.never,received:r.parsedType}),ue}};mr.create=t=>new mr({typeName:ce.ZodNever,...Ae(t)});var Qi=class extends ke{_parse(e){if(this._getType(e)!==q.undefined){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.void,received:n.parsedType}),ue}return _t(e.data)}};Qi.create=t=>new Qi({typeName:ce.ZodVoid,...Ae(t)});var Zr=class t extends ke{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==q.array)return U(r,{code:N.invalid_type,expected:q.array,received:r.parsedType}),ue;if(i.exactLength!==null){let s=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(s||a)&&(U(r,{code:s?N.too_big:N.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(U(r,{code:N.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(U(r,{code:N.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>i.type._parseAsync(new ar(r,s,r.path,a)))).then(s=>Ct.mergeArray(n,s));let o=[...r.data].map((s,a)=>i.type._parseSync(new ar(r,s,r.path,a)));return Ct.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:J.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:J.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:J.toString(r)}})}nonempty(e){return this.min(1,e)}};Zr.create=(t,e)=>new Zr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ce.ZodArray,...Ae(e)});function Xi(t){if(t instanceof $t){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=sr.create(Xi(n))}return new $t({...t._def,shape:()=>e})}else return t instanceof Zr?new Zr({...t._def,type:Xi(t.element)}):t instanceof sr?sr.create(Xi(t.unwrap())):t instanceof Tr?Tr.create(Xi(t.unwrap())):t instanceof Cr?Cr.create(t.items.map(e=>Xi(e))):t}var $t=class t extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=_e.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==q.object){let l=this._getOrReturnCtx(e);return U(l,{code:N.invalid_type,expected:q.object,received:l.parsedType}),ue}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof mr&&this._def.unknownKeys==="strip"))for(let l in i.data)s.includes(l)||a.push(l);let u=[];for(let l of s){let c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ar(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof mr){let l=this._def.unknownKeys;if(l==="passthrough")for(let c of a)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")a.length>0&&(U(i,{code:N.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let c of a){let f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ar(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let l=[];for(let c of u){let f=await c.key,p=await c.value;l.push({key:f,value:p,alwaysSet:c.alwaysSet})}return l}).then(l=>Ct.mergeObjectSync(n,l)):Ct.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return J.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:J.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ce.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of _e.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of _e.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Xi(this)}partial(e){let r={};for(let n of _e.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of _e.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof sr;)o=o._def.innerType;r[n]=o}return new t({...this._def,shape:()=>r})}keyof(){return Wh(_e.objectKeys(this.shape))}};$t.create=(t,e)=>new $t({shape:()=>t,unknownKeys:"strip",catchall:mr.create(),typeName:ce.ZodObject,...Ae(e)});$t.strictCreate=(t,e)=>new $t({shape:()=>t,unknownKeys:"strict",catchall:mr.create(),typeName:ce.ZodObject,...Ae(e)});$t.lazycreate=(t,e)=>new $t({shape:t,unknownKeys:"strip",catchall:mr.create(),typeName:ce.ZodObject,...Ae(e)});var ci=class extends ke{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(a=>new zt(a.ctx.common.issues));return U(r,{code:N.invalid_union,unionErrors:s}),ue}if(r.common.async)return Promise.all(n.map(async o=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let o,s=[];for(let u of n){let l={...r,common:{...r.common,issues:[]},parent:null},c=u._parseSync({data:r.data,path:r.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(u=>new zt(u));return U(r,{code:N.invalid_union,unionErrors:a}),ue}}get options(){return this._def.options}};ci.create=(t,e)=>new ci({options:t,typeName:ce.ZodUnion,...Ae(e)});var Kr=t=>t instanceof pi?Kr(t.schema):t instanceof ur?Kr(t.innerType()):t instanceof di?[t.value]:t instanceof hi?t.options:t instanceof mi?_e.objectValues(t.enum):t instanceof gi?Kr(t._def.innerType):t instanceof ui?[void 0]:t instanceof li?[null]:t instanceof sr?[void 0,...Kr(t.unwrap())]:t instanceof Tr?[null,...Kr(t.unwrap())]:t instanceof fs||t instanceof yi?Kr(t.unwrap()):t instanceof xi?Kr(t._def.innerType):[],Oa=class t extends ke{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==q.object)return U(r,{code:N.invalid_type,expected:q.object,received:r.parsedType}),ue;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(U(r,{code:N.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),ue)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let s=Kr(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,o)}}return new t({typeName:ce.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ae(n)})}};function Fc(t,e){let r=wr(t),n=wr(e);if(t===e)return{valid:!0,data:t};if(r===q.object&&n===q.object){let i=_e.objectKeys(e),o=_e.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(let a of o){let u=Fc(t[a],e[a]);if(!u.valid)return{valid:!1};s[a]=u.data}return{valid:!0,data:s}}else if(r===q.array&&n===q.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let s=t[o],a=e[o],u=Fc(s,a);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===q.date&&n===q.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var fi=class extends ke{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,s)=>{if(Sa(o)||Sa(s))return ue;let a=Fc(o.value,s.value);return a.valid?((Ia(o)||Ia(s))&&r.dirty(),{status:r.value,value:a.data}):(U(n,{code:N.invalid_intersection_types}),ue)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};fi.create=(t,e,r)=>new fi({left:t,right:e,typeName:ce.ZodIntersection,...Ae(r)});var Cr=class t extends ke{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.array)return U(n,{code:N.invalid_type,expected:q.array,received:n.parsedType}),ue;if(n.data.length<this._def.items.length)return U(n,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ue;!this._def.rest&&n.data.length>this._def.items.length&&(U(n,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((s,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new ar(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(o).then(s=>Ct.mergeArray(r,s)):Ct.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Cr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Cr({items:t,typeName:ce.ZodTuple,rest:null,...Ae(e)})};var va=class t extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.object)return U(n,{code:N.invalid_type,expected:q.object,received:n.parsedType}),ue;let i=[],o=this._def.keyType,s=this._def.valueType;for(let a in n.data)i.push({key:o._parse(new ar(n,a,n.path,a)),value:s._parse(new ar(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Ct.mergeObjectAsync(r,i):Ct.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof ke?new t({keyType:e,valueType:r,typeName:ce.ZodRecord,...Ae(n)}):new t({keyType:xn.create(),valueType:e,typeName:ce.ZodRecord,...Ae(r)})}},eo=class extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.map)return U(n,{code:N.invalid_type,expected:q.map,received:n.parsedType}),ue;let i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([a,u],l)=>({key:i._parse(new ar(n,a,n.path,[l,"key"])),value:o._parse(new ar(n,u,n.path,[l,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of s){let l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return ue;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(l.value,c.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of s){let l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return ue;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(l.value,c.value)}return{status:r.value,value:a}}}};eo.create=(t,e,r)=>new eo({valueType:e,keyType:t,typeName:ce.ZodMap,...Ae(r)});var to=class t extends ke{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.set)return U(n,{code:N.invalid_type,expected:q.set,received:n.parsedType}),ue;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(U(n,{code:N.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(U(n,{code:N.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function s(u){let l=new Set;for(let c of u){if(c.status==="aborted")return ue;c.status==="dirty"&&r.dirty(),l.add(c.value)}return{status:r.value,value:l}}let a=[...n.data.values()].map((u,l)=>o._parse(new ar(n,u,n.path,l)));return n.common.async?Promise.all(a).then(u=>s(u)):s(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:J.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:J.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};to.create=(t,e)=>new to({valueType:t,minSize:null,maxSize:null,typeName:ce.ZodSet,...Ae(e)});var Da=class t extends ke{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==q.function)return U(r,{code:N.invalid_type,expected:q.function,received:r.parsedType}),ue;function n(a,u){return cs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Yi(),Hr].filter(l=>!!l),issueData:{code:N.invalid_arguments,argumentsError:u}})}function i(a,u){return cs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Yi(),Hr].filter(l=>!!l),issueData:{code:N.invalid_return_type,returnTypeError:u}})}let o={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof bn){let a=this;return _t(async function(...u){let l=new zt([]),c=await a._def.args.parseAsync(u,o).catch(d=>{throw l.addIssue(n(u,d)),l}),f=await Reflect.apply(s,this,c);return await a._def.returns._def.type.parseAsync(f,o).catch(d=>{throw l.addIssue(i(f,d)),l})})}else{let a=this;return _t(function(...u){let l=a._def.args.safeParse(u,o);if(!l.success)throw new zt([n(u,l.error)]);let c=Reflect.apply(s,this,l.data),f=a._def.returns.safeParse(c,o);if(!f.success)throw new zt([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Cr.create(e).rest(Yr.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||Cr.create([]).rest(Yr.create()),returns:r||Yr.create(),typeName:ce.ZodFunction,...Ae(n)})}},pi=class extends ke{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};pi.create=(t,e)=>new pi({getter:t,typeName:ce.ZodLazy,...Ae(e)});var di=class extends ke{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return U(r,{received:r.data,code:N.invalid_literal,expected:this._def.value}),ue}return{status:"valid",value:e.data}}get value(){return this._def.value}};di.create=(t,e)=>new di({value:t,typeName:ce.ZodLiteral,...Ae(e)});function Wh(t,e){return new hi({values:t,typeName:ce.ZodEnum,...Ae(e)})}var hi=class t extends ke{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{expected:_e.joinValues(n),received:r.parsedType,code:N.invalid_type}),ue}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{received:r.data,code:N.invalid_enum_value,options:n}),ue}return _t(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};hi.create=Wh;var mi=class extends ke{_parse(e){let r=_e.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==q.string&&n.parsedType!==q.number){let i=_e.objectValues(r);return U(n,{expected:_e.joinValues(i),received:n.parsedType,code:N.invalid_type}),ue}if(this._cache||(this._cache=new Set(_e.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=_e.objectValues(r);return U(n,{received:n.data,code:N.invalid_enum_value,options:i}),ue}return _t(e.data)}get enum(){return this._def.values}};mi.create=(t,e)=>new mi({values:t,typeName:ce.ZodNativeEnum,...Ae(e)});var bn=class extends ke{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==q.promise&&r.common.async===!1)return U(r,{code:N.invalid_type,expected:q.promise,received:r.parsedType}),ue;let n=r.parsedType===q.promise?r.data:Promise.resolve(r.data);return _t(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};bn.create=(t,e)=>new bn({type:t,typeName:ce.ZodPromise,...Ae(e)});var ur=class extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{U(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let s=i.transform(n.data,o);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return ue;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?ue:u.status==="dirty"?ni(u.value):r.value==="dirty"?ni(u.value):u});{if(r.value==="aborted")return ue;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?ue:a.status==="dirty"?ni(a.value):r.value==="dirty"?ni(a.value):a}}if(i.type==="refinement"){let s=a=>{let u=i.refinement(a,o);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?ue:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?ue:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!gn(s))return ue;let a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>gn(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:r.value,value:a})):ue);_e.assertNever(i)}};ur.create=(t,e,r)=>new ur({schema:t,typeName:ce.ZodEffects,effect:e,...Ae(r)});ur.createWithPreprocess=(t,e,r)=>new ur({schema:e,effect:{type:"preprocess",transform:t},typeName:ce.ZodEffects,...Ae(r)});var sr=class extends ke{_parse(e){return this._getType(e)===q.undefined?_t(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};sr.create=(t,e)=>new sr({innerType:t,typeName:ce.ZodOptional,...Ae(e)});var Tr=class extends ke{_parse(e){return this._getType(e)===q.null?_t(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Tr.create=(t,e)=>new Tr({innerType:t,typeName:ce.ZodNullable,...Ae(e)});var gi=class extends ke{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===q.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};gi.create=(t,e)=>new gi({innerType:t,typeName:ce.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});var xi=class extends ke{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Zi(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new zt(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};xi.create=(t,e)=>new xi({innerType:t,typeName:ce.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});var ro=class extends ke{_parse(e){if(this._getType(e)!==q.nan){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.nan,received:n.parsedType}),ue}return{status:"valid",value:e.data}}};ro.create=t=>new ro({typeName:ce.ZodNaN,...Ae(t)});var uC=Symbol("zod_brand"),fs=class extends ke{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},ps=class t extends ke{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?ue:o.status==="dirty"?(r.dirty(),ni(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?ue:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:ce.ZodPipeline})}},yi=class extends ke{_parse(e){let r=this._def.innerType._parse(e),n=i=>(gn(i)&&(i.value=Object.freeze(i.value)),i);return Zi(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};yi.create=(t,e)=>new yi({innerType:t,typeName:ce.ZodReadonly,...Ae(e)});function $h(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Hh(t,e={},r){return t?yn.create().superRefine((n,i)=>{let o=t(n);if(o instanceof Promise)return o.then(s=>{if(!s){let a=$h(e,n),u=a.fatal??r??!0;i.addIssue({code:"custom",...a,fatal:u})}});if(!o){let s=$h(e,n),a=s.fatal??r??!0;i.addIssue({code:"custom",...s,fatal:a})}}):yn.create()}var lC={object:$t.lazycreate},ce;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ce||(ce={}));var cC=(t,e={message:`Input not instance of ${t.name}`})=>Hh(r=>r instanceof t,e),Kh=xn.create,Yh=ii.create,fC=ro.create,pC=oi.create,Zh=si.create,dC=ai.create,hC=Ji.create,mC=ui.create,gC=li.create,xC=yn.create,yC=Yr.create,bC=mr.create,EC=Qi.create,AC=Zr.create,kC=$t.create,wC=$t.strictCreate,CC=ci.create,TC=Oa.create,_C=fi.create,SC=Cr.create,IC=va.create,OC=eo.create,vC=to.create,DC=Da.create,RC=pi.create,FC=di.create,NC=hi.create,PC=mi.create,LC=bn.create,MC=ur.create,BC=sr.create,jC=Tr.create,UC=ur.createWithPreprocess,zC=ps.create,$C=()=>Kh().optional(),qC=()=>Yh().optional(),VC=()=>Zh().optional(),GC={string:(t=>xn.create({...t,coerce:!0})),number:(t=>ii.create({...t,coerce:!0})),boolean:(t=>si.create({...t,coerce:!0})),bigint:(t=>oi.create({...t,coerce:!0})),date:(t=>ai.create({...t,coerce:!0}))};var WC=ue;import{defaultLoaders as HC}from"cosmiconfig";function Nc(t,e){let r=HC[".json"],n=r(t,e);return Xh(n)}function Xh(t,e="",r={}){for(let[n,i]of Object.entries(t)){let o=e?`${e}.${n}`:n;typeof i=="object"&&i!==null&&!Array.isArray(i)?Xh(i,o,r):i===null?r[o]="null":r[o]=i.toString()}return r}import rT from"fs";import Xr from"path";import JC from"process";import KC from"process";import YC from"fs/promises";import{fileURLToPath as ZC}from"url";import Bj from"fs";import no from"path";var Jh=t=>t instanceof URL?ZC(t):t;async function Ra(t,{cwd:e=KC.cwd(),type:r="file",stopAt:n}={}){let i=no.resolve(Jh(e)??""),{root:o}=no.parse(i);n=no.resolve(i,Jh(n??o));let s=no.isAbsolute(t);for(;i;){let a=s?t:no.join(i,t);try{let u=await YC.stat(a);if(r==="file"&&u.isFile()||r==="directory"&&u.isDirectory())return a}catch{}if(i===n||i===o)break;i=no.dirname(i)}}async function Qh({cwd:t=JC.cwd()}={}){return Ra("package.json",{cwd:t})}import QC from"fs";import eT from"fs/promises";async function Pc(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await eT[t](r))[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function Lc(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return QC[t](r)[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var io=Pc.bind(void 0,"stat","isFile"),Wj=Pc.bind(void 0,"stat","isDirectory"),Hj=Pc.bind(void 0,"lstat","isSymbolicLink"),Mc=Lc.bind(void 0,"statSync","isFile"),Kj=Lc.bind(void 0,"statSync","isDirectory"),Yj=Lc.bind(void 0,"lstatSync","isSymbolicLink");import{log as tm}from"remark-mdat";import{Configuration as nT}from"unified-engine";import tT from"os";var em=tT.homedir();function Bc(t){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return em?t.replace(/^~(?=$|\/|\\)/,em):t}function iT(t,e){let r=e===0?1:Math.floor(Math.log10(Math.abs(e))+1);return t.toString().padStart(r,"0")}function nm(t,e,r,n){let i=[];for(let[o,s]of t.entries()){let a=r&&t.length>1?`-${iT(o+1,t.length+1)}`:"",u=oT(s,e,r,n,a);i.push(u)}return i}function oT(t,e,r,n,i=""){let o=rm(t),s=e?rm(e):void 0;if(!Mc(o))throw new Error(`Input file not found: "${o}"`);if(s){if(Mc(s))throw new Error(`Output path must be a directory, received a file path: "${s}"`);rT.mkdirSync(s,{recursive:!0})}let a=r?Xr.basename(r,Xr.extname(r)):Xr.basename(o,Xr.extname(o)),u=`.${n??(r&&Xr.extname(r)!==""?Xr.extname(r):Xr.extname(t)===""?"":Xr.extname(t))}`,l=`${a}${i}${u}`,c=s??Xr.dirname(o);return{input:o,name:l,output:c}}function rm(t){return Bc(t)}async function Fa(){return Qh()}function Na(t){return t==null?[]:Array.isArray(t)?t:[t]}async function im(){let t=new nT({cwd:process.cwd(),detectConfig:!0,packageField:"remarkConfig",rcName:".remarkrc"}),e=await new Promise(r=>{t.load("",(n,i)=>{if(n){console.error(n),r();return}r(i)})});if(e){let{filePath:r}=e;return r===void 0?tm.info('No ambient Remark configuration file found"'):tm.info(`Found and loaded ambient Remark configuration from "${r}"`),e}throw new Error("Failed to load ambient remark configuration")}var am=uT.merge(K.object({assetsPath:K.string().optional(),packageFile:K.string().optional()})).describe("Config Extension");async function bi(t){let{additionalConfig:e,additionalRules:r,searchFrom:n}=t??{},i={addMetaComment:!1,assetsPath:"./assets",closingPrefix:"/",keywordPrefix:"",metaCommentIdentifier:"+",packageFile:await Fa(),rules:{mdat:"Powered by the Markdown Autophagic Template system: [mdat](https://github.com/kitschpatrol/mdat)."}},o=om("mdat",{loaders:{".ts":sm()}}),s=await o.search(n);if(s){let{config:a,filepath:u}=s,l=a;if(lr.info(`Using config from "${u}"`),u.endsWith("package.json")&&typeof a=="string"){lr.info(`Detected shared config string: "${a}"`);let{default:f}=await import(a);l=f}let c=um(l,am);c&&(i=jc(i,c))}if(e!==void 0){let a=Array.isArray(e)?e:[e];for(let u of a){let l;if(typeof u=="string"){let f=await o.load(u);if(f==null)continue;let{config:p,filepath:d}=f;lr.info(`Loaded additional config from "${d}"`),l=p}else l=u;if(l===void 0)continue;lr.info("Merging configuration object");let c=um(l,am);c!==void 0&&(i=jc(i,c))}}if(r!==void 0){let a=Array.isArray(r)?r:[r],u=om("mdat",{loaders:{".json":Nc,".ts":sm()}});for(let l of a){let c;if(typeof l=="string"){let p;if(lm.basename(l).endsWith("package.json")){let y=await sT.readFile(l,"utf8");p={config:Nc(l,y),filepath:l}}else p=await u.load(l);if(p==null)continue;let{config:d,filepath:m}=p;lr.info(`Loaded additional config from "${m}"`),c=d}else c=l;if(c===void 0)continue;lr.info("Merging rules into configuration object");let f=cT(c,lT);f!==void 0&&(i=jc(i,f))}}if(i.rules){let a=Object.keys(i.rules).sort().map(u=>`"${Pa.default.green(Pa.default.bold(u))}"`);lr.info(`Loaded ${Pa.default.bold(a.length)} mdat comment expansion ${vc("rule",a.length)}:`);for(let u of a)lr.info(` ${u}`)}else lr.error("No rules loaded from additional configurations or rules, using default.");return La=i,i}function cT(t,e){if(e.safeParse(t).success)return{rules:t};lr.error(`Rules object has the wrong shape. Ignoring and using default configuration:
|
|
65
|
+
`,"f"),Z(this,Et,h(this,Et,"f")+e.join(" "),"f")}}}[yc](e){Vi(h(this,re,"f")).forEach(r=>{if((i=>i==="configObjects")(r))return;let n=h(this,re,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete h(this,ge,"f").getDescriptions()[e]}[xh](e,r,n){h(this,ba,"f")[n]||(h(this,pe,"f").process.emitWarning(e,r),h(this,ba,"f")[n]=!0)}[yh](){h(this,Ea,"f").push({options:h(this,re,"f"),configObjects:h(this,re,"f").configObjects.slice(0),exitProcess:h(this,nr,"f"),groups:h(this,Ar,"f"),strict:h(this,Xn,"f"),strictCommands:h(this,Jn,"f"),strictOptions:h(this,Qn,"f"),completionCommand:h(this,Yt,"f"),output:h(this,Et,"f"),exitError:h(this,dn,"f"),hasOutput:h(this,Zt,"f"),parsed:this.parsed,parseFn:h(this,Xt,"f"),parseContext:h(this,Yn,"f")}),h(this,ge,"f").freeze(),h(this,Qe,"f").freeze(),h(this,nt,"f").freeze(),h(this,ir,"f").freeze()}[bh](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(h(this,pe,"f").process.argv()[0])?r=h(this,pe,"f").process.argv().slice(1,2):r=h(this,pe,"f").process.argv().slice(0,1),e=r.map(n=>{let i=this[Rh](h(this,Hn,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<n.length?i:n}).join(" ").trim(),h(this,pe,"f").getEnv("_")&&h(this,pe,"f").getProcessArgvBin()===h(this,pe,"f").getEnv("_")&&(e=h(this,pe,"f").getEnv("_").replace(`${h(this,pe,"f").path.dirname(h(this,pe,"f").process.execPath())}/`,"")),e}[ei](){return h(this,wa,"f")}[Eh](){return h(this,Ta,"f")}[bc](){if(!h(this,Kn,"f"))return;let e=h(this,pe,"f").getEnv("LC_ALL")||h(this,pe,"f").getEnv("LC_MESSAGES")||h(this,pe,"f").getEnv("LANG")||h(this,pe,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Ah](){return this[Ec]().version||"unknown"}[kh](e){let r=e["--"]?e["--"]:e._;for(let n=0,i;(i=r[n])!==void 0;n++)h(this,pe,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(r[n]=Number(i));return e}[Ec](e){let r=e||"*";if(h(this,Hi,"f")[r])return h(this,Hi,"f")[r];let n={};try{let i=e||h(this,pe,"f").mainFilename;!e&&h(this,pe,"f").path.extname(i)&&(i=h(this,pe,"f").path.dirname(i));let o=h(this,pe,"f").findUp(i,(s,a)=>{if(a.includes("package.json"))return"package.json"});Rt(o,void 0,h(this,pe,"f")),n=JSON.parse(h(this,pe,"f").readFileSync(o,"utf8"))}catch{}return h(this,Hi,"f")[r]=n||{},h(this,Hi,"f")[r]}[mn](e,r){r=[].concat(r),r.forEach(n=>{n=this[wc](n),h(this,re,"f")[e].push(n)})}[Ki](e,r,n,i){this[kc](e,r,n,i,(o,s,a)=>{h(this,re,"f")[o][s]=a})}[Ac](e,r,n,i){this[kc](e,r,n,i,(o,s,a)=>{h(this,re,"f")[o][s]=(h(this,re,"f")[o][s]||[]).concat(a)})}[kc](e,r,n,i,o){if(Array.isArray(n))n.forEach(s=>{e(s,i)});else if((s=>typeof s=="object")(n))for(let s of Vi(n))e(s,n[s]);else o(r,this[wc](n),i)}[wc](e){return e==="__proto__"?"___proto___":e}[Cc](e,r){return this[Ki](this[Cc].bind(this),"key",e,r),this}[Tc](){var e,r,n,i,o,s,a,u,l,c,f,p;let d=h(this,Ea,"f").pop();Rt(d,void 0,h(this,pe,"f"));let m;e=this,r=this,n=this,i=this,o=this,s=this,a=this,u=this,l=this,c=this,f=this,p=this,{options:{set value(y){Z(e,re,y,"f")}}.value,configObjects:m,exitProcess:{set value(y){Z(r,nr,y,"f")}}.value,groups:{set value(y){Z(n,Ar,y,"f")}}.value,output:{set value(y){Z(i,Et,y,"f")}}.value,exitError:{set value(y){Z(o,dn,y,"f")}}.value,hasOutput:{set value(y){Z(s,Zt,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){Z(a,Xn,y,"f")}}.value,strictCommands:{set value(y){Z(u,Jn,y,"f")}}.value,strictOptions:{set value(y){Z(l,Qn,y,"f")}}.value,completionCommand:{set value(y){Z(c,Yt,y,"f")}}.value,parseFn:{set value(y){Z(f,Xt,y,"f")}}.value,parseContext:{set value(y){Z(p,Yn,y,"f")}}.value}=d,h(this,re,"f").configObjects=m,h(this,ge,"f").unfreeze(),h(this,Qe,"f").unfreeze(),h(this,nt,"f").unfreeze(),h(this,ir,"f").unfreeze()}[wh](e,r){return Wn(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[Ch].bind(this),getContext:this[Th].bind(this),getHasOutput:this[_h].bind(this),getLoggerInstance:this[Sh].bind(this),getParseContext:this[Ih].bind(this),getParserConfiguration:this[ei].bind(this),getUsageConfiguration:this[Eh].bind(this),getUsageInstance:this[Oh].bind(this),getValidationInstance:this[vh].bind(this),hasParseCallback:this[_a].bind(this),isGlobalContext:this[Dh].bind(this),postProcess:this[ti].bind(this),reset:this[_c].bind(this),runValidation:this[Sc].bind(this),runYargsParserAndExecuteCommands:this[ls].bind(this),setHasOutput:this[Fh].bind(this)}}[Ch](){return h(this,nt,"f")}[Th](){return h(this,us,"f")}[_h](){return h(this,Zt,"f")}[Sh](){return h(this,Wi,"f")}[Ih](){return h(this,Yn,"f")||{}}[Oh](){return h(this,ge,"f")}[vh](){return h(this,Qe,"f")}[_a](){return!!h(this,Xt,"f")}[Dh](){return h(this,Aa,"f")}[ti](e,r,n,i){return n||qe(e)||(r||(e=this[mh](e)),(this[ei]()["parse-positional-numbers"]||this[ei]()["parse-positional-numbers"]===void 0)&&(e=this[kh](e)),i&&(e=Gn(e,this,h(this,ir,"f").getMiddleware(),!1))),e}[_c](e={}){Z(this,re,h(this,re,"f")||{},"f");let r={};r.local=h(this,re,"f").local||[],r.configObjects=h(this,re,"f").configObjects||[];let n={};r.local.forEach(s=>{n[s]=!0,(e[s]||[]).forEach(a=>{n[a]=!0})}),Object.assign(h(this,Zn,"f"),Object.keys(h(this,Ar,"f")).reduce((s,a)=>{let u=h(this,Ar,"f")[a].filter(l=>!(l in n));return u.length>0&&(s[a]=u),s},{})),Z(this,Ar,{},"f");let i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(s=>{r[s]=(h(this,re,"f")[s]||[]).filter(a=>!n[a])}),o.forEach(s=>{r[s]=fn(h(this,re,"f")[s],a=>!n[a])}),r.envPrefix=h(this,re,"f").envPrefix,Z(this,re,r,"f"),Z(this,ge,h(this,ge,"f")?h(this,ge,"f").reset(n):ah(this,h(this,pe,"f")),"f"),Z(this,Qe,h(this,Qe,"f")?h(this,Qe,"f").reset(n):dh(this,h(this,ge,"f"),h(this,pe,"f")),"f"),Z(this,nt,h(this,nt,"f")?h(this,nt,"f").reset():ih(h(this,ge,"f"),h(this,Qe,"f"),h(this,ir,"f"),h(this,pe,"f")),"f"),h(this,rr,"f")||Z(this,rr,ch(this,h(this,ge,"f"),h(this,nt,"f"),h(this,pe,"f")),"f"),h(this,ir,"f").reset(),Z(this,Yt,null,"f"),Z(this,Et,"","f"),Z(this,dn,null,"f"),Z(this,Zt,!1,"f"),this.parsed=!1,this}[Rh](e,r){return h(this,pe,"f").path.relative(e,r)}[ls](e,r,n,i=0,o=!1){let s=!!n||o;e=e||h(this,hn,"f"),h(this,re,"f").__=h(this,pe,"f").y18n.__,h(this,re,"f").configuration=this[ei]();let a=!!h(this,re,"f").configuration["populate--"],u=Object.assign({},h(this,re,"f").configuration,{"populate--":!0}),l=h(this,pe,"f").Parser.detailed(e,Object.assign({},h(this,re,"f"),{configuration:{"parse-positional-numbers":!1,...u}})),c=Object.assign(l.argv,h(this,Yn,"f")),f,p=l.aliases,d=!1,m=!1;Object.keys(c).forEach(y=>{y===h(this,or,"f")&&c[y]?d=!0:y===h(this,kr,"f")&&c[y]&&(m=!0)}),c.$0=this.$0,this.parsed=l,i===0&&h(this,ge,"f").clearCachedHelpMessage();try{if(this[bc](),r)return this[ti](c,a,!!n,!1);h(this,or,"f")&&[h(this,or,"f")].concat(p[h(this,or,"f")]||[]).filter(k=>k.length>1).includes(""+c._[c._.length-1])&&(c._.pop(),d=!0),Z(this,Aa,!1,"f");let y=h(this,nt,"f").getCommands(),g=h(this,rr,"f").completionKey in c,b=d||g||o;if(c._.length){if(y.length){let w;for(let k=i||0,D;c._[k]!==void 0;k++)if(D=String(c._[k]),y.includes(D)&&D!==h(this,Yt,"f")){let R=h(this,nt,"f").runCommand(D,this,l,k+1,o,d||m||o);return this[ti](R,a,!!n,!1)}else if(!w&&D!==h(this,Yt,"f")){w=D;break}!h(this,nt,"f").hasDefaultCommand()&&h(this,Ca,"f")&&w&&!b&&h(this,Qe,"f").recommendCommands(w,y)}h(this,Yt,"f")&&c._.includes(h(this,Yt,"f"))&&!g&&(h(this,nr,"f")&&pn(!0),this.showCompletionScript(),this.exit(0))}if(h(this,nt,"f").hasDefaultCommand()&&!b){let w=h(this,nt,"f").runCommand(null,this,l,0,o,d||m||o);return this[ti](w,a,!!n,!1)}if(g){h(this,nr,"f")&&pn(!0),e=[].concat(e);let w=e.slice(e.indexOf(`--${h(this,rr,"f").completionKey}`)+1);return h(this,rr,"f").getCompletion(w,(k,D)=>{if(k)throw new $e(k.message);(D||[]).forEach(R=>{h(this,Wi,"f").log(R)}),this.exit(0)}),this[ti](c,!a,!!n,!1)}if(h(this,Zt,"f")||(d?(h(this,nr,"f")&&pn(!0),s=!0,this.showHelp("log"),this.exit(0)):m&&(h(this,nr,"f")&&pn(!0),s=!0,h(this,ge,"f").showVersion("log"),this.exit(0))),!s&&h(this,re,"f").skipValidation.length>0&&(s=Object.keys(c).some(w=>h(this,re,"f").skipValidation.indexOf(w)>=0&&c[w]===!0)),!s){if(l.error)throw new $e(l.error.message);if(!g){let w=this[Sc](p,{},l.error);n||(f=Gn(c,this,h(this,ir,"f").getMiddleware(),!0)),f=this[wh](w,f??c),qe(f)&&!n&&(f=f.then(()=>Gn(c,this,h(this,ir,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof $e)h(this,ge,"f").fail(y.message,y);else throw y}return this[ti](f??c,a,!!n,!0)}[Sc](e,r,n,i){let o={...this.getDemandedOptions()};return s=>{if(n)throw new $e(n.message);h(this,Qe,"f").nonOptionCount(s),h(this,Qe,"f").requiredArguments(s,o);let a=!1;h(this,Jn,"f")&&(a=h(this,Qe,"f").unknownCommands(s)),h(this,Xn,"f")&&!a?h(this,Qe,"f").unknownArguments(s,e,r,!!i):h(this,Qn,"f")&&h(this,Qe,"f").unknownArguments(s,e,{},!1,!1),h(this,Qe,"f").limitedChoices(s),h(this,Qe,"f").implications(s),h(this,Qe,"f").conflicting(s)}}[Fh](){Z(this,Zt,!0,"f")}[ri](e){if(typeof e=="string")h(this,re,"f").key[e]=!0;else for(let r of e)h(this,re,"f").key[r]=!0}};function oh(t){return!!t&&typeof t.getInternalMethods=="function"}var Nw=Nh(fc),Ph=Nw;var Lh="1.0.4";var Pa=ns(la(),1);import{cosmiconfig as om}from"cosmiconfig";import{TypeScriptLoader as sm}from"cosmiconfig-typescript-loader";import aT from"fs/promises";import lm from"path";var Oc=ns(jh(),1);function vc(t,e,r){if(typeof e=="number"&&(r=e),Oc.default.has(t.toLowerCase())){e=Oc.default.get(t.toLowerCase());let n=t.charAt(0);n===n.toUpperCase()&&(e=n+e.slice(1)),t===t.toUpperCase()&&(e=e.toUpperCase())}else typeof e!="string"&&(e=(t.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,n=>t.slice(-1)===t.slice(-1).toLowerCase()?n.toLowerCase():n.toUpperCase()));return Math.abs(r)===1?t:e}import{readPackage as uT}from"read-pkg";import{deepMergeDefined as jc,log as lr,optionsSchema as lT,rulesSchema as cT}from"remark-mdat";var K={};Od(K,{BRAND:()=>lC,DIRTY:()=>ni,EMPTY_PATH:()=>zw,INVALID:()=>ue,NEVER:()=>HC,OK:()=>_t,ParseStatus:()=>Ct,Schema:()=>ke,ZodAny:()=>yn,ZodArray:()=>Zr,ZodBigInt:()=>oi,ZodBoolean:()=>si,ZodBranded:()=>fs,ZodCatch:()=>xi,ZodDate:()=>ai,ZodDefault:()=>gi,ZodDiscriminatedUnion:()=>Oa,ZodEffects:()=>ur,ZodEnum:()=>hi,ZodError:()=>zt,ZodFirstPartyTypeKind:()=>ce,ZodFunction:()=>Da,ZodIntersection:()=>fi,ZodIssueCode:()=>N,ZodLazy:()=>pi,ZodLiteral:()=>di,ZodMap:()=>eo,ZodNaN:()=>ro,ZodNativeEnum:()=>mi,ZodNever:()=>mr,ZodNull:()=>li,ZodNullable:()=>Tr,ZodNumber:()=>ii,ZodObject:()=>$t,ZodOptional:()=>sr,ZodParsedType:()=>q,ZodPipeline:()=>ps,ZodPromise:()=>bn,ZodReadonly:()=>yi,ZodRecord:()=>va,ZodSchema:()=>ke,ZodSet:()=>to,ZodString:()=>xn,ZodSymbol:()=>Ji,ZodTransformer:()=>ur,ZodTuple:()=>Cr,ZodType:()=>ke,ZodUndefined:()=>ui,ZodUnion:()=>ci,ZodUnknown:()=>Yr,ZodVoid:()=>Qi,addIssueToContext:()=>U,any:()=>yC,array:()=>kC,bigint:()=>dC,boolean:()=>Zh,coerce:()=>WC,custom:()=>Hh,date:()=>hC,datetimeRegex:()=>Gh,defaultErrorMap:()=>Hr,discriminatedUnion:()=>_C,effect:()=>BC,enum:()=>PC,function:()=>RC,getErrorMap:()=>Yi,getParsedType:()=>wr,instanceof:()=>fC,intersection:()=>SC,isAborted:()=>Sa,isAsync:()=>Zi,isDirty:()=>Ia,isValid:()=>gn,late:()=>cC,lazy:()=>FC,literal:()=>NC,makeIssue:()=>cs,map:()=>vC,nan:()=>pC,nativeEnum:()=>LC,never:()=>EC,null:()=>xC,nullable:()=>UC,number:()=>Yh,object:()=>wC,objectUtil:()=>Dc,oboolean:()=>GC,onumber:()=>VC,optional:()=>jC,ostring:()=>qC,pipeline:()=>$C,preprocess:()=>zC,promise:()=>MC,quotelessJson:()=>Bw,record:()=>OC,set:()=>DC,setErrorMap:()=>Uw,strictObject:()=>CC,string:()=>Kh,symbol:()=>mC,transformer:()=>BC,tuple:()=>IC,undefined:()=>gC,union:()=>TC,unknown:()=>bC,util:()=>_e,void:()=>AC});var _e;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let s of i)o[s]=s;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(let a of o)s[a]=i[a];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},t.find=(i,o)=>{for(let s of i)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(_e||(_e={}));var Dc;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Dc||(Dc={}));var q=_e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),wr=t=>{switch(typeof t){case"undefined":return q.undefined;case"string":return q.string;case"number":return Number.isNaN(t)?q.nan:q.number;case"boolean":return q.boolean;case"function":return q.function;case"bigint":return q.bigint;case"symbol":return q.symbol;case"object":return Array.isArray(t)?q.array:t===null?q.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?q.promise:typeof Map<"u"&&t instanceof Map?q.map:typeof Set<"u"&&t instanceof Set?q.set:typeof Date<"u"&&t instanceof Date?q.date:q.object;default:return q.unknown}};var N=_e.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Bw=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),zt=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,u=0;for(;u<s.path.length;){let l=s.path[u];u===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(s))):a[l]=a[l]||{_errors:[]},a=a[l],u++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,_e.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)if(i.path.length>0){let o=i.path[0];r[o]=r[o]||[],r[o].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};zt.create=t=>new zt(t);var jw=(t,e)=>{let r;switch(t.code){case N.invalid_type:t.received===q.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,_e.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:r=`Unrecognized key(s) in object: ${_e.joinValues(t.keys,", ")}`;break;case N.invalid_union:r="Invalid input";break;case N.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${_e.joinValues(t.options)}`;break;case N.invalid_enum_value:r=`Invalid enum value. Expected ${_e.joinValues(t.options)}, received '${t.received}'`;break;case N.invalid_arguments:r="Invalid function arguments";break;case N.invalid_return_type:r="Invalid function return type";break;case N.invalid_date:r="Invalid date";break;case N.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:_e.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case N.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case N.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case N.custom:r="Invalid input";break;case N.invalid_intersection_types:r="Intersection results could not be merged";break;case N.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case N.not_finite:r="Number must be finite";break;default:r=e.defaultError,_e.assertNever(t)}return{message:r}},Hr=jw;var Uh=Hr;function Uw(t){Uh=t}function Yi(){return Uh}var cs=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="",u=n.filter(l=>!!l).slice().reverse();for(let l of u)a=l(s,{data:e,defaultError:a}).message;return{...i,path:o,message:a}},zw=[];function U(t,e){let r=Yi(),n=cs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Hr?void 0:Hr].filter(i=>!!i)});t.common.issues.push(n)}var Ct=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return ue;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,s=await i.value;n.push({key:o,value:s})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return ue;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[o.value]=s.value)}return{status:e.value,value:n}}},ue=Object.freeze({status:"aborted"}),ni=t=>({status:"dirty",value:t}),_t=t=>({status:"valid",value:t}),Sa=t=>t.status==="aborted",Ia=t=>t.status==="dirty",gn=t=>t.status==="valid",Zi=t=>typeof Promise<"u"&&t instanceof Promise;var J;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(J||(J={}));var ar=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},zh=(t,e)=>{if(gn(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new zt(t.common.issues);return this._error=r,this._error}}};function Ae(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,a)=>{let{message:u}=t;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:u??n??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:u??r??a.defaultError}},description:i}}var ke=class{get description(){return this._def.description}_getType(e){return wr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:wr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ct,ctx:{common:e.parent.common,data:e.data,parsedType:wr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Zi(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wr(e)},i=this._parseSync({data:e,path:n.path,parent:n});return zh(n,i)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wr(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return gn(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>gn(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wr(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(Zi(i)?i:Promise.resolve(i));return zh(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let s=e(i),a=()=>o.addIssue({code:N.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(u=>u?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new ur({schema:this,typeName:ce.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return sr.create(this,this._def)}nullable(){return Tr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Zr.create(this)}promise(){return bn.create(this,this._def)}or(e){return ci.create([this,e],this._def)}and(e){return fi.create(this,e,this._def)}transform(e){return new ur({...Ae(this._def),schema:this,typeName:ce.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new gi({...Ae(this._def),innerType:this,defaultValue:r,typeName:ce.ZodDefault})}brand(){return new fs({typeName:ce.ZodBranded,type:this,...Ae(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new xi({...Ae(this._def),innerType:this,catchValue:r,typeName:ce.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ps.create(this,e)}readonly(){return yi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},$w=/^c[^\s-]{8,}$/i,qw=/^[0-9a-z]+$/,Vw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Gw=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ww=/^[a-z0-9_-]{21}$/i,Hw=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Kw=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Yw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Zw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Rc,Xw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Qw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,eC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,qh="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",nC=new RegExp(`^${qh}$`);function Vh(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function iC(t){return new RegExp(`^${Vh(t)}$`)}function Gh(t){let e=`${qh}T${Vh(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function oC(t,e){return!!((e==="v4"||!e)&&Xw.test(t)||(e==="v6"||!e)&&Qw.test(t))}function sC(t,e){if(!Hw.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function aC(t,e){return!!((e==="v4"||!e)&&Jw.test(t)||(e==="v6"||!e)&&eC.test(t))}var xn=class t extends ke{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==q.string){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:q.string,received:o.parsedType}),ue}let n=new Ct,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(e,i),s?U(i,{code:N.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&U(i,{code:N.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Yw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"email",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Rc||(Rc=new RegExp(Zw,"u")),Rc.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"emoji",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Gw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"uuid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Ww.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"nanoid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")$w.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cuid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")qw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cuid2",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Vw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"ulid",code:N.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),U(i,{validation:"url",code:N.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"regex",code:N.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Gh(o).test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?nC.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?iC(o).test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{code:N.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Kw.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"duration",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?oC(e.data,o.version)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"ip",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?sC(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"jwt",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?aC(e.data,o.version)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"cidr",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?tC.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64",code:N.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?rC.test(e.data)||(i=this._getOrReturnCtx(e,i),U(i,{validation:"base64url",code:N.invalid_string,message:o.message}),n.dirty()):_e.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:N.invalid_string,...J.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...J.errToObj(e)})}url(e){return this._addCheck({kind:"url",...J.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...J.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...J.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...J.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...J.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...J.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...J.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...J.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...J.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...J.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...J.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...J.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...J.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...J.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...J.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...J.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...J.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...J.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...J.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...J.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...J.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...J.errToObj(r)})}nonempty(e){return this.min(1,J.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};xn.create=t=>new xn({checks:[],typeName:ce.ZodString,coerce:t?.coerce??!1,...Ae(t)});function uC(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return o%s/10**i}var ii=class t extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==q.number){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:q.number,received:o.parsedType}),ue}let n,i=new Ct;for(let o of this._def.checks)o.kind==="int"?_e.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:N.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?uC(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_finite,message:o.message}),i.dirty()):_e.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,J.toString(r))}gt(e,r){return this.setLimit("min",e,!1,J.toString(r))}lte(e,r){return this.setLimit("max",e,!0,J.toString(r))}lt(e,r){return this.setLimit("max",e,!1,J.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:J.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:J.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:J.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:J.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:J.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:J.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:J.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:J.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:J.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:J.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_e.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};ii.create=t=>new ii({checks:[],typeName:ce.ZodNumber,coerce:t?.coerce||!1,...Ae(t)});var oi=class t extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==q.bigint)return this._getInvalidInput(e);let n,i=new Ct;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),U(n,{code:N.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):_e.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:q.bigint,received:r.parsedType}),ue}gte(e,r){return this.setLimit("min",e,!0,J.toString(r))}gt(e,r){return this.setLimit("min",e,!1,J.toString(r))}lte(e,r){return this.setLimit("max",e,!0,J.toString(r))}lt(e,r){return this.setLimit("max",e,!1,J.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:J.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:J.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:J.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:J.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:J.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:J.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};oi.create=t=>new oi({checks:[],typeName:ce.ZodBigInt,coerce:t?.coerce??!1,...Ae(t)});var si=class extends ke{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==q.boolean){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.boolean,received:n.parsedType}),ue}return _t(e.data)}};si.create=t=>new si({typeName:ce.ZodBoolean,coerce:t?.coerce||!1,...Ae(t)});var ai=class t extends ke{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==q.date){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_type,expected:q.date,received:o.parsedType}),ue}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return U(o,{code:N.invalid_date}),ue}let n=new Ct,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),U(i,{code:N.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):_e.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:J.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:J.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};ai.create=t=>new ai({checks:[],coerce:t?.coerce||!1,typeName:ce.ZodDate,...Ae(t)});var Ji=class extends ke{_parse(e){if(this._getType(e)!==q.symbol){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.symbol,received:n.parsedType}),ue}return _t(e.data)}};Ji.create=t=>new Ji({typeName:ce.ZodSymbol,...Ae(t)});var ui=class extends ke{_parse(e){if(this._getType(e)!==q.undefined){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.undefined,received:n.parsedType}),ue}return _t(e.data)}};ui.create=t=>new ui({typeName:ce.ZodUndefined,...Ae(t)});var li=class extends ke{_parse(e){if(this._getType(e)!==q.null){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.null,received:n.parsedType}),ue}return _t(e.data)}};li.create=t=>new li({typeName:ce.ZodNull,...Ae(t)});var yn=class extends ke{constructor(){super(...arguments),this._any=!0}_parse(e){return _t(e.data)}};yn.create=t=>new yn({typeName:ce.ZodAny,...Ae(t)});var Yr=class extends ke{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _t(e.data)}};Yr.create=t=>new Yr({typeName:ce.ZodUnknown,...Ae(t)});var mr=class extends ke{_parse(e){let r=this._getOrReturnCtx(e);return U(r,{code:N.invalid_type,expected:q.never,received:r.parsedType}),ue}};mr.create=t=>new mr({typeName:ce.ZodNever,...Ae(t)});var Qi=class extends ke{_parse(e){if(this._getType(e)!==q.undefined){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.void,received:n.parsedType}),ue}return _t(e.data)}};Qi.create=t=>new Qi({typeName:ce.ZodVoid,...Ae(t)});var Zr=class t extends ke{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==q.array)return U(r,{code:N.invalid_type,expected:q.array,received:r.parsedType}),ue;if(i.exactLength!==null){let s=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(s||a)&&(U(r,{code:s?N.too_big:N.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(U(r,{code:N.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(U(r,{code:N.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>i.type._parseAsync(new ar(r,s,r.path,a)))).then(s=>Ct.mergeArray(n,s));let o=[...r.data].map((s,a)=>i.type._parseSync(new ar(r,s,r.path,a)));return Ct.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:J.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:J.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:J.toString(r)}})}nonempty(e){return this.min(1,e)}};Zr.create=(t,e)=>new Zr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ce.ZodArray,...Ae(e)});function Xi(t){if(t instanceof $t){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=sr.create(Xi(n))}return new $t({...t._def,shape:()=>e})}else return t instanceof Zr?new Zr({...t._def,type:Xi(t.element)}):t instanceof sr?sr.create(Xi(t.unwrap())):t instanceof Tr?Tr.create(Xi(t.unwrap())):t instanceof Cr?Cr.create(t.items.map(e=>Xi(e))):t}var $t=class t extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=_e.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==q.object){let l=this._getOrReturnCtx(e);return U(l,{code:N.invalid_type,expected:q.object,received:l.parsedType}),ue}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof mr&&this._def.unknownKeys==="strip"))for(let l in i.data)s.includes(l)||a.push(l);let u=[];for(let l of s){let c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ar(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof mr){let l=this._def.unknownKeys;if(l==="passthrough")for(let c of a)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")a.length>0&&(U(i,{code:N.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let c of a){let f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ar(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let l=[];for(let c of u){let f=await c.key,p=await c.value;l.push({key:f,value:p,alwaysSet:c.alwaysSet})}return l}).then(l=>Ct.mergeObjectSync(n,l)):Ct.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return J.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:J.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ce.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of _e.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of _e.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Xi(this)}partial(e){let r={};for(let n of _e.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of _e.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof sr;)o=o._def.innerType;r[n]=o}return new t({...this._def,shape:()=>r})}keyof(){return Wh(_e.objectKeys(this.shape))}};$t.create=(t,e)=>new $t({shape:()=>t,unknownKeys:"strip",catchall:mr.create(),typeName:ce.ZodObject,...Ae(e)});$t.strictCreate=(t,e)=>new $t({shape:()=>t,unknownKeys:"strict",catchall:mr.create(),typeName:ce.ZodObject,...Ae(e)});$t.lazycreate=(t,e)=>new $t({shape:t,unknownKeys:"strip",catchall:mr.create(),typeName:ce.ZodObject,...Ae(e)});var ci=class extends ke{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(a=>new zt(a.ctx.common.issues));return U(r,{code:N.invalid_union,unionErrors:s}),ue}if(r.common.async)return Promise.all(n.map(async o=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let o,s=[];for(let u of n){let l={...r,common:{...r.common,issues:[]},parent:null},c=u._parseSync({data:r.data,path:r.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(u=>new zt(u));return U(r,{code:N.invalid_union,unionErrors:a}),ue}}get options(){return this._def.options}};ci.create=(t,e)=>new ci({options:t,typeName:ce.ZodUnion,...Ae(e)});var Kr=t=>t instanceof pi?Kr(t.schema):t instanceof ur?Kr(t.innerType()):t instanceof di?[t.value]:t instanceof hi?t.options:t instanceof mi?_e.objectValues(t.enum):t instanceof gi?Kr(t._def.innerType):t instanceof ui?[void 0]:t instanceof li?[null]:t instanceof sr?[void 0,...Kr(t.unwrap())]:t instanceof Tr?[null,...Kr(t.unwrap())]:t instanceof fs||t instanceof yi?Kr(t.unwrap()):t instanceof xi?Kr(t._def.innerType):[],Oa=class t extends ke{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==q.object)return U(r,{code:N.invalid_type,expected:q.object,received:r.parsedType}),ue;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(U(r,{code:N.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),ue)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let s=Kr(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,o)}}return new t({typeName:ce.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ae(n)})}};function Fc(t,e){let r=wr(t),n=wr(e);if(t===e)return{valid:!0,data:t};if(r===q.object&&n===q.object){let i=_e.objectKeys(e),o=_e.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(let a of o){let u=Fc(t[a],e[a]);if(!u.valid)return{valid:!1};s[a]=u.data}return{valid:!0,data:s}}else if(r===q.array&&n===q.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let s=t[o],a=e[o],u=Fc(s,a);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===q.date&&n===q.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var fi=class extends ke{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,s)=>{if(Sa(o)||Sa(s))return ue;let a=Fc(o.value,s.value);return a.valid?((Ia(o)||Ia(s))&&r.dirty(),{status:r.value,value:a.data}):(U(n,{code:N.invalid_intersection_types}),ue)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};fi.create=(t,e,r)=>new fi({left:t,right:e,typeName:ce.ZodIntersection,...Ae(r)});var Cr=class t extends ke{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.array)return U(n,{code:N.invalid_type,expected:q.array,received:n.parsedType}),ue;if(n.data.length<this._def.items.length)return U(n,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ue;!this._def.rest&&n.data.length>this._def.items.length&&(U(n,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((s,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new ar(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(o).then(s=>Ct.mergeArray(r,s)):Ct.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Cr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Cr({items:t,typeName:ce.ZodTuple,rest:null,...Ae(e)})};var va=class t extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.object)return U(n,{code:N.invalid_type,expected:q.object,received:n.parsedType}),ue;let i=[],o=this._def.keyType,s=this._def.valueType;for(let a in n.data)i.push({key:o._parse(new ar(n,a,n.path,a)),value:s._parse(new ar(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Ct.mergeObjectAsync(r,i):Ct.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof ke?new t({keyType:e,valueType:r,typeName:ce.ZodRecord,...Ae(n)}):new t({keyType:xn.create(),valueType:e,typeName:ce.ZodRecord,...Ae(r)})}},eo=class extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.map)return U(n,{code:N.invalid_type,expected:q.map,received:n.parsedType}),ue;let i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([a,u],l)=>({key:i._parse(new ar(n,a,n.path,[l,"key"])),value:o._parse(new ar(n,u,n.path,[l,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of s){let l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return ue;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(l.value,c.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of s){let l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return ue;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(l.value,c.value)}return{status:r.value,value:a}}}};eo.create=(t,e,r)=>new eo({valueType:e,keyType:t,typeName:ce.ZodMap,...Ae(r)});var to=class t extends ke{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.set)return U(n,{code:N.invalid_type,expected:q.set,received:n.parsedType}),ue;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(U(n,{code:N.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(U(n,{code:N.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function s(u){let l=new Set;for(let c of u){if(c.status==="aborted")return ue;c.status==="dirty"&&r.dirty(),l.add(c.value)}return{status:r.value,value:l}}let a=[...n.data.values()].map((u,l)=>o._parse(new ar(n,u,n.path,l)));return n.common.async?Promise.all(a).then(u=>s(u)):s(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:J.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:J.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};to.create=(t,e)=>new to({valueType:t,minSize:null,maxSize:null,typeName:ce.ZodSet,...Ae(e)});var Da=class t extends ke{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==q.function)return U(r,{code:N.invalid_type,expected:q.function,received:r.parsedType}),ue;function n(a,u){return cs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Yi(),Hr].filter(l=>!!l),issueData:{code:N.invalid_arguments,argumentsError:u}})}function i(a,u){return cs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Yi(),Hr].filter(l=>!!l),issueData:{code:N.invalid_return_type,returnTypeError:u}})}let o={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof bn){let a=this;return _t(async function(...u){let l=new zt([]),c=await a._def.args.parseAsync(u,o).catch(d=>{throw l.addIssue(n(u,d)),l}),f=await Reflect.apply(s,this,c);return await a._def.returns._def.type.parseAsync(f,o).catch(d=>{throw l.addIssue(i(f,d)),l})})}else{let a=this;return _t(function(...u){let l=a._def.args.safeParse(u,o);if(!l.success)throw new zt([n(u,l.error)]);let c=Reflect.apply(s,this,l.data),f=a._def.returns.safeParse(c,o);if(!f.success)throw new zt([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Cr.create(e).rest(Yr.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||Cr.create([]).rest(Yr.create()),returns:r||Yr.create(),typeName:ce.ZodFunction,...Ae(n)})}},pi=class extends ke{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};pi.create=(t,e)=>new pi({getter:t,typeName:ce.ZodLazy,...Ae(e)});var di=class extends ke{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return U(r,{received:r.data,code:N.invalid_literal,expected:this._def.value}),ue}return{status:"valid",value:e.data}}get value(){return this._def.value}};di.create=(t,e)=>new di({value:t,typeName:ce.ZodLiteral,...Ae(e)});function Wh(t,e){return new hi({values:t,typeName:ce.ZodEnum,...Ae(e)})}var hi=class t extends ke{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{expected:_e.joinValues(n),received:r.parsedType,code:N.invalid_type}),ue}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{received:r.data,code:N.invalid_enum_value,options:n}),ue}return _t(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};hi.create=Wh;var mi=class extends ke{_parse(e){let r=_e.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==q.string&&n.parsedType!==q.number){let i=_e.objectValues(r);return U(n,{expected:_e.joinValues(i),received:n.parsedType,code:N.invalid_type}),ue}if(this._cache||(this._cache=new Set(_e.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=_e.objectValues(r);return U(n,{received:n.data,code:N.invalid_enum_value,options:i}),ue}return _t(e.data)}get enum(){return this._def.values}};mi.create=(t,e)=>new mi({values:t,typeName:ce.ZodNativeEnum,...Ae(e)});var bn=class extends ke{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==q.promise&&r.common.async===!1)return U(r,{code:N.invalid_type,expected:q.promise,received:r.parsedType}),ue;let n=r.parsedType===q.promise?r.data:Promise.resolve(r.data);return _t(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};bn.create=(t,e)=>new bn({type:t,typeName:ce.ZodPromise,...Ae(e)});var ur=class extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{U(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let s=i.transform(n.data,o);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return ue;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?ue:u.status==="dirty"?ni(u.value):r.value==="dirty"?ni(u.value):u});{if(r.value==="aborted")return ue;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?ue:a.status==="dirty"?ni(a.value):r.value==="dirty"?ni(a.value):a}}if(i.type==="refinement"){let s=a=>{let u=i.refinement(a,o);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?ue:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?ue:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!gn(s))return ue;let a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>gn(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:r.value,value:a})):ue);_e.assertNever(i)}};ur.create=(t,e,r)=>new ur({schema:t,typeName:ce.ZodEffects,effect:e,...Ae(r)});ur.createWithPreprocess=(t,e,r)=>new ur({schema:e,effect:{type:"preprocess",transform:t},typeName:ce.ZodEffects,...Ae(r)});var sr=class extends ke{_parse(e){return this._getType(e)===q.undefined?_t(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};sr.create=(t,e)=>new sr({innerType:t,typeName:ce.ZodOptional,...Ae(e)});var Tr=class extends ke{_parse(e){return this._getType(e)===q.null?_t(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Tr.create=(t,e)=>new Tr({innerType:t,typeName:ce.ZodNullable,...Ae(e)});var gi=class extends ke{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===q.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};gi.create=(t,e)=>new gi({innerType:t,typeName:ce.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});var xi=class extends ke{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Zi(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new zt(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};xi.create=(t,e)=>new xi({innerType:t,typeName:ce.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});var ro=class extends ke{_parse(e){if(this._getType(e)!==q.nan){let n=this._getOrReturnCtx(e);return U(n,{code:N.invalid_type,expected:q.nan,received:n.parsedType}),ue}return{status:"valid",value:e.data}}};ro.create=t=>new ro({typeName:ce.ZodNaN,...Ae(t)});var lC=Symbol("zod_brand"),fs=class extends ke{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},ps=class t extends ke{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?ue:o.status==="dirty"?(r.dirty(),ni(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?ue:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:ce.ZodPipeline})}},yi=class extends ke{_parse(e){let r=this._def.innerType._parse(e),n=i=>(gn(i)&&(i.value=Object.freeze(i.value)),i);return Zi(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};yi.create=(t,e)=>new yi({innerType:t,typeName:ce.ZodReadonly,...Ae(e)});function $h(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Hh(t,e={},r){return t?yn.create().superRefine((n,i)=>{let o=t(n);if(o instanceof Promise)return o.then(s=>{if(!s){let a=$h(e,n),u=a.fatal??r??!0;i.addIssue({code:"custom",...a,fatal:u})}});if(!o){let s=$h(e,n),a=s.fatal??r??!0;i.addIssue({code:"custom",...s,fatal:a})}}):yn.create()}var cC={object:$t.lazycreate},ce;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ce||(ce={}));var fC=(t,e={message:`Input not instance of ${t.name}`})=>Hh(r=>r instanceof t,e),Kh=xn.create,Yh=ii.create,pC=ro.create,dC=oi.create,Zh=si.create,hC=ai.create,mC=Ji.create,gC=ui.create,xC=li.create,yC=yn.create,bC=Yr.create,EC=mr.create,AC=Qi.create,kC=Zr.create,wC=$t.create,CC=$t.strictCreate,TC=ci.create,_C=Oa.create,SC=fi.create,IC=Cr.create,OC=va.create,vC=eo.create,DC=to.create,RC=Da.create,FC=pi.create,NC=di.create,PC=hi.create,LC=mi.create,MC=bn.create,BC=ur.create,jC=sr.create,UC=Tr.create,zC=ur.createWithPreprocess,$C=ps.create,qC=()=>Kh().optional(),VC=()=>Yh().optional(),GC=()=>Zh().optional(),WC={string:(t=>xn.create({...t,coerce:!0})),number:(t=>ii.create({...t,coerce:!0})),boolean:(t=>si.create({...t,coerce:!0})),bigint:(t=>oi.create({...t,coerce:!0})),date:(t=>ai.create({...t,coerce:!0}))};var HC=ue;import{defaultLoaders as KC}from"cosmiconfig";function Nc(t,e){let r=KC[".json"],n=r(t,e);return Xh(n)}function Xh(t,e="",r={}){for(let[n,i]of Object.entries(t)){let o=e?`${e}.${n}`:n;typeof i=="object"&&i!==null&&!Array.isArray(i)?Xh(i,o,r):i===null?r[o]="null":r[o]=i.toString()}return r}import nT from"fs";import Xr from"path";import QC from"process";import YC from"process";import ZC from"fs/promises";import{fileURLToPath as XC}from"url";import Mj from"fs";import no from"path";var Jh=t=>t instanceof URL?XC(t):t;async function Ra(t,{cwd:e=YC.cwd(),type:r="file",stopAt:n}={}){let i=no.resolve(Jh(e)??""),{root:o}=no.parse(i);n=no.resolve(i,Jh(n??o));let s=no.isAbsolute(t);for(;i;){let a=s?t:no.join(i,t);try{let u=await ZC.stat(a);if(r==="file"&&u.isFile()||r==="directory"&&u.isDirectory())return a}catch{}if(i===n||i===o)break;i=no.dirname(i)}}async function Qh({cwd:t=QC.cwd()}={}){return Ra("package.json",{cwd:t})}import eT from"fs";import tT from"fs/promises";async function Pc(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await tT[t](r))[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function Lc(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return eT[t](r)[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var io=Pc.bind(void 0,"stat","isFile"),Gj=Pc.bind(void 0,"stat","isDirectory"),Wj=Pc.bind(void 0,"lstat","isSymbolicLink"),Mc=Lc.bind(void 0,"statSync","isFile"),Hj=Lc.bind(void 0,"statSync","isDirectory"),Kj=Lc.bind(void 0,"lstatSync","isSymbolicLink");import{log as tm}from"remark-mdat";import{Configuration as iT}from"unified-engine";import rT from"os";var em=rT.homedir();function Bc(t){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);return em?t.replace(/^~(?=$|\/|\\)/,em):t}function oT(t,e){let r=e===0?1:Math.floor(Math.log10(Math.abs(e))+1);return t.toString().padStart(r,"0")}function nm(t,e,r,n){let i=[];for(let[o,s]of t.entries()){let a=r&&t.length>1?`-${oT(o+1,t.length+1)}`:"",u=sT(s,e,r,n,a);i.push(u)}return i}function sT(t,e,r,n,i=""){let o=rm(t),s=e?rm(e):void 0;if(!Mc(o))throw new Error(`Input file not found: "${o}"`);if(s){if(Mc(s))throw new Error(`Output path must be a directory, received a file path: "${s}"`);nT.mkdirSync(s,{recursive:!0})}let a=r?Xr.basename(r,Xr.extname(r)):Xr.basename(o,Xr.extname(o)),u=`.${n??(r&&Xr.extname(r)!==""?Xr.extname(r):Xr.extname(t)===""?"":Xr.extname(t))}`,l=`${a}${i}${u}`,c=s??Xr.dirname(o);return{input:o,name:l,output:c}}function rm(t){return Bc(t)}async function Fa(){return Qh()}function Na(t){return t==null?[]:Array.isArray(t)?t:[t]}async function im(){let t=new iT({cwd:process.cwd(),detectConfig:!0,packageField:"remarkConfig",rcName:".remarkrc"}),e=await new Promise(r=>{t.load("",(n,i)=>{if(n){console.error(n),r();return}r(i)})});if(e){let{filePath:r}=e;return r===void 0?tm.info('No ambient Remark configuration file found"'):tm.info(`Found and loaded ambient Remark configuration from "${r}"`),e}throw new Error("Failed to load ambient remark configuration")}var am=lT.merge(K.object({assetsPath:K.string().optional(),packageFile:K.string().optional()})).describe("Config Extension");async function bi(t){let{additionalConfig:e,additionalRules:r,searchFrom:n}=t??{},i={addMetaComment:!1,assetsPath:"./assets",closingPrefix:"/",keywordPrefix:"",metaCommentIdentifier:"+",packageFile:await Fa(),rules:{mdat:"Powered by the Markdown Autophagic Template system: [mdat](https://github.com/kitschpatrol/mdat)."}},o=om("mdat",{loaders:{".ts":sm()}}),s=await o.search(n);if(s){let{config:a,filepath:u}=s,l=a;if(lr.info(`Using config from "${u}"`),u.endsWith("package.json")&&typeof a=="string"){lr.info(`Detected shared config string: "${a}"`);let{default:f}=await import(a);l=f}let c=um(l,am);c&&(i=jc(i,c))}if(e!==void 0){let a=Array.isArray(e)?e:[e];for(let u of a){let l;if(typeof u=="string"){let f=await o.load(u);if(f==null)continue;let{config:p,filepath:d}=f;lr.info(`Loaded additional config from "${d}"`),l=p}else l=u;if(l===void 0)continue;lr.info("Merging configuration object");let c=um(l,am);c!==void 0&&(i=jc(i,c))}}if(r!==void 0){let a=Array.isArray(r)?r:[r],u=om("mdat",{loaders:{".json":Nc,".ts":sm()}});for(let l of a){let c;if(typeof l=="string"){let p;if(lm.basename(l).endsWith("package.json")){let y=await aT.readFile(l,"utf8");p={config:Nc(l,y),filepath:l}}else p=await u.load(l);if(p==null)continue;let{config:d,filepath:m}=p;lr.info(`Loaded additional config from "${m}"`),c=d}else c=l;if(c===void 0)continue;lr.info("Merging rules into configuration object");let f=fT(c,cT);f!==void 0&&(i=jc(i,f))}}if(i.rules){let a=Object.keys(i.rules).sort().map(u=>`"${Pa.default.green(Pa.default.bold(u))}"`);lr.info(`Loaded ${Pa.default.bold(a.length)} mdat comment expansion ${vc("rule",a.length)}:`);for(let u of a)lr.info(` ${u}`)}else lr.error("No rules loaded from additional configurations or rules, using default.");return La=i,i}function fT(t,e){if(e.safeParse(t).success)return{rules:t};lr.error(`Rules object has the wrong shape. Ignoring and using default configuration:
|
|
66
66
|
${JSON.stringify(t,void 0,2)}`)}function um(t,e){if(e.safeParse(t).success)return t;lr.error(`Config object has the wrong shape. Ignoring and using default configuration:
|
|
67
|
-
${JSON.stringify(t,void 0,2)}`)}var La;async function _r(){return La===void 0&&(lr.warn("getConfig(): config was undefined"),La??=await bi()),La}var Uc;async function Jt(){let{packageFile:t}=await _r();if(t===void 0)throw new Error("No packageFile found or set in config");if(Uc??=await
|
|
68
|
-
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"};var dT={}.hasOwnProperty;function oo(t){return dT.call(zc,t)?zc[t]:!1}function it(t,e,r,n){let i=t.length,o=0,s;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(e,r),t.splice(...s);else for(r&&t.splice(e,r);o<n.length;)s=n.slice(o,o+1e4),s.unshift(e,0),t.splice(...s),o+=1e4,e+=1e4}function Ft(t,e){return t.length>0?(it(t,t.length,0,e),t):e}var pm={}.hasOwnProperty;function Ma(t){let e={},r=-1;for(;++r<t.length;)hT(e,t[r]);return e}function hT(t,e){let r;for(r in e){let i=(pm.call(t,r)?t[r]:void 0)||(t[r]={}),o=e[r],s;if(o)for(s in o){pm.call(i,s)||(i[s]=[]);let a=o[s];mT(i[s],Array.isArray(a)?a:a?[a]:[])}}}function mT(t,e){let r=-1,n=[];for(;++r<e.length;)(e[r].add==="after"?t:n).push(e[r]);it(t,0,0,n)}function Ba(t,e){let r=Number.parseInt(t,e);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function St(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var mt=En(/[A-Za-z]/),gt=En(/[\dA-Za-z]/),dm=En(/[#-'*+\--9=?A-Z^-~]/);function Ei(t){return t!==null&&(t<32||t===127)}var ds=En(/\d/),hm=En(/[\dA-Fa-f]/),mm=En(/[!-/:-@[-`{-~]/);function z(t){return t!==null&&t<-2}function Ce(t){return t!==null&&(t<0||t===32)}function se(t){return t===-2||t===-1||t===32}var Ai=En(new RegExp("\\p{P}|\\p{S}","u")),Sr=En(/\s/);function En(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function ie(t,e,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(u){return se(u)?(t.enter(r),a(u)):e(u)}function a(u){return se(u)&&o++<i?(t.consume(u),a):(t.exit(r),e(u))}}var gm={tokenize:gT};function gT(t){let e=t.attempt(this.parser.constructs.contentInitial,n,i),r;return e;function n(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),ie(t,e,"linePrefix")}function i(a){return t.enter("paragraph"),o(a)}function o(a){let u=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,s(a)}function s(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return z(a)?(t.consume(a),t.exit("chunkText"),o):(t.consume(a),s)}}var ym={tokenize:xT},xm={tokenize:yT};function xT(t){let e=this,r=[],n=0,i,o,s;return a;function a(k){if(n<r.length){let D=r[n];return e.containerState=D[1],t.attempt(D[0].continuation,u,l)(k)}return l(k)}function u(k){if(n++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&w();let D=e.events.length,R=D,S;for(;R--;)if(e.events[R][0]==="exit"&&e.events[R][1].type==="chunkFlow"){S=e.events[R][1].end;break}b(n);let de=D;for(;de<e.events.length;)e.events[de][1].end={...S},de++;return it(e.events,R+1,0,e.events.slice(D)),e.events.length=de,l(k)}return a(k)}function l(k){if(n===r.length){if(!i)return p(k);if(i.currentConstruct&&i.currentConstruct.concrete)return m(k);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(xm,c,f)(k)}function c(k){return i&&w(),b(n),p(k)}function f(k){return e.parser.lazy[e.now().line]=n!==r.length,s=e.now().offset,m(k)}function p(k){return e.containerState={},t.attempt(xm,d,m)(k)}function d(k){return n++,r.push([e.currentConstruct,e.containerState]),p(k)}function m(k){if(k===null){i&&w(),b(0),t.consume(k);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),y(k)}function y(k){if(k===null){g(t.exit("chunkFlow"),!0),b(0),t.consume(k);return}return z(k)?(t.consume(k),g(t.exit("chunkFlow")),n=0,e.interrupt=void 0,a):(t.consume(k),y)}function g(k,D){let R=e.sliceStream(k);if(D&&R.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(R),e.parser.lazy[k.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;let de=e.events.length,ye=de,be,_;for(;ye--;)if(e.events[ye][0]==="exit"&&e.events[ye][1].type==="chunkFlow"){if(be){_=e.events[ye][1].end;break}be=!0}for(b(n),S=de;S<e.events.length;)e.events[S][1].end={..._},S++;it(e.events,ye+1,0,e.events.slice(de)),e.events.length=S}}function b(k){let D=r.length;for(;D-- >k;){let R=r[D];e.containerState=R[1],R[0].exit.call(e,t)}r.length=k}function w(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function yT(t,e,r){return ie(t,t.attempt(this.parser.constructs.document,e,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qr(t){if(t===null||Ce(t)||Sr(t))return 1;if(Ai(t))return 2}function An(t,e,r){let n=[],i=-1;for(;++i<t.length;){let o=t[i].resolveAll;o&&!n.includes(o)&&(e=o(e,r),n.push(o))}return e}var hs={name:"attention",resolveAll:bT,tokenize:ET};function bT(t,e){let r=-1,n,i,o,s,a,u,l,c;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(n=r;n--;)if(t[n][0]==="exit"&&t[n][1].type==="attentionSequence"&&t[n][1]._open&&e.sliceSerialize(t[n][1]).charCodeAt(0)===e.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[n][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[n][1].end.offset-t[n][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;u=t[n][1].end.offset-t[n][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;let f={...t[n][1].end},p={...t[r][1].start};bm(f,-u),bm(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...t[n][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...t[n][1].end},end:{...t[r][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},t[n][1].end={...s.start},t[r][1].start={...a.end},l=[],t[n][1].end.offset-t[n][1].start.offset&&(l=Ft(l,[["enter",t[n][1],e],["exit",t[n][1],e]])),l=Ft(l,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",o,e]]),l=Ft(l,An(e.parser.constructs.insideSpan.null,t.slice(n+1,r),e)),l=Ft(l,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",i,e]]),t[r][1].end.offset-t[r][1].start.offset?(c=2,l=Ft(l,[["enter",t[r][1],e],["exit",t[r][1],e]])):c=0,it(t,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function ET(t,e){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Qr(n),o;return s;function s(u){return o=u,t.enter("attentionSequence"),a(u)}function a(u){if(u===o)return t.consume(u),a;let l=t.exit("attentionSequence"),c=Qr(u),f=!c||c===2&&i||r.includes(u),p=!i||i===2&&c||r.includes(n);return l._open=!!(o===42?f:f&&(i||!p)),l._close=!!(o===42?p:p&&(c||!f)),e(u)}}function bm(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var $c={name:"autolink",tokenize:AT};function AT(t,e,r){let n=0;return i;function i(d){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(d){return mt(d)?(t.consume(d),s):d===64?r(d):l(d)}function s(d){return d===43||d===45||d===46||gt(d)?(n=1,a(d)):l(d)}function a(d){return d===58?(t.consume(d),n=0,u):(d===43||d===45||d===46||gt(d))&&n++<32?(t.consume(d),a):(n=0,l(d))}function u(d){return d===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):d===null||d===32||d===60||Ei(d)?r(d):(t.consume(d),u)}function l(d){return d===64?(t.consume(d),c):dm(d)?(t.consume(d),l):r(d)}function c(d){return gt(d)?f(d):r(d)}function f(d){return d===46?(t.consume(d),n=0,c):d===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):p(d)}function p(d){if((d===45||gt(d))&&n++<63){let m=d===45?p:f;return t.consume(d),m}return r(d)}}var Ir={partial:!0,tokenize:kT};function kT(t,e,r){return n;function n(o){return se(o)?ie(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||z(o)?e(o):r(o)}}var ja={continuation:{tokenize:CT},exit:TT,name:"blockQuote",tokenize:wT};function wT(t,e,r){let n=this;return i;function i(s){if(s===62){let a=n.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(s),t.exit("blockQuoteMarker"),o}return r(s)}function o(s){return se(s)?(t.enter("blockQuotePrefixWhitespace"),t.consume(s),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(s))}}function CT(t,e,r){let n=this;return i;function i(s){return se(s)?ie(t,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return t.attempt(ja,e,r)(s)}}function TT(t){t.exit("blockQuote")}var Ua={name:"characterEscape",tokenize:_T};function _T(t,e,r){return n;function n(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return mm(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(o)}}var za={name:"characterReference",tokenize:ST};function ST(t,e,r){let n=this,i=0,o,s;return a;function a(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),u}function u(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),l):(t.enter("characterReferenceValue"),o=31,s=gt,c(f))}function l(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,s=hm,c):(t.enter("characterReferenceValue"),o=7,s=ds,c(f))}function c(f){if(f===59&&i){let p=t.exit("characterReferenceValue");return s===gt&&!oo(n.sliceSerialize(p))?r(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return s(f)&&i++<o?(t.consume(f),c):r(f)}}var Em={partial:!0,tokenize:OT},$a={concrete:!0,name:"codeFenced",tokenize:IT};function IT(t,e,r){let n=this,i={partial:!0,tokenize:R},o=0,s=0,a;return u;function u(S){return l(S)}function l(S){let de=n.events[n.events.length-1];return o=de&&de[1].type==="linePrefix"?de[2].sliceSerialize(de[1],!0).length:0,a=S,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===a?(s++,t.consume(S),c):s<3?r(S):(t.exit("codeFencedFenceSequence"),se(S)?ie(t,f,"whitespace")(S):f(S))}function f(S){return S===null||z(S)?(t.exit("codeFencedFence"),n.interrupt?e(S):t.check(Em,y,D)(S)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||z(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(S)):se(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),ie(t,d,"whitespace")(S)):S===96&&S===a?r(S):(t.consume(S),p)}function d(S){return S===null||z(S)?f(S):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||z(S)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(S)):S===96&&S===a?r(S):(t.consume(S),m)}function y(S){return t.attempt(i,D,g)(S)}function g(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),b}function b(S){return o>0&&se(S)?ie(t,w,"linePrefix",o+1)(S):w(S)}function w(S){return S===null||z(S)?t.check(Em,y,D)(S):(t.enter("codeFlowValue"),k(S))}function k(S){return S===null||z(S)?(t.exit("codeFlowValue"),w(S)):(t.consume(S),k)}function D(S){return t.exit("codeFenced"),e(S)}function R(S,de,ye){let be=0;return _;function _(j){return S.enter("lineEnding"),S.consume(j),S.exit("lineEnding"),L}function L(j){return S.enter("codeFencedFence"),se(j)?ie(S,F,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):F(j)}function F(j){return j===a?(S.enter("codeFencedFenceSequence"),I(j)):ye(j)}function I(j){return j===a?(be++,S.consume(j),I):be>=s?(S.exit("codeFencedFenceSequence"),se(j)?ie(S,P,"whitespace")(j):P(j)):ye(j)}function P(j){return j===null||z(j)?(S.exit("codeFencedFence"),de(j)):ye(j)}}}function OT(t,e,r){let n=this;return i;function i(s){return s===null?r(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}var ms={name:"codeIndented",tokenize:DT},vT={partial:!0,tokenize:RT};function DT(t,e,r){let n=this;return i;function i(l){return t.enter("codeIndented"),ie(t,o,"linePrefix",5)(l)}function o(l){let c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(l):r(l)}function s(l){return l===null?u(l):z(l)?t.attempt(vT,s,u)(l):(t.enter("codeFlowValue"),a(l))}function a(l){return l===null||z(l)?(t.exit("codeFlowValue"),s(l)):(t.consume(l),a)}function u(l){return t.exit("codeIndented"),e(l)}}function RT(t,e,r){let n=this;return i;function i(s){return n.parser.lazy[n.now().line]?r(s):z(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i):ie(t,o,"linePrefix",5)(s)}function o(s){let a=n.events[n.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):z(s)?i(s):r(s)}}var qc={name:"codeText",previous:NT,resolve:FT,tokenize:PT};function FT(t){let e=t.length-4,r=3,n,i;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=r;++n<e;)if(t[n][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[e][1].type="codeTextPadding",r+=2,e-=2;break}}for(n=r-1,e++;++n<=e;)i===void 0?n!==e&&t[n][1].type!=="lineEnding"&&(i=n):(n===e||t[n][1].type==="lineEnding")&&(t[i][1].type="codeTextData",n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),e-=n-i-2,n=i+2),i=void 0);return t}function NT(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function PT(t,e,r){let n=this,i=0,o,s;return a;function a(p){return t.enter("codeText"),t.enter("codeTextSequence"),u(p)}function u(p){return p===96?(t.consume(p),i++,u):(t.exit("codeTextSequence"),l(p))}function l(p){return p===null?r(p):p===32?(t.enter("space"),t.consume(p),t.exit("space"),l):p===96?(s=t.enter("codeTextSequence"),o=0,f(p)):z(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||z(p)?(t.exit("codeTextData"),l(p)):(t.consume(p),c)}function f(p){return p===96?(t.consume(p),o++,f):o===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(p)):(s.type="codeTextData",c(p))}}var qa=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,r){let n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,r,n){let i=r||0;this.setCursor(Math.trunc(e));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&gs(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),gs(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),gs(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let r=this.left.splice(e,Number.POSITIVE_INFINITY);gs(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);gs(this.left,r.reverse())}}};function gs(t,e){let r=0;if(e.length<1e4)t.push(...e);else for(;r<e.length;)t.push(...e.slice(r,r+1e4)),r+=1e4}function Va(t){let e={},r=-1,n,i,o,s,a,u,l,c=new qa(t);for(;++r<c.length;){for(;r in e;)r=e[r];if(n=c.get(r),r&&n[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(u=n[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(e,LT(c,r)),r=e[r],l=!0);else if(n[1]._container){for(o=r,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(n[1].end={...c.get(i)[1].start},a=c.slice(i,r),a.unshift(n),c.splice(i,r-i+1,a))}}return it(t,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function LT(t,e){let r=t.get(e)[1],n=t.get(e)[2],i=e-1,o=[],s=r._tokenizer;s||(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let a=s.events,u=[],l={},c,f,p=-1,d=r,m=0,y=0,g=[y];for(;d;){for(;t.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=n.sliceStream(d),d.next||c.push(null),f&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=r;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(y=p+1,g.push(y),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),p=g.length;p--;){let b=a.slice(g[p],g[p+1]),w=o.pop();u.push([w,w+b.length-1]),t.splice(w,2,b)}for(u.reverse(),p=-1;++p<u.length;)l[m+u[p][0]]=m+u[p][1],m+=u[p][1]-u[p][0]-1;return l}var Vc={resolve:BT,tokenize:jT},MT={partial:!0,tokenize:UT};function BT(t){return Va(t),t}function jT(t,e){let r;return n;function n(a){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):z(a)?t.check(MT,s,o)(a):(t.consume(a),i)}function o(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function s(a){return t.consume(a),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function UT(t,e,r){let n=this;return i;function i(s){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),ie(t,o,"linePrefix")}function o(s){if(s===null||z(s))return r(s);let a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):t.interrupt(n.parser.constructs.flow,r,e)(s)}}function Ga(t,e,r,n,i,o,s,a,u){let l=u||Number.POSITIVE_INFINITY,c=0;return f;function f(b){return b===60?(t.enter(n),t.enter(i),t.enter(o),t.consume(b),t.exit(o),p):b===null||b===32||b===41||Ei(b)?r(b):(t.enter(n),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),y(b))}function p(b){return b===62?(t.enter(o),t.consume(b),t.exit(o),t.exit(i),t.exit(n),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===62?(t.exit("chunkString"),t.exit(a),p(b)):b===null||b===60||z(b)?r(b):(t.consume(b),b===92?m:d)}function m(b){return b===60||b===62||b===92?(t.consume(b),d):d(b)}function y(b){return!c&&(b===null||b===41||Ce(b))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(n),e(b)):c<l&&b===40?(t.consume(b),c++,y):b===41?(t.consume(b),c--,y):b===null||b===32||b===40||Ei(b)?r(b):(t.consume(b),b===92?g:y)}function g(b){return b===40||b===41||b===92?(t.consume(b),y):y(b)}}function Wa(t,e,r,n,i,o){let s=this,a=0,u;return l;function l(d){return t.enter(n),t.enter(i),t.consume(d),t.exit(i),t.enter(o),c}function c(d){return a>999||d===null||d===91||d===93&&!u||d===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?r(d):d===93?(t.exit(o),t.enter(i),t.consume(d),t.exit(i),t.exit(n),e):z(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||z(d)||a++>999?(t.exit("chunkString"),c(d)):(t.consume(d),u||(u=!se(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(t.consume(d),a++,f):f(d)}}function Ha(t,e,r,n,i,o){let s;return a;function a(p){return p===34||p===39||p===40?(t.enter(n),t.enter(i),t.consume(p),t.exit(i),s=p===40?41:p,u):r(p)}function u(p){return p===s?(t.enter(i),t.consume(p),t.exit(i),t.exit(n),e):(t.enter(o),l(p))}function l(p){return p===s?(t.exit(o),u(s)):p===null?r(p):z(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),ie(t,l,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||z(p)?(t.exit("chunkString"),l(p)):(t.consume(p),p===92?f:c)}function f(p){return p===s||p===92?(t.consume(p),c):c(p)}}function ki(t,e){let r;return n;function n(i){return z(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),r=!0,n):se(i)?ie(t,n,r?"linePrefix":"lineSuffix")(i):e(i)}}var Gc={name:"definition",tokenize:$T},zT={partial:!0,tokenize:qT};function $T(t,e,r){let n=this,i;return o;function o(d){return t.enter("definition"),s(d)}function s(d){return Wa.call(n,t,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function a(d){return i=St(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),u):r(d)}function u(d){return Ce(d)?ki(t,l)(d):l(d)}function l(d){return Ga(t,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return t.attempt(zT,f,f)(d)}function f(d){return se(d)?ie(t,p,"whitespace")(d):p(d)}function p(d){return d===null||z(d)?(t.exit("definition"),n.parser.defined.push(i),e(d)):r(d)}}function qT(t,e,r){return n;function n(a){return Ce(a)?ki(t,i)(a):r(a)}function i(a){return Ha(t,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return se(a)?ie(t,s,"whitespace")(a):s(a)}function s(a){return a===null||z(a)?e(a):r(a)}}var Wc={name:"hardBreakEscape",tokenize:VT};function VT(t,e,r){return n;function n(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return z(o)?(t.exit("hardBreakEscape"),e(o)):r(o)}}var Hc={name:"headingAtx",resolve:GT,tokenize:WT};function GT(t,e){let r=t.length-2,n=3,i,o;return t[n][1].type==="whitespace"&&(n+=2),r-2>n&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&t[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[r][1].end},o={type:"chunkText",start:t[n][1].start,end:t[r][1].end,contentType:"text"},it(t,n,r-n+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function WT(t,e,r){let n=0;return i;function i(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&n++<6?(t.consume(c),s):c===null||Ce(c)?(t.exit("atxHeadingSequence"),a(c)):r(c)}function a(c){return c===35?(t.enter("atxHeadingSequence"),u(c)):c===null||z(c)?(t.exit("atxHeading"),e(c)):se(c)?ie(t,a,"whitespace")(c):(t.enter("atxHeadingText"),l(c))}function u(c){return c===35?(t.consume(c),u):(t.exit("atxHeadingSequence"),a(c))}function l(c){return c===null||c===35||Ce(c)?(t.exit("atxHeadingText"),a(c)):(t.consume(c),l)}}var Am=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Kc=["pre","script","style","textarea"];var Yc={concrete:!0,name:"htmlFlow",resolveTo:YT,tokenize:ZT},HT={partial:!0,tokenize:JT},KT={partial:!0,tokenize:XT};function YT(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function ZT(t,e,r){let n=this,i,o,s,a,u;return l;function l(E){return c(E)}function c(E){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(E),f}function f(E){return E===33?(t.consume(E),p):E===47?(t.consume(E),o=!0,y):E===63?(t.consume(E),i=3,n.interrupt?e:x):mt(E)?(t.consume(E),s=String.fromCharCode(E),g):r(E)}function p(E){return E===45?(t.consume(E),i=2,d):E===91?(t.consume(E),i=5,a=0,m):mt(E)?(t.consume(E),i=4,n.interrupt?e:x):r(E)}function d(E){return E===45?(t.consume(E),n.interrupt?e:x):r(E)}function m(E){let W="CDATA[";return E===W.charCodeAt(a++)?(t.consume(E),a===W.length?n.interrupt?e:F:m):r(E)}function y(E){return mt(E)?(t.consume(E),s=String.fromCharCode(E),g):r(E)}function g(E){if(E===null||E===47||E===62||Ce(E)){let W=E===47,Ke=s.toLowerCase();return!W&&!o&&Kc.includes(Ke)?(i=1,n.interrupt?e(E):F(E)):Am.includes(s.toLowerCase())?(i=6,W?(t.consume(E),b):n.interrupt?e(E):F(E)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(E):o?w(E):k(E))}return E===45||gt(E)?(t.consume(E),s+=String.fromCharCode(E),g):r(E)}function b(E){return E===62?(t.consume(E),n.interrupt?e:F):r(E)}function w(E){return se(E)?(t.consume(E),w):_(E)}function k(E){return E===47?(t.consume(E),_):E===58||E===95||mt(E)?(t.consume(E),D):se(E)?(t.consume(E),k):_(E)}function D(E){return E===45||E===46||E===58||E===95||gt(E)?(t.consume(E),D):R(E)}function R(E){return E===61?(t.consume(E),S):se(E)?(t.consume(E),R):k(E)}function S(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(t.consume(E),u=E,de):se(E)?(t.consume(E),S):ye(E)}function de(E){return E===u?(t.consume(E),u=null,be):E===null||z(E)?r(E):(t.consume(E),de)}function ye(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||Ce(E)?R(E):(t.consume(E),ye)}function be(E){return E===47||E===62||se(E)?k(E):r(E)}function _(E){return E===62?(t.consume(E),L):r(E)}function L(E){return E===null||z(E)?F(E):se(E)?(t.consume(E),L):r(E)}function F(E){return E===45&&i===2?(t.consume(E),ae):E===60&&i===1?(t.consume(E),ee):E===62&&i===4?(t.consume(E),Ue):E===63&&i===3?(t.consume(E),x):E===93&&i===5?(t.consume(E),rt):z(E)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(HT,Je,I)(E)):E===null||z(E)?(t.exit("htmlFlowData"),I(E)):(t.consume(E),F)}function I(E){return t.check(KT,P,Je)(E)}function P(E){return t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),j}function j(E){return E===null||z(E)?I(E):(t.enter("htmlFlowData"),F(E))}function ae(E){return E===45?(t.consume(E),x):F(E)}function ee(E){return E===47?(t.consume(E),s="",Se):F(E)}function Se(E){if(E===62){let W=s.toLowerCase();return Kc.includes(W)?(t.consume(E),Ue):F(E)}return mt(E)&&s.length<8?(t.consume(E),s+=String.fromCharCode(E),Se):F(E)}function rt(E){return E===93?(t.consume(E),x):F(E)}function x(E){return E===62?(t.consume(E),Ue):E===45&&i===2?(t.consume(E),x):F(E)}function Ue(E){return E===null||z(E)?(t.exit("htmlFlowData"),Je(E)):(t.consume(E),Ue)}function Je(E){return t.exit("htmlFlow"),e(E)}}function XT(t,e,r){let n=this;return i;function i(s){return z(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):r(s)}function o(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}function JT(t,e,r){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Ir,e,r)}}var Zc={name:"htmlText",tokenize:QT};function QT(t,e,r){let n=this,i,o,s;return a;function a(x){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(x),u}function u(x){return x===33?(t.consume(x),l):x===47?(t.consume(x),R):x===63?(t.consume(x),k):mt(x)?(t.consume(x),ye):r(x)}function l(x){return x===45?(t.consume(x),c):x===91?(t.consume(x),o=0,m):mt(x)?(t.consume(x),w):r(x)}function c(x){return x===45?(t.consume(x),d):r(x)}function f(x){return x===null?r(x):x===45?(t.consume(x),p):z(x)?(s=f,ee(x)):(t.consume(x),f)}function p(x){return x===45?(t.consume(x),d):f(x)}function d(x){return x===62?ae(x):x===45?p(x):f(x)}function m(x){let Ue="CDATA[";return x===Ue.charCodeAt(o++)?(t.consume(x),o===Ue.length?y:m):r(x)}function y(x){return x===null?r(x):x===93?(t.consume(x),g):z(x)?(s=y,ee(x)):(t.consume(x),y)}function g(x){return x===93?(t.consume(x),b):y(x)}function b(x){return x===62?ae(x):x===93?(t.consume(x),b):y(x)}function w(x){return x===null||x===62?ae(x):z(x)?(s=w,ee(x)):(t.consume(x),w)}function k(x){return x===null?r(x):x===63?(t.consume(x),D):z(x)?(s=k,ee(x)):(t.consume(x),k)}function D(x){return x===62?ae(x):k(x)}function R(x){return mt(x)?(t.consume(x),S):r(x)}function S(x){return x===45||gt(x)?(t.consume(x),S):de(x)}function de(x){return z(x)?(s=de,ee(x)):se(x)?(t.consume(x),de):ae(x)}function ye(x){return x===45||gt(x)?(t.consume(x),ye):x===47||x===62||Ce(x)?be(x):r(x)}function be(x){return x===47?(t.consume(x),ae):x===58||x===95||mt(x)?(t.consume(x),_):z(x)?(s=be,ee(x)):se(x)?(t.consume(x),be):ae(x)}function _(x){return x===45||x===46||x===58||x===95||gt(x)?(t.consume(x),_):L(x)}function L(x){return x===61?(t.consume(x),F):z(x)?(s=L,ee(x)):se(x)?(t.consume(x),L):be(x)}function F(x){return x===null||x===60||x===61||x===62||x===96?r(x):x===34||x===39?(t.consume(x),i=x,I):z(x)?(s=F,ee(x)):se(x)?(t.consume(x),F):(t.consume(x),P)}function I(x){return x===i?(t.consume(x),i=void 0,j):x===null?r(x):z(x)?(s=I,ee(x)):(t.consume(x),I)}function P(x){return x===null||x===34||x===39||x===60||x===61||x===96?r(x):x===47||x===62||Ce(x)?be(x):(t.consume(x),P)}function j(x){return x===47||x===62||Ce(x)?be(x):r(x)}function ae(x){return x===62?(t.consume(x),t.exit("htmlTextData"),t.exit("htmlText"),e):r(x)}function ee(x){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),Se}function Se(x){return se(x)?ie(t,rt,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):rt(x)}function rt(x){return t.enter("htmlTextData"),s(x)}}var wi={name:"labelEnd",resolveAll:n_,resolveTo:i_,tokenize:o_},e_={tokenize:s_},t_={tokenize:a_},r_={tokenize:u_};function n_(t){let e=-1,r=[];for(;++e<t.length;){let n=t[e][1];if(r.push(t[e]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let i=n.type==="labelImage"?4:2;n.type="data",e+=i}}return t.length!==r.length&&it(t,0,t.length,r),t}function i_(t,e){let r=t.length,n=0,i,o,s,a;for(;r--;)if(i=t[r][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(t[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(s=r);let u={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},l={type:"label",start:{...t[o][1].start},end:{...t[s][1].end}},c={type:"labelText",start:{...t[o+n+2][1].end},end:{...t[s-2][1].start}};return a=[["enter",u,e],["enter",l,e]],a=Ft(a,t.slice(o+1,o+n+3)),a=Ft(a,[["enter",c,e]]),a=Ft(a,An(e.parser.constructs.insideSpan.null,t.slice(o+n+4,s-3),e)),a=Ft(a,[["exit",c,e],t[s-2],t[s-1],["exit",l,e]]),a=Ft(a,t.slice(s+1)),a=Ft(a,[["exit",u,e]]),it(t,o,t.length,a),t}function o_(t,e,r){let n=this,i=n.events.length,o,s;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){o=n.events[i][1];break}return a;function a(p){return o?o._inactive?f(p):(s=n.parser.defined.includes(St(n.sliceSerialize({start:o.end,end:n.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(p),t.exit("labelMarker"),t.exit("labelEnd"),u):r(p)}function u(p){return p===40?t.attempt(e_,c,s?c:f)(p):p===91?t.attempt(t_,c,s?l:f)(p):s?c(p):f(p)}function l(p){return t.attempt(r_,c,f)(p)}function c(p){return e(p)}function f(p){return o._balanced=!0,r(p)}}function s_(t,e,r){return n;function n(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return Ce(f)?ki(t,o)(f):o(f)}function o(f){return f===41?c(f):Ga(t,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Ce(f)?ki(t,u)(f):c(f)}function a(f){return r(f)}function u(f){return f===34||f===39||f===40?Ha(t,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return Ce(f)?ki(t,c)(f):c(f)}function c(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):r(f)}}function a_(t,e,r){let n=this;return i;function i(a){return Wa.call(n,t,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return n.parser.defined.includes(St(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?e(a):r(a)}function s(a){return r(a)}}function u_(t,e,r){return n;function n(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):r(o)}}var Xc={name:"labelStartImage",resolveAll:wi.resolveAll,tokenize:l_};function l_(t,e,r){let n=this;return i;function i(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),o}function o(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),s):r(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):e(a)}}var Jc={name:"labelStartLink",resolveAll:wi.resolveAll,tokenize:c_};function c_(t,e,r){let n=this;return i;function i(s){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):e(s)}}var xs={name:"lineEnding",tokenize:f_};function f_(t,e){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),ie(t,e,"linePrefix")}}var Ci={name:"thematicBreak",tokenize:p_};function p_(t,e,r){let n=0,i;return o;function o(l){return t.enter("thematicBreak"),s(l)}function s(l){return i=l,a(l)}function a(l){return l===i?(t.enter("thematicBreakSequence"),u(l)):n>=3&&(l===null||z(l))?(t.exit("thematicBreak"),e(l)):r(l)}function u(l){return l===i?(t.consume(l),n++,u):(t.exit("thematicBreakSequence"),se(l)?ie(t,a,"whitespace")(l):a(l))}}var It={continuation:{tokenize:g_},exit:y_,name:"list",tokenize:m_},d_={partial:!0,tokenize:b_},h_={partial:!0,tokenize:x_};function m_(t,e,r){let n=this,i=n.events[n.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(d){let m=n.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||d===n.containerState.marker:ds(d)){if(n.containerState.type||(n.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(Ci,r,l)(d):l(d);if(!n.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),u(d)}return r(d)}function u(d){return ds(d)&&++s<10?(t.consume(d),u):(!n.interrupt||s<2)&&(n.containerState.marker?d===n.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),l(d)):r(d)}function l(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||d,t.check(Ir,n.interrupt?r:c,t.attempt(d_,p,f))}function c(d){return n.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return se(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),p):r(d)}function p(d){return n.containerState.size=o+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function g_(t,e,r){let n=this;return n.containerState._closeFlow=void 0,t.check(Ir,i,o);function i(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ie(t,e,"listItemIndent",n.containerState.size+1)(a)}function o(a){return n.containerState.furtherBlankLines||!se(a)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(a)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(h_,e,s)(a))}function s(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,ie(t,t.attempt(It,e,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function x_(t,e,r){let n=this;return ie(t,i,"listItemIndent",n.containerState.size+1);function i(o){let s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?e(o):r(o)}}function y_(t){t.exit(this.containerState.type)}function b_(t,e,r){let n=this;return ie(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let s=n.events[n.events.length-1];return!se(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):r(o)}}var Ka={name:"setextUnderline",resolveTo:E_,tokenize:A_};function E_(t,e){let r=t.length,n,i,o;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){n=r;break}t[r][1].type==="paragraph"&&(i=r)}else t[r][1].type==="content"&&t.splice(r,1),!o&&t[r][1].type==="definition"&&(o=r);let s={type:"setextHeading",start:{...t[n][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",s,e]),t.splice(o+1,0,["exit",t[n][1],e]),t[n][1].end={...t[o][1].end}):t[n][1]=s,t.push(["exit",s,e]),t}function A_(t,e,r){let n=this,i;return o;function o(l){let c=n.events.length,f;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){f=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(t.enter("setextHeadingLine"),i=l,s(l)):r(l)}function s(l){return t.enter("setextHeadingLineSequence"),a(l)}function a(l){return l===i?(t.consume(l),a):(t.exit("setextHeadingLineSequence"),se(l)?ie(t,u,"lineSuffix")(l):u(l))}function u(l){return l===null||z(l)?(t.exit("setextHeadingLine"),e(l)):r(l)}}var km={tokenize:k_};function k_(t){let e=this,r=t.attempt(Ir,n,t.attempt(this.parser.constructs.flowInitial,i,ie(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Vc,i)),"linePrefix")));return r;function n(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,r}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,r}}var wm={resolveAll:Sm()},Cm=_m("string"),Tm=_m("text");function _m(t){return{resolveAll:Sm(t==="text"?w_:void 0),tokenize:e};function e(r){let n=this,i=this.parser.constructs[t],o=r.attempt(i,s,a);return s;function s(c){return l(c)?o(c):a(c)}function a(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),u}function u(c){return l(c)?(r.exit("data"),o(c)):(r.consume(c),u)}function l(c){if(c===null)return!0;let f=i[c],p=-1;if(f)for(;++p<f.length;){let d=f[p];if(!d.previous||d.previous.call(n,n.previous))return!0}return!1}}}function Sm(t){return e;function e(r,n){let i=-1,o;for(;++i<=r.length;)o===void 0?r[i]&&r[i][1].type==="data"&&(o=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==o+2&&(r[o][1].end=r[i-1][1].end,r.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(r,n):r}}function w_(t,e){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){let n=t[r-1][1],i=e.sliceStream(n),o=i.length,s=-1,a=0,u;for(;o--;){let l=i[o];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(l===-2)u=!0,a++;else if(l!==-1){o++;break}}if(e._contentTypeTextTrailing&&r===t.length&&(a=0),a){let l={type:r===t.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:n.start._bufferIndex+s,_index:n.start._index+o,line:n.end.line,column:n.end.column-a,offset:n.end.offset-a},end:{...n.end}};n.end={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(t.splice(r,0,["enter",l,e],["exit",l,e]),r+=2)}r++}return t}var Qc={};Od(Qc,{attentionMarkers:()=>D_,contentInitial:()=>T_,disable:()=>R_,document:()=>C_,flow:()=>S_,flowInitial:()=>__,insideSpan:()=>v_,string:()=>I_,text:()=>O_});var C_={42:It,43:It,45:It,48:It,49:It,50:It,51:It,52:It,53:It,54:It,55:It,56:It,57:It,62:ja},T_={91:Gc},__={[-2]:ms,[-1]:ms,32:ms},S_={35:Hc,42:Ci,45:[Ka,Ci],60:Yc,61:Ka,95:Ci,96:$a,126:$a},I_={38:za,92:Ua},O_={[-5]:xs,[-4]:xs,[-3]:xs,33:Xc,38:za,42:hs,60:[$c,Zc],91:Jc,92:[Wc,Ua],93:wi,95:hs,96:qc},v_={null:[hs,wm]},D_={null:[42,95]},R_={null:[]};function Im(t,e,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},i={},o=[],s=[],a=[],u=!0,l={attempt:be(de),check:be(ye),consume:D,enter:R,exit:S,interrupt:be(ye,{interrupt:!0})},c={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:t,previous:null,sliceSerialize:m,sliceStream:y,write:d},f=e.tokenize.call(c,l),p;return e.resolveAll&&o.push(e),c;function d(I){return s=Ft(s,I),w(),s[s.length-1]!==null?[]:(_(e,0),c.events=An(o,c.events,c),c.events)}function m(I,P){return N_(y(I),P)}function y(I){return F_(s,I)}function g(){let{_bufferIndex:I,_index:P,line:j,column:ae,offset:ee}=n;return{_bufferIndex:I,_index:P,line:j,column:ae,offset:ee}}function b(I){i[I.line]=I.column,F()}function w(){let I;for(;n._index<s.length;){let P=s[n._index];if(typeof P=="string")for(I=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===I&&n._bufferIndex<P.length;)k(P.charCodeAt(n._bufferIndex));else k(P)}}function k(I){u=void 0,p=I,f=f(I)}function D(I){z(I)?(n.line++,n.column=1,n.offset+=I===-3?2:1,F()):I!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=I,u=!0}function R(I,P){let j=P||{};return j.type=I,j.start=g(),c.events.push(["enter",j,c]),a.push(j),j}function S(I){let P=a.pop();return P.end=g(),c.events.push(["exit",P,c]),P}function de(I,P){_(I,P.from)}function ye(I,P){P.restore()}function be(I,P){return j;function j(ae,ee,Se){let rt,x,Ue,Je;return Array.isArray(ae)?W(ae):"tokenize"in ae?W([ae]):E(ae);function E(oe){return fe;function fe(me){let we=me!==null&&oe[me],Fe=me!==null&&oe.null,ze=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(Fe)?Fe:Fe?[Fe]:[]];return W(ze)(me)}}function W(oe){return rt=oe,x=0,oe.length===0?Se:Ke(oe[x])}function Ke(oe){return fe;function fe(me){return Je=L(),Ue=oe,oe.partial||(c.currentConstruct=oe),oe.name&&c.parser.constructs.disable.null.includes(oe.name)?he(me):oe.tokenize.call(P?Object.assign(Object.create(c),P):c,l,ne,he)(me)}}function ne(oe){return u=!0,I(Ue,Je),ee}function he(oe){return u=!0,Je.restore(),++x<rt.length?Ke(rt[x]):Se}}}function _(I,P){I.resolveAll&&!o.includes(I)&&o.push(I),I.resolve&&it(c.events,P,c.events.length-P,I.resolve(c.events.slice(P),c)),I.resolveTo&&(c.events=I.resolveTo(c.events,c))}function L(){let I=g(),P=c.previous,j=c.currentConstruct,ae=c.events.length,ee=Array.from(a);return{from:ae,restore:Se};function Se(){n=I,c.previous=P,c.currentConstruct=j,c.events.length=ae,a=ee,F()}}function F(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function F_(t,e){let r=e.start._index,n=e.start._bufferIndex,i=e.end._index,o=e.end._bufferIndex,s;if(r===i)s=[t[r].slice(n,o)];else{if(s=t.slice(r,i),n>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(n):s.shift()}o>0&&s.push(t[i].slice(0,o))}return s}function N_(t,e){let r=-1,n=[],i;for(;++r<t.length;){let o=t[r],s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
67
|
+
${JSON.stringify(t,void 0,2)}`)}var La;async function _r(){return La===void 0&&(lr.warn("getConfig(): config was undefined"),La??=await bi()),La}var Uc;async function Jt(){let{packageFile:t}=await _r();if(t===void 0)throw new Error("No packageFile found or set in config");if(Uc??=await uT({cwd:lm.dirname(t)}),Uc===void 0)throw new Error("No package.json found");return Uc}var pT={};function Jr(t,e){let r=e||pT,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return fm(t,n,i)}function fm(t,e,r){if(dT(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return cm(t.children,e,r)}return Array.isArray(t)?cm(t,e,r):""}function cm(t,e,r){let n=[],i=-1;for(;++i<t.length;)n[i]=fm(t[i],e,r);return n.join("")}function dT(t){return!!(t&&typeof t=="object")}var zc={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
68
|
+
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"};var hT={}.hasOwnProperty;function oo(t){return hT.call(zc,t)?zc[t]:!1}function it(t,e,r,n){let i=t.length,o=0,s;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(e,r),t.splice(...s);else for(r&&t.splice(e,r);o<n.length;)s=n.slice(o,o+1e4),s.unshift(e,0),t.splice(...s),o+=1e4,e+=1e4}function Ft(t,e){return t.length>0?(it(t,t.length,0,e),t):e}var pm={}.hasOwnProperty;function Ma(t){let e={},r=-1;for(;++r<t.length;)mT(e,t[r]);return e}function mT(t,e){let r;for(r in e){let i=(pm.call(t,r)?t[r]:void 0)||(t[r]={}),o=e[r],s;if(o)for(s in o){pm.call(i,s)||(i[s]=[]);let a=o[s];gT(i[s],Array.isArray(a)?a:a?[a]:[])}}}function gT(t,e){let r=-1,n=[];for(;++r<e.length;)(e[r].add==="after"?t:n).push(e[r]);it(t,0,0,n)}function Ba(t,e){let r=Number.parseInt(t,e);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function St(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var mt=En(/[A-Za-z]/),gt=En(/[\dA-Za-z]/),dm=En(/[#-'*+\--9=?A-Z^-~]/);function Ei(t){return t!==null&&(t<32||t===127)}var ds=En(/\d/),hm=En(/[\dA-Fa-f]/),mm=En(/[!-/:-@[-`{-~]/);function z(t){return t!==null&&t<-2}function Ce(t){return t!==null&&(t<0||t===32)}function se(t){return t===-2||t===-1||t===32}var Ai=En(new RegExp("\\p{P}|\\p{S}","u")),Sr=En(/\s/);function En(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function ie(t,e,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(u){return se(u)?(t.enter(r),a(u)):e(u)}function a(u){return se(u)&&o++<i?(t.consume(u),a):(t.exit(r),e(u))}}var gm={tokenize:xT};function xT(t){let e=t.attempt(this.parser.constructs.contentInitial,n,i),r;return e;function n(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),ie(t,e,"linePrefix")}function i(a){return t.enter("paragraph"),o(a)}function o(a){let u=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,s(a)}function s(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return z(a)?(t.consume(a),t.exit("chunkText"),o):(t.consume(a),s)}}var ym={tokenize:yT},xm={tokenize:bT};function yT(t){let e=this,r=[],n=0,i,o,s;return a;function a(k){if(n<r.length){let D=r[n];return e.containerState=D[1],t.attempt(D[0].continuation,u,l)(k)}return l(k)}function u(k){if(n++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&w();let D=e.events.length,R=D,S;for(;R--;)if(e.events[R][0]==="exit"&&e.events[R][1].type==="chunkFlow"){S=e.events[R][1].end;break}b(n);let de=D;for(;de<e.events.length;)e.events[de][1].end={...S},de++;return it(e.events,R+1,0,e.events.slice(D)),e.events.length=de,l(k)}return a(k)}function l(k){if(n===r.length){if(!i)return p(k);if(i.currentConstruct&&i.currentConstruct.concrete)return m(k);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(xm,c,f)(k)}function c(k){return i&&w(),b(n),p(k)}function f(k){return e.parser.lazy[e.now().line]=n!==r.length,s=e.now().offset,m(k)}function p(k){return e.containerState={},t.attempt(xm,d,m)(k)}function d(k){return n++,r.push([e.currentConstruct,e.containerState]),p(k)}function m(k){if(k===null){i&&w(),b(0),t.consume(k);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),y(k)}function y(k){if(k===null){g(t.exit("chunkFlow"),!0),b(0),t.consume(k);return}return z(k)?(t.consume(k),g(t.exit("chunkFlow")),n=0,e.interrupt=void 0,a):(t.consume(k),y)}function g(k,D){let R=e.sliceStream(k);if(D&&R.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(R),e.parser.lazy[k.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;let de=e.events.length,ye=de,be,_;for(;ye--;)if(e.events[ye][0]==="exit"&&e.events[ye][1].type==="chunkFlow"){if(be){_=e.events[ye][1].end;break}be=!0}for(b(n),S=de;S<e.events.length;)e.events[S][1].end={..._},S++;it(e.events,ye+1,0,e.events.slice(de)),e.events.length=S}}function b(k){let D=r.length;for(;D-- >k;){let R=r[D];e.containerState=R[1],R[0].exit.call(e,t)}r.length=k}function w(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function bT(t,e,r){return ie(t,t.attempt(this.parser.constructs.document,e,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qr(t){if(t===null||Ce(t)||Sr(t))return 1;if(Ai(t))return 2}function An(t,e,r){let n=[],i=-1;for(;++i<t.length;){let o=t[i].resolveAll;o&&!n.includes(o)&&(e=o(e,r),n.push(o))}return e}var hs={name:"attention",resolveAll:ET,tokenize:AT};function ET(t,e){let r=-1,n,i,o,s,a,u,l,c;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(n=r;n--;)if(t[n][0]==="exit"&&t[n][1].type==="attentionSequence"&&t[n][1]._open&&e.sliceSerialize(t[n][1]).charCodeAt(0)===e.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[n][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[n][1].end.offset-t[n][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;u=t[n][1].end.offset-t[n][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;let f={...t[n][1].end},p={...t[r][1].start};bm(f,-u),bm(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...t[n][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...t[n][1].end},end:{...t[r][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},t[n][1].end={...s.start},t[r][1].start={...a.end},l=[],t[n][1].end.offset-t[n][1].start.offset&&(l=Ft(l,[["enter",t[n][1],e],["exit",t[n][1],e]])),l=Ft(l,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",o,e]]),l=Ft(l,An(e.parser.constructs.insideSpan.null,t.slice(n+1,r),e)),l=Ft(l,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",i,e]]),t[r][1].end.offset-t[r][1].start.offset?(c=2,l=Ft(l,[["enter",t[r][1],e],["exit",t[r][1],e]])):c=0,it(t,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function AT(t,e){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Qr(n),o;return s;function s(u){return o=u,t.enter("attentionSequence"),a(u)}function a(u){if(u===o)return t.consume(u),a;let l=t.exit("attentionSequence"),c=Qr(u),f=!c||c===2&&i||r.includes(u),p=!i||i===2&&c||r.includes(n);return l._open=!!(o===42?f:f&&(i||!p)),l._close=!!(o===42?p:p&&(c||!f)),e(u)}}function bm(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var $c={name:"autolink",tokenize:kT};function kT(t,e,r){let n=0;return i;function i(d){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(d){return mt(d)?(t.consume(d),s):d===64?r(d):l(d)}function s(d){return d===43||d===45||d===46||gt(d)?(n=1,a(d)):l(d)}function a(d){return d===58?(t.consume(d),n=0,u):(d===43||d===45||d===46||gt(d))&&n++<32?(t.consume(d),a):(n=0,l(d))}function u(d){return d===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):d===null||d===32||d===60||Ei(d)?r(d):(t.consume(d),u)}function l(d){return d===64?(t.consume(d),c):dm(d)?(t.consume(d),l):r(d)}function c(d){return gt(d)?f(d):r(d)}function f(d){return d===46?(t.consume(d),n=0,c):d===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):p(d)}function p(d){if((d===45||gt(d))&&n++<63){let m=d===45?p:f;return t.consume(d),m}return r(d)}}var Ir={partial:!0,tokenize:wT};function wT(t,e,r){return n;function n(o){return se(o)?ie(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||z(o)?e(o):r(o)}}var ja={continuation:{tokenize:TT},exit:_T,name:"blockQuote",tokenize:CT};function CT(t,e,r){let n=this;return i;function i(s){if(s===62){let a=n.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(s),t.exit("blockQuoteMarker"),o}return r(s)}function o(s){return se(s)?(t.enter("blockQuotePrefixWhitespace"),t.consume(s),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(s))}}function TT(t,e,r){let n=this;return i;function i(s){return se(s)?ie(t,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return t.attempt(ja,e,r)(s)}}function _T(t){t.exit("blockQuote")}var Ua={name:"characterEscape",tokenize:ST};function ST(t,e,r){return n;function n(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return mm(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(o)}}var za={name:"characterReference",tokenize:IT};function IT(t,e,r){let n=this,i=0,o,s;return a;function a(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),u}function u(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),l):(t.enter("characterReferenceValue"),o=31,s=gt,c(f))}function l(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,s=hm,c):(t.enter("characterReferenceValue"),o=7,s=ds,c(f))}function c(f){if(f===59&&i){let p=t.exit("characterReferenceValue");return s===gt&&!oo(n.sliceSerialize(p))?r(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return s(f)&&i++<o?(t.consume(f),c):r(f)}}var Em={partial:!0,tokenize:vT},$a={concrete:!0,name:"codeFenced",tokenize:OT};function OT(t,e,r){let n=this,i={partial:!0,tokenize:R},o=0,s=0,a;return u;function u(S){return l(S)}function l(S){let de=n.events[n.events.length-1];return o=de&&de[1].type==="linePrefix"?de[2].sliceSerialize(de[1],!0).length:0,a=S,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===a?(s++,t.consume(S),c):s<3?r(S):(t.exit("codeFencedFenceSequence"),se(S)?ie(t,f,"whitespace")(S):f(S))}function f(S){return S===null||z(S)?(t.exit("codeFencedFence"),n.interrupt?e(S):t.check(Em,y,D)(S)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||z(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(S)):se(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),ie(t,d,"whitespace")(S)):S===96&&S===a?r(S):(t.consume(S),p)}function d(S){return S===null||z(S)?f(S):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||z(S)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(S)):S===96&&S===a?r(S):(t.consume(S),m)}function y(S){return t.attempt(i,D,g)(S)}function g(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),b}function b(S){return o>0&&se(S)?ie(t,w,"linePrefix",o+1)(S):w(S)}function w(S){return S===null||z(S)?t.check(Em,y,D)(S):(t.enter("codeFlowValue"),k(S))}function k(S){return S===null||z(S)?(t.exit("codeFlowValue"),w(S)):(t.consume(S),k)}function D(S){return t.exit("codeFenced"),e(S)}function R(S,de,ye){let be=0;return _;function _(j){return S.enter("lineEnding"),S.consume(j),S.exit("lineEnding"),L}function L(j){return S.enter("codeFencedFence"),se(j)?ie(S,F,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):F(j)}function F(j){return j===a?(S.enter("codeFencedFenceSequence"),I(j)):ye(j)}function I(j){return j===a?(be++,S.consume(j),I):be>=s?(S.exit("codeFencedFenceSequence"),se(j)?ie(S,P,"whitespace")(j):P(j)):ye(j)}function P(j){return j===null||z(j)?(S.exit("codeFencedFence"),de(j)):ye(j)}}}function vT(t,e,r){let n=this;return i;function i(s){return s===null?r(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}var ms={name:"codeIndented",tokenize:RT},DT={partial:!0,tokenize:FT};function RT(t,e,r){let n=this;return i;function i(l){return t.enter("codeIndented"),ie(t,o,"linePrefix",5)(l)}function o(l){let c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(l):r(l)}function s(l){return l===null?u(l):z(l)?t.attempt(DT,s,u)(l):(t.enter("codeFlowValue"),a(l))}function a(l){return l===null||z(l)?(t.exit("codeFlowValue"),s(l)):(t.consume(l),a)}function u(l){return t.exit("codeIndented"),e(l)}}function FT(t,e,r){let n=this;return i;function i(s){return n.parser.lazy[n.now().line]?r(s):z(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i):ie(t,o,"linePrefix",5)(s)}function o(s){let a=n.events[n.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):z(s)?i(s):r(s)}}var qc={name:"codeText",previous:PT,resolve:NT,tokenize:LT};function NT(t){let e=t.length-4,r=3,n,i;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=r;++n<e;)if(t[n][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[e][1].type="codeTextPadding",r+=2,e-=2;break}}for(n=r-1,e++;++n<=e;)i===void 0?n!==e&&t[n][1].type!=="lineEnding"&&(i=n):(n===e||t[n][1].type==="lineEnding")&&(t[i][1].type="codeTextData",n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),e-=n-i-2,n=i+2),i=void 0);return t}function PT(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function LT(t,e,r){let n=this,i=0,o,s;return a;function a(p){return t.enter("codeText"),t.enter("codeTextSequence"),u(p)}function u(p){return p===96?(t.consume(p),i++,u):(t.exit("codeTextSequence"),l(p))}function l(p){return p===null?r(p):p===32?(t.enter("space"),t.consume(p),t.exit("space"),l):p===96?(s=t.enter("codeTextSequence"),o=0,f(p)):z(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||z(p)?(t.exit("codeTextData"),l(p)):(t.consume(p),c)}function f(p){return p===96?(t.consume(p),o++,f):o===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(p)):(s.type="codeTextData",c(p))}}var qa=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,r){let n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,r,n){let i=r||0;this.setCursor(Math.trunc(e));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&gs(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),gs(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),gs(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let r=this.left.splice(e,Number.POSITIVE_INFINITY);gs(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);gs(this.left,r.reverse())}}};function gs(t,e){let r=0;if(e.length<1e4)t.push(...e);else for(;r<e.length;)t.push(...e.slice(r,r+1e4)),r+=1e4}function Va(t){let e={},r=-1,n,i,o,s,a,u,l,c=new qa(t);for(;++r<c.length;){for(;r in e;)r=e[r];if(n=c.get(r),r&&n[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(u=n[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(e,MT(c,r)),r=e[r],l=!0);else if(n[1]._container){for(o=r,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(n[1].end={...c.get(i)[1].start},a=c.slice(i,r),a.unshift(n),c.splice(i,r-i+1,a))}}return it(t,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function MT(t,e){let r=t.get(e)[1],n=t.get(e)[2],i=e-1,o=[],s=r._tokenizer;s||(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let a=s.events,u=[],l={},c,f,p=-1,d=r,m=0,y=0,g=[y];for(;d;){for(;t.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=n.sliceStream(d),d.next||c.push(null),f&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=r;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(y=p+1,g.push(y),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),p=g.length;p--;){let b=a.slice(g[p],g[p+1]),w=o.pop();u.push([w,w+b.length-1]),t.splice(w,2,b)}for(u.reverse(),p=-1;++p<u.length;)l[m+u[p][0]]=m+u[p][1],m+=u[p][1]-u[p][0]-1;return l}var Vc={resolve:jT,tokenize:UT},BT={partial:!0,tokenize:zT};function jT(t){return Va(t),t}function UT(t,e){let r;return n;function n(a){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):z(a)?t.check(BT,s,o)(a):(t.consume(a),i)}function o(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function s(a){return t.consume(a),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function zT(t,e,r){let n=this;return i;function i(s){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),ie(t,o,"linePrefix")}function o(s){if(s===null||z(s))return r(s);let a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):t.interrupt(n.parser.constructs.flow,r,e)(s)}}function Ga(t,e,r,n,i,o,s,a,u){let l=u||Number.POSITIVE_INFINITY,c=0;return f;function f(b){return b===60?(t.enter(n),t.enter(i),t.enter(o),t.consume(b),t.exit(o),p):b===null||b===32||b===41||Ei(b)?r(b):(t.enter(n),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),y(b))}function p(b){return b===62?(t.enter(o),t.consume(b),t.exit(o),t.exit(i),t.exit(n),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===62?(t.exit("chunkString"),t.exit(a),p(b)):b===null||b===60||z(b)?r(b):(t.consume(b),b===92?m:d)}function m(b){return b===60||b===62||b===92?(t.consume(b),d):d(b)}function y(b){return!c&&(b===null||b===41||Ce(b))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(n),e(b)):c<l&&b===40?(t.consume(b),c++,y):b===41?(t.consume(b),c--,y):b===null||b===32||b===40||Ei(b)?r(b):(t.consume(b),b===92?g:y)}function g(b){return b===40||b===41||b===92?(t.consume(b),y):y(b)}}function Wa(t,e,r,n,i,o){let s=this,a=0,u;return l;function l(d){return t.enter(n),t.enter(i),t.consume(d),t.exit(i),t.enter(o),c}function c(d){return a>999||d===null||d===91||d===93&&!u||d===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?r(d):d===93?(t.exit(o),t.enter(i),t.consume(d),t.exit(i),t.exit(n),e):z(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||z(d)||a++>999?(t.exit("chunkString"),c(d)):(t.consume(d),u||(u=!se(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(t.consume(d),a++,f):f(d)}}function Ha(t,e,r,n,i,o){let s;return a;function a(p){return p===34||p===39||p===40?(t.enter(n),t.enter(i),t.consume(p),t.exit(i),s=p===40?41:p,u):r(p)}function u(p){return p===s?(t.enter(i),t.consume(p),t.exit(i),t.exit(n),e):(t.enter(o),l(p))}function l(p){return p===s?(t.exit(o),u(s)):p===null?r(p):z(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),ie(t,l,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||z(p)?(t.exit("chunkString"),l(p)):(t.consume(p),p===92?f:c)}function f(p){return p===s||p===92?(t.consume(p),c):c(p)}}function ki(t,e){let r;return n;function n(i){return z(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),r=!0,n):se(i)?ie(t,n,r?"linePrefix":"lineSuffix")(i):e(i)}}var Gc={name:"definition",tokenize:qT},$T={partial:!0,tokenize:VT};function qT(t,e,r){let n=this,i;return o;function o(d){return t.enter("definition"),s(d)}function s(d){return Wa.call(n,t,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function a(d){return i=St(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),u):r(d)}function u(d){return Ce(d)?ki(t,l)(d):l(d)}function l(d){return Ga(t,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return t.attempt($T,f,f)(d)}function f(d){return se(d)?ie(t,p,"whitespace")(d):p(d)}function p(d){return d===null||z(d)?(t.exit("definition"),n.parser.defined.push(i),e(d)):r(d)}}function VT(t,e,r){return n;function n(a){return Ce(a)?ki(t,i)(a):r(a)}function i(a){return Ha(t,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return se(a)?ie(t,s,"whitespace")(a):s(a)}function s(a){return a===null||z(a)?e(a):r(a)}}var Wc={name:"hardBreakEscape",tokenize:GT};function GT(t,e,r){return n;function n(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return z(o)?(t.exit("hardBreakEscape"),e(o)):r(o)}}var Hc={name:"headingAtx",resolve:WT,tokenize:HT};function WT(t,e){let r=t.length-2,n=3,i,o;return t[n][1].type==="whitespace"&&(n+=2),r-2>n&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&t[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[r][1].end},o={type:"chunkText",start:t[n][1].start,end:t[r][1].end,contentType:"text"},it(t,n,r-n+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function HT(t,e,r){let n=0;return i;function i(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&n++<6?(t.consume(c),s):c===null||Ce(c)?(t.exit("atxHeadingSequence"),a(c)):r(c)}function a(c){return c===35?(t.enter("atxHeadingSequence"),u(c)):c===null||z(c)?(t.exit("atxHeading"),e(c)):se(c)?ie(t,a,"whitespace")(c):(t.enter("atxHeadingText"),l(c))}function u(c){return c===35?(t.consume(c),u):(t.exit("atxHeadingSequence"),a(c))}function l(c){return c===null||c===35||Ce(c)?(t.exit("atxHeadingText"),a(c)):(t.consume(c),l)}}var Am=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Kc=["pre","script","style","textarea"];var Yc={concrete:!0,name:"htmlFlow",resolveTo:ZT,tokenize:XT},KT={partial:!0,tokenize:QT},YT={partial:!0,tokenize:JT};function ZT(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function XT(t,e,r){let n=this,i,o,s,a,u;return l;function l(E){return c(E)}function c(E){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(E),f}function f(E){return E===33?(t.consume(E),p):E===47?(t.consume(E),o=!0,y):E===63?(t.consume(E),i=3,n.interrupt?e:x):mt(E)?(t.consume(E),s=String.fromCharCode(E),g):r(E)}function p(E){return E===45?(t.consume(E),i=2,d):E===91?(t.consume(E),i=5,a=0,m):mt(E)?(t.consume(E),i=4,n.interrupt?e:x):r(E)}function d(E){return E===45?(t.consume(E),n.interrupt?e:x):r(E)}function m(E){let W="CDATA[";return E===W.charCodeAt(a++)?(t.consume(E),a===W.length?n.interrupt?e:F:m):r(E)}function y(E){return mt(E)?(t.consume(E),s=String.fromCharCode(E),g):r(E)}function g(E){if(E===null||E===47||E===62||Ce(E)){let W=E===47,Ke=s.toLowerCase();return!W&&!o&&Kc.includes(Ke)?(i=1,n.interrupt?e(E):F(E)):Am.includes(s.toLowerCase())?(i=6,W?(t.consume(E),b):n.interrupt?e(E):F(E)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(E):o?w(E):k(E))}return E===45||gt(E)?(t.consume(E),s+=String.fromCharCode(E),g):r(E)}function b(E){return E===62?(t.consume(E),n.interrupt?e:F):r(E)}function w(E){return se(E)?(t.consume(E),w):_(E)}function k(E){return E===47?(t.consume(E),_):E===58||E===95||mt(E)?(t.consume(E),D):se(E)?(t.consume(E),k):_(E)}function D(E){return E===45||E===46||E===58||E===95||gt(E)?(t.consume(E),D):R(E)}function R(E){return E===61?(t.consume(E),S):se(E)?(t.consume(E),R):k(E)}function S(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(t.consume(E),u=E,de):se(E)?(t.consume(E),S):ye(E)}function de(E){return E===u?(t.consume(E),u=null,be):E===null||z(E)?r(E):(t.consume(E),de)}function ye(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||Ce(E)?R(E):(t.consume(E),ye)}function be(E){return E===47||E===62||se(E)?k(E):r(E)}function _(E){return E===62?(t.consume(E),L):r(E)}function L(E){return E===null||z(E)?F(E):se(E)?(t.consume(E),L):r(E)}function F(E){return E===45&&i===2?(t.consume(E),ae):E===60&&i===1?(t.consume(E),ee):E===62&&i===4?(t.consume(E),Ue):E===63&&i===3?(t.consume(E),x):E===93&&i===5?(t.consume(E),rt):z(E)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(KT,Je,I)(E)):E===null||z(E)?(t.exit("htmlFlowData"),I(E)):(t.consume(E),F)}function I(E){return t.check(YT,P,Je)(E)}function P(E){return t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),j}function j(E){return E===null||z(E)?I(E):(t.enter("htmlFlowData"),F(E))}function ae(E){return E===45?(t.consume(E),x):F(E)}function ee(E){return E===47?(t.consume(E),s="",Se):F(E)}function Se(E){if(E===62){let W=s.toLowerCase();return Kc.includes(W)?(t.consume(E),Ue):F(E)}return mt(E)&&s.length<8?(t.consume(E),s+=String.fromCharCode(E),Se):F(E)}function rt(E){return E===93?(t.consume(E),x):F(E)}function x(E){return E===62?(t.consume(E),Ue):E===45&&i===2?(t.consume(E),x):F(E)}function Ue(E){return E===null||z(E)?(t.exit("htmlFlowData"),Je(E)):(t.consume(E),Ue)}function Je(E){return t.exit("htmlFlow"),e(E)}}function JT(t,e,r){let n=this;return i;function i(s){return z(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):r(s)}function o(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}function QT(t,e,r){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Ir,e,r)}}var Zc={name:"htmlText",tokenize:e_};function e_(t,e,r){let n=this,i,o,s;return a;function a(x){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(x),u}function u(x){return x===33?(t.consume(x),l):x===47?(t.consume(x),R):x===63?(t.consume(x),k):mt(x)?(t.consume(x),ye):r(x)}function l(x){return x===45?(t.consume(x),c):x===91?(t.consume(x),o=0,m):mt(x)?(t.consume(x),w):r(x)}function c(x){return x===45?(t.consume(x),d):r(x)}function f(x){return x===null?r(x):x===45?(t.consume(x),p):z(x)?(s=f,ee(x)):(t.consume(x),f)}function p(x){return x===45?(t.consume(x),d):f(x)}function d(x){return x===62?ae(x):x===45?p(x):f(x)}function m(x){let Ue="CDATA[";return x===Ue.charCodeAt(o++)?(t.consume(x),o===Ue.length?y:m):r(x)}function y(x){return x===null?r(x):x===93?(t.consume(x),g):z(x)?(s=y,ee(x)):(t.consume(x),y)}function g(x){return x===93?(t.consume(x),b):y(x)}function b(x){return x===62?ae(x):x===93?(t.consume(x),b):y(x)}function w(x){return x===null||x===62?ae(x):z(x)?(s=w,ee(x)):(t.consume(x),w)}function k(x){return x===null?r(x):x===63?(t.consume(x),D):z(x)?(s=k,ee(x)):(t.consume(x),k)}function D(x){return x===62?ae(x):k(x)}function R(x){return mt(x)?(t.consume(x),S):r(x)}function S(x){return x===45||gt(x)?(t.consume(x),S):de(x)}function de(x){return z(x)?(s=de,ee(x)):se(x)?(t.consume(x),de):ae(x)}function ye(x){return x===45||gt(x)?(t.consume(x),ye):x===47||x===62||Ce(x)?be(x):r(x)}function be(x){return x===47?(t.consume(x),ae):x===58||x===95||mt(x)?(t.consume(x),_):z(x)?(s=be,ee(x)):se(x)?(t.consume(x),be):ae(x)}function _(x){return x===45||x===46||x===58||x===95||gt(x)?(t.consume(x),_):L(x)}function L(x){return x===61?(t.consume(x),F):z(x)?(s=L,ee(x)):se(x)?(t.consume(x),L):be(x)}function F(x){return x===null||x===60||x===61||x===62||x===96?r(x):x===34||x===39?(t.consume(x),i=x,I):z(x)?(s=F,ee(x)):se(x)?(t.consume(x),F):(t.consume(x),P)}function I(x){return x===i?(t.consume(x),i=void 0,j):x===null?r(x):z(x)?(s=I,ee(x)):(t.consume(x),I)}function P(x){return x===null||x===34||x===39||x===60||x===61||x===96?r(x):x===47||x===62||Ce(x)?be(x):(t.consume(x),P)}function j(x){return x===47||x===62||Ce(x)?be(x):r(x)}function ae(x){return x===62?(t.consume(x),t.exit("htmlTextData"),t.exit("htmlText"),e):r(x)}function ee(x){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),Se}function Se(x){return se(x)?ie(t,rt,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):rt(x)}function rt(x){return t.enter("htmlTextData"),s(x)}}var wi={name:"labelEnd",resolveAll:i_,resolveTo:o_,tokenize:s_},t_={tokenize:a_},r_={tokenize:u_},n_={tokenize:l_};function i_(t){let e=-1,r=[];for(;++e<t.length;){let n=t[e][1];if(r.push(t[e]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let i=n.type==="labelImage"?4:2;n.type="data",e+=i}}return t.length!==r.length&&it(t,0,t.length,r),t}function o_(t,e){let r=t.length,n=0,i,o,s,a;for(;r--;)if(i=t[r][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(t[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(s=r);let u={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},l={type:"label",start:{...t[o][1].start},end:{...t[s][1].end}},c={type:"labelText",start:{...t[o+n+2][1].end},end:{...t[s-2][1].start}};return a=[["enter",u,e],["enter",l,e]],a=Ft(a,t.slice(o+1,o+n+3)),a=Ft(a,[["enter",c,e]]),a=Ft(a,An(e.parser.constructs.insideSpan.null,t.slice(o+n+4,s-3),e)),a=Ft(a,[["exit",c,e],t[s-2],t[s-1],["exit",l,e]]),a=Ft(a,t.slice(s+1)),a=Ft(a,[["exit",u,e]]),it(t,o,t.length,a),t}function s_(t,e,r){let n=this,i=n.events.length,o,s;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){o=n.events[i][1];break}return a;function a(p){return o?o._inactive?f(p):(s=n.parser.defined.includes(St(n.sliceSerialize({start:o.end,end:n.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(p),t.exit("labelMarker"),t.exit("labelEnd"),u):r(p)}function u(p){return p===40?t.attempt(t_,c,s?c:f)(p):p===91?t.attempt(r_,c,s?l:f)(p):s?c(p):f(p)}function l(p){return t.attempt(n_,c,f)(p)}function c(p){return e(p)}function f(p){return o._balanced=!0,r(p)}}function a_(t,e,r){return n;function n(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return Ce(f)?ki(t,o)(f):o(f)}function o(f){return f===41?c(f):Ga(t,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Ce(f)?ki(t,u)(f):c(f)}function a(f){return r(f)}function u(f){return f===34||f===39||f===40?Ha(t,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return Ce(f)?ki(t,c)(f):c(f)}function c(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):r(f)}}function u_(t,e,r){let n=this;return i;function i(a){return Wa.call(n,t,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return n.parser.defined.includes(St(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?e(a):r(a)}function s(a){return r(a)}}function l_(t,e,r){return n;function n(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):r(o)}}var Xc={name:"labelStartImage",resolveAll:wi.resolveAll,tokenize:c_};function c_(t,e,r){let n=this;return i;function i(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),o}function o(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),s):r(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):e(a)}}var Jc={name:"labelStartLink",resolveAll:wi.resolveAll,tokenize:f_};function f_(t,e,r){let n=this;return i;function i(s){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):e(s)}}var xs={name:"lineEnding",tokenize:p_};function p_(t,e){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),ie(t,e,"linePrefix")}}var Ci={name:"thematicBreak",tokenize:d_};function d_(t,e,r){let n=0,i;return o;function o(l){return t.enter("thematicBreak"),s(l)}function s(l){return i=l,a(l)}function a(l){return l===i?(t.enter("thematicBreakSequence"),u(l)):n>=3&&(l===null||z(l))?(t.exit("thematicBreak"),e(l)):r(l)}function u(l){return l===i?(t.consume(l),n++,u):(t.exit("thematicBreakSequence"),se(l)?ie(t,a,"whitespace")(l):a(l))}}var It={continuation:{tokenize:x_},exit:b_,name:"list",tokenize:g_},h_={partial:!0,tokenize:E_},m_={partial:!0,tokenize:y_};function g_(t,e,r){let n=this,i=n.events[n.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(d){let m=n.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||d===n.containerState.marker:ds(d)){if(n.containerState.type||(n.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(Ci,r,l)(d):l(d);if(!n.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),u(d)}return r(d)}function u(d){return ds(d)&&++s<10?(t.consume(d),u):(!n.interrupt||s<2)&&(n.containerState.marker?d===n.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),l(d)):r(d)}function l(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||d,t.check(Ir,n.interrupt?r:c,t.attempt(h_,p,f))}function c(d){return n.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return se(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),p):r(d)}function p(d){return n.containerState.size=o+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function x_(t,e,r){let n=this;return n.containerState._closeFlow=void 0,t.check(Ir,i,o);function i(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ie(t,e,"listItemIndent",n.containerState.size+1)(a)}function o(a){return n.containerState.furtherBlankLines||!se(a)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(a)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(m_,e,s)(a))}function s(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,ie(t,t.attempt(It,e,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function y_(t,e,r){let n=this;return ie(t,i,"listItemIndent",n.containerState.size+1);function i(o){let s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?e(o):r(o)}}function b_(t){t.exit(this.containerState.type)}function E_(t,e,r){let n=this;return ie(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let s=n.events[n.events.length-1];return!se(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):r(o)}}var Ka={name:"setextUnderline",resolveTo:A_,tokenize:k_};function A_(t,e){let r=t.length,n,i,o;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){n=r;break}t[r][1].type==="paragraph"&&(i=r)}else t[r][1].type==="content"&&t.splice(r,1),!o&&t[r][1].type==="definition"&&(o=r);let s={type:"setextHeading",start:{...t[n][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",s,e]),t.splice(o+1,0,["exit",t[n][1],e]),t[n][1].end={...t[o][1].end}):t[n][1]=s,t.push(["exit",s,e]),t}function k_(t,e,r){let n=this,i;return o;function o(l){let c=n.events.length,f;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){f=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(t.enter("setextHeadingLine"),i=l,s(l)):r(l)}function s(l){return t.enter("setextHeadingLineSequence"),a(l)}function a(l){return l===i?(t.consume(l),a):(t.exit("setextHeadingLineSequence"),se(l)?ie(t,u,"lineSuffix")(l):u(l))}function u(l){return l===null||z(l)?(t.exit("setextHeadingLine"),e(l)):r(l)}}var km={tokenize:w_};function w_(t){let e=this,r=t.attempt(Ir,n,t.attempt(this.parser.constructs.flowInitial,i,ie(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Vc,i)),"linePrefix")));return r;function n(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,r}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,r}}var wm={resolveAll:Sm()},Cm=_m("string"),Tm=_m("text");function _m(t){return{resolveAll:Sm(t==="text"?C_:void 0),tokenize:e};function e(r){let n=this,i=this.parser.constructs[t],o=r.attempt(i,s,a);return s;function s(c){return l(c)?o(c):a(c)}function a(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),u}function u(c){return l(c)?(r.exit("data"),o(c)):(r.consume(c),u)}function l(c){if(c===null)return!0;let f=i[c],p=-1;if(f)for(;++p<f.length;){let d=f[p];if(!d.previous||d.previous.call(n,n.previous))return!0}return!1}}}function Sm(t){return e;function e(r,n){let i=-1,o;for(;++i<=r.length;)o===void 0?r[i]&&r[i][1].type==="data"&&(o=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==o+2&&(r[o][1].end=r[i-1][1].end,r.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(r,n):r}}function C_(t,e){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){let n=t[r-1][1],i=e.sliceStream(n),o=i.length,s=-1,a=0,u;for(;o--;){let l=i[o];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(l===-2)u=!0,a++;else if(l!==-1){o++;break}}if(e._contentTypeTextTrailing&&r===t.length&&(a=0),a){let l={type:r===t.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:n.start._bufferIndex+s,_index:n.start._index+o,line:n.end.line,column:n.end.column-a,offset:n.end.offset-a},end:{...n.end}};n.end={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(t.splice(r,0,["enter",l,e],["exit",l,e]),r+=2)}r++}return t}var Qc={};Od(Qc,{attentionMarkers:()=>R_,contentInitial:()=>__,disable:()=>F_,document:()=>T_,flow:()=>I_,flowInitial:()=>S_,insideSpan:()=>D_,string:()=>O_,text:()=>v_});var T_={42:It,43:It,45:It,48:It,49:It,50:It,51:It,52:It,53:It,54:It,55:It,56:It,57:It,62:ja},__={91:Gc},S_={[-2]:ms,[-1]:ms,32:ms},I_={35:Hc,42:Ci,45:[Ka,Ci],60:Yc,61:Ka,95:Ci,96:$a,126:$a},O_={38:za,92:Ua},v_={[-5]:xs,[-4]:xs,[-3]:xs,33:Xc,38:za,42:hs,60:[$c,Zc],91:Jc,92:[Wc,Ua],93:wi,95:hs,96:qc},D_={null:[hs,wm]},R_={null:[42,95]},F_={null:[]};function Im(t,e,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},i={},o=[],s=[],a=[],u=!0,l={attempt:be(de),check:be(ye),consume:D,enter:R,exit:S,interrupt:be(ye,{interrupt:!0})},c={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:t,previous:null,sliceSerialize:m,sliceStream:y,write:d},f=e.tokenize.call(c,l),p;return e.resolveAll&&o.push(e),c;function d(I){return s=Ft(s,I),w(),s[s.length-1]!==null?[]:(_(e,0),c.events=An(o,c.events,c),c.events)}function m(I,P){return P_(y(I),P)}function y(I){return N_(s,I)}function g(){let{_bufferIndex:I,_index:P,line:j,column:ae,offset:ee}=n;return{_bufferIndex:I,_index:P,line:j,column:ae,offset:ee}}function b(I){i[I.line]=I.column,F()}function w(){let I;for(;n._index<s.length;){let P=s[n._index];if(typeof P=="string")for(I=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===I&&n._bufferIndex<P.length;)k(P.charCodeAt(n._bufferIndex));else k(P)}}function k(I){u=void 0,p=I,f=f(I)}function D(I){z(I)?(n.line++,n.column=1,n.offset+=I===-3?2:1,F()):I!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=I,u=!0}function R(I,P){let j=P||{};return j.type=I,j.start=g(),c.events.push(["enter",j,c]),a.push(j),j}function S(I){let P=a.pop();return P.end=g(),c.events.push(["exit",P,c]),P}function de(I,P){_(I,P.from)}function ye(I,P){P.restore()}function be(I,P){return j;function j(ae,ee,Se){let rt,x,Ue,Je;return Array.isArray(ae)?W(ae):"tokenize"in ae?W([ae]):E(ae);function E(oe){return fe;function fe(me){let we=me!==null&&oe[me],Fe=me!==null&&oe.null,ze=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(Fe)?Fe:Fe?[Fe]:[]];return W(ze)(me)}}function W(oe){return rt=oe,x=0,oe.length===0?Se:Ke(oe[x])}function Ke(oe){return fe;function fe(me){return Je=L(),Ue=oe,oe.partial||(c.currentConstruct=oe),oe.name&&c.parser.constructs.disable.null.includes(oe.name)?he(me):oe.tokenize.call(P?Object.assign(Object.create(c),P):c,l,ne,he)(me)}}function ne(oe){return u=!0,I(Ue,Je),ee}function he(oe){return u=!0,Je.restore(),++x<rt.length?Ke(rt[x]):Se}}}function _(I,P){I.resolveAll&&!o.includes(I)&&o.push(I),I.resolve&&it(c.events,P,c.events.length-P,I.resolve(c.events.slice(P),c)),I.resolveTo&&(c.events=I.resolveTo(c.events,c))}function L(){let I=g(),P=c.previous,j=c.currentConstruct,ae=c.events.length,ee=Array.from(a);return{from:ae,restore:Se};function Se(){n=I,c.previous=P,c.currentConstruct=j,c.events.length=ae,a=ee,F()}}function F(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function N_(t,e){let r=e.start._index,n=e.start._bufferIndex,i=e.end._index,o=e.end._bufferIndex,s;if(r===i)s=[t[r].slice(n,o)];else{if(s=t.slice(r,i),n>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(n):s.shift()}o>0&&s.push(t[i].slice(0,o))}return s}function P_(t,e){let r=-1,n=[],i;for(;++r<t.length;){let o=t[r],s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
69
69
|
`;break}case-3:{s=`\r
|
|
70
|
-
`;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,n.push(s)}return n.join("")}function ef(t){let n={constructs:Ma([Qc,...(t||{}).extensions||[]]),content:i(gm),defined:[],document:i(ym),flow:i(km),lazy:{},string:i(Cm),text:i(Tm)};return n;function i(o){return s;function s(a){return Im(n,o,a)}}}function tf(t){for(;!Va(t););return t}var Om=/[\0\t\n\r]/g;function rf(){let t=1,e="",r=!0,n;return i;function i(o,s,a){let u=[],l,c,f,p,d;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",r&&(o.charCodeAt(0)===65279&&f++,r=void 0);f<o.length;){if(Om.lastIndex=f,l=Om.exec(o),p=l&&l.index!==void 0?l.index:o.length,d=o.charCodeAt(p),!l){e=o.slice(f);break}if(d===10&&f===p&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),f<p&&(u.push(o.slice(f,p)),t+=p-f),d){case 0:{u.push(65533),t++;break}case 9:{for(c=Math.ceil(t/4)*4,u.push(-2);t++<c;)u.push(-1);break}case 10:{u.push(-4),t=1;break}default:n=!0,t=1}f=p+1}return a&&(n&&u.push(-5),e&&u.push(e),u.push(null)),u}}var P_=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ya(t){return t.replace(P_,L_)}function L_(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),o=i===120||i===88;return Ba(r.slice(o?2:1),o?16:10)}return oo(r)||t}function so(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?vm(t.position):"start"in t||"end"in t?vm(t):"line"in t||"column"in t?nf(t):""}function nf(t){return Dm(t&&t.line)+":"+Dm(t&&t.column)}function vm(t){return nf(t&&t.start)+"-"+nf(t&&t.end)}function Dm(t){return t&&typeof t=="number"?t:1}var Fm={}.hasOwnProperty;function of(t,e,r){return typeof e!="string"&&(r=e,e=void 0),M_(r)(tf(ef(r).document().write(rf()(t,e,!0))))}function M_(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(T),autolinkProtocol:be,autolinkEmail:be,atxHeading:o(A),blockQuote:o(me),characterEscape:be,characterReference:be,codeFenced:o(we),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(we,s),codeText:o(Fe,s),codeTextData:be,data:be,codeFlowValue:be,definition:o(ze),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Ut),hardBreakEscape:o(C),hardBreakTrailing:o(C),htmlFlow:o(M,s),htmlFlowData:be,htmlText:o(M,s),htmlTextData:be,image:o(O),label:s,link:o(T),listItem:o($),listItemValue:p,listOrdered:o(Y,f),listUnordered:o(Y),paragraph:o(te),reference:E,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(A),strong:o(lt),thematicBreak:o(Ak)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:fe,autolinkProtocol:oe,blockQuote:u(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:Ke,characterReferenceMarkerNumeric:Ke,characterReferenceValue:ne,characterReference:he,codeFenced:u(g),codeFencedFence:y,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:_,codeIndented:u(b),codeText:u(j),codeTextData:_,data:_,definition:u(),definitionDestinationString:D,definitionLabelString:w,definitionTitleString:k,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(I),htmlFlowData:_,htmlText:u(P),htmlTextData:_,image:u(ee),label:rt,labelText:Se,lineEnding:L,link:u(ae),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:W,resourceDestinationString:x,resourceTitleString:Ue,resource:Je,setextHeading:u(ye),setextHeadingLineSequence:de,setextHeadingText:S,strong:u(),thematicBreak:u()}};Nm(e,(t||{}).mdastExtensions||[]);let r={};return n;function n(v){let B={type:"root",children:[]},Ee={stack:[B],tokenStack:[],config:e,enter:a,exit:l,buffer:s,resume:c,data:r},Oe=[],Ne=-1;for(;++Ne<v.length;)if(v[Ne][1].type==="listOrdered"||v[Ne][1].type==="listUnordered")if(v[Ne][0]==="enter")Oe.push(Ne);else{let dr=Oe.pop();Ne=i(v,dr,Ne)}for(Ne=-1;++Ne<v.length;){let dr=e[v[Ne][0]];Fm.call(dr,v[Ne][1].type)&&dr[v[Ne][1].type].call(Object.assign({sliceSerialize:v[Ne][2].sliceSerialize},Ee),v[Ne][1])}if(Ee.tokenStack.length>0){let dr=Ee.tokenStack[Ee.tokenStack.length-1];(dr[1]||Rm).call(Ee,void 0,dr[0])}for(B.position={start:kn(v.length>0?v[0][1].start:{line:1,column:1,offset:0}),end:kn(v.length>0?v[v.length-2][1].end:{line:1,column:1,offset:0})},Ne=-1;++Ne<e.transforms.length;)B=e.transforms[Ne](B)||B;return B}function i(v,B,Ee){let Oe=B-1,Ne=-1,dr=!1,qn,qr,ts,rs;for(;++Oe<=Ee;){let Ht=v[Oe];switch(Ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ht[0]==="enter"?Ne++:Ne--,rs=void 0;break}case"lineEndingBlank":{Ht[0]==="enter"&&(qn&&!rs&&!Ne&&!ts&&(ts=Oe),rs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:rs=void 0}if(!Ne&&Ht[0]==="enter"&&Ht[1].type==="listItemPrefix"||Ne===-1&&Ht[0]==="exit"&&(Ht[1].type==="listUnordered"||Ht[1].type==="listOrdered")){if(qn){let qi=Oe;for(qr=void 0;qi--;){let Vr=v[qi];if(Vr[1].type==="lineEnding"||Vr[1].type==="lineEndingBlank"){if(Vr[0]==="exit")continue;qr&&(v[qr][1].type="lineEndingBlank",dr=!0),Vr[1].type="lineEnding",qr=qi}else if(!(Vr[1].type==="linePrefix"||Vr[1].type==="blockQuotePrefix"||Vr[1].type==="blockQuotePrefixWhitespace"||Vr[1].type==="blockQuoteMarker"||Vr[1].type==="listItemIndent"))break}ts&&(!qr||ts<qr)&&(qn._spread=!0),qn.end=Object.assign({},qr?v[qr][1].start:Ht[1].end),v.splice(qr||Oe,0,["exit",qn,Ht[2]]),Oe++,Ee++}if(Ht[1].type==="listItemPrefix"){let qi={type:"listItem",_spread:!1,start:Object.assign({},Ht[1].start),end:void 0};qn=qi,v.splice(Oe,0,["enter",qi,Ht[2]]),Oe++,Ee++,ts=void 0,rs=!0}}}return v[B][1]._spread=dr,Ee}function o(v,B){return Ee;function Ee(Oe){a.call(this,v(Oe),Oe),B&&B.call(this,Oe)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(v,B,Ee){this.stack[this.stack.length-1].children.push(v),this.stack.push(v),this.tokenStack.push([B,Ee||void 0]),v.position={start:kn(B.start),end:void 0}}function u(v){return B;function B(Ee){v&&v.call(this,Ee),l.call(this,Ee)}}function l(v,B){let Ee=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==v.type&&(B?B.call(this,v,Oe[0]):(Oe[1]||Rm).call(this,v,Oe[0]));else throw new Error("Cannot close `"+v.type+"` ("+so({start:v.start,end:v.end})+"): it\u2019s not open");Ee.position.end=kn(v.end)}function c(){return Jr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(v){if(this.data.expectingFirstListItemValue){let B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(v),10),this.data.expectingFirstListItemValue=void 0}}function d(){let v=this.resume(),B=this.stack[this.stack.length-1];B.lang=v}function m(){let v=this.resume(),B=this.stack[this.stack.length-1];B.meta=v}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v.replace(/(\r?\n|\r)$/g,"")}function w(v){let B=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=B,Ee.identifier=St(this.sliceSerialize(v)).toLowerCase()}function k(){let v=this.resume(),B=this.stack[this.stack.length-1];B.title=v}function D(){let v=this.resume(),B=this.stack[this.stack.length-1];B.url=v}function R(v){let B=this.stack[this.stack.length-1];if(!B.depth){let Ee=this.sliceSerialize(v).length;B.depth=Ee}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function de(v){let B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(v).codePointAt(0)===61?1:2}function ye(){this.data.setextHeadingSlurpLineEnding=void 0}function be(v){let Ee=this.stack[this.stack.length-1].children,Oe=Ee[Ee.length-1];(!Oe||Oe.type!=="text")&&(Oe=wt(),Oe.position={start:kn(v.start),end:void 0},Ee.push(Oe)),this.stack.push(Oe)}function _(v){let B=this.stack.pop();B.value+=this.sliceSerialize(v),B.position.end=kn(v.end)}function L(v){let B=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Ee=B.children[B.children.length-1];Ee.position.end=kn(v.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(B.type)&&(be.call(this,v),_.call(this,v))}function F(){this.data.atHardBreak=!0}function I(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v}function P(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v}function j(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v}function ae(){let v=this.stack[this.stack.length-1];if(this.data.inReference){let B=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=B,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function ee(){let v=this.stack[this.stack.length-1];if(this.data.inReference){let B=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=B,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function Se(v){let B=this.sliceSerialize(v),Ee=this.stack[this.stack.length-2];Ee.label=Ya(B),Ee.identifier=St(B).toLowerCase()}function rt(){let v=this.stack[this.stack.length-1],B=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){let Oe=v.children;Ee.children=Oe}else Ee.alt=B}function x(){let v=this.resume(),B=this.stack[this.stack.length-1];B.url=v}function Ue(){let v=this.resume(),B=this.stack[this.stack.length-1];B.title=v}function Je(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function W(v){let B=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=B,Ee.identifier=St(this.sliceSerialize(v)).toLowerCase(),this.data.referenceType="full"}function Ke(v){this.data.characterReferenceType=v.type}function ne(v){let B=this.sliceSerialize(v),Ee=this.data.characterReferenceType,Oe;Ee?(Oe=Ba(B,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=oo(B);let Ne=this.stack[this.stack.length-1];Ne.value+=Oe}function he(v){let B=this.stack.pop();B.position.end=kn(v.end)}function oe(v){_.call(this,v);let B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(v)}function fe(v){_.call(this,v);let B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(v)}function me(){return{type:"blockquote",children:[]}}function we(){return{type:"code",lang:null,meta:null,value:""}}function Fe(){return{type:"inlineCode",value:""}}function ze(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ut(){return{type:"emphasis",children:[]}}function A(){return{type:"heading",depth:0,children:[]}}function C(){return{type:"break"}}function M(){return{type:"html",value:""}}function O(){return{type:"image",title:null,url:"",alt:null}}function T(){return{type:"link",title:null,url:"",children:[]}}function Y(v){return{type:"list",ordered:v.type==="listOrdered",start:null,spread:v._spread,children:[]}}function $(v){return{type:"listItem",spread:v._spread,checked:null,children:[]}}function te(){return{type:"paragraph",children:[]}}function lt(){return{type:"strong",children:[]}}function wt(){return{type:"text",value:""}}function Ak(){return{type:"thematicBreak"}}}function kn(t){return{line:t.line,column:t.column,offset:t.offset}}function Nm(t,e){let r=-1;for(;++r<e.length;){let n=e[r];Array.isArray(n)?Nm(t,n):B_(t,n)}}function B_(t,e){let r;for(r in e)if(Fm.call(e,r))switch(r){case"canContainEols":{let n=e[r];n&&t[r].push(...n);break}case"transforms":{let n=e[r];n&&t[r].push(...n);break}case"enter":case"exit":{let n=e[r];n&&Object.assign(t[r],n);break}}}function Rm(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+so({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+so({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+so({start:e.start,end:e.end})+") is still open")}function Za(t){let e=this;e.parser=r;function r(n){return of(n,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}var Pm={}.hasOwnProperty;function Lm(t,e){let r=e||{};function n(i,...o){let s=n.invalid,a=n.handlers;if(i&&Pm.call(i,t)){let u=String(i[t]);s=Pm.call(a,u)?a[u]:n.unknown}if(s)return s.call(this,i,...o)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var j_={}.hasOwnProperty;function sf(t,e){let r=-1,n;if(e.extensions)for(;++r<e.extensions.length;)sf(t,e.extensions[r]);for(n in e)if(j_.call(e,n))switch(n){case"extensions":break;case"unsafe":{Mm(t[n],e[n]);break}case"join":{Mm(t[n],e[n]);break}case"handlers":{U_(t[n],e[n]);break}default:t.options[n]=e[n]}return t}function Mm(t,e){e&&t.push(...e)}function U_(t,e){e&&Object.assign(t,e)}function Bm(t,e,r,n){let i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);let s=r.indentLines(r.containerFlow(t,o.current()),z_);return i(),s}function z_(t,e,r){return">"+(r?"":" ")+t}function Xa(t,e){return jm(t,e.inConstruct,!0)&&!jm(t,e.notInConstruct,!1)}function jm(t,e,r){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return r;let n=-1;for(;++n<e.length;)if(t.includes(e[n]))return!0;return!1}function af(t,e,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
|
|
70
|
+
`;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,n.push(s)}return n.join("")}function ef(t){let n={constructs:Ma([Qc,...(t||{}).extensions||[]]),content:i(gm),defined:[],document:i(ym),flow:i(km),lazy:{},string:i(Cm),text:i(Tm)};return n;function i(o){return s;function s(a){return Im(n,o,a)}}}function tf(t){for(;!Va(t););return t}var Om=/[\0\t\n\r]/g;function rf(){let t=1,e="",r=!0,n;return i;function i(o,s,a){let u=[],l,c,f,p,d;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",r&&(o.charCodeAt(0)===65279&&f++,r=void 0);f<o.length;){if(Om.lastIndex=f,l=Om.exec(o),p=l&&l.index!==void 0?l.index:o.length,d=o.charCodeAt(p),!l){e=o.slice(f);break}if(d===10&&f===p&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),f<p&&(u.push(o.slice(f,p)),t+=p-f),d){case 0:{u.push(65533),t++;break}case 9:{for(c=Math.ceil(t/4)*4,u.push(-2);t++<c;)u.push(-1);break}case 10:{u.push(-4),t=1;break}default:n=!0,t=1}f=p+1}return a&&(n&&u.push(-5),e&&u.push(e),u.push(null)),u}}var L_=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ya(t){return t.replace(L_,M_)}function M_(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),o=i===120||i===88;return Ba(r.slice(o?2:1),o?16:10)}return oo(r)||t}function so(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?vm(t.position):"start"in t||"end"in t?vm(t):"line"in t||"column"in t?nf(t):""}function nf(t){return Dm(t&&t.line)+":"+Dm(t&&t.column)}function vm(t){return nf(t&&t.start)+"-"+nf(t&&t.end)}function Dm(t){return t&&typeof t=="number"?t:1}var Fm={}.hasOwnProperty;function of(t,e,r){return typeof e!="string"&&(r=e,e=void 0),B_(r)(tf(ef(r).document().write(rf()(t,e,!0))))}function B_(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(T),autolinkProtocol:be,autolinkEmail:be,atxHeading:o(A),blockQuote:o(me),characterEscape:be,characterReference:be,codeFenced:o(we),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(we,s),codeText:o(Fe,s),codeTextData:be,data:be,codeFlowValue:be,definition:o(ze),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Ut),hardBreakEscape:o(C),hardBreakTrailing:o(C),htmlFlow:o(M,s),htmlFlowData:be,htmlText:o(M,s),htmlTextData:be,image:o(O),label:s,link:o(T),listItem:o($),listItemValue:p,listOrdered:o(Y,f),listUnordered:o(Y),paragraph:o(te),reference:E,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(A),strong:o(lt),thematicBreak:o(kk)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:fe,autolinkProtocol:oe,blockQuote:u(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:Ke,characterReferenceMarkerNumeric:Ke,characterReferenceValue:ne,characterReference:he,codeFenced:u(g),codeFencedFence:y,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:_,codeIndented:u(b),codeText:u(j),codeTextData:_,data:_,definition:u(),definitionDestinationString:D,definitionLabelString:w,definitionTitleString:k,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(I),htmlFlowData:_,htmlText:u(P),htmlTextData:_,image:u(ee),label:rt,labelText:Se,lineEnding:L,link:u(ae),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:W,resourceDestinationString:x,resourceTitleString:Ue,resource:Je,setextHeading:u(ye),setextHeadingLineSequence:de,setextHeadingText:S,strong:u(),thematicBreak:u()}};Nm(e,(t||{}).mdastExtensions||[]);let r={};return n;function n(v){let B={type:"root",children:[]},Ee={stack:[B],tokenStack:[],config:e,enter:a,exit:l,buffer:s,resume:c,data:r},Oe=[],Ne=-1;for(;++Ne<v.length;)if(v[Ne][1].type==="listOrdered"||v[Ne][1].type==="listUnordered")if(v[Ne][0]==="enter")Oe.push(Ne);else{let dr=Oe.pop();Ne=i(v,dr,Ne)}for(Ne=-1;++Ne<v.length;){let dr=e[v[Ne][0]];Fm.call(dr,v[Ne][1].type)&&dr[v[Ne][1].type].call(Object.assign({sliceSerialize:v[Ne][2].sliceSerialize},Ee),v[Ne][1])}if(Ee.tokenStack.length>0){let dr=Ee.tokenStack[Ee.tokenStack.length-1];(dr[1]||Rm).call(Ee,void 0,dr[0])}for(B.position={start:kn(v.length>0?v[0][1].start:{line:1,column:1,offset:0}),end:kn(v.length>0?v[v.length-2][1].end:{line:1,column:1,offset:0})},Ne=-1;++Ne<e.transforms.length;)B=e.transforms[Ne](B)||B;return B}function i(v,B,Ee){let Oe=B-1,Ne=-1,dr=!1,qn,qr,ts,rs;for(;++Oe<=Ee;){let Ht=v[Oe];switch(Ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ht[0]==="enter"?Ne++:Ne--,rs=void 0;break}case"lineEndingBlank":{Ht[0]==="enter"&&(qn&&!rs&&!Ne&&!ts&&(ts=Oe),rs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:rs=void 0}if(!Ne&&Ht[0]==="enter"&&Ht[1].type==="listItemPrefix"||Ne===-1&&Ht[0]==="exit"&&(Ht[1].type==="listUnordered"||Ht[1].type==="listOrdered")){if(qn){let qi=Oe;for(qr=void 0;qi--;){let Vr=v[qi];if(Vr[1].type==="lineEnding"||Vr[1].type==="lineEndingBlank"){if(Vr[0]==="exit")continue;qr&&(v[qr][1].type="lineEndingBlank",dr=!0),Vr[1].type="lineEnding",qr=qi}else if(!(Vr[1].type==="linePrefix"||Vr[1].type==="blockQuotePrefix"||Vr[1].type==="blockQuotePrefixWhitespace"||Vr[1].type==="blockQuoteMarker"||Vr[1].type==="listItemIndent"))break}ts&&(!qr||ts<qr)&&(qn._spread=!0),qn.end=Object.assign({},qr?v[qr][1].start:Ht[1].end),v.splice(qr||Oe,0,["exit",qn,Ht[2]]),Oe++,Ee++}if(Ht[1].type==="listItemPrefix"){let qi={type:"listItem",_spread:!1,start:Object.assign({},Ht[1].start),end:void 0};qn=qi,v.splice(Oe,0,["enter",qi,Ht[2]]),Oe++,Ee++,ts=void 0,rs=!0}}}return v[B][1]._spread=dr,Ee}function o(v,B){return Ee;function Ee(Oe){a.call(this,v(Oe),Oe),B&&B.call(this,Oe)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(v,B,Ee){this.stack[this.stack.length-1].children.push(v),this.stack.push(v),this.tokenStack.push([B,Ee||void 0]),v.position={start:kn(B.start),end:void 0}}function u(v){return B;function B(Ee){v&&v.call(this,Ee),l.call(this,Ee)}}function l(v,B){let Ee=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==v.type&&(B?B.call(this,v,Oe[0]):(Oe[1]||Rm).call(this,v,Oe[0]));else throw new Error("Cannot close `"+v.type+"` ("+so({start:v.start,end:v.end})+"): it\u2019s not open");Ee.position.end=kn(v.end)}function c(){return Jr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(v){if(this.data.expectingFirstListItemValue){let B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(v),10),this.data.expectingFirstListItemValue=void 0}}function d(){let v=this.resume(),B=this.stack[this.stack.length-1];B.lang=v}function m(){let v=this.resume(),B=this.stack[this.stack.length-1];B.meta=v}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v.replace(/(\r?\n|\r)$/g,"")}function w(v){let B=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=B,Ee.identifier=St(this.sliceSerialize(v)).toLowerCase()}function k(){let v=this.resume(),B=this.stack[this.stack.length-1];B.title=v}function D(){let v=this.resume(),B=this.stack[this.stack.length-1];B.url=v}function R(v){let B=this.stack[this.stack.length-1];if(!B.depth){let Ee=this.sliceSerialize(v).length;B.depth=Ee}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function de(v){let B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(v).codePointAt(0)===61?1:2}function ye(){this.data.setextHeadingSlurpLineEnding=void 0}function be(v){let Ee=this.stack[this.stack.length-1].children,Oe=Ee[Ee.length-1];(!Oe||Oe.type!=="text")&&(Oe=wt(),Oe.position={start:kn(v.start),end:void 0},Ee.push(Oe)),this.stack.push(Oe)}function _(v){let B=this.stack.pop();B.value+=this.sliceSerialize(v),B.position.end=kn(v.end)}function L(v){let B=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Ee=B.children[B.children.length-1];Ee.position.end=kn(v.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(B.type)&&(be.call(this,v),_.call(this,v))}function F(){this.data.atHardBreak=!0}function I(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v}function P(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v}function j(){let v=this.resume(),B=this.stack[this.stack.length-1];B.value=v}function ae(){let v=this.stack[this.stack.length-1];if(this.data.inReference){let B=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=B,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function ee(){let v=this.stack[this.stack.length-1];if(this.data.inReference){let B=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=B,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function Se(v){let B=this.sliceSerialize(v),Ee=this.stack[this.stack.length-2];Ee.label=Ya(B),Ee.identifier=St(B).toLowerCase()}function rt(){let v=this.stack[this.stack.length-1],B=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){let Oe=v.children;Ee.children=Oe}else Ee.alt=B}function x(){let v=this.resume(),B=this.stack[this.stack.length-1];B.url=v}function Ue(){let v=this.resume(),B=this.stack[this.stack.length-1];B.title=v}function Je(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function W(v){let B=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=B,Ee.identifier=St(this.sliceSerialize(v)).toLowerCase(),this.data.referenceType="full"}function Ke(v){this.data.characterReferenceType=v.type}function ne(v){let B=this.sliceSerialize(v),Ee=this.data.characterReferenceType,Oe;Ee?(Oe=Ba(B,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=oo(B);let Ne=this.stack[this.stack.length-1];Ne.value+=Oe}function he(v){let B=this.stack.pop();B.position.end=kn(v.end)}function oe(v){_.call(this,v);let B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(v)}function fe(v){_.call(this,v);let B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(v)}function me(){return{type:"blockquote",children:[]}}function we(){return{type:"code",lang:null,meta:null,value:""}}function Fe(){return{type:"inlineCode",value:""}}function ze(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ut(){return{type:"emphasis",children:[]}}function A(){return{type:"heading",depth:0,children:[]}}function C(){return{type:"break"}}function M(){return{type:"html",value:""}}function O(){return{type:"image",title:null,url:"",alt:null}}function T(){return{type:"link",title:null,url:"",children:[]}}function Y(v){return{type:"list",ordered:v.type==="listOrdered",start:null,spread:v._spread,children:[]}}function $(v){return{type:"listItem",spread:v._spread,checked:null,children:[]}}function te(){return{type:"paragraph",children:[]}}function lt(){return{type:"strong",children:[]}}function wt(){return{type:"text",value:""}}function kk(){return{type:"thematicBreak"}}}function kn(t){return{line:t.line,column:t.column,offset:t.offset}}function Nm(t,e){let r=-1;for(;++r<e.length;){let n=e[r];Array.isArray(n)?Nm(t,n):j_(t,n)}}function j_(t,e){let r;for(r in e)if(Fm.call(e,r))switch(r){case"canContainEols":{let n=e[r];n&&t[r].push(...n);break}case"transforms":{let n=e[r];n&&t[r].push(...n);break}case"enter":case"exit":{let n=e[r];n&&Object.assign(t[r],n);break}}}function Rm(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+so({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+so({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+so({start:e.start,end:e.end})+") is still open")}function Za(t){let e=this;e.parser=r;function r(n){return of(n,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}var Pm={}.hasOwnProperty;function Lm(t,e){let r=e||{};function n(i,...o){let s=n.invalid,a=n.handlers;if(i&&Pm.call(i,t)){let u=String(i[t]);s=Pm.call(a,u)?a[u]:n.unknown}if(s)return s.call(this,i,...o)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var U_={}.hasOwnProperty;function sf(t,e){let r=-1,n;if(e.extensions)for(;++r<e.extensions.length;)sf(t,e.extensions[r]);for(n in e)if(U_.call(e,n))switch(n){case"extensions":break;case"unsafe":{Mm(t[n],e[n]);break}case"join":{Mm(t[n],e[n]);break}case"handlers":{z_(t[n],e[n]);break}default:t.options[n]=e[n]}return t}function Mm(t,e){e&&t.push(...e)}function z_(t,e){e&&Object.assign(t,e)}function Bm(t,e,r,n){let i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);let s=r.indentLines(r.containerFlow(t,o.current()),$_);return i(),s}function $_(t,e,r){return">"+(r?"":" ")+t}function Xa(t,e){return jm(t,e.inConstruct,!0)&&!jm(t,e.notInConstruct,!1)}function jm(t,e,r){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return r;let n=-1;for(;++n<e.length;)if(t.includes(e[n]))return!0;return!1}function af(t,e,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
|
|
71
71
|
`&&Xa(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
72
|
-
`}function Um(t,e){let r=String(t),n=r.indexOf(e),i=n,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++o>s&&(s=o):o=1,i=n+e.length,n=r.indexOf(e,i);return s}function ys(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function zm(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function $m(t,e,r,n){let i=zm(r),o=t.value||"",s=i==="`"?"GraveAccent":"Tilde";if(ys(t,r)){let f=r.enter("codeIndented"),p=r.indentLines(o
|
|
72
|
+
`}function Um(t,e){let r=String(t),n=r.indexOf(e),i=n,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++o>s&&(s=o):o=1,i=n+e.length,n=r.indexOf(e,i);return s}function ys(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function zm(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function $m(t,e,r,n){let i=zm(r),o=t.value||"",s=i==="`"?"GraveAccent":"Tilde";if(ys(t,r)){let f=r.enter("codeIndented"),p=r.indentLines(o,q_);return f(),p}let a=r.createTracker(n),u=i.repeat(Math.max(Um(o,i)+1,3)),l=r.enter("codeFenced"),c=a.move(u);if(t.lang){let f=r.enter(`codeFencedLang${s}`);c+=a.move(r.safe(t.lang,{before:c,after:" ",encode:["`"],...a.current()})),f()}if(t.lang&&t.meta){let f=r.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(r.safe(t.meta,{before:c,after:`
|
|
73
73
|
`,encode:["`"],...a.current()})),f()}return c+=a.move(`
|
|
74
74
|
`),o&&(c+=a.move(o+`
|
|
75
|
-
`)),c+=a.move(u),l(),c}function
|
|
76
|
-
`,...u.current()}))),a(),t.title&&(a=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),s(),l}function Vm(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Qt(t){return"&#x"+t.toString(16).toUpperCase()+";"}function uo(t,e,r){let n=Qr(t),i=Qr(e);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}uf.peek=
|
|
75
|
+
`)),c+=a.move(u),l(),c}function q_(t,e,r){return(r?"":" ")+t}function ao(t){let e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function qm(t,e,r,n){let i=ao(r),o=i==='"'?"Quote":"Apostrophe",s=r.enter("definition"),a=r.enter("label"),u=r.createTracker(n),l=u.move("[");return l+=u.move(r.safe(r.associationId(t),{before:l,after:"]",...u.current()})),l+=u.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(t.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(a=r.enter("destinationRaw"),l+=u.move(r.safe(t.url,{before:l,after:t.title?" ":`
|
|
76
|
+
`,...u.current()}))),a(),t.title&&(a=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),s(),l}function Vm(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Qt(t){return"&#x"+t.toString(16).toUpperCase()+";"}function uo(t,e,r){let n=Qr(t),i=Qr(e);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}uf.peek=V_;function uf(t,e,r,n){let i=Vm(r),o=r.enter("emphasis"),s=r.createTracker(n),a=s.move(i),u=s.move(r.containerPhrasing(t,{after:i,before:a,...s.current()})),l=u.charCodeAt(0),c=uo(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=Qt(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=uo(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+Qt(f));let d=s.move(i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+u+d}function V_(t,e,r){return r.options.emphasis||"*"}var Or=(function(t){if(t==null)return K_;if(typeof t=="function")return Ja(t);if(typeof t=="object")return Array.isArray(t)?G_(t):W_(t);if(typeof t=="string")return H_(t);throw new Error("Expected function, string, or object as test")});function G_(t){let e=[],r=-1;for(;++r<t.length;)e[r]=Or(t[r]);return Ja(n);function n(...i){let o=-1;for(;++o<e.length;)if(e[o].apply(this,i))return!0;return!1}}function W_(t){let e=t;return Ja(r);function r(n){let i=n,o;for(o in t)if(i[o]!==e[o])return!1;return!0}}function H_(t){return Ja(e);function e(r){return r&&r.type===t}}function Ja(t){return e;function e(r,n,i){return!!(Y_(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function K_(){return!0}function Y_(t){return t!==null&&typeof t=="object"&&"type"in t}function Gm(t){return"\x1B[33m"+t+"\x1B[39m"}var Wm=[],Qa=!0,Ti=!1,eu="skip";function bs(t,e,r,n){let i;typeof e=="function"&&typeof r!="function"?(n=r,r=e):i=e;let o=Or(i),s=n?-1:1;a(t,void 0,[])();function a(u,l,c){let f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){let d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+Gm(u.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=Wm,m,y,g;if((!e||o(u,l,c[c.length-1]||void 0))&&(d=Z_(r(u,c)),d[0]===Ti))return d;if("children"in u&&u.children){let b=u;if(b.children&&d[0]!==eu)for(y=(n?b.children.length:-1)+s,g=c.concat(b);y>-1&&y<b.children.length;){let w=b.children[y];if(m=a(w,y,g)(),m[0]===Ti)return m;y=typeof m[1]=="number"?m[1]:y+s}}return d}}}function Z_(t){return Array.isArray(t)?t:typeof t=="number"?[Qa,t]:t==null?Wm:[t]}function Es(t,e,r,n){let i,o,s;typeof e=="function"&&typeof r!="function"?(o=void 0,s=e,i=r):(o=e,s=r,i=n),bs(t,o,a,i);function a(u,l){let c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return s(u,f,c)}}function tu(t,e){let r=!1;return Es(t,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,Ti}),!!((!t.depth||t.depth<3)&&Jr(t)&&(e.options.setext||r))}function Hm(t,e,r,n){let i=Math.max(Math.min(6,t.depth||1),1),o=r.createTracker(n);if(tu(t,r)){let c=r.enter("headingSetext"),f=r.enter("phrasing"),p=r.containerPhrasing(t,{...o.current(),before:`
|
|
77
77
|
`,after:`
|
|
78
78
|
`});return f(),c(),p+`
|
|
79
79
|
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
80
80
|
`))+1))}let s="#".repeat(i),a=r.enter("headingAtx"),u=r.enter("phrasing");o.move(s+" ");let l=r.containerPhrasing(t,{before:"# ",after:`
|
|
81
|
-
`,...o.current()});return/^[\t ]/.test(l)&&(l=Qt(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,r.options.closeAtx&&(l+=" "+s),u(),a(),l}lf.peek=
|
|
81
|
+
`,...o.current()});return/^[\t ]/.test(l)&&(l=Qt(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,r.options.closeAtx&&(l+=" "+s),u(),a(),l}lf.peek=X_;function lf(t){return t.value||""}function X_(){return"<"}cf.peek=J_;function cf(t,e,r,n){let i=ao(r),o=i==='"'?"Quote":"Apostrophe",s=r.enter("image"),a=r.enter("label"),u=r.createTracker(n),l=u.move("![");return l+=u.move(r.safe(t.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(t.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(a=r.enter("destinationRaw"),l+=u.move(r.safe(t.url,{before:l,after:t.title?" ":")",...u.current()}))),a(),t.title&&(a=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),l+=u.move(")"),s(),l}function J_(){return"!"}ff.peek=Q_;function ff(t,e,r,n){let i=t.referenceType,o=r.enter("imageReference"),s=r.enter("label"),a=r.createTracker(n),u=a.move("!["),l=r.safe(t.alt,{before:u,after:"]",...a.current()});u+=a.move(l+"]["),s();let c=r.stack;r.stack=[],s=r.enter("reference");let f=r.safe(r.associationId(t),{before:u,after:"]",...a.current()});return s(),r.stack=c,o(),i==="full"||!l||l!==f?u+=a.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function Q_(){return"!"}pf.peek=eS;function pf(t,e,r){let n=t.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<r.unsafe.length;){let s=r.unsafe[o],a=r.compilePattern(s),u;if(s.atBreak)for(;u=a.exec(n);){let l=u.index;n.charCodeAt(l)===10&&n.charCodeAt(l-1)===13&&l--,n=n.slice(0,l)+" "+n.slice(u.index+1)}}return i+n+i}function eS(){return"`"}function df(t,e){let r=Jr(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}hf.peek=tS;function hf(t,e,r,n){let i=ao(r),o=i==='"'?"Quote":"Apostrophe",s=r.createTracker(n),a,u;if(df(t,r)){let c=r.stack;r.stack=[],a=r.enter("autolink");let f=s.move("<");return f+=s.move(r.containerPhrasing(t,{before:f,after:">",...s.current()})),f+=s.move(">"),a(),r.stack=c,f}a=r.enter("link"),u=r.enter("label");let l=s.move("[");return l+=s.move(r.containerPhrasing(t,{before:l,after:"](",...s.current()})),l+=s.move("]("),u(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(u=r.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(r.safe(t.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(u=r.enter("destinationRaw"),l+=s.move(r.safe(t.url,{before:l,after:t.title?" ":")",...s.current()}))),u(),t.title&&(u=r.enter(`title${o}`),l+=s.move(" "+i),l+=s.move(r.safe(t.title,{before:l,after:i,...s.current()})),l+=s.move(i),u()),l+=s.move(")"),a(),l}function tS(t,e,r){return df(t,r)?"<":"["}mf.peek=rS;function mf(t,e,r,n){let i=t.referenceType,o=r.enter("linkReference"),s=r.enter("label"),a=r.createTracker(n),u=a.move("["),l=r.containerPhrasing(t,{before:u,after:"]",...a.current()});u+=a.move(l+"]["),s();let c=r.stack;r.stack=[],s=r.enter("reference");let f=r.safe(r.associationId(t),{before:u,after:"]",...a.current()});return s(),r.stack=c,o(),i==="full"||!l||l!==f?u+=a.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function rS(){return"["}function lo(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function Km(t){let e=lo(t),r=t.options.bulletOther;if(!r)return e==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+r+"`) to be different");return r}function Ym(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function ru(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function Zm(t,e,r,n){let i=r.enter("list"),o=r.bulletCurrent,s=t.ordered?Ym(r):lo(r),a=t.ordered?s==="."?")":".":Km(r),u=e&&r.bulletLastUsed?s===r.bulletLastUsed:!1;if(!t.ordered){let c=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(u=!0),ru(r)===s&&c){let f=-1;for(;++f<t.children.length;){let p=t.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=a),r.bulletCurrent=s;let l=r.containerFlow(t,n);return r.bulletLastUsed=s,r.bulletCurrent=o,i(),l}function Xm(t){let e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function Jm(t,e,r,n){let i=Xm(r),o=r.bulletCurrent||lo(r);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(r.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);let a=r.createTracker(n);a.move(o+" ".repeat(s-o.length)),a.shift(s);let u=r.enter("listItem"),l=r.indentLines(r.containerFlow(t,a.current()),c);return u(),l;function c(f,p,d){return p?(d?"":" ".repeat(s))+f:(d?o:o+" ".repeat(s-o.length))+f}}function Qm(t,e,r,n){let i=r.enter("paragraph"),o=r.enter("phrasing"),s=r.containerPhrasing(t,n);return o(),i(),s}var gf=Or(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function eg(t,e,r,n){return(t.children.some(function(s){return gf(s)})?r.containerPhrasing:r.containerFlow).call(r,t,n)}function tg(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}xf.peek=nS;function xf(t,e,r,n){let i=tg(r),o=r.enter("strong"),s=r.createTracker(n),a=s.move(i+i),u=s.move(r.containerPhrasing(t,{after:i,before:a,...s.current()})),l=u.charCodeAt(0),c=uo(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=Qt(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=uo(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+Qt(f));let d=s.move(i+i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+u+d}function nS(t,e,r){return r.options.strong||"*"}function rg(t,e,r,n){return r.safe(t.value,n)}function ng(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function ig(t,e,r){let n=(ru(r)+(r.options.ruleSpaces?" ":"")).repeat(ng(r));return r.options.ruleSpaces?n.slice(0,-1):n}var _i={blockquote:Bm,break:af,code:$m,definition:qm,emphasis:uf,hardBreak:af,heading:Hm,html:lf,image:cf,imageReference:ff,inlineCode:pf,link:hf,linkReference:mf,list:Zm,listItem:Jm,paragraph:Qm,root:eg,strong:xf,text:rg,thematicBreak:ig};var og=[iS];function iS(t,e,r,n){if(e.type==="code"&&ys(e,n)&&(t.type==="list"||t.type===e.type&&ys(t,n)))return!1;if("spread"in r&&typeof r.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&tu(e,n))?void 0:r.spread?1:0}var Si=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],sg=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
|
|
82
82
|
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Si},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
|
|
83
83
|
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Si},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
|
84
84
|
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:Si},{atBreak:!0,character:"+",after:`(?:[ \r
|
|
@@ -87,39 +87,39 @@ ${JSON.stringify(t,void 0,2)}`)}var La;async function _r(){return La===void 0&&(
|
|
|
87
87
|
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Si},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Si},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Si},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Si},{atBreak:!0,character:"~"}];function ag(t){return t.label||!t.identifier?t.label||"":Ya(t.identifier)}function ug(t){if(!t._compiled){let e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function lg(t,e,r){let n=e.indexStack,i=t.children||[],o=[],s=-1,a=r.before,u;n.push(-1);let l=e.createTracker(r);for(;++s<i.length;){let c=i[s],f;if(n[n.length-1]=s,s+1<i.length){let m=e.handle.handlers[i[s+1].type];m&&m.peek&&(m=m.peek),f=m?m(i[s+1],t,e,{before:"",after:"",...l.current()}).charAt(0):""}else f=r.after;o.length>0&&(a==="\r"||a===`
|
|
88
88
|
`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=e.createTracker(r),l.move(o.join("")));let p=e.handle(c,t,e,{...l.current(),after:f,before:a});u&&u===p.slice(0,1)&&(p=Qt(u.charCodeAt(0))+p.slice(1));let d=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,u=void 0,d&&(o.length>0&&d.before&&a===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+Qt(a.charCodeAt(0))),d.after&&(u=f)),l.move(p),o.push(p),a=p.slice(-1)}return n.pop(),o.join("")}function cg(t,e,r){let n=e.indexStack,i=t.children||[],o=e.createTracker(r),s=[],a=-1;for(n.push(-1);++a<i.length;){let u=i[a];n[n.length-1]=a,s.push(o.move(e.handle(u,t,e,{before:`
|
|
89
89
|
`,after:`
|
|
90
|
-
`,...o.current()}))),u.type!=="list"&&(e.bulletLastUsed=void 0),a<i.length-1&&s.push(o.move(
|
|
90
|
+
`,...o.current()}))),u.type!=="list"&&(e.bulletLastUsed=void 0),a<i.length-1&&s.push(o.move(oS(u,i[a+1],t,e)))}return n.pop(),s.join("")}function oS(t,e,r,n){let i=n.join.length;for(;i--;){let o=n.join[i](t,e,r,n);if(o===!0||o===1)break;if(typeof o=="number")return`
|
|
91
91
|
`.repeat(1+o);if(o===!1)return`
|
|
92
92
|
|
|
93
93
|
<!---->
|
|
94
94
|
|
|
95
95
|
`}return`
|
|
96
96
|
|
|
97
|
-
`}var
|
|
97
|
+
`}var sS=/\r?\n|\r/g;function fg(t,e){let r=[],n=0,i=0,o;for(;o=sS.exec(t);)s(t.slice(n,o.index)),r.push(o[0]),n=o.index+o[0].length,i++;return s(t.slice(n)),r.join("");function s(a){r.push(e(a,i,!a))}}function dg(t,e,r){let n=(r.before||"")+(e||"")+(r.after||""),i=[],o=[],s={},a=-1;for(;++a<t.unsafe.length;){let c=t.unsafe[a];if(!Xa(t.stack,c))continue;let f=t.compilePattern(c),p;for(;p=f.exec(n);){let d="before"in c||!!c.atBreak,m="after"in c,y=p.index+(d?p[1].length:0);i.includes(y)?(s[y].before&&!d&&(s[y].before=!1),s[y].after&&!m&&(s[y].after=!1)):(i.push(y),s[y]={before:d,after:m})}}i.sort(aS);let u=r.before?r.before.length:0,l=n.length-(r.after?r.after.length:0);for(a=-1;++a<i.length;){let c=i[a];c<u||c>=l||c+1<l&&i[a+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[a-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(u!==c&&o.push(pg(n.slice(u,c),"\\")),u=c,/[!-/:-@[-`{-~]/.test(n.charAt(c))&&(!r.encode||!r.encode.includes(n.charAt(c)))?o.push("\\"):(o.push(Qt(n.charCodeAt(c))),u++))}return o.push(pg(n.slice(u,l),r.after)),o.join("")}function aS(t,e){return t-e}function pg(t,e){let r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],o=t+e,s=-1,a=0,u;for(;u=r.exec(o);)n.push(u.index);for(;++s<n.length;)a!==n[s]&&i.push(t.slice(a,n[s])),i.push("\\"),a=n[s];return i.push(t.slice(a)),i.join("")}function hg(t){let e=t||{},r=e.now||{},n=e.lineShift||0,i=r.line||1,o=r.column||1;return{move:u,current:s,shift:a};function s(){return{now:{line:i,column:o},lineShift:n}}function a(l){n+=l}function u(l){let c=l||"",f=c.split(/\r?\n|\r/g),p=f[f.length-1];return i+=f.length-1,o=f.length===1?o+p.length:1+p.length+n,c}}function yf(t,e){let r=e||{},n={associationId:ag,containerPhrasing:fS,containerFlow:pS,createTracker:hg,compilePattern:ug,enter:o,handlers:{..._i},handle:void 0,indentLines:fg,indexStack:[],join:[...og],options:{},safe:dS,stack:[],unsafe:[...sg]};sf(n,r),n.options.tightDefinitions&&n.join.push(cS),n.handle=Lm("type",{invalid:uS,unknown:lS,handlers:n.handlers});let i=n.handle(t,void 0,n,{before:`
|
|
98
98
|
`,after:`
|
|
99
99
|
`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
|
100
|
-
`),i;function o(s){return n.stack.push(s),a;function a(){n.stack.pop()}}}function aS(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function uS(t){let e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function lS(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function cS(t,e){return lg(t,this,e)}function fS(t,e){return cg(t,this,e)}function pS(t,e){return dg(this,t,e)}function nu(t){let e=this;e.compiler=r;function r(n){return yf(n,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function bf(t){if(t)throw t}var su=ns(wg(),1);function As(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Ef(){let t=[],e={run:r,use:n};return e;function r(...i){let o=-1,s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(u,...l){let c=t[++o],f=-1;if(u){s(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?Cg(c,a)(...l):s(null,...l)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function Cg(t,e){let r;return n;function n(...s){let a=t.length>s.length,u;a&&s.push(i);try{u=t.apply(this,s)}catch(l){let c=l;if(a&&r)throw c;return i(c)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(s,...a){r||(r=!0,e(s,...a))}function o(s){i(null,s)}}import{VFile as dS}from"vfile";var Tg=(function(t){let n=this.constructor.prototype,i=n[t],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,n),o});var hS={}.hasOwnProperty,Cf=class t extends Tg{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ef()}copy(){let e=new t,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];e.use(...n)}return e.data((0,su.default)(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(wf("data",this.frozen),this.namespace[e]=r,this):hS.call(this.namespace,e)&&this.namespace[e]||void 0:e?(wf("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let i=r.call(e,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let r=ou(e),n=this.parser||this.Parser;return Af("parse",n),n(String(r),r)}process(e,r){let n=this;return this.freeze(),Af("process",this.parser||this.Parser),kf("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(o,s){let a=ou(e),u=n.parse(a);n.run(u,a,function(c,f,p){if(c||!f||!p)return l(c);let d=f,m=n.stringify(d,p);gS(m)?p.value=m:p.result=m,l(c,p)});function l(c,f){c||!f?s(c):o?o(f):r(void 0,f)}}}processSync(e){let r=!1,n;return this.freeze(),Af("processSync",this.parser||this.Parser),kf("processSync",this.compiler||this.Compiler),this.process(e,i),Sg("processSync","process",r),n;function i(o,s){r=!0,bf(o),n=s}}run(e,r,n){_g(e),this.freeze();let i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?o(void 0,n):new Promise(o);function o(s,a){let u=ou(r);i.run(e,u,l);function l(c,f,p){let d=f||e;c?a(c):s?s(d):n(void 0,d,p)}}}runSync(e,r){let n=!1,i;return this.run(e,r,o),Sg("runSync","run",n),i;function o(s,a){bf(s),i=a,n=!0}}stringify(e,r){this.freeze();let n=ou(r),i=this.compiler||this.Compiler;return kf("stringify",i),_g(e),i(e,n)}use(e,...r){let n=this.attachers,i=this.namespace;if(wf("use",this.frozen),e!=null)if(typeof e=="function")u(e,r);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){let[c,...f]=l;u(c,f)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(l.plugins),l.settings&&(i.settings=(0,su.default)(!0,i.settings,l.settings))}function a(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){let f=l[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,p=-1;for(;++f<n.length;)if(n[f][0]===l){p=f;break}if(p===-1)n.push([l,...c]);else if(c.length>0){let[d,...m]=c,y=n[p][1];As(y)&&As(d)&&(d=(0,su.default)(!0,y,d)),n[p]=[l,d,...m]}}}},Tf=new Cf().freeze();function Af(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function kf(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function wf(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _g(t){if(!As(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Sg(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function ou(t){return mS(t)?t:new dS(t)}function mS(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function gS(t){return typeof t=="string"||xS(t)}function xS(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var co=Tf().use(Za).use(nu).freeze();function _f(t,e){let r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(e);for(;i!==-1;)n++,i=r.indexOf(e,i+e.length);return n}function Sf(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function If(t,e,r){let i=Or((r||{}).ignore||[]),o=yS(e),s=-1;for(;++s<o.length;)bs(t,"text",a);function a(l,c){let f=-1,p;for(;++f<c.length;){let d=c[f],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return u(l,c)}function u(l,c){let f=c[c.length-1],p=o[s][0],d=o[s][1],m=0,g=f.children.indexOf(l),b=!1,w=[];p.lastIndex=0;let k=p.exec(l.value);for(;k;){let D=k.index,R={index:k.index,input:k.input,stack:[...c,l]},S=d(...k,R);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=D+1:(m!==D&&w.push({type:"text",value:l.value.slice(m,D)}),Array.isArray(S)?w.push(...S):S&&w.push(S),m=D+k[0].length,b=!0),!p.global)break;k=p.exec(l.value)}return b?(m<l.value.length&&w.push({type:"text",value:l.value.slice(m)}),f.children.splice(g,1,...w)):w=[l],g+w.length}}function yS(t){let e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!t[0]||Array.isArray(t[0])?t:[t],n=-1;for(;++n<r.length;){let i=r[n];e.push([bS(i[0]),ES(i[1])])}return e}function bS(t){return typeof t=="string"?new RegExp(Sf(t),"g"):t}function ES(t){return typeof t=="function"?t:function(){return t}}var Of="phrasing",vf=["autolink","link","image","label"];function Rf(){return{transforms:[_S],enter:{literalAutolink:AS,literalAutolinkEmail:Df,literalAutolinkHttp:Df,literalAutolinkWww:Df},exit:{literalAutolink:TS,literalAutolinkEmail:CS,literalAutolinkHttp:kS,literalAutolinkWww:wS}}}function Ff(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Of,notInConstruct:vf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Of,notInConstruct:vf},{character:":",before:"[ps]",after:"\\/",inConstruct:Of,notInConstruct:vf}]}}function AS(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Df(t){this.config.enter.autolinkProtocol.call(this,t)}function kS(t){this.config.exit.autolinkProtocol.call(this,t)}function wS(t){this.config.exit.data.call(this,t);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function CS(t){this.config.exit.autolinkEmail.call(this,t)}function TS(t){this.exit(t)}function _S(t){If(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,SS],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),IS]],{ignore:["link","linkReference"]})}function SS(t,e,r,n,i){let o="";if(!Ig(i)||(/^w/i.test(e)&&(r=e+r,e="",o="http://"),!OS(r)))return!1;let s=vS(r+n);if(!s[0])return!1;let a={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function IS(t,e,r,n){return!Ig(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}function OS(t){let e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function vS(t){let e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let r=e[0],n=r.indexOf(")"),i=_f(t,"("),o=_f(t,")");for(;n!==-1&&i>o;)t+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[t,r]}function Ig(t,e){let r=t.input.charCodeAt(t.index-1);return(t.index===0||Sr(r)||Ai(r))&&(!e||r!==47)}Og.peek=jS;function DS(){this.buffer()}function RS(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function FS(){this.buffer()}function NS(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function PS(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=St(this.sliceSerialize(t)).toLowerCase(),r.label=e}function LS(t){this.exit(t)}function MS(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=St(this.sliceSerialize(t)).toLowerCase(),r.label=e}function BS(t){this.exit(t)}function jS(){return"["}function Og(t,e,r,n){let i=r.createTracker(n),o=i.move("[^"),s=r.enter("footnoteReference"),a=r.enter("reference");return o+=i.move(r.safe(r.associationId(t),{after:"]",before:o})),a(),s(),o+=i.move("]"),o}function Nf(){return{enter:{gfmFootnoteCallString:DS,gfmFootnoteCall:RS,gfmFootnoteDefinitionLabelString:FS,gfmFootnoteDefinition:NS},exit:{gfmFootnoteCallString:PS,gfmFootnoteCall:LS,gfmFootnoteDefinitionLabelString:MS,gfmFootnoteDefinition:BS}}}function Pf(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:r,footnoteReference:Og},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,o,s){let a=o.createTracker(s),u=a.move("[^"),l=o.enter("footnoteDefinition"),c=o.enter("label");return u+=a.move(o.safe(o.associationId(n),{before:u,after:"]"})),c(),u+=a.move("]:"),n.children&&n.children.length>0&&(a.shift(4),u+=a.move((e?`
|
|
101
|
-
`:" ")+o.indentLines(o.containerFlow(n,a.current()),e?vg:
|
|
102
|
-
`)}function
|
|
100
|
+
`),i;function o(s){return n.stack.push(s),a;function a(){n.stack.pop()}}}function uS(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function lS(t){let e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function cS(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function fS(t,e){return lg(t,this,e)}function pS(t,e){return cg(t,this,e)}function dS(t,e){return dg(this,t,e)}function nu(t){let e=this;e.compiler=r;function r(n){return yf(n,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function bf(t){if(t)throw t}var su=ns(wg(),1);function As(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Ef(){let t=[],e={run:r,use:n};return e;function r(...i){let o=-1,s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(u,...l){let c=t[++o],f=-1;if(u){s(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?Cg(c,a)(...l):s(null,...l)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function Cg(t,e){let r;return n;function n(...s){let a=t.length>s.length,u;a&&s.push(i);try{u=t.apply(this,s)}catch(l){let c=l;if(a&&r)throw c;return i(c)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(s,...a){r||(r=!0,e(s,...a))}function o(s){i(null,s)}}import{VFile as hS}from"vfile";var Tg=(function(t){let n=this.constructor.prototype,i=n[t],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,n),o});var mS={}.hasOwnProperty,Cf=class t extends Tg{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ef()}copy(){let e=new t,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];e.use(...n)}return e.data((0,su.default)(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(wf("data",this.frozen),this.namespace[e]=r,this):mS.call(this.namespace,e)&&this.namespace[e]||void 0:e?(wf("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let i=r.call(e,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let r=ou(e),n=this.parser||this.Parser;return Af("parse",n),n(String(r),r)}process(e,r){let n=this;return this.freeze(),Af("process",this.parser||this.Parser),kf("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(o,s){let a=ou(e),u=n.parse(a);n.run(u,a,function(c,f,p){if(c||!f||!p)return l(c);let d=f,m=n.stringify(d,p);xS(m)?p.value=m:p.result=m,l(c,p)});function l(c,f){c||!f?s(c):o?o(f):r(void 0,f)}}}processSync(e){let r=!1,n;return this.freeze(),Af("processSync",this.parser||this.Parser),kf("processSync",this.compiler||this.Compiler),this.process(e,i),Sg("processSync","process",r),n;function i(o,s){r=!0,bf(o),n=s}}run(e,r,n){_g(e),this.freeze();let i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?o(void 0,n):new Promise(o);function o(s,a){let u=ou(r);i.run(e,u,l);function l(c,f,p){let d=f||e;c?a(c):s?s(d):n(void 0,d,p)}}}runSync(e,r){let n=!1,i;return this.run(e,r,o),Sg("runSync","run",n),i;function o(s,a){bf(s),i=a,n=!0}}stringify(e,r){this.freeze();let n=ou(r),i=this.compiler||this.Compiler;return kf("stringify",i),_g(e),i(e,n)}use(e,...r){let n=this.attachers,i=this.namespace;if(wf("use",this.frozen),e!=null)if(typeof e=="function")u(e,r);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){let[c,...f]=l;u(c,f)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(l.plugins),l.settings&&(i.settings=(0,su.default)(!0,i.settings,l.settings))}function a(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){let f=l[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,p=-1;for(;++f<n.length;)if(n[f][0]===l){p=f;break}if(p===-1)n.push([l,...c]);else if(c.length>0){let[d,...m]=c,y=n[p][1];As(y)&&As(d)&&(d=(0,su.default)(!0,y,d)),n[p]=[l,d,...m]}}}},Tf=new Cf().freeze();function Af(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function kf(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function wf(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _g(t){if(!As(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Sg(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function ou(t){return gS(t)?t:new hS(t)}function gS(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function xS(t){return typeof t=="string"||yS(t)}function yS(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var co=Tf().use(Za).use(nu).freeze();function _f(t,e){let r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(e);for(;i!==-1;)n++,i=r.indexOf(e,i+e.length);return n}function Sf(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function If(t,e,r){let i=Or((r||{}).ignore||[]),o=bS(e),s=-1;for(;++s<o.length;)bs(t,"text",a);function a(l,c){let f=-1,p;for(;++f<c.length;){let d=c[f],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return u(l,c)}function u(l,c){let f=c[c.length-1],p=o[s][0],d=o[s][1],m=0,g=f.children.indexOf(l),b=!1,w=[];p.lastIndex=0;let k=p.exec(l.value);for(;k;){let D=k.index,R={index:k.index,input:k.input,stack:[...c,l]},S=d(...k,R);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=D+1:(m!==D&&w.push({type:"text",value:l.value.slice(m,D)}),Array.isArray(S)?w.push(...S):S&&w.push(S),m=D+k[0].length,b=!0),!p.global)break;k=p.exec(l.value)}return b?(m<l.value.length&&w.push({type:"text",value:l.value.slice(m)}),f.children.splice(g,1,...w)):w=[l],g+w.length}}function bS(t){let e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!t[0]||Array.isArray(t[0])?t:[t],n=-1;for(;++n<r.length;){let i=r[n];e.push([ES(i[0]),AS(i[1])])}return e}function ES(t){return typeof t=="string"?new RegExp(Sf(t),"g"):t}function AS(t){return typeof t=="function"?t:function(){return t}}var Of="phrasing",vf=["autolink","link","image","label"];function Rf(){return{transforms:[SS],enter:{literalAutolink:kS,literalAutolinkEmail:Df,literalAutolinkHttp:Df,literalAutolinkWww:Df},exit:{literalAutolink:_S,literalAutolinkEmail:TS,literalAutolinkHttp:wS,literalAutolinkWww:CS}}}function Ff(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Of,notInConstruct:vf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Of,notInConstruct:vf},{character:":",before:"[ps]",after:"\\/",inConstruct:Of,notInConstruct:vf}]}}function kS(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Df(t){this.config.enter.autolinkProtocol.call(this,t)}function wS(t){this.config.exit.autolinkProtocol.call(this,t)}function CS(t){this.config.exit.data.call(this,t);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function TS(t){this.config.exit.autolinkEmail.call(this,t)}function _S(t){this.exit(t)}function SS(t){If(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,IS],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),OS]],{ignore:["link","linkReference"]})}function IS(t,e,r,n,i){let o="";if(!Ig(i)||(/^w/i.test(e)&&(r=e+r,e="",o="http://"),!vS(r)))return!1;let s=DS(r+n);if(!s[0])return!1;let a={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function OS(t,e,r,n){return!Ig(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}function vS(t){let e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function DS(t){let e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let r=e[0],n=r.indexOf(")"),i=_f(t,"("),o=_f(t,")");for(;n!==-1&&i>o;)t+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[t,r]}function Ig(t,e){let r=t.input.charCodeAt(t.index-1);return(t.index===0||Sr(r)||Ai(r))&&(!e||r!==47)}Og.peek=US;function RS(){this.buffer()}function FS(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function NS(){this.buffer()}function PS(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function LS(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=St(this.sliceSerialize(t)).toLowerCase(),r.label=e}function MS(t){this.exit(t)}function BS(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=St(this.sliceSerialize(t)).toLowerCase(),r.label=e}function jS(t){this.exit(t)}function US(){return"["}function Og(t,e,r,n){let i=r.createTracker(n),o=i.move("[^"),s=r.enter("footnoteReference"),a=r.enter("reference");return o+=i.move(r.safe(r.associationId(t),{after:"]",before:o})),a(),s(),o+=i.move("]"),o}function Nf(){return{enter:{gfmFootnoteCallString:RS,gfmFootnoteCall:FS,gfmFootnoteDefinitionLabelString:NS,gfmFootnoteDefinition:PS},exit:{gfmFootnoteCallString:LS,gfmFootnoteCall:MS,gfmFootnoteDefinitionLabelString:BS,gfmFootnoteDefinition:jS}}}function Pf(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:r,footnoteReference:Og},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,o,s){let a=o.createTracker(s),u=a.move("[^"),l=o.enter("footnoteDefinition"),c=o.enter("label");return u+=a.move(o.safe(o.associationId(n),{before:u,after:"]"})),c(),u+=a.move("]:"),n.children&&n.children.length>0&&(a.shift(4),u+=a.move((e?`
|
|
101
|
+
`:" ")+o.indentLines(o.containerFlow(n,a.current()),e?vg:zS))),l(),u}}function zS(t,e,r){return e===0?t:vg(t,e,r)}function vg(t,e,r){return(r?"":" ")+t}var $S=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Dg.peek=GS;function Lf(){return{canContainEols:["delete"],enter:{strikethrough:qS},exit:{strikethrough:VS}}}function Mf(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$S}],handlers:{delete:Dg}}}function qS(t){this.enter({type:"delete",children:[]},t)}function VS(t){this.exit(t)}function Dg(t,e,r,n){let i=r.createTracker(n),o=r.enter("strikethrough"),s=i.move("~~");return s+=r.containerPhrasing(t,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function GS(){return"~"}function WS(t){return t.length}function Fg(t,e){let r=e||{},n=(r.align||[]).concat(),i=r.stringLength||WS,o=[],s=[],a=[],u=[],l=0,c=-1;for(;++c<t.length;){let y=[],g=[],b=-1;for(t[c].length>l&&(l=t[c].length);++b<t[c].length;){let w=HS(t[c][b]);if(r.alignDelimiters!==!1){let k=i(w);g[b]=k,(u[b]===void 0||k>u[b])&&(u[b]=k)}y.push(w)}s[c]=y,a[c]=g}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<l;)o[f]=Rg(n[f]);else{let y=Rg(n);for(;++f<l;)o[f]=y}f=-1;let p=[],d=[];for(;++f<l;){let y=o[f],g="",b="";y===99?(g=":",b=":"):y===108?g=":":y===114&&(b=":");let w=r.alignDelimiters===!1?1:Math.max(1,u[f]-g.length-b.length),k=g+"-".repeat(w)+b;r.alignDelimiters!==!1&&(w=g.length+w+b.length,w>u[f]&&(u[f]=w),d[f]=w),p[f]=k}s.splice(1,0,p),a.splice(1,0,d),c=-1;let m=[];for(;++c<s.length;){let y=s[c],g=a[c];f=-1;let b=[];for(;++f<l;){let w=y[f]||"",k="",D="";if(r.alignDelimiters!==!1){let R=u[f]-(g[f]||0),S=o[f];S===114?k=" ".repeat(R):S===99?R%2?(k=" ".repeat(R/2+.5),D=" ".repeat(R/2-.5)):(k=" ".repeat(R/2),D=k):D=" ".repeat(R)}r.delimiterStart!==!1&&!f&&b.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&w==="")&&(r.delimiterStart!==!1||f)&&b.push(" "),r.alignDelimiters!==!1&&b.push(k),b.push(w),r.alignDelimiters!==!1&&b.push(D),r.padding!==!1&&b.push(" "),(r.delimiterEnd!==!1||f!==l-1)&&b.push("|")}m.push(r.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return m.join(`
|
|
102
|
+
`)}function HS(t){return t==null?"":String(t)}function Rg(t){let e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function jf(){return{enter:{table:KS,tableData:Ng,tableHeader:Ng,tableRow:ZS},exit:{codeText:XS,table:YS,tableData:Bf,tableHeader:Bf,tableRow:Bf}}}function KS(t){let e=t._align;this.enter({type:"table",align:e.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function YS(t){this.exit(t),this.data.inTable=void 0}function ZS(t){this.enter({type:"tableRow",children:[]},t)}function Bf(t){this.exit(t)}function Ng(t){this.enter({type:"tableCell",children:[]},t)}function XS(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,JS));let r=this.stack[this.stack.length-1];r.type,r.value=e,this.exit(t)}function JS(t,e){return e==="|"?e:t}function Uf(t){let e=t||{},r=e.tableCellPadding,n=e.tablePipeAlign,i=e.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
103
103
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:u,tableRow:a}};function s(d,m,y,g){return l(c(d,y,g),d.align)}function a(d,m,y,g){let b=f(d,y,g),w=l([b]);return w.slice(0,w.indexOf(`
|
|
104
|
-
`))}function u(d,m,y,g){let b=y.enter("tableCell"),w=y.enter("phrasing"),k=y.containerPhrasing(d,{...g,before:o,after:o});return w(),b(),k}function l(d,m){return Fg(d,{align:m,alignDelimiters:n,padding:r,stringLength:i})}function c(d,m,y){let g=d.children,b=-1,w=[],k=m.enter("table");for(;++b<g.length;)w[b]=f(g[b],m,y);return k(),w}function f(d,m,y){let g=d.children,b=-1,w=[],k=m.enter("tableRow");for(;++b<g.length;)w[b]=u(g[b],d,m,y);return k(),w}function p(d,m,y){let g=_i.inlineCode(d,m,y);return y.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function zf(){return{exit:{taskListCheckValueChecked:Pg,taskListCheckValueUnchecked:Pg,paragraph:JS}}}function $f(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:QS}}}function Pg(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function JS(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let i=e.children,o=-1,s;for(;++o<i.length;){let a=i[o];if(a.type==="paragraph"){s=a;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(t)}function QS(t,e,r,n){let i=t.children[0],o=typeof t.checked=="boolean"&&i&&i.type==="paragraph",s="["+(t.checked?"x":" ")+"] ",a=r.createTracker(n);o&&a.move(s);let u=_i.listItem(t,e,r,{...n,...a.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+s}}function qf(){return[Rf(),Nf(),Lf(),jf(),zf()]}function Vf(t){return{extensions:[Ff(),Pf(t),Mf(),Uf(t),$f()]}}var eI={tokenize:oI,partial:!0},Lg={tokenize:sI,partial:!0},Mg={tokenize:aI,partial:!0},Bg={tokenize:uI,partial:!0},tI={tokenize:lI,partial:!0},jg={name:"wwwAutolink",tokenize:nI,previous:zg},Ug={name:"protocolAutolink",tokenize:iI,previous:$g},en={name:"emailAutolink",tokenize:rI,previous:qg},vr={};function Wf(){return{text:vr}}var Ii=48;for(;Ii<123;)vr[Ii]=en,Ii++,Ii===58?Ii=65:Ii===91&&(Ii=97);vr[43]=en;vr[45]=en;vr[46]=en;vr[95]=en;vr[72]=[en,Ug];vr[104]=[en,Ug];vr[87]=[en,jg];vr[119]=[en,jg];function rI(t,e,r){let n=this,i,o;return s;function s(f){return!Gf(f)||!qg.call(n,n.previous)||Hf(n.events)?r(f):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(f))}function a(f){return Gf(f)?(t.consume(f),a):f===64?(t.consume(f),u):r(f)}function u(f){return f===46?t.check(tI,c,l)(f):f===45||f===95||gt(f)?(o=!0,t.consume(f),u):c(f)}function l(f){return t.consume(f),i=!0,u}function c(f){return o&&i&&mt(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(f)):r(f)}}function nI(t,e,r){let n=this;return i;function i(s){return s!==87&&s!==119||!zg.call(n,n.previous)||Hf(n.events)?r(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(eI,t.attempt(Lg,t.attempt(Mg,o),r),r)(s))}function o(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function iI(t,e,r){let n=this,i="",o=!1;return s;function s(f){return(f===72||f===104)&&$g.call(n,n.previous)&&!Hf(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),t.consume(f),a):r(f)}function a(f){if(mt(f)&&i.length<5)return i+=String.fromCodePoint(f),t.consume(f),a;if(f===58){let p=i.toLowerCase();if(p==="http"||p==="https")return t.consume(f),u}return r(f)}function u(f){return f===47?(t.consume(f),o?l:(o=!0,u)):r(f)}function l(f){return f===null||Ei(f)||Ce(f)||Sr(f)||Ai(f)?r(f):t.attempt(Lg,t.attempt(Mg,c),r)(f)}function c(f){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(f)}}function oI(t,e,r){let n=0;return i;function i(s){return(s===87||s===119)&&n<3?(n++,t.consume(s),i):s===46&&n===3?(t.consume(s),o):r(s)}function o(s){return s===null?r(s):e(s)}}function sI(t,e,r){let n,i,o;return s;function s(l){return l===46||l===95?t.check(Bg,u,a)(l):l===null||Ce(l)||Sr(l)||l!==45&&Ai(l)?u(l):(o=!0,t.consume(l),s)}function a(l){return l===95?n=!0:(i=n,n=void 0),t.consume(l),s}function u(l){return i||n||!o?r(l):e(l)}}function aI(t,e){let r=0,n=0;return i;function i(s){return s===40?(r++,t.consume(s),i):s===41&&n<r?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?t.check(Bg,e,o)(s):s===null||Ce(s)||Sr(s)?e(s):(t.consume(s),i)}function o(s){return s===41&&n++,t.consume(s),i}}function uI(t,e,r){return n;function n(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),n):a===38?(t.consume(a),o):a===93?(t.consume(a),i):a===60||a===null||Ce(a)||Sr(a)?e(a):r(a)}function i(a){return a===null||a===40||a===91||Ce(a)||Sr(a)?e(a):n(a)}function o(a){return mt(a)?s(a):r(a)}function s(a){return a===59?(t.consume(a),n):mt(a)?(t.consume(a),s):r(a)}}function lI(t,e,r){return n;function n(o){return t.consume(o),i}function i(o){return gt(o)?r(o):e(o)}}function zg(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Ce(t)}function $g(t){return!mt(t)}function qg(t){return!(t===47||Gf(t))}function Gf(t){return t===43||t===45||t===46||t===95||gt(t)}function Hf(t){let e=t.length,r=!1;for(;e--;){let n=t[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var cI={tokenize:xI,partial:!0};function Kf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hI,continuation:{tokenize:mI},exit:gI}},text:{91:{name:"gfmFootnoteCall",tokenize:dI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:fI,resolveTo:pI}}}}function fI(t,e,r){let n=this,i=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s;for(;i--;){let u=n.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!s||!s._balanced)return r(u);let l=St(n.sliceSerialize({start:s.end,end:n.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?r(u):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),e(u))}}function pI(t,e){let r=t.length,n;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){n=t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[t[r+1],t[r+2],["enter",i,e],t[r+3],t[r+4],["enter",o,e],["exit",o,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(r,t.length-r+1,...u),t}function dI(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,s;return a;function a(f){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(f):(t.enter("gfmFootnoteCallMarker"),t.consume(f),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",l)}function l(f){if(o>999||f===93&&!s||f===null||f===91||Ce(f))return r(f);if(f===93){t.exit("chunkString");let p=t.exit("gfmFootnoteCallString");return i.includes(St(n.sliceSerialize(p)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):r(f)}return Ce(f)||(s=!0),o++,t.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(t.consume(f),o++,l):l(f)}}function hI(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return u;function u(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):r(m)}function c(m){if(s>999||m===93&&!a||m===null||m===91||Ce(m))return r(m);if(m===93){t.exit("chunkString");let y=t.exit("gfmFootnoteDefinitionLabelString");return o=St(n.sliceSerialize(y)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),p}return Ce(m)||(a=!0),s++,t.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(t.consume(m),s++,c):c(m)}function p(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),i.includes(o)||i.push(o),ie(t,d,"gfmFootnoteDefinitionWhitespace")):r(m)}function d(m){return e(m)}}function mI(t,e,r){return t.check(Ir,e,t.attempt(cI,e,r))}function gI(t){t.exit("gfmFootnoteDefinition")}function xI(t,e,r){let n=this;return ie(t,i,"gfmFootnoteDefinitionIndent",5);function i(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):r(o)}}function Yf(t){let r=(t||{}).singleTilde,n={name:"strikethrough",tokenize:o,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(s,a){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let l=u;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[u][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",c,a],["enter",s[l][1],a],["exit",s[l][1],a],["enter",f,a]],d=a.parser.constructs.insideSpan.null;d&&it(p,p.length,0,An(d,s.slice(l+1,u),a)),it(p,p.length,0,[["exit",f,a],["enter",s[u][1],a],["exit",s[u][1],a],["exit",c,a]]),it(s,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function o(s,a,u){let l=this.previous,c=this.events,f=0;return p;function p(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(s.enter("strikethroughSequenceTemporary"),d(m))}function d(m){let y=Qr(l);if(m===126)return f>1?u(m):(s.consume(m),f++,d);if(f<2&&!r)return u(m);let g=s.exit("strikethroughSequenceTemporary"),b=Qr(m);return g._open=!b||b===2&&!!y,g._close=!y||y===2&&!!b,a(m)}}}var au=class{constructor(){this.map=[]}add(e,r,n){yI(this,e,r,n)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(e.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),e.length=this.map[r][0];n.push(e.slice()),e.length=0;let i=n.pop();for(;i;){for(let o of i)e.push(o);i=n.pop()}this.map.length=0}};function yI(t,e,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=r,t.map[i][2].push(...n);return}i+=1}t.map.push([e,r,n])}}function Vg(t,e){let r=!1,n=[];for(;e<t.length;){let i=t[e];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let o=n.length-1;n[o]=n[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);e+=1}return n}function Zf(){return{flow:{null:{name:"table",tokenize:bI,resolveAll:EI}}}}function bI(t,e,r){let n=this,i=0,o=0,s;return a;function a(_){let L=n.events.length-1;for(;L>-1;){let P=n.events[L][1].type;if(P==="lineEnding"||P==="linePrefix")L--;else break}let F=L>-1?n.events[L][1].type:null,I=F==="tableHead"||F==="tableRow"?S:u;return I===S&&n.parser.lazy[n.now().line]?r(_):I(_)}function u(_){return t.enter("tableHead"),t.enter("tableRow"),l(_)}function l(_){return _===124||(s=!0,o+=1),c(_)}function c(_){return _===null?r(_):z(_)?o>1?(o=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),d):r(_):se(_)?ie(t,c,"whitespace")(_):(o+=1,s&&(s=!1,i+=1),_===124?(t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),s=!0,c):(t.enter("data"),f(_)))}function f(_){return _===null||_===124||Ce(_)?(t.exit("data"),c(_)):(t.consume(_),_===92?p:f)}function p(_){return _===92||_===124?(t.consume(_),f):f(_)}function d(_){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(_):(t.enter("tableDelimiterRow"),s=!1,se(_)?ie(t,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):m(_))}function m(_){return _===45||_===58?g(_):_===124?(s=!0,t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),y):R(_)}function y(_){return se(_)?ie(t,g,"whitespace")(_):g(_)}function g(_){return _===58?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(_),t.exit("tableDelimiterMarker"),b):_===45?(o+=1,b(_)):_===null||z(_)?D(_):R(_)}function b(_){return _===45?(t.enter("tableDelimiterFiller"),w(_)):R(_)}function w(_){return _===45?(t.consume(_),w):_===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(_),t.exit("tableDelimiterMarker"),k):(t.exit("tableDelimiterFiller"),k(_))}function k(_){return se(_)?ie(t,D,"whitespace")(_):D(_)}function D(_){return _===124?m(_):_===null||z(_)?!s||i!==o?R(_):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(_)):R(_)}function R(_){return r(_)}function S(_){return t.enter("tableRow"),de(_)}function de(_){return _===124?(t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),de):_===null||z(_)?(t.exit("tableRow"),e(_)):se(_)?ie(t,de,"whitespace")(_):(t.enter("data"),ye(_))}function ye(_){return _===null||_===124||Ce(_)?(t.exit("data"),de(_)):(t.consume(_),_===92?be:ye)}function be(_){return _===92||_===124?(t.consume(_),ye):ye(_)}}function EI(t,e){let r=-1,n=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,u=0,l,c,f,p=new au;for(;++r<t.length;){let d=t[r],m=d[1];d[0]==="enter"?m.type==="tableHead"?(a=!1,u!==0&&(Gg(p,e,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(r,0,[["enter",l,e]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(n=!0,f=void 0,o=[0,0,0,0],s=[0,r+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(r,0,[["enter",c,e]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],f=uu(p,e,o,i,void 0,f),o=[0,0,0,0]),s[2]=r)):m.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(s[0]=s[1],f=uu(p,e,o,i,void 0,f)),o=s,s=[o[1],r,0,0])):m.type==="tableHead"?(a=!0,u=r):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=r,o[1]!==0?(s[0]=s[1],f=uu(p,e,o,i,r,f)):s[1]!==0&&(f=uu(p,e,s,i,r,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=r)}for(u!==0&&Gg(p,e,u,l,c),p.consume(e.events),r=-1;++r<e.events.length;){let d=e.events[r];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=Vg(e.events,r))}return t}function uu(t,e,r,n,i,o){let s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",a="tableContent";r[0]!==0&&(o.end=Object.assign({},fo(e.events,r[0])),t.add(r[0],0,[["exit",o,e]]));let u=fo(e.events,r[1]);if(o={type:s,start:Object.assign({},u),end:Object.assign({},u)},t.add(r[1],0,[["enter",o,e]]),r[2]!==0){let l=fo(e.events,r[2]),c=fo(e.events,r[3]),f={type:a,start:Object.assign({},l),end:Object.assign({},c)};if(t.add(r[2],0,[["enter",f,e]]),n!==2){let p=e.events[r[2]],d=e.events[r[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){let m=r[2]+1,y=r[3]-r[2]-1;t.add(m,y,[])}}t.add(r[3]+1,0,[["exit",f,e]])}return i!==void 0&&(o.end=Object.assign({},fo(e.events,i)),t.add(i,0,[["exit",o,e]]),o=void 0),o}function Gg(t,e,r,n,i){let o=[],s=fo(e.events,r);i&&(i.end=Object.assign({},s),o.push(["exit",i,e])),n.end=Object.assign({},s),o.push(["exit",n,e]),t.add(r+1,0,o)}function fo(t,e){let r=t[e],n=r[0]==="enter"?"start":"end";return r[1][n]}var AI={name:"tasklistCheck",tokenize:kI};function Xf(){return{text:{91:AI}}}function kI(t,e,r){let n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),o)}function o(u){return Ce(u)?(t.enter("taskListCheckValueUnchecked"),t.consume(u),t.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(t.enter("taskListCheckValueChecked"),t.consume(u),t.exit("taskListCheckValueChecked"),s):r(u)}function s(u){return u===93?(t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):r(u)}function a(u){return z(u)?e(u):se(u)?t.check({tokenize:wI},e,r)(u):r(u)}}function wI(t,e,r){return ie(t,n,"whitespace");function n(i){return i===null?r(i):e(i)}}function Wg(t){return Ma([Wf(),Kf(),Yf(t),Zf(),Xf()])}var CI={};function wn(t){let e=this,r=t||CI,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Wg(r)),o.push(qf()),s.push(Vf(r))}import{mdatCheck as TI,mdatClean as Hg,mdatExpand as _I,mdatSplit as Kg}from"remark-mdat";import{VFile as wV}from"vfile";async function Cn(t,e,r,n,i,o,s){let a=await e({additionalConfig:o,additionalRules:s});o=a;let u=await im(),l=Na(t),c=nm(l,i,n,"md"),f=[],p=r(a,u);for(let{input:d,name:m,output:y}of c){let g=await Ql(d),b=await p.process(g);b.dirname=y,b.basename=m,f.push(b)}return f}function lu(t,e){return co().use({settings:{bullet:"-",emphasis:"_"}}).use(wn).use(e).use(()=>async function(n,i){Kg(n,i),Hg(n,i,t),await _I(n,i,t)})}function cu(t,e){return co().use({settings:{bullet:"-",emphasis:"_"}}).use(wn).use(e).use(()=>function(n,i){Kg(n,i),Hg(n,i,t)})}function fu(t,e){return co().use({settings:{bullet:"-",emphasis:"_"}}).use(wn).use(e).use(()=>async function(n,i){await TI(n,i,{...t,paranoid:!1})})}async function Yg(t,e,r,n,i){return Cn(t,bi,lu,e,r,n,i)}async function Zg(t,e,r,n,i){return Cn(t,bi,fu,e,r,n,i)}async function Xg(t,e,r,n,i){return Cn(t,bi,cu,e,r,n,i)}var pu={badges:{async content(t){let e=K.object({custom:K.record(K.object({image:K.string(),link:K.string()})).optional(),npm:K.array(K.string()).optional()}).optional().parse(t),r=await Jt(),{name:n}=r,i=[];if(!r.private&&r.publishConfig?.access==="public"&&i.push(`[](https://npmjs.com/package/${n})`),e?.npm!==void 0)for(let s of e.npm)i.push(`[](https://npmjs.com/package/${s})`);let{license:o}=r;if(o!==void 0&&i.push(`[](https://opensource.org/licenses/${o})`),e?.custom!==void 0)for(let[s,{image:a,link:u}]of Object.entries(e.custom))i.push(`[](${u})`);return i.join(`
|
|
105
|
-
`)},order:3}};import{globby as
|
|
104
|
+
`))}function u(d,m,y,g){let b=y.enter("tableCell"),w=y.enter("phrasing"),k=y.containerPhrasing(d,{...g,before:o,after:o});return w(),b(),k}function l(d,m){return Fg(d,{align:m,alignDelimiters:n,padding:r,stringLength:i})}function c(d,m,y){let g=d.children,b=-1,w=[],k=m.enter("table");for(;++b<g.length;)w[b]=f(g[b],m,y);return k(),w}function f(d,m,y){let g=d.children,b=-1,w=[],k=m.enter("tableRow");for(;++b<g.length;)w[b]=u(g[b],d,m,y);return k(),w}function p(d,m,y){let g=_i.inlineCode(d,m,y);return y.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function zf(){return{exit:{taskListCheckValueChecked:Pg,taskListCheckValueUnchecked:Pg,paragraph:QS}}}function $f(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:eI}}}function Pg(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function QS(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let i=e.children,o=-1,s;for(;++o<i.length;){let a=i[o];if(a.type==="paragraph"){s=a;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(t)}function eI(t,e,r,n){let i=t.children[0],o=typeof t.checked=="boolean"&&i&&i.type==="paragraph",s="["+(t.checked?"x":" ")+"] ",a=r.createTracker(n);o&&a.move(s);let u=_i.listItem(t,e,r,{...n,...a.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+s}}function qf(){return[Rf(),Nf(),Lf(),jf(),zf()]}function Vf(t){return{extensions:[Ff(),Pf(t),Mf(),Uf(t),$f()]}}var tI={tokenize:sI,partial:!0},Lg={tokenize:aI,partial:!0},Mg={tokenize:uI,partial:!0},Bg={tokenize:lI,partial:!0},rI={tokenize:cI,partial:!0},jg={name:"wwwAutolink",tokenize:iI,previous:zg},Ug={name:"protocolAutolink",tokenize:oI,previous:$g},en={name:"emailAutolink",tokenize:nI,previous:qg},vr={};function Wf(){return{text:vr}}var Ii=48;for(;Ii<123;)vr[Ii]=en,Ii++,Ii===58?Ii=65:Ii===91&&(Ii=97);vr[43]=en;vr[45]=en;vr[46]=en;vr[95]=en;vr[72]=[en,Ug];vr[104]=[en,Ug];vr[87]=[en,jg];vr[119]=[en,jg];function nI(t,e,r){let n=this,i,o;return s;function s(f){return!Gf(f)||!qg.call(n,n.previous)||Hf(n.events)?r(f):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(f))}function a(f){return Gf(f)?(t.consume(f),a):f===64?(t.consume(f),u):r(f)}function u(f){return f===46?t.check(rI,c,l)(f):f===45||f===95||gt(f)?(o=!0,t.consume(f),u):c(f)}function l(f){return t.consume(f),i=!0,u}function c(f){return o&&i&&mt(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(f)):r(f)}}function iI(t,e,r){let n=this;return i;function i(s){return s!==87&&s!==119||!zg.call(n,n.previous)||Hf(n.events)?r(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(tI,t.attempt(Lg,t.attempt(Mg,o),r),r)(s))}function o(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function oI(t,e,r){let n=this,i="",o=!1;return s;function s(f){return(f===72||f===104)&&$g.call(n,n.previous)&&!Hf(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),t.consume(f),a):r(f)}function a(f){if(mt(f)&&i.length<5)return i+=String.fromCodePoint(f),t.consume(f),a;if(f===58){let p=i.toLowerCase();if(p==="http"||p==="https")return t.consume(f),u}return r(f)}function u(f){return f===47?(t.consume(f),o?l:(o=!0,u)):r(f)}function l(f){return f===null||Ei(f)||Ce(f)||Sr(f)||Ai(f)?r(f):t.attempt(Lg,t.attempt(Mg,c),r)(f)}function c(f){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(f)}}function sI(t,e,r){let n=0;return i;function i(s){return(s===87||s===119)&&n<3?(n++,t.consume(s),i):s===46&&n===3?(t.consume(s),o):r(s)}function o(s){return s===null?r(s):e(s)}}function aI(t,e,r){let n,i,o;return s;function s(l){return l===46||l===95?t.check(Bg,u,a)(l):l===null||Ce(l)||Sr(l)||l!==45&&Ai(l)?u(l):(o=!0,t.consume(l),s)}function a(l){return l===95?n=!0:(i=n,n=void 0),t.consume(l),s}function u(l){return i||n||!o?r(l):e(l)}}function uI(t,e){let r=0,n=0;return i;function i(s){return s===40?(r++,t.consume(s),i):s===41&&n<r?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?t.check(Bg,e,o)(s):s===null||Ce(s)||Sr(s)?e(s):(t.consume(s),i)}function o(s){return s===41&&n++,t.consume(s),i}}function lI(t,e,r){return n;function n(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),n):a===38?(t.consume(a),o):a===93?(t.consume(a),i):a===60||a===null||Ce(a)||Sr(a)?e(a):r(a)}function i(a){return a===null||a===40||a===91||Ce(a)||Sr(a)?e(a):n(a)}function o(a){return mt(a)?s(a):r(a)}function s(a){return a===59?(t.consume(a),n):mt(a)?(t.consume(a),s):r(a)}}function cI(t,e,r){return n;function n(o){return t.consume(o),i}function i(o){return gt(o)?r(o):e(o)}}function zg(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Ce(t)}function $g(t){return!mt(t)}function qg(t){return!(t===47||Gf(t))}function Gf(t){return t===43||t===45||t===46||t===95||gt(t)}function Hf(t){let e=t.length,r=!1;for(;e--;){let n=t[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var fI={tokenize:yI,partial:!0};function Kf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:mI,continuation:{tokenize:gI},exit:xI}},text:{91:{name:"gfmFootnoteCall",tokenize:hI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pI,resolveTo:dI}}}}function pI(t,e,r){let n=this,i=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s;for(;i--;){let u=n.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!s||!s._balanced)return r(u);let l=St(n.sliceSerialize({start:s.end,end:n.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?r(u):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),e(u))}}function dI(t,e){let r=t.length,n;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){n=t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[t[r+1],t[r+2],["enter",i,e],t[r+3],t[r+4],["enter",o,e],["exit",o,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(r,t.length-r+1,...u),t}function hI(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,s;return a;function a(f){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(f):(t.enter("gfmFootnoteCallMarker"),t.consume(f),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",l)}function l(f){if(o>999||f===93&&!s||f===null||f===91||Ce(f))return r(f);if(f===93){t.exit("chunkString");let p=t.exit("gfmFootnoteCallString");return i.includes(St(n.sliceSerialize(p)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):r(f)}return Ce(f)||(s=!0),o++,t.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(t.consume(f),o++,l):l(f)}}function mI(t,e,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return u;function u(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):r(m)}function c(m){if(s>999||m===93&&!a||m===null||m===91||Ce(m))return r(m);if(m===93){t.exit("chunkString");let y=t.exit("gfmFootnoteDefinitionLabelString");return o=St(n.sliceSerialize(y)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),p}return Ce(m)||(a=!0),s++,t.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(t.consume(m),s++,c):c(m)}function p(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),i.includes(o)||i.push(o),ie(t,d,"gfmFootnoteDefinitionWhitespace")):r(m)}function d(m){return e(m)}}function gI(t,e,r){return t.check(Ir,e,t.attempt(fI,e,r))}function xI(t){t.exit("gfmFootnoteDefinition")}function yI(t,e,r){let n=this;return ie(t,i,"gfmFootnoteDefinitionIndent",5);function i(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):r(o)}}function Yf(t){let r=(t||{}).singleTilde,n={name:"strikethrough",tokenize:o,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(s,a){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let l=u;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[u][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",c,a],["enter",s[l][1],a],["exit",s[l][1],a],["enter",f,a]],d=a.parser.constructs.insideSpan.null;d&&it(p,p.length,0,An(d,s.slice(l+1,u),a)),it(p,p.length,0,[["exit",f,a],["enter",s[u][1],a],["exit",s[u][1],a],["exit",c,a]]),it(s,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function o(s,a,u){let l=this.previous,c=this.events,f=0;return p;function p(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(s.enter("strikethroughSequenceTemporary"),d(m))}function d(m){let y=Qr(l);if(m===126)return f>1?u(m):(s.consume(m),f++,d);if(f<2&&!r)return u(m);let g=s.exit("strikethroughSequenceTemporary"),b=Qr(m);return g._open=!b||b===2&&!!y,g._close=!y||y===2&&!!b,a(m)}}}var au=class{constructor(){this.map=[]}add(e,r,n){bI(this,e,r,n)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(e.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),e.length=this.map[r][0];n.push(e.slice()),e.length=0;let i=n.pop();for(;i;){for(let o of i)e.push(o);i=n.pop()}this.map.length=0}};function bI(t,e,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=r,t.map[i][2].push(...n);return}i+=1}t.map.push([e,r,n])}}function Vg(t,e){let r=!1,n=[];for(;e<t.length;){let i=t[e];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let o=n.length-1;n[o]=n[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);e+=1}return n}function Zf(){return{flow:{null:{name:"table",tokenize:EI,resolveAll:AI}}}}function EI(t,e,r){let n=this,i=0,o=0,s;return a;function a(_){let L=n.events.length-1;for(;L>-1;){let P=n.events[L][1].type;if(P==="lineEnding"||P==="linePrefix")L--;else break}let F=L>-1?n.events[L][1].type:null,I=F==="tableHead"||F==="tableRow"?S:u;return I===S&&n.parser.lazy[n.now().line]?r(_):I(_)}function u(_){return t.enter("tableHead"),t.enter("tableRow"),l(_)}function l(_){return _===124||(s=!0,o+=1),c(_)}function c(_){return _===null?r(_):z(_)?o>1?(o=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),d):r(_):se(_)?ie(t,c,"whitespace")(_):(o+=1,s&&(s=!1,i+=1),_===124?(t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),s=!0,c):(t.enter("data"),f(_)))}function f(_){return _===null||_===124||Ce(_)?(t.exit("data"),c(_)):(t.consume(_),_===92?p:f)}function p(_){return _===92||_===124?(t.consume(_),f):f(_)}function d(_){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(_):(t.enter("tableDelimiterRow"),s=!1,se(_)?ie(t,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):m(_))}function m(_){return _===45||_===58?g(_):_===124?(s=!0,t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),y):R(_)}function y(_){return se(_)?ie(t,g,"whitespace")(_):g(_)}function g(_){return _===58?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(_),t.exit("tableDelimiterMarker"),b):_===45?(o+=1,b(_)):_===null||z(_)?D(_):R(_)}function b(_){return _===45?(t.enter("tableDelimiterFiller"),w(_)):R(_)}function w(_){return _===45?(t.consume(_),w):_===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(_),t.exit("tableDelimiterMarker"),k):(t.exit("tableDelimiterFiller"),k(_))}function k(_){return se(_)?ie(t,D,"whitespace")(_):D(_)}function D(_){return _===124?m(_):_===null||z(_)?!s||i!==o?R(_):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(_)):R(_)}function R(_){return r(_)}function S(_){return t.enter("tableRow"),de(_)}function de(_){return _===124?(t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),de):_===null||z(_)?(t.exit("tableRow"),e(_)):se(_)?ie(t,de,"whitespace")(_):(t.enter("data"),ye(_))}function ye(_){return _===null||_===124||Ce(_)?(t.exit("data"),de(_)):(t.consume(_),_===92?be:ye)}function be(_){return _===92||_===124?(t.consume(_),ye):ye(_)}}function AI(t,e){let r=-1,n=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,u=0,l,c,f,p=new au;for(;++r<t.length;){let d=t[r],m=d[1];d[0]==="enter"?m.type==="tableHead"?(a=!1,u!==0&&(Gg(p,e,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(r,0,[["enter",l,e]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(n=!0,f=void 0,o=[0,0,0,0],s=[0,r+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(r,0,[["enter",c,e]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],f=uu(p,e,o,i,void 0,f),o=[0,0,0,0]),s[2]=r)):m.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(s[0]=s[1],f=uu(p,e,o,i,void 0,f)),o=s,s=[o[1],r,0,0])):m.type==="tableHead"?(a=!0,u=r):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=r,o[1]!==0?(s[0]=s[1],f=uu(p,e,o,i,r,f)):s[1]!==0&&(f=uu(p,e,s,i,r,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=r)}for(u!==0&&Gg(p,e,u,l,c),p.consume(e.events),r=-1;++r<e.events.length;){let d=e.events[r];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=Vg(e.events,r))}return t}function uu(t,e,r,n,i,o){let s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",a="tableContent";r[0]!==0&&(o.end=Object.assign({},fo(e.events,r[0])),t.add(r[0],0,[["exit",o,e]]));let u=fo(e.events,r[1]);if(o={type:s,start:Object.assign({},u),end:Object.assign({},u)},t.add(r[1],0,[["enter",o,e]]),r[2]!==0){let l=fo(e.events,r[2]),c=fo(e.events,r[3]),f={type:a,start:Object.assign({},l),end:Object.assign({},c)};if(t.add(r[2],0,[["enter",f,e]]),n!==2){let p=e.events[r[2]],d=e.events[r[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){let m=r[2]+1,y=r[3]-r[2]-1;t.add(m,y,[])}}t.add(r[3]+1,0,[["exit",f,e]])}return i!==void 0&&(o.end=Object.assign({},fo(e.events,i)),t.add(i,0,[["exit",o,e]]),o=void 0),o}function Gg(t,e,r,n,i){let o=[],s=fo(e.events,r);i&&(i.end=Object.assign({},s),o.push(["exit",i,e])),n.end=Object.assign({},s),o.push(["exit",n,e]),t.add(r+1,0,o)}function fo(t,e){let r=t[e],n=r[0]==="enter"?"start":"end";return r[1][n]}var kI={name:"tasklistCheck",tokenize:wI};function Xf(){return{text:{91:kI}}}function wI(t,e,r){let n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),o)}function o(u){return Ce(u)?(t.enter("taskListCheckValueUnchecked"),t.consume(u),t.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(t.enter("taskListCheckValueChecked"),t.consume(u),t.exit("taskListCheckValueChecked"),s):r(u)}function s(u){return u===93?(t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):r(u)}function a(u){return z(u)?e(u):se(u)?t.check({tokenize:CI},e,r)(u):r(u)}}function CI(t,e,r){return ie(t,n,"whitespace");function n(i){return i===null?r(i):e(i)}}function Wg(t){return Ma([Wf(),Kf(),Yf(t),Zf(),Xf()])}var TI={};function wn(t){let e=this,r=t||TI,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Wg(r)),o.push(qf()),s.push(Vf(r))}import{mdatCheck as _I,mdatClean as Hg,mdatExpand as SI,mdatSplit as Kg}from"remark-mdat";import{VFile as kV}from"vfile";async function Cn(t,e,r,n,i,o,s){let a=await e({additionalConfig:o,additionalRules:s});o=a;let u=await im(),l=Na(t),c=nm(l,i,n,"md"),f=[],p=r(a,u);for(let{input:d,name:m,output:y}of c){let g=await Ql(d),b=await p.process(g);b.dirname=y,b.basename=m,f.push(b)}return f}function lu(t,e){return co().use({settings:{bullet:"-",emphasis:"_"}}).use(wn).use(e).use(()=>async function(n,i){Kg(n,i),Hg(n,i,t),await SI(n,i,t)})}function cu(t,e){return co().use({settings:{bullet:"-",emphasis:"_"}}).use(wn).use(e).use(()=>function(n,i){Kg(n,i),Hg(n,i,t)})}function fu(t,e){return co().use({settings:{bullet:"-",emphasis:"_"}}).use(wn).use(e).use(()=>async function(n,i){await _I(n,i,{...t,paranoid:!1})})}async function Yg(t,e,r,n,i){return Cn(t,bi,lu,e,r,n,i)}async function Zg(t,e,r,n,i){return Cn(t,bi,fu,e,r,n,i)}async function Xg(t,e,r,n,i){return Cn(t,bi,cu,e,r,n,i)}var pu={badges:{async content(t){let e=K.object({custom:K.record(K.object({image:K.string(),link:K.string()})).optional(),npm:K.array(K.string()).optional()}).optional().parse(t),r=await Jt(),{name:n}=r,i=[];if(!r.private&&r.publishConfig?.access==="public"&&i.push(`[](https://npmjs.com/package/${n})`),e?.npm!==void 0)for(let s of e.npm)i.push(`[](https://npmjs.com/package/${s})`);let{license:o}=r;if(o!==void 0&&i.push(`[](https://opensource.org/licenses/${o})`),e?.custom!==void 0)for(let[s,{image:a,link:u}]of Object.entries(e.custom))i.push(`[](${u})`);return i.join(`
|
|
105
|
+
`)},order:3}};import{globby as OI}from"globby";import du from"path";import{readPackage as vI}from"read-pkg";var hu={banner:{async content(t){let e=K.object({alt:K.string().optional(),src:K.string().optional()}).optional().parse(t),{assetsPath:r,packageFile:n}=await _r();if(n===void 0)throw new Error("No package.json found");let i=e?.src??await Jg(r)??await Jg();if(i===void 0)throw new Error("Banner image not found at any typical location, consider adding something at ./assets/banner.webp");if(!Qg(i)&&!await io(i))throw new Error(`Banner image not found at "${i}"`);let o=e?.alt??`${(await vI({cwd:du.dirname(n)})).name} banner`;if(o===void 0||o==="undefined banner")throw new Error("Banner image alt text not available");return``},order:2}};async function Jg(t){let{packageFile:e}=await _r();if(e===void 0)throw new Error("No package.json found");let r=du.dirname(e),n=t===void 0?[".","assets","media","readme-assets","readme-media","readme","images",".github/assets"]:[t],i=["banner","cover","demo","header","hero","image","logo","overview","readme","screenshot","screenshots","splash"],o=["png","gif","jpg","jpeg","svg","webp"],s=await OI(n.map(a=>du.join(r,a)),{deep:1,expandDirectories:{extensions:o,files:i}});if(s.length>0)return du.relative(process.cwd(),s[0])}function Qg(t,e=!0){if(typeof t!="string")throw new TypeError("Expected a string");if(t=t.trim(),t.includes(" "))return!1;try{return new URL(t),!0}catch{return e?Qg(`https://${t}`,!1):!1}}import{getSoleRule as BP}from"remark-mdat";import{execaCommand as TP}from"execa";import{log as yA}from"remark-mdat";function ex(t,e=Number.MAX_SAFE_INTEGER){let r=[],n=DI(t,e);return r.push(RI(n)),r.push(FI(t,n)),n.hasMultipleSubcommands&&n.canRecurse&&r.push(NI(n.fullCommandName)),n.defaultCommand?.commandName!==void 0&&r.push(PI(n)),r.push(LI(t,n)),t.positionals&&!n.commandsOnly&&r.push(Jf(["Positional Argument","Description","Type","Default"],t.positionals.map(i=>[i.arguments?[i.arguments.map(o=>`\`${o}\``)].join(" "):"",`${i.description??""}${i.required===void 0?"":i.required?" _(Required.)_":" _(Optional.)_"}`,i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")?i.defaultValue:`\`${i.defaultValue}\``:""]))),t.commands&&r.push(Jf(["Command","Argument","Description"],t.commands.map(i=>[`\`${i.commandName??(i.default?"[default]":"")}\``,i.arguments?i.arguments.map(o=>`\`${o}\``).join(" "):"",`${i.description??""}${i.default?" _(Default command.)_":""}`]))),t.options&&!n.commandsOnly&&r.push(Jf(["Option","Argument","Description","Type","Default"],t.options.map(i=>[i.flags!==void 0||i.aliases!==void 0?[...i.flags??[],...i.aliases??[]].map(o=>`\`${o}\``).join("<br>"):"",i.arguments?i.arguments.map(o=>`\`${o}\``).join(" "):"",i.description??"",i.choices?i.choices.map(o=>`\`${o}\``).join(" "):i.type?`\`${i.type}\``:"",i.defaultValue?i.defaultValue.includes(" ")&&i.choices===void 0?i.defaultValue:`\`${i.defaultValue}\``:""]))),n.canRecurse&&n.hasMultipleSubcommands&&r.push("_See the sections below for more information on each subcommand._"),r.join(`
|
|
106
106
|
|
|
107
|
-
`)}function
|
|
107
|
+
`)}function DI(t,e){let r=t.subcommandName===void 0,n=t.commands?t.commands.length>1:!1,i=e>1,o=t.commands?.find(l=>l.default),s=t.commands?.find(l=>l.commandName===void 0),a=`${t.commandName}${t.subcommandName?` ${t.subcommandName}`:""}`,u=i&&n&&o?.commandName!==void 0;return{canRecurse:i,commandsOnly:u,defaultCommand:o,fullCommandName:a,hasMultipleSubcommands:n,isTopLevel:r,topLevelCommand:s}}function RI(t){return`#### ${t.isTopLevel?"Command":"Subcommand"}: \`${t.fullCommandName}\``}function FI(t,e){return e.isTopLevel&&e.topLevelCommand?.description?(t.commands=t.commands?.filter(r=>r!==e.topLevelCommand),e.topLevelCommand.description):t.description??""}function NI(t){return`This section lists top-level commands for \`${t}\`.`}function PI(t){return`If no command is provided, \`${t.defaultCommand?.parentCommandName} ${t.defaultCommand?.commandName}\` is run by default.`}function LI(t,e){let r=e.topLevelCommand?.arguments?` ${e.topLevelCommand.arguments.join(" ")}`:t.arguments?` ${t.arguments.join(" ")}`:"";return`Usage:
|
|
108
108
|
|
|
109
109
|
\`\`\`txt
|
|
110
110
|
${e.fullCommandName}${r}
|
|
111
|
-
\`\`\``}function Jf(t,e){let r=
|
|
111
|
+
\`\`\``}function Jf(t,e){let r=MI(e);t=t.filter((i,o)=>!r.includes(o)),e=e.map(i=>i.filter((o,s)=>!r.includes(s)));let n="";n+=`| ${t.join(" | ")} |
|
|
112
112
|
`,n+=`| ${t.map(()=>"---").join(" | ")} |
|
|
113
113
|
`;for(let i of e)n+=`| ${i.join(" | ")} |
|
|
114
|
-
`;return n}function LI(t){let e=[],r=t[0]?.length||0;for(let n=0;n<r;n++){let i=!0;for(let o of t)if(o[n]!==""){i=!1;break}i&&e.push(n)}return e}import{log as ld}from"remark-mdat";var MI=typeof global=="object"&&global&&global.Object===Object&&global,mu=MI;var BI=typeof self=="object"&&self&&self.Object===Object&&self,jI=mu||BI||Function("return this")(),ct=jI;var UI=ct.Symbol,At=UI;var tx=Object.prototype,zI=tx.hasOwnProperty,$I=tx.toString,ks=At?At.toStringTag:void 0;function qI(t){var e=zI.call(t,ks),r=t[ks];try{t[ks]=void 0;var n=!0}catch{}var i=$I.call(t);return n&&(e?t[ks]=r:delete t[ks]),i}var rx=qI;var VI=Object.prototype,GI=VI.toString;function WI(t){return GI.call(t)}var nx=WI;var HI="[object Null]",KI="[object Undefined]",ix=At?At.toStringTag:void 0;function YI(t){return t==null?t===void 0?KI:HI:ix&&ix in Object(t)?rx(t):nx(t)}var Nt=YI;function ZI(t){return t!=null&&typeof t=="object"}var ot=ZI;var XI="[object Symbol]";function JI(t){return typeof t=="symbol"||ot(t)&&Nt(t)==XI}var Tn=JI;function QI(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Dr=QI;var eO=Array.isArray,Q=eO;var tO=1/0,ox=At?At.prototype:void 0,sx=ox?ox.toString:void 0;function ax(t){if(typeof t=="string")return t;if(Q(t))return Dr(t,ax)+"";if(Tn(t))return sx?sx.call(t):"";var e=t+"";return e=="0"&&1/t==-tO?"-0":e}var ux=ax;var rO=/\s/;function nO(t){for(var e=t.length;e--&&rO.test(t.charAt(e)););return e}var lx=nO;var iO=/^\s+/;function oO(t){return t&&t.slice(0,lx(t)+1).replace(iO,"")}var cx=oO;function sO(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ye=sO;var fx=NaN,aO=/^[-+]0x[0-9a-f]+$/i,uO=/^0b[01]+$/i,lO=/^0o[0-7]+$/i,cO=parseInt;function fO(t){if(typeof t=="number")return t;if(Tn(t))return fx;if(Ye(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ye(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cx(t);var r=uO.test(t);return r||lO.test(t)?cO(t.slice(2),r?2:8):aO.test(t)?fx:+t}var px=fO;var dx=1/0,pO=17976931348623157e292;function dO(t){if(!t)return t===0?t:0;if(t=px(t),t===dx||t===-dx){var e=t<0?-1:1;return e*pO}return t===t?t:0}var hx=dO;function hO(t){var e=hx(t),r=e%1;return e===e?r?e-r:e:0}var Rr=hO;function mO(t){return t}var cr=mO;var gO="[object AsyncFunction]",xO="[object Function]",yO="[object GeneratorFunction]",bO="[object Proxy]";function EO(t){if(!Ye(t))return!1;var e=Nt(t);return e==xO||e==yO||e==gO||e==bO}var Pt=EO;var AO=ct["__core-js_shared__"],gu=AO;var mx=(function(){var t=/[^.]+$/.exec(gu&&gu.keys&&gu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function kO(t){return!!mx&&mx in t}var gx=kO;var wO=Function.prototype,CO=wO.toString;function TO(t){if(t!=null){try{return CO.call(t)}catch{}try{return t+""}catch{}}return""}var tn=TO;var _O=/[\\^$.*+?()[\]{}|]/g,SO=/^\[object .+?Constructor\]$/,IO=Function.prototype,OO=Object.prototype,vO=IO.toString,DO=OO.hasOwnProperty,RO=RegExp("^"+vO.call(DO).replace(_O,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function FO(t){if(!Ye(t)||gx(t))return!1;var e=Pt(t)?RO:SO;return e.test(tn(t))}var xx=FO;function NO(t,e){return t?.[e]}var yx=NO;function PO(t,e){var r=yx(t,e);return xx(r)?r:void 0}var qt=PO;var LO=qt(ct,"WeakMap"),xu=LO;var bx=Object.create,MO=(function(){function t(){}return function(e){if(!Ye(e))return{};if(bx)return bx(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),Ex=MO;function BO(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Ax=BO;function jO(){}var Ze=jO;function UO(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var kx=UO;var zO=800,$O=16,qO=Date.now;function VO(t){var e=0,r=0;return function(){var n=qO(),i=$O-(n-r);if(r=n,i>0){if(++e>=zO)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var wx=VO;function GO(t){return function(){return t}}var Cx=GO;var WO=(function(){try{var t=qt(Object,"defineProperty");return t({},"",{}),t}catch{}})(),po=WO;var HO=po?function(t,e){return po(t,"toString",{configurable:!0,enumerable:!1,value:Cx(e),writable:!0})}:cr,Tx=HO;var KO=wx(Tx),_x=KO;function YO(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var yu=YO;function ZO(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}var bu=ZO;function XO(t){return t!==t}var Sx=XO;function JO(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var Ix=JO;function QO(t,e,r){return e===e?Ix(t,e,r):bu(t,Sx,r)}var ho=QO;function ev(t,e){var r=t==null?0:t.length;return!!r&&ho(t,e,0)>-1}var Eu=ev;var tv=9007199254740991,rv=/^(?:0|[1-9]\d*)$/;function nv(t,e){var r=typeof t;return e=e??tv,!!e&&(r=="number"||r!="symbol"&&rv.test(t))&&t>-1&&t%1==0&&t<e}var _n=nv;function iv(t,e,r){e=="__proto__"&&po?po(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var mo=iv;function ov(t,e){return t===e||t!==t&&e!==e}var Fr=ov;var sv=Object.prototype,av=sv.hasOwnProperty;function uv(t,e,r){var n=t[e];(!(av.call(t,e)&&Fr(n,r))||r===void 0&&!(e in t))&&mo(t,e,r)}var Sn=uv;function lv(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var a=e[o],u=n?n(r[a],t[a],a,r,t):void 0;u===void 0&&(u=t[a]),i?mo(r,a,u):Sn(r,a,u)}return r}var Nr=lv;var Ox=Math.max;function cv(t,e,r){return e=Ox(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Ox(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(s),Ax(t,this,a)}}var vx=cv;function fv(t,e){return _x(vx(t,e,cr),t+"")}var go=fv;var pv=9007199254740991;function dv(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=pv}var xo=dv;function hv(t){return t!=null&&xo(t.length)&&!Pt(t)}var ft=hv;function mv(t,e,r){if(!Ye(r))return!1;var n=typeof e;return(n=="number"?ft(r)&&_n(e,r.length):n=="string"&&e in r)?Fr(r[e],t):!1}var In=mv;function gv(t){return go(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&In(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var a=r[n];a&&t(e,a,n,o)}return e})}var Dx=gv;var xv=Object.prototype;function yv(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||xv;return t===r}var Pr=yv;function bv(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Rx=bv;var Ev="[object Arguments]";function Av(t){return ot(t)&&Nt(t)==Ev}var Qf=Av;var Fx=Object.prototype,kv=Fx.hasOwnProperty,wv=Fx.propertyIsEnumerable,Cv=Qf((function(){return arguments})())?Qf:function(t){return ot(t)&&kv.call(t,"callee")&&!wv.call(t,"callee")},On=Cv;function Tv(){return!1}var Nx=Tv;var Mx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Px=Mx&&typeof module=="object"&&module&&!module.nodeType&&module,_v=Px&&Px.exports===Mx,Lx=_v?ct.Buffer:void 0,Sv=Lx?Lx.isBuffer:void 0,Iv=Sv||Nx,rn=Iv;var Ov="[object Arguments]",vv="[object Array]",Dv="[object Boolean]",Rv="[object Date]",Fv="[object Error]",Nv="[object Function]",Pv="[object Map]",Lv="[object Number]",Mv="[object Object]",Bv="[object RegExp]",jv="[object Set]",Uv="[object String]",zv="[object WeakMap]",$v="[object ArrayBuffer]",qv="[object DataView]",Vv="[object Float32Array]",Gv="[object Float64Array]",Wv="[object Int8Array]",Hv="[object Int16Array]",Kv="[object Int32Array]",Yv="[object Uint8Array]",Zv="[object Uint8ClampedArray]",Xv="[object Uint16Array]",Jv="[object Uint32Array]",Ve={};Ve[Vv]=Ve[Gv]=Ve[Wv]=Ve[Hv]=Ve[Kv]=Ve[Yv]=Ve[Zv]=Ve[Xv]=Ve[Jv]=!0;Ve[Ov]=Ve[vv]=Ve[$v]=Ve[Dv]=Ve[qv]=Ve[Rv]=Ve[Fv]=Ve[Nv]=Ve[Pv]=Ve[Lv]=Ve[Mv]=Ve[Bv]=Ve[jv]=Ve[Uv]=Ve[zv]=!1;function Qv(t){return ot(t)&&xo(t.length)&&!!Ve[Nt(t)]}var Bx=Qv;function e0(t){return function(e){return t(e)}}var Lr=e0;var jx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ws=jx&&typeof module=="object"&&module&&!module.nodeType&&module,t0=ws&&ws.exports===jx,ep=t0&&mu.process,r0=(function(){try{var t=ws&&ws.require&&ws.require("util").types;return t||ep&&ep.binding&&ep.binding("util")}catch{}})(),fr=r0;var Ux=fr&&fr.isTypedArray,n0=Ux?Lr(Ux):Bx,yo=n0;var i0=Object.prototype,o0=i0.hasOwnProperty;function s0(t,e){var r=Q(t),n=!r&&On(t),i=!r&&!n&&rn(t),o=!r&&!n&&!i&&yo(t),s=r||n||i||o,a=s?Rx(t.length,String):[],u=a.length;for(var l in t)(e||o0.call(t,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||_n(l,u)))&&a.push(l);return a}var Au=s0;function a0(t,e){return function(r){return t(e(r))}}var ku=a0;var u0=ku(Object.keys,Object),zx=u0;var l0=Object.prototype,c0=l0.hasOwnProperty;function f0(t){if(!Pr(t))return zx(t);var e=[];for(var r in Object(t))c0.call(t,r)&&r!="constructor"&&e.push(r);return e}var wu=f0;function p0(t){return ft(t)?Au(t):wu(t)}var Pe=p0;var d0=Object.prototype,h0=d0.hasOwnProperty,m0=Dx(function(t,e){if(Pr(e)||ft(e)){Nr(e,Pe(e),t);return}for(var r in e)h0.call(e,r)&&Sn(t,r,e[r])}),Tt=m0;function g0(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var $x=g0;var x0=Object.prototype,y0=x0.hasOwnProperty;function b0(t){if(!Ye(t))return $x(t);var e=Pr(t),r=[];for(var n in t)n=="constructor"&&(e||!y0.call(t,n))||r.push(n);return r}var qx=b0;function E0(t){return ft(t)?Au(t,!0):qx(t)}var vn=E0;var A0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k0=/^\w*$/;function w0(t,e){if(Q(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Tn(t)?!0:k0.test(t)||!A0.test(t)||e!=null&&t in Object(e)}var bo=w0;var C0=qt(Object,"create"),nn=C0;function T0(){this.__data__=nn?nn(null):{},this.size=0}var Vx=T0;function _0(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Gx=_0;var S0="__lodash_hash_undefined__",I0=Object.prototype,O0=I0.hasOwnProperty;function v0(t){var e=this.__data__;if(nn){var r=e[t];return r===S0?void 0:r}return O0.call(e,t)?e[t]:void 0}var Wx=v0;var D0=Object.prototype,R0=D0.hasOwnProperty;function F0(t){var e=this.__data__;return nn?e[t]!==void 0:R0.call(e,t)}var Hx=F0;var N0="__lodash_hash_undefined__";function P0(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=nn&&e===void 0?N0:e,this}var Kx=P0;function Eo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Eo.prototype.clear=Vx;Eo.prototype.delete=Gx;Eo.prototype.get=Wx;Eo.prototype.has=Hx;Eo.prototype.set=Kx;var tp=Eo;function L0(){this.__data__=[],this.size=0}var Yx=L0;function M0(t,e){for(var r=t.length;r--;)if(Fr(t[r][0],e))return r;return-1}var Dn=M0;var B0=Array.prototype,j0=B0.splice;function U0(t){var e=this.__data__,r=Dn(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():j0.call(e,r,1),--this.size,!0}var Zx=U0;function z0(t){var e=this.__data__,r=Dn(e,t);return r<0?void 0:e[r][1]}var Xx=z0;function $0(t){return Dn(this.__data__,t)>-1}var Jx=$0;function q0(t,e){var r=this.__data__,n=Dn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Qx=q0;function Ao(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ao.prototype.clear=Yx;Ao.prototype.delete=Zx;Ao.prototype.get=Xx;Ao.prototype.has=Jx;Ao.prototype.set=Qx;var Rn=Ao;var V0=qt(ct,"Map"),Fn=V0;function G0(){this.size=0,this.__data__={hash:new tp,map:new(Fn||Rn),string:new tp}}var ey=G0;function W0(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ty=W0;function H0(t,e){var r=t.__data__;return ty(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Nn=H0;function K0(t){var e=Nn(this,t).delete(t);return this.size-=e?1:0,e}var ry=K0;function Y0(t){return Nn(this,t).get(t)}var ny=Y0;function Z0(t){return Nn(this,t).has(t)}var iy=Z0;function X0(t,e){var r=Nn(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var oy=X0;function ko(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ko.prototype.clear=ey;ko.prototype.delete=ry;ko.prototype.get=ny;ko.prototype.has=iy;ko.prototype.set=oy;var Oi=ko;var J0="Expected a function";function rp(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(J0);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(rp.Cache||Oi),r}rp.Cache=Oi;var sy=rp;var Q0=500;function e1(t){var e=sy(t,function(n){return r.size===Q0&&r.clear(),n}),r=e.cache;return e}var ay=e1;var t1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r1=/\\(\\)?/g,n1=ay(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(t1,function(r,n,i,o){e.push(i?o.replace(r1,"$1"):n||r)}),e}),uy=n1;function i1(t){return t==null?"":ux(t)}var ly=i1;function o1(t,e){return Q(t)?t:bo(t,e)?[t]:uy(ly(t))}var Pn=o1;var s1=1/0;function a1(t){if(typeof t=="string"||Tn(t))return t;var e=t+"";return e=="0"&&1/t==-s1?"-0":e}var Mr=a1;function u1(t,e){e=Pn(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Mr(e[r++])];return r&&r==n?t:void 0}var wo=u1;function l1(t,e,r){var n=t==null?void 0:wo(t,e);return n===void 0?r:n}var cy=l1;function c1(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var Co=c1;var fy=At?At.isConcatSpreadable:void 0;function f1(t){return Q(t)||On(t)||!!(fy&&t&&t[fy])}var py=f1;function dy(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=py),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?dy(a,e-1,r,n,i):Co(i,a):n||(i[i.length]=a)}return i}var To=dy;function p1(t){var e=t==null?0:t.length;return e?To(t,1):[]}var xt=p1;var d1=ku(Object.getPrototypeOf,Object),Cu=d1;function h1(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}var Tu=h1;function m1(t,e,r,n){var i=-1,o=t==null?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}var hy=m1;function g1(){this.__data__=new Rn,this.size=0}var my=g1;function x1(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var gy=x1;function y1(t){return this.__data__.get(t)}var xy=y1;function b1(t){return this.__data__.has(t)}var yy=b1;var E1=200;function A1(t,e){var r=this.__data__;if(r instanceof Rn){var n=r.__data__;if(!Fn||n.length<E1-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Oi(n)}return r.set(t,e),this.size=r.size,this}var by=A1;function _o(t){var e=this.__data__=new Rn(t);this.size=e.size}_o.prototype.clear=my;_o.prototype.delete=gy;_o.prototype.get=xy;_o.prototype.has=yy;_o.prototype.set=by;var Ln=_o;function k1(t,e){return t&&Nr(e,Pe(e),t)}var Ey=k1;function w1(t,e){return t&&Nr(e,vn(e),t)}var Ay=w1;var Ty=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ky=Ty&&typeof module=="object"&&module&&!module.nodeType&&module,C1=ky&&ky.exports===Ty,wy=C1?ct.Buffer:void 0,Cy=wy?wy.allocUnsafe:void 0;function T1(t,e){if(e)return t.slice();var r=t.length,n=Cy?Cy(r):new t.constructor(r);return t.copy(n),n}var _y=T1;function _1(t,e){for(var r=-1,n=t==null?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}var So=_1;function S1(){return[]}var _u=S1;var I1=Object.prototype,O1=I1.propertyIsEnumerable,Sy=Object.getOwnPropertySymbols,v1=Sy?function(t){return t==null?[]:(t=Object(t),So(Sy(t),function(e){return O1.call(t,e)}))}:_u,Io=v1;function D1(t,e){return Nr(t,Io(t),e)}var Iy=D1;var R1=Object.getOwnPropertySymbols,F1=R1?function(t){for(var e=[];t;)Co(e,Io(t)),t=Cu(t);return e}:_u,Su=F1;function N1(t,e){return Nr(t,Su(t),e)}var Oy=N1;function P1(t,e,r){var n=e(t);return Q(t)?n:Co(n,r(t))}var Iu=P1;function L1(t){return Iu(t,Pe,Io)}var Cs=L1;function M1(t){return Iu(t,vn,Su)}var Ou=M1;var B1=qt(ct,"DataView"),vu=B1;var j1=qt(ct,"Promise"),Du=j1;var U1=qt(ct,"Set"),Mn=U1;var vy="[object Map]",z1="[object Object]",Dy="[object Promise]",Ry="[object Set]",Fy="[object WeakMap]",Ny="[object DataView]",$1=tn(vu),q1=tn(Fn),V1=tn(Du),G1=tn(Mn),W1=tn(xu),vi=Nt;(vu&&vi(new vu(new ArrayBuffer(1)))!=Ny||Fn&&vi(new Fn)!=vy||Du&&vi(Du.resolve())!=Dy||Mn&&vi(new Mn)!=Ry||xu&&vi(new xu)!=Fy)&&(vi=function(t){var e=Nt(t),r=e==z1?t.constructor:void 0,n=r?tn(r):"";if(n)switch(n){case $1:return Ny;case q1:return vy;case V1:return Dy;case G1:return Ry;case W1:return Fy}return e});var gr=vi;var H1=Object.prototype,K1=H1.hasOwnProperty;function Y1(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&K1.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Py=Y1;var Z1=ct.Uint8Array,Oo=Z1;function X1(t){var e=new t.constructor(t.byteLength);return new Oo(e).set(new Oo(t)),e}var vo=X1;function J1(t,e){var r=e?vo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Ly=J1;var Q1=/\w*$/;function eD(t){var e=new t.constructor(t.source,Q1.exec(t));return e.lastIndex=t.lastIndex,e}var My=eD;var By=At?At.prototype:void 0,jy=By?By.valueOf:void 0;function tD(t){return jy?Object(jy.call(t)):{}}var Uy=tD;function rD(t,e){var r=e?vo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var zy=rD;var nD="[object Boolean]",iD="[object Date]",oD="[object Map]",sD="[object Number]",aD="[object RegExp]",uD="[object Set]",lD="[object String]",cD="[object Symbol]",fD="[object ArrayBuffer]",pD="[object DataView]",dD="[object Float32Array]",hD="[object Float64Array]",mD="[object Int8Array]",gD="[object Int16Array]",xD="[object Int32Array]",yD="[object Uint8Array]",bD="[object Uint8ClampedArray]",ED="[object Uint16Array]",AD="[object Uint32Array]";function kD(t,e,r){var n=t.constructor;switch(e){case fD:return vo(t);case nD:case iD:return new n(+t);case pD:return Ly(t,r);case dD:case hD:case mD:case gD:case xD:case yD:case bD:case ED:case AD:return zy(t,r);case oD:return new n;case sD:case lD:return new n(t);case aD:return My(t);case uD:return new n;case cD:return Uy(t)}}var $y=kD;function wD(t){return typeof t.constructor=="function"&&!Pr(t)?Ex(Cu(t)):{}}var qy=wD;var CD="[object Map]";function TD(t){return ot(t)&&gr(t)==CD}var Vy=TD;var Gy=fr&&fr.isMap,_D=Gy?Lr(Gy):Vy,Wy=_D;var SD="[object Set]";function ID(t){return ot(t)&&gr(t)==SD}var Hy=ID;var Ky=fr&&fr.isSet,OD=Ky?Lr(Ky):Hy,Yy=OD;var vD=1,DD=2,RD=4,Zy="[object Arguments]",FD="[object Array]",ND="[object Boolean]",PD="[object Date]",LD="[object Error]",Xy="[object Function]",MD="[object GeneratorFunction]",BD="[object Map]",jD="[object Number]",Jy="[object Object]",UD="[object RegExp]",zD="[object Set]",$D="[object String]",qD="[object Symbol]",VD="[object WeakMap]",GD="[object ArrayBuffer]",WD="[object DataView]",HD="[object Float32Array]",KD="[object Float64Array]",YD="[object Int8Array]",ZD="[object Int16Array]",XD="[object Int32Array]",JD="[object Uint8Array]",QD="[object Uint8ClampedArray]",eR="[object Uint16Array]",tR="[object Uint32Array]",Le={};Le[Zy]=Le[FD]=Le[GD]=Le[WD]=Le[ND]=Le[PD]=Le[HD]=Le[KD]=Le[YD]=Le[ZD]=Le[XD]=Le[BD]=Le[jD]=Le[Jy]=Le[UD]=Le[zD]=Le[$D]=Le[qD]=Le[JD]=Le[QD]=Le[eR]=Le[tR]=!0;Le[LD]=Le[Xy]=Le[VD]=!1;function Ru(t,e,r,n,i,o){var s,a=e&vD,u=e&DD,l=e&RD;if(r&&(s=i?r(t,n,i,o):r(t)),s!==void 0)return s;if(!Ye(t))return t;var c=Q(t);if(c){if(s=Py(t),!a)return kx(t,s)}else{var f=gr(t),p=f==Xy||f==MD;if(rn(t))return _y(t,a);if(f==Jy||f==Zy||p&&!i){if(s=u||p?{}:qy(t),!a)return u?Oy(t,Ay(s,t)):Iy(t,Ey(s,t))}else{if(!Le[f])return i?t:{};s=$y(t,f,a)}}o||(o=new Ln);var d=o.get(t);if(d)return d;o.set(t,s),Yy(t)?t.forEach(function(g){s.add(Ru(g,e,r,g,t,o))}):Wy(t)&&t.forEach(function(g,b){s.set(b,Ru(g,e,r,b,t,o))});var m=l?u?Ou:Cs:u?vn:Pe,y=c?void 0:m(t);return yu(y||t,function(g,b){y&&(b=g,g=t[b]),Sn(s,b,Ru(g,e,r,b,t,o))}),s}var Qy=Ru;var rR=4;function nR(t){return Qy(t,rR)}var Me=nR;function iR(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i}var Br=iR;var oR="__lodash_hash_undefined__";function sR(t){return this.__data__.set(t,oR),this}var eb=sR;function aR(t){return this.__data__.has(t)}var tb=aR;function Fu(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Oi;++e<r;)this.add(t[e])}Fu.prototype.add=Fu.prototype.push=eb;Fu.prototype.has=tb;var Do=Fu;function uR(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Nu=uR;function lR(t,e){return t.has(e)}var Ro=lR;var cR=1,fR=2;function pR(t,e,r,n,i,o){var s=r&cR,a=t.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var l=o.get(t),c=o.get(e);if(l&&c)return l==e&&c==t;var f=-1,p=!0,d=r&fR?new Do:void 0;for(o.set(t,e),o.set(e,t);++f<a;){var m=t[f],y=e[f];if(n)var g=s?n(y,m,f,e,t,o):n(m,y,f,t,e,o);if(g!==void 0){if(g)continue;p=!1;break}if(d){if(!Nu(e,function(b,w){if(!Ro(d,w)&&(m===b||i(m,b,r,n,o)))return d.push(w)})){p=!1;break}}else if(!(m===y||i(m,y,r,n,o))){p=!1;break}}return o.delete(t),o.delete(e),p}var Pu=pR;function dR(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var rb=dR;function hR(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Fo=hR;var mR=1,gR=2,xR="[object Boolean]",yR="[object Date]",bR="[object Error]",ER="[object Map]",AR="[object Number]",kR="[object RegExp]",wR="[object Set]",CR="[object String]",TR="[object Symbol]",_R="[object ArrayBuffer]",SR="[object DataView]",nb=At?At.prototype:void 0,np=nb?nb.valueOf:void 0;function IR(t,e,r,n,i,o,s){switch(r){case SR:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case _R:return!(t.byteLength!=e.byteLength||!o(new Oo(t),new Oo(e)));case xR:case yR:case AR:return Fr(+t,+e);case bR:return t.name==e.name&&t.message==e.message;case kR:case CR:return t==e+"";case ER:var a=rb;case wR:var u=n&mR;if(a||(a=Fo),t.size!=e.size&&!u)return!1;var l=s.get(t);if(l)return l==e;n|=gR,s.set(t,e);var c=Pu(a(t),a(e),n,i,o,s);return s.delete(t),c;case TR:if(np)return np.call(t)==np.call(e)}return!1}var ib=IR;var OR=1,vR=Object.prototype,DR=vR.hasOwnProperty;function RR(t,e,r,n,i,o){var s=r&OR,a=Cs(t),u=a.length,l=Cs(e),c=l.length;if(u!=c&&!s)return!1;for(var f=u;f--;){var p=a[f];if(!(s?p in e:DR.call(e,p)))return!1}var d=o.get(t),m=o.get(e);if(d&&m)return d==e&&m==t;var y=!0;o.set(t,e),o.set(e,t);for(var g=s;++f<u;){p=a[f];var b=t[p],w=e[p];if(n)var k=s?n(w,b,p,e,t,o):n(b,w,p,t,e,o);if(!(k===void 0?b===w||i(b,w,r,n,o):k)){y=!1;break}g||(g=p=="constructor")}if(y&&!g){var D=t.constructor,R=e.constructor;D!=R&&"constructor"in t&&"constructor"in e&&!(typeof D=="function"&&D instanceof D&&typeof R=="function"&&R instanceof R)&&(y=!1)}return o.delete(t),o.delete(e),y}var ob=RR;var FR=1,sb="[object Arguments]",ab="[object Array]",Lu="[object Object]",NR=Object.prototype,ub=NR.hasOwnProperty;function PR(t,e,r,n,i,o){var s=Q(t),a=Q(e),u=s?ab:gr(t),l=a?ab:gr(e);u=u==sb?Lu:u,l=l==sb?Lu:l;var c=u==Lu,f=l==Lu,p=u==l;if(p&&rn(t)){if(!rn(e))return!1;s=!0,c=!1}if(p&&!c)return o||(o=new Ln),s||yo(t)?Pu(t,e,r,n,i,o):ib(t,e,u,r,n,i,o);if(!(r&FR)){var d=c&&ub.call(t,"__wrapped__"),m=f&&ub.call(e,"__wrapped__");if(d||m){var y=d?t.value():t,g=m?e.value():e;return o||(o=new Ln),i(y,g,r,n,o)}}return p?(o||(o=new Ln),ob(t,e,r,n,i,o)):!1}var lb=PR;function cb(t,e,r,n,i){return t===e?!0:t==null||e==null||!ot(t)&&!ot(e)?t!==t&&e!==e:lb(t,e,r,n,cb,i)}var Mu=cb;var LR=1,MR=2;function BR(t,e,r,n){var i=r.length,o=i,s=!n;if(t==null)return!o;for(t=Object(t);i--;){var a=r[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=r[i];var u=a[0],l=t[u],c=a[1];if(s&&a[2]){if(l===void 0&&!(u in t))return!1}else{var f=new Ln;if(n)var p=n(l,c,u,t,e,f);if(!(p===void 0?Mu(c,l,LR|MR,n,f):p))return!1}}return!0}var fb=BR;function jR(t){return t===t&&!Ye(t)}var Bu=jR;function UR(t){for(var e=Pe(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Bu(i)]}return e}var pb=UR;function zR(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var ju=zR;function $R(t){var e=pb(t);return e.length==1&&e[0][2]?ju(e[0][0],e[0][1]):function(r){return r===t||fb(r,t,e)}}var db=$R;function qR(t,e){return t!=null&&e in Object(t)}var hb=qR;function VR(t,e,r){e=Pn(e,t);for(var n=-1,i=e.length,o=!1;++n<i;){var s=Mr(e[n]);if(!(o=t!=null&&r(t,s)))break;t=t[s]}return o||++n!=i?o:(i=t==null?0:t.length,!!i&&xo(i)&&_n(s,i)&&(Q(t)||On(t)))}var Uu=VR;function GR(t,e){return t!=null&&Uu(t,e,hb)}var mb=GR;var WR=1,HR=2;function KR(t,e){return bo(t)&&Bu(e)?ju(Mr(t),e):function(r){var n=cy(r,t);return n===void 0&&n===e?mb(r,t):Mu(e,n,WR|HR)}}var gb=KR;function YR(t){return function(e){return e?.[t]}}var xb=YR;function ZR(t){return function(e){return wo(e,t)}}var yb=ZR;function XR(t){return bo(t)?xb(Mr(t)):yb(t)}var bb=XR;function JR(t){return typeof t=="function"?t:t==null?cr:typeof t=="object"?Q(t)?gb(t[0],t[1]):db(t):bb(t)}var pt=JR;function QR(t,e,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;){var s=t[i];e(n,s,r(s),t)}return n}var Eb=QR;function eF(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var u=s[t?a:++i];if(r(o[u],u,o)===!1)break}return e}}var Ab=eF;var tF=Ab(),kb=tF;function rF(t,e){return t&&kb(t,e,Pe)}var wb=rF;function nF(t,e){return function(r,n){if(r==null)return r;if(!ft(r))return t(r,n);for(var i=r.length,o=e?i:-1,s=Object(r);(e?o--:++o<i)&&n(s[o],o,s)!==!1;);return r}}var Cb=nF;var iF=Cb(wb),Vt=iF;function oF(t,e,r,n){return Vt(t,function(i,o,s){e(n,i,r(i),s)}),n}var Tb=oF;function sF(t,e){return function(r,n){var i=Q(r)?Eb:Tb,o=e?e():{};return i(r,t,pt(n,2),o)}}var _b=sF;var Sb=Object.prototype,aF=Sb.hasOwnProperty,uF=go(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&In(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],s=vn(o),a=-1,u=s.length;++a<u;){var l=s[a],c=t[l];(c===void 0||Fr(c,Sb[l])&&!aF.call(t,l))&&(t[l]=o[l])}return t}),No=uF;function lF(t){return ot(t)&&ft(t)}var ip=lF;function cF(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var zu=cF;var fF=200;function pF(t,e,r,n){var i=-1,o=Eu,s=!0,a=t.length,u=[],l=e.length;if(!a)return u;r&&(e=Dr(e,Lr(r))),n?(o=zu,s=!1):e.length>=fF&&(o=Ro,s=!1,e=new Do(e));e:for(;++i<a;){var c=t[i],f=r==null?c:r(c);if(c=n||c!==0?c:0,s&&f===f){for(var p=l;p--;)if(e[p]===f)continue e;u.push(c)}else o(e,f,n)||u.push(c)}return u}var Ib=pF;var dF=go(function(t,e){return ip(t)?Ib(t,To(e,1,ip,!0)):[]}),Bn=dF;function hF(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var jr=hF;function mF(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Rr(e),Tu(t,e<0?0:e,n)):[]}var st=mF;function gF(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Rr(e),e=n-e,Tu(t,0,e<0?0:e)):[]}var on=gF;function xF(t){return typeof t=="function"?t:cr}var Ob=xF;function yF(t,e){var r=Q(t)?yu:Vt;return r(t,Ob(e))}var G=yF;function bF(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}var vb=bF;function EF(t,e){var r=!0;return Vt(t,function(n,i,o){return r=!!e(n,i,o),r}),r}var Db=EF;function AF(t,e,r){var n=Q(t)?vb:Db;return r&&In(t,e,r)&&(e=void 0),n(t,pt(e,3))}var Ot=AF;function kF(t,e){var r=[];return Vt(t,function(n,i,o){e(n,i,o)&&r.push(n)}),r}var $u=kF;function wF(t,e){var r=Q(t)?So:$u;return r(t,pt(e,3))}var vt=wF;function CF(t){return function(e,r,n){var i=Object(e);if(!ft(e)){var o=pt(r,3);e=Pe(e),r=function(a){return o(i[a],a,i)}}var s=t(e,r,n);return s>-1?i[o?e[s]:s]:void 0}}var Rb=CF;var TF=Math.max;function _F(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:Rr(r);return i<0&&(i=TF(n+i,0)),bu(t,pt(e,3),i)}var Fb=_F;var SF=Rb(Fb),Ur=SF;function IF(t){return t&&t.length?t[0]:void 0}var kt=IF;function OF(t,e){var r=-1,n=ft(t)?Array(t.length):[];return Vt(t,function(i,o,s){n[++r]=e(i,o,s)}),n}var Nb=OF;function vF(t,e){var r=Q(t)?Dr:Nb;return r(t,pt(e,3))}var V=vF;function DF(t,e){return To(V(t,e),1)}var Lt=DF;var RF=Object.prototype,FF=RF.hasOwnProperty,NF=_b(function(t,e,r){FF.call(t,r)?t[r].push(e):mo(t,r,[e])}),op=NF;var PF=Object.prototype,LF=PF.hasOwnProperty;function MF(t,e){return t!=null&&LF.call(t,e)}var Pb=MF;function BF(t,e){return t!=null&&Uu(t,e,Pb)}var X=BF;var jF="[object String]";function UF(t){return typeof t=="string"||!Q(t)&&ot(t)&&Nt(t)==jF}var yt=UF;function zF(t,e){return Dr(e,function(r){return t[r]})}var Lb=zF;function $F(t){return t==null?[]:Lb(t,Pe(t))}var Re=$F;var qF=Math.max;function VF(t,e,r,n){t=ft(t)?t:Re(t),r=r&&!n?Rr(r):0;var i=t.length;return r<0&&(r=qF(i+r,0)),yt(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&ho(t,e,r)>-1}var We=VF;var GF=Math.max;function WF(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:Rr(r);return i<0&&(i=GF(n+i,0)),ho(t,e,i)}var qu=WF;var HF="[object Map]",KF="[object Set]",YF=Object.prototype,ZF=YF.hasOwnProperty;function XF(t){if(t==null)return!0;if(ft(t)&&(Q(t)||typeof t=="string"||typeof t.splice=="function"||rn(t)||yo(t)||On(t)))return!t.length;var e=gr(t);if(e==HF||e==KF)return!t.size;if(Pr(t))return!wu(t).length;for(var r in t)if(ZF.call(t,r))return!1;return!0}var Te=XF;var JF="[object RegExp]";function QF(t){return ot(t)&&Nt(t)==JF}var Mb=QF;var Bb=fr&&fr.isRegExp,eN=Bb?Lr(Bb):Mb,pr=eN;function tN(t){return t===void 0}var Dt=tN;var rN="Expected a function";function nN(t){if(typeof t!="function")throw new TypeError(rN);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var jb=nN;function iN(t,e,r,n){if(!Ye(t))return t;e=Pn(e,t);for(var i=-1,o=e.length,s=o-1,a=t;a!=null&&++i<o;){var u=Mr(e[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=s){var c=a[u];l=n?n(c,u,a):void 0,l===void 0&&(l=Ye(c)?c:_n(e[i+1])?[]:{})}Sn(a,u,l),a=a[u]}return t}var Ub=iN;function oN(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var s=e[n],a=wo(t,s);r(a,s)&&Ub(o,Pn(s,t),a)}return o}var zb=oN;function sN(t,e){if(t==null)return{};var r=Dr(Ou(t),function(n){return[n]});return e=pt(e),zb(t,r,function(n,i){return e(n,i[0])})}var Gt=sN;function aN(t,e,r,n,i){return i(t,function(o,s,a){r=n?(n=!1,o):e(r,o,s,a)}),r}var $b=aN;function uN(t,e,r){var n=Q(t)?hy:$b,i=arguments.length<3;return n(t,pt(e,4),r,i,Vt)}var dt=uN;function lN(t,e){var r=Q(t)?So:$u;return r(t,jb(pt(e,3)))}var jn=lN;function cN(t,e){var r;return Vt(t,function(n,i,o){return r=e(n,i,o),!r}),!!r}var qb=cN;function fN(t,e,r){var n=Q(t)?Nu:qb;return r&&In(t,e,r)&&(e=void 0),n(t,pt(e,3))}var Ts=fN;var pN=1/0,dN=Mn&&1/Fo(new Mn([,-0]))[1]==pN?function(t){return new Mn(t)}:Ze,Vb=dN;var hN=200;function mN(t,e,r){var n=-1,i=Eu,o=t.length,s=!0,a=[],u=a;if(r)s=!1,i=zu;else if(o>=hN){var l=e?null:Vb(t);if(l)return Fo(l);s=!1,i=Ro,u=new Do}else u=e?[]:a;e:for(;++n<o;){var c=t[n],f=e?e(c):c;if(c=r||c!==0?c:0,s&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;e&&u.push(f),a.push(c)}else i(u,f,r)||(u!==a&&u.push(f),a.push(c))}return a}var Gb=mN;function gN(t){return t&&t.length?Gb(t):[]}var Po=gN;function Lo(t){console&&console.error&&console.error(`Error: ${t}`)}function _s(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function Ss(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}function Is(t){function e(){}e.prototype=t;let r=new e;function n(){return typeof r.bar}return n(),n(),t;(0,eval)(t)}function xN(t){return yN(t)?t.LABEL:t.name}function yN(t){return yt(t.LABEL)&&t.LABEL!==""}var er=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),G(this.definition,r=>{r.accept(e)})}},Be=class extends er{constructor(e){super([]),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Mt=class extends er{constructor(e){super(e.definition),this.orgText="",Tt(this,Gt(e,r=>r!==void 0))}},je=class extends er{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Tt(this,Gt(e,r=>r!==void 0))}},Ge=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},at=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},ut=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},De=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},et=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},tt=class extends er{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Tt(this,Gt(e,r=>r!==void 0))}},ve=class{constructor(e){this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}accept(e){e.visit(this)}};function Vu(t){return V(t,Mo)}function Mo(t){function e(r){return V(r,Mo)}if(t instanceof Be){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return yt(t.label)&&(r.label=t.label),r}else{if(t instanceof je)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Ge)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof at)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof ut)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Mo(new ve({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof et)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Mo(new ve({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof De)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof tt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof ve){let r={type:"Terminal",name:t.terminalType.name,label:xN(t.terminalType),idx:t.idx};yt(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=pr(n)?n.source:n),r}else{if(t instanceof Mt)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}var Bt=class{visit(e){let r=e;switch(r.constructor){case Be:return this.visitNonTerminal(r);case je:return this.visitAlternative(r);case Ge:return this.visitOption(r);case at:return this.visitRepetitionMandatory(r);case ut:return this.visitRepetitionMandatoryWithSeparator(r);case et:return this.visitRepetitionWithSeparator(r);case De:return this.visitRepetition(r);case tt:return this.visitAlternation(r);case ve:return this.visitTerminal(r);case Mt:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function sp(t){return t instanceof je||t instanceof Ge||t instanceof De||t instanceof at||t instanceof ut||t instanceof et||t instanceof ve||t instanceof Mt}function Di(t,e=[]){return t instanceof Ge||t instanceof De||t instanceof et?!0:t instanceof tt?Ts(t.definition,n=>Di(n,e)):t instanceof Be&&We(e,t)?!1:t instanceof er?(t instanceof Be&&e.push(t),Ot(t.definition,n=>Di(n,e))):!1}function ap(t){return t instanceof tt}function Wt(t){if(t instanceof Be)return"SUBRULE";if(t instanceof Ge)return"OPTION";if(t instanceof tt)return"OR";if(t instanceof at)return"AT_LEAST_ONE";if(t instanceof ut)return"AT_LEAST_ONE_SEP";if(t instanceof et)return"MANY_SEP";if(t instanceof De)return"MANY";if(t instanceof ve)return"CONSUME";throw Error("non exhaustive match")}var sn=class{walk(e,r=[]){G(e.definition,(n,i)=>{let o=st(e.definition,i+1);if(n instanceof Be)this.walkProdRef(n,o,r);else if(n instanceof ve)this.walkTerminal(n,o,r);else if(n instanceof je)this.walkFlat(n,o,r);else if(n instanceof Ge)this.walkOption(n,o,r);else if(n instanceof at)this.walkAtLeastOne(n,o,r);else if(n instanceof ut)this.walkAtLeastOneSep(n,o,r);else if(n instanceof et)this.walkManySep(n,o,r);else if(n instanceof De)this.walkMany(n,o,r);else if(n instanceof tt)this.walkOr(n,o,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let i=r.concat(n);this.walk(e,i)}walkOption(e,r,n){let i=r.concat(n);this.walk(e,i)}walkAtLeastOne(e,r,n){let i=[new Ge({definition:e.definition})].concat(r,n);this.walk(e,i)}walkAtLeastOneSep(e,r,n){let i=Wb(e,r,n);this.walk(e,i)}walkMany(e,r,n){let i=[new Ge({definition:e.definition})].concat(r,n);this.walk(e,i)}walkManySep(e,r,n){let i=Wb(e,r,n);this.walk(e,i)}walkOr(e,r,n){let i=r.concat(n);G(e.definition,o=>{let s=new je({definition:[o]});this.walk(s,i)})}};function Wb(t,e,r){return[new Ge({definition:[new ve({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}function Ri(t){if(t instanceof Be)return Ri(t.referencedRule);if(t instanceof ve)return AN(t);if(sp(t))return bN(t);if(ap(t))return EN(t);throw Error("non exhaustive match")}function bN(t){let e=[],r=t.definition,n=0,i=r.length>n,o,s=!0;for(;i&&s;)o=r[n],s=Di(o),e=e.concat(Ri(o)),n=n+1,i=r.length>n;return Po(e)}function EN(t){let e=V(t.definition,r=>Ri(r));return Po(xt(e))}function AN(t){return[t.terminalType]}var Gu="_~IN~_";var up=class extends sn{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){let i=kN(e.referencedRule,e.idx)+this.topProd.name,o=r.concat(n),s=new je({definition:o}),a=Ri(s);this.follows[i]=a}};function Hb(t){let e={};return G(t,r=>{let n=new up(r).startWalking();Tt(e,n)}),e}function kN(t,e){return t.name+e+Gu}function le(t){return t.charCodeAt(0)}function Wu(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function Bo(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function Fi(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Os(){throw Error("Internal Error - Should never get here!")}function lp(t){return t.type==="Character"}var vs=[];for(let t=le("0");t<=le("9");t++)vs.push(t);var Ds=[le("_")].concat(vs);for(let t=le("a");t<=le("z");t++)Ds.push(t);for(let t=le("A");t<=le("Z");t++)Ds.push(t);var cp=[le(" "),le("\f"),le(`
|
|
115
|
-
`),le("\r"),le(" "),le("\v"),le(" "),le("\xA0"),le("\u1680"),le("\u2000"),le("\u2001"),le("\u2002"),le("\u2003"),le("\u2004"),le("\u2005"),le("\u2006"),le("\u2007"),le("\u2008"),le("\u2009"),le("\u200A"),le("\u2028"),le("\u2029"),le("\u202F"),le("\u205F"),le("\u3000"),le("\uFEFF")];var
|
|
114
|
+
`;return n}function MI(t){let e=[],r=t[0]?.length||0;for(let n=0;n<r;n++){let i=!0;for(let o of t)if(o[n]!==""){i=!1;break}i&&e.push(n)}return e}import{log as ld}from"remark-mdat";var BI=typeof global=="object"&&global&&global.Object===Object&&global,mu=BI;var jI=typeof self=="object"&&self&&self.Object===Object&&self,UI=mu||jI||Function("return this")(),ct=UI;var zI=ct.Symbol,At=zI;var tx=Object.prototype,$I=tx.hasOwnProperty,qI=tx.toString,ks=At?At.toStringTag:void 0;function VI(t){var e=$I.call(t,ks),r=t[ks];try{t[ks]=void 0;var n=!0}catch{}var i=qI.call(t);return n&&(e?t[ks]=r:delete t[ks]),i}var rx=VI;var GI=Object.prototype,WI=GI.toString;function HI(t){return WI.call(t)}var nx=HI;var KI="[object Null]",YI="[object Undefined]",ix=At?At.toStringTag:void 0;function ZI(t){return t==null?t===void 0?YI:KI:ix&&ix in Object(t)?rx(t):nx(t)}var Nt=ZI;function XI(t){return t!=null&&typeof t=="object"}var ot=XI;var JI="[object Symbol]";function QI(t){return typeof t=="symbol"||ot(t)&&Nt(t)==JI}var Tn=QI;function eO(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Dr=eO;var tO=Array.isArray,Q=tO;var rO=1/0,ox=At?At.prototype:void 0,sx=ox?ox.toString:void 0;function ax(t){if(typeof t=="string")return t;if(Q(t))return Dr(t,ax)+"";if(Tn(t))return sx?sx.call(t):"";var e=t+"";return e=="0"&&1/t==-rO?"-0":e}var ux=ax;var nO=/\s/;function iO(t){for(var e=t.length;e--&&nO.test(t.charAt(e)););return e}var lx=iO;var oO=/^\s+/;function sO(t){return t&&t.slice(0,lx(t)+1).replace(oO,"")}var cx=sO;function aO(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ye=aO;var fx=NaN,uO=/^[-+]0x[0-9a-f]+$/i,lO=/^0b[01]+$/i,cO=/^0o[0-7]+$/i,fO=parseInt;function pO(t){if(typeof t=="number")return t;if(Tn(t))return fx;if(Ye(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ye(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cx(t);var r=lO.test(t);return r||cO.test(t)?fO(t.slice(2),r?2:8):uO.test(t)?fx:+t}var px=pO;var dx=1/0,dO=17976931348623157e292;function hO(t){if(!t)return t===0?t:0;if(t=px(t),t===dx||t===-dx){var e=t<0?-1:1;return e*dO}return t===t?t:0}var hx=hO;function mO(t){var e=hx(t),r=e%1;return e===e?r?e-r:e:0}var Rr=mO;function gO(t){return t}var cr=gO;var xO="[object AsyncFunction]",yO="[object Function]",bO="[object GeneratorFunction]",EO="[object Proxy]";function AO(t){if(!Ye(t))return!1;var e=Nt(t);return e==yO||e==bO||e==xO||e==EO}var Pt=AO;var kO=ct["__core-js_shared__"],gu=kO;var mx=(function(){var t=/[^.]+$/.exec(gu&&gu.keys&&gu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function wO(t){return!!mx&&mx in t}var gx=wO;var CO=Function.prototype,TO=CO.toString;function _O(t){if(t!=null){try{return TO.call(t)}catch{}try{return t+""}catch{}}return""}var tn=_O;var SO=/[\\^$.*+?()[\]{}|]/g,IO=/^\[object .+?Constructor\]$/,OO=Function.prototype,vO=Object.prototype,DO=OO.toString,RO=vO.hasOwnProperty,FO=RegExp("^"+DO.call(RO).replace(SO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function NO(t){if(!Ye(t)||gx(t))return!1;var e=Pt(t)?FO:IO;return e.test(tn(t))}var xx=NO;function PO(t,e){return t?.[e]}var yx=PO;function LO(t,e){var r=yx(t,e);return xx(r)?r:void 0}var qt=LO;var MO=qt(ct,"WeakMap"),xu=MO;var bx=Object.create,BO=(function(){function t(){}return function(e){if(!Ye(e))return{};if(bx)return bx(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),Ex=BO;function jO(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Ax=jO;function UO(){}var Ze=UO;function zO(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var kx=zO;var $O=800,qO=16,VO=Date.now;function GO(t){var e=0,r=0;return function(){var n=VO(),i=qO-(n-r);if(r=n,i>0){if(++e>=$O)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var wx=GO;function WO(t){return function(){return t}}var Cx=WO;var HO=(function(){try{var t=qt(Object,"defineProperty");return t({},"",{}),t}catch{}})(),po=HO;var KO=po?function(t,e){return po(t,"toString",{configurable:!0,enumerable:!1,value:Cx(e),writable:!0})}:cr,Tx=KO;var YO=wx(Tx),_x=YO;function ZO(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var yu=ZO;function XO(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}var bu=XO;function JO(t){return t!==t}var Sx=JO;function QO(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var Ix=QO;function ev(t,e,r){return e===e?Ix(t,e,r):bu(t,Sx,r)}var ho=ev;function tv(t,e){var r=t==null?0:t.length;return!!r&&ho(t,e,0)>-1}var Eu=tv;var rv=9007199254740991,nv=/^(?:0|[1-9]\d*)$/;function iv(t,e){var r=typeof t;return e=e??rv,!!e&&(r=="number"||r!="symbol"&&nv.test(t))&&t>-1&&t%1==0&&t<e}var _n=iv;function ov(t,e,r){e=="__proto__"&&po?po(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var mo=ov;function sv(t,e){return t===e||t!==t&&e!==e}var Fr=sv;var av=Object.prototype,uv=av.hasOwnProperty;function lv(t,e,r){var n=t[e];(!(uv.call(t,e)&&Fr(n,r))||r===void 0&&!(e in t))&&mo(t,e,r)}var Sn=lv;function cv(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var a=e[o],u=n?n(r[a],t[a],a,r,t):void 0;u===void 0&&(u=t[a]),i?mo(r,a,u):Sn(r,a,u)}return r}var Nr=cv;var Ox=Math.max;function fv(t,e,r){return e=Ox(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Ox(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(s),Ax(t,this,a)}}var vx=fv;function pv(t,e){return _x(vx(t,e,cr),t+"")}var go=pv;var dv=9007199254740991;function hv(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=dv}var xo=hv;function mv(t){return t!=null&&xo(t.length)&&!Pt(t)}var ft=mv;function gv(t,e,r){if(!Ye(r))return!1;var n=typeof e;return(n=="number"?ft(r)&&_n(e,r.length):n=="string"&&e in r)?Fr(r[e],t):!1}var In=gv;function xv(t){return go(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&In(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var a=r[n];a&&t(e,a,n,o)}return e})}var Dx=xv;var yv=Object.prototype;function bv(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||yv;return t===r}var Pr=bv;function Ev(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Rx=Ev;var Av="[object Arguments]";function kv(t){return ot(t)&&Nt(t)==Av}var Qf=kv;var Fx=Object.prototype,wv=Fx.hasOwnProperty,Cv=Fx.propertyIsEnumerable,Tv=Qf((function(){return arguments})())?Qf:function(t){return ot(t)&&wv.call(t,"callee")&&!Cv.call(t,"callee")},On=Tv;function _v(){return!1}var Nx=_v;var Mx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Px=Mx&&typeof module=="object"&&module&&!module.nodeType&&module,Sv=Px&&Px.exports===Mx,Lx=Sv?ct.Buffer:void 0,Iv=Lx?Lx.isBuffer:void 0,Ov=Iv||Nx,rn=Ov;var vv="[object Arguments]",Dv="[object Array]",Rv="[object Boolean]",Fv="[object Date]",Nv="[object Error]",Pv="[object Function]",Lv="[object Map]",Mv="[object Number]",Bv="[object Object]",jv="[object RegExp]",Uv="[object Set]",zv="[object String]",$v="[object WeakMap]",qv="[object ArrayBuffer]",Vv="[object DataView]",Gv="[object Float32Array]",Wv="[object Float64Array]",Hv="[object Int8Array]",Kv="[object Int16Array]",Yv="[object Int32Array]",Zv="[object Uint8Array]",Xv="[object Uint8ClampedArray]",Jv="[object Uint16Array]",Qv="[object Uint32Array]",Ve={};Ve[Gv]=Ve[Wv]=Ve[Hv]=Ve[Kv]=Ve[Yv]=Ve[Zv]=Ve[Xv]=Ve[Jv]=Ve[Qv]=!0;Ve[vv]=Ve[Dv]=Ve[qv]=Ve[Rv]=Ve[Vv]=Ve[Fv]=Ve[Nv]=Ve[Pv]=Ve[Lv]=Ve[Mv]=Ve[Bv]=Ve[jv]=Ve[Uv]=Ve[zv]=Ve[$v]=!1;function e0(t){return ot(t)&&xo(t.length)&&!!Ve[Nt(t)]}var Bx=e0;function t0(t){return function(e){return t(e)}}var Lr=t0;var jx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ws=jx&&typeof module=="object"&&module&&!module.nodeType&&module,r0=ws&&ws.exports===jx,ep=r0&&mu.process,n0=(function(){try{var t=ws&&ws.require&&ws.require("util").types;return t||ep&&ep.binding&&ep.binding("util")}catch{}})(),fr=n0;var Ux=fr&&fr.isTypedArray,i0=Ux?Lr(Ux):Bx,yo=i0;var o0=Object.prototype,s0=o0.hasOwnProperty;function a0(t,e){var r=Q(t),n=!r&&On(t),i=!r&&!n&&rn(t),o=!r&&!n&&!i&&yo(t),s=r||n||i||o,a=s?Rx(t.length,String):[],u=a.length;for(var l in t)(e||s0.call(t,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||_n(l,u)))&&a.push(l);return a}var Au=a0;function u0(t,e){return function(r){return t(e(r))}}var ku=u0;var l0=ku(Object.keys,Object),zx=l0;var c0=Object.prototype,f0=c0.hasOwnProperty;function p0(t){if(!Pr(t))return zx(t);var e=[];for(var r in Object(t))f0.call(t,r)&&r!="constructor"&&e.push(r);return e}var wu=p0;function d0(t){return ft(t)?Au(t):wu(t)}var Pe=d0;var h0=Object.prototype,m0=h0.hasOwnProperty,g0=Dx(function(t,e){if(Pr(e)||ft(e)){Nr(e,Pe(e),t);return}for(var r in e)m0.call(e,r)&&Sn(t,r,e[r])}),Tt=g0;function x0(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var $x=x0;var y0=Object.prototype,b0=y0.hasOwnProperty;function E0(t){if(!Ye(t))return $x(t);var e=Pr(t),r=[];for(var n in t)n=="constructor"&&(e||!b0.call(t,n))||r.push(n);return r}var qx=E0;function A0(t){return ft(t)?Au(t,!0):qx(t)}var vn=A0;var k0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,w0=/^\w*$/;function C0(t,e){if(Q(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Tn(t)?!0:w0.test(t)||!k0.test(t)||e!=null&&t in Object(e)}var bo=C0;var T0=qt(Object,"create"),nn=T0;function _0(){this.__data__=nn?nn(null):{},this.size=0}var Vx=_0;function S0(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Gx=S0;var I0="__lodash_hash_undefined__",O0=Object.prototype,v0=O0.hasOwnProperty;function D0(t){var e=this.__data__;if(nn){var r=e[t];return r===I0?void 0:r}return v0.call(e,t)?e[t]:void 0}var Wx=D0;var R0=Object.prototype,F0=R0.hasOwnProperty;function N0(t){var e=this.__data__;return nn?e[t]!==void 0:F0.call(e,t)}var Hx=N0;var P0="__lodash_hash_undefined__";function L0(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=nn&&e===void 0?P0:e,this}var Kx=L0;function Eo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Eo.prototype.clear=Vx;Eo.prototype.delete=Gx;Eo.prototype.get=Wx;Eo.prototype.has=Hx;Eo.prototype.set=Kx;var tp=Eo;function M0(){this.__data__=[],this.size=0}var Yx=M0;function B0(t,e){for(var r=t.length;r--;)if(Fr(t[r][0],e))return r;return-1}var Dn=B0;var j0=Array.prototype,U0=j0.splice;function z0(t){var e=this.__data__,r=Dn(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():U0.call(e,r,1),--this.size,!0}var Zx=z0;function $0(t){var e=this.__data__,r=Dn(e,t);return r<0?void 0:e[r][1]}var Xx=$0;function q0(t){return Dn(this.__data__,t)>-1}var Jx=q0;function V0(t,e){var r=this.__data__,n=Dn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Qx=V0;function Ao(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ao.prototype.clear=Yx;Ao.prototype.delete=Zx;Ao.prototype.get=Xx;Ao.prototype.has=Jx;Ao.prototype.set=Qx;var Rn=Ao;var G0=qt(ct,"Map"),Fn=G0;function W0(){this.size=0,this.__data__={hash:new tp,map:new(Fn||Rn),string:new tp}}var ey=W0;function H0(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ty=H0;function K0(t,e){var r=t.__data__;return ty(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Nn=K0;function Y0(t){var e=Nn(this,t).delete(t);return this.size-=e?1:0,e}var ry=Y0;function Z0(t){return Nn(this,t).get(t)}var ny=Z0;function X0(t){return Nn(this,t).has(t)}var iy=X0;function J0(t,e){var r=Nn(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var oy=J0;function ko(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ko.prototype.clear=ey;ko.prototype.delete=ry;ko.prototype.get=ny;ko.prototype.has=iy;ko.prototype.set=oy;var Oi=ko;var Q0="Expected a function";function rp(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Q0);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(rp.Cache||Oi),r}rp.Cache=Oi;var sy=rp;var e1=500;function t1(t){var e=sy(t,function(n){return r.size===e1&&r.clear(),n}),r=e.cache;return e}var ay=t1;var r1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n1=/\\(\\)?/g,i1=ay(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(r1,function(r,n,i,o){e.push(i?o.replace(n1,"$1"):n||r)}),e}),uy=i1;function o1(t){return t==null?"":ux(t)}var ly=o1;function s1(t,e){return Q(t)?t:bo(t,e)?[t]:uy(ly(t))}var Pn=s1;var a1=1/0;function u1(t){if(typeof t=="string"||Tn(t))return t;var e=t+"";return e=="0"&&1/t==-a1?"-0":e}var Mr=u1;function l1(t,e){e=Pn(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Mr(e[r++])];return r&&r==n?t:void 0}var wo=l1;function c1(t,e,r){var n=t==null?void 0:wo(t,e);return n===void 0?r:n}var cy=c1;function f1(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var Co=f1;var fy=At?At.isConcatSpreadable:void 0;function p1(t){return Q(t)||On(t)||!!(fy&&t&&t[fy])}var py=p1;function dy(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=py),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?dy(a,e-1,r,n,i):Co(i,a):n||(i[i.length]=a)}return i}var To=dy;function d1(t){var e=t==null?0:t.length;return e?To(t,1):[]}var xt=d1;var h1=ku(Object.getPrototypeOf,Object),Cu=h1;function m1(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}var Tu=m1;function g1(t,e,r,n){var i=-1,o=t==null?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}var hy=g1;function x1(){this.__data__=new Rn,this.size=0}var my=x1;function y1(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var gy=y1;function b1(t){return this.__data__.get(t)}var xy=b1;function E1(t){return this.__data__.has(t)}var yy=E1;var A1=200;function k1(t,e){var r=this.__data__;if(r instanceof Rn){var n=r.__data__;if(!Fn||n.length<A1-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Oi(n)}return r.set(t,e),this.size=r.size,this}var by=k1;function _o(t){var e=this.__data__=new Rn(t);this.size=e.size}_o.prototype.clear=my;_o.prototype.delete=gy;_o.prototype.get=xy;_o.prototype.has=yy;_o.prototype.set=by;var Ln=_o;function w1(t,e){return t&&Nr(e,Pe(e),t)}var Ey=w1;function C1(t,e){return t&&Nr(e,vn(e),t)}var Ay=C1;var Ty=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ky=Ty&&typeof module=="object"&&module&&!module.nodeType&&module,T1=ky&&ky.exports===Ty,wy=T1?ct.Buffer:void 0,Cy=wy?wy.allocUnsafe:void 0;function _1(t,e){if(e)return t.slice();var r=t.length,n=Cy?Cy(r):new t.constructor(r);return t.copy(n),n}var _y=_1;function S1(t,e){for(var r=-1,n=t==null?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}var So=S1;function I1(){return[]}var _u=I1;var O1=Object.prototype,v1=O1.propertyIsEnumerable,Sy=Object.getOwnPropertySymbols,D1=Sy?function(t){return t==null?[]:(t=Object(t),So(Sy(t),function(e){return v1.call(t,e)}))}:_u,Io=D1;function R1(t,e){return Nr(t,Io(t),e)}var Iy=R1;var F1=Object.getOwnPropertySymbols,N1=F1?function(t){for(var e=[];t;)Co(e,Io(t)),t=Cu(t);return e}:_u,Su=N1;function P1(t,e){return Nr(t,Su(t),e)}var Oy=P1;function L1(t,e,r){var n=e(t);return Q(t)?n:Co(n,r(t))}var Iu=L1;function M1(t){return Iu(t,Pe,Io)}var Cs=M1;function B1(t){return Iu(t,vn,Su)}var Ou=B1;var j1=qt(ct,"DataView"),vu=j1;var U1=qt(ct,"Promise"),Du=U1;var z1=qt(ct,"Set"),Mn=z1;var vy="[object Map]",$1="[object Object]",Dy="[object Promise]",Ry="[object Set]",Fy="[object WeakMap]",Ny="[object DataView]",q1=tn(vu),V1=tn(Fn),G1=tn(Du),W1=tn(Mn),H1=tn(xu),vi=Nt;(vu&&vi(new vu(new ArrayBuffer(1)))!=Ny||Fn&&vi(new Fn)!=vy||Du&&vi(Du.resolve())!=Dy||Mn&&vi(new Mn)!=Ry||xu&&vi(new xu)!=Fy)&&(vi=function(t){var e=Nt(t),r=e==$1?t.constructor:void 0,n=r?tn(r):"";if(n)switch(n){case q1:return Ny;case V1:return vy;case G1:return Dy;case W1:return Ry;case H1:return Fy}return e});var gr=vi;var K1=Object.prototype,Y1=K1.hasOwnProperty;function Z1(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Y1.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Py=Z1;var X1=ct.Uint8Array,Oo=X1;function J1(t){var e=new t.constructor(t.byteLength);return new Oo(e).set(new Oo(t)),e}var vo=J1;function Q1(t,e){var r=e?vo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Ly=Q1;var eD=/\w*$/;function tD(t){var e=new t.constructor(t.source,eD.exec(t));return e.lastIndex=t.lastIndex,e}var My=tD;var By=At?At.prototype:void 0,jy=By?By.valueOf:void 0;function rD(t){return jy?Object(jy.call(t)):{}}var Uy=rD;function nD(t,e){var r=e?vo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var zy=nD;var iD="[object Boolean]",oD="[object Date]",sD="[object Map]",aD="[object Number]",uD="[object RegExp]",lD="[object Set]",cD="[object String]",fD="[object Symbol]",pD="[object ArrayBuffer]",dD="[object DataView]",hD="[object Float32Array]",mD="[object Float64Array]",gD="[object Int8Array]",xD="[object Int16Array]",yD="[object Int32Array]",bD="[object Uint8Array]",ED="[object Uint8ClampedArray]",AD="[object Uint16Array]",kD="[object Uint32Array]";function wD(t,e,r){var n=t.constructor;switch(e){case pD:return vo(t);case iD:case oD:return new n(+t);case dD:return Ly(t,r);case hD:case mD:case gD:case xD:case yD:case bD:case ED:case AD:case kD:return zy(t,r);case sD:return new n;case aD:case cD:return new n(t);case uD:return My(t);case lD:return new n;case fD:return Uy(t)}}var $y=wD;function CD(t){return typeof t.constructor=="function"&&!Pr(t)?Ex(Cu(t)):{}}var qy=CD;var TD="[object Map]";function _D(t){return ot(t)&&gr(t)==TD}var Vy=_D;var Gy=fr&&fr.isMap,SD=Gy?Lr(Gy):Vy,Wy=SD;var ID="[object Set]";function OD(t){return ot(t)&&gr(t)==ID}var Hy=OD;var Ky=fr&&fr.isSet,vD=Ky?Lr(Ky):Hy,Yy=vD;var DD=1,RD=2,FD=4,Zy="[object Arguments]",ND="[object Array]",PD="[object Boolean]",LD="[object Date]",MD="[object Error]",Xy="[object Function]",BD="[object GeneratorFunction]",jD="[object Map]",UD="[object Number]",Jy="[object Object]",zD="[object RegExp]",$D="[object Set]",qD="[object String]",VD="[object Symbol]",GD="[object WeakMap]",WD="[object ArrayBuffer]",HD="[object DataView]",KD="[object Float32Array]",YD="[object Float64Array]",ZD="[object Int8Array]",XD="[object Int16Array]",JD="[object Int32Array]",QD="[object Uint8Array]",eR="[object Uint8ClampedArray]",tR="[object Uint16Array]",rR="[object Uint32Array]",Le={};Le[Zy]=Le[ND]=Le[WD]=Le[HD]=Le[PD]=Le[LD]=Le[KD]=Le[YD]=Le[ZD]=Le[XD]=Le[JD]=Le[jD]=Le[UD]=Le[Jy]=Le[zD]=Le[$D]=Le[qD]=Le[VD]=Le[QD]=Le[eR]=Le[tR]=Le[rR]=!0;Le[MD]=Le[Xy]=Le[GD]=!1;function Ru(t,e,r,n,i,o){var s,a=e&DD,u=e&RD,l=e&FD;if(r&&(s=i?r(t,n,i,o):r(t)),s!==void 0)return s;if(!Ye(t))return t;var c=Q(t);if(c){if(s=Py(t),!a)return kx(t,s)}else{var f=gr(t),p=f==Xy||f==BD;if(rn(t))return _y(t,a);if(f==Jy||f==Zy||p&&!i){if(s=u||p?{}:qy(t),!a)return u?Oy(t,Ay(s,t)):Iy(t,Ey(s,t))}else{if(!Le[f])return i?t:{};s=$y(t,f,a)}}o||(o=new Ln);var d=o.get(t);if(d)return d;o.set(t,s),Yy(t)?t.forEach(function(g){s.add(Ru(g,e,r,g,t,o))}):Wy(t)&&t.forEach(function(g,b){s.set(b,Ru(g,e,r,b,t,o))});var m=l?u?Ou:Cs:u?vn:Pe,y=c?void 0:m(t);return yu(y||t,function(g,b){y&&(b=g,g=t[b]),Sn(s,b,Ru(g,e,r,b,t,o))}),s}var Qy=Ru;var nR=4;function iR(t){return Qy(t,nR)}var Me=iR;function oR(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i}var Br=oR;var sR="__lodash_hash_undefined__";function aR(t){return this.__data__.set(t,sR),this}var eb=aR;function uR(t){return this.__data__.has(t)}var tb=uR;function Fu(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Oi;++e<r;)this.add(t[e])}Fu.prototype.add=Fu.prototype.push=eb;Fu.prototype.has=tb;var Do=Fu;function lR(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Nu=lR;function cR(t,e){return t.has(e)}var Ro=cR;var fR=1,pR=2;function dR(t,e,r,n,i,o){var s=r&fR,a=t.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var l=o.get(t),c=o.get(e);if(l&&c)return l==e&&c==t;var f=-1,p=!0,d=r&pR?new Do:void 0;for(o.set(t,e),o.set(e,t);++f<a;){var m=t[f],y=e[f];if(n)var g=s?n(y,m,f,e,t,o):n(m,y,f,t,e,o);if(g!==void 0){if(g)continue;p=!1;break}if(d){if(!Nu(e,function(b,w){if(!Ro(d,w)&&(m===b||i(m,b,r,n,o)))return d.push(w)})){p=!1;break}}else if(!(m===y||i(m,y,r,n,o))){p=!1;break}}return o.delete(t),o.delete(e),p}var Pu=dR;function hR(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var rb=hR;function mR(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Fo=mR;var gR=1,xR=2,yR="[object Boolean]",bR="[object Date]",ER="[object Error]",AR="[object Map]",kR="[object Number]",wR="[object RegExp]",CR="[object Set]",TR="[object String]",_R="[object Symbol]",SR="[object ArrayBuffer]",IR="[object DataView]",nb=At?At.prototype:void 0,np=nb?nb.valueOf:void 0;function OR(t,e,r,n,i,o,s){switch(r){case IR:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case SR:return!(t.byteLength!=e.byteLength||!o(new Oo(t),new Oo(e)));case yR:case bR:case kR:return Fr(+t,+e);case ER:return t.name==e.name&&t.message==e.message;case wR:case TR:return t==e+"";case AR:var a=rb;case CR:var u=n&gR;if(a||(a=Fo),t.size!=e.size&&!u)return!1;var l=s.get(t);if(l)return l==e;n|=xR,s.set(t,e);var c=Pu(a(t),a(e),n,i,o,s);return s.delete(t),c;case _R:if(np)return np.call(t)==np.call(e)}return!1}var ib=OR;var vR=1,DR=Object.prototype,RR=DR.hasOwnProperty;function FR(t,e,r,n,i,o){var s=r&vR,a=Cs(t),u=a.length,l=Cs(e),c=l.length;if(u!=c&&!s)return!1;for(var f=u;f--;){var p=a[f];if(!(s?p in e:RR.call(e,p)))return!1}var d=o.get(t),m=o.get(e);if(d&&m)return d==e&&m==t;var y=!0;o.set(t,e),o.set(e,t);for(var g=s;++f<u;){p=a[f];var b=t[p],w=e[p];if(n)var k=s?n(w,b,p,e,t,o):n(b,w,p,t,e,o);if(!(k===void 0?b===w||i(b,w,r,n,o):k)){y=!1;break}g||(g=p=="constructor")}if(y&&!g){var D=t.constructor,R=e.constructor;D!=R&&"constructor"in t&&"constructor"in e&&!(typeof D=="function"&&D instanceof D&&typeof R=="function"&&R instanceof R)&&(y=!1)}return o.delete(t),o.delete(e),y}var ob=FR;var NR=1,sb="[object Arguments]",ab="[object Array]",Lu="[object Object]",PR=Object.prototype,ub=PR.hasOwnProperty;function LR(t,e,r,n,i,o){var s=Q(t),a=Q(e),u=s?ab:gr(t),l=a?ab:gr(e);u=u==sb?Lu:u,l=l==sb?Lu:l;var c=u==Lu,f=l==Lu,p=u==l;if(p&&rn(t)){if(!rn(e))return!1;s=!0,c=!1}if(p&&!c)return o||(o=new Ln),s||yo(t)?Pu(t,e,r,n,i,o):ib(t,e,u,r,n,i,o);if(!(r&NR)){var d=c&&ub.call(t,"__wrapped__"),m=f&&ub.call(e,"__wrapped__");if(d||m){var y=d?t.value():t,g=m?e.value():e;return o||(o=new Ln),i(y,g,r,n,o)}}return p?(o||(o=new Ln),ob(t,e,r,n,i,o)):!1}var lb=LR;function cb(t,e,r,n,i){return t===e?!0:t==null||e==null||!ot(t)&&!ot(e)?t!==t&&e!==e:lb(t,e,r,n,cb,i)}var Mu=cb;var MR=1,BR=2;function jR(t,e,r,n){var i=r.length,o=i,s=!n;if(t==null)return!o;for(t=Object(t);i--;){var a=r[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=r[i];var u=a[0],l=t[u],c=a[1];if(s&&a[2]){if(l===void 0&&!(u in t))return!1}else{var f=new Ln;if(n)var p=n(l,c,u,t,e,f);if(!(p===void 0?Mu(c,l,MR|BR,n,f):p))return!1}}return!0}var fb=jR;function UR(t){return t===t&&!Ye(t)}var Bu=UR;function zR(t){for(var e=Pe(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Bu(i)]}return e}var pb=zR;function $R(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var ju=$R;function qR(t){var e=pb(t);return e.length==1&&e[0][2]?ju(e[0][0],e[0][1]):function(r){return r===t||fb(r,t,e)}}var db=qR;function VR(t,e){return t!=null&&e in Object(t)}var hb=VR;function GR(t,e,r){e=Pn(e,t);for(var n=-1,i=e.length,o=!1;++n<i;){var s=Mr(e[n]);if(!(o=t!=null&&r(t,s)))break;t=t[s]}return o||++n!=i?o:(i=t==null?0:t.length,!!i&&xo(i)&&_n(s,i)&&(Q(t)||On(t)))}var Uu=GR;function WR(t,e){return t!=null&&Uu(t,e,hb)}var mb=WR;var HR=1,KR=2;function YR(t,e){return bo(t)&&Bu(e)?ju(Mr(t),e):function(r){var n=cy(r,t);return n===void 0&&n===e?mb(r,t):Mu(e,n,HR|KR)}}var gb=YR;function ZR(t){return function(e){return e?.[t]}}var xb=ZR;function XR(t){return function(e){return wo(e,t)}}var yb=XR;function JR(t){return bo(t)?xb(Mr(t)):yb(t)}var bb=JR;function QR(t){return typeof t=="function"?t:t==null?cr:typeof t=="object"?Q(t)?gb(t[0],t[1]):db(t):bb(t)}var pt=QR;function eF(t,e,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;){var s=t[i];e(n,s,r(s),t)}return n}var Eb=eF;function tF(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var u=s[t?a:++i];if(r(o[u],u,o)===!1)break}return e}}var Ab=tF;var rF=Ab(),kb=rF;function nF(t,e){return t&&kb(t,e,Pe)}var wb=nF;function iF(t,e){return function(r,n){if(r==null)return r;if(!ft(r))return t(r,n);for(var i=r.length,o=e?i:-1,s=Object(r);(e?o--:++o<i)&&n(s[o],o,s)!==!1;);return r}}var Cb=iF;var oF=Cb(wb),Vt=oF;function sF(t,e,r,n){return Vt(t,function(i,o,s){e(n,i,r(i),s)}),n}var Tb=sF;function aF(t,e){return function(r,n){var i=Q(r)?Eb:Tb,o=e?e():{};return i(r,t,pt(n,2),o)}}var _b=aF;var Sb=Object.prototype,uF=Sb.hasOwnProperty,lF=go(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&In(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],s=vn(o),a=-1,u=s.length;++a<u;){var l=s[a],c=t[l];(c===void 0||Fr(c,Sb[l])&&!uF.call(t,l))&&(t[l]=o[l])}return t}),No=lF;function cF(t){return ot(t)&&ft(t)}var ip=cF;function fF(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var zu=fF;var pF=200;function dF(t,e,r,n){var i=-1,o=Eu,s=!0,a=t.length,u=[],l=e.length;if(!a)return u;r&&(e=Dr(e,Lr(r))),n?(o=zu,s=!1):e.length>=pF&&(o=Ro,s=!1,e=new Do(e));e:for(;++i<a;){var c=t[i],f=r==null?c:r(c);if(c=n||c!==0?c:0,s&&f===f){for(var p=l;p--;)if(e[p]===f)continue e;u.push(c)}else o(e,f,n)||u.push(c)}return u}var Ib=dF;var hF=go(function(t,e){return ip(t)?Ib(t,To(e,1,ip,!0)):[]}),Bn=hF;function mF(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var jr=mF;function gF(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Rr(e),Tu(t,e<0?0:e,n)):[]}var st=gF;function xF(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Rr(e),e=n-e,Tu(t,0,e<0?0:e)):[]}var on=xF;function yF(t){return typeof t=="function"?t:cr}var Ob=yF;function bF(t,e){var r=Q(t)?yu:Vt;return r(t,Ob(e))}var G=bF;function EF(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}var vb=EF;function AF(t,e){var r=!0;return Vt(t,function(n,i,o){return r=!!e(n,i,o),r}),r}var Db=AF;function kF(t,e,r){var n=Q(t)?vb:Db;return r&&In(t,e,r)&&(e=void 0),n(t,pt(e,3))}var Ot=kF;function wF(t,e){var r=[];return Vt(t,function(n,i,o){e(n,i,o)&&r.push(n)}),r}var $u=wF;function CF(t,e){var r=Q(t)?So:$u;return r(t,pt(e,3))}var vt=CF;function TF(t){return function(e,r,n){var i=Object(e);if(!ft(e)){var o=pt(r,3);e=Pe(e),r=function(a){return o(i[a],a,i)}}var s=t(e,r,n);return s>-1?i[o?e[s]:s]:void 0}}var Rb=TF;var _F=Math.max;function SF(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:Rr(r);return i<0&&(i=_F(n+i,0)),bu(t,pt(e,3),i)}var Fb=SF;var IF=Rb(Fb),Ur=IF;function OF(t){return t&&t.length?t[0]:void 0}var kt=OF;function vF(t,e){var r=-1,n=ft(t)?Array(t.length):[];return Vt(t,function(i,o,s){n[++r]=e(i,o,s)}),n}var Nb=vF;function DF(t,e){var r=Q(t)?Dr:Nb;return r(t,pt(e,3))}var V=DF;function RF(t,e){return To(V(t,e),1)}var Lt=RF;var FF=Object.prototype,NF=FF.hasOwnProperty,PF=_b(function(t,e,r){NF.call(t,r)?t[r].push(e):mo(t,r,[e])}),op=PF;var LF=Object.prototype,MF=LF.hasOwnProperty;function BF(t,e){return t!=null&&MF.call(t,e)}var Pb=BF;function jF(t,e){return t!=null&&Uu(t,e,Pb)}var X=jF;var UF="[object String]";function zF(t){return typeof t=="string"||!Q(t)&&ot(t)&&Nt(t)==UF}var yt=zF;function $F(t,e){return Dr(e,function(r){return t[r]})}var Lb=$F;function qF(t){return t==null?[]:Lb(t,Pe(t))}var Re=qF;var VF=Math.max;function GF(t,e,r,n){t=ft(t)?t:Re(t),r=r&&!n?Rr(r):0;var i=t.length;return r<0&&(r=VF(i+r,0)),yt(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&ho(t,e,r)>-1}var We=GF;var WF=Math.max;function HF(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:Rr(r);return i<0&&(i=WF(n+i,0)),ho(t,e,i)}var qu=HF;var KF="[object Map]",YF="[object Set]",ZF=Object.prototype,XF=ZF.hasOwnProperty;function JF(t){if(t==null)return!0;if(ft(t)&&(Q(t)||typeof t=="string"||typeof t.splice=="function"||rn(t)||yo(t)||On(t)))return!t.length;var e=gr(t);if(e==KF||e==YF)return!t.size;if(Pr(t))return!wu(t).length;for(var r in t)if(XF.call(t,r))return!1;return!0}var Te=JF;var QF="[object RegExp]";function eN(t){return ot(t)&&Nt(t)==QF}var Mb=eN;var Bb=fr&&fr.isRegExp,tN=Bb?Lr(Bb):Mb,pr=tN;function rN(t){return t===void 0}var Dt=rN;var nN="Expected a function";function iN(t){if(typeof t!="function")throw new TypeError(nN);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var jb=iN;function oN(t,e,r,n){if(!Ye(t))return t;e=Pn(e,t);for(var i=-1,o=e.length,s=o-1,a=t;a!=null&&++i<o;){var u=Mr(e[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=s){var c=a[u];l=n?n(c,u,a):void 0,l===void 0&&(l=Ye(c)?c:_n(e[i+1])?[]:{})}Sn(a,u,l),a=a[u]}return t}var Ub=oN;function sN(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var s=e[n],a=wo(t,s);r(a,s)&&Ub(o,Pn(s,t),a)}return o}var zb=sN;function aN(t,e){if(t==null)return{};var r=Dr(Ou(t),function(n){return[n]});return e=pt(e),zb(t,r,function(n,i){return e(n,i[0])})}var Gt=aN;function uN(t,e,r,n,i){return i(t,function(o,s,a){r=n?(n=!1,o):e(r,o,s,a)}),r}var $b=uN;function lN(t,e,r){var n=Q(t)?hy:$b,i=arguments.length<3;return n(t,pt(e,4),r,i,Vt)}var dt=lN;function cN(t,e){var r=Q(t)?So:$u;return r(t,jb(pt(e,3)))}var jn=cN;function fN(t,e){var r;return Vt(t,function(n,i,o){return r=e(n,i,o),!r}),!!r}var qb=fN;function pN(t,e,r){var n=Q(t)?Nu:qb;return r&&In(t,e,r)&&(e=void 0),n(t,pt(e,3))}var Ts=pN;var dN=1/0,hN=Mn&&1/Fo(new Mn([,-0]))[1]==dN?function(t){return new Mn(t)}:Ze,Vb=hN;var mN=200;function gN(t,e,r){var n=-1,i=Eu,o=t.length,s=!0,a=[],u=a;if(r)s=!1,i=zu;else if(o>=mN){var l=e?null:Vb(t);if(l)return Fo(l);s=!1,i=Ro,u=new Do}else u=e?[]:a;e:for(;++n<o;){var c=t[n],f=e?e(c):c;if(c=r||c!==0?c:0,s&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;e&&u.push(f),a.push(c)}else i(u,f,r)||(u!==a&&u.push(f),a.push(c))}return a}var Gb=gN;function xN(t){return t&&t.length?Gb(t):[]}var Po=xN;function Lo(t){console&&console.error&&console.error(`Error: ${t}`)}function _s(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function Ss(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}function Is(t){function e(){}e.prototype=t;let r=new e;function n(){return typeof r.bar}return n(),n(),t;(0,eval)(t)}function yN(t){return bN(t)?t.LABEL:t.name}function bN(t){return yt(t.LABEL)&&t.LABEL!==""}var er=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),G(this.definition,r=>{r.accept(e)})}},Be=class extends er{constructor(e){super([]),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Mt=class extends er{constructor(e){super(e.definition),this.orgText="",Tt(this,Gt(e,r=>r!==void 0))}},je=class extends er{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Tt(this,Gt(e,r=>r!==void 0))}},Ge=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},at=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},ut=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},De=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},et=class extends er{constructor(e){super(e.definition),this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}},tt=class extends er{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Tt(this,Gt(e,r=>r!==void 0))}},ve=class{constructor(e){this.idx=1,Tt(this,Gt(e,r=>r!==void 0))}accept(e){e.visit(this)}};function Vu(t){return V(t,Mo)}function Mo(t){function e(r){return V(r,Mo)}if(t instanceof Be){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return yt(t.label)&&(r.label=t.label),r}else{if(t instanceof je)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Ge)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof at)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof ut)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Mo(new ve({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof et)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Mo(new ve({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof De)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof tt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof ve){let r={type:"Terminal",name:t.terminalType.name,label:yN(t.terminalType),idx:t.idx};yt(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=pr(n)?n.source:n),r}else{if(t instanceof Mt)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}var Bt=class{visit(e){let r=e;switch(r.constructor){case Be:return this.visitNonTerminal(r);case je:return this.visitAlternative(r);case Ge:return this.visitOption(r);case at:return this.visitRepetitionMandatory(r);case ut:return this.visitRepetitionMandatoryWithSeparator(r);case et:return this.visitRepetitionWithSeparator(r);case De:return this.visitRepetition(r);case tt:return this.visitAlternation(r);case ve:return this.visitTerminal(r);case Mt:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function sp(t){return t instanceof je||t instanceof Ge||t instanceof De||t instanceof at||t instanceof ut||t instanceof et||t instanceof ve||t instanceof Mt}function Di(t,e=[]){return t instanceof Ge||t instanceof De||t instanceof et?!0:t instanceof tt?Ts(t.definition,n=>Di(n,e)):t instanceof Be&&We(e,t)?!1:t instanceof er?(t instanceof Be&&e.push(t),Ot(t.definition,n=>Di(n,e))):!1}function ap(t){return t instanceof tt}function Wt(t){if(t instanceof Be)return"SUBRULE";if(t instanceof Ge)return"OPTION";if(t instanceof tt)return"OR";if(t instanceof at)return"AT_LEAST_ONE";if(t instanceof ut)return"AT_LEAST_ONE_SEP";if(t instanceof et)return"MANY_SEP";if(t instanceof De)return"MANY";if(t instanceof ve)return"CONSUME";throw Error("non exhaustive match")}var sn=class{walk(e,r=[]){G(e.definition,(n,i)=>{let o=st(e.definition,i+1);if(n instanceof Be)this.walkProdRef(n,o,r);else if(n instanceof ve)this.walkTerminal(n,o,r);else if(n instanceof je)this.walkFlat(n,o,r);else if(n instanceof Ge)this.walkOption(n,o,r);else if(n instanceof at)this.walkAtLeastOne(n,o,r);else if(n instanceof ut)this.walkAtLeastOneSep(n,o,r);else if(n instanceof et)this.walkManySep(n,o,r);else if(n instanceof De)this.walkMany(n,o,r);else if(n instanceof tt)this.walkOr(n,o,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let i=r.concat(n);this.walk(e,i)}walkOption(e,r,n){let i=r.concat(n);this.walk(e,i)}walkAtLeastOne(e,r,n){let i=[new Ge({definition:e.definition})].concat(r,n);this.walk(e,i)}walkAtLeastOneSep(e,r,n){let i=Wb(e,r,n);this.walk(e,i)}walkMany(e,r,n){let i=[new Ge({definition:e.definition})].concat(r,n);this.walk(e,i)}walkManySep(e,r,n){let i=Wb(e,r,n);this.walk(e,i)}walkOr(e,r,n){let i=r.concat(n);G(e.definition,o=>{let s=new je({definition:[o]});this.walk(s,i)})}};function Wb(t,e,r){return[new Ge({definition:[new ve({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}function Ri(t){if(t instanceof Be)return Ri(t.referencedRule);if(t instanceof ve)return kN(t);if(sp(t))return EN(t);if(ap(t))return AN(t);throw Error("non exhaustive match")}function EN(t){let e=[],r=t.definition,n=0,i=r.length>n,o,s=!0;for(;i&&s;)o=r[n],s=Di(o),e=e.concat(Ri(o)),n=n+1,i=r.length>n;return Po(e)}function AN(t){let e=V(t.definition,r=>Ri(r));return Po(xt(e))}function kN(t){return[t.terminalType]}var Gu="_~IN~_";var up=class extends sn{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){let i=wN(e.referencedRule,e.idx)+this.topProd.name,o=r.concat(n),s=new je({definition:o}),a=Ri(s);this.follows[i]=a}};function Hb(t){let e={};return G(t,r=>{let n=new up(r).startWalking();Tt(e,n)}),e}function wN(t,e){return t.name+e+Gu}function le(t){return t.charCodeAt(0)}function Wu(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function Bo(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function Fi(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Os(){throw Error("Internal Error - Should never get here!")}function lp(t){return t.type==="Character"}var vs=[];for(let t=le("0");t<=le("9");t++)vs.push(t);var Ds=[le("_")].concat(vs);for(let t=le("a");t<=le("z");t++)Ds.push(t);for(let t=le("A");t<=le("Z");t++)Ds.push(t);var cp=[le(" "),le("\f"),le(`
|
|
115
|
+
`),le("\r"),le(" "),le("\v"),le(" "),le("\xA0"),le("\u1680"),le("\u2000"),le("\u2001"),le("\u2002"),le("\u2003"),le("\u2004"),le("\u2005"),le("\u2006"),le("\u2007"),le("\u2008"),le("\u2009"),le("\u200A"),le("\u2028"),le("\u2029"),le("\u202F"),le("\u205F"),le("\u3000"),le("\uFEFF")];var CN=/[0-9a-fA-F]/,Hu=/[0-9]/,TN=/[1-9]/,Rs=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Bo(n,"global");break;case"i":Bo(n,"ignoreCase");break;case"m":Bo(n,"multiLine");break;case"u":Bo(n,"unicode");break;case"y":Bo(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}Fi(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return Os()}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let o;this.isDigit()?(o=this.integerIncludingZero(),r={atLeast:i,atMost:o}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;Fi(r);break}if(!(e===!0&&r===void 0)&&Fi(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e,r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Fi(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Os()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[le(`
|
|
116
116
|
`),le("\r"),le("\u2028"),le("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=vs;break;case"D":e=vs,r=!0;break;case"s":e=cp;break;case"S":e=cp,r=!0;break;case"w":e=Ds;break;case"W":e=Ds,r=!0;break}return Fi(e)?{type:"Set",value:e,complement:r}:Os()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=le("\f");break;case"n":e=le(`
|
|
117
117
|
`);break;case"r":e=le("\r");break;case"t":e=le(" ");break;case"v":e=le("\v");break}return Fi(e)?{type:"Character",value:e}:Os()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:le("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:le(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
118
118
|
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:le(e)}}}characterClass(){let e=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(lp(n)&&this.isRangeDash()){this.consumeChar("-");let o=this.classAtom(),s=o.type==="Character";if(lp(o)){if(o.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:o.value})}else Wu(n.value,e),e.push(le("-")),Wu(o.value,e)}else Wu(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:r,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
|
|
119
|
-
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:le("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:e,value:r};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(
|
|
119
|
+
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:le("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:e,value:r};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(TN.test(e)===!1)throw Error("Expecting a positive integer");for(;Hu.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Hu.test(e)===!1)throw Error("Expecting an integer");for(;Hu.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`
|
|
120
120
|
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:le(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return Hu.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
|
|
121
121
|
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
|
|
122
|
-
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let i=0;i<e;i++){let o=this.popChar();if(
|
|
122
|
+
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let i=0;i<e;i++){let o=this.popChar();if(CN.test(o)===!1)throw Error("Expecting a HexDecimal digits");r+=o}return{type:"Character",value:parseInt(r,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}};var Un=class{visitChildren(e){for(let r in e){let n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}};var Ku={},_N=new Rs;function jo(t){let e=t.toString();if(Ku.hasOwnProperty(e))return Ku[e];{let r=_N.pattern(e);return Ku[e]=r,r}}function Kb(){Ku={}}var Zb="Complement Sets are not supported for first char optimization",Fs=`Unable to use "first char" lexer optimizations:
|
|
123
123
|
`;function Xb(t,e=!1){try{let r=jo(t);return fp(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Zb)e&&_s(`${Fs} Unable to optimize: < ${t.toString()} >
|
|
124
124
|
Complement Sets cannot be automatically optimized.
|
|
125
125
|
This will disable the lexer's first char optimizations.
|
|
@@ -128,33 +128,33 @@ ${e.fullCommandName}${r}
|
|
|
128
128
|
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Lo(`${Fs}
|
|
129
129
|
Failed parsing: < ${t.toString()} >
|
|
130
130
|
Using the @chevrotain/regexp-to-ast library
|
|
131
|
-
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function fp(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)fp(t.value[i],e,r);break;case"Alternative":let n=t.value;for(let i=0;i<n.length;i++){let o=n[i];switch(o.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let s=o;switch(s.type){case"Character":Yu(s.value,e,r);break;case"Set":if(s.complement===!0)throw Error(Zb);G(s.value,u=>{if(typeof u=="number")Yu(u,e,r);else{let l=u;if(r===!0)for(let c=l.from;c<=l.to;c++)Yu(c,e,r);else{for(let c=l.from;c<=l.to&&c<Uo;c++)Yu(c,e,r);if(l.to>=Uo){let c=l.from>=Uo?l.from:Uo,f=l.to,p=zr(c),d=zr(f);for(let m=p;m<=d;m++)e[m]=m}}}});break;case"Group":fp(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}let a=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&pp(s)===!1||s.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return Re(e)}function Yu(t,e,r){let n=zr(t);e[n]=n,r===!0&&
|
|
132
|
-
`],tracer:(w,k)=>k()});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{
|
|
131
|
+
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function fp(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)fp(t.value[i],e,r);break;case"Alternative":let n=t.value;for(let i=0;i<n.length;i++){let o=n[i];switch(o.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let s=o;switch(s.type){case"Character":Yu(s.value,e,r);break;case"Set":if(s.complement===!0)throw Error(Zb);G(s.value,u=>{if(typeof u=="number")Yu(u,e,r);else{let l=u;if(r===!0)for(let c=l.from;c<=l.to;c++)Yu(c,e,r);else{for(let c=l.from;c<=l.to&&c<Uo;c++)Yu(c,e,r);if(l.to>=Uo){let c=l.from>=Uo?l.from:Uo,f=l.to,p=zr(c),d=zr(f);for(let m=p;m<=d;m++)e[m]=m}}}});break;case"Group":fp(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}let a=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&pp(s)===!1||s.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return Re(e)}function Yu(t,e,r){let n=zr(t);e[n]=n,r===!0&&SN(t,e)}function SN(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let i=zr(n.charCodeAt(0));e[i]=i}else{let i=r.toLowerCase();if(i!==r){let o=zr(i.charCodeAt(0));e[o]=o}}}function Yb(t,e){return Ur(t.value,r=>{if(typeof r=="number")return We(e,r);{let n=r;return Ur(e,i=>n.from<=i&&i<=n.to)!==void 0}})}function pp(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?Q(t.value)?Ot(t.value,pp):pp(t.value):!1}var dp=class extends Un{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){We(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Yb(e,this.targetCharCodes)===void 0&&(this.found=!0):Yb(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function Zu(t,e){if(e instanceof RegExp){let r=jo(e),n=new dp(t);return n.visit(r),n.found}else return Ur(e,r=>We(t,r.charCodeAt(0)))!==void 0}var Ni="PATTERN",zo="defaultMode",Xu="modes",mp=typeof new RegExp("(?:)").sticky=="boolean";function eE(t,e){e=No(e,{useSticky:mp,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
|
132
|
+
`],tracer:(w,k)=>k()});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{GN()});let n;r("Reject Lexer.NA",()=>{n=jn(t,w=>w[Ni]===Ie.NA)});let i=!1,o;r("Transform Patterns",()=>{i=!1,o=V(n,w=>{let k=w[Ni];if(pr(k)){let D=k.source;return D.length===1&&D!=="^"&&D!=="$"&&D!=="."&&!k.ignoreCase?D:D.length===2&&D[0]==="\\"&&!We(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],D[1])?D[1]:e.useSticky?Qb(k):Jb(k)}else{if(Pt(k))return i=!0,{exec:k};if(typeof k=="object")return i=!0,k;if(typeof k=="string"){if(k.length===1)return k;{let D=k.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),R=new RegExp(D);return e.useSticky?Qb(R):Jb(R)}}else throw Error("non exhaustive match")}})});let s,a,u,l,c;r("misc mapping",()=>{s=V(n,w=>w.tokenTypeIdx),a=V(n,w=>{let k=w.GROUP;if(k!==Ie.SKIPPED){if(yt(k))return k;if(Dt(k))return!1;throw Error("non exhaustive match")}}),u=V(n,w=>{let k=w.LONGER_ALT;if(k)return Q(k)?V(k,R=>qu(n,R)):[qu(n,k)]}),l=V(n,w=>w.PUSH_MODE),c=V(n,w=>X(w,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let w=uE(e.lineTerminatorCharacters);f=V(n,k=>!1),e.positionTracking!=="onlyOffset"&&(f=V(n,k=>X(k,"LINE_BREAKS")?!!k.LINE_BREAKS:aE(k,w)===!1&&Zu(w,k.PATTERN)))});let p,d,m,y;r("Misc Mapping #2",()=>{p=V(n,oE),d=V(o,qN),m=dt(n,(w,k)=>{let D=k.GROUP;return yt(D)&&D!==Ie.SKIPPED&&(w[D]=[]),w},{}),y=V(o,(w,k)=>({pattern:o[k],longerAlt:u[k],canLineTerminator:f[k],isCustom:p[k],short:d[k],group:a[k],push:l[k],pop:c[k],tokenTypeIdx:s[k],tokenType:n[k]}))});let g=!0,b=[];return e.safeMode||r("First Char Optimization",()=>{b=dt(n,(w,k,D)=>{if(typeof k.PATTERN=="string"){let R=k.PATTERN.charCodeAt(0),S=zr(R);hp(w,S,y[D])}else if(Q(k.START_CHARS_HINT)){let R;G(k.START_CHARS_HINT,S=>{let de=typeof S=="string"?S.charCodeAt(0):S,ye=zr(de);R!==ye&&(R=ye,hp(w,ye,y[D]))})}else if(pr(k.PATTERN))if(k.PATTERN.unicode)g=!1,e.ensureOptimizations&&Lo(`${Fs} Unable to analyze < ${k.PATTERN.toString()} > pattern.
|
|
133
133
|
The regexp unicode flag is not currently supported by the regexp-to-ast library.
|
|
134
134
|
This will disable the lexer's first char optimizations.
|
|
135
135
|
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let R=Xb(k.PATTERN,e.ensureOptimizations);Te(R)&&(g=!1),G(R,S=>{hp(w,S,y[D])})}else e.ensureOptimizations&&Lo(`${Fs} TokenType: <${k.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
|
|
136
136
|
This will disable the lexer's first char optimizations.
|
|
137
|
-
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),g=!1;return w},[])}),{emptyGroups:m,patternIdxToConfig:y,charCodeToPatternIdxToConfig:b,hasCustom:i,canBeOptimized:g}}function tE(t,e){let r=[],n=
|
|
137
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),g=!1;return w},[])}),{emptyGroups:m,patternIdxToConfig:y,charCodeToPatternIdxToConfig:b,hasCustom:i,canBeOptimized:g}}function tE(t,e){let r=[],n=ON(t);r=r.concat(n.errors);let i=vN(n.valid),o=i.valid;return r=r.concat(i.errors),r=r.concat(IN(o)),r=r.concat(BN(o)),r=r.concat(jN(o,e)),r=r.concat(UN(o)),r}function IN(t){let e=[],r=vt(t,n=>pr(n[Ni]));return e=e.concat(RN(r)),e=e.concat(PN(r)),e=e.concat(LN(r)),e=e.concat(MN(r)),e=e.concat(FN(r)),e}function ON(t){let e=vt(t,i=>!X(i,Ni)),r=V(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:He.MISSING_PATTERN,tokenTypes:[i]})),n=Bn(t,e);return{errors:r,valid:n}}function vN(t){let e=vt(t,i=>{let o=i[Ni];return!pr(o)&&!Pt(o)&&!X(o,"exec")&&!yt(o)}),r=V(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:He.INVALID_PATTERN,tokenTypes:[i]})),n=Bn(t,e);return{errors:r,valid:n}}var DN=/[^\\][$]/;function RN(t){class e extends Un{constructor(){super(...arguments),this.found=!1}visitEndAnchor(o){this.found=!0}}let r=vt(t,i=>{let o=i.PATTERN;try{let s=jo(o),a=new e;return a.visit(s),a.found}catch{return DN.test(o.source)}});return V(r,i=>({message:`Unexpected RegExp Anchor Error:
|
|
138
138
|
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
|
|
139
|
-
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:He.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function
|
|
139
|
+
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:He.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function FN(t){let e=vt(t,n=>n.PATTERN.test(""));return V(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:He.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}var NN=/[^\\[][\^]|^\^/;function PN(t){class e extends Un{constructor(){super(...arguments),this.found=!1}visitStartAnchor(o){this.found=!0}}let r=vt(t,i=>{let o=i.PATTERN;try{let s=jo(o),a=new e;return a.visit(s),a.found}catch{return NN.test(o.source)}});return V(r,i=>({message:`Unexpected RegExp Anchor Error:
|
|
140
140
|
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
|
|
141
|
-
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:He.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function
|
|
141
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:He.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function LN(t){let e=vt(t,n=>{let i=n[Ni];return i instanceof RegExp&&(i.multiline||i.global)});return V(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:He.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function MN(t){let e=[],r=V(t,o=>dt(t,(s,a)=>(o.PATTERN.source===a.PATTERN.source&&!We(e,a)&&a.PATTERN!==Ie.NA&&(e.push(a),s.push(a)),s),[]));r=Br(r);let n=vt(r,o=>o.length>1);return V(n,o=>{let s=V(o,u=>u.name);return{message:`The same RegExp pattern ->${kt(o).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:He.DUPLICATE_PATTERNS_FOUND,tokenTypes:o}})}function BN(t){let e=vt(t,n=>{if(!X(n,"GROUP"))return!1;let i=n.GROUP;return i!==Ie.SKIPPED&&i!==Ie.NA&&!yt(i)});return V(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:He.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function jN(t,e){let r=vt(t,i=>i.PUSH_MODE!==void 0&&!We(e,i.PUSH_MODE));return V(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:He.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function UN(t){let e=[],r=dt(t,(n,i,o)=>{let s=i.PATTERN;return s===Ie.NA||(yt(s)?n.push({str:s,idx:o,tokenType:i}):pr(s)&&$N(s)&&n.push({str:s.source,idx:o,tokenType:i})),n},[]);return G(t,(n,i)=>{G(r,({str:o,idx:s,tokenType:a})=>{if(i<s&&zN(o,n.PATTERN)){let u=`Token: ->${a.name}<- can never be matched.
|
|
142
142
|
Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
|
|
143
|
-
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:u,type:He.UNREACHABLE_PATTERN,tokenTypes:[n,a]})}})}),e}function
|
|
143
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:u,type:He.UNREACHABLE_PATTERN,tokenTypes:[n,a]})}})}),e}function zN(t,e){if(pr(e)){let r=e.exec(t);return r!==null&&r.index===0}else{if(Pt(e))return e(t,0,[],{});if(X(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function $N(t){return Ur([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}function Jb(t){let e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function Qb(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function rE(t,e,r){let n=[];return X(t,zo)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+zo+`> property in its definition
|
|
144
144
|
`,type:He.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),X(t,Xu)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Xu+`> property in its definition
|
|
145
145
|
`,type:He.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),X(t,Xu)&&X(t,zo)&&!X(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${zo}: <${t.defaultMode}>which does not exist
|
|
146
146
|
`,type:He.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),X(t,Xu)&&G(t.modes,(i,o)=>{G(i,(s,a)=>{if(Dt(s))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${o}> at index: <${a}>
|
|
147
147
|
`,type:He.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(X(s,"LONGER_ALT")){let u=Q(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];G(u,l=>{!Dt(l)&&!We(i,l)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${l.name}> on token <${s.name}> outside of mode <${o}>
|
|
148
|
-
`,type:He.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function nE(t,e,r){let n=[],i=!1,o=Br(xt(Re(t.modes))),s=jn(o,u=>u[Ni]===Ie.NA),a=uE(r);return e&&G(s,u=>{let l=aE(u,a);if(l!==!1){let f={message:
|
|
148
|
+
`,type:He.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function nE(t,e,r){let n=[],i=!1,o=Br(xt(Re(t.modes))),s=jn(o,u=>u[Ni]===Ie.NA),a=uE(r);return e&&G(s,u=>{let l=aE(u,a);if(l!==!1){let f={message:VN(u,l),type:l.issue,tokenType:u};n.push(f)}else X(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):Zu(a,u.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
|
|
149
149
|
This Lexer has been defined to track line and column information,
|
|
150
150
|
But none of the Token Types can be identified as matching a line terminator.
|
|
151
151
|
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
|
|
152
|
-
for details.`,type:He.NO_LINE_BREAKS_FLAGS}),n}function iE(t){let e={},r=Pe(t);return G(r,n=>{let i=t[n];if(Q(i))e[n]=[];else throw Error("non exhaustive match")}),e}function oE(t){let e=t.PATTERN;if(pr(e))return!1;if(Pt(e))return!0;if(X(e,"exec"))return!0;if(yt(e))return!1;throw Error("non exhaustive match")}function
|
|
152
|
+
for details.`,type:He.NO_LINE_BREAKS_FLAGS}),n}function iE(t){let e={},r=Pe(t);return G(r,n=>{let i=t[n];if(Q(i))e[n]=[];else throw Error("non exhaustive match")}),e}function oE(t){let e=t.PATTERN;if(pr(e))return!1;if(Pt(e))return!0;if(X(e,"exec"))return!0;if(yt(e))return!1;throw Error("non exhaustive match")}function qN(t){return yt(t)&&t.length===1?t.charCodeAt(0):!1}var sE={test:function(t){let e=t.length;for(let r=this.lastIndex;r<e;r++){let n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function aE(t,e){if(X(t,"LINE_BREAKS"))return!1;if(pr(t.PATTERN)){try{Zu(e,t.PATTERN)}catch(r){return{issue:He.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(yt(t.PATTERN))return!1;if(oE(t))return{issue:He.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function VN(t,e){if(e.issue===He.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
|
|
153
153
|
The problem is in the <${t.name}> Token Type
|
|
154
154
|
Root cause: ${e.errMsg}.
|
|
155
155
|
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===He.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
|
|
156
156
|
The problem is in the <${t.name}> Token Type
|
|
157
|
-
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function uE(t){return V(t,r=>yt(r)?r.charCodeAt(0):r)}function hp(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}var Uo=256,Ju=[];function zr(t){return t<Uo?t:Ju[t]}function
|
|
157
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function uE(t){return V(t,r=>yt(r)?r.charCodeAt(0):r)}function hp(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}var Uo=256,Ju=[];function zr(t){return t<Uo?t:Ju[t]}function GN(){if(Te(Ju)){Ju=new Array(65536);for(let t=0;t<65536;t++)Ju[t]=t>255?255+~~(t/255):t}}function an(t,e){let r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}function $o(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}var lE=1,fE={};function un(t){let e=WN(t);HN(e),YN(e),KN(e),G(e,r=>{r.isParent=r.categoryMatches.length>0})}function WN(t){let e=Me(t),r=t,n=!0;for(;n;){r=Br(xt(V(r,o=>o.CATEGORIES)));let i=Bn(r,e);e=e.concat(i),Te(i)?n=!1:r=i}return e}function HN(t){G(t,e=>{gp(e)||(fE[lE]=e,e.tokenTypeIdx=lE++),cE(e)&&!Q(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),cE(e)||(e.CATEGORIES=[]),ZN(e)||(e.categoryMatches=[]),XN(e)||(e.categoryMatchesMap={})})}function KN(t){G(t,e=>{e.categoryMatches=[],G(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(fE[n].tokenTypeIdx)})})}function YN(t){G(t,e=>{pE([],e)})}function pE(t,e){G(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),G(e.CATEGORIES,r=>{let n=t.concat(e);We(n,r)||pE(n,r)})}function gp(t){return X(t,"tokenTypeIdx")}function cE(t){return X(t,"CATEGORIES")}function ZN(t){return X(t,"categoryMatches")}function XN(t){return X(t,"categoryMatchesMap")}function dE(t){return X(t,"tokenTypeIdx")}var xp={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}};var He;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(He||(He={}));var Ns={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
|
158
158
|
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:xp,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Ns);var Ie=class{constructor(e,r=Ns){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,o)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${s}--> <${i}>`);let{time:a,value:u}=Ss(o),l=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&l(`${s}<-- <${i}> time: ${a}ms`),this.traceInitIndent--,u}else return o()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
|
|
159
159
|
a boolean 2nd argument is no longer supported`);this.config=Tt({},Ns,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,o=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Ns.lineTerminatorsPattern)this.config.lineTerminatorsPattern=sE;else if(this.config.lineTerminatorCharacters===Ns.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
|
|
160
160
|
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Q(e)?i={modes:{defaultMode:Me(e)},defaultMode:zo}:(o=!1,i=Me(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(rE(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(nE(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},G(i.modes,(a,u)=>{i.modes[u]=jn(a,l=>Dt(l))});let s=Pe(i.modes);if(G(i.modes,(a,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(tE(a,s))}),Te(this.lexerDefinitionErrors)){un(a);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=eE(a,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[u]=l.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=l.charCodeToPatternIdxToConfig,this.emptyGroups=Tt({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=l.canBeOptimized}})}),this.defaultMode=i.defaultMode,!Te(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=V(this.lexerDefinitionErrors,l=>l.message).join(`-----------------------
|
|
@@ -163,7 +163,7 @@ a boolean 2nd argument is no longer supported`);this.config=Tt({},Ns,r);let n=th
|
|
|
163
163
|
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
|
|
164
164
|
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Kb()}),this.TRACE_INIT("toFastProperties",()=>{Is(this)})})}tokenize(e,r=this.defaultMode){if(!Te(this.lexerDefinitionErrors)){let i=V(this.lexerDefinitionErrors,o=>o.message).join(`-----------------------
|
|
165
165
|
`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
|
166
|
-
`+i)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,i,o,s,a,u,l,c,f,p,d,m,y,g,b,w,k=e,D=k.length,R=0,S=0,de=this.hasCustom?0:Math.floor(e.length/10),ye=new Array(de),be=[],_=this.trackStartLines?1:void 0,L=this.trackStartLines?1:void 0,F=iE(this.emptyGroups),I=this.trackStartLines,P=this.config.lineTerminatorsPattern,j=0,ae=[],ee=[],Se=[],rt=[];Object.freeze(rt);let x;function Ue(){return ae}function Je(he){let oe=zr(he),fe=ee[oe];return fe===void 0?rt:fe}let E=he=>{if(Se.length===1&&he.tokenType.PUSH_MODE===void 0){let oe=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(he);be.push({offset:he.startOffset,line:he.startLine,column:he.startColumn,length:he.image.length,message:oe})}else{Se.pop();let oe=jr(Se);ae=this.patternIdxToConfig[oe],ee=this.charCodeToPatternIdxToConfig[oe],j=ae.length;let fe=this.canModeBeOptimized[oe]&&this.config.safeMode===!1;ee&&fe?x=Je:x=Ue}};function W(he){Se.push(he),ee=this.charCodeToPatternIdxToConfig[he],ae=this.patternIdxToConfig[he],j=ae.length,j=ae.length;let oe=this.canModeBeOptimized[he]&&this.config.safeMode===!1;ee&&oe?x=Je:x=Ue}W.call(this,r);let Ke,ne=this.config.recoveryEnabled;for(;R<D;){u=null;let he=k.charCodeAt(R),oe=x(he),fe=oe.length;for(n=0;n<fe;n++){Ke=oe[n];let me=Ke.pattern;l=null;let we=Ke.short;if(we!==!1?he===we&&(u=me):Ke.isCustom===!0?(w=me.exec(k,R,ye,F),w!==null?(u=w[0],w.payload!==void 0&&(l=w.payload)):u=null):(this.updateLastIndex(me,R),u=this.match(me,e,R)),u!==null){if(a=Ke.longerAlt,a!==void 0){let Fe=a.length;for(o=0;o<Fe;o++){let ze=ae[a[o]],Ut=ze.pattern;if(c=null,ze.isCustom===!0?(w=Ut.exec(k,R,ye,F),w!==null?(s=w[0],w.payload!==void 0&&(c=w.payload)):s=null):(this.updateLastIndex(Ut,R),s=this.match(Ut,e,R)),s&&s.length>u.length){u=s,l=c,Ke=ze;break}}}break}}if(u!==null){if(f=u.length,p=Ke.group,p!==void 0&&(d=Ke.tokenTypeIdx,m=this.createTokenInstance(u,R,d,Ke.tokenType,_,L,f),this.handlePayload(m,l),p===!1?S=this.addToken(ye,S,m):F[p].push(m)),e=this.chopInput(e,f),R=R+f,L=this.computeNewColumn(L,f),I===!0&&Ke.canLineTerminator===!0){let me=0,we,Fe;P.lastIndex=0;do we=P.test(u),we===!0&&(Fe=P.lastIndex-1,me++);while(we===!0);me!==0&&(_=_+me,L=f-Fe,this.updateTokenEndLineColumnLocation(m,p,Fe,me,_,L,f))}this.handleModes(Ke,E,W,m)}else{let me=R,we=_,Fe=L,ze=ne===!1;for(;ze===!1&&R<D;)for(e=this.chopInput(e,1),R++,i=0;i<j;i++){let Ut=ae[i],A=Ut.pattern,C=Ut.short;if(C!==!1?k.charCodeAt(R)===C&&(ze=!0):Ut.isCustom===!0?ze=A.exec(k,R,ye,F)!==null:(this.updateLastIndex(A,R),ze=A.exec(e)!==null),ze===!0)break}if(y=R-me,L=this.computeNewColumn(L,y),b=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(k,me,y,we,Fe),be.push({offset:me,line:we,column:Fe,length:y,message:b}),ne===!1)break}}return this.hasCustom||(ye.length=S),{tokens:ye,groups:F,errors:be}}handleModes(e,r,n,i){if(e.pop===!0){let o=e.push;r(i),o!==void 0&&n.call(this,o)}else e.push!==void 0&&n.call(this,e.push)}chopInput(e,r){return e.substring(r)}updateLastIndex(e,r){e.lastIndex=r}updateTokenEndLineColumnLocation(e,r,n,i,o,s,a){let u,l;r!==void 0&&(u=n===a-1,l=u?-1:0,i===1&&u===!0||(e.endLine=o+l,e.endColumn=s-1+-l))}computeNewColumn(e,r){return e+r}createOffsetOnlyToken(e,r,n,i){return{image:e,startOffset:r,tokenTypeIdx:n,tokenType:i}}createStartOnlyToken(e,r,n,i,o,s){return{image:e,startOffset:r,startLine:o,startColumn:s,tokenTypeIdx:n,tokenType:i}}createFullToken(e,r,n,i,o,s,a){return{image:e,startOffset:r,endOffset:r+a-1,startLine:o,endLine:o,startColumn:s,endColumn:s+a-1,tokenTypeIdx:n,tokenType:i}}addTokenUsingPush(e,r,n){return e.push(n),r}addTokenUsingMemberAccess(e,r,n){return e[r]=n,r++,r}handlePayloadNoCustom(e,r){}handlePayloadWithCustom(e,r){r!==null&&(e.payload=r)}matchWithTest(e,r,n){return e.test(r)===!0?r.substring(n,e.lastIndex):null}matchWithExec(e,r){let n=e.exec(r);return n!==null?n[0]:null}};Ie.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";Ie.NA=/NOT_APPLICABLE/;function Pi(t){return yp(t)?t.LABEL:t.name}function yp(t){return yt(t.LABEL)&&t.LABEL!==""}var
|
|
166
|
+
`+i)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,i,o,s,a,u,l,c,f,p,d,m,y,g,b,w,k=e,D=k.length,R=0,S=0,de=this.hasCustom?0:Math.floor(e.length/10),ye=new Array(de),be=[],_=this.trackStartLines?1:void 0,L=this.trackStartLines?1:void 0,F=iE(this.emptyGroups),I=this.trackStartLines,P=this.config.lineTerminatorsPattern,j=0,ae=[],ee=[],Se=[],rt=[];Object.freeze(rt);let x;function Ue(){return ae}function Je(he){let oe=zr(he),fe=ee[oe];return fe===void 0?rt:fe}let E=he=>{if(Se.length===1&&he.tokenType.PUSH_MODE===void 0){let oe=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(he);be.push({offset:he.startOffset,line:he.startLine,column:he.startColumn,length:he.image.length,message:oe})}else{Se.pop();let oe=jr(Se);ae=this.patternIdxToConfig[oe],ee=this.charCodeToPatternIdxToConfig[oe],j=ae.length;let fe=this.canModeBeOptimized[oe]&&this.config.safeMode===!1;ee&&fe?x=Je:x=Ue}};function W(he){Se.push(he),ee=this.charCodeToPatternIdxToConfig[he],ae=this.patternIdxToConfig[he],j=ae.length,j=ae.length;let oe=this.canModeBeOptimized[he]&&this.config.safeMode===!1;ee&&oe?x=Je:x=Ue}W.call(this,r);let Ke,ne=this.config.recoveryEnabled;for(;R<D;){u=null;let he=k.charCodeAt(R),oe=x(he),fe=oe.length;for(n=0;n<fe;n++){Ke=oe[n];let me=Ke.pattern;l=null;let we=Ke.short;if(we!==!1?he===we&&(u=me):Ke.isCustom===!0?(w=me.exec(k,R,ye,F),w!==null?(u=w[0],w.payload!==void 0&&(l=w.payload)):u=null):(this.updateLastIndex(me,R),u=this.match(me,e,R)),u!==null){if(a=Ke.longerAlt,a!==void 0){let Fe=a.length;for(o=0;o<Fe;o++){let ze=ae[a[o]],Ut=ze.pattern;if(c=null,ze.isCustom===!0?(w=Ut.exec(k,R,ye,F),w!==null?(s=w[0],w.payload!==void 0&&(c=w.payload)):s=null):(this.updateLastIndex(Ut,R),s=this.match(Ut,e,R)),s&&s.length>u.length){u=s,l=c,Ke=ze;break}}}break}}if(u!==null){if(f=u.length,p=Ke.group,p!==void 0&&(d=Ke.tokenTypeIdx,m=this.createTokenInstance(u,R,d,Ke.tokenType,_,L,f),this.handlePayload(m,l),p===!1?S=this.addToken(ye,S,m):F[p].push(m)),e=this.chopInput(e,f),R=R+f,L=this.computeNewColumn(L,f),I===!0&&Ke.canLineTerminator===!0){let me=0,we,Fe;P.lastIndex=0;do we=P.test(u),we===!0&&(Fe=P.lastIndex-1,me++);while(we===!0);me!==0&&(_=_+me,L=f-Fe,this.updateTokenEndLineColumnLocation(m,p,Fe,me,_,L,f))}this.handleModes(Ke,E,W,m)}else{let me=R,we=_,Fe=L,ze=ne===!1;for(;ze===!1&&R<D;)for(e=this.chopInput(e,1),R++,i=0;i<j;i++){let Ut=ae[i],A=Ut.pattern,C=Ut.short;if(C!==!1?k.charCodeAt(R)===C&&(ze=!0):Ut.isCustom===!0?ze=A.exec(k,R,ye,F)!==null:(this.updateLastIndex(A,R),ze=A.exec(e)!==null),ze===!0)break}if(y=R-me,L=this.computeNewColumn(L,y),b=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(k,me,y,we,Fe),be.push({offset:me,line:we,column:Fe,length:y,message:b}),ne===!1)break}}return this.hasCustom||(ye.length=S),{tokens:ye,groups:F,errors:be}}handleModes(e,r,n,i){if(e.pop===!0){let o=e.push;r(i),o!==void 0&&n.call(this,o)}else e.push!==void 0&&n.call(this,e.push)}chopInput(e,r){return e.substring(r)}updateLastIndex(e,r){e.lastIndex=r}updateTokenEndLineColumnLocation(e,r,n,i,o,s,a){let u,l;r!==void 0&&(u=n===a-1,l=u?-1:0,i===1&&u===!0||(e.endLine=o+l,e.endColumn=s-1+-l))}computeNewColumn(e,r){return e+r}createOffsetOnlyToken(e,r,n,i){return{image:e,startOffset:r,tokenTypeIdx:n,tokenType:i}}createStartOnlyToken(e,r,n,i,o,s){return{image:e,startOffset:r,startLine:o,startColumn:s,tokenTypeIdx:n,tokenType:i}}createFullToken(e,r,n,i,o,s,a){return{image:e,startOffset:r,endOffset:r+a-1,startLine:o,endLine:o,startColumn:s,endColumn:s+a-1,tokenTypeIdx:n,tokenType:i}}addTokenUsingPush(e,r,n){return e.push(n),r}addTokenUsingMemberAccess(e,r,n){return e[r]=n,r++,r}handlePayloadNoCustom(e,r){}handlePayloadWithCustom(e,r){r!==null&&(e.payload=r)}matchWithTest(e,r,n){return e.test(r)===!0?r.substring(n,e.lastIndex):null}matchWithExec(e,r){let n=e.exec(r);return n!==null?n[0]:null}};Ie.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";Ie.NA=/NOT_APPLICABLE/;function Pi(t){return yp(t)?t.LABEL:t.name}function yp(t){return yt(t.LABEL)&&t.LABEL!==""}var JN="parent",hE="categories",mE="label",gE="group",xE="push_mode",yE="pop_mode",bE="longer_alt",EE="line_breaks",AE="start_chars_hint";function xe(t){return QN(t)}function QN(t){let e=t.pattern,r={};if(r.name=t.name,Dt(e)||(r.PATTERN=e),X(t,JN))throw`The parent property is no longer supported.
|
|
167
167
|
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return X(t,hE)&&(r.CATEGORIES=t[hE]),un([r]),X(t,mE)&&(r.LABEL=t[mE]),X(t,gE)&&(r.GROUP=t[gE]),X(t,yE)&&(r.POP_MODE=t[yE]),X(t,xE)&&(r.PUSH_MODE=t[xE]),X(t,bE)&&(r.LONGER_ALT=t[bE]),X(t,EE)&&(r.LINE_BREAKS=t[EE]),X(t,AE)&&(r.START_CHARS_HINT=t[AE]),r}var xr=xe({name:"EOF",pattern:Ie.NA});un([xr]);function Li(t,e,r,n,i,o,s,a){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:o,startColumn:s,endColumn:a,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function bp(t,e){return an(t,e)}var Qu={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${yp(t)?`--> ${Pi(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){let o="Expecting: ",a=`
|
|
168
168
|
but found: '`+kt(e).image+"'";if(n)return o+n+a;{let u=dt(t,(p,d)=>p.concat(d),[]),l=V(u,p=>`[${V(p,d=>Pi(d)).join(", ")}]`),f=`one of these possible Token sequences:
|
|
169
169
|
${V(l,(p,d)=>` ${d+1}. ${p}`).join(`
|
|
@@ -194,11 +194,11 @@ rule: <${e}> can be invoked from itself (directly or indirectly)
|
|
|
194
194
|
without consuming any Tokens. The grammar path that causes this is:
|
|
195
195
|
${n}
|
|
196
196
|
To fix this refactor your grammar to remove the left recursion.
|
|
197
|
-
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof Mt?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function wE(t,e){let r=new Ep(t,e);return r.resolveRefs(),r.errors}var Ep=class extends Bt{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){G(Re(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:bt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}};var Ap=class extends sn{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Me(this.path.ruleStack).reverse(),this.occurrenceStack=Me(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){Te(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},el=class extends Ap{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),o=new je({definition:i});this.possibleTokTypes=Ri(o),this.found=!0}}},qo=class extends sn{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},tl=class extends qo{walkMany(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,r,n)}},Ps=class extends qo{walkManySep(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,r,n)}},rl=class extends qo{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,r,n)}},Ls=class extends qo{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,r,n)}};function nl(t,e,r=[]){r=Me(r);let n=[],i=0;function o(a){return a.concat(st(t,i+1))}function s(a){let u=nl(o(a),e,r);return n.concat(u)}for(;r.length<e&&i<t.length;){let a=t[i];if(a instanceof je)return s(a.definition);if(a instanceof Be)return s(a.definition);if(a instanceof Ge)n=s(a.definition);else if(a instanceof at){let u=a.definition.concat([new De({definition:a.definition})]);return s(u)}else if(a instanceof ut){let u=[new je({definition:a.definition}),new De({definition:[new ve({terminalType:a.separator})].concat(a.definition)})];return s(u)}else if(a instanceof et){let u=a.definition.concat([new De({definition:[new ve({terminalType:a.separator})].concat(a.definition)})]);n=s(u)}else if(a instanceof De){let u=a.definition.concat([new De({definition:a.definition})]);n=s(u)}else{if(a instanceof tt)return G(a.definition,u=>{Te(u.definition)===!1&&(n=s(u.definition))}),n;if(a instanceof ve)r.push(a.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:st(t,i)}),n}function il(t,e,r,n){let i="EXIT_NONE_TERMINAL",o=[i],s="EXIT_ALTERNATIVE",a=!1,u=e.length,l=u-n-1,c=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Te(f);){let p=f.pop();if(p===s){a&&jr(f).idx<=l&&f.pop();continue}let d=p.def,m=p.idx,y=p.ruleStack,g=p.occurrenceStack;if(Te(d))continue;let b=d[0];if(b===i){let w={idx:m,def:st(d),ruleStack:on(y),occurrenceStack:on(g)};f.push(w)}else if(b instanceof ve)if(m<u-1){let w=m+1,k=e[w];if(r(k,b.terminalType)){let D={idx:w,def:st(d),ruleStack:y,occurrenceStack:g};f.push(D)}}else if(m===u-1)c.push({nextTokenType:b.terminalType,nextTokenOccurrence:b.idx,ruleStack:y,occurrenceStack:g}),a=!0;else throw Error("non exhaustive match");else if(b instanceof Be){let w=Me(y);w.push(b.nonTerminalName);let k=Me(g);k.push(b.idx);let D={idx:m,def:b.definition.concat(o,st(d)),ruleStack:w,occurrenceStack:k};f.push(D)}else if(b instanceof Ge){let w={idx:m,def:st(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let k={idx:m,def:b.definition.concat(st(d)),ruleStack:y,occurrenceStack:g};f.push(k)}else if(b instanceof at){let w=new De({definition:b.definition,idx:b.idx}),k=b.definition.concat([w],st(d)),D={idx:m,def:k,ruleStack:y,occurrenceStack:g};f.push(D)}else if(b instanceof ut){let w=new ve({terminalType:b.separator}),k=new De({definition:[w].concat(b.definition),idx:b.idx}),D=b.definition.concat([k],st(d)),R={idx:m,def:D,ruleStack:y,occurrenceStack:g};f.push(R)}else if(b instanceof et){let w={idx:m,def:st(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let k=new ve({terminalType:b.separator}),D=new De({definition:[k].concat(b.definition),idx:b.idx}),R=b.definition.concat([D],st(d)),S={idx:m,def:R,ruleStack:y,occurrenceStack:g};f.push(S)}else if(b instanceof De){let w={idx:m,def:st(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let k=new De({definition:b.definition,idx:b.idx}),D=b.definition.concat([k],st(d)),R={idx:m,def:D,ruleStack:y,occurrenceStack:g};f.push(R)}else if(b instanceof tt)for(let w=b.definition.length-1;w>=0;w--){let k=b.definition[w],D={idx:m,def:k.definition.concat(st(d)),ruleStack:y,occurrenceStack:g};f.push(D),f.push(s)}else if(b instanceof je)f.push({idx:m,def:b.definition.concat(st(d)),ruleStack:y,occurrenceStack:g});else if(b instanceof Mt)f.push(QN(b,m,y,g));else throw Error("non exhaustive match")}return c}function QN(t,e,r,n){let i=Me(r);i.push(t.name);let o=Me(n);return o.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:o}}var Xe;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(Xe||(Xe={}));function sl(t){if(t instanceof Ge||t==="Option")return Xe.OPTION;if(t instanceof De||t==="Repetition")return Xe.REPETITION;if(t instanceof at||t==="RepetitionMandatory")return Xe.REPETITION_MANDATORY;if(t instanceof ut||t==="RepetitionMandatoryWithSeparator")return Xe.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof et||t==="RepetitionWithSeparator")return Xe.REPETITION_WITH_SEPARATOR;if(t instanceof tt||t==="Alternation")return Xe.ALTERNATION;throw Error("non exhaustive match")}function TE(t,e,r,n,i,o){let s=Ms(t,e,r),a=DE(s)?$o:an;return o(s,n,a,i)}function _E(t,e,r,n,i,o){let s=Bs(t,e,i,r),a=DE(s)?$o:an;return o(s[0],a,n)}function SE(t,e,r,n){let i=t.length,o=Ot(t,s=>Ot(s,a=>a.length===1));if(e)return function(s){let a=V(s,u=>u.GATE);for(let u=0;u<i;u++){let l=t[u],c=l.length,f=a[u];if(!(f!==void 0&&f.call(this)===!1))e:for(let p=0;p<c;p++){let d=l[p],m=d.length;for(let y=0;y<m;y++){let g=this.LA(y+1);if(r(g,d[y])===!1)continue e}return u}}};if(o&&!n){let s=V(t,u=>xt(u)),a=dt(s,(u,l,c)=>(G(l,f=>{X(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=c),G(f.categoryMatches,p=>{X(u,p)||(u[p]=c)})}),u),{});return function(){let u=this.LA(1);return a[u.tokenTypeIdx]}}else return function(){for(let s=0;s<i;s++){let a=t[s],u=a.length;e:for(let l=0;l<u;l++){let c=a[l],f=c.length;for(let p=0;p<f;p++){let d=this.LA(p+1);if(r(d,c[p])===!1)continue e}return s}}}}function IE(t,e,r){let n=Ot(t,o=>o.length===1),i=t.length;if(n&&!r){let o=xt(t);if(o.length===1&&Te(o[0].categoryMatches)){let a=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}else{let s=dt(o,(a,u,l)=>(a[u.tokenTypeIdx]=!0,G(u.categoryMatches,c=>{a[c]=!0}),a),[]);return function(){let a=this.LA(1);return s[a.tokenTypeIdx]===!0}}}else return function(){e:for(let o=0;o<i;o++){let s=t[o],a=s.length;for(let u=0;u<a;u++){let l=this.LA(u+1);if(e(l,s[u])===!1)continue e}return!0}return!1}}var wp=class extends sn{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,i){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,Xe.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,Xe.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,Xe.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,Xe.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,Xe.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},ol=class extends Bt{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Xe.OPTION)}visitRepetition(e){this.checkIsTarget(e,Xe.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Xe.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Xe.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Xe.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Xe.ALTERNATION)}};function CE(t){let e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}function kp(t){let e=[""];for(let r=0;r<t.length;r++){let n=t[r],i=[];for(let o=0;o<e.length;o++){let s=e[o];i.push(s+"_"+n.tokenTypeIdx);for(let a=0;a<n.categoryMatches.length;a++){let u="_"+n.categoryMatches[a];i.push(s+u)}}e=i}return e}function eP(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;let i=t[n];for(let o=0;o<e.length;o++){let s=e[o];if(i[s]===!0)return!1}}return!0}function OE(t,e){let r=V(t,s=>nl([s],1)),n=CE(r.length),i=V(r,s=>{let a={};return G(s,u=>{let l=kp(u.partialPath);G(l,c=>{a[c]=!0})}),a}),o=r;for(let s=1;s<=e;s++){let a=o;o=CE(a.length);for(let u=0;u<a.length;u++){let l=a[u];for(let c=0;c<l.length;c++){let f=l[c].partialPath,p=l[c].suffixDef,d=kp(f);if(eP(i,d,u)||Te(p)||f.length===e){let y=n[u];if(al(y,f)===!1){y.push(f);for(let g=0;g<d.length;g++){let b=d[g];i[u][b]=!0}}}else{let y=nl(p,s+1,f);o[u]=o[u].concat(y),G(y,g=>{let b=kp(g.partialPath);G(b,w=>{i[u][w]=!0})})}}}}return n}function Ms(t,e,r,n){let i=new ol(t,Xe.ALTERNATION,n);return e.accept(i),OE(i.result,r)}function Bs(t,e,r,n){let i=new ol(t,r);e.accept(i);let o=i.result,a=new wp(e,t,r).startWalking(),u=new je({definition:o}),l=new je({definition:a});return OE([u,l],n)}function al(t,e){e:for(let r=0;r<t.length;r++){let n=t[r];if(n.length===e.length){for(let i=0;i<n.length;i++){let o=e[i],s=n[i];if((o===s||s.categoryMatchesMap[o.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function vE(t,e){return t.length<e.length&&Ot(t,(r,n)=>{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function DE(t){return Ot(t,e=>Ot(e,r=>Ot(r,n=>Te(n.categoryMatches))))}function RE(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return V(e,r=>Object.assign({type:bt.CUSTOM_LOOKAHEAD_VALIDATION},r))}function FE(t,e,r,n){let i=Lt(t,u=>tP(u,r)),o=aP(t,e,r),s=Lt(t,u=>iP(u,r)),a=Lt(t,u=>nP(u,t,n,r));return i.concat(o,s,a)}function tP(t,e){let r=new Cp;t.accept(r);let n=r.allProductions,i=op(n,rP),o=Gt(i,a=>a.length>1);return V(Re(o),a=>{let u=kt(a),l=e.buildDuplicateFoundError(t,a),c=Wt(u),f={message:l,type:bt.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:c,occurrence:u.idx},p=NE(u);return p&&(f.parameter=p),f})}function rP(t){return`${Wt(t)}_#_${t.idx}_#_${NE(t)}`}function NE(t){return t instanceof ve?t.terminalType.name:t instanceof Be?t.nonTerminalName:""}var Cp=class extends Bt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function nP(t,e,r,n){let i=[];if(dt(e,(s,a)=>a.name===t.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:s,type:bt.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function PE(t,e,r){let n=[],i;return We(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:bt.INVALID_RULE_OVERRIDE,ruleName:t})),n}function _p(t,e,r,n=[]){let i=[],o=ul(e.definition);if(Te(o))return[];{let s=t.name;We(o,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:bt.LEFT_RECURSION,ruleName:s});let u=Bn(o,n.concat([t])),l=Lt(u,c=>{let f=Me(n);return f.push(c),_p(t,c,r,f)});return i.concat(l)}}function ul(t){let e=[];if(Te(t))return e;let r=kt(t);if(r instanceof Be)e.push(r.referencedRule);else if(r instanceof je||r instanceof Ge||r instanceof at||r instanceof ut||r instanceof et||r instanceof De)e=e.concat(ul(r.definition));else if(r instanceof tt)e=xt(V(r.definition,o=>ul(o.definition)));else if(!(r instanceof ve))throw Error("non exhaustive match");let n=Di(r),i=t.length>1;if(n&&i){let o=st(t);return e.concat(ul(o))}else return e}var js=class extends Bt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function LE(t,e){let r=new js;t.accept(r);let n=r.alternations;return Lt(n,o=>{let s=on(o.definition);return Lt(s,(a,u)=>{let l=il([a],[],an,1);return Te(l)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:o,emptyChoiceIdx:u}),type:bt.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:o.idx,alternative:u+1}]:[]})})}function ME(t,e,r){let n=new js;t.accept(n);let i=n.alternations;return i=jn(i,s=>s.ignoreAmbiguities===!0),Lt(i,s=>{let a=s.idx,u=s.maxLookahead||e,l=Ms(a,t,u,s),c=oP(l,s,t,r),f=sP(l,s,t,r);return c.concat(f)})}var Tp=class extends Bt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function iP(t,e){let r=new js;t.accept(r);let n=r.alternations;return Lt(n,o=>o.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:o}),type:bt.TOO_MANY_ALTS,ruleName:t.name,occurrence:o.idx}]:[])}function BE(t,e,r){let n=[];return G(t,i=>{let o=new Tp;i.accept(o);let s=o.allProductions;G(s,a=>{let u=sl(a),l=a.maxLookahead||e,c=a.idx,p=Bs(c,i,u,l)[0];if(Te(xt(p))){let d=r.buildEmptyRepetitionError({topLevelRule:i,repetition:a});n.push({message:d,type:bt.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function oP(t,e,r,n){let i=[],o=dt(t,(a,u,l)=>(e.definition[l].ignoreAmbiguities===!0||G(u,c=>{let f=[l];G(t,(p,d)=>{l!==d&&al(p,c)&&e.definition[d].ignoreAmbiguities!==!0&&f.push(d)}),f.length>1&&!al(i,c)&&(i.push(c),a.push({alts:f,path:c}))}),a),[]);return V(o,a=>{let u=V(a.alts,c=>c+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:u,prefixPath:a.path}),type:bt.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:a.alts}})}function sP(t,e,r,n){let i=dt(t,(s,a,u)=>{let l=V(a,c=>({idx:u,path:c}));return s.concat(l)},[]);return Br(Lt(i,s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];let u=s.idx,l=s.path,c=vt(i,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<u&&vE(p.path,l));return V(c,p=>{let d=[p.idx+1,u+1],m=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:d,prefixPath:p.path}),type:bt.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:m,alternatives:d}})}))}function aP(t,e,r){let n=[],i=V(e,o=>o.name);return G(t,o=>{let s=o.name;if(We(i,s)){let a=r.buildNamespaceConflictError(o);n.push({message:a,type:bt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}function jE(t){let e=No(t,{errMsgProvider:kE}),r={};return G(t.rules,n=>{r[n.name]=n}),wE(r,e.errMsgProvider)}function UE(t){return t=No(t,{errMsgProvider:yr}),FE(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var zE="MismatchedTokenException",$E="NoViableAltException",qE="EarlyExitException",VE="NotAllInputParsedException",GE=[zE,$E,qE,VE];Object.freeze(GE);function zn(t){return We(GE,t.name)}var Vo=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Mi=class extends Vo{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=zE}},Us=class extends Vo{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=$E}},zs=class extends Vo{constructor(e,r){super(e,r),this.name=VE}},$s=class extends Vo{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=qE}};var Sp={},Op="InRuleRecoveryException",Ip=class extends Error{constructor(e){super(e),this.name=Op}},ll=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=X(e,"recoveryEnabled")?e.recoveryEnabled:jt.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=uP)}getTokenToInsert(e){let r=Li(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,i){let o=this.findReSyncTokenType(),s=this.exportLexerState(),a=[],u=!1,l=this.LA(1),c=this.LA(1),f=()=>{let p=this.LA(0),d=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:p,ruleName:this.getCurrRuleFullName()}),m=new Mi(d,l,this.LA(0));m.resyncedTokens=on(a),this.SAVE_ERROR(m)};for(;!u;)if(this.tokenMatcher(c,i)){f();return}else if(n.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(c,o)?u=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,a));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new Ip("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Te(r))return!1;let n=this.LA(1);return Ur(r,o=>this.tokenMatcher(n,o))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return We(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=Ur(e,o=>bp(r,o));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Sp;let e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return V(e,(n,i)=>i===0?Sp:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=V(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return xt(e)}getFollowSetFromFollowKey(e){if(e===Sp)return[xr];let r=e.ruleName+e.idxInCallingRule+Gu+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,xr)||r.push(e),r}reSyncTo(e){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return on(r)}attemptInRepetitionRecovery(e,r,n,i,o,s,a){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=Me(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return V(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function uP(t,e,r,n,i,o,s){let a=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[a];if(u===void 0){let p=this.getCurrRuleFullName(),d=this.getGAstProductions()[p];u=new o(d,i).startWalking(),this.firstAfterRepMap[a]=u}let l=u.token,c=u.occurrence,f=u.isEndOfRule;this.RULE_STACK.length===1&&f&&l===void 0&&(l=xr,c=1),!(l===void 0||c===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,c,s)&&this.tryInRepetitionRecovery(t,e,r,l)}function cl(t,e,r){return r|e|t}var qs=class{constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:jt.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(Te(r)){let n=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),o=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...i,...o]}return r}validateNoLeftRecursion(e){return Lt(e,r=>_p(r,r,yr))}validateEmptyOrAlternatives(e){return Lt(e,r=>LE(r,yr))}validateAmbiguousAlternationAlternatives(e,r){return Lt(e,n=>ME(n,r,yr))}validateSomeNonEmptyLookaheadPath(e,r){return BE(e,r,yr)}buildLookaheadForAlternation(e){return TE(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,SE)}buildLookaheadForOptional(e){return _E(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,sl(e.prodType),IE)}};var pl=class{initLooksAhead(e){this.dynamicTokensEnabled=X(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:jt.dynamicTokensEnabled,this.maxLookahead=X(e,"maxLookahead")?e.maxLookahead:jt.maxLookahead,this.lookaheadStrategy=X(e,"lookaheadStrategy")?e.lookaheadStrategy:new qs({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){G(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:o,repetitionMandatory:s,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:u}=lP(r);G(n,l=>{let c=l.idx===0?"":l.idx;this.TRACE_INIT(`${Wt(l)}${c}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:r,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=cl(this.fullRuleNameToShort[r.name],256,l.idx);this.setLaFuncCache(p,f)})}),G(i,l=>{this.computeLookaheadFunc(r,l.idx,768,"Repetition",l.maxLookahead,Wt(l))}),G(o,l=>{this.computeLookaheadFunc(r,l.idx,512,"Option",l.maxLookahead,Wt(l))}),G(s,l=>{this.computeLookaheadFunc(r,l.idx,1024,"RepetitionMandatory",l.maxLookahead,Wt(l))}),G(a,l=>{this.computeLookaheadFunc(r,l.idx,1536,"RepetitionMandatoryWithSeparator",l.maxLookahead,Wt(l))}),G(u,l=>{this.computeLookaheadFunc(r,l.idx,1280,"RepetitionWithSeparator",l.maxLookahead,Wt(l))})})})}computeLookaheadFunc(e,r,n,i,o,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:o||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=cl(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(u,a)})}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return cl(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},vp=class extends Bt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},fl=new vp;function lP(t){fl.reset(),t.accept(fl);let e=fl.dslMethods;return fl.reset(),e}function Fp(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function Np(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function WE(t,e,r){t.children[r]===void 0?t.children[r]=[e]:t.children[r].push(e)}function HE(t,e,r){t.children[e]===void 0?t.children[e]=[r]:t.children[e].push(r)}var cP="name";function Pp(t,e){Object.defineProperty(t,cP,{enumerable:!1,configurable:!0,writable:!1,value:e})}function fP(t,e){let r=Pe(t),n=r.length;for(let i=0;i<n;i++){let o=r[i],s=t[o],a=s.length;for(let u=0;u<a;u++){let l=s[u];l.tokenTypeIdx===void 0&&this[l.name](l.children,e)}}}function KE(t,e){let r=function(){};Pp(r,t+"BaseSemantics");let n={visit:function(i,o){if(Q(i)&&(i=i[0]),!Dt(i))return this[i.name](i.children,o)},validateVisitor:function(){let i=pP(this,e);if(!Te(i)){let o=V(i,s=>s.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
|
|
197
|
+
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof Mt?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function wE(t,e){let r=new Ep(t,e);return r.resolveRefs(),r.errors}var Ep=class extends Bt{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){G(Re(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:bt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}};var Ap=class extends sn{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Me(this.path.ruleStack).reverse(),this.occurrenceStack=Me(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){Te(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},el=class extends Ap{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),o=new je({definition:i});this.possibleTokTypes=Ri(o),this.found=!0}}},qo=class extends sn{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},tl=class extends qo{walkMany(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,r,n)}},Ps=class extends qo{walkManySep(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,r,n)}},rl=class extends qo{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,r,n)}},Ls=class extends qo{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=kt(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ve&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,r,n)}};function nl(t,e,r=[]){r=Me(r);let n=[],i=0;function o(a){return a.concat(st(t,i+1))}function s(a){let u=nl(o(a),e,r);return n.concat(u)}for(;r.length<e&&i<t.length;){let a=t[i];if(a instanceof je)return s(a.definition);if(a instanceof Be)return s(a.definition);if(a instanceof Ge)n=s(a.definition);else if(a instanceof at){let u=a.definition.concat([new De({definition:a.definition})]);return s(u)}else if(a instanceof ut){let u=[new je({definition:a.definition}),new De({definition:[new ve({terminalType:a.separator})].concat(a.definition)})];return s(u)}else if(a instanceof et){let u=a.definition.concat([new De({definition:[new ve({terminalType:a.separator})].concat(a.definition)})]);n=s(u)}else if(a instanceof De){let u=a.definition.concat([new De({definition:a.definition})]);n=s(u)}else{if(a instanceof tt)return G(a.definition,u=>{Te(u.definition)===!1&&(n=s(u.definition))}),n;if(a instanceof ve)r.push(a.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:st(t,i)}),n}function il(t,e,r,n){let i="EXIT_NONE_TERMINAL",o=[i],s="EXIT_ALTERNATIVE",a=!1,u=e.length,l=u-n-1,c=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Te(f);){let p=f.pop();if(p===s){a&&jr(f).idx<=l&&f.pop();continue}let d=p.def,m=p.idx,y=p.ruleStack,g=p.occurrenceStack;if(Te(d))continue;let b=d[0];if(b===i){let w={idx:m,def:st(d),ruleStack:on(y),occurrenceStack:on(g)};f.push(w)}else if(b instanceof ve)if(m<u-1){let w=m+1,k=e[w];if(r(k,b.terminalType)){let D={idx:w,def:st(d),ruleStack:y,occurrenceStack:g};f.push(D)}}else if(m===u-1)c.push({nextTokenType:b.terminalType,nextTokenOccurrence:b.idx,ruleStack:y,occurrenceStack:g}),a=!0;else throw Error("non exhaustive match");else if(b instanceof Be){let w=Me(y);w.push(b.nonTerminalName);let k=Me(g);k.push(b.idx);let D={idx:m,def:b.definition.concat(o,st(d)),ruleStack:w,occurrenceStack:k};f.push(D)}else if(b instanceof Ge){let w={idx:m,def:st(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let k={idx:m,def:b.definition.concat(st(d)),ruleStack:y,occurrenceStack:g};f.push(k)}else if(b instanceof at){let w=new De({definition:b.definition,idx:b.idx}),k=b.definition.concat([w],st(d)),D={idx:m,def:k,ruleStack:y,occurrenceStack:g};f.push(D)}else if(b instanceof ut){let w=new ve({terminalType:b.separator}),k=new De({definition:[w].concat(b.definition),idx:b.idx}),D=b.definition.concat([k],st(d)),R={idx:m,def:D,ruleStack:y,occurrenceStack:g};f.push(R)}else if(b instanceof et){let w={idx:m,def:st(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let k=new ve({terminalType:b.separator}),D=new De({definition:[k].concat(b.definition),idx:b.idx}),R=b.definition.concat([D],st(d)),S={idx:m,def:R,ruleStack:y,occurrenceStack:g};f.push(S)}else if(b instanceof De){let w={idx:m,def:st(d),ruleStack:y,occurrenceStack:g};f.push(w),f.push(s);let k=new De({definition:b.definition,idx:b.idx}),D=b.definition.concat([k],st(d)),R={idx:m,def:D,ruleStack:y,occurrenceStack:g};f.push(R)}else if(b instanceof tt)for(let w=b.definition.length-1;w>=0;w--){let k=b.definition[w],D={idx:m,def:k.definition.concat(st(d)),ruleStack:y,occurrenceStack:g};f.push(D),f.push(s)}else if(b instanceof je)f.push({idx:m,def:b.definition.concat(st(d)),ruleStack:y,occurrenceStack:g});else if(b instanceof Mt)f.push(eP(b,m,y,g));else throw Error("non exhaustive match")}return c}function eP(t,e,r,n){let i=Me(r);i.push(t.name);let o=Me(n);return o.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:o}}var Xe;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(Xe||(Xe={}));function sl(t){if(t instanceof Ge||t==="Option")return Xe.OPTION;if(t instanceof De||t==="Repetition")return Xe.REPETITION;if(t instanceof at||t==="RepetitionMandatory")return Xe.REPETITION_MANDATORY;if(t instanceof ut||t==="RepetitionMandatoryWithSeparator")return Xe.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof et||t==="RepetitionWithSeparator")return Xe.REPETITION_WITH_SEPARATOR;if(t instanceof tt||t==="Alternation")return Xe.ALTERNATION;throw Error("non exhaustive match")}function TE(t,e,r,n,i,o){let s=Ms(t,e,r),a=DE(s)?$o:an;return o(s,n,a,i)}function _E(t,e,r,n,i,o){let s=Bs(t,e,i,r),a=DE(s)?$o:an;return o(s[0],a,n)}function SE(t,e,r,n){let i=t.length,o=Ot(t,s=>Ot(s,a=>a.length===1));if(e)return function(s){let a=V(s,u=>u.GATE);for(let u=0;u<i;u++){let l=t[u],c=l.length,f=a[u];if(!(f!==void 0&&f.call(this)===!1))e:for(let p=0;p<c;p++){let d=l[p],m=d.length;for(let y=0;y<m;y++){let g=this.LA(y+1);if(r(g,d[y])===!1)continue e}return u}}};if(o&&!n){let s=V(t,u=>xt(u)),a=dt(s,(u,l,c)=>(G(l,f=>{X(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=c),G(f.categoryMatches,p=>{X(u,p)||(u[p]=c)})}),u),{});return function(){let u=this.LA(1);return a[u.tokenTypeIdx]}}else return function(){for(let s=0;s<i;s++){let a=t[s],u=a.length;e:for(let l=0;l<u;l++){let c=a[l],f=c.length;for(let p=0;p<f;p++){let d=this.LA(p+1);if(r(d,c[p])===!1)continue e}return s}}}}function IE(t,e,r){let n=Ot(t,o=>o.length===1),i=t.length;if(n&&!r){let o=xt(t);if(o.length===1&&Te(o[0].categoryMatches)){let a=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}else{let s=dt(o,(a,u,l)=>(a[u.tokenTypeIdx]=!0,G(u.categoryMatches,c=>{a[c]=!0}),a),[]);return function(){let a=this.LA(1);return s[a.tokenTypeIdx]===!0}}}else return function(){e:for(let o=0;o<i;o++){let s=t[o],a=s.length;for(let u=0;u<a;u++){let l=this.LA(u+1);if(e(l,s[u])===!1)continue e}return!0}return!1}}var wp=class extends sn{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,i){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,Xe.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,Xe.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,Xe.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,Xe.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,Xe.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},ol=class extends Bt{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Xe.OPTION)}visitRepetition(e){this.checkIsTarget(e,Xe.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Xe.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Xe.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Xe.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Xe.ALTERNATION)}};function CE(t){let e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}function kp(t){let e=[""];for(let r=0;r<t.length;r++){let n=t[r],i=[];for(let o=0;o<e.length;o++){let s=e[o];i.push(s+"_"+n.tokenTypeIdx);for(let a=0;a<n.categoryMatches.length;a++){let u="_"+n.categoryMatches[a];i.push(s+u)}}e=i}return e}function tP(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;let i=t[n];for(let o=0;o<e.length;o++){let s=e[o];if(i[s]===!0)return!1}}return!0}function OE(t,e){let r=V(t,s=>nl([s],1)),n=CE(r.length),i=V(r,s=>{let a={};return G(s,u=>{let l=kp(u.partialPath);G(l,c=>{a[c]=!0})}),a}),o=r;for(let s=1;s<=e;s++){let a=o;o=CE(a.length);for(let u=0;u<a.length;u++){let l=a[u];for(let c=0;c<l.length;c++){let f=l[c].partialPath,p=l[c].suffixDef,d=kp(f);if(tP(i,d,u)||Te(p)||f.length===e){let y=n[u];if(al(y,f)===!1){y.push(f);for(let g=0;g<d.length;g++){let b=d[g];i[u][b]=!0}}}else{let y=nl(p,s+1,f);o[u]=o[u].concat(y),G(y,g=>{let b=kp(g.partialPath);G(b,w=>{i[u][w]=!0})})}}}}return n}function Ms(t,e,r,n){let i=new ol(t,Xe.ALTERNATION,n);return e.accept(i),OE(i.result,r)}function Bs(t,e,r,n){let i=new ol(t,r);e.accept(i);let o=i.result,a=new wp(e,t,r).startWalking(),u=new je({definition:o}),l=new je({definition:a});return OE([u,l],n)}function al(t,e){e:for(let r=0;r<t.length;r++){let n=t[r];if(n.length===e.length){for(let i=0;i<n.length;i++){let o=e[i],s=n[i];if((o===s||s.categoryMatchesMap[o.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function vE(t,e){return t.length<e.length&&Ot(t,(r,n)=>{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function DE(t){return Ot(t,e=>Ot(e,r=>Ot(r,n=>Te(n.categoryMatches))))}function RE(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return V(e,r=>Object.assign({type:bt.CUSTOM_LOOKAHEAD_VALIDATION},r))}function FE(t,e,r,n){let i=Lt(t,u=>rP(u,r)),o=uP(t,e,r),s=Lt(t,u=>oP(u,r)),a=Lt(t,u=>iP(u,t,n,r));return i.concat(o,s,a)}function rP(t,e){let r=new Cp;t.accept(r);let n=r.allProductions,i=op(n,nP),o=Gt(i,a=>a.length>1);return V(Re(o),a=>{let u=kt(a),l=e.buildDuplicateFoundError(t,a),c=Wt(u),f={message:l,type:bt.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:c,occurrence:u.idx},p=NE(u);return p&&(f.parameter=p),f})}function nP(t){return`${Wt(t)}_#_${t.idx}_#_${NE(t)}`}function NE(t){return t instanceof ve?t.terminalType.name:t instanceof Be?t.nonTerminalName:""}var Cp=class extends Bt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function iP(t,e,r,n){let i=[];if(dt(e,(s,a)=>a.name===t.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:s,type:bt.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function PE(t,e,r){let n=[],i;return We(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:bt.INVALID_RULE_OVERRIDE,ruleName:t})),n}function _p(t,e,r,n=[]){let i=[],o=ul(e.definition);if(Te(o))return[];{let s=t.name;We(o,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:bt.LEFT_RECURSION,ruleName:s});let u=Bn(o,n.concat([t])),l=Lt(u,c=>{let f=Me(n);return f.push(c),_p(t,c,r,f)});return i.concat(l)}}function ul(t){let e=[];if(Te(t))return e;let r=kt(t);if(r instanceof Be)e.push(r.referencedRule);else if(r instanceof je||r instanceof Ge||r instanceof at||r instanceof ut||r instanceof et||r instanceof De)e=e.concat(ul(r.definition));else if(r instanceof tt)e=xt(V(r.definition,o=>ul(o.definition)));else if(!(r instanceof ve))throw Error("non exhaustive match");let n=Di(r),i=t.length>1;if(n&&i){let o=st(t);return e.concat(ul(o))}else return e}var js=class extends Bt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function LE(t,e){let r=new js;t.accept(r);let n=r.alternations;return Lt(n,o=>{let s=on(o.definition);return Lt(s,(a,u)=>{let l=il([a],[],an,1);return Te(l)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:o,emptyChoiceIdx:u}),type:bt.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:o.idx,alternative:u+1}]:[]})})}function ME(t,e,r){let n=new js;t.accept(n);let i=n.alternations;return i=jn(i,s=>s.ignoreAmbiguities===!0),Lt(i,s=>{let a=s.idx,u=s.maxLookahead||e,l=Ms(a,t,u,s),c=sP(l,s,t,r),f=aP(l,s,t,r);return c.concat(f)})}var Tp=class extends Bt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function oP(t,e){let r=new js;t.accept(r);let n=r.alternations;return Lt(n,o=>o.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:o}),type:bt.TOO_MANY_ALTS,ruleName:t.name,occurrence:o.idx}]:[])}function BE(t,e,r){let n=[];return G(t,i=>{let o=new Tp;i.accept(o);let s=o.allProductions;G(s,a=>{let u=sl(a),l=a.maxLookahead||e,c=a.idx,p=Bs(c,i,u,l)[0];if(Te(xt(p))){let d=r.buildEmptyRepetitionError({topLevelRule:i,repetition:a});n.push({message:d,type:bt.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function sP(t,e,r,n){let i=[],o=dt(t,(a,u,l)=>(e.definition[l].ignoreAmbiguities===!0||G(u,c=>{let f=[l];G(t,(p,d)=>{l!==d&&al(p,c)&&e.definition[d].ignoreAmbiguities!==!0&&f.push(d)}),f.length>1&&!al(i,c)&&(i.push(c),a.push({alts:f,path:c}))}),a),[]);return V(o,a=>{let u=V(a.alts,c=>c+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:u,prefixPath:a.path}),type:bt.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:a.alts}})}function aP(t,e,r,n){let i=dt(t,(s,a,u)=>{let l=V(a,c=>({idx:u,path:c}));return s.concat(l)},[]);return Br(Lt(i,s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];let u=s.idx,l=s.path,c=vt(i,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<u&&vE(p.path,l));return V(c,p=>{let d=[p.idx+1,u+1],m=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:d,prefixPath:p.path}),type:bt.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:m,alternatives:d}})}))}function uP(t,e,r){let n=[],i=V(e,o=>o.name);return G(t,o=>{let s=o.name;if(We(i,s)){let a=r.buildNamespaceConflictError(o);n.push({message:a,type:bt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}function jE(t){let e=No(t,{errMsgProvider:kE}),r={};return G(t.rules,n=>{r[n.name]=n}),wE(r,e.errMsgProvider)}function UE(t){return t=No(t,{errMsgProvider:yr}),FE(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var zE="MismatchedTokenException",$E="NoViableAltException",qE="EarlyExitException",VE="NotAllInputParsedException",GE=[zE,$E,qE,VE];Object.freeze(GE);function zn(t){return We(GE,t.name)}var Vo=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Mi=class extends Vo{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=zE}},Us=class extends Vo{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=$E}},zs=class extends Vo{constructor(e,r){super(e,r),this.name=VE}},$s=class extends Vo{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=qE}};var Sp={},Op="InRuleRecoveryException",Ip=class extends Error{constructor(e){super(e),this.name=Op}},ll=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=X(e,"recoveryEnabled")?e.recoveryEnabled:jt.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=lP)}getTokenToInsert(e){let r=Li(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,i){let o=this.findReSyncTokenType(),s=this.exportLexerState(),a=[],u=!1,l=this.LA(1),c=this.LA(1),f=()=>{let p=this.LA(0),d=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:p,ruleName:this.getCurrRuleFullName()}),m=new Mi(d,l,this.LA(0));m.resyncedTokens=on(a),this.SAVE_ERROR(m)};for(;!u;)if(this.tokenMatcher(c,i)){f();return}else if(n.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(c,o)?u=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,a));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new Ip("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Te(r))return!1;let n=this.LA(1);return Ur(r,o=>this.tokenMatcher(n,o))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return We(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=Ur(e,o=>bp(r,o));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Sp;let e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return V(e,(n,i)=>i===0?Sp:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=V(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return xt(e)}getFollowSetFromFollowKey(e){if(e===Sp)return[xr];let r=e.ruleName+e.idxInCallingRule+Gu+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,xr)||r.push(e),r}reSyncTo(e){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return on(r)}attemptInRepetitionRecovery(e,r,n,i,o,s,a){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=Me(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return V(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function lP(t,e,r,n,i,o,s){let a=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[a];if(u===void 0){let p=this.getCurrRuleFullName(),d=this.getGAstProductions()[p];u=new o(d,i).startWalking(),this.firstAfterRepMap[a]=u}let l=u.token,c=u.occurrence,f=u.isEndOfRule;this.RULE_STACK.length===1&&f&&l===void 0&&(l=xr,c=1),!(l===void 0||c===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,c,s)&&this.tryInRepetitionRecovery(t,e,r,l)}function cl(t,e,r){return r|e|t}var qs=class{constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:jt.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(Te(r)){let n=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),o=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...i,...o]}return r}validateNoLeftRecursion(e){return Lt(e,r=>_p(r,r,yr))}validateEmptyOrAlternatives(e){return Lt(e,r=>LE(r,yr))}validateAmbiguousAlternationAlternatives(e,r){return Lt(e,n=>ME(n,r,yr))}validateSomeNonEmptyLookaheadPath(e,r){return BE(e,r,yr)}buildLookaheadForAlternation(e){return TE(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,SE)}buildLookaheadForOptional(e){return _E(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,sl(e.prodType),IE)}};var pl=class{initLooksAhead(e){this.dynamicTokensEnabled=X(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:jt.dynamicTokensEnabled,this.maxLookahead=X(e,"maxLookahead")?e.maxLookahead:jt.maxLookahead,this.lookaheadStrategy=X(e,"lookaheadStrategy")?e.lookaheadStrategy:new qs({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){G(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:o,repetitionMandatory:s,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:u}=cP(r);G(n,l=>{let c=l.idx===0?"":l.idx;this.TRACE_INIT(`${Wt(l)}${c}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:r,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=cl(this.fullRuleNameToShort[r.name],256,l.idx);this.setLaFuncCache(p,f)})}),G(i,l=>{this.computeLookaheadFunc(r,l.idx,768,"Repetition",l.maxLookahead,Wt(l))}),G(o,l=>{this.computeLookaheadFunc(r,l.idx,512,"Option",l.maxLookahead,Wt(l))}),G(s,l=>{this.computeLookaheadFunc(r,l.idx,1024,"RepetitionMandatory",l.maxLookahead,Wt(l))}),G(a,l=>{this.computeLookaheadFunc(r,l.idx,1536,"RepetitionMandatoryWithSeparator",l.maxLookahead,Wt(l))}),G(u,l=>{this.computeLookaheadFunc(r,l.idx,1280,"RepetitionWithSeparator",l.maxLookahead,Wt(l))})})})}computeLookaheadFunc(e,r,n,i,o,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:o||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=cl(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(u,a)})}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return cl(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},vp=class extends Bt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},fl=new vp;function cP(t){fl.reset(),t.accept(fl);let e=fl.dslMethods;return fl.reset(),e}function Fp(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function Np(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function WE(t,e,r){t.children[r]===void 0?t.children[r]=[e]:t.children[r].push(e)}function HE(t,e,r){t.children[e]===void 0?t.children[e]=[r]:t.children[e].push(r)}var fP="name";function Pp(t,e){Object.defineProperty(t,fP,{enumerable:!1,configurable:!0,writable:!1,value:e})}function pP(t,e){let r=Pe(t),n=r.length;for(let i=0;i<n;i++){let o=r[i],s=t[o],a=s.length;for(let u=0;u<a;u++){let l=s[u];l.tokenTypeIdx===void 0&&this[l.name](l.children,e)}}}function KE(t,e){let r=function(){};Pp(r,t+"BaseSemantics");let n={visit:function(i,o){if(Q(i)&&(i=i[0]),!Dt(i))return this[i.name](i.children,o)},validateVisitor:function(){let i=dP(this,e);if(!Te(i)){let o=V(i,s=>s.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
|
|
198
198
|
${o.join(`
|
|
199
199
|
|
|
200
200
|
`).replace(/\n/g,`
|
|
201
|
-
`)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function YE(t,e,r){let n=function(){};Pp(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return G(e,o=>{i[o]=
|
|
201
|
+
`)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function YE(t,e,r){let n=function(){};Pp(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return G(e,o=>{i[o]=pP}),n.prototype=i,n.prototype.constructor=n,n}var Lp;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(Lp||(Lp={}));function dP(t,e){return hP(t,e)}function hP(t,e){let r=vt(e,i=>Pt(t[i])===!1),n=V(r,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:Lp.MISSING_METHOD,methodName:i}));return Br(n)}var gl=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=X(e,"nodeLocationTracking")?e.nodeLocationTracking:jt.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Ze,this.cstFinallyStateUpdate=Ze,this.cstPostTerminal=Ze,this.cstPostNonTerminal=Ze,this.cstPostRule=Ze;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Np,this.setNodeLocationFromNode=Np,this.cstPostRule=Ze,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Ze,this.setNodeLocationFromNode=Ze,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Fp,this.setNodeLocationFromNode=Fp,this.cstPostRule=Ze,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Ze,this.setNodeLocationFromNode=Ze,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Ze,this.setNodeLocationFromNode=Ze,this.cstPostRule=Ze,this.setInitialNodeLocation=Ze;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];WE(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];HE(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(Dt(this.baseCstVisitorConstructor)){let e=KE(this.className,Pe(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Dt(this.baseCstVisitorWithDefaultsConstructor)){let e=YE(this.className,Pe(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}};var xl=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Go}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?Go:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}};var yl=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=Wo){if(We(this.definedRulesNames,e)){let s={message:yr.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:bt.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let i=this.defineRule(e,r,n);return this[e]=i,i}OVERRIDE_RULE(e,r,n=Wo){let i=PE(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let o=this.defineRule(e,r,n);return this[e]=o,o}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,r),!0}catch(i){if(zn(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Vu(Re(this.gastProductionsCache))}};var bl=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=$o,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},X(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
|
|
202
202
|
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
|
|
203
203
|
For Further details.`);if(Q(e)){if(Te(e))throw Error(`A Token Vocabulary cannot be empty.
|
|
204
204
|
Note that the first argument for the parser constructor
|
|
@@ -206,39 +206,39 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleN
|
|
|
206
206
|
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
|
|
207
207
|
For Further details.`)}if(Q(e))this.tokensMap=dt(e,(o,s)=>(o[s.name]=s,o),{});else if(X(e,"modes")&&Ot(xt(Re(e.modes)),dE)){let o=xt(Re(e.modes)),s=Po(o);this.tokensMap=dt(s,(a,u)=>(a[u.name]=u,a),{})}else if(Ye(e))this.tokensMap=Me(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=xr;let n=X(e,"modes")?xt(Re(e.modes)):Re(e),i=Ot(n,o=>Te(o.categoryMatches));this.tokenMatcher=i?$o:an,un(Re(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
|
|
208
208
|
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=X(n,"resyncEnabled")?n.resyncEnabled:Wo.resyncEnabled,o=X(n,"recoveryValueFunc")?n.recoveryValueFunc:Wo.recoveryValueFunc,s=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let a;return this.outputCst===!0?a=function(...c){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,c);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,i,o)}finally{this.ruleFinallyStateUpdate()}}:a=function(...c){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,c)}catch(f){return this.invokeRuleCatch(f,i,o)}finally{this.ruleFinallyStateUpdate()}},Object.assign(a,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){let i=this.RULE_STACK.length===1,o=r&&!this.isBackTracking()&&this.recoveryEnabled;if(zn(e)){let s=e;if(o){let a=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))if(s.resyncedTokens=this.reSyncTo(a),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return n(e);else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,s.partialCstResult=u}throw s}}else{if(i)return this.moveToTerminatedState(),n(e);throw s}}else throw e}optionInternal(e,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof e!="function"){o=e.DEF;let s=e.GATE;if(s!==void 0){let a=i;i=()=>s.call(this)&&a.call(this)}}else o=e;if(i.call(this)===!0)return o.call(this)}atLeastOneInternal(e,r){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let s=r.GATE;if(s!==void 0){let a=i;i=()=>s.call(this)&&a.call(this)}}else o=r;if(i.call(this)===!0){let s=this.doSingleRepetition(o);for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(o)}else throw this.raiseEarlyExitException(e,Xe.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,rl)}atLeastOneSepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let a=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,a,i,Ls],a,1536,e,Ls)}else throw this.raiseEarlyExitException(e,Xe.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let a=r.GATE;if(a!==void 0){let u=i;i=()=>a.call(this)&&u.call(this)}}else o=r;let s=!0;for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(o);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,tl,s)}manySepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let a=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,a,i,Ps],a,1280,e,Ps)}}repetitionSepSecondInternal(e,r,n,i,o){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,i,o],n,1536,e,o)}doSingleRepetition(e){let r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){let n=this.getKeyForAutomaticLookahead(256,r),i=Q(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,i);if(s!==void 0)return i[s].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new zs(r,e))}}subruleInternal(e,r,n){let i;try{let o=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=e.apply(this,o),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),i}catch(o){throw this.subruleInternalError(o,n,e.ruleName)}}subruleInternalError(e,r,n){throw zn(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let i;try{let o=this.LA(1);this.tokenMatcher(o,e)===!0?(this.consumeToken(),i=o):this.consumeInternalError(e,o,n)}catch(o){i=this.consumeInternalRecovery(e,r,o)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,i),i}consumeInternalError(e,r,n){let i,o=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:o,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Mi(i,r,o))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,i)}catch(o){throw o.name===Op?n:o}}else throw n}saveRecogState(){let e=this.errors,r=Me(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),xr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}};var El=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=X(e,"errorMessageProvider")?e.errorMessageProvider:jt.errorMessageProvider}SAVE_ERROR(e){if(zn(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Me(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Me(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){let i=this.getCurrRuleFullName(),o=this.getGAstProductions()[i],a=Bs(e,o,r,this.maxLookahead)[0],u=[];for(let c=1;c<=this.maxLookahead;c++)u.push(this.LA(c));let l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new $s(l,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],o=Ms(e,i,this.maxLookahead),s=[];for(let l=1;l<=this.maxLookahead;l++)s.push(this.LA(l));let a=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:o,actual:s,previous:a,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Us(u,this.LA(1),a))}};var Al=class{initContentAssist(){}computeContentAssist(e,r){let n=this.gastProductionsCache[e];if(Dt(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return il([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let r=kt(e.ruleStack),i=this.getGAstProductions()[r];return new el(i,e).startWalking()}};var Cl={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Cl);var ZE=!0,XE=Math.pow(2,8)-1,QE=xe({name:"RECORDING_PHASE_TOKEN",pattern:Ie.NA});un([QE]);var eA=Li(QE,`This IToken indicates the Parser is in Recording Phase
|
|
209
|
-
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(eA);var
|
|
209
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(eA);var gP={name:`This CSTNode indicates the Parser is in Recording Phase
|
|
210
210
|
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},kl=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let r=e>0?e:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,e,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,e,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return Go}topLevelRuleRecord(e,r){try{let n=new Mt({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
|
|
211
211
|
This error was thrown during the "grammar recording phase" For more info see:
|
|
212
|
-
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return Gs.call(this,Ge,e,r)}atLeastOneInternalRecord(e,r){Gs.call(this,at,r,e)}atLeastOneSepFirstInternalRecord(e,r){Gs.call(this,ut,r,e,ZE)}manyInternalRecord(e,r){Gs.call(this,De,r,e)}manySepFirstInternalRecord(e,r){Gs.call(this,et,r,e,ZE)}orInternalRecord(e,r){return
|
|
213
|
-
inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let i=jr(this.recordingProdStack),o=e.ruleName,s=new Be({idx:r,nonTerminalName:o,label:n?.LABEL,referencedRule:void 0});return i.definition.push(s),this.outputCst?
|
|
214
|
-
inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=jr(this.recordingProdStack),o=new ve({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(o),eA}};function Gs(t,e,r,n=!1){wl(r);let i=jr(this.recordingProdStack),o=Pt(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),X(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),o.call(this),i.definition.push(s),this.recordingProdStack.pop(),Cl}function
|
|
212
|
+
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return Gs.call(this,Ge,e,r)}atLeastOneInternalRecord(e,r){Gs.call(this,at,r,e)}atLeastOneSepFirstInternalRecord(e,r){Gs.call(this,ut,r,e,ZE)}manyInternalRecord(e,r){Gs.call(this,De,r,e)}manySepFirstInternalRecord(e,r){Gs.call(this,et,r,e,ZE)}orInternalRecord(e,r){return xP.call(this,e,r)}subruleInternalRecord(e,r,n){if(wl(r),!e||X(e,"ruleName")===!1){let a=new Error(`<SUBRULE${JE(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
|
|
213
|
+
inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let i=jr(this.recordingProdStack),o=e.ruleName,s=new Be({idx:r,nonTerminalName:o,label:n?.LABEL,referencedRule:void 0});return i.definition.push(s),this.outputCst?gP:Cl}consumeInternalRecord(e,r,n){if(wl(r),!gp(e)){let s=new Error(`<CONSUME${JE(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
|
|
214
|
+
inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=jr(this.recordingProdStack),o=new ve({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(o),eA}};function Gs(t,e,r,n=!1){wl(r);let i=jr(this.recordingProdStack),o=Pt(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),X(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),o.call(this),i.definition.push(s),this.recordingProdStack.pop(),Cl}function xP(t,e){wl(e);let r=jr(this.recordingProdStack),n=Q(t)===!1,i=n===!1?t:t.DEF,o=new tt({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});X(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD);let s=Ts(i,a=>Pt(a.GATE));return o.hasPredicates=s,r.definition.push(o),G(i,a=>{let u=new je({definition:[]});o.definition.push(u),X(a,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=a.IGNORE_AMBIGUITIES:X(a,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),a.ALT.call(this),this.recordingProdStack.pop()}),Cl}function JE(t){return t===0?"":`${t}`}function wl(t){if(t<0||t>XE){let e=new Error(`Invalid DSL Method idx value: <${t}>
|
|
215
215
|
Idx value must be a none negative value smaller than ${XE+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var Tl=class{initPerformanceTracer(e){if(X(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=jt.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:i,value:o}=Ss(r),s=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${i}ms`),this.traceInitIndent--,o}else return r()}};function tA(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let o=Object.getOwnPropertyDescriptor(n,i);o&&(o.get||o.set)?Object.defineProperty(t.prototype,i,o):t.prototype[i]=r.prototype[i]})})}var Go=Li(xr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Go);var jt=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Qu,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Wo=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0}),bt;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(bt||(bt={}));var Ws=class t{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{Is(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),G(this.definedRulesNames,i=>{let s=this[i].originalGrammarAction,a;this.TRACE_INIT(`${i} Rule`,()=>{a=this.topLevelRuleRecord(i,s)}),this.gastProductionsCache[i]=a})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=jE({rules:Re(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(Te(n)&&this.skipValidations===!1){let i=UE({rules:Re(this.gastProductionsCache),tokenTypes:Re(this.tokensMap),errMsgProvider:yr,grammarName:r}),o=RE({lookaheadStrategy:this.lookaheadStrategy,rules:Re(this.gastProductionsCache),tokenTypes:Re(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,o)}}),Te(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=Hb(Re(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,o;(o=(i=this.lookaheadStrategy).initialize)===null||o===void 0||o.call(i,{rules:Re(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Re(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Te(this.definitionErrors))throw e=V(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
|
|
216
216
|
${e.join(`
|
|
217
217
|
-------------------------------
|
|
218
218
|
`)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),X(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
|
|
219
219
|
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
|
220
220
|
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
|
|
221
|
-
For further details.`);this.skipValidations=X(r,"skipValidations")?r.skipValidations:jt.skipValidations}};Ws.DEFER_DEFINITION_ERRORS_HANDLING=!1;tA(Ws,[ll,pl,gl,xl,bl,yl,El,Al,kl,Tl]);var Bi=class extends Ws{constructor(e,r=jt){let n=Me(r);n.outputCst=!0,super(e,n)}};var Sl=xe({name:"flag",pattern:/--[\w-]+/}),Up=xe({longer_alt:Sl,name:"alias",pattern:/-[A-Z]/i}),rA=xe({group:Ie.SKIPPED,name:"comma",pattern:/,/}),nA=xe({group:Ie.SKIPPED,name:"dollar",pattern:/\$/}),_l=xe({group:Ie.SKIPPED,name:"whiteSpace",pattern:/ /}),iA=xe({group:Ie.SKIPPED,name:"newLine",pattern:/\n/}),zp=xe({name:"word",pattern:/\S+/}),Ks=xe({name:"argument",pattern:/(<\S+>|\[.+\])/}),$p=xe({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),oA=xe({group:Ie.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),sA=xe({group:Ie.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),qp=xe({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),Vp=xe({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),Gp=xe({name:"rowDescription",pattern:/\w.+/}),aA=xe({group:Ie.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),uA=xe({group:Ie.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),
|
|
221
|
+
For further details.`);this.skipValidations=X(r,"skipValidations")?r.skipValidations:jt.skipValidations}};Ws.DEFER_DEFINITION_ERRORS_HANDLING=!1;tA(Ws,[ll,pl,gl,xl,bl,yl,El,Al,kl,Tl]);var Bi=class extends Ws{constructor(e,r=jt){let n=Me(r);n.outputCst=!0,super(e,n)}};var Sl=xe({name:"flag",pattern:/--[\w-]+/}),Up=xe({longer_alt:Sl,name:"alias",pattern:/-[A-Z]/i}),rA=xe({group:Ie.SKIPPED,name:"comma",pattern:/,/}),nA=xe({group:Ie.SKIPPED,name:"dollar",pattern:/\$/}),_l=xe({group:Ie.SKIPPED,name:"whiteSpace",pattern:/ /}),iA=xe({group:Ie.SKIPPED,name:"newLine",pattern:/\n/}),zp=xe({name:"word",pattern:/\S+/}),Ks=xe({name:"argument",pattern:/(<\S+>|\[.+\])/}),$p=xe({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),oA=xe({group:Ie.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),sA=xe({group:Ie.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),qp=xe({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),Vp=xe({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),Gp=xe({name:"rowDescription",pattern:/\w.+/}),aA=xe({group:Ie.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),uA=xe({group:Ie.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),bP=new Ie({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[oA,qp,$p,iA,_l],OPTIONS_MODE:[uA,Vp],ROW_MODE:[aA,Up,Sl,rA,Ks,Gp,_l],USAGE_MODE:[sA,nA,Ks,zp,_l]}}),EP=[Sl,Up,rA,nA,_l,iA,zp,Ks,$p,oA,sA,qp,Vp,Gp,aA,uA],Bp=class extends Bi{sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Vp),this.MANY(()=>{this.OR([{ALT:()=>this.CONSUME(Ks)},{ALT:()=>this.CONSUME(Up)},{ALT:()=>this.CONSUME(Sl)},{ALT:()=>this.CONSUME(Gp,{LABEL:"description"})}])})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(qp),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});programHelp=this.RULE("programHelp",()=>{this.CONSUME($p,{LABEL:"description"}),this.AT_LEAST_ONE(()=>{this.CONSUME(zp,{LABEL:"commandName"})}),this.MANY(()=>{this.CONSUME(Ks)}),this.OPTION(()=>{this.SUBRULE(this.optionsSection)})});constructor(){super(EP),this.performSelfAnalysis()}},Hs=new Bp,jp=class extends Hs.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}optionsSection(e){return e.sectionRow.map(r=>this.visit(r))}programHelp(e){let{command:r,subcommand:n}=Il(this.getString(e.commandName));return{arguments:this.getArray(e.argument),commandName:r,description:this.getString(e.description),options:e.optionsSection?this.visit(e.optionsSection):void 0,subcommandName:n}}sectionRow(e){return{aliases:this.getArray(e.alias),arguments:this.getArray(e.argument),description:this.getString(e.description,!0),flags:this.getArray(e.flag)}}clean(e){return e.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}getArray(e){if(e!==void 0)return e.map(r=>r.image)}getString(e,r=!1){if(e!==void 0)return e.map(n=>r?this.clean(n.image):n.image).join(" ")}},AP=new jp;function lA(t){let e=bP.tokenize(t);if(e.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(e.errors,void 0,2)}`);Hs.input=e.tokens;let r=Hs.programHelp();if(Hs.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Hs.errors,void 0,2)}`);let n;try{n=AP.visit(r)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(n===void 0)throw new Error("Could not parse help string");return n}var Yp=xe({name:"flag",pattern:/--[\w-]+/}),Zp=xe({name:"alias",pattern:/-[A-Z]/i}),cA=xe({group:Ie.SKIPPED,name:"comma",pattern:/,/}),Ho=xe({name:"word",pattern:/\S+/}),Zs=xe({name:"argument",pattern:/<\S+>|\[\S+\]/}),Xp=xe({name:"type",pattern:/\[(boolean|string|array|number)\]/}),Jp=xe({name:"defaultInfo",pattern:/\[default\]/}),Qp=xe({name:"required",pattern:/\[required\]/}),ed=xe({name:"defaultInfoDescription",pattern:/\[default:\s.+\]/}),td=xe({name:"choices",pattern:/\[choices:\s.+?\]/}),Wp=xe({group:Ie.SKIPPED,name:"whiteSpace",pattern:/\s/}),fA=xe({group:Ie.SKIPPED,name:"startProgramDescription",pattern:/\n\n/,push_mode:"PROGRAM_DESCRIPTION_MODE"}),rd=xe({name:"programDescription",pattern:/.+/}),pA=xe({group:Ie.SKIPPED,name:"endProgramDescription",pattern:/\n\n/,pop_mode:!0}),nd=xe({name:"startOptionsSection",pattern:/Options:?\n/,push_mode:"SECTION_MODE"}),id=xe({name:"startPositionalsSection",pattern:/Positionals:\n/,push_mode:"SECTION_MODE"}),od=xe({name:"startCommandsSection",pattern:/Commands:\n/,push_mode:"SECTION_MODE"}),sd=xe({name:"startRow",pattern:/ {2,}/,push_mode:"ROW_MODE"}),ad=xe({name:"rowDescription",pattern:/ {2}\w.+ {2}/}),ud=xe({name:"rowDescriptionTerminal",pattern:/ {2}\w.+/}),dA=xe({group:Ie.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),hA=xe({group:Ie.SKIPPED,name:"endSection",pattern:/\n+/,pop_mode:!0}),kP=new Ie({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[nd,id,od,fA,Zs,Ho,Wp],PROGRAM_DESCRIPTION_MODE:[pA,rd],ROW_MODE:[dA,cA,Xp,ad,ud,ed,Jp,Qp,td,Yp,Zp,Zs,Ho,Wp],SECTION_MODE:[sd,hA]}}),wP=[Yp,Zp,cA,Ho,Zs,Xp,Jp,Qp,ed,td,Wp,fA,rd,pA,nd,id,od,sd,ad,ud,dA,hA],Hp=class extends Bi{sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(sd),this.OPTION(()=>{this.CONSUME(Ho,{LABEL:"parentCommandName"})}),this.MANY(()=>{this.CONSUME1(Ho,{LABEL:"commandName"})}),this.MANY1(()=>{this.OR([{ALT:()=>this.CONSUME(Zs)},{ALT:()=>this.CONSUME(Zp)},{ALT:()=>this.CONSUME(Yp)},{ALT:()=>this.CONSUME(ad,{LABEL:"description"})},{ALT:()=>this.CONSUME(ud,{LABEL:"description"})},{ALT:()=>this.CONSUME(Xp)},{ALT:()=>this.CONSUME(Qp)},{ALT:()=>this.CONSUME(ed)},{ALT:()=>this.CONSUME(Jp)},{ALT:()=>this.CONSUME(td)}])})});commandsSection=this.RULE("commandsSection",()=>{this.CONSUME(od),this.MANY1(()=>{this.SUBRULE1(this.sectionRow)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(nd),this.MANY2(()=>{this.SUBRULE2(this.sectionRow)})});positionalsSection=this.RULE("positionalsSection",()=>{this.CONSUME(id),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});programHelp=this.RULE("programHelp",()=>{this.AT_LEAST_ONE(()=>{this.CONSUME(Ho,{LABEL:"commandName"})}),this.MANY1(()=>{this.CONSUME(Zs)}),this.OPTION(()=>{this.CONSUME(rd,{LABEL:"description"})}),this.OPTION1(()=>{this.SUBRULE(this.commandsSection)}),this.OPTION2(()=>{this.SUBRULE(this.positionalsSection)}),this.OPTION3(()=>{this.SUBRULE(this.optionsSection)})});constructor(){super(wP),this.performSelfAnalysis()}},Ys=new Hp,Kp=class extends Ys.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}commandsSection(e){return e.sectionRow.map(r=>this.visit(r))}optionsSection(e){return e.sectionRow.map(r=>this.visit(r))}positionalsSection(e){return e.sectionRow.map(r=>this.positionalParentCommandToArguments(this.visit(r)))}programHelp(e){let{command:r,subcommand:n}=Il(this.getString(e.commandName));return{arguments:this.getArray(e.argument),commandName:r,commands:e.commandsSection?this.visit(e.commandsSection):void 0,description:this.getString(e.description),options:e.optionsSection?this.visit(e.optionsSection):void 0,positionals:e.positionalsSection?this.visit(e.positionalsSection):void 0,subcommandName:n}}sectionRow(e){return{aliases:this.getArray(e.alias),arguments:this.getArray(e.argument),choices:this.splitChoices(this.getString(e.choices)),commandName:this.getString(e.commandName),default:e.defaultInfo?!0:void 0,defaultValue:this.getString(e.defaultInfoDescription,!0),description:this.getString(e.description,!0),flags:this.getArray(e.flag),parentCommandName:this.getString(e.parentCommandName),required:e.required?!0:void 0,type:this.getString(e.type,!0)}}clean(e){return e.endsWith("]]")?e.replaceAll(/(^\[default:\s*)|(\]$)/g,""):e.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}getArray(e){if(e!==void 0)return e.map(r=>r.image)}getString(e,r=!1){if(e!==void 0)return e.map(n=>r?this.clean(n.image):n.image).join(" ")}positionalParentCommandToArguments(e){let{arguments:r,parentCommandName:n,...i}=e;return n===void 0?e:{arguments:[n,...r??[]],...i}}splitChoices(e){if(e!==void 0)return this.clean(e.replaceAll(/^\[choices:\s/g,"")).split(", ")}},CP=new Kp;function mA(t){let e=kP.tokenize(t);if(e.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(e.errors,void 0,2)}`);Ys.input=e.tokens;let r=Ys.programHelp();if(Ys.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Ys.errors,void 0,2)}`);let n;try{n=CP.visit(r)}catch(i){if(i instanceof Error)throw new TypeError(`Errors visiting CLI command help text: ${String(i)}`)}if(n===void 0)throw new Error("Could not parse help string");return n}var gA={yargs:mA,meow:lA};function Il(t){if(t===void 0)throw new Error('Could not find "commandName" entry in help');let e=t.split(" ");if(e.length===0)throw new Error('Could not find "commandName" entry in help');if(e.length===1)return{command:e[0],subcommand:void 0};let r=e.at(-1);return{command:e.slice(0,-1).join(" "),subcommand:r}}function xA(t){for(let[e,r]of Object.entries(gA)){ld.info(`Trying to parse help string with ${e} parser...`);try{return r(t)}catch(n){n instanceof Error&&ld.info(`Error in "${e}" parser: ${String(n)}`);continue}}ld.error("Could not parse help string with any parser")}async function cd(t,e="--help",r){let n=`${t} ${e}`,i=await IP(n),o=xA(i);return o===void 0?(yA.warn("Falling back to basic cli help text output."),SP(i)):_P(t,e,r??Number.MAX_SAFE_INTEGER,o)}async function _P(t,e,r,n){if(r<=0)return yA.info("Max CLI command help depth reached, stopping recursion"),"";let i=ex(n,r),o=t.split(" ")[0];if(n.commands)for(let s of n.commands){if(!s.parentCommandName||!s.commandName)continue;let a=await cd(`${o} ${s.commandName}`,e,r-1);if(a==="")return i;i+=`
|
|
222
222
|
|
|
223
|
-
${a}`}return i}function
|
|
223
|
+
${a}`}return i}function SP(t){return`\`\`\`txt
|
|
224
224
|
${t}
|
|
225
|
-
\`\`\``}async function
|
|
225
|
+
\`\`\``}async function IP(t){let e;try{let{stderr:r,stdout:n}=await TP(t);e=n,(e===void 0||e==="")&&(e=r)}catch(r){if(r instanceof Error)throw new TypeError(`Error running CLI help command: "${t}"
|
|
226
226
|
${r.message}
|
|
227
227
|
`)}if(e===void 0||e==="")throw new Error(`No result from running CLI help command: "${t}"
|
|
228
|
-
`);return e}import
|
|
228
|
+
`);return e}import DP from"path";import{log as RP}from"remark-mdat";import FP from"which";import bA from"fs/promises";import OP from"path";import EA from"process";var AA=EA.platform==="win32",vP=AA?new Set(EA.env.PATHEXT?.split(";").map(t=>t.toLowerCase())??[]):new Set;async function kA(t){try{return await bA.access(t,bA.constants.X_OK),AA?vP.has(OP.extname(t).toLowerCase()):!0}catch{return!1}}async function wA(t){return t??=await NP(),LP(t)}async function NP(){let t=await Jt();if(t.bin){let e=typeof t.bin=="string"?t.bin:String(Object.values(t.bin).at(0));if(PP(e))return RP.info(`Inferred <!-- cli-help --> command to run from package.json: ${e}`),e}throw new Error(`Could not infer which command to run for the <!-- cli-help --> rule. Please pass a "cliCommand" option to the expansion comment, e.g. <!-- cli-help {cliCommand: './dist/bin.js'} -->`)}function PP(t){let e=DP.parse(t);return e.root!==""||e.dir!==""}async function LP(t){let e=await FP(t,{nothrow:!0})??void 0;if(e??=await MP(t)??void 0,e!==void 0&&await kA(e))return e;throw new Error(`The cli-help rule noticed that "${e}" is not executable.`)}async function MP(t){return(await Jt()).bin?.[t]??void 0}var Ol={"cli-help":{async content(t){let e=K.object({cliCommand:K.string().optional(),depth:K.number().optional(),helpFlag:K.string().optional()}).optional().parse(t),r=await wA(e?.cliCommand);return cd(r,e?.helpFlag,e?.depth)}}};var CA={cli:BP(Ol)};import jP from"fs/promises";import TA from"path";var _A={code:{async content(t){let e=K.object({file:K.string(),language:K.string().optional()}).parse(t),r=(TA.extname(e.file)??"").replace(/^\./,""),n=await jP.readFile(TA.join(process.cwd(),e.file),"utf8");return`\`\`\`${r}
|
|
229
229
|
${n}
|
|
230
230
|
\`\`\``}}};var vl={contributing:{async content(){let e=(await Jt()).bugs?.url;if(e===void 0)throw new Error('Could not find "bugs.url" entry in package.json');return`## Contributing
|
|
231
|
-
[Issues](${e}) and pull requests are welcome.`},order:15}};var Dl={description:{async content(){let t=await Jt();if(t.description===void 0)throw new Error('Could not find "description" entry in package.json');return`**${t.description}**`},order:4}};import{getSoleRule as
|
|
232
|
-
[${r}](license.txt) \xA9 ${e.name}`},order:16}};var
|
|
233
|
-
`)}var PA={"size-table":{async content(t){let e=nL.parse(t),r=await Promise.all(e.files.map(async n=>{let i=NA.join(process.cwd(),n),o=await Ll(i);return[n,o]}));return iL(r,{brotli:e.brotli,gzip:e.gzip,original:e.original,showPercentage:e.showPercentage})}}};var LA=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g;var oL=Object.hasOwnProperty,Xs=class{constructor(){this.occurrences,this.reset()}slug(e,r){let n=this,i=sL(e,r===!0),o=i;for(;oL.call(n.occurrences,i);)n.occurrences[o]++,i=o+"-"+n.occurrences[o];return n.occurrences[i]=0,i}reset(){this.occurrences=Object.create(null)}};function sL(t,e){return typeof t!="string"?"":(e||(t=t.toLowerCase()),t.replace(LA,"").replace(/ /g,"-"))}function Ml(t){return new RegExp("^("+t+")$","i")}var MA=new Xs;function BA(t,e,r){let n="children"in t?t.children.length:0,i=r.skip?Ml(r.skip):void 0,o=Or(r.parents||function(c){return c===t}),s=[],a,u,l;return MA.reset(),Es(t,"heading",function(c,f,p){let d=Jr(c,{includeImageAlt:!1}),m=c.data&&c.data.hProperties&&c.data.hProperties.id,y=MA.slug(m||d);if(o(p)){if(f!==void 0&&e&&!a&&e.test(d)){a=f+1,l=c;return}f!==void 0&&l&&!u&&c.depth<=l.depth&&(u=f),(u||!e)&&(!r.minDepth||c.depth>=r.minDepth)&&(!r.maxDepth||c.depth<=r.maxDepth)&&(!i||!i.test(d))&&s.push({depth:c.depth,children:c.children,id:y})}}),{index:a===void 0?-1:a,endIndex:a===void 0?-1:u||n,map:s}}var jA=typeof self=="object"?self:globalThis,cL=(t,e)=>{let r=(i,o)=>(t.set(o,i),i),n=i=>{if(t.has(i))return t.get(i);let[o,s]=e[i];switch(o){case 0:case-1:return r(s,i);case 1:{let a=r([],i);for(let u of s)a.push(n(u));return a}case 2:{let a=r({},i);for(let[u,l]of s)a[n(u)]=n(l);return a}case 3:return r(new Date(s),i);case 4:{let{source:a,flags:u}=s;return r(new RegExp(a,u),i)}case 5:{let a=r(new Map,i);for(let[u,l]of s)a.set(n(u),n(l));return a}case 6:{let a=r(new Set,i);for(let u of s)a.add(n(u));return a}case 7:{let{name:a,message:u}=s;return r(new jA[a](u),i)}case 8:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{let{buffer:a}=new Uint8Array(s);return r(new DataView(a),s)}}return r(new jA[o](s),i)};return n},md=t=>cL(new Map,t)(0);var Ko="",{toString:fL}={},{keys:pL}=Object,Js=t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let r=fL.call(t).slice(8,-1);switch(r){case"Array":return[1,Ko];case"Object":return[2,Ko];case"Date":return[3,Ko];case"RegExp":return[4,Ko];case"Map":return[5,Ko];case"Set":return[6,Ko];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},jl=([t,e])=>t===0&&(e==="function"||e==="symbol"),dL=(t,e,r,n)=>{let i=(s,a)=>{let u=n.push(s)-1;return r.set(a,u),u},o=s=>{if(r.has(s))return r.get(s);let[a,u]=Js(s);switch(a){case 0:{let c=s;switch(u){case"bigint":a=8,c=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([-1],s)}return i([a,c],s)}case 1:{if(u){let p=s;return u==="DataView"?p=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(s)),i([u,[...p]],s)}let c=[],f=i([a,c],s);for(let p of s)c.push(o(p));return f}case 2:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());let c=[],f=i([a,c],s);for(let p of pL(s))(t||!jl(Js(s[p])))&&c.push([o(p),o(s[p])]);return f}case 3:return i([a,s.toISOString()],s);case 4:{let{source:c,flags:f}=s;return i([a,{source:c,flags:f}],s)}case 5:{let c=[],f=i([a,c],s);for(let[p,d]of s)(t||!(jl(Js(p))||jl(Js(d))))&&c.push([o(p),o(d)]);return f}case 6:{let c=[],f=i([a,c],s);for(let p of s)(t||!jl(Js(p)))&&c.push(o(p));return f}}let{message:l}=s;return i([a,{name:u,message:l}],s)};return o},gd=(t,{json:e,lossy:r}={})=>{let n=[];return dL(!(e||r),!!e,new Map,n)(t),n};var xd=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?md(gd(t,e)):structuredClone(t):(t,e)=>md(gd(t,e));function VA(t,e){let{ordered:r=!1,tight:n=!1,prefix:i}=e,o={type:"list",ordered:r,spread:!1,children:[]},s=Number.POSITIVE_INFINITY,a=-1;for(;++a<t.length;)t[a].depth<s&&(s=t[a].depth);for(a=-1;++a<t.length;)t[a].depth-=s-1;for(a=-1;++a<t.length;)Qs(t[a],o,{ordered:r,tight:n,prefix:i});return o}function Qs(t,e,r){let n=-1,i=e.children[e.children.length-1];if(e.type==="list")if(t.depth===1)e.children.push({type:"listItem",spread:!1,children:[{type:"paragraph",children:[{type:"link",title:null,url:"#"+(r.prefix||"")+t.id,children:yd(t.children)}]}]});else if(e.children.length>0){let o=e.children[e.children.length-1];Qs(t,o,r)}else{let o={type:"listItem",spread:!1,children:[]};e.children.push(o),Qs(t,o,r)}else if(i&&i.type==="list")t.depth--,Qs(t,i,r);else{let o={type:"list",ordered:r.ordered,spread:!1,children:[]};e.children.push(o),t.depth--,Qs(t,o,r)}if(e.type==="list"&&!r.tight){for(e.spread=!1;++n<e.children.length;)if(e.children[n].children.length>1){e.spread=!0;break}}else e.spread=!r.tight}function yd(t){let e=[],r=-1;for(;++r<t.length;){let n=hL(t[r]);Array.isArray(n)?e.push(...n):e.push(n)}return e}function hL(t){if(t.type==="footnoteReference")return[];if(t.type==="link"||t.type==="linkReference")return yd(t.children);if("children"in t){let{children:n,position:i,...o}=t;return Object.assign(xd(o),{children:yd(t.children)})}let{position:e,...r}=t;return xd(r)}function bd(t,e){let r=e||{},n=r.heading?Ml(r.heading):void 0,i=BA(t,n,r);return{index:n?i.index:void 0,endIndex:n?i.endIndex:void 0,map:i.map.length>0?VA(i.map,r):void 0}}var Ul={"table-of-contents":{applicationOrder:1,async content(t,e){let r=K.object({depth:K.union([K.literal(1),K.literal(2),K.literal(3),K.literal(4),K.literal(5),K.literal(6)]).optional()}).optional().parse(t),n=bd(e,{heading:null,maxDepth:r?.depth??3,tight:!0}),i="## Table of contents";if(n.map===void 0)throw new Error("Could not generate table of contents");let o={children:n.map.children,type:"root"},s=co().use(wn).stringify(o).replaceAll(`
|
|
231
|
+
[Issues](${e}) and pull requests are welcome.`},order:15}};var Dl={description:{async content(){let t=await Jt();if(t.description===void 0)throw new Error('Could not find "description" entry in package.json');return`**${t.description}**`},order:4}};import{getSoleRule as SA}from"remark-mdat";var Rl={license:{async content(){let t=await Jt(),{author:e,license:r}=t;if(e?.name===void 0)throw new Error('Could not find "author.name" entry in package.json');if(r===void 0)throw new Error('Could not find "license" entry in package.json');return`## License
|
|
232
|
+
[${r}](license.txt) \xA9 ${e.name}`},order:16}};var IA={footer:{content:[SA(vl),SA(Rl)],order:17}};import{getSoleRule as Pl}from"remark-mdat";import{getSoleRule as UP}from"remark-mdat";var Fl={"short-description":UP(Dl)};var Nl={title:{applicationOrder:2,async content(t){let{postfix:e,prefix:r,titleCase:n}=K.object({postfix:K.string().optional().default(""),prefix:K.string().optional().default(""),titleCase:K.boolean().optional().default(!1)}).parse(t??{}),{name:i}=await Jt();return`# ${r}${n?zP(i):i}${e}`},order:1}};function zP(t){return t.split(/[ _-]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var OA={header:{applicationOrder:2,content:[Pl(Nl),Pl(hu),Pl(pu),Pl(Fl)],order:1}};import QP from"path";import KP from"fs/promises";import{promisify as RA}from"util";import{brotliCompress as YP,gzip as ZP}from"zlib";var $P=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],qP=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],VP=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],GP=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],vA=(t,e,r)=>{let n=t;return typeof e=="string"||Array.isArray(e)?n=t.toLocaleString(e,r):(e===!0||r!==void 0)&&(n=t.toLocaleString(void 0,r)),n},DA=t=>{if(typeof t=="number")return Math.log10(t);let e=t.toString(10);return e.length+Math.log10("0."+e.slice(0,15))},WP=t=>typeof t=="number"?Math.log(t):DA(t)*Math.log(10),HP=(t,e)=>{if(typeof t=="number")return t/e;let r=t/BigInt(e),n=t%BigInt(e);return Number(r)+Number(n)/e};function fd(t,e){if(typeof t!="bigint"&&!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);e={bits:!1,binary:!1,space:!0,...e};let r=e.bits?e.binary?GP:VP:e.binary?qP:$P,n=e.space?" ":"";if(e.signed&&(typeof t=="number"?t===0:t===0n))return` 0${n}${r[0]}`;let i=t<0,o=i?"-":e.signed?"+":"";i&&(t=-t);let s;if(e.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:e.minimumFractionDigits}),e.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:e.maximumFractionDigits,...s}),t<1){let c=vA(t,e.locale,s);return o+c+n+r[0]}let a=Math.min(Math.floor(e.binary?WP(t)/Math.log(1024):DA(t)/3),r.length-1);if(t=HP(t,(e.binary?1024:1e3)**a),!s){let c=Math.max(3,Number.parseInt(t,10).toString().length);t=t.toPrecision(c)}let u=vA(Number(t),e.locale,s),l=r[a];return o+u+n+l}var XP=RA(YP),JP=RA(ZP);function pd(t,e){let r=e===0?0:(e-t)/e*100;return{bytes:t,bytesPretty:fd(t,{maximumFractionDigits:1}),percent:r,percentPretty:`${Math.round(r)}%`}}async function Ll(t){try{let e=await KP.readFile(t),r=e.length,[n,i]=await Promise.all([XP(e),JP(e)]);return{brotli:pd(n.length,r),gzip:pd(i.length,r),original:pd(r,r)}}catch(e){throw new Error(`Failed to analyze file: ${e instanceof Error?e.message:"Unknown error"}`)}}var eL=K.object({compression:K.enum(["none","brotli","gzip"]).optional().default("none"),file:K.string()});function tL(t,e){switch(e){case"brotli":return t.brotli.bytesPretty;case"gzip":return t.gzip.bytesPretty;case"none":return t.original.bytesPretty}}var FA={size:{async content(t){let e=eL.parse(t),r=QP.join(process.cwd(),e.file),n=await Ll(r);return tL(n,e.compression)}}};import PA from"path";var NA=K.union([K.string(),K.array(K.string())]).transform(t=>Array.isArray(t)?t:[t]),rL=K.union([K.object({brotli:K.boolean().optional().default(!0),file:NA,gzip:K.boolean().optional().default(!0),original:K.boolean().optional().default(!0),showPercentage:K.boolean().optional().default(!1)}),K.object({brotli:K.boolean().optional().default(!0),files:NA,gzip:K.boolean().optional().default(!0),original:K.boolean().optional().default(!0),showPercentage:K.boolean().optional().default(!1)})]).transform(t=>{if("file"in t){let{file:e,...r}=t;return{files:e,...r}}return t});function nL(t,e){let r=["File"];e.original&&r.push("Original"),e.gzip&&r.push("Gzip"),e.brotli&&r.push("Brotli");let n=r.map(()=>"---"),i=t.map(([o,s])=>{let a=[PA.basename(o)];return e.original&&a.push(s.original.bytesPretty),e.gzip&&a.push(e.showPercentage?`${s.gzip.bytesPretty} (${s.gzip.percentPretty})`:s.gzip.bytesPretty),e.brotli&&a.push(e.showPercentage?`${s.brotli.bytesPretty} (${s.brotli.percentPretty})`:s.brotli.bytesPretty),a});return[`| ${r.join(" | ")} |`,`| ${n.join(" | ")} |`,...i.map(o=>`| ${o.join(" | ")} |`)].join(`
|
|
233
|
+
`)}var LA={"size-table":{async content(t){let e=rL.parse(t),r=await Promise.all(e.files.map(async n=>{let i=PA.join(process.cwd(),n),o=await Ll(i);return[n,o]}));return nL(r,{brotli:e.brotli,gzip:e.gzip,original:e.original,showPercentage:e.showPercentage})}}};var MA=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g;var iL=Object.hasOwnProperty,Xs=class{constructor(){this.occurrences,this.reset()}slug(e,r){let n=this,i=oL(e,r===!0),o=i;for(;iL.call(n.occurrences,i);)n.occurrences[o]++,i=o+"-"+n.occurrences[o];return n.occurrences[i]=0,i}reset(){this.occurrences=Object.create(null)}};function oL(t,e){return typeof t!="string"?"":(e||(t=t.toLowerCase()),t.replace(MA,"").replace(/ /g,"-"))}function Ml(t){return new RegExp("^("+t+")$","i")}var BA=new Xs;function jA(t,e,r){let n="children"in t?t.children.length:0,i=r.skip?Ml(r.skip):void 0,o=Or(r.parents||function(c){return c===t}),s=[],a,u,l;return BA.reset(),Es(t,"heading",function(c,f,p){let d=Jr(c,{includeImageAlt:!1}),m=c.data&&c.data.hProperties&&c.data.hProperties.id,y=BA.slug(m||d);if(o(p)){if(f!==void 0&&e&&!a&&e.test(d)){a=f+1,l=c;return}f!==void 0&&l&&!u&&c.depth<=l.depth&&(u=f),(u||!e)&&(!r.minDepth||c.depth>=r.minDepth)&&(!r.maxDepth||c.depth<=r.maxDepth)&&(!i||!i.test(d))&&s.push({depth:c.depth,children:c.children,id:y})}}),{index:a===void 0?-1:a,endIndex:a===void 0?-1:u||n,map:s}}var UA=typeof self=="object"?self:globalThis,lL=(t,e)=>{let r=(i,o)=>(t.set(o,i),i),n=i=>{if(t.has(i))return t.get(i);let[o,s]=e[i];switch(o){case 0:case-1:return r(s,i);case 1:{let a=r([],i);for(let u of s)a.push(n(u));return a}case 2:{let a=r({},i);for(let[u,l]of s)a[n(u)]=n(l);return a}case 3:return r(new Date(s),i);case 4:{let{source:a,flags:u}=s;return r(new RegExp(a,u),i)}case 5:{let a=r(new Map,i);for(let[u,l]of s)a.set(n(u),n(l));return a}case 6:{let a=r(new Set,i);for(let u of s)a.add(n(u));return a}case 7:{let{name:a,message:u}=s;return r(new UA[a](u),i)}case 8:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{let{buffer:a}=new Uint8Array(s);return r(new DataView(a),s)}}return r(new UA[o](s),i)};return n},md=t=>lL(new Map,t)(0);var Ko="",{toString:cL}={},{keys:fL}=Object,Js=t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let r=cL.call(t).slice(8,-1);switch(r){case"Array":return[1,Ko];case"Object":return[2,Ko];case"Date":return[3,Ko];case"RegExp":return[4,Ko];case"Map":return[5,Ko];case"Set":return[6,Ko];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},jl=([t,e])=>t===0&&(e==="function"||e==="symbol"),pL=(t,e,r,n)=>{let i=(s,a)=>{let u=n.push(s)-1;return r.set(a,u),u},o=s=>{if(r.has(s))return r.get(s);let[a,u]=Js(s);switch(a){case 0:{let c=s;switch(u){case"bigint":a=8,c=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([-1],s)}return i([a,c],s)}case 1:{if(u){let p=s;return u==="DataView"?p=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(s)),i([u,[...p]],s)}let c=[],f=i([a,c],s);for(let p of s)c.push(o(p));return f}case 2:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());let c=[],f=i([a,c],s);for(let p of fL(s))(t||!jl(Js(s[p])))&&c.push([o(p),o(s[p])]);return f}case 3:return i([a,s.toISOString()],s);case 4:{let{source:c,flags:f}=s;return i([a,{source:c,flags:f}],s)}case 5:{let c=[],f=i([a,c],s);for(let[p,d]of s)(t||!(jl(Js(p))||jl(Js(d))))&&c.push([o(p),o(d)]);return f}case 6:{let c=[],f=i([a,c],s);for(let p of s)(t||!jl(Js(p)))&&c.push(o(p));return f}}let{message:l}=s;return i([a,{name:u,message:l}],s)};return o},gd=(t,{json:e,lossy:r}={})=>{let n=[];return pL(!(e||r),!!e,new Map,n)(t),n};var xd=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?md(gd(t,e)):structuredClone(t):(t,e)=>md(gd(t,e));function GA(t,e){let{ordered:r=!1,tight:n=!1,prefix:i}=e,o={type:"list",ordered:r,spread:!1,children:[]},s=Number.POSITIVE_INFINITY,a=-1;for(;++a<t.length;)t[a].depth<s&&(s=t[a].depth);for(a=-1;++a<t.length;)t[a].depth-=s-1;for(a=-1;++a<t.length;)Qs(t[a],o,{ordered:r,tight:n,prefix:i});return o}function Qs(t,e,r){let n=-1,i=e.children[e.children.length-1];if(e.type==="list")if(t.depth===1)e.children.push({type:"listItem",spread:!1,children:[{type:"paragraph",children:[{type:"link",title:null,url:"#"+(r.prefix||"")+t.id,children:yd(t.children)}]}]});else if(e.children.length>0){let o=e.children[e.children.length-1];Qs(t,o,r)}else{let o={type:"listItem",spread:!1,children:[]};e.children.push(o),Qs(t,o,r)}else if(i&&i.type==="list")t.depth--,Qs(t,i,r);else{let o={type:"list",ordered:r.ordered,spread:!1,children:[]};e.children.push(o),t.depth--,Qs(t,o,r)}if(e.type==="list"&&!r.tight){for(e.spread=!1;++n<e.children.length;)if(e.children[n].children.length>1){e.spread=!0;break}}else e.spread=!r.tight}function yd(t){let e=[],r=-1;for(;++r<t.length;){let n=dL(t[r]);Array.isArray(n)?e.push(...n):e.push(n)}return e}function dL(t){if(t.type==="footnoteReference")return[];if(t.type==="link"||t.type==="linkReference")return yd(t.children);if("children"in t){let{children:n,position:i,...o}=t;return Object.assign(xd(o),{children:yd(t.children)})}let{position:e,...r}=t;return xd(r)}function bd(t,e){let r=e||{},n=r.heading?Ml(r.heading):void 0,i=jA(t,n,r);return{index:n?i.index:void 0,endIndex:n?i.endIndex:void 0,map:i.map.length>0?GA(i.map,r):void 0}}var Ul={"table-of-contents":{applicationOrder:1,async content(t,e){let r=K.object({depth:K.union([K.literal(1),K.literal(2),K.literal(3),K.literal(4),K.literal(5),K.literal(6)]).optional()}).optional().parse(t),n=bd(e,{heading:null,maxDepth:r?.depth??3,tight:!0}),i="## Table of contents";if(n.map===void 0)throw new Error("Could not generate table of contents");let o={children:n.map.children,type:"root"},s=co().use(wn).stringify(o).replaceAll(`
|
|
234
234
|
|
|
235
235
|
`,`
|
|
236
236
|
`);return[i,s].join(`
|
|
237
|
-
`)},order:6}};import{tldrawToImage as
|
|
237
|
+
`)},order:6}};import{tldrawToImage as WA}from"@kitschpatrol/tldraw-cli";import hL from"crypto";import Yo from"fs/promises";import br from"path";var ZA={tldraw:{async content(t){let{alt:e="tldraw diagram",src:r}=K.object({alt:K.string().optional(),src:K.string()}).parse(t),{assetsPath:n}=await _r();if(n===void 0)throw new Error("No assets path found");await Yo.mkdir(n,{recursive:!0});let i=await io(r)?await KA(r):void 0;if(i!==void 0){let l=br.basename(r,br.extname(r)),c=br.join(n,`${l}-${i}-light.svg`),f=br.join(n,`${l}-${i}-dark.svg`);if(await io(c)&&await io(f))return HA(c,f,e)}let[o]=await WA(r,{dark:!1,format:"svg",output:n,transparent:!0});i??=await KA(o);let s=`${YA(o)}-${i}-light.svg`;await Yo.rename(o,s);let[a]=await WA(r,{dark:!0,format:"svg",output:n,transparent:!0}),u=`${YA(a)}-${i}-dark.svg`;if(await Yo.rename(a,u),i!==void 0){let l=br.basename(u),c=br.basename(s),f=c.replace(`${i}-light.svg`,""),p=await Yo.readdir(n);for(let d of p){let m=br.basename(d);m!==l&&m!==c&&m.startsWith(f)&&m.endsWith(".svg")&&await Yo.rm(br.join(n,m))}}return HA(s,u,e)}}};async function HA(t,e,r){let{packageFile:n}=await _r();if(n===void 0)throw new Error("No package file found");let i=br.dirname(n),o=br.relative(i,t);return`<picture>
|
|
238
238
|
<source media="(prefers-color-scheme: dark)" srcset="${br.relative(i,e)}">
|
|
239
239
|
<source media="(prefers-color-scheme: light)" srcset="${o}">
|
|
240
240
|
<img alt="${r}" src="${o}">
|
|
241
|
-
</picture>`}async function
|
|
241
|
+
</picture>`}async function KA(t){let e=await Yo.readFile(t),r=hL.createHash("sha1");return r.update(e),r.digest("hex").slice(0,8)}function YA(t){return t.replace(/\.[^./]+$/,"")}import{getSoleRule as mL}from"remark-mdat";var XA={toc:mL(Ul)};var JA={...pu,...hu,...CA,...Ol,..._A,...vl,...Dl,...IA,...OA,...Rl,...Fl,...FA,...LA,...Ul,...Nl,...ZA,...XA};async function zl(t){let e={addMetaComment:!0,rules:JA},{additionalConfig:r=[],...n}=t??{},i=Array.isArray(r)?r:[r],o=await bi({additionalConfig:[e,...i],...n});if(o.packageFile===void 0)throw new Error("Package file path is required in `mdat readme` config");return o}import ta from"path";import yL from"process";import bL from"path";import bse,{promises as QA}from"fs";import{fileURLToPath as EL}from"url";var Ed=class{value;next;constructor(e){this.value=e}},ea=class{#e;#t;#r;constructor(){this.clear()}enqueue(e){let r=new Ed(e);this.#e?(this.#t.next=r,this.#t=r):(this.#e=r,this.#t=r),this.#r++}dequeue(){let e=this.#e;if(e)return this.#e=this.#e.next,this.#r--,e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#r=0}get size(){return this.#r}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}*drain(){for(;this.#e;)yield this.dequeue()}};function $l(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new ea,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,u,l)=>{r++;let c=(async()=>a(...l))();u(c);try{await c}catch{}n()},o=(a,u,l)=>{e.enqueue(i.bind(void 0,a,u,l)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...u)=>new Promise(l=>{o(a,l,u)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s}var ql=class extends Error{constructor(e){super(),this.value=e}},gL=async(t,e)=>e(await t),xL=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new ql(e[0]);return!1};async function Ad(t,e,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){let i=$l(r),o=[...t].map(a=>[a,i(gL,a,e)]),s=$l(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(o.map(a=>s(xL,a)))}catch(a){if(a instanceof ql)return a.value;throw a}}var ek={directory:"isDirectory",file:"isFile"};function AL(t){if(!Object.hasOwnProperty.call(ek,t))throw new Error(`Invalid type specified: ${t}`)}var kL=(t,e)=>e[ek[t]](),wL=t=>t instanceof URL?EL(t):t;async function kd(t,{cwd:e=yL.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:i,preserveOrder:o}={}){AL(r),e=wL(e);let s=n?QA.stat:QA.lstat;return Ad(t,async a=>{try{let u=await s(bL.resolve(e,a));return kL(r,u)}catch{return!1}},{concurrency:i,preserveOrder:o})}import{fileURLToPath as CL}from"url";function wd(t){return t instanceof URL?CL(t):t}import Sse,{promises as Ise}from"fs";var TL=Symbol("findUpStop");async function _L(t,e={}){let r=ta.resolve(wd(e.cwd)??""),{root:n}=ta.parse(r),i=ta.resolve(r,wd(e.stopAt??n)),o=e.limit??Number.POSITIVE_INFINITY,s=[t].flat(),a=async l=>{if(typeof t!="function")return kd(s,l);let c=await t(l.cwd);return typeof c=="string"?kd([c],l):c},u=[];for(;;){let l=await a({...e,cwd:r});if(l===TL||(l&&u.push(ta.resolve(r,l)),r===i||u.length>=o))break;r=ta.dirname(r)}return u}async function tk(t,e={}){return(await _L(t,{...e,limit:1}))[0]}import SL from"path";async function rk({cwd:t}={}){let e=await Ra("package.json",{cwd:t});return e&&SL.dirname(e)}import{log as nk}from"remark-mdat";async function Cd(){nk.info("Searching for package directory...");let t=await rk()??process.cwd(),e=await tk("readme.md",{stopAt:t,type:"file"});if(e!==void 0)return nk.info(`Found closest readme at "${e}"`),e}async function Vl(){let t=await Cd();if(t===void 0)throw new Error("No readme found");return t}async function Gl(t,e,r,n,i){return t??=await Vl(),Cn(t,zl,lu,e,r,n,i)}async function ik(t,e,r,n,i){return t??=await Vl(),Cn(t,zl,fu,e,r,n,i)}async function ok(t,e,r,n,i){return t??=await Vl(),Cn(t,zl,cu,e,r,n,i)}var $r=ns(la(),1);import{confirm as pk,group as NL,intro as PL,note as dk,outro as LL,select as Td}from"@clack/prompts";import ML from"fs/promises";import Wl from"path";import{deepMergeDefined as BL}from"remark-mdat";var sk=`<!-- header -->
|
|
242
242
|
|
|
243
243
|
<!-- table-of-contents -->
|
|
244
244
|
|
|
@@ -283,7 +283,7 @@ _List maintainer(s) for a repository, along with one way of contacting them (e.g
|
|
|
283
283
|
_State anyone or anything that significantly helped with the development of your project. State public contact hyper-links if applicable._
|
|
284
284
|
|
|
285
285
|
<!-- footer -->
|
|
286
|
-
`;var
|
|
286
|
+
`;var ak=`<!-- title -->
|
|
287
287
|
|
|
288
288
|
<!-- banner -->
|
|
289
289
|
|
|
@@ -336,7 +336,7 @@ _State anyone or anything that significantly helped with the development of your
|
|
|
336
336
|
<!-- contributing -->
|
|
337
337
|
|
|
338
338
|
<!-- license -->
|
|
339
|
-
`;var
|
|
339
|
+
`;var uk=`<!-- header -->
|
|
340
340
|
|
|
341
341
|
## Install
|
|
342
342
|
|
|
@@ -352,7 +352,7 @@ _State anyone or anything that significantly helped with the development of your
|
|
|
352
352
|
\`\`\`
|
|
353
353
|
|
|
354
354
|
<!-- footer -->
|
|
355
|
-
`;var
|
|
355
|
+
`;var lk=`<!-- title -->
|
|
356
356
|
|
|
357
357
|
<!-- short-description -->
|
|
358
358
|
|
|
@@ -374,7 +374,7 @@ _State anyone or anything that significantly helped with the development of your
|
|
|
374
374
|
<!-- contributing -->
|
|
375
375
|
|
|
376
376
|
<!-- license -->
|
|
377
|
-
`;var
|
|
377
|
+
`;var ck=`<!-- header -->
|
|
378
378
|
|
|
379
379
|
_Long description goes here._
|
|
380
380
|
|
|
@@ -437,7 +437,7 @@ _List maintainer(s) for a repository, along with one way of contacting them (e.g
|
|
|
437
437
|
_State anyone or anything that significantly helped with the development of your project. State public contact hyper-links if applicable._
|
|
438
438
|
|
|
439
439
|
<!-- footer -->
|
|
440
|
-
`;var
|
|
440
|
+
`;var fk=`<!-- title -->
|
|
441
441
|
|
|
442
442
|
<!-- banner -->
|
|
443
443
|
|
|
@@ -508,7 +508,7 @@ _State anyone or anything that significantly helped with the development of your
|
|
|
508
508
|
<!-- contributing -->
|
|
509
509
|
|
|
510
510
|
<!-- license -->
|
|
511
|
-
`;var ji={"MDAT Readme":{content:{compound:ok,explicit:sk},description:"The house style. An expansive starting point. Prune to your context and taste.",exampleLink:"https://github.com/kitschpatrol/mdat/blob/main/readme.md"},"Standard Readme Basic":{content:{compound:ak,explicit:uk},description:'Includes only the "required" sections from the Standard Readme specification.',exampleLink:"https://github.com/RichardLitt/standard-readme/blob/main/example-readmes/minimal-readme.md"},"Standard Readme Full":{content:{compound:lk,explicit:ck},description:"Includes all sections from the Standard Readme specification.",exampleLink:"https://github.com/RichardLitt/standard-readme/blob/main/example-readmes/maximal-readme.md"}};async function dk(){let t=await Cd(),e=await Fa();return{packageDirectory:e===void 0?void 0:Wl.dirname(Wl.resolve(e)),readmePath:t}}async function hk(){let{packageDirectory:t,readmePath:e}=await dk(),r=Wl.resolve(process.cwd());LL(`Running ${$r.default.bold("mdat readme init")} interactively`);let n=await PL({overwrite:async()=>e===void 0||await fk({message:`Found an existing readme at "${$r.default.blue(e)}". Do you want to overwrite it?`,active:"Overwrite",inactive:"Exit"})?!0:(()=>{throw new Error("`mdat readme init` was cancelled to avoid an overwrite - no changes were made")})(),output:async()=>t!==void 0&&t!==r?Td({initialValue:t,message:"There's a root package directory nearby, do you want to create the readme there instead of the current directory?",options:[{label:`Create in the current package root: "${$r.default.blue(t)}"`,value:t},{label:`Create in current working directory: "${$r.default.blue(r)}"`,value:r}]}):r,template:async()=>Td({message:"Which template would you like to use?",options:zL()}),compound:async()=>Td({message:'Do you want to use "compound comments" where possible, which combine several expansions into a single comment block?',options:[{label:`Yes: Combine things like ${$r.default.green("<!-- title -->")} and ${$r.default.green("<!-- badges -->")} in a single ${$r.default.green("<!-- header -->")} comment.`,value:!0},{label:"No: Use individual MDAT expansion comments for each section.",value:!1}]}),expand:async()=>t===void 0?!1:fk({initialValue:!0,message:"Do you want to run `mdat readme` now to expand the template with content from your package.json?"})},{onCancel(){throw new Error("`mdat readme init` was cancelled - no changes were made")}}),i=await _d(n);return t===void 0&&pk("No package.json was found. Once you've created one, you can run `mdat readme` to expand the template with content from your package.json."),pk(`Readme created: "${$r.default.blue($r.default.bold(i))}"`),ML("Done!"),i}async function _d(t){let{packageDirectory:e}=await dk(),r=jL({compound:!0,output:e??process.cwd(),overwrite:!0,expand:e!==void 0,template:Object.keys(ji)[0]},t??{}),n=UL(r.template,r.compound),i=Wl.join(r.output,"readme.md");await BL.writeFile(i,n,"utf8");let[o]=await Gl(i);return await ln(o),i}function UL(t,e){let n=ji[t].content[e?"compound":"explicit"];if(n===void 0||n==="")throw new Error(`No template found for "${t}"`);return n}function zL(){return Object.entries(ji).map(([t,e])=>({label:t,hint:e.description,value:t}))}var Ui={config:{defaultDescription:"Configuration is loaded if found from the usual places, or defaults are used.",description:"Path(s) to files containing MDAT configuration.",string:!0,type:"array"}},ra={meta:{alias:"m",description:"Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically.",type:"boolean"}},na={name:{alias:"n",defaultDescription:"Same name as input file. Overwrites the input file.",description:"Output file name.",type:"string"}},Zo={output:{alias:"o",defaultDescription:"Same directory as input file.",description:"Output file directory.",type:"string"}},zi={prefix:{description:"Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety.",type:"string"}},ia={print:{description:"Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options.",type:"boolean"}},oa={rules:{alias:"r",description:"Path(s) to files containing MDAT comment expansion rules.",string:!0,type:"array"}},$n={verbose:{describe:"Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection.",type:"boolean"}},Hl=["files",{array:!0,demandOption:!0,describe:"Markdown file(s) with MDAT placeholder comments.",type:"string"}];var Sd={package:{defaultDescription:"The closest package.json file is used by default.",description:"Path to the package.json file to use to populate the readme.",string:!0}},Id={assets:{defaultDescription:"./assets",description:"Path to find and save readme-related assets.",string:!0}},mk={interactive:{alias:"i",default:!0,description:"Run the guided interactive `init` process. Set explicitly to `false` to use default values and skip the prompt.",type:"boolean"}},gk={overwrite:{default:!1,defaultDescription:"`false`, if an existing readme is found, don't touch it.",description:"Replace an existing readme file if one is found.",type:"boolean"}},xk={expand:{alias:"e",default:!0,description:"Automatically run `mdat readme` immediately after creating the readme template.",type:"boolean"}},yk={template:{alias:"t",choices:Object.keys(ji),default:Object.keys(ji)[0],description:"Specify a template to use for the new readme.",type:"string"}},bk={compound:{alias:"c",default:!0,description:"Use compound comment version of the template to replace several individual comment placeholders where possible. This combines things like `<!-- title -->`, `<!-- badges -->`, etc. in a single `<!-- header -->` comment. It's less clutter when you're editing, but it's also less explicit. The final readme.md output is identical.",type:"boolean"}},Kl=["files",{array:!0,demandOption:!1,describe:"Readme file(s) with MDAT placeholder comments. If not provided, the closest readme.md file is used.",type:"string"}];var $i=performance.now(),Ek=Ph(lc(process.argv));try{await Ek.scriptName("mdat").usage("$0 [command]","Work with MDAT placeholder comments in any Markdown file.").command(["$0 <files..> [options]","expand <files..> [options]"],"Expand MDAT placeholder comments.",t=>t.positional(...Hl).option(Ui).option(oa).option(Zo).option(na).option(ra).option(zi).option(ia).option($n),async({config:t,files:e,meta:r,name:n,output:i,prefix:o,print:s,rules:a,verbose:u})=>{ht.verbose=u??!1,Yl({name:n,output:i,print:s});let l=Jo(t,{addMetaComment:r,keywordPrefix:o}),c=await Yg(e,n,i,l,a);for(let f of c)s?process.stdout.write(f.toString()):await ln(f);Xo(c),ht.info(`Expanded comments in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(c)}).command("check <files..> [options]","Validate a Markdown file containing MDAT placeholder comments.",t=>t.positional(...Hl).option(Ui).option(oa).option(ra).option(zi).option($n),async({config:t,files:e,meta:r,prefix:n,rules:i,verbose:o})=>{ht.verbose=o??!1;let s=Jo(t,{addMetaComment:r,keywordPrefix:n}),a=await Zg(e,void 0,void 0,s,i);Xo(a),ht.info(`Checked comments in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(a)}).command("collapse <files..> [options]","Collapse MDAT placeholder comments.",t=>t.positional(...Hl).option(Ui).option(Zo).option(na).option(zi).option(ia).option($n),async({config:t,files:e,name:r,output:n,prefix:i,print:o,verbose:s})=>{ht.verbose=s??!1,Yl({name:r,output:n,print:o});let a=Jo(t,{keywordPrefix:i}),u=await Xg(e,void 0,void 0,a);for(let l of u)o?process.stdout.write(l.toString()):await ln(l);Xo(u),ht.info(`Cleaned comments in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(u)}).command("readme [command]","Work with MDAT comments in your readme.md.",t=>t.command(["$0 [files..] [options]","expand [files..] [options]"],"Expand MDAT comment placeholders in your readme.md using a collection of helpful built-in expansion rules.",e=>e.positional(...Kl).option(Ui).option(oa).option(Zo).option(na).option(Sd).option(Id).option(zi).option(ra).option(ia).option($n),async({assets:e,config:r,files:n,meta:i,name:o,output:s,package:a,prefix:u,print:l,rules:c,verbose:f})=>{ht.verbose=f??!1,Yl({name:o,output:s,print:l});let p=Jo(r,{addMetaComment:i,assetsPath:e,keywordPrefix:u,packageFile:a}),d=await Gl(n,o,s,p,c);for(let y of d)l?process.stdout.write(y.toString()):await ln(y);Xo(d);let{packageFile:m}=await _r();ht.info(`Pulled package metadata from: ${es.default.blue(es.default.bold(m))}`),ht.info(`Expanded readme(s) in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(d)}).command("check [files..] [options]","Validate MDAT placeholder comments in your readme.md.",e=>e.positional(...Kl).option(Ui).option(oa).option(Sd).option(Id).option(zi).option(ra).option($n),async({assets:e,config:r,files:n,meta:i,package:o,prefix:s,rules:a,verbose:u})=>{ht.verbose=u??!1;let l=Jo(r,{addMetaComment:i,assetsPath:e,keywordPrefix:s,packageFile:o}),c=await nk(n,void 0,void 0,l,a);Xo(c);let{packageFile:f}=await _r();ht.info(`Pulled package metadata from: ${es.default.blue(es.default.bold(f))}`),ht.info(`Checked readme(s) in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(c)}).command("collapse [files..] [options]","Collapse MDAT placeholder comments in your readme.md.",e=>e.positional(...Kl).option(Zo).option(na).option(ia).option(Ui).option(zi).option($n),async({config:e,files:r,name:n,output:i,prefix:o,print:s,verbose:a})=>{ht.verbose=a??!1,Yl({name:n,output:i,print:s});let u=Jo(e,{keywordPrefix:o}),l=await ik(r,void 0,void 0,u);for(let c of l)s?process.stdout.write(c.toString()):await ln(c);Xo(l),ht.info(`Cleaned readme(s) in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(l)}).command("init [options]","Interactively create a new readme.md file with sensible default MDAT comment placeholders.",e=>e.option(mk).option(gk).option(Zo).option(xk).option(yk).option(bk).option($n),async({compound:e,expand:r,interactive:n,output:i,overwrite:o,template:s,verbose:a})=>{if(ht.verbose=a??!1,n)await hk();else{let u=await _d({compound:e,expand:r,output:i,overwrite:o,template:s});ht.info(`Created readme at "${es.default.blue(u)}" in ${Gr(performance.now()-$i)}.`)}process.exitCode=0}),()=>{ht.error("Root MDAT readme command should be unreachable.")}).help().alias("h","help").version(Lh).alias("v","version").wrap(process.stdout.isTTY?Math.min(120,Ek.terminalWidth()):0).fail(!1).parse()}catch(t){t instanceof Error&&ht.error(t.message),process.exitCode=1}function Yl(t){t.print&&t.output&&ht.warn("Ignoring --output option because --print is set"),t.print&&t.name&&ht.warn("Ignoring --name option because --print is set")}function Jo(t,e){return[...Na(t),e]}function Qo(t){return $L(t).reduce((n,i)=>n+i.errors.length,0)>0?1:0}
|
|
511
|
+
`;var ji={"MDAT Readme":{content:{compound:sk,explicit:ak},description:"The house style. An expansive starting point. Prune to your context and taste.",exampleLink:"https://github.com/kitschpatrol/mdat/blob/main/readme.md"},"Standard Readme Basic":{content:{compound:uk,explicit:lk},description:'Includes only the "required" sections from the Standard Readme specification.',exampleLink:"https://github.com/RichardLitt/standard-readme/blob/main/example-readmes/minimal-readme.md"},"Standard Readme Full":{content:{compound:ck,explicit:fk},description:"Includes all sections from the Standard Readme specification.",exampleLink:"https://github.com/RichardLitt/standard-readme/blob/main/example-readmes/maximal-readme.md"}};async function hk(){let t=await Cd(),e=await Fa();return{packageDirectory:e===void 0?void 0:Wl.dirname(Wl.resolve(e)),readmePath:t}}async function mk(){let{packageDirectory:t,readmePath:e}=await hk(),r=Wl.resolve(process.cwd());PL(`Running ${$r.default.bold("mdat readme init")} interactively`);let n=await NL({overwrite:async()=>e===void 0||await pk({message:`Found an existing readme at "${$r.default.blue(e)}". Do you want to overwrite it?`,active:"Overwrite",inactive:"Exit"})?!0:(()=>{throw new Error("`mdat readme init` was cancelled to avoid an overwrite - no changes were made")})(),output:async()=>t!==void 0&&t!==r?Td({initialValue:t,message:"There's a root package directory nearby, do you want to create the readme there instead of the current directory?",options:[{label:`Create in the current package root: "${$r.default.blue(t)}"`,value:t},{label:`Create in current working directory: "${$r.default.blue(r)}"`,value:r}]}):r,template:async()=>Td({message:"Which template would you like to use?",options:UL()}),compound:async()=>Td({message:'Do you want to use "compound comments" where possible, which combine several expansions into a single comment block?',options:[{label:`Yes: Combine things like ${$r.default.green("<!-- title -->")} and ${$r.default.green("<!-- badges -->")} in a single ${$r.default.green("<!-- header -->")} comment.`,value:!0},{label:"No: Use individual MDAT expansion comments for each section.",value:!1}]}),expand:async()=>t===void 0?!1:pk({initialValue:!0,message:"Do you want to run `mdat readme` now to expand the template with content from your package.json?"})},{onCancel(){throw new Error("`mdat readme init` was cancelled - no changes were made")}}),i=await _d(n);return t===void 0&&dk("No package.json was found. Once you've created one, you can run `mdat readme` to expand the template with content from your package.json."),dk(`Readme created: "${$r.default.blue($r.default.bold(i))}"`),LL("Done!"),i}async function _d(t){let{packageDirectory:e}=await hk(),r=BL({compound:!0,output:e??process.cwd(),overwrite:!0,expand:e!==void 0,template:Object.keys(ji)[0]},t??{}),n=jL(r.template,r.compound),i=Wl.join(r.output,"readme.md");await ML.writeFile(i,n,"utf8");let[o]=await Gl(i);return await ln(o),i}function jL(t,e){let n=ji[t].content[e?"compound":"explicit"];if(n===void 0||n==="")throw new Error(`No template found for "${t}"`);return n}function UL(){return Object.entries(ji).map(([t,e])=>({label:t,hint:e.description,value:t}))}var Ui={config:{defaultDescription:"Configuration is loaded if found from the usual places, or defaults are used.",description:"Path(s) to files containing MDAT configuration.",string:!0,type:"array"}},ra={meta:{alias:"m",description:"Embed an extra comment at the top of the generated Markdown warning editors that certain sections of the document have been generated dynamically.",type:"boolean"}},na={name:{alias:"n",defaultDescription:"Same name as input file. Overwrites the input file.",description:"Output file name.",type:"string"}},Zo={output:{alias:"o",defaultDescription:"Same directory as input file.",description:"Output file directory.",type:"string"}},zi={prefix:{description:"Require a string prefix before all comments to be considered for expansion. Useful if you have a bunch of non-MDAT comments in your Markdown file, or if you're willing to trade some verbosity for safety.",type:"string"}},ia={print:{description:"Print the expanded Markdown to stdout instead of saving to a file. Ignores `--output` and `--name` options.",type:"boolean"}},oa={rules:{alias:"r",description:"Path(s) to files containing MDAT comment expansion rules.",string:!0,type:"array"}},$n={verbose:{describe:"Enable verbose logging. All verbose logs and prefixed with their log level and are printed to stderr for ease of redirection.",type:"boolean"}},Hl=["files",{array:!0,demandOption:!0,describe:"Markdown file(s) with MDAT placeholder comments.",type:"string"}];var Sd={package:{defaultDescription:"The closest package.json file is used by default.",description:"Path to the package.json file to use to populate the readme.",string:!0}},Id={assets:{defaultDescription:"./assets",description:"Path to find and save readme-related assets.",string:!0}},gk={interactive:{alias:"i",default:!0,description:"Run the guided interactive `init` process. Set explicitly to `false` to use default values and skip the prompt.",type:"boolean"}},xk={overwrite:{default:!1,defaultDescription:"`false`, if an existing readme is found, don't touch it.",description:"Replace an existing readme file if one is found.",type:"boolean"}},yk={expand:{alias:"e",default:!0,description:"Automatically run `mdat readme` immediately after creating the readme template.",type:"boolean"}},bk={template:{alias:"t",choices:Object.keys(ji),default:Object.keys(ji)[0],description:"Specify a template to use for the new readme.",type:"string"}},Ek={compound:{alias:"c",default:!0,description:"Use compound comment version of the template to replace several individual comment placeholders where possible. This combines things like `<!-- title -->`, `<!-- badges -->`, etc. in a single `<!-- header -->` comment. It's less clutter when you're editing, but it's also less explicit. The final readme.md output is identical.",type:"boolean"}},Kl=["files",{array:!0,demandOption:!1,describe:"Readme file(s) with MDAT placeholder comments. If not provided, the closest readme.md file is used.",type:"string"}];var $i=performance.now(),Ak=Ph(lc(process.argv));try{await Ak.scriptName("mdat").usage("$0 [command]","Work with MDAT placeholder comments in any Markdown file.").command(["$0 <files..> [options]","expand <files..> [options]"],"Expand MDAT placeholder comments.",t=>t.positional(...Hl).option(Ui).option(oa).option(Zo).option(na).option(ra).option(zi).option(ia).option($n),async({config:t,files:e,meta:r,name:n,output:i,prefix:o,print:s,rules:a,verbose:u})=>{ht.verbose=u??!1,Yl({name:n,output:i,print:s});let l=Jo(t,{addMetaComment:r,keywordPrefix:o}),c=await Yg(e,n,i,l,a);for(let f of c)s?process.stdout.write(f.toString()):await ln(f);Xo(c),ht.info(`Expanded comments in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(c)}).command("check <files..> [options]","Validate a Markdown file containing MDAT placeholder comments.",t=>t.positional(...Hl).option(Ui).option(oa).option(ra).option(zi).option($n),async({config:t,files:e,meta:r,prefix:n,rules:i,verbose:o})=>{ht.verbose=o??!1;let s=Jo(t,{addMetaComment:r,keywordPrefix:n}),a=await Zg(e,void 0,void 0,s,i);Xo(a),ht.info(`Checked comments in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(a)}).command("collapse <files..> [options]","Collapse MDAT placeholder comments.",t=>t.positional(...Hl).option(Ui).option(Zo).option(na).option(zi).option(ia).option($n),async({config:t,files:e,name:r,output:n,prefix:i,print:o,verbose:s})=>{ht.verbose=s??!1,Yl({name:r,output:n,print:o});let a=Jo(t,{keywordPrefix:i}),u=await Xg(e,void 0,void 0,a);for(let l of u)o?process.stdout.write(l.toString()):await ln(l);Xo(u),ht.info(`Cleaned comments in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(u)}).command("readme [command]","Work with MDAT comments in your readme.md.",t=>t.command(["$0 [files..] [options]","expand [files..] [options]"],"Expand MDAT comment placeholders in your readme.md using a collection of helpful built-in expansion rules.",e=>e.positional(...Kl).option(Ui).option(oa).option(Zo).option(na).option(Sd).option(Id).option(zi).option(ra).option(ia).option($n),async({assets:e,config:r,files:n,meta:i,name:o,output:s,package:a,prefix:u,print:l,rules:c,verbose:f})=>{ht.verbose=f??!1,Yl({name:o,output:s,print:l});let p=Jo(r,{addMetaComment:i,assetsPath:e,keywordPrefix:u,packageFile:a}),d=await Gl(n,o,s,p,c);for(let y of d)l?process.stdout.write(y.toString()):await ln(y);Xo(d);let{packageFile:m}=await _r();ht.info(`Pulled package metadata from: ${es.default.blue(es.default.bold(m))}`),ht.info(`Expanded readme(s) in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(d)}).command("check [files..] [options]","Validate MDAT placeholder comments in your readme.md.",e=>e.positional(...Kl).option(Ui).option(oa).option(Sd).option(Id).option(zi).option(ra).option($n),async({assets:e,config:r,files:n,meta:i,package:o,prefix:s,rules:a,verbose:u})=>{ht.verbose=u??!1;let l=Jo(r,{addMetaComment:i,assetsPath:e,keywordPrefix:s,packageFile:o}),c=await ik(n,void 0,void 0,l,a);Xo(c);let{packageFile:f}=await _r();ht.info(`Pulled package metadata from: ${es.default.blue(es.default.bold(f))}`),ht.info(`Checked readme(s) in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(c)}).command("collapse [files..] [options]","Collapse MDAT placeholder comments in your readme.md.",e=>e.positional(...Kl).option(Zo).option(na).option(ia).option(Ui).option(zi).option($n),async({config:e,files:r,name:n,output:i,prefix:o,print:s,verbose:a})=>{ht.verbose=a??!1,Yl({name:n,output:i,print:s});let u=Jo(e,{keywordPrefix:o}),l=await ok(r,void 0,void 0,u);for(let c of l)s?process.stdout.write(c.toString()):await ln(c);Xo(l),ht.info(`Cleaned readme(s) in ${Gr(performance.now()-$i)}.`),process.exitCode=Qo(l)}).command("init [options]","Interactively create a new readme.md file with sensible default MDAT comment placeholders.",e=>e.option(gk).option(xk).option(Zo).option(yk).option(bk).option(Ek).option($n),async({compound:e,expand:r,interactive:n,output:i,overwrite:o,template:s,verbose:a})=>{if(ht.verbose=a??!1,n)await mk();else{let u=await _d({compound:e,expand:r,output:i,overwrite:o,template:s});ht.info(`Created readme at "${es.default.blue(u)}" in ${Gr(performance.now()-$i)}.`)}process.exitCode=0}),()=>{ht.error("Root MDAT readme command should be unreachable.")}).help().alias("h","help").version(Lh).alias("v","version").wrap(process.stdout.isTTY?Math.min(120,Ak.terminalWidth()):0).fail(!1).parse()}catch(t){t instanceof Error&&ht.error(t.message),process.exitCode=1}function Yl(t){t.print&&t.output&&ht.warn("Ignoring --output option because --print is set"),t.print&&t.name&&ht.warn("Ignoring --name option because --print is set")}function Jo(t,e){return[...Na(t),e]}function Qo(t){return zL(t).reduce((n,i)=>n+i.errors.length,0)>0?1:0}
|
|
512
512
|
/*! Bundled license information:
|
|
513
513
|
|
|
514
514
|
yargs-parser/build/lib/string-utils.js:
|