mdat 0.10.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,65 +1,66 @@
1
- var Zy=Object.create;var ou=Object.defineProperty;var Yy=Object.getOwnPropertyDescriptor;var Xy=Object.getOwnPropertyNames;var Jy=Object.getPrototypeOf,Qy=Object.prototype.hasOwnProperty;var au=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),eE=(e,t)=>{for(var r in t)ou(e,r,{get:t[r],enumerable:!0})},tE=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xy(t))!Qy.call(e,i)&&i!==r&&ou(e,i,{get:()=>t[i],enumerable:!(n=Yy(t,i))||n.enumerable});return e};var mf=(e,t,r)=>(r=e!=null?Zy(Jy(e)):{},tE(t||!e||!e.__esModule?ou(r,"default",{value:e,enumerable:!0}):r,e));var wf=au((z1,xE)=>{xE.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 vf=au((j1,Sf)=>{"use strict";var yE=wf();Sf.exports=new Map(Object.entries(yE))});var mm=au((D2,pm)=>{"use strict";var Aa=Object.prototype.hasOwnProperty,fm=Object.prototype.toString,om=Object.defineProperty,am=Object.getOwnPropertyDescriptor,sm=function(t){return typeof Array.isArray=="function"?Array.isArray(t):fm.call(t)==="[object Array]"},um=function(t){if(!t||fm.call(t)!=="[object Object]")return!1;var r=Aa.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Aa.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||Aa.call(t,i)},lm=function(t,r){om&&r.name==="__proto__"?om(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},cm=function(t,r){if(r==="__proto__")if(Aa.call(t,r)){if(am)return am(t,r).value}else return;return t[r]};pm.exports=function e(){var t,r,n,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<l;++u)if(t=arguments[u],t!=null)for(r in t)n=cm(s,r),i=cm(t,r),s!==i&&(c&&i&&(um(i)||(o=sm(i)))?(o?(o=!1,a=n&&sm(n)?n:[]):a=n&&um(n)?n:{},lm(s,{name:r,newValue:e(c,a,i)})):typeof i<"u"&&lm(s,{name:r,newValue:i}));return s}});var df=(e=0)=>t=>`\x1B[${t+e}m`,hf=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,gf=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,be={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},v1=Object.keys(be.modifier),rE=Object.keys(be.color),nE=Object.keys(be.bgColor),_1=[...rE,...nE];function iE(){let e=new Map;for(let[t,r]of Object.entries(be)){for(let[n,i]of Object.entries(r))be[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=be[n],e.set(i[0],i[1]);Object.defineProperty(be,t,{value:r,enumerable:!1})}return Object.defineProperty(be,"codes",{value:e,enumerable:!1}),be.color.close="\x1B[39m",be.bgColor.close="\x1B[49m",be.color.ansi=df(),be.color.ansi256=hf(),be.color.ansi16m=gf(),be.bgColor.ansi=df(10),be.bgColor.ansi256=hf(10),be.bgColor.ansi16m=gf(10),Object.defineProperties(be,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>be.rgbToAnsi256(...be.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let s=t%36;r=Math.floor(t/36)/5,n=Math.floor(s/6)/5,i=s%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let a=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>be.ansi256ToAnsi(be.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>be.ansi256ToAnsi(be.hexToAnsi256(t)),enumerable:!1}}),be}var oE=iE(),Mt=oE;import su from"node:process";import aE from"node:os";import xf from"node:tty";function It(e,t=globalThis.Deno?globalThis.Deno.args:su.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:ve}=su,Vo;It("no-color")||It("no-colors")||It("color=false")||It("color=never")?Vo=0:(It("color")||It("colors")||It("color=true")||It("color=always"))&&(Vo=1);function sE(){if("FORCE_COLOR"in ve)return ve.FORCE_COLOR==="true"?1:ve.FORCE_COLOR==="false"?0:ve.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ve.FORCE_COLOR,10),3)}function uE(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function lE(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=sE();n!==void 0&&(Vo=n);let i=r?Vo:n;if(i===0)return 0;if(r){if(It("color=16m")||It("color=full")||It("color=truecolor"))return 3;if(It("color=256"))return 2}if("TF_BUILD"in ve&&"AGENT_NAME"in ve)return 1;if(e&&!t&&i===void 0)return 0;let o=i||0;if(ve.TERM==="dumb")return o;if(su.platform==="win32"){let a=aE.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in ve)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in ve)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in ve)||ve.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in ve)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ve.TEAMCITY_VERSION)?1:0;if(ve.COLORTERM==="truecolor"||ve.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in ve){let a=Number.parseInt((ve.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ve.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ve.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ve.TERM)||"COLORTERM"in ve?1:o}function yf(e,t={}){let r=lE(e,{streamIsTTY:e&&e.isTTY,...t});return uE(r)}var cE={stdout:yf({isTTY:xf.isatty(1)}),stderr:yf({isTTY:xf.isatty(2)})},Ef=cE;function bf(e,t,r){let n=e.indexOf(t);if(n===-1)return e;let i=t.length,o=0,a="";do a+=e.slice(o,n)+t+r,o=n+i,n=e.indexOf(t,o);while(n!==-1);return a+=e.slice(o),a}function kf(e,t,r,n){let i=0,o="";do{let a=e[n-1]==="\r";o+=e.slice(i,a?n-1:n)+t+(a?`\r
1
+ var eE=Object.create;var ou=Object.defineProperty;var tE=Object.getOwnPropertyDescriptor;var rE=Object.getOwnPropertyNames;var nE=Object.getPrototypeOf,iE=Object.prototype.hasOwnProperty;var au=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oE=(e,t)=>{for(var r in t)ou(e,r,{get:t[r],enumerable:!0})},aE=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of rE(t))!iE.call(e,i)&&i!==r&&ou(e,i,{get:()=>t[i],enumerable:!(n=tE(t,i))||n.enumerable});return e};var mf=(e,t,r)=>(r=e!=null?eE(nE(e)):{},aE(t||!e||!e.__esModule?ou(r,"default",{value:e,enumerable:!0}):r,e));var wf=au((V1,AE)=>{AE.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 vf=au((G1,Sf)=>{"use strict";var TE=wf();Sf.exports=new Map(Object.entries(TE))});var dm=au((L2,mm)=>{"use strict";var Aa=Object.prototype.hasOwnProperty,pm=Object.prototype.toString,am=Object.defineProperty,sm=Object.getOwnPropertyDescriptor,um=function(t){return typeof Array.isArray=="function"?Array.isArray(t):pm.call(t)==="[object Array]"},lm=function(t){if(!t||pm.call(t)!=="[object Object]")return!1;var r=Aa.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Aa.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||Aa.call(t,i)},cm=function(t,r){am&&r.name==="__proto__"?am(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},fm=function(t,r){if(r==="__proto__")if(Aa.call(t,r)){if(sm)return sm(t,r).value}else return;return t[r]};mm.exports=function e(){var t,r,n,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<l;++u)if(t=arguments[u],t!=null)for(r in t)n=fm(s,r),i=fm(t,r),s!==i&&(c&&i&&(lm(i)||(o=um(i)))?(o?(o=!1,a=n&&um(n)?n:[]):a=n&&lm(n)?n:{},cm(s,{name:r,newValue:e(c,a,i)})):typeof i<"u"&&cm(s,{name:r,newValue:i}));return s}});var df=(e=0)=>t=>`\x1B[${t+e}m`,hf=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,gf=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,be={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},D1=Object.keys(be.modifier),sE=Object.keys(be.color),uE=Object.keys(be.bgColor),F1=[...sE,...uE];function lE(){let e=new Map;for(let[t,r]of Object.entries(be)){for(let[n,i]of Object.entries(r))be[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=be[n],e.set(i[0],i[1]);Object.defineProperty(be,t,{value:r,enumerable:!1})}return Object.defineProperty(be,"codes",{value:e,enumerable:!1}),be.color.close="\x1B[39m",be.bgColor.close="\x1B[49m",be.color.ansi=df(),be.color.ansi256=hf(),be.color.ansi16m=gf(),be.bgColor.ansi=df(10),be.bgColor.ansi256=hf(10),be.bgColor.ansi16m=gf(10),Object.defineProperties(be,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>be.rgbToAnsi256(...be.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let s=t%36;r=Math.floor(t/36)/5,n=Math.floor(s/6)/5,i=s%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let a=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>be.ansi256ToAnsi(be.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>be.ansi256ToAnsi(be.hexToAnsi256(t)),enumerable:!1}}),be}var cE=lE(),Mt=cE;import su from"node:process";import fE from"node:os";import xf from"node:tty";function It(e,t=globalThis.Deno?globalThis.Deno.args:su.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:ve}=su,Vo;It("no-color")||It("no-colors")||It("color=false")||It("color=never")?Vo=0:(It("color")||It("colors")||It("color=true")||It("color=always"))&&(Vo=1);function pE(){if("FORCE_COLOR"in ve)return ve.FORCE_COLOR==="true"?1:ve.FORCE_COLOR==="false"?0:ve.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ve.FORCE_COLOR,10),3)}function mE(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function dE(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=pE();n!==void 0&&(Vo=n);let i=r?Vo:n;if(i===0)return 0;if(r){if(It("color=16m")||It("color=full")||It("color=truecolor"))return 3;if(It("color=256"))return 2}if("TF_BUILD"in ve&&"AGENT_NAME"in ve)return 1;if(e&&!t&&i===void 0)return 0;let o=i||0;if(ve.TERM==="dumb")return o;if(su.platform==="win32"){let a=fE.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in ve)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in ve)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in ve)||ve.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in ve)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ve.TEAMCITY_VERSION)?1:0;if(ve.COLORTERM==="truecolor"||ve.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in ve){let a=Number.parseInt((ve.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ve.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ve.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ve.TERM)||"COLORTERM"in ve?1:o}function yf(e,t={}){let r=dE(e,{streamIsTTY:e&&e.isTTY,...t});return mE(r)}var hE={stdout:yf({isTTY:xf.isatty(1)}),stderr:yf({isTTY:xf.isatty(2)})},Ef=hE;function bf(e,t,r){let n=e.indexOf(t);if(n===-1)return e;let i=t.length,o=0,a="";do a+=e.slice(o,n)+t+r,o=n+i,n=e.indexOf(t,o);while(n!==-1);return a+=e.slice(o),a}function kf(e,t,r,n){let i=0,o="";do{let a=e[n-1]==="\r";o+=e.slice(i,a?n-1:n)+t+(a?`\r
2
2
  `:`
3
3
  `)+r,i=n+1,n=e.indexOf(`
4
- `,i)}while(n!==-1);return o+=e.slice(i),o}var{stdout:Af,stderr:Tf}=Ef,uu=Symbol("GENERATOR"),Un=Symbol("STYLER"),Hi=Symbol("IS_EMPTY"),Cf=["ansi","ansi","ansi256","ansi16m"],zn=Object.create(null),fE=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Af?Af.level:0;e.level=t.level===void 0?r:t.level};var pE=e=>{let t=(...r)=>r.join(" ");return fE(t,e),Object.setPrototypeOf(t,Wi.prototype),t};function Wi(e){return pE(e)}Object.setPrototypeOf(Wi.prototype,Function.prototype);for(let[e,t]of Object.entries(Mt))zn[e]={get(){let r=Go(this,cu(t.open,t.close,this[Un]),this[Hi]);return Object.defineProperty(this,e,{value:r}),r}};zn.visible={get(){let e=Go(this,this[Un],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var lu=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?Mt[r].ansi16m(...n):t==="ansi256"?Mt[r].ansi256(Mt.rgbToAnsi256(...n)):Mt[r].ansi(Mt.rgbToAnsi(...n)):e==="hex"?lu("rgb",t,r,...Mt.hexToRgb(...n)):Mt[r][e](...n),mE=["rgb","hex","ansi256"];for(let e of mE){zn[e]={get(){let{level:r}=this;return function(...n){let i=cu(lu(e,Cf[r],"color",...n),Mt.color.close,this[Un]);return Go(this,i,this[Hi])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);zn[t]={get(){let{level:r}=this;return function(...n){let i=cu(lu(e,Cf[r],"bgColor",...n),Mt.bgColor.close,this[Un]);return Go(this,i,this[Hi])}}}}var dE=Object.defineProperties(()=>{},{...zn,level:{enumerable:!0,get(){return this[uu].level},set(e){this[uu].level=e}}}),cu=(e,t,r)=>{let n,i;return r===void 0?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},Go=(e,t,r)=>{let n=(...i)=>hE(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,dE),n[uu]=e,n[Un]=t,n[Hi]=r,n},hE=(e,t)=>{if(e.level<=0||!t)return e[Hi]?"":t;let r=e[Un];if(r===void 0)return t;let{openAll:n,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=bf(t,r.close,r.open),r=r.parent;let o=t.indexOf(`
5
- `);return o!==-1&&(t=kf(t,i,n,o)),n+t+i};Object.defineProperties(Wi.prototype,zn);var gE=Wi(),B1=Wi({level:Tf?Tf.level:0});var fu=gE;import{cosmiconfig as Zf}from"cosmiconfig";import{TypeScriptLoader as Yf}from"cosmiconfig-typescript-loader";import zb from"node:fs/promises";import Qf from"node:path";var pu=mf(vf(),1);function mu(e,t,r){if(typeof t=="number"&&(r=t),pu.default.has(e.toLowerCase())){t=pu.default.get(e.toLowerCase());let n=e.charAt(0);n===n.toUpperCase()&&(t=n+t.slice(1)),e===e.toUpperCase()&&(t=t.toUpperCase())}else typeof t!="string"&&(t=(e.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,n=>e.slice(-1)===e.slice(-1).toLowerCase()?n.toLowerCase():n.toUpperCase()));return Math.abs(r)===1?e:t}import{readPackage as jb}from"read-pkg";import{deepMergeDefined as Qo,log as Ft,optionsSchema as $b,rulesSchema as qb}from"remark-mdat";var oe;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},e.getValidEnumValues=i=>{let o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(let a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(oe||(oe={}));var hu;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(hu||(hu={}));var F=oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fr=e=>{switch(typeof e){case"undefined":return F.undefined;case"string":return F.string;case"number":return isNaN(e)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":return Array.isArray(e)?F.array:e===null?F.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?F.promise:typeof Map<"u"&&e instanceof Map?F.map:typeof Set<"u"&&e instanceof Set?F.set:typeof Date<"u"&&e instanceof Date?F.date:F.object;default:return F.unknown}},w=oe.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"]),EE=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),At=class e extends Error{get errors(){return this.issues}constructor(t){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=t}format(t){let r=t||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,u=0;for(;u<a.path.length;){let l=a.path[u];u===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};At.create=e=>new At(e);var qn=(e,t)=>{let r;switch(e.code){case w.invalid_type:e.received===F.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,oe.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:r=`Unrecognized key(s) in object: ${oe.joinValues(e.keys,", ")}`;break;case w.invalid_union:r="Invalid input";break;case w.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${oe.joinValues(e.options)}`;break;case w.invalid_enum_value:r=`Invalid enum value. Expected ${oe.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:r="Invalid function arguments";break;case w.invalid_return_type:r="Invalid function return type";break;case w.invalid_date:r="Invalid date";break;case w.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:oe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case w.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case w.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case w.custom:r="Invalid input";break;case w.invalid_intersection_types:r="Intersection results could not be merged";break;case w.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:r="Number must be finite";break;default:r=t.defaultError,oe.assertNever(e)}return{message:r}},Rf=qn;function bE(e){Rf=e}function Ho(){return Rf}var Wo=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="",u=n.filter(l=>!!l).slice().reverse();for(let l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},kE=[];function I(e,t){let r=Ho(),n=Wo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===qn?void 0:qn].filter(i=>!!i)});e.common.issues.push(n)}var Je=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let i of r){if(i.status==="aborted")return q;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return q;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:t.value,value:n}}},q=Object.freeze({status:"aborted"}),$n=e=>({status:"dirty",value:e}),at=e=>({status:"valid",value:e}),gu=e=>e.status==="aborted",xu=e=>e.status==="dirty",Xr=e=>e.status==="valid",Yi=e=>typeof Promise<"u"&&e instanceof Promise;function Ko(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Df(e,t,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 t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}var M;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(M||(M={}));var Ki,Zi,Dt=class{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},_f=(e,t)=>{if(Xr(t))return{success:!0,data:t.value};if(!e.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 At(e.common.issues);return this._error=r,this._error}}};function K(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??n)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??r)!==null&&l!==void 0?l:s.defaultError}},description:i}}var Z=class{get description(){return this._def.description}_getType(t){return fr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:fr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Je,ctx:{common:t.parent.common,data:t.data,parsedType:fr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Yi(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fr(t)},o=this._parseSync({data:t,path:i.path,parent:i});return _f(i,o)}"~validate"(t){var r,n;let i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fr(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:i});return Xr(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((n=(r=o?.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Xr(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fr(t)},i=this._parse({data:t,path:n.path,parent:n}),o=await(Yi(i)?i:Promise.resolve(i));return _f(n,o)}refine(t,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=t(i),s=()=>o.addIssue({code:w.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Tt({schema:this,typeName:$.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 Rt.create(this,this._def)}nullable(){return Gt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return mr.create(this)}promise(){return vr.create(this,this._def)}or(t){return on.create([this,t],this._def)}and(t){return an.create(this,t,this._def)}transform(t){return new Tt({...K(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new fn({...K(this._def),innerType:this,defaultValue:r,typeName:$.ZodDefault})}brand(){return new Xi({typeName:$.ZodBranded,type:this,...K(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new pn({...K(this._def),innerType:this,catchValue:r,typeName:$.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ji.create(this,t)}readonly(){return mn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},AE=/^c[^\s-]{8,}$/i,TE=/^[0-9a-z]+$/,CE=/^[0-9A-HJKMNP-TV-Z]{26}$/i,wE=/^[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,SE=/^[a-z0-9_-]{21}$/i,vE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_E=/^[-+]?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)?)??$/,IE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,RE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",du,DE=/^(?:(?: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])$/,FE=/^(?:(?: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])$/,OE=/^(([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]))$/,NE=/^(([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])$/,LE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,PE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ff="((\\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])))",ME=new RegExp(`^${Ff}$`);function Of(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function BE(e){return new RegExp(`^${Of(e)}$`)}function Nf(e){let t=`${Ff}T${Of(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function UE(e,t){return!!((t==="v4"||!t)&&DE.test(e)||(t==="v6"||!t)&&OE.test(e))}function zE(e,t){if(!vE.test(e))return!1;try{let[r]=e.split("."),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||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function jE(e,t){return!!((t==="v4"||!t)&&FE.test(e)||(t==="v6"||!t)&&NE.test(e))}var wr=class e extends Z{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==F.string){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.string,received:o.parsedType}),q}let n=new Je,i;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?I(i,{code:w.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&I(i,{code:w.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")IE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"email",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")du||(du=new RegExp(RE,"u")),du.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"emoji",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")wE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"uuid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")SE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"nanoid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")AE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cuid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")TE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cuid2",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")CE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"ulid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),I(i,{validation:"url",code:w.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"regex",code:w.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Nf(o).test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?ME.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?BE(o).test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?_E.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"duration",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?UE(t.data,o.version)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"ip",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?zE(t.data,o.alg)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"jwt",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?jE(t.data,o.version)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cidr",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?LE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"base64",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?PE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"base64url",code:w.invalid_string,message:o.message}),n.dirty()):oe.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:w.invalid_string,...M.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...M.errToObj(t)})}url(t){return this._addCheck({kind:"url",...M.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...M.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...M.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...M.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...M.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...M.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...M.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...M.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...M.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...M.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...M.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...M.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,local:(n=t?.local)!==null&&n!==void 0?n:!1,...M.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...M.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...M.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...M.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...M.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...M.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...M.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...M.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...M.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...M.errToObj(r)})}nonempty(t){return this.min(1,M.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};wr.create=e=>{var t;return new wr({checks:[],typeName:$.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...K(e)})};function $E(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}var Jr=class e extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==F.number){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.number,received:o.parsedType}),q}let n,i=new Je;for(let o of this._def.checks)o.kind==="int"?oe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),I(n,{code:w.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?$E(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_finite,message:o.message}),i.dirty()):oe.assertNever(o);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,M.toString(r))}gt(t,r){return this.setLimit("min",t,!1,M.toString(r))}lte(t,r){return this.setLimit("max",t,!0,M.toString(r))}lt(t,r){return this.setLimit("max",t,!1,M.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:M.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:M.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:M.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:M.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:M.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:M.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:M.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:M.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:M.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:M.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&oe.isInteger(t.value))}get isFinite(){let t=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"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Jr.create=e=>new Jr({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...K(e)});var Qr=class e extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==F.bigint)return this._getInvalidInput(t);let n,i=new Je;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):oe.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return I(r,{code:w.invalid_type,expected:F.bigint,received:r.parsedType}),q}gte(t,r){return this.setLimit("min",t,!0,M.toString(r))}gt(t,r){return this.setLimit("min",t,!1,M.toString(r))}lte(t,r){return this.setLimit("max",t,!0,M.toString(r))}lt(t,r){return this.setLimit("max",t,!1,M.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:M.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:M.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:M.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:M.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:M.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:M.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Qr.create=e=>{var t;return new Qr({checks:[],typeName:$.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...K(e)})};var en=class extends Z{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==F.boolean){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.boolean,received:n.parsedType}),q}return at(t.data)}};en.create=e=>new en({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...K(e)});var tn=class e extends Z{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==F.date){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.date,received:o.parsedType}),q}if(isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_date}),q}let n=new Je,i;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):oe.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:M.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:M.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};tn.create=e=>new tn({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...K(e)});var Vn=class extends Z{_parse(t){if(this._getType(t)!==F.symbol){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.symbol,received:n.parsedType}),q}return at(t.data)}};Vn.create=e=>new Vn({typeName:$.ZodSymbol,...K(e)});var rn=class extends Z{_parse(t){if(this._getType(t)!==F.undefined){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.undefined,received:n.parsedType}),q}return at(t.data)}};rn.create=e=>new rn({typeName:$.ZodUndefined,...K(e)});var nn=class extends Z{_parse(t){if(this._getType(t)!==F.null){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.null,received:n.parsedType}),q}return at(t.data)}};nn.create=e=>new nn({typeName:$.ZodNull,...K(e)});var Sr=class extends Z{constructor(){super(...arguments),this._any=!0}_parse(t){return at(t.data)}};Sr.create=e=>new Sr({typeName:$.ZodAny,...K(e)});var pr=class extends Z{constructor(){super(...arguments),this._unknown=!0}_parse(t){return at(t.data)}};pr.create=e=>new pr({typeName:$.ZodUnknown,...K(e)});var Bt=class extends Z{_parse(t){let r=this._getOrReturnCtx(t);return I(r,{code:w.invalid_type,expected:F.never,received:r.parsedType}),q}};Bt.create=e=>new Bt({typeName:$.ZodNever,...K(e)});var Gn=class extends Z{_parse(t){if(this._getType(t)!==F.undefined){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.void,received:n.parsedType}),q}return at(t.data)}};Gn.create=e=>new Gn({typeName:$.ZodVoid,...K(e)});var mr=class e extends Z{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==F.array)return I(r,{code:w.invalid_type,expected:F.array,received:r.parsedType}),q;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(I(r,{code:a?w.too_big:w.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?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&&(I(r,{code:w.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&&(I(r,{code:w.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((a,s)=>i.type._parseAsync(new Dt(r,a,r.path,s)))).then(a=>Je.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new Dt(r,a,r.path,s)));return Je.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:M.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:M.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:M.toString(r)}})}nonempty(t){return this.min(1,t)}};mr.create=(e,t)=>new mr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...K(t)});function jn(e){if(e instanceof dt){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Rt.create(jn(n))}return new dt({...e._def,shape:()=>t})}else return e instanceof mr?new mr({...e._def,type:jn(e.element)}):e instanceof Rt?Rt.create(jn(e.unwrap())):e instanceof Gt?Gt.create(jn(e.unwrap())):e instanceof Vt?Vt.create(e.items.map(t=>jn(t))):e}var dt=class e extends Z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=oe.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==F.object){let l=this._getOrReturnCtx(t);return I(l,{code:w.invalid_type,expected:F.object,received:l.parsedType}),q}let{status:n,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Bt&&this._def.unknownKeys==="strip"))for(let l in i.data)a.includes(l)||s.push(l);let u=[];for(let l of a){let c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Dt(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Bt){let l=this._def.unknownKeys;if(l==="passthrough")for(let c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(I(i,{code:w.unrecognized_keys,keys:s}),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 s){let f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Dt(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=>Je.mergeObjectSync(n,l)):Je.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return M.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,o,a,s;let u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=M.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return oe.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}deepPartial(){return jn(this)}partial(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Rt;)o=o._def.innerType;r[n]=o}}),new e({...this._def,shape:()=>r})}keyof(){return Lf(oe.objectKeys(this.shape))}};dt.create=(e,t)=>new dt({shape:()=>e,unknownKeys:"strip",catchall:Bt.create(),typeName:$.ZodObject,...K(t)});dt.strictCreate=(e,t)=>new dt({shape:()=>e,unknownKeys:"strict",catchall:Bt.create(),typeName:$.ZodObject,...K(t)});dt.lazycreate=(e,t)=>new dt({shape:e,unknownKeys:"strip",catchall:Bt.create(),typeName:$.ZodObject,...K(t)});var on=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new At(s.ctx.common.issues));return I(r,{code:w.invalid_union,unionErrors:a}),q}if(r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];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&&a.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(u=>new At(u));return I(r,{code:w.invalid_union,unionErrors:s}),q}}get options(){return this._def.options}};on.create=(e,t)=>new on({options:e,typeName:$.ZodUnion,...K(t)});var cr=e=>e instanceof sn?cr(e.schema):e instanceof Tt?cr(e.innerType()):e instanceof un?[e.value]:e instanceof ln?e.options:e instanceof cn?oe.objectValues(e.enum):e instanceof fn?cr(e._def.innerType):e instanceof rn?[void 0]:e instanceof nn?[null]:e instanceof Rt?[void 0,...cr(e.unwrap())]:e instanceof Gt?[null,...cr(e.unwrap())]:e instanceof Xi||e instanceof mn?cr(e.unwrap()):e instanceof pn?cr(e._def.innerType):[],Zo=class e extends Z{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.object)return I(r,{code:w.invalid_type,expected:F.object,received:r.parsedType}),q;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}):(I(r,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),q)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let i=new Map;for(let o of r){let a=cr(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...K(n)})}};function yu(e,t){let r=fr(e),n=fr(t);if(e===t)return{valid:!0,data:e};if(r===F.object&&n===F.object){let i=oe.objectKeys(t),o=oe.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(let s of o){let u=yu(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(r===F.array&&n===F.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let o=0;o<e.length;o++){let a=e[o],s=t[o],u=yu(a,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===F.date&&n===F.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var an=class extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=(o,a)=>{if(gu(o)||gu(a))return q;let s=yu(o.value,a.value);return s.valid?((xu(o)||xu(a))&&r.dirty(),{status:r.value,value:s.data}):(I(n,{code:w.invalid_intersection_types}),q)};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,a])=>i(o,a)):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}))}};an.create=(e,t,r)=>new an({left:e,right:t,typeName:$.ZodIntersection,...K(r)});var Vt=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.array)return I(n,{code:w.invalid_type,expected:F.array,received:n.parsedType}),q;if(n.data.length<this._def.items.length)return I(n,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q;!this._def.rest&&n.data.length>this._def.items.length&&(I(n,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((a,s)=>{let u=this._def.items[s]||this._def.rest;return u?u._parse(new Dt(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>Je.mergeArray(r,a)):Je.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Vt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vt({items:e,typeName:$.ZodTuple,rest:null,...K(t)})};var Yo=class e extends Z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.object)return I(n,{code:w.invalid_type,expected:F.object,received:n.parsedType}),q;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new Dt(n,s,n.path,s)),value:a._parse(new Dt(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Je.mergeObjectAsync(r,i):Je.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Z?new e({keyType:t,valueType:r,typeName:$.ZodRecord,...K(n)}):new e({keyType:wr.create(),valueType:t,typeName:$.ZodRecord,...K(r)})}},Hn=class extends Z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.map)return I(n,{code:w.invalid_type,expected:F.map,received:n.parsedType}),q;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,u],l)=>({key:i._parse(new Dt(n,s,n.path,[l,"key"])),value:o._parse(new Dt(n,u,n.path,[l,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let u of a){let l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return q;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let u of a){let l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return q;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}}}};Hn.create=(e,t,r)=>new Hn({valueType:t,keyType:e,typeName:$.ZodMap,...K(r)});var Wn=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.set)return I(n,{code:w.invalid_type,expected:F.set,received:n.parsedType}),q;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(I(n,{code:w.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&&(I(n,{code:w.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(u){let l=new Set;for(let c of u){if(c.status==="aborted")return q;c.status==="dirty"&&r.dirty(),l.add(c.value)}return{status:r.value,value:l}}let s=[...n.data.values()].map((u,l)=>o._parse(new Dt(n,u,n.path,l)));return n.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:M.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:M.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Wn.create=(e,t)=>new Wn({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...K(t)});var Xo=class e extends Z{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.function)return I(r,{code:w.invalid_type,expected:F.function,received:r.parsedType}),q;function n(s,u){return Wo({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ho(),qn].filter(l=>!!l),issueData:{code:w.invalid_arguments,argumentsError:u}})}function i(s,u){return Wo({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ho(),qn].filter(l=>!!l),issueData:{code:w.invalid_return_type,returnTypeError:u}})}let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof vr){let s=this;return at(async function(...u){let l=new At([]),c=await s._def.args.parseAsync(u,o).catch(m=>{throw l.addIssue(n(u,m)),l}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,o).catch(m=>{throw l.addIssue(i(f,m)),l})})}else{let s=this;return at(function(...u){let l=s._def.args.safeParse(u,o);if(!l.success)throw new At([n(u,l.error)]);let c=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(c,o);if(!f.success)throw new At([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Vt.create(t).rest(pr.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Vt.create([]).rest(pr.create()),returns:r||pr.create(),typeName:$.ZodFunction,...K(n)})}},sn=class extends Z{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};sn.create=(e,t)=>new sn({getter:e,typeName:$.ZodLazy,...K(t)});var un=class extends Z{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return I(r,{received:r.data,code:w.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:t.data}}get value(){return this._def.value}};un.create=(e,t)=>new un({value:e,typeName:$.ZodLiteral,...K(t)});function Lf(e,t){return new ln({values:e,typeName:$.ZodEnum,...K(t)})}var ln=class e extends Z{constructor(){super(...arguments),Ki.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return I(r,{expected:oe.joinValues(n),received:r.parsedType,code:w.invalid_type}),q}if(Ko(this,Ki,"f")||Df(this,Ki,new Set(this._def.values),"f"),!Ko(this,Ki,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return I(r,{received:r.data,code:w.invalid_enum_value,options:n}),q}return at(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Ki=new WeakMap;ln.create=Lf;var cn=class extends Z{constructor(){super(...arguments),Zi.set(this,void 0)}_parse(t){let r=oe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==F.string&&n.parsedType!==F.number){let i=oe.objectValues(r);return I(n,{expected:oe.joinValues(i),received:n.parsedType,code:w.invalid_type}),q}if(Ko(this,Zi,"f")||Df(this,Zi,new Set(oe.getValidEnumValues(this._def.values)),"f"),!Ko(this,Zi,"f").has(t.data)){let i=oe.objectValues(r);return I(n,{received:n.data,code:w.invalid_enum_value,options:i}),q}return at(t.data)}get enum(){return this._def.values}};Zi=new WeakMap;cn.create=(e,t)=>new cn({values:e,typeName:$.ZodNativeEnum,...K(t)});var vr=class extends Z{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.promise&&r.common.async===!1)return I(r,{code:w.invalid_type,expected:F.promise,received:r.parsedType}),q;let n=r.parsedType===F.promise?r.data:Promise.resolve(r.data);return at(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};vr.create=(e,t)=>new vr({type:e,typeName:$.ZodPromise,...K(t)});var Tt=class extends Z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{I(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return q;let u=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return u.status==="aborted"?q:u.status==="dirty"||r.value==="dirty"?$n(u.value):u});{if(r.value==="aborted")return q;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?q:s.status==="dirty"||r.value==="dirty"?$n(s.value):s}}if(i.type==="refinement"){let a=s=>{let u=i.refinement(s,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 s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Xr(a))return a;let s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Xr(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):a);oe.assertNever(i)}};Tt.create=(e,t,r)=>new Tt({schema:e,typeName:$.ZodEffects,effect:t,...K(r)});Tt.createWithPreprocess=(e,t,r)=>new Tt({schema:t,effect:{type:"preprocess",transform:e},typeName:$.ZodEffects,...K(r)});var Rt=class extends Z{_parse(t){return this._getType(t)===F.undefined?at(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Rt.create=(e,t)=>new Rt({innerType:e,typeName:$.ZodOptional,...K(t)});var Gt=class extends Z{_parse(t){return this._getType(t)===F.null?at(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Gt.create=(e,t)=>new Gt({innerType:e,typeName:$.ZodNullable,...K(t)});var fn=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===F.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};fn.create=(e,t)=>new fn({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...K(t)});var pn=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Yi(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new At(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new At(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};pn.create=(e,t)=>new pn({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...K(t)});var Kn=class extends Z{_parse(t){if(this._getType(t)!==F.nan){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.nan,received:n.parsedType}),q}return{status:"valid",value:t.data}}};Kn.create=e=>new Kn({typeName:$.ZodNaN,...K(e)});var qE=Symbol("zod_brand"),Xi=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Ji=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);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"?q:o.status==="dirty"?(r.dirty(),$n(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"?q:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:$.ZodPipeline})}},mn=class extends Z{_parse(t){let r=this._def.innerType._parse(t),n=i=>(Xr(i)&&(i.value=Object.freeze(i.value)),i);return Yi(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};mn.create=(e,t)=>new mn({innerType:e,typeName:$.ZodReadonly,...K(t)});function Pf(e,t={},r){return e?Sr.create().superRefine((n,i)=>{var o,a;if(!e(n)){let s=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:r)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):Sr.create()}var VE={object:dt.lazycreate},$;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})($||($={}));var GE=(e,t={message:`Input not instance of ${e.name}`})=>Pf(r=>r instanceof e,t),Mf=wr.create,Bf=Jr.create,HE=Kn.create,WE=Qr.create,Uf=en.create,KE=tn.create,ZE=Vn.create,YE=rn.create,XE=nn.create,JE=Sr.create,QE=pr.create,eb=Bt.create,tb=Gn.create,rb=mr.create,nb=dt.create,ib=dt.strictCreate,ob=on.create,ab=Zo.create,sb=an.create,ub=Vt.create,lb=Yo.create,cb=Hn.create,fb=Wn.create,pb=Xo.create,mb=sn.create,db=un.create,hb=ln.create,gb=cn.create,xb=vr.create,If=Tt.create,yb=Rt.create,Eb=Gt.create,bb=Tt.createWithPreprocess,kb=Ji.create,Ab=()=>Mf().optional(),Tb=()=>Bf().optional(),Cb=()=>Uf().optional(),wb={string:e=>wr.create({...e,coerce:!0}),number:e=>Jr.create({...e,coerce:!0}),boolean:e=>en.create({...e,coerce:!0}),bigint:e=>Qr.create({...e,coerce:!0}),date:e=>tn.create({...e,coerce:!0})},Sb=q,L=Object.freeze({__proto__:null,defaultErrorMap:qn,setErrorMap:bE,getErrorMap:Ho,makeIssue:Wo,EMPTY_PATH:kE,addIssueToContext:I,ParseStatus:Je,INVALID:q,DIRTY:$n,OK:at,isAborted:gu,isDirty:xu,isValid:Xr,isAsync:Yi,get util(){return oe},get objectUtil(){return hu},ZodParsedType:F,getParsedType:fr,ZodType:Z,datetimeRegex:Nf,ZodString:wr,ZodNumber:Jr,ZodBigInt:Qr,ZodBoolean:en,ZodDate:tn,ZodSymbol:Vn,ZodUndefined:rn,ZodNull:nn,ZodAny:Sr,ZodUnknown:pr,ZodNever:Bt,ZodVoid:Gn,ZodArray:mr,ZodObject:dt,ZodUnion:on,ZodDiscriminatedUnion:Zo,ZodIntersection:an,ZodTuple:Vt,ZodRecord:Yo,ZodMap:Hn,ZodSet:Wn,ZodFunction:Xo,ZodLazy:sn,ZodLiteral:un,ZodEnum:ln,ZodNativeEnum:cn,ZodPromise:vr,ZodEffects:Tt,ZodTransformer:Tt,ZodOptional:Rt,ZodNullable:Gt,ZodDefault:fn,ZodCatch:pn,ZodNaN:Kn,BRAND:qE,ZodBranded:Xi,ZodPipeline:Ji,ZodReadonly:mn,custom:Pf,Schema:Z,ZodSchema:Z,late:VE,get ZodFirstPartyTypeKind(){return $},coerce:wb,any:JE,array:rb,bigint:WE,boolean:Uf,date:KE,discriminatedUnion:ab,effect:If,enum:hb,function:pb,instanceof:GE,intersection:sb,lazy:mb,literal:db,map:cb,nan:HE,nativeEnum:gb,never:eb,null:XE,nullable:Eb,number:Bf,object:nb,oboolean:Cb,onumber:Tb,optional:yb,ostring:Ab,pipeline:kb,preprocess:bb,promise:xb,record:lb,set:fb,strictObject:ib,string:Mf,symbol:ZE,transformer:If,tuple:ub,undefined:YE,union:ob,unknown:QE,void:tb,NEVER:Sb,ZodIssueCode:w,quotelessJson:EE,ZodError:At});import{defaultLoaders as vb}from"cosmiconfig";function Eu(e,t){let r=vb[".json"],n=r(e,t);return zf(n)}function zf(e,t="",r={}){for(let[n,i]of Object.entries(e)){let o=t?`${t}.${n}`:n;typeof i=="object"&&i!==null&&!Array.isArray(i)?zf(i,o,r):i===null?r[o]="null":r[o]=i.toString()}return r}import Pb from"node:fs";import dr from"node:path";import Fb from"node:process";import _b from"node:process";import Ib from"node:fs/promises";import{fileURLToPath as Rb}from"node:url";import Zn from"node:path";var jf=e=>e instanceof URL?Rb(e):e;async function Jo(e,{cwd:t=_b.cwd(),type:r="file",stopAt:n}={}){let i=Zn.resolve(jf(t)??""),{root:o}=Zn.parse(i);for(n=Zn.resolve(i,jf(n??o));i&&i!==n&&i!==o;){let a=Zn.isAbsolute(e)?e:Zn.join(i,e);try{let s=await Ib.stat(a);if(r==="file"&&s.isFile()||r==="directory"&&s.isDirectory())return a}catch{}i=Zn.dirname(i)}}async function $f({cwd:e=Fb.cwd()}={}){return Jo("package.json",{cwd:e})}import Ob from"node:fs";import Nb from"node:fs/promises";async function bu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await Nb[e](r))[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function ku(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return Ob[e](r)[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var Yn=bu.bind(void 0,"stat","isFile"),rO=bu.bind(void 0,"stat","isDirectory"),nO=bu.bind(void 0,"lstat","isSymbolicLink"),Au=ku.bind(void 0,"statSync","isFile"),iO=ku.bind(void 0,"statSync","isDirectory"),oO=ku.bind(void 0,"lstatSync","isSymbolicLink");import{log as Vf}from"remark-mdat";import{Configuration as Mb}from"unified-engine";import Lb from"node:os";var qf=Lb.homedir();function Tu(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return qf?e.replace(/^~(?=$|\/|\\)/,qf):e}function Bb(e,t){let r=t===0?1:Math.floor(Math.log10(Math.abs(t))+1);return e.toString().padStart(r,"0")}function Hf(e,t,r,n){let i=[];for(let[o,a]of e.entries()){let s=r&&e.length>1?`-${Bb(o+1,e.length+1)}`:"",u=Ub(a,t,r,n,s);i.push(u)}return i}function Ub(e,t,r,n,i=""){let o=Gf(e),a=t?Gf(t):void 0;if(!Au(o))throw new Error(`Input file not found: "${o}"`);if(a){if(Au(a))throw new Error(`Output path must be a directory, received a file path: "${a}"`);Pb.mkdirSync(a,{recursive:!0})}let s=r?dr.basename(r,dr.extname(r)):dr.basename(o,dr.extname(o)),u=`.${n??(r&&dr.extname(r)!==""?dr.extname(r):dr.extname(e)===""?"":dr.extname(e))}`,l=`${s}${i}${u}`,c=a??dr.dirname(o);return{input:o,name:l,output:c}}function Gf(e){return Tu(e)}async function Wf(){return $f()}function Kf(e){return e==null?[]:Array.isArray(e)?e:[e]}async function Cu(){let e=new Mb({cwd:process.cwd(),detectConfig:!0,packageField:"remarkConfig",rcName:".remarkrc"}),t=await new Promise(r=>{e.load("",(n,i)=>{if(n){console.error(n),r();return}r(i)})});if(t){let{filePath:r}=t;return r===void 0?Vf.info('No ambient Remark configuration file found"'):Vf.info(`Found and loaded ambient Remark configuration from "${r}"`),t}throw new Error("Failed to load ambient remark configuration")}var Xf=$b.merge(L.object({assetsPath:L.string().optional(),packageFile:L.string().optional()})).describe("Config Extension");async function Ut(e){let{additionalConfig:t,additionalRules:r,searchFrom:n}=e??{},i={addMetaComment:!1,assetsPath:"./assets",closingPrefix:"/",keywordPrefix:"",metaCommentIdentifier:"+",packageFile:await Wf(),rules:{mdat:"Powered by the Markdown Autophagic Template system: [mdat](https://github.com/kitschpatrol/mdat)."}},o=Zf("mdat",{loaders:{".ts":Yf()}}),a=await o.search(n);if(a){let{config:s,filepath:u}=a,l=s;if(Ft.info(`Using config from "${u}"`),u.endsWith("package.json")&&typeof s=="string"){Ft.info(`Detected shared config string: "${s}"`);let{default:f}=await import(s);l=f}let c=Jf(l,Xf);c&&(i=Qo(i,c))}if(t!==void 0){let s=Array.isArray(t)?t:[t];for(let u of s){let l;if(typeof u=="string"){let f=await o.load(u);if(f==null)continue;let{config:p,filepath:m}=f;Ft.info(`Loaded additional config from "${m}"`),l=p}else l=u;if(l===void 0)continue;Ft.info("Merging configuration object");let c=Jf(l,Xf);c!==void 0&&(i=Qo(i,c))}}if(r!==void 0){let s=Array.isArray(r)?r:[r],u=Zf("mdat",{loaders:{".json":Eu,".ts":Yf()}});for(let l of s){let c;if(typeof l=="string"){let p;if(Qf.basename(l).endsWith("package.json")){let E=await zb.readFile(l,"utf8");p={config:Eu(l,E),filepath:l}}else p=await u.load(l);if(p==null)continue;let{config:m,filepath:h}=p;Ft.info(`Loaded additional config from "${h}"`),c=m}else c=l;if(c===void 0)continue;Ft.info("Merging rules into configuration object");let f=Vb(c,qb);f!==void 0&&(i=Qo(i,f))}}if(i.rules){let s=Object.keys(i.rules).sort().map(u=>`"${fu.bold.green(u)}"`);Ft.info(`Loaded ${fu.bold(s.length)} mdat comment expansion ${mu("rule",s.length)}:`);for(let u of s)Ft.info(` ${u}`)}else Ft.error("No rules loaded from additional configurations or rules, using default.");return ea=i,i}function Vb(e,t){if(t.safeParse(e).success)return{rules:e};Ft.error(`Rules object has the wrong shape. Ignoring and using default configuration:
6
- ${JSON.stringify(e,void 0,2)}`)}function Jf(e,t){if(t.safeParse(e).success)return e;Ft.error(`Config object has the wrong shape. Ignoring and using default configuration:
7
- ${JSON.stringify(e,void 0,2)}`)}var ea;async function dn(){return ea===void 0&&(Ft.warn("getConfig(): config was undefined"),ea??=await Ut()),ea}var wu;async function Ct(){let{packageFile:e}=await dn();if(e===void 0)throw new Error("No packageFile found or set in config");if(wu??=await jb({cwd:Qf.dirname(e)}),wu===void 0)throw new Error("No package.json found");return wu}function Gb(e,t){return Qo(e,t)}var Hb={};function hr(e,t){let r=t||Hb,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return tp(e,n,i)}function tp(e,t,r){if(Wb(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ep(e.children,t,r)}return Array.isArray(e)?ep(e,t,r):""}function ep(e,t,r){let n=[],i=-1;for(;++i<e.length;)n[i]=tp(e[i],t,r);return n.join("")}function Wb(e){return!!(e&&typeof e=="object")}var Su={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:`
8
- `,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 Kb={}.hasOwnProperty;function Xn(e){return Kb.call(Su,e)?Su[e]:!1}function De(e,t,r,n){let i=e.length,o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);o<n.length;)a=n.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function st(e,t){return e.length>0?(De(e,e.length,0,t),e):t}var rp={}.hasOwnProperty;function ta(e){let t={},r=-1;for(;++r<e.length;)Zb(t,e[r]);return t}function Zb(e,t){let r;for(r in t){let i=(rp.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r],a;if(o)for(a in o){rp.call(i,a)||(i[a]=[]);let s=o[a];Yb(i[a],Array.isArray(s)?s:s?[s]:[])}}}function Yb(e,t){let r=-1,n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);De(e,0,0,n)}function ra(e,t){let r=Number.parseInt(e,t);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 Qe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var je=_r(/[A-Za-z]/),$e=_r(/[\dA-Za-z]/),np=_r(/[#-'*+\--9=?A-Z^-~]/);function hn(e){return e!==null&&(e<32||e===127)}var Qi=_r(/\d/),ip=_r(/[\dA-Fa-f]/),op=_r(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function Y(e){return e!==null&&(e<0||e===32)}function z(e){return e===-2||e===-1||e===32}var gn=_r(new RegExp("\\p{P}|\\p{S}","u")),Ht=_r(/\s/);function _r(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function U(e,t,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,o=0;return a;function a(u){return z(u)?(e.enter(r),s(u)):t(u)}function s(u){return z(u)&&o++<i?(e.consume(u),s):(e.exit(r),t(u))}}var ap={tokenize:Xb};function Xb(e){let t=e.attempt(this.parser.constructs.contentInitial,n,i),r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),U(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let u=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return R(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var up={tokenize:Jb},sp={tokenize:Qb};function Jb(e){let t=this,r=[],n=0,i,o,a;return s;function s(y){if(n<r.length){let S=r[n];return t.containerState=S[1],e.attempt(S[0].continuation,u,l)(y)}return l(y)}function u(y){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();let S=t.events.length,v=S,A;for(;v--;)if(t.events[v][0]==="exit"&&t.events[v][1].type==="chunkFlow"){A=t.events[v][1].end;break}x(n);let te=S;for(;te<t.events.length;)t.events[te][1].end={...A},te++;return De(t.events,v+1,0,t.events.slice(S)),t.events.length=te,l(y)}return s(y)}function l(y){if(n===r.length){if(!i)return p(y);if(i.currentConstruct&&i.currentConstruct.concrete)return h(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sp,c,f)(y)}function c(y){return i&&k(),x(n),p(y)}function f(y){return t.parser.lazy[t.now().line]=n!==r.length,a=t.now().offset,h(y)}function p(y){return t.containerState={},e.attempt(sp,m,h)(y)}function m(y){return n++,r.push([t.currentConstruct,t.containerState]),p(y)}function h(y){if(y===null){i&&k(),x(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),E(y)}function E(y){if(y===null){C(e.exit("chunkFlow"),!0),x(0),e.consume(y);return}return R(y)?(e.consume(y),C(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(y),E)}function C(y,S){let v=t.sliceStream(y);if(S&&v.push(null),y.previous=o,o&&(o.next=y),o=y,i.defineSkip(y.start),i.write(v),t.parser.lazy[y.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<a&&(!i.events[A][1].end||i.events[A][1].end.offset>a))return;let te=t.events.length,J=te,re,b;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){if(re){b=t.events[J][1].end;break}re=!0}for(x(n),A=te;A<t.events.length;)t.events[A][1].end={...b},A++;De(t.events,J+1,0,t.events.slice(te)),t.events.length=A}}function x(y){let S=r.length;for(;S-- >y;){let v=r[S];t.containerState=v[1],v[0].exit.call(t,e)}r.length=y}function k(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Qb(e,t,r){return U(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gr(e){if(e===null||Y(e)||Ht(e))return 1;if(gn(e))return 2}function Ir(e,t,r){let n=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!n.includes(o)&&(t=o(t,r),n.push(o))}return t}var eo={name:"attention",resolveAll:ek,tokenize:tk};function ek(e,t){let r=-1,n,i,o,a,s,u,l,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let f={...e[n][1].end},p={...e[r][1].start};lp(f,-u),lp(p,u),a={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:u>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[n][1].end={...a.start},e[r][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=st(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=st(l,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),l=st(l,Ir(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=st(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,l=st(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,De(e,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function tk(e,t){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=gr(n),o;return a;function a(u){return o=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===o)return e.consume(u),s;let l=e.exit("attentionSequence"),c=gr(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)),t(u)}}function lp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var vu={name:"autolink",tokenize:rk};function rk(e,t,r){let n=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(m){return je(m)?(e.consume(m),a):m===64?r(m):l(m)}function a(m){return m===43||m===45||m===46||$e(m)?(n=1,s(m)):l(m)}function s(m){return m===58?(e.consume(m),n=0,u):(m===43||m===45||m===46||$e(m))&&n++<32?(e.consume(m),s):(n=0,l(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||hn(m)?r(m):(e.consume(m),u)}function l(m){return m===64?(e.consume(m),c):np(m)?(e.consume(m),l):r(m)}function c(m){return $e(m)?f(m):r(m)}function f(m){return m===46?(e.consume(m),n=0,c):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||$e(m))&&n++<63){let h=m===45?p:f;return e.consume(m),h}return r(m)}}var Wt={partial:!0,tokenize:nk};function nk(e,t,r){return n;function n(o){return z(o)?U(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||R(o)?t(o):r(o)}}var na={continuation:{tokenize:ok},exit:ak,name:"blockQuote",tokenize:ik};function ik(e,t,r){let n=this;return i;function i(a){if(a===62){let s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return r(a)}function o(a){return z(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function ok(e,t,r){let n=this;return i;function i(a){return z(a)?U(e,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(na,t,r)(a)}}function ak(e){e.exit("blockQuote")}var ia={name:"characterEscape",tokenize:sk};function sk(e,t,r){return n;function n(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return op(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}var oa={name:"characterReference",tokenize:uk};function uk(e,t,r){let n=this,i=0,o,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,a=$e,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=ip,c):(e.enter("characterReferenceValue"),o=7,a=Qi,c(f))}function c(f){if(f===59&&i){let p=e.exit("characterReferenceValue");return a===$e&&!Xn(n.sliceSerialize(p))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<o?(e.consume(f),c):r(f)}}var cp={partial:!0,tokenize:ck},aa={concrete:!0,name:"codeFenced",tokenize:lk};function lk(e,t,r){let n=this,i={partial:!0,tokenize:v},o=0,a=0,s;return u;function u(A){return l(A)}function l(A){let te=n.events[n.events.length-1];return o=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,s=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(A)}function c(A){return A===s?(a++,e.consume(A),c):a<3?r(A):(e.exit("codeFencedFenceSequence"),z(A)?U(e,f,"whitespace")(A):f(A))}function f(A){return A===null||R(A)?(e.exit("codeFencedFence"),n.interrupt?t(A):e.check(cp,E,S)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||R(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(A)):z(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,m,"whitespace")(A)):A===96&&A===s?r(A):(e.consume(A),p)}function m(A){return A===null||R(A)?f(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(A))}function h(A){return A===null||R(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(A)):A===96&&A===s?r(A):(e.consume(A),h)}function E(A){return e.attempt(i,S,C)(A)}function C(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),x}function x(A){return o>0&&z(A)?U(e,k,"linePrefix",o+1)(A):k(A)}function k(A){return A===null||R(A)?e.check(cp,E,S)(A):(e.enter("codeFlowValue"),y(A))}function y(A){return A===null||R(A)?(e.exit("codeFlowValue"),k(A)):(e.consume(A),y)}function S(A){return e.exit("codeFenced"),t(A)}function v(A,te,J){let re=0;return b;function b(G){return A.enter("lineEnding"),A.consume(G),A.exit("lineEnding"),ce}function ce(G){return A.enter("codeFencedFence"),z(G)?U(A,Q,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):Q(G)}function Q(G){return G===s?(A.enter("codeFencedFenceSequence"),B(G)):J(G)}function B(G){return G===s?(re++,A.consume(G),B):re>=a?(A.exit("codeFencedFenceSequence"),z(G)?U(A,V,"whitespace")(G):V(G)):J(G)}function V(G){return G===null||R(G)?(A.exit("codeFencedFence"),te(G)):J(G)}}}function ck(e,t,r){let n=this;return i;function i(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}var to={name:"codeIndented",tokenize:pk},fk={partial:!0,tokenize:mk};function pk(e,t,r){let n=this;return i;function i(l){return e.enter("codeIndented"),U(e,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?a(l):r(l)}function a(l){return l===null?u(l):R(l)?e.attempt(fk,a,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||R(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function mk(e,t,r){let n=this;return i;function i(a){return n.parser.lazy[n.now().line]?r(a):R(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):U(e,o,"linePrefix",5)(a)}function o(a){let s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):R(a)?i(a):r(a)}}var _u={name:"codeText",previous:hk,resolve:dk,tokenize:gk};function dk(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function hk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function gk(e,t,r){let n=this,i=0,o,a;return s;function s(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),i++,u):(e.exit("codeTextSequence"),l(p))}function l(p){return p===null?r(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),l):p===96?(a=e.enter("codeTextSequence"),o=0,f(p)):R(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||R(p)?(e.exit("codeTextData"),l(p)):(e.consume(p),c)}function f(p){return p===96?(e.consume(p),o++,f):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",c(p))}}var sa=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){let n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){let i=r||0;this.setCursor(Math.trunc(t));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&ro(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ro(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ro(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let r=this.left.splice(t,Number.POSITIVE_INFINITY);ro(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ro(this.left,r.reverse())}}};function ro(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function ua(e){let t={},r=-1,n,i,o,a,s,u,l,c=new sa(e);for(;++r<c.length;){for(;r in t;)r=t[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(t,xk(c,r)),r=t[r],l=!0);else if(n[1]._container){for(o=r,i=void 0;o--;)if(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(a[1].type!=="linePrefix")break;i&&(n[1].end={...c.get(i)[1].start},s=c.slice(i,r),s.unshift(n),c.splice(i,r-i+1,s))}}return De(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function xk(e,t){let r=e.get(t)[1],n=e.get(t)[2],i=t-1,o=[],a=r._tokenizer||n.parser[r.contentType](r.start),s=a.events,u=[],l={},c,f,p=-1,m=r,h=0,E=0,C=[E];for(;m;){for(;e.get(++i)[1]!==m;);o.push(i),m._tokenizer||(c=n.sliceStream(m),m.next||c.push(null),f&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=r;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(E=p+1,C.push(E),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):C.pop(),p=C.length;p--;){let x=s.slice(C[p],C[p+1]),k=o.pop();u.push([k,k+x.length-1]),e.splice(k,2,x)}for(u.reverse(),p=-1;++p<u.length;)l[h+u[p][0]]=h+u[p][1],h+=u[p][1]-u[p][0]-1;return l}var Iu={resolve:Ek,tokenize:bk},yk={partial:!0,tokenize:kk};function Ek(e){return ua(e),e}function bk(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):R(s)?e.check(yk,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function kk(e,t,r){let n=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),U(e,o,"linePrefix")}function o(a){if(a===null||R(a))return r(a);let s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}function la(e,t,r,n,i,o,a,s,u){let l=u||Number.POSITIVE_INFINITY,c=0;return f;function f(x){return x===60?(e.enter(n),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||hn(x)?r(x):(e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),E(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===62?(e.exit("chunkString"),e.exit(s),p(x)):x===null||x===60||R(x)?r(x):(e.consume(x),x===92?h:m)}function h(x){return x===60||x===62||x===92?(e.consume(x),m):m(x)}function E(x){return!c&&(x===null||x===41||Y(x))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(x)):c<l&&x===40?(e.consume(x),c++,E):x===41?(e.consume(x),c--,E):x===null||x===32||x===40||hn(x)?r(x):(e.consume(x),x===92?C:E)}function C(x){return x===40||x===41||x===92?(e.consume(x),E):E(x)}}function ca(e,t,r,n,i,o){let a=this,s=0,u;return l;function l(m){return e.enter(n),e.enter(i),e.consume(m),e.exit(i),e.enter(o),c}function c(m){return s>999||m===null||m===91||m===93&&!u||m===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?r(m):m===93?(e.exit(o),e.enter(i),e.consume(m),e.exit(i),e.exit(n),t):R(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||R(m)||s++>999?(e.exit("chunkString"),c(m)):(e.consume(m),u||(u=!z(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),s++,f):f(m)}}function fa(e,t,r,n,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(n),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,u):r(p)}function u(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):(e.enter(o),l(p))}function l(p){return p===a?(e.exit(o),u(a)):p===null?r(p):R(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),U(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||R(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(e.consume(p),c):c(p)}}function xn(e,t){let r;return n;function n(i){return R(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):z(i)?U(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}var Ru={name:"definition",tokenize:Tk},Ak={partial:!0,tokenize:Ck};function Tk(e,t,r){let n=this,i;return o;function o(m){return e.enter("definition"),a(m)}function a(m){return ca.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function s(m){return i=Qe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):r(m)}function u(m){return Y(m)?xn(e,l)(m):l(m)}function l(m){return la(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function c(m){return e.attempt(Ak,f,f)(m)}function f(m){return z(m)?U(e,p,"whitespace")(m):p(m)}function p(m){return m===null||R(m)?(e.exit("definition"),n.parser.defined.push(i),t(m)):r(m)}}function Ck(e,t,r){return n;function n(s){return Y(s)?xn(e,i)(s):r(s)}function i(s){return fa(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return z(s)?U(e,a,"whitespace")(s):a(s)}function a(s){return s===null||R(s)?t(s):r(s)}}var Du={name:"hardBreakEscape",tokenize:wk};function wk(e,t,r){return n;function n(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return R(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}var Fu={name:"headingAtx",resolve:Sk,tokenize:vk};function Sk(e,t){let r=e.length-2,n=3,i,o;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},o={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},De(e,n,r-n+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function vk(e,t,r){let n=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&n++<6?(e.consume(c),a):c===null||Y(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||R(c)?(e.exit("atxHeading"),t(c)):z(c)?U(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||Y(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}var fp=["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"],Ou=["pre","script","style","textarea"];var Nu={concrete:!0,name:"htmlFlow",resolveTo:Rk,tokenize:Dk},_k={partial:!0,tokenize:Ok},Ik={partial:!0,tokenize:Fk};function Rk(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Dk(e,t,r){let n=this,i,o,a,s,u;return l;function l(g){return c(g)}function c(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),f}function f(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,E):g===63?(e.consume(g),i=3,n.interrupt?t:d):je(g)?(e.consume(g),a=String.fromCharCode(g),C):r(g)}function p(g){return g===45?(e.consume(g),i=2,m):g===91?(e.consume(g),i=5,s=0,h):je(g)?(e.consume(g),i=4,n.interrupt?t:d):r(g)}function m(g){return g===45?(e.consume(g),n.interrupt?t:d):r(g)}function h(g){let Xe="CDATA[";return g===Xe.charCodeAt(s++)?(e.consume(g),s===Xe.length?n.interrupt?t:Q:h):r(g)}function E(g){return je(g)?(e.consume(g),a=String.fromCharCode(g),C):r(g)}function C(g){if(g===null||g===47||g===62||Y(g)){let Xe=g===47,ze=a.toLowerCase();return!Xe&&!o&&Ou.includes(ze)?(i=1,n.interrupt?t(g):Q(g)):fp.includes(a.toLowerCase())?(i=6,Xe?(e.consume(g),x):n.interrupt?t(g):Q(g)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(g):o?k(g):y(g))}return g===45||$e(g)?(e.consume(g),a+=String.fromCharCode(g),C):r(g)}function x(g){return g===62?(e.consume(g),n.interrupt?t:Q):r(g)}function k(g){return z(g)?(e.consume(g),k):b(g)}function y(g){return g===47?(e.consume(g),b):g===58||g===95||je(g)?(e.consume(g),S):z(g)?(e.consume(g),y):b(g)}function S(g){return g===45||g===46||g===58||g===95||$e(g)?(e.consume(g),S):v(g)}function v(g){return g===61?(e.consume(g),A):z(g)?(e.consume(g),v):y(g)}function A(g){return g===null||g===60||g===61||g===62||g===96?r(g):g===34||g===39?(e.consume(g),u=g,te):z(g)?(e.consume(g),A):J(g)}function te(g){return g===u?(e.consume(g),u=null,re):g===null||R(g)?r(g):(e.consume(g),te)}function J(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Y(g)?v(g):(e.consume(g),J)}function re(g){return g===47||g===62||z(g)?y(g):r(g)}function b(g){return g===62?(e.consume(g),ce):r(g)}function ce(g){return g===null||R(g)?Q(g):z(g)?(e.consume(g),ce):r(g)}function Q(g){return g===45&&i===2?(e.consume(g),ae):g===60&&i===1?(e.consume(g),xe):g===62&&i===4?(e.consume(g),it):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),Et):R(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(_k,vt,B)(g)):g===null||R(g)?(e.exit("htmlFlowData"),B(g)):(e.consume(g),Q)}function B(g){return e.check(Ik,V,vt)(g)}function V(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),G}function G(g){return g===null||R(g)?B(g):(e.enter("htmlFlowData"),Q(g))}function ae(g){return g===45?(e.consume(g),d):Q(g)}function xe(g){return g===47?(e.consume(g),a="",Ye):Q(g)}function Ye(g){if(g===62){let Xe=a.toLowerCase();return Ou.includes(Xe)?(e.consume(g),it):Q(g)}return je(g)&&a.length<8?(e.consume(g),a+=String.fromCharCode(g),Ye):Q(g)}function Et(g){return g===93?(e.consume(g),d):Q(g)}function d(g){return g===62?(e.consume(g),it):g===45&&i===2?(e.consume(g),d):Q(g)}function it(g){return g===null||R(g)?(e.exit("htmlFlowData"),vt(g)):(e.consume(g),it)}function vt(g){return e.exit("htmlFlow"),t(g)}}function Fk(e,t,r){let n=this;return i;function i(a){return R(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):r(a)}function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function Ok(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Wt,t,r)}}var Lu={name:"htmlText",tokenize:Nk};function Nk(e,t,r){let n=this,i,o,a;return s;function s(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),u}function u(d){return d===33?(e.consume(d),l):d===47?(e.consume(d),v):d===63?(e.consume(d),y):je(d)?(e.consume(d),J):r(d)}function l(d){return d===45?(e.consume(d),c):d===91?(e.consume(d),o=0,h):je(d)?(e.consume(d),k):r(d)}function c(d){return d===45?(e.consume(d),m):r(d)}function f(d){return d===null?r(d):d===45?(e.consume(d),p):R(d)?(a=f,xe(d)):(e.consume(d),f)}function p(d){return d===45?(e.consume(d),m):f(d)}function m(d){return d===62?ae(d):d===45?p(d):f(d)}function h(d){let it="CDATA[";return d===it.charCodeAt(o++)?(e.consume(d),o===it.length?E:h):r(d)}function E(d){return d===null?r(d):d===93?(e.consume(d),C):R(d)?(a=E,xe(d)):(e.consume(d),E)}function C(d){return d===93?(e.consume(d),x):E(d)}function x(d){return d===62?ae(d):d===93?(e.consume(d),x):E(d)}function k(d){return d===null||d===62?ae(d):R(d)?(a=k,xe(d)):(e.consume(d),k)}function y(d){return d===null?r(d):d===63?(e.consume(d),S):R(d)?(a=y,xe(d)):(e.consume(d),y)}function S(d){return d===62?ae(d):y(d)}function v(d){return je(d)?(e.consume(d),A):r(d)}function A(d){return d===45||$e(d)?(e.consume(d),A):te(d)}function te(d){return R(d)?(a=te,xe(d)):z(d)?(e.consume(d),te):ae(d)}function J(d){return d===45||$e(d)?(e.consume(d),J):d===47||d===62||Y(d)?re(d):r(d)}function re(d){return d===47?(e.consume(d),ae):d===58||d===95||je(d)?(e.consume(d),b):R(d)?(a=re,xe(d)):z(d)?(e.consume(d),re):ae(d)}function b(d){return d===45||d===46||d===58||d===95||$e(d)?(e.consume(d),b):ce(d)}function ce(d){return d===61?(e.consume(d),Q):R(d)?(a=ce,xe(d)):z(d)?(e.consume(d),ce):re(d)}function Q(d){return d===null||d===60||d===61||d===62||d===96?r(d):d===34||d===39?(e.consume(d),i=d,B):R(d)?(a=Q,xe(d)):z(d)?(e.consume(d),Q):(e.consume(d),V)}function B(d){return d===i?(e.consume(d),i=void 0,G):d===null?r(d):R(d)?(a=B,xe(d)):(e.consume(d),B)}function V(d){return d===null||d===34||d===39||d===60||d===61||d===96?r(d):d===47||d===62||Y(d)?re(d):(e.consume(d),V)}function G(d){return d===47||d===62||Y(d)?re(d):r(d)}function ae(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):r(d)}function xe(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ye}function Ye(d){return z(d)?U(e,Et,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):Et(d)}function Et(d){return e.enter("htmlTextData"),a(d)}}var yn={name:"labelEnd",resolveAll:Bk,resolveTo:Uk,tokenize:zk},Lk={tokenize:jk},Pk={tokenize:$k},Mk={tokenize:qk};function Bk(e){let t=-1,r=[];for(;++t<e.length;){let n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&De(e,0,e.length,r),e}function Uk(e,t){let r=e.length,n=0,i,o,a,s;for(;r--;)if(i=e[r][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(a=r);let u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[o+n+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",u,t],["enter",l,t]],s=st(s,e.slice(o+1,o+n+3)),s=st(s,[["enter",c,t]]),s=st(s,Ir(t.parser.constructs.insideSpan.null,e.slice(o+n+4,a-3),t)),s=st(s,[["exit",c,t],e[a-2],e[a-1],["exit",l,t]]),s=st(s,e.slice(a+1)),s=st(s,[["exit",u,t]]),De(e,o,e.length,s),e}function zk(e,t,r){let n=this,i=n.events.length,o,a;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 s;function s(p){return o?o._inactive?f(p):(a=n.parser.defined.includes(Qe(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):r(p)}function u(p){return p===40?e.attempt(Lk,c,a?c:f)(p):p===91?e.attempt(Pk,c,a?l:f)(p):a?c(p):f(p)}function l(p){return e.attempt(Mk,c,f)(p)}function c(p){return t(p)}function f(p){return o._balanced=!0,r(p)}}function jk(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Y(f)?xn(e,o)(f):o(f)}function o(f){return f===41?c(f):la(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Y(f)?xn(e,u)(f):c(f)}function s(f){return r(f)}function u(f){return f===34||f===39||f===40?fa(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return Y(f)?xn(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function $k(e,t,r){let n=this;return i;function i(s){return ca.call(n,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return n.parser.defined.includes(Qe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function a(s){return r(s)}}function qk(e,t,r){return n;function n(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}var Pu={name:"labelStartImage",resolveAll:yn.resolveAll,tokenize:Vk};function Vk(e,t,r){let n=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):r(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}var Mu={name:"labelStartLink",resolveAll:yn.resolveAll,tokenize:Gk};function Gk(e,t,r){let n=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}var no={name:"lineEnding",tokenize:Hk};function Hk(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),U(e,t,"linePrefix")}}var En={name:"thematicBreak",tokenize:Wk};function Wk(e,t,r){let n=0,i;return o;function o(l){return e.enter("thematicBreak"),a(l)}function a(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):n>=3&&(l===null||R(l))?(e.exit("thematicBreak"),t(l)):r(l)}function u(l){return l===i?(e.consume(l),n++,u):(e.exit("thematicBreakSequence"),z(l)?U(e,s,"whitespace")(l):s(l))}}var et={continuation:{tokenize:Xk},exit:Qk,name:"list",tokenize:Yk},Kk={partial:!0,tokenize:eA},Zk={partial:!0,tokenize:Jk};function Yk(e,t,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,a=0;return s;function s(m){let h=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:Qi(m)){if(n.containerState.type||(n.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(En,r,l)(m):l(m);if(!n.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return r(m)}function u(m){return Qi(m)&&++a<10?(e.consume(m),u):(!n.interrupt||a<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),l(m)):r(m)}function l(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,e.check(Wt,n.interrupt?r:c,e.attempt(Kk,p,f))}function c(m){return n.containerState.initialBlankLine=!0,o++,p(m)}function f(m){return z(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):r(m)}function p(m){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function Xk(e,t,r){let n=this;return n.containerState._closeFlow=void 0,e.check(Wt,i,o);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,U(e,t,"listItemIndent",n.containerState.size+1)(s)}function o(s){return n.containerState.furtherBlankLines||!z(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Zk,t,a)(s))}function a(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,U(e,e.attempt(et,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Jk(e,t,r){let n=this;return U(e,i,"listItemIndent",n.containerState.size+1);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(o):r(o)}}function Qk(e){e.exit(this.containerState.type)}function eA(e,t,r){let n=this;return U(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let a=n.events[n.events.length-1];return!z(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}var pa={name:"setextUnderline",resolveTo:tA,tokenize:rA};function tA(e,t){let r=e.length,n,i,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);let a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,t]),e}function rA(e,t,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)?(e.enter("setextHeadingLine"),i=l,a(l)):r(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),z(l)?U(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||R(l)?(e.exit("setextHeadingLine"),t(l)):r(l)}}var pp={tokenize:nA};function nA(e){let t=this,r=e.attempt(Wt,n,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Iu,i)),"linePrefix")));return r;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var mp={resolveAll:xp()},dp=gp("string"),hp=gp("text");function gp(e){return{resolveAll:xp(e==="text"?iA:void 0),tokenize:t};function t(r){let n=this,i=this.parser.constructs[e],o=r.attempt(i,a,s);return a;function a(c){return l(c)?o(c):s(c)}function s(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 m=f[p];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}function xp(e){return t;function t(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 e?e(r,n):r}}function iA(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let n=e[r-1][1],i=t.sliceStream(n),o=i.length,a=-1,s=0,u;for(;o--;){let l=i[o];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)u=!0,s++;else if(l!==-1){o++;break}}if(s){let l={type:r===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:n.start._bufferIndex+a,_index:n.start._index+o,line:n.end.line,column:n.end.column-s,offset:n.end.offset-s},end:{...n.end}};n.end={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}var Bu={};eE(Bu,{attentionMarkers:()=>pA,contentInitial:()=>aA,disable:()=>mA,document:()=>oA,flow:()=>uA,flowInitial:()=>sA,insideSpan:()=>fA,string:()=>lA,text:()=>cA});var oA={42:et,43:et,45:et,48:et,49:et,50:et,51:et,52:et,53:et,54:et,55:et,56:et,57:et,62:na},aA={91:Ru},sA={[-2]:to,[-1]:to,32:to},uA={35:Fu,42:En,45:[pa,En],60:Nu,61:pa,95:En,96:aa,126:aa},lA={38:oa,92:ia},cA={[-5]:no,[-4]:no,[-3]:no,33:Pu,38:oa,42:eo,60:[vu,Lu],91:Mu,92:[Du,ia],93:yn,95:eo,96:_u},fA={null:[eo,mp]},pA={null:[42,95]},mA={null:[]};function yp(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},i={},o=[],a=[],s=[],u=!0,l={attempt:re(te),check:re(J),consume:S,enter:v,exit:A,interrupt:re(J,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:C,parser:e,previous:null,sliceSerialize:h,sliceStream:E,write:m},f=t.tokenize.call(c,l),p;return t.resolveAll&&o.push(t),c;function m(B){return a=st(a,B),k(),a[a.length-1]!==null?[]:(b(t,0),c.events=Ir(o,c.events,c),c.events)}function h(B,V){return hA(E(B),V)}function E(B){return dA(a,B)}function C(){let{_bufferIndex:B,_index:V,line:G,column:ae,offset:xe}=n;return{_bufferIndex:B,_index:V,line:G,column:ae,offset:xe}}function x(B){i[B.line]=B.column,Q()}function k(){let B;for(;n._index<a.length;){let V=a[n._index];if(typeof V=="string")for(B=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===B&&n._bufferIndex<V.length;)y(V.charCodeAt(n._bufferIndex));else y(V)}}function y(B){u=void 0,p=B,f=f(B)}function S(B){R(B)?(n.line++,n.column=1,n.offset+=B===-3?2:1,Q()):B!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=B,u=!0}function v(B,V){let G=V||{};return G.type=B,G.start=C(),c.events.push(["enter",G,c]),s.push(G),G}function A(B){let V=s.pop();return V.end=C(),c.events.push(["exit",V,c]),V}function te(B,V){b(B,V.from)}function J(B,V){V.restore()}function re(B,V){return G;function G(ae,xe,Ye){let Et,d,it,vt;return Array.isArray(ae)?Xe(ae):"tokenize"in ae?Xe([ae]):g(ae);function g(se){return _t;function _t(Te){let Ke=Te!==null&&se[Te],ot=Te!==null&&se.null,bt=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(ot)?ot:ot?[ot]:[]];return Xe(bt)(Te)}}function Xe(se){return Et=se,d=0,se.length===0?Ye:ze(se[d])}function ze(se){return _t;function _t(Te){return vt=ce(),it=se,se.partial||(c.currentConstruct=se),se.name&&c.parser.constructs.disable.null.includes(se.name)?Re(Te):se.tokenize.call(V?Object.assign(Object.create(c),V):c,l,Pn,Re)(Te)}}function Pn(se){return u=!0,B(it,vt),xe}function Re(se){return u=!0,vt.restore(),++d<Et.length?ze(Et[d]):Ye}}}function b(B,V){B.resolveAll&&!o.includes(B)&&o.push(B),B.resolve&&De(c.events,V,c.events.length-V,B.resolve(c.events.slice(V),c)),B.resolveTo&&(c.events=B.resolveTo(c.events,c))}function ce(){let B=C(),V=c.previous,G=c.currentConstruct,ae=c.events.length,xe=Array.from(s);return{from:ae,restore:Ye};function Ye(){n=B,c.previous=V,c.currentConstruct=G,c.events.length=ae,s=xe,Q()}}function Q(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function dA(e,t){let r=t.start._index,n=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex,a;if(r===i)a=[e[r].slice(n,o)];else{if(a=e.slice(r,i),n>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(n):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function hA(e,t){let r=-1,n=[],i;for(;++r<e.length;){let o=e[r],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
4
+ `,i)}while(n!==-1);return o+=e.slice(i),o}var{stdout:Af,stderr:Tf}=Ef,uu=Symbol("GENERATOR"),Un=Symbol("STYLER"),Hi=Symbol("IS_EMPTY"),Cf=["ansi","ansi","ansi256","ansi16m"],zn=Object.create(null),gE=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Af?Af.level:0;e.level=t.level===void 0?r:t.level};var xE=e=>{let t=(...r)=>r.join(" ");return gE(t,e),Object.setPrototypeOf(t,Wi.prototype),t};function Wi(e){return xE(e)}Object.setPrototypeOf(Wi.prototype,Function.prototype);for(let[e,t]of Object.entries(Mt))zn[e]={get(){let r=Go(this,cu(t.open,t.close,this[Un]),this[Hi]);return Object.defineProperty(this,e,{value:r}),r}};zn.visible={get(){let e=Go(this,this[Un],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var lu=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?Mt[r].ansi16m(...n):t==="ansi256"?Mt[r].ansi256(Mt.rgbToAnsi256(...n)):Mt[r].ansi(Mt.rgbToAnsi(...n)):e==="hex"?lu("rgb",t,r,...Mt.hexToRgb(...n)):Mt[r][e](...n),yE=["rgb","hex","ansi256"];for(let e of yE){zn[e]={get(){let{level:r}=this;return function(...n){let i=cu(lu(e,Cf[r],"color",...n),Mt.color.close,this[Un]);return Go(this,i,this[Hi])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);zn[t]={get(){let{level:r}=this;return function(...n){let i=cu(lu(e,Cf[r],"bgColor",...n),Mt.bgColor.close,this[Un]);return Go(this,i,this[Hi])}}}}var EE=Object.defineProperties(()=>{},{...zn,level:{enumerable:!0,get(){return this[uu].level},set(e){this[uu].level=e}}}),cu=(e,t,r)=>{let n,i;return r===void 0?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},Go=(e,t,r)=>{let n=(...i)=>bE(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,EE),n[uu]=e,n[Un]=t,n[Hi]=r,n},bE=(e,t)=>{if(e.level<=0||!t)return e[Hi]?"":t;let r=e[Un];if(r===void 0)return t;let{openAll:n,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=bf(t,r.close,r.open),r=r.parent;let o=t.indexOf(`
5
+ `);return o!==-1&&(t=kf(t,i,n,o)),n+t+i};Object.defineProperties(Wi.prototype,zn);var kE=Wi(),$1=Wi({level:Tf?Tf.level:0});var fu=kE;import{cosmiconfig as Yf}from"cosmiconfig";import{TypeScriptLoader as Xf}from"cosmiconfig-typescript-loader";import Gb from"node:fs/promises";import ep from"node:path";var pu=mf(vf(),1);function mu(e,t,r){if(typeof t=="number"&&(r=t),pu.default.has(e.toLowerCase())){t=pu.default.get(e.toLowerCase());let n=e.charAt(0);n===n.toUpperCase()&&(t=n+t.slice(1)),e===e.toUpperCase()&&(t=t.toUpperCase())}else typeof t!="string"&&(t=(e.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,n=>e.slice(-1)===e.slice(-1).toLowerCase()?n.toLowerCase():n.toUpperCase()));return Math.abs(r)===1?e:t}import{readPackage as Hb}from"read-pkg";import{deepMergeDefined as Qo,log as Ft,optionsSchema as Wb,rulesSchema as Kb}from"remark-mdat";var oe;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},e.getValidEnumValues=i=>{let o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(let a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(oe||(oe={}));var hu;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(hu||(hu={}));var F=oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fr=e=>{switch(typeof e){case"undefined":return F.undefined;case"string":return F.string;case"number":return isNaN(e)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":return Array.isArray(e)?F.array:e===null?F.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?F.promise:typeof Map<"u"&&e instanceof Map?F.map:typeof Set<"u"&&e instanceof Set?F.set:typeof Date<"u"&&e instanceof Date?F.date:F.object;default:return F.unknown}},w=oe.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"]),CE=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),At=class e extends Error{get errors(){return this.issues}constructor(t){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=t}format(t){let r=t||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,u=0;for(;u<a.path.length;){let l=a.path[u];u===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};At.create=e=>new At(e);var qn=(e,t)=>{let r;switch(e.code){case w.invalid_type:e.received===F.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,oe.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:r=`Unrecognized key(s) in object: ${oe.joinValues(e.keys,", ")}`;break;case w.invalid_union:r="Invalid input";break;case w.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${oe.joinValues(e.options)}`;break;case w.invalid_enum_value:r=`Invalid enum value. Expected ${oe.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:r="Invalid function arguments";break;case w.invalid_return_type:r="Invalid function return type";break;case w.invalid_date:r="Invalid date";break;case w.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:oe.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case w.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case w.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case w.custom:r="Invalid input";break;case w.invalid_intersection_types:r="Intersection results could not be merged";break;case w.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:r="Number must be finite";break;default:r=t.defaultError,oe.assertNever(e)}return{message:r}},Df=qn;function wE(e){Df=e}function Ho(){return Df}var Wo=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="",u=n.filter(l=>!!l).slice().reverse();for(let l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},SE=[];function I(e,t){let r=Ho(),n=Wo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===qn?void 0:qn].filter(i=>!!i)});e.common.issues.push(n)}var Je=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let i of r){if(i.status==="aborted")return q;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return q;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:t.value,value:n}}},q=Object.freeze({status:"aborted"}),$n=e=>({status:"dirty",value:e}),at=e=>({status:"valid",value:e}),gu=e=>e.status==="aborted",xu=e=>e.status==="dirty",Xr=e=>e.status==="valid",Yi=e=>typeof Promise<"u"&&e instanceof Promise;function Ko(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Ff(e,t,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 t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}var M;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(M||(M={}));var Ki,Zi,Dt=class{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},_f=(e,t)=>{if(Xr(t))return{success:!0,data:t.value};if(!e.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 At(e.common.issues);return this._error=r,this._error}}};function K(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??n)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??r)!==null&&l!==void 0?l:s.defaultError}},description:i}}var Z=class{get description(){return this._def.description}_getType(t){return fr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:fr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Je,ctx:{common:t.parent.common,data:t.data,parsedType:fr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Yi(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fr(t)},o=this._parseSync({data:t,path:i.path,parent:i});return _f(i,o)}"~validate"(t){var r,n;let i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fr(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:i});return Xr(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((n=(r=o?.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Xr(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fr(t)},i=this._parse({data:t,path:n.path,parent:n}),o=await(Yi(i)?i:Promise.resolve(i));return _f(n,o)}refine(t,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=t(i),s=()=>o.addIssue({code:w.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Tt({schema:this,typeName:$.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 Rt.create(this,this._def)}nullable(){return Gt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return mr.create(this)}promise(){return vr.create(this,this._def)}or(t){return on.create([this,t],this._def)}and(t){return an.create(this,t,this._def)}transform(t){return new Tt({...K(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new fn({...K(this._def),innerType:this,defaultValue:r,typeName:$.ZodDefault})}brand(){return new Xi({typeName:$.ZodBranded,type:this,...K(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new pn({...K(this._def),innerType:this,catchValue:r,typeName:$.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ji.create(this,t)}readonly(){return mn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},vE=/^c[^\s-]{8,}$/i,_E=/^[0-9a-z]+$/,IE=/^[0-9A-HJKMNP-TV-Z]{26}$/i,RE=/^[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,DE=/^[a-z0-9_-]{21}$/i,FE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,OE=/^[-+]?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)?)??$/,NE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,LE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",du,PE=/^(?:(?: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])$/,ME=/^(?:(?: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])$/,BE=/^(([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]))$/,UE=/^(([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])$/,zE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,jE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Of="((\\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])))",$E=new RegExp(`^${Of}$`);function Nf(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function qE(e){return new RegExp(`^${Nf(e)}$`)}function Lf(e){let t=`${Of}T${Nf(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function VE(e,t){return!!((t==="v4"||!t)&&PE.test(e)||(t==="v6"||!t)&&BE.test(e))}function GE(e,t){if(!FE.test(e))return!1;try{let[r]=e.split("."),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||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function HE(e,t){return!!((t==="v4"||!t)&&ME.test(e)||(t==="v6"||!t)&&UE.test(e))}var wr=class e extends Z{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==F.string){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.string,received:o.parsedType}),q}let n=new Je,i;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?I(i,{code:w.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&I(i,{code:w.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")NE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"email",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")du||(du=new RegExp(LE,"u")),du.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"emoji",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")RE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"uuid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")DE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"nanoid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")vE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cuid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")_E.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cuid2",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")IE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"ulid",code:w.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),I(i,{validation:"url",code:w.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"regex",code:w.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Lf(o).test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?$E.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?qE(o).test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?OE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"duration",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?VE(t.data,o.version)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"ip",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?GE(t.data,o.alg)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"jwt",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?HE(t.data,o.version)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"cidr",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?zE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"base64",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?jE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"base64url",code:w.invalid_string,message:o.message}),n.dirty()):oe.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:w.invalid_string,...M.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...M.errToObj(t)})}url(t){return this._addCheck({kind:"url",...M.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...M.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...M.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...M.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...M.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...M.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...M.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...M.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...M.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...M.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...M.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...M.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,local:(n=t?.local)!==null&&n!==void 0?n:!1,...M.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...M.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...M.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...M.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...M.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...M.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...M.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...M.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...M.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...M.errToObj(r)})}nonempty(t){return this.min(1,M.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};wr.create=e=>{var t;return new wr({checks:[],typeName:$.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...K(e)})};function WE(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}var Jr=class e extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==F.number){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.number,received:o.parsedType}),q}let n,i=new Je;for(let o of this._def.checks)o.kind==="int"?oe.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),I(n,{code:w.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?WE(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_finite,message:o.message}),i.dirty()):oe.assertNever(o);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,M.toString(r))}gt(t,r){return this.setLimit("min",t,!1,M.toString(r))}lte(t,r){return this.setLimit("max",t,!0,M.toString(r))}lt(t,r){return this.setLimit("max",t,!1,M.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:M.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:M.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:M.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:M.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:M.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:M.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:M.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:M.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:M.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:M.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&oe.isInteger(t.value))}get isFinite(){let t=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"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Jr.create=e=>new Jr({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...K(e)});var Qr=class e extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==F.bigint)return this._getInvalidInput(t);let n,i=new Je;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),I(n,{code:w.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):oe.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return I(r,{code:w.invalid_type,expected:F.bigint,received:r.parsedType}),q}gte(t,r){return this.setLimit("min",t,!0,M.toString(r))}gt(t,r){return this.setLimit("min",t,!1,M.toString(r))}lte(t,r){return this.setLimit("max",t,!0,M.toString(r))}lt(t,r){return this.setLimit("max",t,!1,M.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:M.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:M.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:M.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:M.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:M.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:M.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Qr.create=e=>{var t;return new Qr({checks:[],typeName:$.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...K(e)})};var en=class extends Z{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==F.boolean){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.boolean,received:n.parsedType}),q}return at(t.data)}};en.create=e=>new en({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...K(e)});var tn=class e extends Z{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==F.date){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_type,expected:F.date,received:o.parsedType}),q}if(isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return I(o,{code:w.invalid_date}),q}let n=new Je,i;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),I(i,{code:w.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):oe.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:M.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:M.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};tn.create=e=>new tn({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...K(e)});var Vn=class extends Z{_parse(t){if(this._getType(t)!==F.symbol){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.symbol,received:n.parsedType}),q}return at(t.data)}};Vn.create=e=>new Vn({typeName:$.ZodSymbol,...K(e)});var rn=class extends Z{_parse(t){if(this._getType(t)!==F.undefined){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.undefined,received:n.parsedType}),q}return at(t.data)}};rn.create=e=>new rn({typeName:$.ZodUndefined,...K(e)});var nn=class extends Z{_parse(t){if(this._getType(t)!==F.null){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.null,received:n.parsedType}),q}return at(t.data)}};nn.create=e=>new nn({typeName:$.ZodNull,...K(e)});var Sr=class extends Z{constructor(){super(...arguments),this._any=!0}_parse(t){return at(t.data)}};Sr.create=e=>new Sr({typeName:$.ZodAny,...K(e)});var pr=class extends Z{constructor(){super(...arguments),this._unknown=!0}_parse(t){return at(t.data)}};pr.create=e=>new pr({typeName:$.ZodUnknown,...K(e)});var Bt=class extends Z{_parse(t){let r=this._getOrReturnCtx(t);return I(r,{code:w.invalid_type,expected:F.never,received:r.parsedType}),q}};Bt.create=e=>new Bt({typeName:$.ZodNever,...K(e)});var Gn=class extends Z{_parse(t){if(this._getType(t)!==F.undefined){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.void,received:n.parsedType}),q}return at(t.data)}};Gn.create=e=>new Gn({typeName:$.ZodVoid,...K(e)});var mr=class e extends Z{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==F.array)return I(r,{code:w.invalid_type,expected:F.array,received:r.parsedType}),q;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(I(r,{code:a?w.too_big:w.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?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&&(I(r,{code:w.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&&(I(r,{code:w.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((a,s)=>i.type._parseAsync(new Dt(r,a,r.path,s)))).then(a=>Je.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new Dt(r,a,r.path,s)));return Je.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:M.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:M.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:M.toString(r)}})}nonempty(t){return this.min(1,t)}};mr.create=(e,t)=>new mr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...K(t)});function jn(e){if(e instanceof dt){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Rt.create(jn(n))}return new dt({...e._def,shape:()=>t})}else return e instanceof mr?new mr({...e._def,type:jn(e.element)}):e instanceof Rt?Rt.create(jn(e.unwrap())):e instanceof Gt?Gt.create(jn(e.unwrap())):e instanceof Vt?Vt.create(e.items.map(t=>jn(t))):e}var dt=class e extends Z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=oe.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==F.object){let l=this._getOrReturnCtx(t);return I(l,{code:w.invalid_type,expected:F.object,received:l.parsedType}),q}let{status:n,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Bt&&this._def.unknownKeys==="strip"))for(let l in i.data)a.includes(l)||s.push(l);let u=[];for(let l of a){let c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Dt(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Bt){let l=this._def.unknownKeys;if(l==="passthrough")for(let c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(I(i,{code:w.unrecognized_keys,keys:s}),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 s){let f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Dt(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=>Je.mergeObjectSync(n,l)):Je.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return M.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,o,a,s;let u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=M.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return oe.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}deepPartial(){return jn(this)}partial(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return oe.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Rt;)o=o._def.innerType;r[n]=o}}),new e({...this._def,shape:()=>r})}keyof(){return Pf(oe.objectKeys(this.shape))}};dt.create=(e,t)=>new dt({shape:()=>e,unknownKeys:"strip",catchall:Bt.create(),typeName:$.ZodObject,...K(t)});dt.strictCreate=(e,t)=>new dt({shape:()=>e,unknownKeys:"strict",catchall:Bt.create(),typeName:$.ZodObject,...K(t)});dt.lazycreate=(e,t)=>new dt({shape:e,unknownKeys:"strip",catchall:Bt.create(),typeName:$.ZodObject,...K(t)});var on=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new At(s.ctx.common.issues));return I(r,{code:w.invalid_union,unionErrors:a}),q}if(r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];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&&a.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(u=>new At(u));return I(r,{code:w.invalid_union,unionErrors:s}),q}}get options(){return this._def.options}};on.create=(e,t)=>new on({options:e,typeName:$.ZodUnion,...K(t)});var cr=e=>e instanceof sn?cr(e.schema):e instanceof Tt?cr(e.innerType()):e instanceof un?[e.value]:e instanceof ln?e.options:e instanceof cn?oe.objectValues(e.enum):e instanceof fn?cr(e._def.innerType):e instanceof rn?[void 0]:e instanceof nn?[null]:e instanceof Rt?[void 0,...cr(e.unwrap())]:e instanceof Gt?[null,...cr(e.unwrap())]:e instanceof Xi||e instanceof mn?cr(e.unwrap()):e instanceof pn?cr(e._def.innerType):[],Zo=class e extends Z{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.object)return I(r,{code:w.invalid_type,expected:F.object,received:r.parsedType}),q;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}):(I(r,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),q)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let i=new Map;for(let o of r){let a=cr(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...K(n)})}};function yu(e,t){let r=fr(e),n=fr(t);if(e===t)return{valid:!0,data:e};if(r===F.object&&n===F.object){let i=oe.objectKeys(t),o=oe.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(let s of o){let u=yu(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(r===F.array&&n===F.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let o=0;o<e.length;o++){let a=e[o],s=t[o],u=yu(a,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===F.date&&n===F.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var an=class extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=(o,a)=>{if(gu(o)||gu(a))return q;let s=yu(o.value,a.value);return s.valid?((xu(o)||xu(a))&&r.dirty(),{status:r.value,value:s.data}):(I(n,{code:w.invalid_intersection_types}),q)};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,a])=>i(o,a)):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}))}};an.create=(e,t,r)=>new an({left:e,right:t,typeName:$.ZodIntersection,...K(r)});var Vt=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.array)return I(n,{code:w.invalid_type,expected:F.array,received:n.parsedType}),q;if(n.data.length<this._def.items.length)return I(n,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q;!this._def.rest&&n.data.length>this._def.items.length&&(I(n,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((a,s)=>{let u=this._def.items[s]||this._def.rest;return u?u._parse(new Dt(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>Je.mergeArray(r,a)):Je.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Vt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vt({items:e,typeName:$.ZodTuple,rest:null,...K(t)})};var Yo=class e extends Z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.object)return I(n,{code:w.invalid_type,expected:F.object,received:n.parsedType}),q;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new Dt(n,s,n.path,s)),value:a._parse(new Dt(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Je.mergeObjectAsync(r,i):Je.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Z?new e({keyType:t,valueType:r,typeName:$.ZodRecord,...K(n)}):new e({keyType:wr.create(),valueType:t,typeName:$.ZodRecord,...K(r)})}},Hn=class extends Z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.map)return I(n,{code:w.invalid_type,expected:F.map,received:n.parsedType}),q;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,u],l)=>({key:i._parse(new Dt(n,s,n.path,[l,"key"])),value:o._parse(new Dt(n,u,n.path,[l,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let u of a){let l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return q;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let u of a){let l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return q;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}}}};Hn.create=(e,t,r)=>new Hn({valueType:t,keyType:e,typeName:$.ZodMap,...K(r)});var Wn=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==F.set)return I(n,{code:w.invalid_type,expected:F.set,received:n.parsedType}),q;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(I(n,{code:w.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&&(I(n,{code:w.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(u){let l=new Set;for(let c of u){if(c.status==="aborted")return q;c.status==="dirty"&&r.dirty(),l.add(c.value)}return{status:r.value,value:l}}let s=[...n.data.values()].map((u,l)=>o._parse(new Dt(n,u,n.path,l)));return n.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:M.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:M.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Wn.create=(e,t)=>new Wn({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...K(t)});var Xo=class e extends Z{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.function)return I(r,{code:w.invalid_type,expected:F.function,received:r.parsedType}),q;function n(s,u){return Wo({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ho(),qn].filter(l=>!!l),issueData:{code:w.invalid_arguments,argumentsError:u}})}function i(s,u){return Wo({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ho(),qn].filter(l=>!!l),issueData:{code:w.invalid_return_type,returnTypeError:u}})}let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof vr){let s=this;return at(async function(...u){let l=new At([]),c=await s._def.args.parseAsync(u,o).catch(m=>{throw l.addIssue(n(u,m)),l}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,o).catch(m=>{throw l.addIssue(i(f,m)),l})})}else{let s=this;return at(function(...u){let l=s._def.args.safeParse(u,o);if(!l.success)throw new At([n(u,l.error)]);let c=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(c,o);if(!f.success)throw new At([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Vt.create(t).rest(pr.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Vt.create([]).rest(pr.create()),returns:r||pr.create(),typeName:$.ZodFunction,...K(n)})}},sn=class extends Z{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};sn.create=(e,t)=>new sn({getter:e,typeName:$.ZodLazy,...K(t)});var un=class extends Z{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return I(r,{received:r.data,code:w.invalid_literal,expected:this._def.value}),q}return{status:"valid",value:t.data}}get value(){return this._def.value}};un.create=(e,t)=>new un({value:e,typeName:$.ZodLiteral,...K(t)});function Pf(e,t){return new ln({values:e,typeName:$.ZodEnum,...K(t)})}var ln=class e extends Z{constructor(){super(...arguments),Ki.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return I(r,{expected:oe.joinValues(n),received:r.parsedType,code:w.invalid_type}),q}if(Ko(this,Ki,"f")||Ff(this,Ki,new Set(this._def.values),"f"),!Ko(this,Ki,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return I(r,{received:r.data,code:w.invalid_enum_value,options:n}),q}return at(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Ki=new WeakMap;ln.create=Pf;var cn=class extends Z{constructor(){super(...arguments),Zi.set(this,void 0)}_parse(t){let r=oe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==F.string&&n.parsedType!==F.number){let i=oe.objectValues(r);return I(n,{expected:oe.joinValues(i),received:n.parsedType,code:w.invalid_type}),q}if(Ko(this,Zi,"f")||Ff(this,Zi,new Set(oe.getValidEnumValues(this._def.values)),"f"),!Ko(this,Zi,"f").has(t.data)){let i=oe.objectValues(r);return I(n,{received:n.data,code:w.invalid_enum_value,options:i}),q}return at(t.data)}get enum(){return this._def.values}};Zi=new WeakMap;cn.create=(e,t)=>new cn({values:e,typeName:$.ZodNativeEnum,...K(t)});var vr=class extends Z{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==F.promise&&r.common.async===!1)return I(r,{code:w.invalid_type,expected:F.promise,received:r.parsedType}),q;let n=r.parsedType===F.promise?r.data:Promise.resolve(r.data);return at(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};vr.create=(e,t)=>new vr({type:e,typeName:$.ZodPromise,...K(t)});var Tt=class extends Z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{I(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return q;let u=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return u.status==="aborted"?q:u.status==="dirty"||r.value==="dirty"?$n(u.value):u});{if(r.value==="aborted")return q;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?q:s.status==="dirty"||r.value==="dirty"?$n(s.value):s}}if(i.type==="refinement"){let a=s=>{let u=i.refinement(s,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 s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?q:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Xr(a))return a;let s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Xr(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):a);oe.assertNever(i)}};Tt.create=(e,t,r)=>new Tt({schema:e,typeName:$.ZodEffects,effect:t,...K(r)});Tt.createWithPreprocess=(e,t,r)=>new Tt({schema:t,effect:{type:"preprocess",transform:e},typeName:$.ZodEffects,...K(r)});var Rt=class extends Z{_parse(t){return this._getType(t)===F.undefined?at(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Rt.create=(e,t)=>new Rt({innerType:e,typeName:$.ZodOptional,...K(t)});var Gt=class extends Z{_parse(t){return this._getType(t)===F.null?at(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Gt.create=(e,t)=>new Gt({innerType:e,typeName:$.ZodNullable,...K(t)});var fn=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===F.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};fn.create=(e,t)=>new fn({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...K(t)});var pn=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Yi(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new At(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new At(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};pn.create=(e,t)=>new pn({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...K(t)});var Kn=class extends Z{_parse(t){if(this._getType(t)!==F.nan){let n=this._getOrReturnCtx(t);return I(n,{code:w.invalid_type,expected:F.nan,received:n.parsedType}),q}return{status:"valid",value:t.data}}};Kn.create=e=>new Kn({typeName:$.ZodNaN,...K(e)});var KE=Symbol("zod_brand"),Xi=class extends Z{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Ji=class e extends Z{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);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"?q:o.status==="dirty"?(r.dirty(),$n(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"?q:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:$.ZodPipeline})}},mn=class extends Z{_parse(t){let r=this._def.innerType._parse(t),n=i=>(Xr(i)&&(i.value=Object.freeze(i.value)),i);return Yi(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};mn.create=(e,t)=>new mn({innerType:e,typeName:$.ZodReadonly,...K(t)});function If(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Mf(e,t={},r){return e?Sr.create().superRefine((n,i)=>{var o,a;let s=e(n);if(s instanceof Promise)return s.then(u=>{var l,c;if(!u){let f=If(t,n),p=(c=(l=f.fatal)!==null&&l!==void 0?l:r)!==null&&c!==void 0?c:!0;i.addIssue({code:"custom",...f,fatal:p})}});if(!s){let u=If(t,n),l=(a=(o=u.fatal)!==null&&o!==void 0?o:r)!==null&&a!==void 0?a:!0;i.addIssue({code:"custom",...u,fatal:l})}}):Sr.create()}var ZE={object:dt.lazycreate},$;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})($||($={}));var YE=(e,t={message:`Input not instance of ${e.name}`})=>Mf(r=>r instanceof e,t),Bf=wr.create,Uf=Jr.create,XE=Kn.create,JE=Qr.create,zf=en.create,QE=tn.create,eb=Vn.create,tb=rn.create,rb=nn.create,nb=Sr.create,ib=pr.create,ob=Bt.create,ab=Gn.create,sb=mr.create,ub=dt.create,lb=dt.strictCreate,cb=on.create,fb=Zo.create,pb=an.create,mb=Vt.create,db=Yo.create,hb=Hn.create,gb=Wn.create,xb=Xo.create,yb=sn.create,Eb=un.create,bb=ln.create,kb=cn.create,Ab=vr.create,Rf=Tt.create,Tb=Rt.create,Cb=Gt.create,wb=Tt.createWithPreprocess,Sb=Ji.create,vb=()=>Bf().optional(),_b=()=>Uf().optional(),Ib=()=>zf().optional(),Rb={string:e=>wr.create({...e,coerce:!0}),number:e=>Jr.create({...e,coerce:!0}),boolean:e=>en.create({...e,coerce:!0}),bigint:e=>Qr.create({...e,coerce:!0}),date:e=>tn.create({...e,coerce:!0})},Db=q,L=Object.freeze({__proto__:null,defaultErrorMap:qn,setErrorMap:wE,getErrorMap:Ho,makeIssue:Wo,EMPTY_PATH:SE,addIssueToContext:I,ParseStatus:Je,INVALID:q,DIRTY:$n,OK:at,isAborted:gu,isDirty:xu,isValid:Xr,isAsync:Yi,get util(){return oe},get objectUtil(){return hu},ZodParsedType:F,getParsedType:fr,ZodType:Z,datetimeRegex:Lf,ZodString:wr,ZodNumber:Jr,ZodBigInt:Qr,ZodBoolean:en,ZodDate:tn,ZodSymbol:Vn,ZodUndefined:rn,ZodNull:nn,ZodAny:Sr,ZodUnknown:pr,ZodNever:Bt,ZodVoid:Gn,ZodArray:mr,ZodObject:dt,ZodUnion:on,ZodDiscriminatedUnion:Zo,ZodIntersection:an,ZodTuple:Vt,ZodRecord:Yo,ZodMap:Hn,ZodSet:Wn,ZodFunction:Xo,ZodLazy:sn,ZodLiteral:un,ZodEnum:ln,ZodNativeEnum:cn,ZodPromise:vr,ZodEffects:Tt,ZodTransformer:Tt,ZodOptional:Rt,ZodNullable:Gt,ZodDefault:fn,ZodCatch:pn,ZodNaN:Kn,BRAND:KE,ZodBranded:Xi,ZodPipeline:Ji,ZodReadonly:mn,custom:Mf,Schema:Z,ZodSchema:Z,late:ZE,get ZodFirstPartyTypeKind(){return $},coerce:Rb,any:nb,array:sb,bigint:JE,boolean:zf,date:QE,discriminatedUnion:fb,effect:Rf,enum:bb,function:xb,instanceof:YE,intersection:pb,lazy:yb,literal:Eb,map:hb,nan:XE,nativeEnum:kb,never:ob,null:rb,nullable:Cb,number:Uf,object:ub,oboolean:Ib,onumber:_b,optional:Tb,ostring:vb,pipeline:Sb,preprocess:wb,promise:Ab,record:db,set:gb,strictObject:lb,string:Bf,symbol:eb,transformer:Rf,tuple:mb,undefined:tb,union:cb,unknown:ib,void:ab,NEVER:Db,ZodIssueCode:w,quotelessJson:CE,ZodError:At});import{defaultLoaders as Fb}from"cosmiconfig";function Eu(e,t){let r=Fb[".json"],n=r(e,t);return jf(n)}function jf(e,t="",r={}){for(let[n,i]of Object.entries(e)){let o=t?`${t}.${n}`:n;typeof i=="object"&&i!==null&&!Array.isArray(i)?jf(i,o,r):i===null?r[o]="null":r[o]=i.toString()}return r}import jb from"node:fs";import dr from"node:path";import Mb from"node:process";import Ob from"node:process";import Nb from"node:fs/promises";import{fileURLToPath as Lb}from"node:url";import Zn from"node:path";var $f=e=>e instanceof URL?Lb(e):e;async function Jo(e,{cwd:t=Ob.cwd(),type:r="file",stopAt:n}={}){let i=Zn.resolve($f(t)??""),{root:o}=Zn.parse(i);n=Zn.resolve(i,$f(n??o));let a=Zn.isAbsolute(e);for(;i;){let s=a?e:Zn.join(i,e);try{let u=await Nb.stat(s);if(r==="file"&&u.isFile()||r==="directory"&&u.isDirectory())return s}catch{}if(i===n||i===o)break;i=Zn.dirname(i)}}async function qf({cwd:e=Mb.cwd()}={}){return Jo("package.json",{cwd:e})}import Bb from"node:fs";import Ub from"node:fs/promises";async function bu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await Ub[e](r))[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function ku(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return Bb[e](r)[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var Yn=bu.bind(void 0,"stat","isFile"),aO=bu.bind(void 0,"stat","isDirectory"),sO=bu.bind(void 0,"lstat","isSymbolicLink"),Au=ku.bind(void 0,"statSync","isFile"),uO=ku.bind(void 0,"statSync","isDirectory"),lO=ku.bind(void 0,"lstatSync","isSymbolicLink");import{log as Gf}from"remark-mdat";import{Configuration as $b}from"unified-engine";import zb from"node:os";var Vf=zb.homedir();function Tu(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return Vf?e.replace(/^~(?=$|\/|\\)/,Vf):e}function qb(e,t){let r=t===0?1:Math.floor(Math.log10(Math.abs(t))+1);return e.toString().padStart(r,"0")}function Wf(e,t,r,n){let i=[];for(let[o,a]of e.entries()){let s=r&&e.length>1?`-${qb(o+1,e.length+1)}`:"",u=Vb(a,t,r,n,s);i.push(u)}return i}function Vb(e,t,r,n,i=""){let o=Hf(e),a=t?Hf(t):void 0;if(!Au(o))throw new Error(`Input file not found: "${o}"`);if(a){if(Au(a))throw new Error(`Output path must be a directory, received a file path: "${a}"`);jb.mkdirSync(a,{recursive:!0})}let s=r?dr.basename(r,dr.extname(r)):dr.basename(o,dr.extname(o)),u=`.${n??(r&&dr.extname(r)!==""?dr.extname(r):dr.extname(e)===""?"":dr.extname(e))}`,l=`${s}${i}${u}`,c=a??dr.dirname(o);return{input:o,name:l,output:c}}function Hf(e){return Tu(e)}async function Kf(){return qf()}function Zf(e){return e==null?[]:Array.isArray(e)?e:[e]}async function Cu(){let e=new $b({cwd:process.cwd(),detectConfig:!0,packageField:"remarkConfig",rcName:".remarkrc"}),t=await new Promise(r=>{e.load("",(n,i)=>{if(n){console.error(n),r();return}r(i)})});if(t){let{filePath:r}=t;return r===void 0?Gf.info('No ambient Remark configuration file found"'):Gf.info(`Found and loaded ambient Remark configuration from "${r}"`),t}throw new Error("Failed to load ambient remark configuration")}var Jf=Wb.merge(L.object({assetsPath:L.string().optional(),packageFile:L.string().optional()})).describe("Config Extension");async function Ut(e){let{additionalConfig:t,additionalRules:r,searchFrom:n}=e??{},i={addMetaComment:!1,assetsPath:"./assets",closingPrefix:"/",keywordPrefix:"",metaCommentIdentifier:"+",packageFile:await Kf(),rules:{mdat:"Powered by the Markdown Autophagic Template system: [mdat](https://github.com/kitschpatrol/mdat)."}},o=Yf("mdat",{loaders:{".ts":Xf()}}),a=await o.search(n);if(a){let{config:s,filepath:u}=a,l=s;if(Ft.info(`Using config from "${u}"`),u.endsWith("package.json")&&typeof s=="string"){Ft.info(`Detected shared config string: "${s}"`);let{default:f}=await import(s);l=f}let c=Qf(l,Jf);c&&(i=Qo(i,c))}if(t!==void 0){let s=Array.isArray(t)?t:[t];for(let u of s){let l;if(typeof u=="string"){let f=await o.load(u);if(f==null)continue;let{config:p,filepath:m}=f;Ft.info(`Loaded additional config from "${m}"`),l=p}else l=u;if(l===void 0)continue;Ft.info("Merging configuration object");let c=Qf(l,Jf);c!==void 0&&(i=Qo(i,c))}}if(r!==void 0){let s=Array.isArray(r)?r:[r],u=Yf("mdat",{loaders:{".json":Eu,".ts":Xf()}});for(let l of s){let c;if(typeof l=="string"){let p;if(ep.basename(l).endsWith("package.json")){let E=await Gb.readFile(l,"utf8");p={config:Eu(l,E),filepath:l}}else p=await u.load(l);if(p==null)continue;let{config:m,filepath:h}=p;Ft.info(`Loaded additional config from "${h}"`),c=m}else c=l;if(c===void 0)continue;Ft.info("Merging rules into configuration object");let f=Zb(c,Kb);f!==void 0&&(i=Qo(i,f))}}if(i.rules){let s=Object.keys(i.rules).sort().map(u=>`"${fu.bold.green(u)}"`);Ft.info(`Loaded ${fu.bold(s.length)} mdat comment expansion ${mu("rule",s.length)}:`);for(let u of s)Ft.info(` ${u}`)}else Ft.error("No rules loaded from additional configurations or rules, using default.");return ea=i,i}function Zb(e,t){if(t.safeParse(e).success)return{rules:e};Ft.error(`Rules object has the wrong shape. Ignoring and using default configuration:
6
+ ${JSON.stringify(e,void 0,2)}`)}function Qf(e,t){if(t.safeParse(e).success)return e;Ft.error(`Config object has the wrong shape. Ignoring and using default configuration:
7
+ ${JSON.stringify(e,void 0,2)}`)}var ea;async function dn(){return ea===void 0&&(Ft.warn("getConfig(): config was undefined"),ea??=await Ut()),ea}var wu;async function Ct(){let{packageFile:e}=await dn();if(e===void 0)throw new Error("No packageFile found or set in config");if(wu??=await Hb({cwd:ep.dirname(e)}),wu===void 0)throw new Error("No package.json found");return wu}function Yb(e,t){return Qo(e,t)}var Xb={};function hr(e,t){let r=t||Xb,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return rp(e,n,i)}function rp(e,t,r){if(Jb(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return tp(e.children,t,r)}return Array.isArray(e)?tp(e,t,r):""}function tp(e,t,r){let n=[],i=-1;for(;++i<e.length;)n[i]=rp(e[i],t,r);return n.join("")}function Jb(e){return!!(e&&typeof e=="object")}var Su={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:`
8
+ `,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 Qb={}.hasOwnProperty;function Xn(e){return Qb.call(Su,e)?Su[e]:!1}function De(e,t,r,n){let i=e.length,o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);o<n.length;)a=n.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function st(e,t){return e.length>0?(De(e,e.length,0,t),e):t}var np={}.hasOwnProperty;function ta(e){let t={},r=-1;for(;++r<e.length;)ek(t,e[r]);return t}function ek(e,t){let r;for(r in t){let i=(np.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r],a;if(o)for(a in o){np.call(i,a)||(i[a]=[]);let s=o[a];tk(i[a],Array.isArray(s)?s:s?[s]:[])}}}function tk(e,t){let r=-1,n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);De(e,0,0,n)}function ra(e,t){let r=Number.parseInt(e,t);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 Qe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var je=_r(/[A-Za-z]/),$e=_r(/[\dA-Za-z]/),ip=_r(/[#-'*+\--9=?A-Z^-~]/);function hn(e){return e!==null&&(e<32||e===127)}var Qi=_r(/\d/),op=_r(/[\dA-Fa-f]/),ap=_r(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function Y(e){return e!==null&&(e<0||e===32)}function z(e){return e===-2||e===-1||e===32}var gn=_r(new RegExp("\\p{P}|\\p{S}","u")),Ht=_r(/\s/);function _r(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function U(e,t,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,o=0;return a;function a(u){return z(u)?(e.enter(r),s(u)):t(u)}function s(u){return z(u)&&o++<i?(e.consume(u),s):(e.exit(r),t(u))}}var sp={tokenize:rk};function rk(e){let t=e.attempt(this.parser.constructs.contentInitial,n,i),r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),U(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let u=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return R(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var lp={tokenize:nk},up={tokenize:ik};function nk(e){let t=this,r=[],n=0,i,o,a;return s;function s(y){if(n<r.length){let S=r[n];return t.containerState=S[1],e.attempt(S[0].continuation,u,l)(y)}return l(y)}function u(y){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();let S=t.events.length,v=S,A;for(;v--;)if(t.events[v][0]==="exit"&&t.events[v][1].type==="chunkFlow"){A=t.events[v][1].end;break}x(n);let te=S;for(;te<t.events.length;)t.events[te][1].end={...A},te++;return De(t.events,v+1,0,t.events.slice(S)),t.events.length=te,l(y)}return s(y)}function l(y){if(n===r.length){if(!i)return p(y);if(i.currentConstruct&&i.currentConstruct.concrete)return h(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(up,c,f)(y)}function c(y){return i&&k(),x(n),p(y)}function f(y){return t.parser.lazy[t.now().line]=n!==r.length,a=t.now().offset,h(y)}function p(y){return t.containerState={},e.attempt(up,m,h)(y)}function m(y){return n++,r.push([t.currentConstruct,t.containerState]),p(y)}function h(y){if(y===null){i&&k(),x(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),E(y)}function E(y){if(y===null){C(e.exit("chunkFlow"),!0),x(0),e.consume(y);return}return R(y)?(e.consume(y),C(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(y),E)}function C(y,S){let v=t.sliceStream(y);if(S&&v.push(null),y.previous=o,o&&(o.next=y),o=y,i.defineSkip(y.start),i.write(v),t.parser.lazy[y.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<a&&(!i.events[A][1].end||i.events[A][1].end.offset>a))return;let te=t.events.length,J=te,re,b;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){if(re){b=t.events[J][1].end;break}re=!0}for(x(n),A=te;A<t.events.length;)t.events[A][1].end={...b},A++;De(t.events,J+1,0,t.events.slice(te)),t.events.length=A}}function x(y){let S=r.length;for(;S-- >y;){let v=r[S];t.containerState=v[1],v[0].exit.call(t,e)}r.length=y}function k(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ik(e,t,r){return U(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gr(e){if(e===null||Y(e)||Ht(e))return 1;if(gn(e))return 2}function Ir(e,t,r){let n=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!n.includes(o)&&(t=o(t,r),n.push(o))}return t}var eo={name:"attention",resolveAll:ok,tokenize:ak};function ok(e,t){let r=-1,n,i,o,a,s,u,l,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let f={...e[n][1].end},p={...e[r][1].start};cp(f,-u),cp(p,u),a={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:u>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[n][1].end={...a.start},e[r][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=st(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=st(l,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),l=st(l,Ir(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=st(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,l=st(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,De(e,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function ak(e,t){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=gr(n),o;return a;function a(u){return o=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===o)return e.consume(u),s;let l=e.exit("attentionSequence"),c=gr(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)),t(u)}}function cp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var vu={name:"autolink",tokenize:sk};function sk(e,t,r){let n=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(m){return je(m)?(e.consume(m),a):m===64?r(m):l(m)}function a(m){return m===43||m===45||m===46||$e(m)?(n=1,s(m)):l(m)}function s(m){return m===58?(e.consume(m),n=0,u):(m===43||m===45||m===46||$e(m))&&n++<32?(e.consume(m),s):(n=0,l(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||hn(m)?r(m):(e.consume(m),u)}function l(m){return m===64?(e.consume(m),c):ip(m)?(e.consume(m),l):r(m)}function c(m){return $e(m)?f(m):r(m)}function f(m){return m===46?(e.consume(m),n=0,c):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||$e(m))&&n++<63){let h=m===45?p:f;return e.consume(m),h}return r(m)}}var Wt={partial:!0,tokenize:uk};function uk(e,t,r){return n;function n(o){return z(o)?U(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||R(o)?t(o):r(o)}}var na={continuation:{tokenize:ck},exit:fk,name:"blockQuote",tokenize:lk};function lk(e,t,r){let n=this;return i;function i(a){if(a===62){let s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return r(a)}function o(a){return z(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function ck(e,t,r){let n=this;return i;function i(a){return z(a)?U(e,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(na,t,r)(a)}}function fk(e){e.exit("blockQuote")}var ia={name:"characterEscape",tokenize:pk};function pk(e,t,r){return n;function n(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return ap(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}var oa={name:"characterReference",tokenize:mk};function mk(e,t,r){let n=this,i=0,o,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,a=$e,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=op,c):(e.enter("characterReferenceValue"),o=7,a=Qi,c(f))}function c(f){if(f===59&&i){let p=e.exit("characterReferenceValue");return a===$e&&!Xn(n.sliceSerialize(p))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<o?(e.consume(f),c):r(f)}}var fp={partial:!0,tokenize:hk},aa={concrete:!0,name:"codeFenced",tokenize:dk};function dk(e,t,r){let n=this,i={partial:!0,tokenize:v},o=0,a=0,s;return u;function u(A){return l(A)}function l(A){let te=n.events[n.events.length-1];return o=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,s=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(A)}function c(A){return A===s?(a++,e.consume(A),c):a<3?r(A):(e.exit("codeFencedFenceSequence"),z(A)?U(e,f,"whitespace")(A):f(A))}function f(A){return A===null||R(A)?(e.exit("codeFencedFence"),n.interrupt?t(A):e.check(fp,E,S)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||R(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(A)):z(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,m,"whitespace")(A)):A===96&&A===s?r(A):(e.consume(A),p)}function m(A){return A===null||R(A)?f(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(A))}function h(A){return A===null||R(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(A)):A===96&&A===s?r(A):(e.consume(A),h)}function E(A){return e.attempt(i,S,C)(A)}function C(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),x}function x(A){return o>0&&z(A)?U(e,k,"linePrefix",o+1)(A):k(A)}function k(A){return A===null||R(A)?e.check(fp,E,S)(A):(e.enter("codeFlowValue"),y(A))}function y(A){return A===null||R(A)?(e.exit("codeFlowValue"),k(A)):(e.consume(A),y)}function S(A){return e.exit("codeFenced"),t(A)}function v(A,te,J){let re=0;return b;function b(G){return A.enter("lineEnding"),A.consume(G),A.exit("lineEnding"),ce}function ce(G){return A.enter("codeFencedFence"),z(G)?U(A,Q,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):Q(G)}function Q(G){return G===s?(A.enter("codeFencedFenceSequence"),B(G)):J(G)}function B(G){return G===s?(re++,A.consume(G),B):re>=a?(A.exit("codeFencedFenceSequence"),z(G)?U(A,V,"whitespace")(G):V(G)):J(G)}function V(G){return G===null||R(G)?(A.exit("codeFencedFence"),te(G)):J(G)}}}function hk(e,t,r){let n=this;return i;function i(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}var to={name:"codeIndented",tokenize:xk},gk={partial:!0,tokenize:yk};function xk(e,t,r){let n=this;return i;function i(l){return e.enter("codeIndented"),U(e,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?a(l):r(l)}function a(l){return l===null?u(l):R(l)?e.attempt(gk,a,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||R(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function yk(e,t,r){let n=this;return i;function i(a){return n.parser.lazy[n.now().line]?r(a):R(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):U(e,o,"linePrefix",5)(a)}function o(a){let s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):R(a)?i(a):r(a)}}var _u={name:"codeText",previous:bk,resolve:Ek,tokenize:kk};function Ek(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function bk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kk(e,t,r){let n=this,i=0,o,a;return s;function s(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),i++,u):(e.exit("codeTextSequence"),l(p))}function l(p){return p===null?r(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),l):p===96?(a=e.enter("codeTextSequence"),o=0,f(p)):R(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||R(p)?(e.exit("codeTextData"),l(p)):(e.consume(p),c)}function f(p){return p===96?(e.consume(p),o++,f):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",c(p))}}var sa=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){let n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){let i=r||0;this.setCursor(Math.trunc(t));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&ro(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ro(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ro(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let r=this.left.splice(t,Number.POSITIVE_INFINITY);ro(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ro(this.left,r.reverse())}}};function ro(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function ua(e){let t={},r=-1,n,i,o,a,s,u,l,c=new sa(e);for(;++r<c.length;){for(;r in t;)r=t[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(t,Ak(c,r)),r=t[r],l=!0);else if(n[1]._container){for(o=r,i=void 0;o--;)if(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(n[1].end={...c.get(i)[1].start},s=c.slice(i,r),s.unshift(n),c.splice(i,r-i+1,s))}}return De(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function Ak(e,t){let r=e.get(t)[1],n=e.get(t)[2],i=t-1,o=[],a=r._tokenizer;a||(a=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));let s=a.events,u=[],l={},c,f,p=-1,m=r,h=0,E=0,C=[E];for(;m;){for(;e.get(++i)[1]!==m;);o.push(i),m._tokenizer||(c=n.sliceStream(m),m.next||c.push(null),f&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=r;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(E=p+1,C.push(E),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):C.pop(),p=C.length;p--;){let x=s.slice(C[p],C[p+1]),k=o.pop();u.push([k,k+x.length-1]),e.splice(k,2,x)}for(u.reverse(),p=-1;++p<u.length;)l[h+u[p][0]]=h+u[p][1],h+=u[p][1]-u[p][0]-1;return l}var Iu={resolve:Ck,tokenize:wk},Tk={partial:!0,tokenize:Sk};function Ck(e){return ua(e),e}function wk(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):R(s)?e.check(Tk,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function Sk(e,t,r){let n=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),U(e,o,"linePrefix")}function o(a){if(a===null||R(a))return r(a);let s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}function la(e,t,r,n,i,o,a,s,u){let l=u||Number.POSITIVE_INFINITY,c=0;return f;function f(x){return x===60?(e.enter(n),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||hn(x)?r(x):(e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),E(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===62?(e.exit("chunkString"),e.exit(s),p(x)):x===null||x===60||R(x)?r(x):(e.consume(x),x===92?h:m)}function h(x){return x===60||x===62||x===92?(e.consume(x),m):m(x)}function E(x){return!c&&(x===null||x===41||Y(x))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(x)):c<l&&x===40?(e.consume(x),c++,E):x===41?(e.consume(x),c--,E):x===null||x===32||x===40||hn(x)?r(x):(e.consume(x),x===92?C:E)}function C(x){return x===40||x===41||x===92?(e.consume(x),E):E(x)}}function ca(e,t,r,n,i,o){let a=this,s=0,u;return l;function l(m){return e.enter(n),e.enter(i),e.consume(m),e.exit(i),e.enter(o),c}function c(m){return s>999||m===null||m===91||m===93&&!u||m===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?r(m):m===93?(e.exit(o),e.enter(i),e.consume(m),e.exit(i),e.exit(n),t):R(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||R(m)||s++>999?(e.exit("chunkString"),c(m)):(e.consume(m),u||(u=!z(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),s++,f):f(m)}}function fa(e,t,r,n,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(n),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,u):r(p)}function u(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):(e.enter(o),l(p))}function l(p){return p===a?(e.exit(o),u(a)):p===null?r(p):R(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),U(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||R(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(e.consume(p),c):c(p)}}function xn(e,t){let r;return n;function n(i){return R(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):z(i)?U(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}var Ru={name:"definition",tokenize:_k},vk={partial:!0,tokenize:Ik};function _k(e,t,r){let n=this,i;return o;function o(m){return e.enter("definition"),a(m)}function a(m){return ca.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function s(m){return i=Qe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):r(m)}function u(m){return Y(m)?xn(e,l)(m):l(m)}function l(m){return la(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function c(m){return e.attempt(vk,f,f)(m)}function f(m){return z(m)?U(e,p,"whitespace")(m):p(m)}function p(m){return m===null||R(m)?(e.exit("definition"),n.parser.defined.push(i),t(m)):r(m)}}function Ik(e,t,r){return n;function n(s){return Y(s)?xn(e,i)(s):r(s)}function i(s){return fa(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return z(s)?U(e,a,"whitespace")(s):a(s)}function a(s){return s===null||R(s)?t(s):r(s)}}var Du={name:"hardBreakEscape",tokenize:Rk};function Rk(e,t,r){return n;function n(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return R(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}var Fu={name:"headingAtx",resolve:Dk,tokenize:Fk};function Dk(e,t){let r=e.length-2,n=3,i,o;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},o={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},De(e,n,r-n+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Fk(e,t,r){let n=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&n++<6?(e.consume(c),a):c===null||Y(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||R(c)?(e.exit("atxHeading"),t(c)):z(c)?U(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||Y(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}var pp=["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"],Ou=["pre","script","style","textarea"];var Nu={concrete:!0,name:"htmlFlow",resolveTo:Lk,tokenize:Pk},Ok={partial:!0,tokenize:Bk},Nk={partial:!0,tokenize:Mk};function Lk(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Pk(e,t,r){let n=this,i,o,a,s,u;return l;function l(g){return c(g)}function c(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),f}function f(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,E):g===63?(e.consume(g),i=3,n.interrupt?t:d):je(g)?(e.consume(g),a=String.fromCharCode(g),C):r(g)}function p(g){return g===45?(e.consume(g),i=2,m):g===91?(e.consume(g),i=5,s=0,h):je(g)?(e.consume(g),i=4,n.interrupt?t:d):r(g)}function m(g){return g===45?(e.consume(g),n.interrupt?t:d):r(g)}function h(g){let Xe="CDATA[";return g===Xe.charCodeAt(s++)?(e.consume(g),s===Xe.length?n.interrupt?t:Q:h):r(g)}function E(g){return je(g)?(e.consume(g),a=String.fromCharCode(g),C):r(g)}function C(g){if(g===null||g===47||g===62||Y(g)){let Xe=g===47,ze=a.toLowerCase();return!Xe&&!o&&Ou.includes(ze)?(i=1,n.interrupt?t(g):Q(g)):pp.includes(a.toLowerCase())?(i=6,Xe?(e.consume(g),x):n.interrupt?t(g):Q(g)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(g):o?k(g):y(g))}return g===45||$e(g)?(e.consume(g),a+=String.fromCharCode(g),C):r(g)}function x(g){return g===62?(e.consume(g),n.interrupt?t:Q):r(g)}function k(g){return z(g)?(e.consume(g),k):b(g)}function y(g){return g===47?(e.consume(g),b):g===58||g===95||je(g)?(e.consume(g),S):z(g)?(e.consume(g),y):b(g)}function S(g){return g===45||g===46||g===58||g===95||$e(g)?(e.consume(g),S):v(g)}function v(g){return g===61?(e.consume(g),A):z(g)?(e.consume(g),v):y(g)}function A(g){return g===null||g===60||g===61||g===62||g===96?r(g):g===34||g===39?(e.consume(g),u=g,te):z(g)?(e.consume(g),A):J(g)}function te(g){return g===u?(e.consume(g),u=null,re):g===null||R(g)?r(g):(e.consume(g),te)}function J(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Y(g)?v(g):(e.consume(g),J)}function re(g){return g===47||g===62||z(g)?y(g):r(g)}function b(g){return g===62?(e.consume(g),ce):r(g)}function ce(g){return g===null||R(g)?Q(g):z(g)?(e.consume(g),ce):r(g)}function Q(g){return g===45&&i===2?(e.consume(g),ae):g===60&&i===1?(e.consume(g),xe):g===62&&i===4?(e.consume(g),it):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),Et):R(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ok,vt,B)(g)):g===null||R(g)?(e.exit("htmlFlowData"),B(g)):(e.consume(g),Q)}function B(g){return e.check(Nk,V,vt)(g)}function V(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),G}function G(g){return g===null||R(g)?B(g):(e.enter("htmlFlowData"),Q(g))}function ae(g){return g===45?(e.consume(g),d):Q(g)}function xe(g){return g===47?(e.consume(g),a="",Ye):Q(g)}function Ye(g){if(g===62){let Xe=a.toLowerCase();return Ou.includes(Xe)?(e.consume(g),it):Q(g)}return je(g)&&a.length<8?(e.consume(g),a+=String.fromCharCode(g),Ye):Q(g)}function Et(g){return g===93?(e.consume(g),d):Q(g)}function d(g){return g===62?(e.consume(g),it):g===45&&i===2?(e.consume(g),d):Q(g)}function it(g){return g===null||R(g)?(e.exit("htmlFlowData"),vt(g)):(e.consume(g),it)}function vt(g){return e.exit("htmlFlow"),t(g)}}function Mk(e,t,r){let n=this;return i;function i(a){return R(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):r(a)}function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function Bk(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Wt,t,r)}}var Lu={name:"htmlText",tokenize:Uk};function Uk(e,t,r){let n=this,i,o,a;return s;function s(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),u}function u(d){return d===33?(e.consume(d),l):d===47?(e.consume(d),v):d===63?(e.consume(d),y):je(d)?(e.consume(d),J):r(d)}function l(d){return d===45?(e.consume(d),c):d===91?(e.consume(d),o=0,h):je(d)?(e.consume(d),k):r(d)}function c(d){return d===45?(e.consume(d),m):r(d)}function f(d){return d===null?r(d):d===45?(e.consume(d),p):R(d)?(a=f,xe(d)):(e.consume(d),f)}function p(d){return d===45?(e.consume(d),m):f(d)}function m(d){return d===62?ae(d):d===45?p(d):f(d)}function h(d){let it="CDATA[";return d===it.charCodeAt(o++)?(e.consume(d),o===it.length?E:h):r(d)}function E(d){return d===null?r(d):d===93?(e.consume(d),C):R(d)?(a=E,xe(d)):(e.consume(d),E)}function C(d){return d===93?(e.consume(d),x):E(d)}function x(d){return d===62?ae(d):d===93?(e.consume(d),x):E(d)}function k(d){return d===null||d===62?ae(d):R(d)?(a=k,xe(d)):(e.consume(d),k)}function y(d){return d===null?r(d):d===63?(e.consume(d),S):R(d)?(a=y,xe(d)):(e.consume(d),y)}function S(d){return d===62?ae(d):y(d)}function v(d){return je(d)?(e.consume(d),A):r(d)}function A(d){return d===45||$e(d)?(e.consume(d),A):te(d)}function te(d){return R(d)?(a=te,xe(d)):z(d)?(e.consume(d),te):ae(d)}function J(d){return d===45||$e(d)?(e.consume(d),J):d===47||d===62||Y(d)?re(d):r(d)}function re(d){return d===47?(e.consume(d),ae):d===58||d===95||je(d)?(e.consume(d),b):R(d)?(a=re,xe(d)):z(d)?(e.consume(d),re):ae(d)}function b(d){return d===45||d===46||d===58||d===95||$e(d)?(e.consume(d),b):ce(d)}function ce(d){return d===61?(e.consume(d),Q):R(d)?(a=ce,xe(d)):z(d)?(e.consume(d),ce):re(d)}function Q(d){return d===null||d===60||d===61||d===62||d===96?r(d):d===34||d===39?(e.consume(d),i=d,B):R(d)?(a=Q,xe(d)):z(d)?(e.consume(d),Q):(e.consume(d),V)}function B(d){return d===i?(e.consume(d),i=void 0,G):d===null?r(d):R(d)?(a=B,xe(d)):(e.consume(d),B)}function V(d){return d===null||d===34||d===39||d===60||d===61||d===96?r(d):d===47||d===62||Y(d)?re(d):(e.consume(d),V)}function G(d){return d===47||d===62||Y(d)?re(d):r(d)}function ae(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):r(d)}function xe(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ye}function Ye(d){return z(d)?U(e,Et,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):Et(d)}function Et(d){return e.enter("htmlTextData"),a(d)}}var yn={name:"labelEnd",resolveAll:qk,resolveTo:Vk,tokenize:Gk},zk={tokenize:Hk},jk={tokenize:Wk},$k={tokenize:Kk};function qk(e){let t=-1,r=[];for(;++t<e.length;){let n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&De(e,0,e.length,r),e}function Vk(e,t){let r=e.length,n=0,i,o,a,s;for(;r--;)if(i=e[r][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(a=r);let u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[o+n+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",u,t],["enter",l,t]],s=st(s,e.slice(o+1,o+n+3)),s=st(s,[["enter",c,t]]),s=st(s,Ir(t.parser.constructs.insideSpan.null,e.slice(o+n+4,a-3),t)),s=st(s,[["exit",c,t],e[a-2],e[a-1],["exit",l,t]]),s=st(s,e.slice(a+1)),s=st(s,[["exit",u,t]]),De(e,o,e.length,s),e}function Gk(e,t,r){let n=this,i=n.events.length,o,a;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 s;function s(p){return o?o._inactive?f(p):(a=n.parser.defined.includes(Qe(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):r(p)}function u(p){return p===40?e.attempt(zk,c,a?c:f)(p):p===91?e.attempt(jk,c,a?l:f)(p):a?c(p):f(p)}function l(p){return e.attempt($k,c,f)(p)}function c(p){return t(p)}function f(p){return o._balanced=!0,r(p)}}function Hk(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Y(f)?xn(e,o)(f):o(f)}function o(f){return f===41?c(f):la(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Y(f)?xn(e,u)(f):c(f)}function s(f){return r(f)}function u(f){return f===34||f===39||f===40?fa(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return Y(f)?xn(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function Wk(e,t,r){let n=this;return i;function i(s){return ca.call(n,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return n.parser.defined.includes(Qe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function a(s){return r(s)}}function Kk(e,t,r){return n;function n(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}var Pu={name:"labelStartImage",resolveAll:yn.resolveAll,tokenize:Zk};function Zk(e,t,r){let n=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):r(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}var Mu={name:"labelStartLink",resolveAll:yn.resolveAll,tokenize:Yk};function Yk(e,t,r){let n=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}var no={name:"lineEnding",tokenize:Xk};function Xk(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),U(e,t,"linePrefix")}}var En={name:"thematicBreak",tokenize:Jk};function Jk(e,t,r){let n=0,i;return o;function o(l){return e.enter("thematicBreak"),a(l)}function a(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):n>=3&&(l===null||R(l))?(e.exit("thematicBreak"),t(l)):r(l)}function u(l){return l===i?(e.consume(l),n++,u):(e.exit("thematicBreakSequence"),z(l)?U(e,s,"whitespace")(l):s(l))}}var et={continuation:{tokenize:rA},exit:iA,name:"list",tokenize:tA},Qk={partial:!0,tokenize:oA},eA={partial:!0,tokenize:nA};function tA(e,t,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,a=0;return s;function s(m){let h=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:Qi(m)){if(n.containerState.type||(n.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(En,r,l)(m):l(m);if(!n.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return r(m)}function u(m){return Qi(m)&&++a<10?(e.consume(m),u):(!n.interrupt||a<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),l(m)):r(m)}function l(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,e.check(Wt,n.interrupt?r:c,e.attempt(Qk,p,f))}function c(m){return n.containerState.initialBlankLine=!0,o++,p(m)}function f(m){return z(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):r(m)}function p(m){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function rA(e,t,r){let n=this;return n.containerState._closeFlow=void 0,e.check(Wt,i,o);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,U(e,t,"listItemIndent",n.containerState.size+1)(s)}function o(s){return n.containerState.furtherBlankLines||!z(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(eA,t,a)(s))}function a(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,U(e,e.attempt(et,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function nA(e,t,r){let n=this;return U(e,i,"listItemIndent",n.containerState.size+1);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(o):r(o)}}function iA(e){e.exit(this.containerState.type)}function oA(e,t,r){let n=this;return U(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let a=n.events[n.events.length-1];return!z(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}var pa={name:"setextUnderline",resolveTo:aA,tokenize:sA};function aA(e,t){let r=e.length,n,i,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);let a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,t]),e}function sA(e,t,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)?(e.enter("setextHeadingLine"),i=l,a(l)):r(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),z(l)?U(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||R(l)?(e.exit("setextHeadingLine"),t(l)):r(l)}}var mp={tokenize:uA};function uA(e){let t=this,r=e.attempt(Wt,n,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Iu,i)),"linePrefix")));return r;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var dp={resolveAll:yp()},hp=xp("string"),gp=xp("text");function xp(e){return{resolveAll:yp(e==="text"?lA:void 0),tokenize:t};function t(r){let n=this,i=this.parser.constructs[e],o=r.attempt(i,a,s);return a;function a(c){return l(c)?o(c):s(c)}function s(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 m=f[p];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}function yp(e){return t;function t(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 e?e(r,n):r}}function lA(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let n=e[r-1][1],i=t.sliceStream(n),o=i.length,a=-1,s=0,u;for(;o--;){let l=i[o];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)u=!0,s++;else if(l!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(s=0),s){let l={type:r===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:n.start._bufferIndex+a,_index:n.start._index+o,line:n.end.line,column:n.end.column-s,offset:n.end.offset-s},end:{...n.end}};n.end={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}var Bu={};oE(Bu,{attentionMarkers:()=>xA,contentInitial:()=>fA,disable:()=>yA,document:()=>cA,flow:()=>mA,flowInitial:()=>pA,insideSpan:()=>gA,string:()=>dA,text:()=>hA});var cA={42:et,43:et,45:et,48:et,49:et,50:et,51:et,52:et,53:et,54:et,55:et,56:et,57:et,62:na},fA={91:Ru},pA={[-2]:to,[-1]:to,32:to},mA={35:Fu,42:En,45:[pa,En],60:Nu,61:pa,95:En,96:aa,126:aa},dA={38:oa,92:ia},hA={[-5]:no,[-4]:no,[-3]:no,33:Pu,38:oa,42:eo,60:[vu,Lu],91:Mu,92:[Du,ia],93:yn,95:eo,96:_u},gA={null:[eo,dp]},xA={null:[42,95]},yA={null:[]};function Ep(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},i={},o=[],a=[],s=[],u=!0,l={attempt:re(te),check:re(J),consume:S,enter:v,exit:A,interrupt:re(J,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:C,parser:e,previous:null,sliceSerialize:h,sliceStream:E,write:m},f=t.tokenize.call(c,l),p;return t.resolveAll&&o.push(t),c;function m(B){return a=st(a,B),k(),a[a.length-1]!==null?[]:(b(t,0),c.events=Ir(o,c.events,c),c.events)}function h(B,V){return bA(E(B),V)}function E(B){return EA(a,B)}function C(){let{_bufferIndex:B,_index:V,line:G,column:ae,offset:xe}=n;return{_bufferIndex:B,_index:V,line:G,column:ae,offset:xe}}function x(B){i[B.line]=B.column,Q()}function k(){let B;for(;n._index<a.length;){let V=a[n._index];if(typeof V=="string")for(B=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===B&&n._bufferIndex<V.length;)y(V.charCodeAt(n._bufferIndex));else y(V)}}function y(B){u=void 0,p=B,f=f(B)}function S(B){R(B)?(n.line++,n.column=1,n.offset+=B===-3?2:1,Q()):B!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=B,u=!0}function v(B,V){let G=V||{};return G.type=B,G.start=C(),c.events.push(["enter",G,c]),s.push(G),G}function A(B){let V=s.pop();return V.end=C(),c.events.push(["exit",V,c]),V}function te(B,V){b(B,V.from)}function J(B,V){V.restore()}function re(B,V){return G;function G(ae,xe,Ye){let Et,d,it,vt;return Array.isArray(ae)?Xe(ae):"tokenize"in ae?Xe([ae]):g(ae);function g(se){return _t;function _t(Te){let Ke=Te!==null&&se[Te],ot=Te!==null&&se.null,bt=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(ot)?ot:ot?[ot]:[]];return Xe(bt)(Te)}}function Xe(se){return Et=se,d=0,se.length===0?Ye:ze(se[d])}function ze(se){return _t;function _t(Te){return vt=ce(),it=se,se.partial||(c.currentConstruct=se),se.name&&c.parser.constructs.disable.null.includes(se.name)?Re(Te):se.tokenize.call(V?Object.assign(Object.create(c),V):c,l,Pn,Re)(Te)}}function Pn(se){return u=!0,B(it,vt),xe}function Re(se){return u=!0,vt.restore(),++d<Et.length?ze(Et[d]):Ye}}}function b(B,V){B.resolveAll&&!o.includes(B)&&o.push(B),B.resolve&&De(c.events,V,c.events.length-V,B.resolve(c.events.slice(V),c)),B.resolveTo&&(c.events=B.resolveTo(c.events,c))}function ce(){let B=C(),V=c.previous,G=c.currentConstruct,ae=c.events.length,xe=Array.from(s);return{from:ae,restore:Ye};function Ye(){n=B,c.previous=V,c.currentConstruct=G,c.events.length=ae,s=xe,Q()}}function Q(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function EA(e,t){let r=t.start._index,n=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex,a;if(r===i)a=[e[r].slice(n,o)];else{if(a=e.slice(r,i),n>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(n):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function bA(e,t){let r=-1,n=[],i;for(;++r<e.length;){let o=e[r],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
9
9
  `;break}case-3:{a=`\r
10
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,n.push(a)}return n.join("")}function Uu(e){let n={constructs:ta([Bu,...(e||{}).extensions||[]]),content:i(ap),defined:[],document:i(up),flow:i(pp),lazy:{},string:i(dp),text:i(hp)};return n;function i(o){return a;function a(s){return yp(n,o,s)}}}function zu(e){for(;!ua(e););return e}var Ep=/[\0\t\n\r]/g;function ju(){let e=1,t="",r=!0,n;return i;function i(o,a,s){let u=[],l,c,f,p,m;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),f=0,t="",r&&(o.charCodeAt(0)===65279&&f++,r=void 0);f<o.length;){if(Ep.lastIndex=f,l=Ep.exec(o),p=l&&l.index!==void 0?l.index:o.length,m=o.charCodeAt(p),!l){t=o.slice(f);break}if(m===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)),e+=p-f),m){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}f=p+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}var gA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ma(e){return e.replace(gA,xA)}function xA(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),o=i===120||i===88;return ra(r.slice(o?2:1),o?16:10)}return Xn(r)||e}function Jn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bp(e.position):"start"in e||"end"in e?bp(e):"line"in e||"column"in e?$u(e):""}function $u(e){return kp(e&&e.line)+":"+kp(e&&e.column)}function bp(e){return $u(e&&e.start)+"-"+$u(e&&e.end)}function kp(e){return e&&typeof e=="number"?e:1}var Tp={}.hasOwnProperty;function qu(e,t,r){return typeof t!="string"&&(r=t,t=void 0),yA(r)(zu(Uu(r).document().write(ju()(e,t,!0))))}function yA(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ff),autolinkProtocol:re,autolinkEmail:re,atxHeading:o(Mn),blockQuote:o(Te),characterEscape:re,characterReference:re,codeFenced:o(Ke),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Ke,a),codeText:o(ot,a),codeTextData:re,data:re,codeFlowValue:re,definition:o(bt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(sr),hardBreakEscape:o(qi),hardBreakTrailing:o(qi),htmlFlow:o(cf,a),htmlFlowData:re,htmlText:o(cf,a),htmlTextData:re,image:o(qy),label:a,link:o(ff),listItem:o(Vy),listItemValue:p,listOrdered:o(pf,f),listUnordered:o(pf),paragraph:o(Gy),reference:g,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Mn),strong:o(Hy),thematicBreak:o(Ky)},exit:{atxHeading:u(),atxHeadingSequence:v,autolink:u(),autolinkEmail:_t,autolinkProtocol:se,blockQuote:u(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:ze,characterReferenceMarkerNumeric:ze,characterReferenceValue:Pn,characterReference:Re,codeFenced:u(C),codeFencedFence:E,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:b,codeIndented:u(x),codeText:u(G),codeTextData:b,data:b,definition:u(),definitionDestinationString:S,definitionLabelString:k,definitionTitleString:y,emphasis:u(),hardBreakEscape:u(Q),hardBreakTrailing:u(Q),htmlFlow:u(B),htmlFlowData:b,htmlText:u(V),htmlTextData:b,image:u(xe),label:Et,labelText:Ye,lineEnding:ce,link:u(ae),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Xe,resourceDestinationString:d,resourceTitleString:it,resource:vt,setextHeading:u(J),setextHeadingLineSequence:te,setextHeadingText:A,strong:u(),thematicBreak:u()}};Cp(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(T){let _={type:"root",children:[]},W={stack:[_],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:c,data:r},ne=[],fe=-1;for(;++fe<T.length;)if(T[fe][1].type==="listOrdered"||T[fe][1].type==="listUnordered")if(T[fe][0]==="enter")ne.push(fe);else{let Pt=ne.pop();fe=i(T,Pt,fe)}for(fe=-1;++fe<T.length;){let Pt=t[T[fe][0]];Tp.call(Pt,T[fe][1].type)&&Pt[T[fe][1].type].call(Object.assign({sliceSerialize:T[fe][2].sliceSerialize},W),T[fe][1])}if(W.tokenStack.length>0){let Pt=W.tokenStack[W.tokenStack.length-1];(Pt[1]||Ap).call(W,void 0,Pt[0])}for(_.position={start:Rr(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:Rr(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)_=t.transforms[fe](_)||_;return _}function i(T,_,W){let ne=_-1,fe=-1,Pt=!1,Yr,ur,Vi,Gi;for(;++ne<=W;){let kt=T[ne];switch(kt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{kt[0]==="enter"?fe++:fe--,Gi=void 0;break}case"lineEndingBlank":{kt[0]==="enter"&&(Yr&&!Gi&&!fe&&!Vi&&(Vi=ne),Gi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Gi=void 0}if(!fe&&kt[0]==="enter"&&kt[1].type==="listItemPrefix"||fe===-1&&kt[0]==="exit"&&(kt[1].type==="listUnordered"||kt[1].type==="listOrdered")){if(Yr){let Bn=ne;for(ur=void 0;Bn--;){let lr=T[Bn];if(lr[1].type==="lineEnding"||lr[1].type==="lineEndingBlank"){if(lr[0]==="exit")continue;ur&&(T[ur][1].type="lineEndingBlank",Pt=!0),lr[1].type="lineEnding",ur=Bn}else if(!(lr[1].type==="linePrefix"||lr[1].type==="blockQuotePrefix"||lr[1].type==="blockQuotePrefixWhitespace"||lr[1].type==="blockQuoteMarker"||lr[1].type==="listItemIndent"))break}Vi&&(!ur||Vi<ur)&&(Yr._spread=!0),Yr.end=Object.assign({},ur?T[ur][1].start:kt[1].end),T.splice(ur||ne,0,["exit",Yr,kt[2]]),ne++,W++}if(kt[1].type==="listItemPrefix"){let Bn={type:"listItem",_spread:!1,start:Object.assign({},kt[1].start),end:void 0};Yr=Bn,T.splice(ne,0,["enter",Bn,kt[2]]),ne++,W++,Vi=void 0,Gi=!0}}}return T[_][1]._spread=Pt,W}function o(T,_){return W;function W(ne){s.call(this,T(ne),ne),_&&_.call(this,ne)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(T,_,W){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([_,W||void 0]),T.position={start:Rr(_.start),end:void 0}}function u(T){return _;function _(W){T&&T.call(this,W),l.call(this,W)}}function l(T,_){let W=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==T.type&&(_?_.call(this,T,ne[0]):(ne[1]||Ap).call(this,T,ne[0]));else throw new Error("Cannot close `"+T.type+"` ("+Jn({start:T.start,end:T.end})+"): it\u2019s not open");W.position.end=Rr(T.end)}function c(){return hr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(T){if(this.data.expectingFirstListItemValue){let _=this.stack[this.stack.length-2];_.start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0}}function m(){let T=this.resume(),_=this.stack[this.stack.length-1];_.lang=T}function h(){let T=this.resume(),_=this.stack[this.stack.length-1];_.meta=T}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T.replace(/(\r?\n|\r)$/g,"")}function k(T){let _=this.resume(),W=this.stack[this.stack.length-1];W.label=_,W.identifier=Qe(this.sliceSerialize(T)).toLowerCase()}function y(){let T=this.resume(),_=this.stack[this.stack.length-1];_.title=T}function S(){let T=this.resume(),_=this.stack[this.stack.length-1];_.url=T}function v(T){let _=this.stack[this.stack.length-1];if(!_.depth){let W=this.sliceSerialize(T).length;_.depth=W}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function te(T){let _=this.stack[this.stack.length-1];_.depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function re(T){let W=this.stack[this.stack.length-1].children,ne=W[W.length-1];(!ne||ne.type!=="text")&&(ne=Wy(),ne.position={start:Rr(T.start),end:void 0},W.push(ne)),this.stack.push(ne)}function b(T){let _=this.stack.pop();_.value+=this.sliceSerialize(T),_.position.end=Rr(T.end)}function ce(T){let _=this.stack[this.stack.length-1];if(this.data.atHardBreak){let W=_.children[_.children.length-1];W.position.end=Rr(T.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_.type)&&(re.call(this,T),b.call(this,T))}function Q(){this.data.atHardBreak=!0}function B(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T}function V(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T}function G(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T}function ae(){let T=this.stack[this.stack.length-1];if(this.data.inReference){let _=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=_,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function xe(){let T=this.stack[this.stack.length-1];if(this.data.inReference){let _=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=_,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function Ye(T){let _=this.sliceSerialize(T),W=this.stack[this.stack.length-2];W.label=ma(_),W.identifier=Qe(_).toLowerCase()}function Et(){let T=this.stack[this.stack.length-1],_=this.resume(),W=this.stack[this.stack.length-1];if(this.data.inReference=!0,W.type==="link"){let ne=T.children;W.children=ne}else W.alt=_}function d(){let T=this.resume(),_=this.stack[this.stack.length-1];_.url=T}function it(){let T=this.resume(),_=this.stack[this.stack.length-1];_.title=T}function vt(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function Xe(T){let _=this.resume(),W=this.stack[this.stack.length-1];W.label=_,W.identifier=Qe(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function ze(T){this.data.characterReferenceType=T.type}function Pn(T){let _=this.sliceSerialize(T),W=this.data.characterReferenceType,ne;W?(ne=ra(_,W==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=Xn(_);let fe=this.stack[this.stack.length-1];fe.value+=ne}function Re(T){let _=this.stack.pop();_.position.end=Rr(T.end)}function se(T){b.call(this,T);let _=this.stack[this.stack.length-1];_.url=this.sliceSerialize(T)}function _t(T){b.call(this,T);let _=this.stack[this.stack.length-1];_.url="mailto:"+this.sliceSerialize(T)}function Te(){return{type:"blockquote",children:[]}}function Ke(){return{type:"code",lang:null,meta:null,value:""}}function ot(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function sr(){return{type:"emphasis",children:[]}}function Mn(){return{type:"heading",depth:0,children:[]}}function qi(){return{type:"break"}}function cf(){return{type:"html",value:""}}function qy(){return{type:"image",title:null,url:"",alt:null}}function ff(){return{type:"link",title:null,url:"",children:[]}}function pf(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function Vy(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function Gy(){return{type:"paragraph",children:[]}}function Hy(){return{type:"strong",children:[]}}function Wy(){return{type:"text",value:""}}function Ky(){return{type:"thematicBreak"}}}function Rr(e){return{line:e.line,column:e.column,offset:e.offset}}function Cp(e,t){let r=-1;for(;++r<t.length;){let n=t[r];Array.isArray(n)?Cp(e,n):EA(e,n)}}function EA(e,t){let r;for(r in t)if(Tp.call(t,r))switch(r){case"canContainEols":{let n=t[r];n&&e[r].push(...n);break}case"transforms":{let n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{let n=t[r];n&&Object.assign(e[r],n);break}}}function Ap(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Jn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Jn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Jn({start:t.start,end:t.end})+") is still open")}function da(e){let t=this;t.parser=r;function r(n){return qu(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var wp={}.hasOwnProperty;function Sp(e,t){let r=t||{};function n(i,...o){let a=n.invalid,s=n.handlers;if(i&&wp.call(i,e)){let u=String(i[e]);a=wp.call(s,u)?s[u]:n.unknown}if(a)return a.call(this,i,...o)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var bA={}.hasOwnProperty;function Vu(e,t){let r=-1,n;if(t.extensions)for(;++r<t.extensions.length;)Vu(e,t.extensions[r]);for(n in t)if(bA.call(t,n))switch(n){case"extensions":break;case"unsafe":{vp(e[n],t[n]);break}case"join":{vp(e[n],t[n]);break}case"handlers":{kA(e[n],t[n]);break}default:e.options[n]=t[n]}return e}function vp(e,t){t&&e.push(...t)}function kA(e,t){t&&Object.assign(e,t)}function _p(e,t,r,n){let i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);let a=r.indentLines(r.containerFlow(e,o.current()),AA);return i(),a}function AA(e,t,r){return">"+(r?"":" ")+e}function ha(e,t){return Ip(e,t.inConstruct,!0)&&!Ip(e,t.notInConstruct,!1)}function Ip(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Gu(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
10
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,n.push(a)}return n.join("")}function Uu(e){let n={constructs:ta([Bu,...(e||{}).extensions||[]]),content:i(sp),defined:[],document:i(lp),flow:i(mp),lazy:{},string:i(hp),text:i(gp)};return n;function i(o){return a;function a(s){return Ep(n,o,s)}}}function zu(e){for(;!ua(e););return e}var bp=/[\0\t\n\r]/g;function ju(){let e=1,t="",r=!0,n;return i;function i(o,a,s){let u=[],l,c,f,p,m;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),f=0,t="",r&&(o.charCodeAt(0)===65279&&f++,r=void 0);f<o.length;){if(bp.lastIndex=f,l=bp.exec(o),p=l&&l.index!==void 0?l.index:o.length,m=o.charCodeAt(p),!l){t=o.slice(f);break}if(m===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)),e+=p-f),m){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}f=p+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}var kA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ma(e){return e.replace(kA,AA)}function AA(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),o=i===120||i===88;return ra(r.slice(o?2:1),o?16:10)}return Xn(r)||e}function Jn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?kp(e.position):"start"in e||"end"in e?kp(e):"line"in e||"column"in e?$u(e):""}function $u(e){return Ap(e&&e.line)+":"+Ap(e&&e.column)}function kp(e){return $u(e&&e.start)+"-"+$u(e&&e.end)}function Ap(e){return e&&typeof e=="number"?e:1}var Cp={}.hasOwnProperty;function qu(e,t,r){return typeof t!="string"&&(r=t,t=void 0),TA(r)(zu(Uu(r).document().write(ju()(e,t,!0))))}function TA(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ff),autolinkProtocol:re,autolinkEmail:re,atxHeading:o(Mn),blockQuote:o(Te),characterEscape:re,characterReference:re,codeFenced:o(Ke),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Ke,a),codeText:o(ot,a),codeTextData:re,data:re,codeFlowValue:re,definition:o(bt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(sr),hardBreakEscape:o(qi),hardBreakTrailing:o(qi),htmlFlow:o(cf,a),htmlFlowData:re,htmlText:o(cf,a),htmlTextData:re,image:o(Ky),label:a,link:o(ff),listItem:o(Zy),listItemValue:p,listOrdered:o(pf,f),listUnordered:o(pf),paragraph:o(Yy),reference:g,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Mn),strong:o(Xy),thematicBreak:o(Qy)},exit:{atxHeading:u(),atxHeadingSequence:v,autolink:u(),autolinkEmail:_t,autolinkProtocol:se,blockQuote:u(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:ze,characterReferenceMarkerNumeric:ze,characterReferenceValue:Pn,characterReference:Re,codeFenced:u(C),codeFencedFence:E,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:b,codeIndented:u(x),codeText:u(G),codeTextData:b,data:b,definition:u(),definitionDestinationString:S,definitionLabelString:k,definitionTitleString:y,emphasis:u(),hardBreakEscape:u(Q),hardBreakTrailing:u(Q),htmlFlow:u(B),htmlFlowData:b,htmlText:u(V),htmlTextData:b,image:u(xe),label:Et,labelText:Ye,lineEnding:ce,link:u(ae),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Xe,resourceDestinationString:d,resourceTitleString:it,resource:vt,setextHeading:u(J),setextHeadingLineSequence:te,setextHeadingText:A,strong:u(),thematicBreak:u()}};wp(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(T){let _={type:"root",children:[]},W={stack:[_],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:c,data:r},ne=[],fe=-1;for(;++fe<T.length;)if(T[fe][1].type==="listOrdered"||T[fe][1].type==="listUnordered")if(T[fe][0]==="enter")ne.push(fe);else{let Pt=ne.pop();fe=i(T,Pt,fe)}for(fe=-1;++fe<T.length;){let Pt=t[T[fe][0]];Cp.call(Pt,T[fe][1].type)&&Pt[T[fe][1].type].call(Object.assign({sliceSerialize:T[fe][2].sliceSerialize},W),T[fe][1])}if(W.tokenStack.length>0){let Pt=W.tokenStack[W.tokenStack.length-1];(Pt[1]||Tp).call(W,void 0,Pt[0])}for(_.position={start:Rr(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:Rr(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)_=t.transforms[fe](_)||_;return _}function i(T,_,W){let ne=_-1,fe=-1,Pt=!1,Yr,ur,Vi,Gi;for(;++ne<=W;){let kt=T[ne];switch(kt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{kt[0]==="enter"?fe++:fe--,Gi=void 0;break}case"lineEndingBlank":{kt[0]==="enter"&&(Yr&&!Gi&&!fe&&!Vi&&(Vi=ne),Gi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Gi=void 0}if(!fe&&kt[0]==="enter"&&kt[1].type==="listItemPrefix"||fe===-1&&kt[0]==="exit"&&(kt[1].type==="listUnordered"||kt[1].type==="listOrdered")){if(Yr){let Bn=ne;for(ur=void 0;Bn--;){let lr=T[Bn];if(lr[1].type==="lineEnding"||lr[1].type==="lineEndingBlank"){if(lr[0]==="exit")continue;ur&&(T[ur][1].type="lineEndingBlank",Pt=!0),lr[1].type="lineEnding",ur=Bn}else if(!(lr[1].type==="linePrefix"||lr[1].type==="blockQuotePrefix"||lr[1].type==="blockQuotePrefixWhitespace"||lr[1].type==="blockQuoteMarker"||lr[1].type==="listItemIndent"))break}Vi&&(!ur||Vi<ur)&&(Yr._spread=!0),Yr.end=Object.assign({},ur?T[ur][1].start:kt[1].end),T.splice(ur||ne,0,["exit",Yr,kt[2]]),ne++,W++}if(kt[1].type==="listItemPrefix"){let Bn={type:"listItem",_spread:!1,start:Object.assign({},kt[1].start),end:void 0};Yr=Bn,T.splice(ne,0,["enter",Bn,kt[2]]),ne++,W++,Vi=void 0,Gi=!0}}}return T[_][1]._spread=Pt,W}function o(T,_){return W;function W(ne){s.call(this,T(ne),ne),_&&_.call(this,ne)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(T,_,W){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([_,W||void 0]),T.position={start:Rr(_.start),end:void 0}}function u(T){return _;function _(W){T&&T.call(this,W),l.call(this,W)}}function l(T,_){let W=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==T.type&&(_?_.call(this,T,ne[0]):(ne[1]||Tp).call(this,T,ne[0]));else throw new Error("Cannot close `"+T.type+"` ("+Jn({start:T.start,end:T.end})+"): it\u2019s not open");W.position.end=Rr(T.end)}function c(){return hr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(T){if(this.data.expectingFirstListItemValue){let _=this.stack[this.stack.length-2];_.start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0}}function m(){let T=this.resume(),_=this.stack[this.stack.length-1];_.lang=T}function h(){let T=this.resume(),_=this.stack[this.stack.length-1];_.meta=T}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T.replace(/(\r?\n|\r)$/g,"")}function k(T){let _=this.resume(),W=this.stack[this.stack.length-1];W.label=_,W.identifier=Qe(this.sliceSerialize(T)).toLowerCase()}function y(){let T=this.resume(),_=this.stack[this.stack.length-1];_.title=T}function S(){let T=this.resume(),_=this.stack[this.stack.length-1];_.url=T}function v(T){let _=this.stack[this.stack.length-1];if(!_.depth){let W=this.sliceSerialize(T).length;_.depth=W}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function te(T){let _=this.stack[this.stack.length-1];_.depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function re(T){let W=this.stack[this.stack.length-1].children,ne=W[W.length-1];(!ne||ne.type!=="text")&&(ne=Jy(),ne.position={start:Rr(T.start),end:void 0},W.push(ne)),this.stack.push(ne)}function b(T){let _=this.stack.pop();_.value+=this.sliceSerialize(T),_.position.end=Rr(T.end)}function ce(T){let _=this.stack[this.stack.length-1];if(this.data.atHardBreak){let W=_.children[_.children.length-1];W.position.end=Rr(T.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_.type)&&(re.call(this,T),b.call(this,T))}function Q(){this.data.atHardBreak=!0}function B(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T}function V(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T}function G(){let T=this.resume(),_=this.stack[this.stack.length-1];_.value=T}function ae(){let T=this.stack[this.stack.length-1];if(this.data.inReference){let _=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=_,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function xe(){let T=this.stack[this.stack.length-1];if(this.data.inReference){let _=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=_,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function Ye(T){let _=this.sliceSerialize(T),W=this.stack[this.stack.length-2];W.label=ma(_),W.identifier=Qe(_).toLowerCase()}function Et(){let T=this.stack[this.stack.length-1],_=this.resume(),W=this.stack[this.stack.length-1];if(this.data.inReference=!0,W.type==="link"){let ne=T.children;W.children=ne}else W.alt=_}function d(){let T=this.resume(),_=this.stack[this.stack.length-1];_.url=T}function it(){let T=this.resume(),_=this.stack[this.stack.length-1];_.title=T}function vt(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function Xe(T){let _=this.resume(),W=this.stack[this.stack.length-1];W.label=_,W.identifier=Qe(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function ze(T){this.data.characterReferenceType=T.type}function Pn(T){let _=this.sliceSerialize(T),W=this.data.characterReferenceType,ne;W?(ne=ra(_,W==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=Xn(_);let fe=this.stack[this.stack.length-1];fe.value+=ne}function Re(T){let _=this.stack.pop();_.position.end=Rr(T.end)}function se(T){b.call(this,T);let _=this.stack[this.stack.length-1];_.url=this.sliceSerialize(T)}function _t(T){b.call(this,T);let _=this.stack[this.stack.length-1];_.url="mailto:"+this.sliceSerialize(T)}function Te(){return{type:"blockquote",children:[]}}function Ke(){return{type:"code",lang:null,meta:null,value:""}}function ot(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function sr(){return{type:"emphasis",children:[]}}function Mn(){return{type:"heading",depth:0,children:[]}}function qi(){return{type:"break"}}function cf(){return{type:"html",value:""}}function Ky(){return{type:"image",title:null,url:"",alt:null}}function ff(){return{type:"link",title:null,url:"",children:[]}}function pf(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function Zy(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function Yy(){return{type:"paragraph",children:[]}}function Xy(){return{type:"strong",children:[]}}function Jy(){return{type:"text",value:""}}function Qy(){return{type:"thematicBreak"}}}function Rr(e){return{line:e.line,column:e.column,offset:e.offset}}function wp(e,t){let r=-1;for(;++r<t.length;){let n=t[r];Array.isArray(n)?wp(e,n):CA(e,n)}}function CA(e,t){let r;for(r in t)if(Cp.call(t,r))switch(r){case"canContainEols":{let n=t[r];n&&e[r].push(...n);break}case"transforms":{let n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{let n=t[r];n&&Object.assign(e[r],n);break}}}function Tp(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Jn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Jn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Jn({start:t.start,end:t.end})+") is still open")}function da(e){let t=this;t.parser=r;function r(n){return qu(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var Sp={}.hasOwnProperty;function vp(e,t){let r=t||{};function n(i,...o){let a=n.invalid,s=n.handlers;if(i&&Sp.call(i,e)){let u=String(i[e]);a=Sp.call(s,u)?s[u]:n.unknown}if(a)return a.call(this,i,...o)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var wA={}.hasOwnProperty;function Vu(e,t){let r=-1,n;if(t.extensions)for(;++r<t.extensions.length;)Vu(e,t.extensions[r]);for(n in t)if(wA.call(t,n))switch(n){case"extensions":break;case"unsafe":{_p(e[n],t[n]);break}case"join":{_p(e[n],t[n]);break}case"handlers":{SA(e[n],t[n]);break}default:e.options[n]=t[n]}return e}function _p(e,t){t&&e.push(...t)}function SA(e,t){t&&Object.assign(e,t)}function Ip(e,t,r,n){let i=r.enter("blockquote"),o=r.createTracker(n);o.move("> "),o.shift(2);let a=r.indentLines(r.containerFlow(e,o.current()),vA);return i(),a}function vA(e,t,r){return">"+(r?"":" ")+e}function ha(e,t){return Rp(e,t.inConstruct,!0)&&!Rp(e,t.notInConstruct,!1)}function Rp(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Gu(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
11
11
  `&&ha(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
12
- `}function Rp(e,t){let r=String(e),n=r.indexOf(t),i=n,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++o>a&&(a=o):o=1,i=n+t.length,n=r.indexOf(t,i);return a}function io(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Dp(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Fp(e,t,r,n){let i=Dp(r),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(io(e,r)){let f=r.enter("codeIndented"),p=r.indentLines(o,TA);return f(),p}let s=r.createTracker(n),u=i.repeat(Math.max(Rp(o,i)+1,3)),l=r.enter("codeFenced"),c=s.move(u);if(e.lang){let f=r.enter(`codeFencedLang${a}`);c+=s.move(r.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){let f=r.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(r.safe(e.meta,{before:c,after:`
12
+ `}function Dp(e,t){let r=String(e),n=r.indexOf(t),i=n,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++o>a&&(a=o):o=1,i=n+t.length,n=r.indexOf(t,i);return a}function io(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Fp(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Op(e,t,r,n){let i=Fp(r),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(io(e,r)){let f=r.enter("codeIndented"),p=r.indentLines(o,_A);return f(),p}let s=r.createTracker(n),u=i.repeat(Math.max(Dp(o,i)+1,3)),l=r.enter("codeFenced"),c=s.move(u);if(e.lang){let f=r.enter(`codeFencedLang${a}`);c+=s.move(r.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){let f=r.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(r.safe(e.meta,{before:c,after:`
13
13
  `,encode:["`"],...s.current()})),f()}return c+=s.move(`
14
14
  `),o&&(c+=s.move(o+`
15
- `)),c+=s.move(u),l(),c}function TA(e,t,r){return(r?"":" ")+e}function Qn(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Op(e,t,r,n){let i=Qn(r),o=i==='"'?"Quote":"Apostrophe",a=r.enter("definition"),s=r.enter("label"),u=r.createTracker(n),l=u.move("[");return l+=u.move(r.safe(r.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":`
16
- `,...u.current()}))),s(),e.title&&(s=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),a(),l}function Np(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function wt(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ei(e,t,r){let n=gr(e),i=gr(t);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}}Hu.peek=CA;function Hu(e,t,r,n){let i=Np(r),o=r.enter("emphasis"),a=r.createTracker(n),s=a.move(i),u=a.move(r.containerPhrasing(e,{after:i,before:s,...a.current()})),l=u.charCodeAt(0),c=ei(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=wt(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=ei(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+wt(f));let m=a.move(i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},s+u+m}function CA(e,t,r){return r.options.emphasis||"*"}var Kt=function(e){if(e==null)return _A;if(typeof e=="function")return ga(e);if(typeof e=="object")return Array.isArray(e)?wA(e):SA(e);if(typeof e=="string")return vA(e);throw new Error("Expected function, string, or object as test")};function wA(e){let t=[],r=-1;for(;++r<e.length;)t[r]=Kt(e[r]);return ga(n);function n(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function SA(e){let t=e;return ga(r);function r(n){let i=n,o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function vA(e){return ga(t);function t(r){return r&&r.type===e}}function ga(e){return t;function t(r,n,i){return!!(IA(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function _A(){return!0}function IA(e){return e!==null&&typeof e=="object"&&"type"in e}function Lp(e){return"\x1B[33m"+e+"\x1B[39m"}var Pp=[],xa=!0,bn=!1,ya="skip";function oo(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;let o=Kt(i),a=n?-1:1;s(e,void 0,[])();function s(u,l,c){let f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){let m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+Lp(u.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=Pp,h,E,C;if((!t||o(u,l,c[c.length-1]||void 0))&&(m=RA(r(u,c)),m[0]===bn))return m;if("children"in u&&u.children){let x=u;if(x.children&&m[0]!==ya)for(E=(n?x.children.length:-1)+a,C=c.concat(x);E>-1&&E<x.children.length;){let k=x.children[E];if(h=s(k,E,C)(),h[0]===bn)return h;E=typeof h[1]=="number"?h[1]:E+a}}return m}}}function RA(e){return Array.isArray(e)?e:typeof e=="number"?[xa,e]:e==null?Pp:[e]}function ao(e,t,r,n){let i,o,a;typeof t=="function"&&typeof r!="function"?(o=void 0,a=t,i=r):(o=t,a=r,i=n),oo(e,o,s,i);function s(u,l){let c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return a(u,f,c)}}function Ea(e,t){let r=!1;return ao(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,bn}),!!((!e.depth||e.depth<3)&&hr(e)&&(t.options.setext||r))}function Mp(e,t,r,n){let i=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(n);if(Ea(e,r)){let c=r.enter("headingSetext"),f=r.enter("phrasing"),p=r.containerPhrasing(e,{...o.current(),before:`
15
+ `)),c+=s.move(u),l(),c}function _A(e,t,r){return(r?"":" ")+e}function Qn(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Np(e,t,r,n){let i=Qn(r),o=i==='"'?"Quote":"Apostrophe",a=r.enter("definition"),s=r.enter("label"),u=r.createTracker(n),l=u.move("[");return l+=u.move(r.safe(r.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":`
16
+ `,...u.current()}))),s(),e.title&&(s=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),a(),l}function Lp(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function wt(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ei(e,t,r){let n=gr(e),i=gr(t);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}}Hu.peek=IA;function Hu(e,t,r,n){let i=Lp(r),o=r.enter("emphasis"),a=r.createTracker(n),s=a.move(i),u=a.move(r.containerPhrasing(e,{after:i,before:s,...a.current()})),l=u.charCodeAt(0),c=ei(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=wt(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=ei(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+wt(f));let m=a.move(i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},s+u+m}function IA(e,t,r){return r.options.emphasis||"*"}var Kt=function(e){if(e==null)return OA;if(typeof e=="function")return ga(e);if(typeof e=="object")return Array.isArray(e)?RA(e):DA(e);if(typeof e=="string")return FA(e);throw new Error("Expected function, string, or object as test")};function RA(e){let t=[],r=-1;for(;++r<e.length;)t[r]=Kt(e[r]);return ga(n);function n(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function DA(e){let t=e;return ga(r);function r(n){let i=n,o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function FA(e){return ga(t);function t(r){return r&&r.type===e}}function ga(e){return t;function t(r,n,i){return!!(NA(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function OA(){return!0}function NA(e){return e!==null&&typeof e=="object"&&"type"in e}function Pp(e){return"\x1B[33m"+e+"\x1B[39m"}var Mp=[],xa=!0,bn=!1,ya="skip";function oo(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;let o=Kt(i),a=n?-1:1;s(e,void 0,[])();function s(u,l,c){let f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){let m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+Pp(u.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=Mp,h,E,C;if((!t||o(u,l,c[c.length-1]||void 0))&&(m=LA(r(u,c)),m[0]===bn))return m;if("children"in u&&u.children){let x=u;if(x.children&&m[0]!==ya)for(E=(n?x.children.length:-1)+a,C=c.concat(x);E>-1&&E<x.children.length;){let k=x.children[E];if(h=s(k,E,C)(),h[0]===bn)return h;E=typeof h[1]=="number"?h[1]:E+a}}return m}}}function LA(e){return Array.isArray(e)?e:typeof e=="number"?[xa,e]:e==null?Mp:[e]}function ao(e,t,r,n){let i,o,a;typeof t=="function"&&typeof r!="function"?(o=void 0,a=t,i=r):(o=t,a=r,i=n),oo(e,o,s,i);function s(u,l){let c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return a(u,f,c)}}function Ea(e,t){let r=!1;return ao(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,bn}),!!((!e.depth||e.depth<3)&&hr(e)&&(t.options.setext||r))}function Bp(e,t,r,n){let i=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(n);if(Ea(e,r)){let c=r.enter("headingSetext"),f=r.enter("phrasing"),p=r.containerPhrasing(e,{...o.current(),before:`
17
17
  `,after:`
18
18
  `});return f(),c(),p+`
19
19
  `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
20
20
  `))+1))}let a="#".repeat(i),s=r.enter("headingAtx"),u=r.enter("phrasing");o.move(a+" ");let l=r.containerPhrasing(e,{before:"# ",after:`
21
- `,...o.current()});return/^[\t ]/.test(l)&&(l=wt(l.charCodeAt(0))+l.slice(1)),l=l?a+" "+l:a,r.options.closeAtx&&(l+=" "+a),u(),s(),l}Wu.peek=DA;function Wu(e){return e.value||""}function DA(){return"<"}Ku.peek=FA;function Ku(e,t,r,n){let i=Qn(r),o=i==='"'?"Quote":"Apostrophe",a=r.enter("image"),s=r.enter("label"),u=r.createTracker(n),l=u.move("![");return l+=u.move(r.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),l+=u.move(")"),a(),l}function FA(){return"!"}Zu.peek=OA;function Zu(e,t,r,n){let i=e.referenceType,o=r.enter("imageReference"),a=r.enter("label"),s=r.createTracker(n),u=s.move("!["),l=r.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),a();let c=r.stack;r.stack=[],a=r.enter("reference");let f=r.safe(r.associationId(e),{before:u,after:"]",...s.current()});return a(),r.stack=c,o(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function OA(){return"!"}Yu.peek=NA;function Yu(e,t,r){let n=e.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 a=r.unsafe[o],s=r.compilePattern(a),u;if(a.atBreak)for(;u=s.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 NA(){return"`"}function Xu(e,t){let r=hr(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ju.peek=LA;function Ju(e,t,r,n){let i=Qn(r),o=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n),s,u;if(Xu(e,r)){let c=r.stack;r.stack=[],s=r.enter("autolink");let f=a.move("<");return f+=a.move(r.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),r.stack=c,f}s=r.enter("link"),u=r.enter("label");let l=a.move("[");return l+=a.move(r.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=r.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(r.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(u=r.enter("destinationRaw"),l+=a.move(r.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=r.enter(`title${o}`),l+=a.move(" "+i),l+=a.move(r.safe(e.title,{before:l,after:i,...a.current()})),l+=a.move(i),u()),l+=a.move(")"),s(),l}function LA(e,t,r){return Xu(e,r)?"<":"["}Qu.peek=PA;function Qu(e,t,r,n){let i=e.referenceType,o=r.enter("linkReference"),a=r.enter("label"),s=r.createTracker(n),u=s.move("["),l=r.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),a();let c=r.stack;r.stack=[],a=r.enter("reference");let f=r.safe(r.associationId(e),{before:u,after:"]",...s.current()});return a(),r.stack=c,o(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function PA(){return"["}function ti(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Bp(e){let t=ti(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function Up(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ba(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function zp(e,t,r,n){let i=r.enter("list"),o=r.bulletCurrent,a=e.ordered?Up(r):ti(r),s=e.ordered?a==="."?")":".":Bp(r),u=t&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!e.ordered){let c=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&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),ba(r)===a&&c){let f=-1;for(;++f<e.children.length;){let p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=s),r.bulletCurrent=a;let l=r.containerFlow(e,n);return r.bulletLastUsed=a,r.bulletCurrent=o,i(),l}function jp(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function $p(e,t,r,n){let i=jp(r),o=r.bulletCurrent||ti(r);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);let s=r.createTracker(n);s.move(o+" ".repeat(a-o.length)),s.shift(a);let u=r.enter("listItem"),l=r.indentLines(r.containerFlow(e,s.current()),c);return u(),l;function c(f,p,m){return p?(m?"":" ".repeat(a))+f:(m?o:o+" ".repeat(a-o.length))+f}}function qp(e,t,r,n){let i=r.enter("paragraph"),o=r.enter("phrasing"),a=r.containerPhrasing(e,n);return o(),i(),a}var el=Kt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Vp(e,t,r,n){return(e.children.some(function(a){return el(a)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function Gp(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}tl.peek=MA;function tl(e,t,r,n){let i=Gp(r),o=r.enter("strong"),a=r.createTracker(n),s=a.move(i+i),u=a.move(r.containerPhrasing(e,{after:i,before:s,...a.current()})),l=u.charCodeAt(0),c=ei(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=wt(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=ei(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+wt(f));let m=a.move(i+i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},s+u+m}function MA(e,t,r){return r.options.strong||"*"}function Hp(e,t,r,n){return r.safe(e.value,n)}function Wp(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Kp(e,t,r){let n=(ba(r)+(r.options.ruleSpaces?" ":"")).repeat(Wp(r));return r.options.ruleSpaces?n.slice(0,-1):n}var kn={blockquote:_p,break:Gu,code:Fp,definition:Op,emphasis:Hu,hardBreak:Gu,heading:Mp,html:Wu,image:Ku,imageReference:Zu,inlineCode:Yu,link:Ju,linkReference:Qu,list:zp,listItem:$p,paragraph:qp,root:Vp,strong:tl,text:Hp,thematicBreak:Kp};var Zp=[BA];function BA(e,t,r,n){if(t.type==="code"&&io(t,n)&&(e.type==="list"||e.type===t.type&&io(e,n)))return!1;if("spread"in r&&typeof r.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&Ea(t,n))?void 0:r.spread?1:0}var An=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Yp=[{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:`
21
+ `,...o.current()});return/^[\t ]/.test(l)&&(l=wt(l.charCodeAt(0))+l.slice(1)),l=l?a+" "+l:a,r.options.closeAtx&&(l+=" "+a),u(),s(),l}Wu.peek=PA;function Wu(e){return e.value||""}function PA(){return"<"}Ku.peek=MA;function Ku(e,t,r,n){let i=Qn(r),o=i==='"'?"Quote":"Apostrophe",a=r.enter("image"),s=r.enter("label"),u=r.createTracker(n),l=u.move("![");return l+=u.move(r.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=r.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(r.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),l+=u.move(")"),a(),l}function MA(){return"!"}Zu.peek=BA;function Zu(e,t,r,n){let i=e.referenceType,o=r.enter("imageReference"),a=r.enter("label"),s=r.createTracker(n),u=s.move("!["),l=r.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),a();let c=r.stack;r.stack=[],a=r.enter("reference");let f=r.safe(r.associationId(e),{before:u,after:"]",...s.current()});return a(),r.stack=c,o(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function BA(){return"!"}Yu.peek=UA;function Yu(e,t,r){let n=e.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 a=r.unsafe[o],s=r.compilePattern(a),u;if(a.atBreak)for(;u=s.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 UA(){return"`"}function Xu(e,t){let r=hr(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ju.peek=zA;function Ju(e,t,r,n){let i=Qn(r),o=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n),s,u;if(Xu(e,r)){let c=r.stack;r.stack=[],s=r.enter("autolink");let f=a.move("<");return f+=a.move(r.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),r.stack=c,f}s=r.enter("link"),u=r.enter("label");let l=a.move("[");return l+=a.move(r.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=r.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(r.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(u=r.enter("destinationRaw"),l+=a.move(r.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=r.enter(`title${o}`),l+=a.move(" "+i),l+=a.move(r.safe(e.title,{before:l,after:i,...a.current()})),l+=a.move(i),u()),l+=a.move(")"),s(),l}function zA(e,t,r){return Xu(e,r)?"<":"["}Qu.peek=jA;function Qu(e,t,r,n){let i=e.referenceType,o=r.enter("linkReference"),a=r.enter("label"),s=r.createTracker(n),u=s.move("["),l=r.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),a();let c=r.stack;r.stack=[],a=r.enter("reference");let f=r.safe(r.associationId(e),{before:u,after:"]",...s.current()});return a(),r.stack=c,o(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function jA(){return"["}function ti(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Up(e){let t=ti(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function zp(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ba(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function jp(e,t,r,n){let i=r.enter("list"),o=r.bulletCurrent,a=e.ordered?zp(r):ti(r),s=e.ordered?a==="."?")":".":Up(r),u=t&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!e.ordered){let c=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&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),ba(r)===a&&c){let f=-1;for(;++f<e.children.length;){let p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=s),r.bulletCurrent=a;let l=r.containerFlow(e,n);return r.bulletLastUsed=a,r.bulletCurrent=o,i(),l}function $p(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function qp(e,t,r,n){let i=$p(r),o=r.bulletCurrent||ti(r);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);let s=r.createTracker(n);s.move(o+" ".repeat(a-o.length)),s.shift(a);let u=r.enter("listItem"),l=r.indentLines(r.containerFlow(e,s.current()),c);return u(),l;function c(f,p,m){return p?(m?"":" ".repeat(a))+f:(m?o:o+" ".repeat(a-o.length))+f}}function Vp(e,t,r,n){let i=r.enter("paragraph"),o=r.enter("phrasing"),a=r.containerPhrasing(e,n);return o(),i(),a}var el=Kt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Gp(e,t,r,n){return(e.children.some(function(a){return el(a)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function Hp(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}tl.peek=$A;function tl(e,t,r,n){let i=Hp(r),o=r.enter("strong"),a=r.createTracker(n),s=a.move(i+i),u=a.move(r.containerPhrasing(e,{after:i,before:s,...a.current()})),l=u.charCodeAt(0),c=ei(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=wt(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=ei(n.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+wt(f));let m=a.move(i+i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},s+u+m}function $A(e,t,r){return r.options.strong||"*"}function Wp(e,t,r,n){return r.safe(e.value,n)}function Kp(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Zp(e,t,r){let n=(ba(r)+(r.options.ruleSpaces?" ":"")).repeat(Kp(r));return r.options.ruleSpaces?n.slice(0,-1):n}var kn={blockquote:Ip,break:Gu,code:Op,definition:Np,emphasis:Hu,hardBreak:Gu,heading:Bp,html:Wu,image:Ku,imageReference:Zu,inlineCode:Yu,link:Ju,linkReference:Qu,list:jp,listItem:qp,paragraph:Vp,root:Gp,strong:tl,text:Wp,thematicBreak:Zp};var Yp=[qA];function qA(e,t,r,n){if(t.type==="code"&&io(t,n)&&(e.type==="list"||e.type===t.type&&io(e,n)))return!1;if("spread"in r&&typeof r.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&Ea(t,n))?void 0:r.spread?1:0}var An=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Xp=[{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:`
22
22
  `,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:An},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
23
23
  ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:An},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
24
24
  *])`},{character:"*",inConstruct:"phrasing",notInConstruct:An},{atBreak:!0,character:"+",after:`(?:[ \r
25
25
  ])`},{atBreak:!0,character:"-",after:`(?:[ \r
26
26
  -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
27
- ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:An},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:An},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:An},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:An},{atBreak:!0,character:"~"}];function Xp(e){return e.label||!e.identifier?e.label||"":ma(e.identifier)}function Jp(e){if(!e._compiled){let t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function Qp(e,t,r){let n=t.indexStack,i=e.children||[],o=[],a=-1,s=r.before,u;n.push(-1);let l=t.createTracker(r);for(;++a<i.length;){let c=i[a],f;if(n[n.length-1]=a,a+1<i.length){let h=t.handle.handlers[i[a+1].type];h&&h.peek&&(h=h.peek),f=h?h(i[a+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else f=r.after;o.length>0&&(s==="\r"||s===`
28
- `)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" ",l=t.createTracker(r),l.move(o.join("")));let p=t.handle(c,e,t,{...l.current(),after:f,before:s});u&&u===p.slice(0,1)&&(p=wt(u.charCodeAt(0))+p.slice(1));let m=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,u=void 0,m&&(o.length>0&&m.before&&s===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+wt(s.charCodeAt(0))),m.after&&(u=f)),l.move(p),o.push(p),s=p.slice(-1)}return n.pop(),o.join("")}function em(e,t,r){let n=t.indexStack,i=e.children||[],o=t.createTracker(r),a=[],s=-1;for(n.push(-1);++s<i.length;){let u=i[s];n[n.length-1]=s,a.push(o.move(t.handle(u,e,t,{before:`
27
+ ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:An},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:An},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:An},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:An},{atBreak:!0,character:"~"}];function Jp(e){return e.label||!e.identifier?e.label||"":ma(e.identifier)}function Qp(e){if(!e._compiled){let t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function em(e,t,r){let n=t.indexStack,i=e.children||[],o=[],a=-1,s=r.before,u;n.push(-1);let l=t.createTracker(r);for(;++a<i.length;){let c=i[a],f;if(n[n.length-1]=a,a+1<i.length){let h=t.handle.handlers[i[a+1].type];h&&h.peek&&(h=h.peek),f=h?h(i[a+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else f=r.after;o.length>0&&(s==="\r"||s===`
28
+ `)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" ",l=t.createTracker(r),l.move(o.join("")));let p=t.handle(c,e,t,{...l.current(),after:f,before:s});u&&u===p.slice(0,1)&&(p=wt(u.charCodeAt(0))+p.slice(1));let m=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,u=void 0,m&&(o.length>0&&m.before&&s===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+wt(s.charCodeAt(0))),m.after&&(u=f)),l.move(p),o.push(p),s=p.slice(-1)}return n.pop(),o.join("")}function tm(e,t,r){let n=t.indexStack,i=e.children||[],o=t.createTracker(r),a=[],s=-1;for(n.push(-1);++s<i.length;){let u=i[s];n[n.length-1]=s,a.push(o.move(t.handle(u,e,t,{before:`
29
29
  `,after:`
30
- `,...o.current()}))),u.type!=="list"&&(t.bulletLastUsed=void 0),s<i.length-1&&a.push(o.move(UA(u,i[s+1],e,t)))}return n.pop(),a.join("")}function UA(e,t,r,n){let i=n.join.length;for(;i--;){let o=n.join[i](e,t,r,n);if(o===!0||o===1)break;if(typeof o=="number")return`
30
+ `,...o.current()}))),u.type!=="list"&&(t.bulletLastUsed=void 0),s<i.length-1&&a.push(o.move(VA(u,i[s+1],e,t)))}return n.pop(),a.join("")}function VA(e,t,r,n){let i=n.join.length;for(;i--;){let o=n.join[i](e,t,r,n);if(o===!0||o===1)break;if(typeof o=="number")return`
31
31
  `.repeat(1+o);if(o===!1)return`
32
32
 
33
33
  <!---->
34
34
 
35
35
  `}return`
36
36
 
37
- `}var zA=/\r?\n|\r/g;function tm(e,t){let r=[],n=0,i=0,o;for(;o=zA.exec(e);)a(e.slice(n,o.index)),r.push(o[0]),n=o.index+o[0].length,i++;return a(e.slice(n)),r.join("");function a(s){r.push(t(s,i,!s))}}function nm(e,t,r){let n=(r.before||"")+(t||"")+(r.after||""),i=[],o=[],a={},s=-1;for(;++s<e.unsafe.length;){let c=e.unsafe[s];if(!ha(e.stack,c))continue;let f=e.compilePattern(c),p;for(;p=f.exec(n);){let m="before"in c||!!c.atBreak,h="after"in c,E=p.index+(m?p[1].length:0);i.includes(E)?(a[E].before&&!m&&(a[E].before=!1),a[E].after&&!h&&(a[E].after=!1)):(i.push(E),a[E]={before:m,after:h})}}i.sort(jA);let u=r.before?r.before.length:0,l=n.length-(r.after?r.after.length:0);for(s=-1;++s<i.length;){let c=i[s];c<u||c>=l||c+1<l&&i[s+1]===c+1&&a[c].after&&!a[c+1].before&&!a[c+1].after||i[s-1]===c-1&&a[c].before&&!a[c-1].before&&!a[c-1].after||(u!==c&&o.push(rm(n.slice(u,c),"\\")),u=c,/[!-/:-@[-`{-~]/.test(n.charAt(c))&&(!r.encode||!r.encode.includes(n.charAt(c)))?o.push("\\"):(o.push(wt(n.charCodeAt(c))),u++))}return o.push(rm(n.slice(u,l),r.after)),o.join("")}function jA(e,t){return e-t}function rm(e,t){let r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],o=e+t,a=-1,s=0,u;for(;u=r.exec(o);)n.push(u.index);for(;++a<n.length;)s!==n[a]&&i.push(e.slice(s,n[a])),i.push("\\"),s=n[a];return i.push(e.slice(s)),i.join("")}function im(e){let t=e||{},r=t.now||{},n=t.lineShift||0,i=r.line||1,o=r.column||1;return{move:u,current:a,shift:s};function a(){return{now:{line:i,column:o},lineShift:n}}function s(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 rl(e,t){let r=t||{},n={associationId:Xp,containerPhrasing:GA,containerFlow:HA,createTracker:im,compilePattern:Jp,enter:o,handlers:{...kn},handle:void 0,indentLines:tm,indexStack:[],join:[...Zp],options:{},safe:WA,stack:[],unsafe:[...Yp]};Vu(n,r),n.options.tightDefinitions&&n.join.push(VA),n.handle=Sp("type",{invalid:$A,unknown:qA,handlers:n.handlers});let i=n.handle(e,void 0,n,{before:`
37
+ `}var GA=/\r?\n|\r/g;function rm(e,t){let r=[],n=0,i=0,o;for(;o=GA.exec(e);)a(e.slice(n,o.index)),r.push(o[0]),n=o.index+o[0].length,i++;return a(e.slice(n)),r.join("");function a(s){r.push(t(s,i,!s))}}function im(e,t,r){let n=(r.before||"")+(t||"")+(r.after||""),i=[],o=[],a={},s=-1;for(;++s<e.unsafe.length;){let c=e.unsafe[s];if(!ha(e.stack,c))continue;let f=e.compilePattern(c),p;for(;p=f.exec(n);){let m="before"in c||!!c.atBreak,h="after"in c,E=p.index+(m?p[1].length:0);i.includes(E)?(a[E].before&&!m&&(a[E].before=!1),a[E].after&&!h&&(a[E].after=!1)):(i.push(E),a[E]={before:m,after:h})}}i.sort(HA);let u=r.before?r.before.length:0,l=n.length-(r.after?r.after.length:0);for(s=-1;++s<i.length;){let c=i[s];c<u||c>=l||c+1<l&&i[s+1]===c+1&&a[c].after&&!a[c+1].before&&!a[c+1].after||i[s-1]===c-1&&a[c].before&&!a[c-1].before&&!a[c-1].after||(u!==c&&o.push(nm(n.slice(u,c),"\\")),u=c,/[!-/:-@[-`{-~]/.test(n.charAt(c))&&(!r.encode||!r.encode.includes(n.charAt(c)))?o.push("\\"):(o.push(wt(n.charCodeAt(c))),u++))}return o.push(nm(n.slice(u,l),r.after)),o.join("")}function HA(e,t){return e-t}function nm(e,t){let r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],o=e+t,a=-1,s=0,u;for(;u=r.exec(o);)n.push(u.index);for(;++a<n.length;)s!==n[a]&&i.push(e.slice(s,n[a])),i.push("\\"),s=n[a];return i.push(e.slice(s)),i.join("")}function om(e){let t=e||{},r=t.now||{},n=t.lineShift||0,i=r.line||1,o=r.column||1;return{move:u,current:a,shift:s};function a(){return{now:{line:i,column:o},lineShift:n}}function s(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 rl(e,t){let r=t||{},n={associationId:Jp,containerPhrasing:YA,containerFlow:XA,createTracker:om,compilePattern:Qp,enter:o,handlers:{...kn},handle:void 0,indentLines:rm,indexStack:[],join:[...Yp],options:{},safe:JA,stack:[],unsafe:[...Xp]};Vu(n,r),n.options.tightDefinitions&&n.join.push(ZA),n.handle=vp("type",{invalid:WA,unknown:KA,handlers:n.handlers});let i=n.handle(e,void 0,n,{before:`
38
38
  `,after:`
39
39
  `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
40
- `),i;function o(a){return n.stack.push(a),s;function s(){n.stack.pop()}}}function $A(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function qA(e){let t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function VA(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function GA(e,t){return Qp(e,this,t)}function HA(e,t){return em(e,this,t)}function WA(e,t){return nm(this,e,t)}function ka(e){let t=this;t.compiler=r;function r(n){return rl(n,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function nl(e){if(e)throw e}var Ca=mf(mm(),1);function so(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function il(){let e=[],t={run:r,use:n};return t;function r(...i){let o=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(u,...l){let c=e[++o],f=-1;if(u){a(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?dm(c,s)(...l):a(null,...l)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function dm(e,t){let r;return n;function n(...a){let s=e.length>a.length,u;s&&a.push(i);try{u=e.apply(this,a)}catch(l){let c=l;if(s&&r)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(a,...s){r||(r=!0,t(a,...s))}function o(a){i(null,a)}}import{VFile as KA}from"vfile";var hm=function(e){let n=this.constructor.prototype,i=n[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,n),o};var ZA={}.hasOwnProperty,ul=class e extends hm{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=il()}copy(){let t=new e,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];t.use(...n)}return t.data((0,Ca.default)(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(sl("data",this.frozen),this.namespace[t]=r,this):ZA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sl("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=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(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let r=Ta(t),n=this.parser||this.Parser;return ol("parse",n),n(String(r),r)}process(t,r){let n=this;return this.freeze(),ol("process",this.parser||this.Parser),al("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(o,a){let s=Ta(t),u=n.parse(s);n.run(u,s,function(c,f,p){if(c||!f||!p)return l(c);let m=f,h=n.stringify(m,p);XA(h)?p.value=h:p.result=h,l(c,p)});function l(c,f){c||!f?a(c):o?o(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),ol("processSync",this.parser||this.Parser),al("processSync",this.compiler||this.Compiler),this.process(t,i),xm("processSync","process",r),n;function i(o,a){r=!0,nl(o),n=a}}run(t,r,n){gm(t),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(a,s){let u=Ta(r);i.run(t,u,l);function l(c,f,p){let m=f||t;c?s(c):a?a(m):n(void 0,m,p)}}}runSync(t,r){let n=!1,i;return this.run(t,r,o),xm("runSync","run",n),i;function o(a,s){nl(a),i=s,n=!0}}stringify(t,r){this.freeze();let n=Ta(r),i=this.compiler||this.Compiler;return al("stringify",i),gm(t),i(t,n)}use(t,...r){let n=this.attachers,i=this.namespace;if(sl("use",this.frozen),t!=null)if(typeof t=="function")u(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");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 a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(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");s(l.plugins),l.settings&&(i.settings=(0,Ca.default)(!0,i.settings,l.settings))}function s(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[m,...h]=c,E=n[p][1];so(E)&&so(m)&&(m=(0,Ca.default)(!0,E,m)),n[p]=[l,m,...h]}}}},ll=new ul().freeze();function ol(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function al(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gm(e){if(!so(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function xm(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ta(e){return YA(e)?e:new KA(e)}function YA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function XA(e){return typeof e=="string"||JA(e)}function JA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var ri=ll().use(da).use(ka).freeze();function cl(e,t){let r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}function fl(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function pl(e,t,r){let i=Kt((r||{}).ignore||[]),o=QA(t),a=-1;for(;++a<o.length;)oo(e,"text",s);function s(l,c){let f=-1,p;for(;++f<c.length;){let m=c[f],h=p?p.children:void 0;if(i(m,h?h.indexOf(m):void 0,p))return;p=m}if(p)return u(l,c)}function u(l,c){let f=c[c.length-1],p=o[a][0],m=o[a][1],h=0,C=f.children.indexOf(l),x=!1,k=[];p.lastIndex=0;let y=p.exec(l.value);for(;y;){let S=y.index,v={index:y.index,input:y.input,stack:[...c,l]},A=m(...y,v);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?p.lastIndex=S+1:(h!==S&&k.push({type:"text",value:l.value.slice(h,S)}),Array.isArray(A)?k.push(...A):A&&k.push(A),h=S+y[0].length,x=!0),!p.global)break;y=p.exec(l.value)}return x?(h<l.value.length&&k.push({type:"text",value:l.value.slice(h)}),f.children.splice(C,1,...k)):k=[l],C+k.length}}function QA(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!e[0]||Array.isArray(e[0])?e:[e],n=-1;for(;++n<r.length;){let i=r[n];t.push([eT(i[0]),tT(i[1])])}return t}function eT(e){return typeof e=="string"?new RegExp(fl(e),"g"):e}function tT(e){return typeof e=="function"?e:function(){return e}}var ml="phrasing",dl=["autolink","link","image","label"];function gl(){return{transforms:[sT],enter:{literalAutolink:rT,literalAutolinkEmail:hl,literalAutolinkHttp:hl,literalAutolinkWww:hl},exit:{literalAutolink:aT,literalAutolinkEmail:oT,literalAutolinkHttp:nT,literalAutolinkWww:iT}}}function xl(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ml,notInConstruct:dl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ml,notInConstruct:dl},{character:":",before:"[ps]",after:"\\/",inConstruct:ml,notInConstruct:dl}]}}function rT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function hl(e){this.config.enter.autolinkProtocol.call(this,e)}function nT(e){this.config.exit.autolinkProtocol.call(this,e)}function iT(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function oT(e){this.config.exit.autolinkEmail.call(this,e)}function aT(e){this.exit(e)}function sT(e){pl(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,uT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),lT]],{ignore:["link","linkReference"]})}function uT(e,t,r,n,i){let o="";if(!ym(i)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!cT(r)))return!1;let a=fT(r+n);if(!a[0])return!1;let s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function lT(e,t,r,n){return!ym(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function cT(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function fT(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")"),i=cl(e,"("),o=cl(e,")");for(;n!==-1&&i>o;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[e,r]}function ym(e,t){let r=e.input.charCodeAt(e.index-1);return(e.index===0||Ht(r)||gn(r))&&(!t||r!==47)}Em.peek=bT;function yl(){return{enter:{gfmFootnoteDefinition:pT,gfmFootnoteDefinitionLabelString:mT,gfmFootnoteCall:gT,gfmFootnoteCallString:xT},exit:{gfmFootnoteDefinition:hT,gfmFootnoteDefinitionLabelString:dT,gfmFootnoteCall:ET,gfmFootnoteCallString:yT}}}function El(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:kT,footnoteReference:Em}}}function pT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function mT(){this.buffer()}function dT(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=Qe(this.sliceSerialize(e)).toLowerCase()}function hT(e){this.exit(e)}function gT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function xT(){this.buffer()}function yT(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=Qe(this.sliceSerialize(e)).toLowerCase()}function ET(e){this.exit(e)}function Em(e,t,r,n){let i=r.createTracker(n),o=i.move("[^"),a=r.enter("footnoteReference"),s=r.enter("reference");return o+=i.move(r.safe(r.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function bT(){return"["}function kT(e,t,r,n){let i=r.createTracker(n),o=i.move("[^"),a=r.enter("footnoteDefinition"),s=r.enter("label");return o+=i.move(r.safe(r.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(r.indentLines(r.containerFlow(e,i.current()),AT)),a(),o}function AT(e,t,r){return t===0?e:(r?"":" ")+e}var TT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];bm.peek=ST;function bl(){return{canContainEols:["delete"],enter:{strikethrough:CT},exit:{strikethrough:wT}}}function kl(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:TT}],handlers:{delete:bm}}}function CT(e){this.enter({type:"delete",children:[]},e)}function wT(e){this.exit(e)}function bm(e,t,r,n){let i=r.createTracker(n),o=r.enter("strikethrough"),a=i.move("~~");return a+=r.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function ST(){return"~"}function vT(e){return e.length}function Am(e,t){let r=t||{},n=(r.align||[]).concat(),i=r.stringLength||vT,o=[],a=[],s=[],u=[],l=0,c=-1;for(;++c<e.length;){let E=[],C=[],x=-1;for(e[c].length>l&&(l=e[c].length);++x<e[c].length;){let k=_T(e[c][x]);if(r.alignDelimiters!==!1){let y=i(k);C[x]=y,(u[x]===void 0||y>u[x])&&(u[x]=y)}E.push(k)}a[c]=E,s[c]=C}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<l;)o[f]=km(n[f]);else{let E=km(n);for(;++f<l;)o[f]=E}f=-1;let p=[],m=[];for(;++f<l;){let E=o[f],C="",x="";E===99?(C=":",x=":"):E===108?C=":":E===114&&(x=":");let k=r.alignDelimiters===!1?1:Math.max(1,u[f]-C.length-x.length),y=C+"-".repeat(k)+x;r.alignDelimiters!==!1&&(k=C.length+k+x.length,k>u[f]&&(u[f]=k),m[f]=k),p[f]=y}a.splice(1,0,p),s.splice(1,0,m),c=-1;let h=[];for(;++c<a.length;){let E=a[c],C=s[c];f=-1;let x=[];for(;++f<l;){let k=E[f]||"",y="",S="";if(r.alignDelimiters!==!1){let v=u[f]-(C[f]||0),A=o[f];A===114?y=" ".repeat(v):A===99?v%2?(y=" ".repeat(v/2+.5),S=" ".repeat(v/2-.5)):(y=" ".repeat(v/2),S=y):S=" ".repeat(v)}r.delimiterStart!==!1&&!f&&x.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&k==="")&&(r.delimiterStart!==!1||f)&&x.push(" "),r.alignDelimiters!==!1&&x.push(y),x.push(k),r.alignDelimiters!==!1&&x.push(S),r.padding!==!1&&x.push(" "),(r.delimiterEnd!==!1||f!==l-1)&&x.push("|")}h.push(r.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return h.join(`
41
- `)}function _T(e){return e==null?"":String(e)}function km(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Tl(){return{enter:{table:IT,tableData:Tm,tableHeader:Tm,tableRow:DT},exit:{codeText:FT,table:RT,tableData:Al,tableHeader:Al,tableRow:Al}}}function IT(e){let t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function RT(e){this.exit(e),this.data.inTable=void 0}function DT(e){this.enter({type:"tableRow",children:[]},e)}function Al(e){this.exit(e)}function Tm(e){this.enter({type:"tableCell",children:[]},e)}function FT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,OT));let r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function OT(e,t){return t==="|"?t:e}function Cl(e){let t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
40
+ `),i;function o(a){return n.stack.push(a),s;function s(){n.stack.pop()}}}function WA(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function KA(e){let t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function ZA(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function YA(e,t){return em(e,this,t)}function XA(e,t){return tm(e,this,t)}function JA(e,t){return im(this,e,t)}function ka(e){let t=this;t.compiler=r;function r(n){return rl(n,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function nl(e){if(e)throw e}var Ca=mf(dm(),1);function so(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function il(){let e=[],t={run:r,use:n};return t;function r(...i){let o=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(u,...l){let c=e[++o],f=-1;if(u){a(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?hm(c,s)(...l):a(null,...l)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function hm(e,t){let r;return n;function n(...a){let s=e.length>a.length,u;s&&a.push(i);try{u=e.apply(this,a)}catch(l){let c=l;if(s&&r)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(a,...s){r||(r=!0,t(a,...s))}function o(a){i(null,a)}}import{VFile as QA}from"vfile";var gm=function(e){let n=this.constructor.prototype,i=n[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,n),o};var eT={}.hasOwnProperty,ul=class e extends gm{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=il()}copy(){let t=new e,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];t.use(...n)}return t.data((0,Ca.default)(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(sl("data",this.frozen),this.namespace[t]=r,this):eT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sl("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=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(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let r=Ta(t),n=this.parser||this.Parser;return ol("parse",n),n(String(r),r)}process(t,r){let n=this;return this.freeze(),ol("process",this.parser||this.Parser),al("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(o,a){let s=Ta(t),u=n.parse(s);n.run(u,s,function(c,f,p){if(c||!f||!p)return l(c);let m=f,h=n.stringify(m,p);rT(h)?p.value=h:p.result=h,l(c,p)});function l(c,f){c||!f?a(c):o?o(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),ol("processSync",this.parser||this.Parser),al("processSync",this.compiler||this.Compiler),this.process(t,i),ym("processSync","process",r),n;function i(o,a){r=!0,nl(o),n=a}}run(t,r,n){xm(t),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(a,s){let u=Ta(r);i.run(t,u,l);function l(c,f,p){let m=f||t;c?s(c):a?a(m):n(void 0,m,p)}}}runSync(t,r){let n=!1,i;return this.run(t,r,o),ym("runSync","run",n),i;function o(a,s){nl(a),i=s,n=!0}}stringify(t,r){this.freeze();let n=Ta(r),i=this.compiler||this.Compiler;return al("stringify",i),xm(t),i(t,n)}use(t,...r){let n=this.attachers,i=this.namespace;if(sl("use",this.frozen),t!=null)if(typeof t=="function")u(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");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 a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(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");s(l.plugins),l.settings&&(i.settings=(0,Ca.default)(!0,i.settings,l.settings))}function s(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[m,...h]=c,E=n[p][1];so(E)&&so(m)&&(m=(0,Ca.default)(!0,E,m)),n[p]=[l,m,...h]}}}},ll=new ul().freeze();function ol(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function al(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xm(e){if(!so(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ym(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ta(e){return tT(e)?e:new QA(e)}function tT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function rT(e){return typeof e=="string"||nT(e)}function nT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var ri=ll().use(da).use(ka).freeze();function cl(e,t){let r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}function fl(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function pl(e,t,r){let i=Kt((r||{}).ignore||[]),o=iT(t),a=-1;for(;++a<o.length;)oo(e,"text",s);function s(l,c){let f=-1,p;for(;++f<c.length;){let m=c[f],h=p?p.children:void 0;if(i(m,h?h.indexOf(m):void 0,p))return;p=m}if(p)return u(l,c)}function u(l,c){let f=c[c.length-1],p=o[a][0],m=o[a][1],h=0,C=f.children.indexOf(l),x=!1,k=[];p.lastIndex=0;let y=p.exec(l.value);for(;y;){let S=y.index,v={index:y.index,input:y.input,stack:[...c,l]},A=m(...y,v);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?p.lastIndex=S+1:(h!==S&&k.push({type:"text",value:l.value.slice(h,S)}),Array.isArray(A)?k.push(...A):A&&k.push(A),h=S+y[0].length,x=!0),!p.global)break;y=p.exec(l.value)}return x?(h<l.value.length&&k.push({type:"text",value:l.value.slice(h)}),f.children.splice(C,1,...k)):k=[l],C+k.length}}function iT(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!e[0]||Array.isArray(e[0])?e:[e],n=-1;for(;++n<r.length;){let i=r[n];t.push([oT(i[0]),aT(i[1])])}return t}function oT(e){return typeof e=="string"?new RegExp(fl(e),"g"):e}function aT(e){return typeof e=="function"?e:function(){return e}}var ml="phrasing",dl=["autolink","link","image","label"];function gl(){return{transforms:[pT],enter:{literalAutolink:sT,literalAutolinkEmail:hl,literalAutolinkHttp:hl,literalAutolinkWww:hl},exit:{literalAutolink:fT,literalAutolinkEmail:cT,literalAutolinkHttp:uT,literalAutolinkWww:lT}}}function xl(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ml,notInConstruct:dl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ml,notInConstruct:dl},{character:":",before:"[ps]",after:"\\/",inConstruct:ml,notInConstruct:dl}]}}function sT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function hl(e){this.config.enter.autolinkProtocol.call(this,e)}function uT(e){this.config.exit.autolinkProtocol.call(this,e)}function lT(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function cT(e){this.config.exit.autolinkEmail.call(this,e)}function fT(e){this.exit(e)}function pT(e){pl(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,mT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),dT]],{ignore:["link","linkReference"]})}function mT(e,t,r,n,i){let o="";if(!Em(i)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!hT(r)))return!1;let a=gT(r+n);if(!a[0])return!1;let s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function dT(e,t,r,n){return!Em(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function hT(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function gT(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")"),i=cl(e,"("),o=cl(e,")");for(;n!==-1&&i>o;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),o++;return[e,r]}function Em(e,t){let r=e.input.charCodeAt(e.index-1);return(e.index===0||Ht(r)||gn(r))&&(!t||r!==47)}bm.peek=wT;function xT(){this.buffer()}function yT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ET(){this.buffer()}function bT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kT(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Qe(this.sliceSerialize(e)).toLowerCase(),r.label=t}function AT(e){this.exit(e)}function TT(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Qe(this.sliceSerialize(e)).toLowerCase(),r.label=t}function CT(e){this.exit(e)}function wT(){return"["}function bm(e,t,r,n){let i=r.createTracker(n),o=i.move("[^"),a=r.enter("footnoteReference"),s=r.enter("reference");return o+=i.move(r.safe(r.associationId(e),{after:"]",before:o})),s(),a(),o+=i.move("]"),o}function yl(){return{enter:{gfmFootnoteCallString:xT,gfmFootnoteCall:yT,gfmFootnoteDefinitionLabelString:ET,gfmFootnoteDefinition:bT},exit:{gfmFootnoteCallString:kT,gfmFootnoteCall:AT,gfmFootnoteDefinitionLabelString:TT,gfmFootnoteDefinition:CT}}}function El(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:bm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,o,a){let s=o.createTracker(a),u=s.move("[^"),l=o.enter("footnoteDefinition"),c=o.enter("label");return u+=s.move(o.safe(o.associationId(n),{before:u,after:"]"})),c(),u+=s.move("]:"),n.children&&n.children.length>0&&(s.shift(4),u+=s.move((t?`
41
+ `:" ")+o.indentLines(o.containerFlow(n,s.current()),t?km:ST))),l(),u}}function ST(e,t,r){return t===0?e:km(e,t,r)}function km(e,t,r){return(r?"":" ")+e}var vT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Am.peek=RT;function bl(){return{canContainEols:["delete"],enter:{strikethrough:_T},exit:{strikethrough:IT}}}function kl(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:vT}],handlers:{delete:Am}}}function _T(e){this.enter({type:"delete",children:[]},e)}function IT(e){this.exit(e)}function Am(e,t,r,n){let i=r.createTracker(n),o=r.enter("strikethrough"),a=i.move("~~");return a+=r.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function RT(){return"~"}function DT(e){return e.length}function Cm(e,t){let r=t||{},n=(r.align||[]).concat(),i=r.stringLength||DT,o=[],a=[],s=[],u=[],l=0,c=-1;for(;++c<e.length;){let E=[],C=[],x=-1;for(e[c].length>l&&(l=e[c].length);++x<e[c].length;){let k=FT(e[c][x]);if(r.alignDelimiters!==!1){let y=i(k);C[x]=y,(u[x]===void 0||y>u[x])&&(u[x]=y)}E.push(k)}a[c]=E,s[c]=C}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<l;)o[f]=Tm(n[f]);else{let E=Tm(n);for(;++f<l;)o[f]=E}f=-1;let p=[],m=[];for(;++f<l;){let E=o[f],C="",x="";E===99?(C=":",x=":"):E===108?C=":":E===114&&(x=":");let k=r.alignDelimiters===!1?1:Math.max(1,u[f]-C.length-x.length),y=C+"-".repeat(k)+x;r.alignDelimiters!==!1&&(k=C.length+k+x.length,k>u[f]&&(u[f]=k),m[f]=k),p[f]=y}a.splice(1,0,p),s.splice(1,0,m),c=-1;let h=[];for(;++c<a.length;){let E=a[c],C=s[c];f=-1;let x=[];for(;++f<l;){let k=E[f]||"",y="",S="";if(r.alignDelimiters!==!1){let v=u[f]-(C[f]||0),A=o[f];A===114?y=" ".repeat(v):A===99?v%2?(y=" ".repeat(v/2+.5),S=" ".repeat(v/2-.5)):(y=" ".repeat(v/2),S=y):S=" ".repeat(v)}r.delimiterStart!==!1&&!f&&x.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&k==="")&&(r.delimiterStart!==!1||f)&&x.push(" "),r.alignDelimiters!==!1&&x.push(y),x.push(k),r.alignDelimiters!==!1&&x.push(S),r.padding!==!1&&x.push(" "),(r.delimiterEnd!==!1||f!==l-1)&&x.push("|")}h.push(r.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return h.join(`
42
+ `)}function FT(e){return e==null?"":String(e)}function Tm(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Tl(){return{enter:{table:OT,tableData:wm,tableHeader:wm,tableRow:LT},exit:{codeText:PT,table:NT,tableData:Al,tableHeader:Al,tableRow:Al}}}function OT(e){let t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function NT(e){this.exit(e),this.data.inTable=void 0}function LT(e){this.enter({type:"tableRow",children:[]},e)}function Al(e){this.exit(e)}function wm(e){this.enter({type:"tableCell",children:[]},e)}function PT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,MT));let r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function MT(e,t){return t==="|"?t:e}function Cl(e){let t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
42
43
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:u,tableRow:s}};function a(m,h,E,C){return l(c(m,E,C),m.align)}function s(m,h,E,C){let x=f(m,E,C),k=l([x]);return k.slice(0,k.indexOf(`
43
- `))}function u(m,h,E,C){let x=E.enter("tableCell"),k=E.enter("phrasing"),y=E.containerPhrasing(m,{...C,before:o,after:o});return k(),x(),y}function l(m,h){return Am(m,{align:h,alignDelimiters:n,padding:r,stringLength:i})}function c(m,h,E){let C=m.children,x=-1,k=[],y=h.enter("table");for(;++x<C.length;)k[x]=f(C[x],h,E);return y(),k}function f(m,h,E){let C=m.children,x=-1,k=[],y=h.enter("tableRow");for(;++x<C.length;)k[x]=u(C[x],m,h,E);return y(),k}function p(m,h,E){let C=kn.inlineCode(m,h,E);return E.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function wl(){return{exit:{taskListCheckValueChecked:Cm,taskListCheckValueUnchecked:Cm,paragraph:NT}}}function Sl(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:LT}}}function Cm(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function NT(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let i=t.children,o=-1,a;for(;++o<i.length;){let s=i[o];if(s.type==="paragraph"){a=s;break}}a===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(e)}function LT(e,t,r,n){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);o&&s.move(a);let u=kn.listItem(e,t,r,{...n,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+a}}function vl(){return[gl(),yl(),bl(),Tl(),wl()]}function _l(e){return{extensions:[xl(),El(),kl(),Cl(e),Sl()]}}var PT={tokenize:jT,partial:!0},wm={tokenize:$T,partial:!0},Sm={tokenize:qT,partial:!0},vm={tokenize:VT,partial:!0},MT={tokenize:GT,partial:!0},_m={name:"wwwAutolink",tokenize:UT,previous:Rm},Im={name:"protocolAutolink",tokenize:zT,previous:Dm},xr={name:"emailAutolink",tokenize:BT,previous:Fm},Zt={};function Rl(){return{text:Zt}}var Tn=48;for(;Tn<123;)Zt[Tn]=xr,Tn++,Tn===58?Tn=65:Tn===91&&(Tn=97);Zt[43]=xr;Zt[45]=xr;Zt[46]=xr;Zt[95]=xr;Zt[72]=[xr,Im];Zt[104]=[xr,Im];Zt[87]=[xr,_m];Zt[119]=[xr,_m];function BT(e,t,r){let n=this,i,o;return a;function a(f){return!Il(f)||!Fm.call(n,n.previous)||Dl(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Il(f)?(e.consume(f),s):f===64?(e.consume(f),u):r(f)}function u(f){return f===46?e.check(MT,c,l)(f):f===45||f===95||$e(f)?(o=!0,e.consume(f),u):c(f)}function l(f){return e.consume(f),i=!0,u}function c(f){return o&&i&&je(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function UT(e,t,r){let n=this;return i;function i(a){return a!==87&&a!==119||!Rm.call(n,n.previous)||Dl(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(PT,e.attempt(wm,e.attempt(Sm,o),r),r)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function zT(e,t,r){let n=this,i="",o=!1;return a;function a(f){return(f===72||f===104)&&Dm.call(n,n.previous)&&!Dl(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):r(f)}function s(f){if(je(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){let p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),u}return r(f)}function u(f){return f===47?(e.consume(f),o?l:(o=!0,u)):r(f)}function l(f){return f===null||hn(f)||Y(f)||Ht(f)||gn(f)?r(f):e.attempt(wm,e.attempt(Sm,c),r)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function jT(e,t,r){let n=0;return i;function i(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),i):a===46&&n===3?(e.consume(a),o):r(a)}function o(a){return a===null?r(a):t(a)}}function $T(e,t,r){let n,i,o;return a;function a(l){return l===46||l===95?e.check(vm,u,s)(l):l===null||Y(l)||Ht(l)||l!==45&&gn(l)?u(l):(o=!0,e.consume(l),a)}function s(l){return l===95?n=!0:(i=n,n=void 0),e.consume(l),a}function u(l){return i||n||!o?r(l):t(l)}}function qT(e,t){let r=0,n=0;return i;function i(a){return a===40?(r++,e.consume(a),i):a===41&&n<r?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(vm,t,o)(a):a===null||Y(a)||Ht(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&n++,e.consume(a),i}}function VT(e,t,r){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Y(s)||Ht(s)?t(s):r(s)}function i(s){return s===null||s===40||s===91||Y(s)||Ht(s)?t(s):n(s)}function o(s){return je(s)?a(s):r(s)}function a(s){return s===59?(e.consume(s),n):je(s)?(e.consume(s),a):r(s)}}function GT(e,t,r){return n;function n(o){return e.consume(o),i}function i(o){return $e(o)?r(o):t(o)}}function Rm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Y(e)}function Dm(e){return!je(e)}function Fm(e){return!(e===47||Il(e))}function Il(e){return e===43||e===45||e===46||e===95||$e(e)}function Dl(e){let t=e.length,r=!1;for(;t--;){let n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var HT={tokenize:QT,partial:!0};function Fl(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:YT,continuation:{tokenize:XT},exit:JT}},text:{91:{name:"gfmFootnoteCall",tokenize:ZT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:WT,resolveTo:KT}}}}function WT(e,t,r){let n=this,i=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),a;for(;i--;){let u=n.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!a||!a._balanced)return r(u);let l=Qe(n.sliceSerialize({start:a.end,end:n.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?r(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function KT(e,t){let r=e.length,n;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...u),e}function ZT(e,t,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(o>999||f===93&&!a||f===null||f===91||Y(f))return r(f);if(f===93){e.exit("chunkString");let p=e.exit("gfmFootnoteCallString");return i.includes(Qe(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return Y(f)||(a=!0),o++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,l):l(f)}}function YT(e,t,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,a=0,s;return u;function u(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(h)}function c(h){if(a>999||h===93&&!s||h===null||h===91||Y(h))return r(h);if(h===93){e.exit("chunkString");let E=e.exit("gfmFootnoteDefinitionLabelString");return o=Qe(n.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Y(h)||(s=!0),a++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(o)||i.push(o),U(e,m,"gfmFootnoteDefinitionWhitespace")):r(h)}function m(h){return t(h)}}function XT(e,t,r){return e.check(Wt,t,e.attempt(HT,t,r))}function JT(e){e.exit("gfmFootnoteDefinition")}function QT(e,t,r){let n=this;return U(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):r(o)}}function Ol(e){let r=(e||{}).singleTilde,n={name:"strikethrough",tokenize:o,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(a,s){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},f={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},p=[["enter",c,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",f,s]],m=s.parser.constructs.insideSpan.null;m&&De(p,p.length,0,Ir(m,a.slice(l+1,u),s)),De(p,p.length,0,[["exit",f,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",c,s]]),De(a,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,s,u){let l=this.previous,c=this.events,f=0;return p;function p(h){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(h):(a.enter("strikethroughSequenceTemporary"),m(h))}function m(h){let E=gr(l);if(h===126)return f>1?u(h):(a.consume(h),f++,m);if(f<2&&!r)return u(h);let C=a.exit("strikethroughSequenceTemporary"),x=gr(h);return C._open=!x||x===2&&!!E,C._close=!E||E===2&&!!x,s(h)}}}var wa=class{constructor(){this.map=[]}add(t,r,n){eC(this,t,r,n)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(let o of i)t.push(o);i=n.pop()}this.map.length=0}};function eC(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function Om(e,t){let r=!1,n=[];for(;t<e.length;){let i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-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);t+=1}return n}function Nl(){return{flow:{null:{name:"table",tokenize:tC,resolveAll:rC}}}}function tC(e,t,r){let n=this,i=0,o=0,a;return s;function s(b){let ce=n.events.length-1;for(;ce>-1;){let V=n.events[ce][1].type;if(V==="lineEnding"||V==="linePrefix")ce--;else break}let Q=ce>-1?n.events[ce][1].type:null,B=Q==="tableHead"||Q==="tableRow"?A:u;return B===A&&n.parser.lazy[n.now().line]?r(b):B(b)}function u(b){return e.enter("tableHead"),e.enter("tableRow"),l(b)}function l(b){return b===124||(a=!0,o+=1),c(b)}function c(b){return b===null?r(b):R(b)?o>1?(o=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):r(b):z(b)?U(e,c,"whitespace")(b):(o+=1,a&&(a=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),f(b)))}function f(b){return b===null||b===124||Y(b)?(e.exit("data"),c(b)):(e.consume(b),b===92?p:f)}function p(b){return b===92||b===124?(e.consume(b),f):f(b)}function m(b){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(b):(e.enter("tableDelimiterRow"),a=!1,z(b)?U(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):h(b))}function h(b){return b===45||b===58?C(b):b===124?(a=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),E):v(b)}function E(b){return z(b)?U(e,C,"whitespace")(b):C(b)}function C(b){return b===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),x):b===45?(o+=1,x(b)):b===null||R(b)?S(b):v(b)}function x(b){return b===45?(e.enter("tableDelimiterFiller"),k(b)):v(b)}function k(b){return b===45?(e.consume(b),k):b===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(b))}function y(b){return z(b)?U(e,S,"whitespace")(b):S(b)}function S(b){return b===124?h(b):b===null||R(b)?!a||i!==o?v(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):v(b)}function v(b){return r(b)}function A(b){return e.enter("tableRow"),te(b)}function te(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),te):b===null||R(b)?(e.exit("tableRow"),t(b)):z(b)?U(e,te,"whitespace")(b):(e.enter("data"),J(b))}function J(b){return b===null||b===124||Y(b)?(e.exit("data"),te(b)):(e.consume(b),b===92?re:J)}function re(b){return b===92||b===124?(e.consume(b),J):J(b)}}function rC(e,t){let r=-1,n=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,l,c,f,p=new wa;for(;++r<e.length;){let m=e[r],h=m[1];m[0]==="enter"?h.type==="tableHead"?(s=!1,u!==0&&(Nm(p,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(n=!0,f=void 0,o=[0,0,0,0],a=[0,r+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",c,t]])),i=h.type==="tableDelimiterRow"?2:c?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],f=Sa(p,t,o,i,void 0,f),o=[0,0,0,0]),a[2]=r)):h.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(a[0]=a[1],f=Sa(p,t,o,i,void 0,f)),o=a,a=[o[1],r,0,0])):h.type==="tableHead"?(s=!0,u=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(u=r,o[1]!==0?(a[0]=a[1],f=Sa(p,t,o,i,r,f)):a[1]!==0&&(f=Sa(p,t,a,i,r,f)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(u!==0&&Nm(p,t,u,l,c),p.consume(t.events),r=-1;++r<t.events.length;){let m=t.events[r];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=Om(t.events,r))}return e}function Sa(e,t,r,n,i,o){let a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(o.end=Object.assign({},ni(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));let u=ni(t.events,r[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(r[1],0,[["enter",o,t]]),r[2]!==0){let l=ni(t.events,r[2]),c=ni(t.events,r[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){let p=t.events[r[2]],m=t.events[r[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){let h=r[2]+1,E=r[3]-r[2]-1;e.add(h,E,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},ni(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Nm(e,t,r,n,i){let o=[],a=ni(t.events,r);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),n.end=Object.assign({},a),o.push(["exit",n,t]),e.add(r+1,0,o)}function ni(e,t){let r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}var nC={name:"tasklistCheck",tokenize:iC};function Ll(){return{text:{91:nC}}}function iC(e,t,r){let n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return Y(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):r(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(u)}function s(u){return R(u)?t(u):z(u)?e.check({tokenize:oC},t,r)(u):r(u)}}function oC(e,t,r){return U(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function Lm(e){return ta([Rl(),Fl(),Ol(e),Nl(),Ll()])}var aC={};function Dr(e){let t=this,r=e||aC,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Lm(r)),o.push(vl()),a.push(_l(r))}import{mdatCheck as pC,mdatClean as Mm,mdatExpand as mC,mdatSplit as Bm}from"remark-mdat";import sC from"node:fs";import uC from"node:path";import{VFile as lC}from"vfile";function Pl(e,t,r){let n=Pm(e);if(!r&&typeof t=="function"&&(r=t,t=void 0),!r)return new Promise(o);o(i,r);function i(a){r(void 0,a)}function o(a,s){let u;try{u=uC.resolve(n.cwd,n.path)}catch(c){return s(c)}sC.readFile(u,t,l);function l(c,f){c?s(c):(n.value=f,a(n))}}}function Pm(e){return typeof e=="string"||e instanceof URL?e={path:e}:fC(e)&&(e={path:new TextDecoder().decode(e)}),cC(e)?e:new lC(e)}function cC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}import{VFile as dC}from"vfile";async function Fr(e,t,r,n,i,o,a){let s=await t({additionalConfig:o,additionalRules:a});o=s;let u=await Cu(),l=Kf(e),c=Hf(l,i,n,"md"),f=[],p=r(s,u);for(let{input:m,name:h,output:E}of c){let C=await Pl(m),x=await p.process(C);x.dirname=E,x.basename=h,f.push(x)}return f}async function Cn(e,t,r,n,i){let o=await t({additionalConfig:n,additionalRules:i});n=o;let a=await Cu();return r(o,a).process(new dC(e))}function ii(e,t){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(t).use(()=>async function(n,i){Bm(n,i),Mm(n,i,e),await mC(n,i,e)})}function uo(e,t){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(t).use(()=>function(n,i){Bm(n,i),Mm(n,i,e)})}function oi(e,t){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(t).use(()=>async function(n,i){await pC(n,i,{...e,paranoid:!1})})}async function hC(e,t,r,n,i){return Fr(e,Ut,ii,t,r,n,i)}async function gC(e,t,r){return Cn(e,Ut,ii,t,r)}async function xC(e,t,r,n,i){return Fr(e,Ut,oi,t,r,n,i)}async function yC(e,t,r){return Cn(e,Ut,oi,t,r)}async function EC(e,t,r,n,i){return Fr(e,Ut,uo,t,r,n,i)}async function bC(e,t,r){return Cn(e,Ut,uo,t,r)}var va={badges:{async content(e){let t=L.object({custom:L.record(L.object({image:L.string(),link:L.string()})).optional(),npm:L.array(L.string()).optional()}).optional().parse(e),r=await Ct(),{name:n}=r,i=[];if(!r.private&&r.publishConfig?.access==="public"&&i.push(`[![NPM Package ${n}](https://img.shields.io/npm/v/${n}.svg)](https://npmjs.com/package/${n})`),t?.npm!==void 0)for(let a of t.npm)i.push(`[![NPM Package ${a}](https://img.shields.io/npm/v/${a}.svg)](https://npmjs.com/package/${a})`);let{license:o}=r;if(o!==void 0&&i.push(`[![License: ${o}](https://img.shields.io/badge/License-${o}-yellow.svg)](https://opensource.org/licenses/${o})`),t?.custom!==void 0)for(let[a,{image:s,link:u}]of Object.entries(t.custom))i.push(`[![${a}](${s})](${u})`);return i.join(`
44
- `)},order:3}};import{globby as kC}from"globby";import _a from"node:path";import{readPackage as AC}from"read-pkg";var Ia={banner:{async content(e){let t=L.object({alt:L.string().optional(),src:L.string().optional()}).optional().parse(e),{assetsPath:r,packageFile:n}=await dn();if(n===void 0)throw new Error("No package.json found");let i=t?.src??await Um(r)??await Um();if(i===void 0)throw new Error("Banner image not found at any typical location, consider adding something at ./assets/banner.webp");if(!zm(i)&&!await Yn(i))throw new Error(`Banner image not found at "${i}"`);let o=t?.alt??`${(await AC({cwd:_a.dirname(n)})).name} banner`;if(o===void 0||o==="undefined banner")throw new Error("Banner image alt text not available");return`![${o}](${i})`},order:2}};async function Um(e){let{packageFile:t}=await dn();if(t===void 0)throw new Error("No package.json found");let r=_a.dirname(t),n=e===void 0?[".","assets","media","readme-assets","readme-media","readme","images",".github/assets"]:[e],i=["banner","cover","demo","header","hero","image","logo","overview","readme","screenshot","screenshots","splash"],o=["png","gif","jpg","jpeg","svg","webp"],a=await kC(n.map(s=>_a.join(r,s)),{deep:1,expandDirectories:{extensions:o,files:i}});if(a.length>0)return _a.relative(process.cwd(),a[0])}function zm(e,t=!0){if(typeof e!="string")throw new TypeError("Expected a string");if(e=e.trim(),e.includes(" "))return!1;try{return new URL(e),!0}catch{return t?zm(`https://${e}`,!1):!1}}import{getSoleRule as FF}from"remark-mdat";import{execaCommand as xF}from"execa";import{log as oy}from"remark-mdat";function jm(e,t=Number.MAX_SAFE_INTEGER){let r=[],n=TC(e,t);return r.push(CC(n)),r.push(wC(e,n)),n.hasMultipleSubcommands&&n.canRecurse&&r.push(SC(n.fullCommandName)),n.defaultCommand?.commandName!==void 0&&r.push(vC(n)),r.push(_C(e,n)),e.positionals&&!n.commandsOnly&&r.push(Ml(["Positional Argument","Description","Type","Default"],e.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}\``:""]))),e.commands&&r.push(Ml(["Command","Argument","Description"],e.commands.map(i=>[`\`${i.commandName??(i.default?"[default]":"")}\``,i.arguments?i.arguments?.map(o=>`\`${o}\``).join(" "):"",`${i.description??""}${i.default?" _(Default command.)_":""}`]))),e.options&&!n.commandsOnly&&r.push(Ml(["Option","Argument","Description","Type","Default"],e.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(`
44
+ `))}function u(m,h,E,C){let x=E.enter("tableCell"),k=E.enter("phrasing"),y=E.containerPhrasing(m,{...C,before:o,after:o});return k(),x(),y}function l(m,h){return Cm(m,{align:h,alignDelimiters:n,padding:r,stringLength:i})}function c(m,h,E){let C=m.children,x=-1,k=[],y=h.enter("table");for(;++x<C.length;)k[x]=f(C[x],h,E);return y(),k}function f(m,h,E){let C=m.children,x=-1,k=[],y=h.enter("tableRow");for(;++x<C.length;)k[x]=u(C[x],m,h,E);return y(),k}function p(m,h,E){let C=kn.inlineCode(m,h,E);return E.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function wl(){return{exit:{taskListCheckValueChecked:Sm,taskListCheckValueUnchecked:Sm,paragraph:BT}}}function Sl(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:UT}}}function Sm(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function BT(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let i=t.children,o=-1,a;for(;++o<i.length;){let s=i[o];if(s.type==="paragraph"){a=s;break}}a===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(e)}function UT(e,t,r,n){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);o&&s.move(a);let u=kn.listItem(e,t,r,{...n,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+a}}function vl(){return[gl(),yl(),bl(),Tl(),wl()]}function _l(e){return{extensions:[xl(),El(e),kl(),Cl(e),Sl()]}}var zT={tokenize:GT,partial:!0},vm={tokenize:HT,partial:!0},_m={tokenize:WT,partial:!0},Im={tokenize:KT,partial:!0},jT={tokenize:ZT,partial:!0},Rm={name:"wwwAutolink",tokenize:qT,previous:Fm},Dm={name:"protocolAutolink",tokenize:VT,previous:Om},xr={name:"emailAutolink",tokenize:$T,previous:Nm},Zt={};function Rl(){return{text:Zt}}var Tn=48;for(;Tn<123;)Zt[Tn]=xr,Tn++,Tn===58?Tn=65:Tn===91&&(Tn=97);Zt[43]=xr;Zt[45]=xr;Zt[46]=xr;Zt[95]=xr;Zt[72]=[xr,Dm];Zt[104]=[xr,Dm];Zt[87]=[xr,Rm];Zt[119]=[xr,Rm];function $T(e,t,r){let n=this,i,o;return a;function a(f){return!Il(f)||!Nm.call(n,n.previous)||Dl(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Il(f)?(e.consume(f),s):f===64?(e.consume(f),u):r(f)}function u(f){return f===46?e.check(jT,c,l)(f):f===45||f===95||$e(f)?(o=!0,e.consume(f),u):c(f)}function l(f){return e.consume(f),i=!0,u}function c(f){return o&&i&&je(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function qT(e,t,r){let n=this;return i;function i(a){return a!==87&&a!==119||!Fm.call(n,n.previous)||Dl(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(zT,e.attempt(vm,e.attempt(_m,o),r),r)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function VT(e,t,r){let n=this,i="",o=!1;return a;function a(f){return(f===72||f===104)&&Om.call(n,n.previous)&&!Dl(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):r(f)}function s(f){if(je(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){let p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),u}return r(f)}function u(f){return f===47?(e.consume(f),o?l:(o=!0,u)):r(f)}function l(f){return f===null||hn(f)||Y(f)||Ht(f)||gn(f)?r(f):e.attempt(vm,e.attempt(_m,c),r)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function GT(e,t,r){let n=0;return i;function i(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),i):a===46&&n===3?(e.consume(a),o):r(a)}function o(a){return a===null?r(a):t(a)}}function HT(e,t,r){let n,i,o;return a;function a(l){return l===46||l===95?e.check(Im,u,s)(l):l===null||Y(l)||Ht(l)||l!==45&&gn(l)?u(l):(o=!0,e.consume(l),a)}function s(l){return l===95?n=!0:(i=n,n=void 0),e.consume(l),a}function u(l){return i||n||!o?r(l):t(l)}}function WT(e,t){let r=0,n=0;return i;function i(a){return a===40?(r++,e.consume(a),i):a===41&&n<r?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Im,t,o)(a):a===null||Y(a)||Ht(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&n++,e.consume(a),i}}function KT(e,t,r){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Y(s)||Ht(s)?t(s):r(s)}function i(s){return s===null||s===40||s===91||Y(s)||Ht(s)?t(s):n(s)}function o(s){return je(s)?a(s):r(s)}function a(s){return s===59?(e.consume(s),n):je(s)?(e.consume(s),a):r(s)}}function ZT(e,t,r){return n;function n(o){return e.consume(o),i}function i(o){return $e(o)?r(o):t(o)}}function Fm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Y(e)}function Om(e){return!je(e)}function Nm(e){return!(e===47||Il(e))}function Il(e){return e===43||e===45||e===46||e===95||$e(e)}function Dl(e){let t=e.length,r=!1;for(;t--;){let n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var YT={tokenize:nC,partial:!0};function Fl(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:eC,continuation:{tokenize:tC},exit:rC}},text:{91:{name:"gfmFootnoteCall",tokenize:QT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:XT,resolveTo:JT}}}}function XT(e,t,r){let n=this,i=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),a;for(;i--;){let u=n.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!a||!a._balanced)return r(u);let l=Qe(n.sliceSerialize({start:a.end,end:n.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?r(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function JT(e,t){let r=e.length,n;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...u),e}function QT(e,t,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(o>999||f===93&&!a||f===null||f===91||Y(f))return r(f);if(f===93){e.exit("chunkString");let p=e.exit("gfmFootnoteCallString");return i.includes(Qe(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return Y(f)||(a=!0),o++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,l):l(f)}}function eC(e,t,r){let n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,a=0,s;return u;function u(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(h)}function c(h){if(a>999||h===93&&!s||h===null||h===91||Y(h))return r(h);if(h===93){e.exit("chunkString");let E=e.exit("gfmFootnoteDefinitionLabelString");return o=Qe(n.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Y(h)||(s=!0),a++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(o)||i.push(o),U(e,m,"gfmFootnoteDefinitionWhitespace")):r(h)}function m(h){return t(h)}}function tC(e,t,r){return e.check(Wt,t,e.attempt(YT,t,r))}function rC(e){e.exit("gfmFootnoteDefinition")}function nC(e,t,r){let n=this;return U(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){let a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):r(o)}}function Ol(e){let r=(e||{}).singleTilde,n={name:"strikethrough",tokenize:o,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(a,s){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},f={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},p=[["enter",c,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",f,s]],m=s.parser.constructs.insideSpan.null;m&&De(p,p.length,0,Ir(m,a.slice(l+1,u),s)),De(p,p.length,0,[["exit",f,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",c,s]]),De(a,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,s,u){let l=this.previous,c=this.events,f=0;return p;function p(h){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(h):(a.enter("strikethroughSequenceTemporary"),m(h))}function m(h){let E=gr(l);if(h===126)return f>1?u(h):(a.consume(h),f++,m);if(f<2&&!r)return u(h);let C=a.exit("strikethroughSequenceTemporary"),x=gr(h);return C._open=!x||x===2&&!!E,C._close=!E||E===2&&!!x,s(h)}}}var wa=class{constructor(){this.map=[]}add(t,r,n){iC(this,t,r,n)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(let o of i)t.push(o);i=n.pop()}this.map.length=0}};function iC(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function Lm(e,t){let r=!1,n=[];for(;t<e.length;){let i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-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);t+=1}return n}function Nl(){return{flow:{null:{name:"table",tokenize:oC,resolveAll:aC}}}}function oC(e,t,r){let n=this,i=0,o=0,a;return s;function s(b){let ce=n.events.length-1;for(;ce>-1;){let V=n.events[ce][1].type;if(V==="lineEnding"||V==="linePrefix")ce--;else break}let Q=ce>-1?n.events[ce][1].type:null,B=Q==="tableHead"||Q==="tableRow"?A:u;return B===A&&n.parser.lazy[n.now().line]?r(b):B(b)}function u(b){return e.enter("tableHead"),e.enter("tableRow"),l(b)}function l(b){return b===124||(a=!0,o+=1),c(b)}function c(b){return b===null?r(b):R(b)?o>1?(o=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):r(b):z(b)?U(e,c,"whitespace")(b):(o+=1,a&&(a=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),f(b)))}function f(b){return b===null||b===124||Y(b)?(e.exit("data"),c(b)):(e.consume(b),b===92?p:f)}function p(b){return b===92||b===124?(e.consume(b),f):f(b)}function m(b){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(b):(e.enter("tableDelimiterRow"),a=!1,z(b)?U(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):h(b))}function h(b){return b===45||b===58?C(b):b===124?(a=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),E):v(b)}function E(b){return z(b)?U(e,C,"whitespace")(b):C(b)}function C(b){return b===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),x):b===45?(o+=1,x(b)):b===null||R(b)?S(b):v(b)}function x(b){return b===45?(e.enter("tableDelimiterFiller"),k(b)):v(b)}function k(b){return b===45?(e.consume(b),k):b===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(b))}function y(b){return z(b)?U(e,S,"whitespace")(b):S(b)}function S(b){return b===124?h(b):b===null||R(b)?!a||i!==o?v(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):v(b)}function v(b){return r(b)}function A(b){return e.enter("tableRow"),te(b)}function te(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),te):b===null||R(b)?(e.exit("tableRow"),t(b)):z(b)?U(e,te,"whitespace")(b):(e.enter("data"),J(b))}function J(b){return b===null||b===124||Y(b)?(e.exit("data"),te(b)):(e.consume(b),b===92?re:J)}function re(b){return b===92||b===124?(e.consume(b),J):J(b)}}function aC(e,t){let r=-1,n=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,l,c,f,p=new wa;for(;++r<e.length;){let m=e[r],h=m[1];m[0]==="enter"?h.type==="tableHead"?(s=!1,u!==0&&(Pm(p,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(n=!0,f=void 0,o=[0,0,0,0],a=[0,r+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",c,t]])),i=h.type==="tableDelimiterRow"?2:c?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],f=Sa(p,t,o,i,void 0,f),o=[0,0,0,0]),a[2]=r)):h.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(a[0]=a[1],f=Sa(p,t,o,i,void 0,f)),o=a,a=[o[1],r,0,0])):h.type==="tableHead"?(s=!0,u=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(u=r,o[1]!==0?(a[0]=a[1],f=Sa(p,t,o,i,r,f)):a[1]!==0&&(f=Sa(p,t,a,i,r,f)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(u!==0&&Pm(p,t,u,l,c),p.consume(t.events),r=-1;++r<t.events.length;){let m=t.events[r];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=Lm(t.events,r))}return e}function Sa(e,t,r,n,i,o){let a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(o.end=Object.assign({},ni(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));let u=ni(t.events,r[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(r[1],0,[["enter",o,t]]),r[2]!==0){let l=ni(t.events,r[2]),c=ni(t.events,r[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){let p=t.events[r[2]],m=t.events[r[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){let h=r[2]+1,E=r[3]-r[2]-1;e.add(h,E,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},ni(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Pm(e,t,r,n,i){let o=[],a=ni(t.events,r);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),n.end=Object.assign({},a),o.push(["exit",n,t]),e.add(r+1,0,o)}function ni(e,t){let r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}var sC={name:"tasklistCheck",tokenize:uC};function Ll(){return{text:{91:sC}}}function uC(e,t,r){let n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return Y(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):r(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(u)}function s(u){return R(u)?t(u):z(u)?e.check({tokenize:lC},t,r)(u):r(u)}}function lC(e,t,r){return U(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function Mm(e){return ta([Rl(),Fl(),Ol(e),Nl(),Ll()])}var cC={};function Dr(e){let t=this,r=e||cC,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Mm(r)),o.push(vl()),a.push(_l(r))}import{mdatCheck as gC,mdatClean as Um,mdatExpand as xC,mdatSplit as zm}from"remark-mdat";import fC from"node:fs";import pC from"node:path";import{VFile as mC}from"vfile";function Pl(e,t,r){let n=Bm(e);if(!r&&typeof t=="function"&&(r=t,t=void 0),!r)return new Promise(o);o(i,r);function i(a){r(void 0,a)}function o(a,s){let u;try{u=pC.resolve(n.cwd,n.path)}catch(c){return s(c)}fC.readFile(u,t,l);function l(c,f){c?s(c):(n.value=f,a(n))}}}function Bm(e){return typeof e=="string"||e instanceof URL?e={path:e}:hC(e)&&(e={path:new TextDecoder().decode(e)}),dC(e)?e:new mC(e)}function dC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function hC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}import{VFile as yC}from"vfile";async function Fr(e,t,r,n,i,o,a){let s=await t({additionalConfig:o,additionalRules:a});o=s;let u=await Cu(),l=Zf(e),c=Wf(l,i,n,"md"),f=[],p=r(s,u);for(let{input:m,name:h,output:E}of c){let C=await Pl(m),x=await p.process(C);x.dirname=E,x.basename=h,f.push(x)}return f}async function Cn(e,t,r,n,i){let o=await t({additionalConfig:n,additionalRules:i});n=o;let a=await Cu();return r(o,a).process(new yC(e))}function ii(e,t){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(t).use(()=>async function(n,i){zm(n,i),Um(n,i,e),await xC(n,i,e)})}function uo(e,t){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(t).use(()=>function(n,i){zm(n,i),Um(n,i,e)})}function oi(e,t){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(t).use(()=>async function(n,i){await gC(n,i,{...e,paranoid:!1})})}async function EC(e,t,r,n,i){return Fr(e,Ut,ii,t,r,n,i)}async function bC(e,t,r){return Cn(e,Ut,ii,t,r)}async function kC(e,t,r,n,i){return Fr(e,Ut,oi,t,r,n,i)}async function AC(e,t,r){return Cn(e,Ut,oi,t,r)}async function TC(e,t,r,n,i){return Fr(e,Ut,uo,t,r,n,i)}async function CC(e,t,r){return Cn(e,Ut,uo,t,r)}var va={badges:{async content(e){let t=L.object({custom:L.record(L.object({image:L.string(),link:L.string()})).optional(),npm:L.array(L.string()).optional()}).optional().parse(e),r=await Ct(),{name:n}=r,i=[];if(!r.private&&r.publishConfig?.access==="public"&&i.push(`[![NPM Package ${n}](https://img.shields.io/npm/v/${n}.svg)](https://npmjs.com/package/${n})`),t?.npm!==void 0)for(let a of t.npm)i.push(`[![NPM Package ${a}](https://img.shields.io/npm/v/${a}.svg)](https://npmjs.com/package/${a})`);let{license:o}=r;if(o!==void 0&&i.push(`[![License: ${o}](https://img.shields.io/badge/License-${o}-yellow.svg)](https://opensource.org/licenses/${o})`),t?.custom!==void 0)for(let[a,{image:s,link:u}]of Object.entries(t.custom))i.push(`[![${a}](${s})](${u})`);return i.join(`
45
+ `)},order:3}};import{globby as wC}from"globby";import _a from"node:path";import{readPackage as SC}from"read-pkg";var Ia={banner:{async content(e){let t=L.object({alt:L.string().optional(),src:L.string().optional()}).optional().parse(e),{assetsPath:r,packageFile:n}=await dn();if(n===void 0)throw new Error("No package.json found");let i=t?.src??await jm(r)??await jm();if(i===void 0)throw new Error("Banner image not found at any typical location, consider adding something at ./assets/banner.webp");if(!$m(i)&&!await Yn(i))throw new Error(`Banner image not found at "${i}"`);let o=t?.alt??`${(await SC({cwd:_a.dirname(n)})).name} banner`;if(o===void 0||o==="undefined banner")throw new Error("Banner image alt text not available");return`![${o}](${i})`},order:2}};async function jm(e){let{packageFile:t}=await dn();if(t===void 0)throw new Error("No package.json found");let r=_a.dirname(t),n=e===void 0?[".","assets","media","readme-assets","readme-media","readme","images",".github/assets"]:[e],i=["banner","cover","demo","header","hero","image","logo","overview","readme","screenshot","screenshots","splash"],o=["png","gif","jpg","jpeg","svg","webp"],a=await wC(n.map(s=>_a.join(r,s)),{deep:1,expandDirectories:{extensions:o,files:i}});if(a.length>0)return _a.relative(process.cwd(),a[0])}function $m(e,t=!0){if(typeof e!="string")throw new TypeError("Expected a string");if(e=e.trim(),e.includes(" "))return!1;try{return new URL(e),!0}catch{return t?$m(`https://${e}`,!1):!1}}import{getSoleRule as PF}from"remark-mdat";import{execaCommand as kF}from"execa";import{log as sy}from"remark-mdat";function qm(e,t=Number.MAX_SAFE_INTEGER){let r=[],n=vC(e,t);return r.push(_C(n)),r.push(IC(e,n)),n.hasMultipleSubcommands&&n.canRecurse&&r.push(RC(n.fullCommandName)),n.defaultCommand?.commandName!==void 0&&r.push(DC(n)),r.push(FC(e,n)),e.positionals&&!n.commandsOnly&&r.push(Ml(["Positional Argument","Description","Type","Default"],e.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}\``:""]))),e.commands&&r.push(Ml(["Command","Argument","Description"],e.commands.map(i=>[`\`${i.commandName??(i.default?"[default]":"")}\``,i.arguments?i.arguments.map(o=>`\`${o}\``).join(" "):"",`${i.description??""}${i.default?" _(Default command.)_":""}`]))),e.options&&!n.commandsOnly&&r.push(Ml(["Option","Argument","Description","Type","Default"],e.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(`
45
46
 
46
- `)}function TC(e,t){let r=e.subcommandName===void 0,n=e.commands?e.commands.length>1:!1,i=t>1,o=e.commands?.find(l=>l.default),a=e.commands?.find(l=>l.commandName===void 0),s=`${e.commandName}${e.subcommandName?` ${e.subcommandName}`:""}`,u=i&&n&&o?.commandName!==void 0;return{canRecurse:i,commandsOnly:u,defaultCommand:o,fullCommandName:s,hasMultipleSubcommands:n,isTopLevel:r,topLevelCommand:a}}function CC(e){return`#### ${e.isTopLevel?"Command":"Subcommand"}: \`${e.fullCommandName}\``}function wC(e,t){return t.isTopLevel&&t.topLevelCommand?.description?(e.commands=e.commands?.filter(r=>r!==t.topLevelCommand),t.topLevelCommand.description):e.description??""}function SC(e){return`This section lists top-level commands for \`${e}\`.`}function vC(e){return`If no command is provided, \`${e.defaultCommand?.parentCommandName} ${e.defaultCommand?.commandName}\` is run by default.`}function _C(e,t){let r=t.topLevelCommand?.arguments?` ${t.topLevelCommand.arguments.join(" ")}`:`${e.arguments?` ${e.arguments.join(" ")}`:""}`;return`Usage:
47
+ `)}function vC(e,t){let r=e.subcommandName===void 0,n=e.commands?e.commands.length>1:!1,i=t>1,o=e.commands?.find(l=>l.default),a=e.commands?.find(l=>l.commandName===void 0),s=`${e.commandName}${e.subcommandName?` ${e.subcommandName}`:""}`,u=i&&n&&o?.commandName!==void 0;return{canRecurse:i,commandsOnly:u,defaultCommand:o,fullCommandName:s,hasMultipleSubcommands:n,isTopLevel:r,topLevelCommand:a}}function _C(e){return`#### ${e.isTopLevel?"Command":"Subcommand"}: \`${e.fullCommandName}\``}function IC(e,t){return t.isTopLevel&&t.topLevelCommand?.description?(e.commands=e.commands?.filter(r=>r!==t.topLevelCommand),t.topLevelCommand.description):e.description??""}function RC(e){return`This section lists top-level commands for \`${e}\`.`}function DC(e){return`If no command is provided, \`${e.defaultCommand?.parentCommandName} ${e.defaultCommand?.commandName}\` is run by default.`}function FC(e,t){let r=t.topLevelCommand?.arguments?` ${t.topLevelCommand.arguments.join(" ")}`:e.arguments?` ${e.arguments.join(" ")}`:"";return`Usage:
47
48
 
48
49
  \`\`\`txt
49
50
  ${t.fullCommandName}${r}
50
- \`\`\``}function Ml(e,t){let r=IC(t);e=e.filter((i,o)=>!r.includes(o)),t=t.map(i=>i.filter((o,a)=>!r.includes(a)));let n="";n+=`| ${e.join(" | ")} |
51
+ \`\`\``}function Ml(e,t){let r=OC(t);e=e.filter((i,o)=>!r.includes(o)),t=t.map(i=>i.filter((o,a)=>!r.includes(a)));let n="";n+=`| ${e.join(" | ")} |
51
52
  `,n+=`| ${e.map(()=>"---").join(" | ")} |
52
53
  `;for(let i of t)n+=`| ${i.join(" | ")} |
53
- `;return n}function IC(e){let t=[],r=e[0]?.length||0;for(let n=0;n<r;n++){let i=!0;for(let o of e)if(o[n]!==""){i=!1;break}i&&t.push(n)}return t}import{log as Kc}from"remark-mdat";var RC=typeof global=="object"&&global&&global.Object===Object&&global,Ra=RC;var DC=typeof self=="object"&&self&&self.Object===Object&&self,FC=Ra||DC||Function("return this")(),Pe=FC;var OC=Pe.Symbol,He=OC;var $m=Object.prototype,NC=$m.hasOwnProperty,LC=$m.toString,lo=He?He.toStringTag:void 0;function PC(e){var t=NC.call(e,lo),r=e[lo];try{e[lo]=void 0;var n=!0}catch{}var i=LC.call(e);return n&&(t?e[lo]=r:delete e[lo]),i}var qm=PC;var MC=Object.prototype,BC=MC.toString;function UC(e){return BC.call(e)}var Vm=UC;var zC="[object Null]",jC="[object Undefined]",Gm=He?He.toStringTag:void 0;function $C(e){return e==null?e===void 0?jC:zC:Gm&&Gm in Object(e)?qm(e):Vm(e)}var ut=$C;function qC(e){return e!=null&&typeof e=="object"}var Fe=qC;var VC="[object Symbol]";function GC(e){return typeof e=="symbol"||Fe(e)&&ut(e)==VC}var Or=GC;function HC(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Yt=HC;var WC=Array.isArray,P=WC;var KC=1/0,Hm=He?He.prototype:void 0,Wm=Hm?Hm.toString:void 0;function Km(e){if(typeof e=="string")return e;if(P(e))return Yt(e,Km)+"";if(Or(e))return Wm?Wm.call(e):"";var t=e+"";return t=="0"&&1/e==-KC?"-0":t}var Zm=Km;var ZC=/\s/;function YC(e){for(var t=e.length;t--&&ZC.test(e.charAt(t)););return t}var Ym=YC;var XC=/^\s+/;function JC(e){return e&&e.slice(0,Ym(e)+1).replace(XC,"")}var Xm=JC;function QC(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ce=QC;var Jm=NaN,ew=/^[-+]0x[0-9a-f]+$/i,tw=/^0b[01]+$/i,rw=/^0o[0-7]+$/i,nw=parseInt;function iw(e){if(typeof e=="number")return e;if(Or(e))return Jm;if(Ce(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ce(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Xm(e);var r=tw.test(e);return r||rw.test(e)?nw(e.slice(2),r?2:8):ew.test(e)?Jm:+e}var Qm=iw;var ed=1/0,ow=17976931348623157e292;function aw(e){if(!e)return e===0?e:0;if(e=Qm(e),e===ed||e===-ed){var t=e<0?-1:1;return t*ow}return e===e?e:0}var td=aw;function sw(e){var t=td(e),r=t%1;return t===t?r?t-r:t:0}var Xt=sw;function uw(e){return e}var Ot=uw;var lw="[object AsyncFunction]",cw="[object Function]",fw="[object GeneratorFunction]",pw="[object Proxy]";function mw(e){if(!Ce(e))return!1;var t=ut(e);return t==cw||t==fw||t==lw||t==pw}var lt=mw;var dw=Pe["__core-js_shared__"],Da=dw;var rd=function(){var e=/[^.]+$/.exec(Da&&Da.keys&&Da.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function hw(e){return!!rd&&rd in e}var nd=hw;var gw=Function.prototype,xw=gw.toString;function yw(e){if(e!=null){try{return xw.call(e)}catch{}try{return e+""}catch{}}return""}var yr=yw;var Ew=/[\\^$.*+?()[\]{}|]/g,bw=/^\[object .+?Constructor\]$/,kw=Function.prototype,Aw=Object.prototype,Tw=kw.toString,Cw=Aw.hasOwnProperty,ww=RegExp("^"+Tw.call(Cw).replace(Ew,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Sw(e){if(!Ce(e)||nd(e))return!1;var t=lt(e)?ww:bw;return t.test(yr(e))}var id=Sw;function vw(e,t){return e?.[t]}var od=vw;function _w(e,t){var r=od(e,t);return id(r)?r:void 0}var ht=_w;var Iw=ht(Pe,"WeakMap"),Fa=Iw;var ad=Object.create,Rw=function(){function e(){}return function(t){if(!Ce(t))return{};if(ad)return ad(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),sd=Rw;function Dw(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var ud=Dw;function Fw(){}var we=Fw;function Ow(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var ld=Ow;var Nw=800,Lw=16,Pw=Date.now;function Mw(e){var t=0,r=0;return function(){var n=Pw(),i=Lw-(n-r);if(r=n,i>0){if(++t>=Nw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var cd=Mw;function Bw(e){return function(){return e}}var fd=Bw;var Uw=function(){try{var e=ht(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ai=Uw;var zw=ai?function(e,t){return ai(e,"toString",{configurable:!0,enumerable:!1,value:fd(t),writable:!0})}:Ot,pd=zw;var jw=cd(pd),md=jw;function $w(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Oa=$w;function qw(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var Na=qw;function Vw(e){return e!==e}var dd=Vw;function Gw(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var hd=Gw;function Hw(e,t,r){return t===t?hd(e,t,r):Na(e,dd,r)}var si=Hw;function Ww(e,t){var r=e==null?0:e.length;return!!r&&si(e,t,0)>-1}var La=Ww;var Kw=9007199254740991,Zw=/^(?:0|[1-9]\d*)$/;function Yw(e,t){var r=typeof e;return t=t??Kw,!!t&&(r=="number"||r!="symbol"&&Zw.test(e))&&e>-1&&e%1==0&&e<t}var Nr=Yw;function Xw(e,t,r){t=="__proto__"&&ai?ai(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var ui=Xw;function Jw(e,t){return e===t||e!==e&&t!==t}var Jt=Jw;var Qw=Object.prototype,eS=Qw.hasOwnProperty;function tS(e,t,r){var n=e[t];(!(eS.call(e,t)&&Jt(n,r))||r===void 0&&!(t in e))&&ui(e,t,r)}var Lr=tS;function rS(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),i?ui(r,s,u):Lr(r,s,u)}return r}var Qt=rS;var gd=Math.max;function nS(e,t,r){return t=gd(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=gd(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),ud(e,this,s)}}var xd=nS;function iS(e,t){return md(xd(e,t,Ot),e+"")}var li=iS;var oS=9007199254740991;function aS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=oS}var ci=aS;function sS(e){return e!=null&&ci(e.length)&&!lt(e)}var Me=sS;function uS(e,t,r){if(!Ce(r))return!1;var n=typeof t;return(n=="number"?Me(r)&&Nr(t,r.length):n=="string"&&t in r)?Jt(r[t],e):!1}var Pr=uS;function lS(e){return li(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Pr(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t})}var yd=lS;var cS=Object.prototype;function fS(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||cS;return e===r}var er=fS;function pS(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Ed=pS;var mS="[object Arguments]";function dS(e){return Fe(e)&&ut(e)==mS}var Bl=dS;var bd=Object.prototype,hS=bd.hasOwnProperty,gS=bd.propertyIsEnumerable,xS=Bl(function(){return arguments}())?Bl:function(e){return Fe(e)&&hS.call(e,"callee")&&!gS.call(e,"callee")},Mr=xS;function yS(){return!1}var kd=yS;var Cd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ad=Cd&&typeof module=="object"&&module&&!module.nodeType&&module,ES=Ad&&Ad.exports===Cd,Td=ES?Pe.Buffer:void 0,bS=Td?Td.isBuffer:void 0,kS=bS||kd,Er=kS;var AS="[object Arguments]",TS="[object Array]",CS="[object Boolean]",wS="[object Date]",SS="[object Error]",vS="[object Function]",_S="[object Map]",IS="[object Number]",RS="[object Object]",DS="[object RegExp]",FS="[object Set]",OS="[object String]",NS="[object WeakMap]",LS="[object ArrayBuffer]",PS="[object DataView]",MS="[object Float32Array]",BS="[object Float64Array]",US="[object Int8Array]",zS="[object Int16Array]",jS="[object Int32Array]",$S="[object Uint8Array]",qS="[object Uint8ClampedArray]",VS="[object Uint16Array]",GS="[object Uint32Array]",ye={};ye[MS]=ye[BS]=ye[US]=ye[zS]=ye[jS]=ye[$S]=ye[qS]=ye[VS]=ye[GS]=!0;ye[AS]=ye[TS]=ye[LS]=ye[CS]=ye[PS]=ye[wS]=ye[SS]=ye[vS]=ye[_S]=ye[IS]=ye[RS]=ye[DS]=ye[FS]=ye[OS]=ye[NS]=!1;function HS(e){return Fe(e)&&ci(e.length)&&!!ye[ut(e)]}var wd=HS;function WS(e){return function(t){return e(t)}}var tr=WS;var Sd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,co=Sd&&typeof module=="object"&&module&&!module.nodeType&&module,KS=co&&co.exports===Sd,Ul=KS&&Ra.process,ZS=function(){try{var e=co&&co.require&&co.require("util").types;return e||Ul&&Ul.binding&&Ul.binding("util")}catch{}}(),Nt=ZS;var vd=Nt&&Nt.isTypedArray,YS=vd?tr(vd):wd,fi=YS;var XS=Object.prototype,JS=XS.hasOwnProperty;function QS(e,t){var r=P(e),n=!r&&Mr(e),i=!r&&!n&&Er(e),o=!r&&!n&&!i&&fi(e),a=r||n||i||o,s=a?Ed(e.length,String):[],u=s.length;for(var l in e)(t||JS.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Nr(l,u)))&&s.push(l);return s}var Pa=QS;function ev(e,t){return function(r){return e(t(r))}}var Ma=ev;var tv=Ma(Object.keys,Object),_d=tv;var rv=Object.prototype,nv=rv.hasOwnProperty;function iv(e){if(!er(e))return _d(e);var t=[];for(var r in Object(e))nv.call(e,r)&&r!="constructor"&&t.push(r);return t}var Ba=iv;function ov(e){return Me(e)?Pa(e):Ba(e)}var pe=ov;var av=Object.prototype,sv=av.hasOwnProperty,uv=yd(function(e,t){if(er(t)||Me(t)){Qt(t,pe(t),e);return}for(var r in t)sv.call(t,r)&&Lr(e,r,t[r])}),Ze=uv;function lv(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Id=lv;var cv=Object.prototype,fv=cv.hasOwnProperty;function pv(e){if(!Ce(e))return Id(e);var t=er(e),r=[];for(var n in e)n=="constructor"&&(t||!fv.call(e,n))||r.push(n);return r}var Rd=pv;function mv(e){return Me(e)?Pa(e,!0):Rd(e)}var Br=mv;var dv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hv=/^\w*$/;function gv(e,t){if(P(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Or(e)?!0:hv.test(e)||!dv.test(e)||t!=null&&e in Object(t)}var pi=gv;var xv=ht(Object,"create"),br=xv;function yv(){this.__data__=br?br(null):{},this.size=0}var Dd=yv;function Ev(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Fd=Ev;var bv="__lodash_hash_undefined__",kv=Object.prototype,Av=kv.hasOwnProperty;function Tv(e){var t=this.__data__;if(br){var r=t[e];return r===bv?void 0:r}return Av.call(t,e)?t[e]:void 0}var Od=Tv;var Cv=Object.prototype,wv=Cv.hasOwnProperty;function Sv(e){var t=this.__data__;return br?t[e]!==void 0:wv.call(t,e)}var Nd=Sv;var vv="__lodash_hash_undefined__";function _v(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=br&&t===void 0?vv:t,this}var Ld=_v;function mi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}mi.prototype.clear=Dd;mi.prototype.delete=Fd;mi.prototype.get=Od;mi.prototype.has=Nd;mi.prototype.set=Ld;var zl=mi;function Iv(){this.__data__=[],this.size=0}var Pd=Iv;function Rv(e,t){for(var r=e.length;r--;)if(Jt(e[r][0],t))return r;return-1}var Ur=Rv;var Dv=Array.prototype,Fv=Dv.splice;function Ov(e){var t=this.__data__,r=Ur(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Fv.call(t,r,1),--this.size,!0}var Md=Ov;function Nv(e){var t=this.__data__,r=Ur(t,e);return r<0?void 0:t[r][1]}var Bd=Nv;function Lv(e){return Ur(this.__data__,e)>-1}var Ud=Lv;function Pv(e,t){var r=this.__data__,n=Ur(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var zd=Pv;function di(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}di.prototype.clear=Pd;di.prototype.delete=Md;di.prototype.get=Bd;di.prototype.has=Ud;di.prototype.set=zd;var zr=di;var Mv=ht(Pe,"Map"),jr=Mv;function Bv(){this.size=0,this.__data__={hash:new zl,map:new(jr||zr),string:new zl}}var jd=Bv;function Uv(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var $d=Uv;function zv(e,t){var r=e.__data__;return $d(t)?r[typeof t=="string"?"string":"hash"]:r.map}var $r=zv;function jv(e){var t=$r(this,e).delete(e);return this.size-=t?1:0,t}var qd=jv;function $v(e){return $r(this,e).get(e)}var Vd=$v;function qv(e){return $r(this,e).has(e)}var Gd=qv;function Vv(e,t){var r=$r(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Hd=Vv;function hi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}hi.prototype.clear=jd;hi.prototype.delete=qd;hi.prototype.get=Vd;hi.prototype.has=Gd;hi.prototype.set=Hd;var wn=hi;var Gv="Expected a function";function jl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Gv);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(jl.Cache||wn),r}jl.Cache=wn;var Wd=jl;var Hv=500;function Wv(e){var t=Wd(e,function(n){return r.size===Hv&&r.clear(),n}),r=t.cache;return t}var Kd=Wv;var Kv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zv=/\\(\\)?/g,Yv=Kd(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Kv,function(r,n,i,o){t.push(i?o.replace(Zv,"$1"):n||r)}),t}),Zd=Yv;function Xv(e){return e==null?"":Zm(e)}var Yd=Xv;function Jv(e,t){return P(e)?e:pi(e,t)?[e]:Zd(Yd(e))}var qr=Jv;var Qv=1/0;function e_(e){if(typeof e=="string"||Or(e))return e;var t=e+"";return t=="0"&&1/e==-Qv?"-0":t}var rr=e_;function t_(e,t){t=qr(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[rr(t[r++])];return r&&r==n?e:void 0}var gi=t_;function r_(e,t,r){var n=e==null?void 0:gi(e,t);return n===void 0?r:n}var Xd=r_;function n_(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var xi=n_;var Jd=He?He.isConcatSpreadable:void 0;function i_(e){return P(e)||Mr(e)||!!(Jd&&e&&e[Jd])}var Qd=i_;function eh(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=Qd),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?eh(s,t-1,r,n,i):xi(i,s):n||(i[i.length]=s)}return i}var yi=eh;function o_(e){var t=e==null?0:e.length;return t?yi(e,1):[]}var qe=o_;var a_=Ma(Object.getPrototypeOf,Object),Ua=a_;function s_(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}var za=s_;function u_(e,t,r,n){var i=-1,o=e==null?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}var th=u_;function l_(){this.__data__=new zr,this.size=0}var rh=l_;function c_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var nh=c_;function f_(e){return this.__data__.get(e)}var ih=f_;function p_(e){return this.__data__.has(e)}var oh=p_;var m_=200;function d_(e,t){var r=this.__data__;if(r instanceof zr){var n=r.__data__;if(!jr||n.length<m_-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new wn(n)}return r.set(e,t),this.size=r.size,this}var ah=d_;function Ei(e){var t=this.__data__=new zr(e);this.size=t.size}Ei.prototype.clear=rh;Ei.prototype.delete=nh;Ei.prototype.get=ih;Ei.prototype.has=oh;Ei.prototype.set=ah;var Vr=Ei;function h_(e,t){return e&&Qt(t,pe(t),e)}var sh=h_;function g_(e,t){return e&&Qt(t,Br(t),e)}var uh=g_;var ph=typeof exports=="object"&&exports&&!exports.nodeType&&exports,lh=ph&&typeof module=="object"&&module&&!module.nodeType&&module,x_=lh&&lh.exports===ph,ch=x_?Pe.Buffer:void 0,fh=ch?ch.allocUnsafe:void 0;function y_(e,t){if(t)return e.slice();var r=e.length,n=fh?fh(r):new e.constructor(r);return e.copy(n),n}var mh=y_;function E_(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}var bi=E_;function b_(){return[]}var ja=b_;var k_=Object.prototype,A_=k_.propertyIsEnumerable,dh=Object.getOwnPropertySymbols,T_=dh?function(e){return e==null?[]:(e=Object(e),bi(dh(e),function(t){return A_.call(e,t)}))}:ja,ki=T_;function C_(e,t){return Qt(e,ki(e),t)}var hh=C_;var w_=Object.getOwnPropertySymbols,S_=w_?function(e){for(var t=[];e;)xi(t,ki(e)),e=Ua(e);return t}:ja,$a=S_;function v_(e,t){return Qt(e,$a(e),t)}var gh=v_;function __(e,t,r){var n=t(e);return P(e)?n:xi(n,r(e))}var qa=__;function I_(e){return qa(e,pe,ki)}var fo=I_;function R_(e){return qa(e,Br,$a)}var Va=R_;var D_=ht(Pe,"DataView"),Ga=D_;var F_=ht(Pe,"Promise"),Ha=F_;var O_=ht(Pe,"Set"),Gr=O_;var xh="[object Map]",N_="[object Object]",yh="[object Promise]",Eh="[object Set]",bh="[object WeakMap]",kh="[object DataView]",L_=yr(Ga),P_=yr(jr),M_=yr(Ha),B_=yr(Gr),U_=yr(Fa),Sn=ut;(Ga&&Sn(new Ga(new ArrayBuffer(1)))!=kh||jr&&Sn(new jr)!=xh||Ha&&Sn(Ha.resolve())!=yh||Gr&&Sn(new Gr)!=Eh||Fa&&Sn(new Fa)!=bh)&&(Sn=function(e){var t=ut(e),r=t==N_?e.constructor:void 0,n=r?yr(r):"";if(n)switch(n){case L_:return kh;case P_:return xh;case M_:return yh;case B_:return Eh;case U_:return bh}return t});var zt=Sn;var z_=Object.prototype,j_=z_.hasOwnProperty;function $_(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&j_.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Ah=$_;var q_=Pe.Uint8Array,Ai=q_;function V_(e){var t=new e.constructor(e.byteLength);return new Ai(t).set(new Ai(e)),t}var Ti=V_;function G_(e,t){var r=t?Ti(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Th=G_;var H_=/\w*$/;function W_(e){var t=new e.constructor(e.source,H_.exec(e));return t.lastIndex=e.lastIndex,t}var Ch=W_;var wh=He?He.prototype:void 0,Sh=wh?wh.valueOf:void 0;function K_(e){return Sh?Object(Sh.call(e)):{}}var vh=K_;function Z_(e,t){var r=t?Ti(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var _h=Z_;var Y_="[object Boolean]",X_="[object Date]",J_="[object Map]",Q_="[object Number]",eI="[object RegExp]",tI="[object Set]",rI="[object String]",nI="[object Symbol]",iI="[object ArrayBuffer]",oI="[object DataView]",aI="[object Float32Array]",sI="[object Float64Array]",uI="[object Int8Array]",lI="[object Int16Array]",cI="[object Int32Array]",fI="[object Uint8Array]",pI="[object Uint8ClampedArray]",mI="[object Uint16Array]",dI="[object Uint32Array]";function hI(e,t,r){var n=e.constructor;switch(t){case iI:return Ti(e);case Y_:case X_:return new n(+e);case oI:return Th(e,r);case aI:case sI:case uI:case lI:case cI:case fI:case pI:case mI:case dI:return _h(e,r);case J_:return new n;case Q_:case rI:return new n(e);case eI:return Ch(e);case tI:return new n;case nI:return vh(e)}}var Ih=hI;function gI(e){return typeof e.constructor=="function"&&!er(e)?sd(Ua(e)):{}}var Rh=gI;var xI="[object Map]";function yI(e){return Fe(e)&&zt(e)==xI}var Dh=yI;var Fh=Nt&&Nt.isMap,EI=Fh?tr(Fh):Dh,Oh=EI;var bI="[object Set]";function kI(e){return Fe(e)&&zt(e)==bI}var Nh=kI;var Lh=Nt&&Nt.isSet,AI=Lh?tr(Lh):Nh,Ph=AI;var TI=1,CI=2,wI=4,Mh="[object Arguments]",SI="[object Array]",vI="[object Boolean]",_I="[object Date]",II="[object Error]",Bh="[object Function]",RI="[object GeneratorFunction]",DI="[object Map]",FI="[object Number]",Uh="[object Object]",OI="[object RegExp]",NI="[object Set]",LI="[object String]",PI="[object Symbol]",MI="[object WeakMap]",BI="[object ArrayBuffer]",UI="[object DataView]",zI="[object Float32Array]",jI="[object Float64Array]",$I="[object Int8Array]",qI="[object Int16Array]",VI="[object Int32Array]",GI="[object Uint8Array]",HI="[object Uint8ClampedArray]",WI="[object Uint16Array]",KI="[object Uint32Array]",me={};me[Mh]=me[SI]=me[BI]=me[UI]=me[vI]=me[_I]=me[zI]=me[jI]=me[$I]=me[qI]=me[VI]=me[DI]=me[FI]=me[Uh]=me[OI]=me[NI]=me[LI]=me[PI]=me[GI]=me[HI]=me[WI]=me[KI]=!0;me[II]=me[Bh]=me[MI]=!1;function Wa(e,t,r,n,i,o){var a,s=t&TI,u=t&CI,l=t&wI;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!Ce(e))return e;var c=P(e);if(c){if(a=Ah(e),!s)return ld(e,a)}else{var f=zt(e),p=f==Bh||f==RI;if(Er(e))return mh(e,s);if(f==Uh||f==Mh||p&&!i){if(a=u||p?{}:Rh(e),!s)return u?gh(e,uh(a,e)):hh(e,sh(a,e))}else{if(!me[f])return i?e:{};a=Ih(e,f,s)}}o||(o=new Vr);var m=o.get(e);if(m)return m;o.set(e,a),Ph(e)?e.forEach(function(C){a.add(Wa(C,t,r,C,e,o))}):Oh(e)&&e.forEach(function(C,x){a.set(x,Wa(C,t,r,x,e,o))});var h=l?u?Va:fo:u?Br:pe,E=c?void 0:h(e);return Oa(E||e,function(C,x){E&&(x=C,C=e[x]),Lr(a,x,Wa(C,t,r,x,e,o))}),a}var zh=Wa;var ZI=4;function YI(e){return zh(e,ZI)}var de=YI;function XI(e){for(var t=-1,r=e==null?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i}var nr=XI;var JI="__lodash_hash_undefined__";function QI(e){return this.__data__.set(e,JI),this}var jh=QI;function eR(e){return this.__data__.has(e)}var $h=eR;function Ka(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new wn;++t<r;)this.add(e[t])}Ka.prototype.add=Ka.prototype.push=jh;Ka.prototype.has=$h;var Ci=Ka;function tR(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Za=tR;function rR(e,t){return e.has(t)}var wi=rR;var nR=1,iR=2;function oR(e,t,r,n,i,o){var a=r&nR,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,p=!0,m=r&iR?new Ci:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var h=e[f],E=t[f];if(n)var C=a?n(E,h,f,t,e,o):n(h,E,f,e,t,o);if(C!==void 0){if(C)continue;p=!1;break}if(m){if(!Za(t,function(x,k){if(!wi(m,k)&&(h===x||i(h,x,r,n,o)))return m.push(k)})){p=!1;break}}else if(!(h===E||i(h,E,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}var Ya=oR;function aR(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var qh=aR;function sR(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Si=sR;var uR=1,lR=2,cR="[object Boolean]",fR="[object Date]",pR="[object Error]",mR="[object Map]",dR="[object Number]",hR="[object RegExp]",gR="[object Set]",xR="[object String]",yR="[object Symbol]",ER="[object ArrayBuffer]",bR="[object DataView]",Vh=He?He.prototype:void 0,$l=Vh?Vh.valueOf:void 0;function kR(e,t,r,n,i,o,a){switch(r){case bR:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ER:return!(e.byteLength!=t.byteLength||!o(new Ai(e),new Ai(t)));case cR:case fR:case dR:return Jt(+e,+t);case pR:return e.name==t.name&&e.message==t.message;case hR:case xR:return e==t+"";case mR:var s=qh;case gR:var u=n&uR;if(s||(s=Si),e.size!=t.size&&!u)return!1;var l=a.get(e);if(l)return l==t;n|=lR,a.set(e,t);var c=Ya(s(e),s(t),n,i,o,a);return a.delete(e),c;case yR:if($l)return $l.call(e)==$l.call(t)}return!1}var Gh=kR;var AR=1,TR=Object.prototype,CR=TR.hasOwnProperty;function wR(e,t,r,n,i,o){var a=r&AR,s=fo(e),u=s.length,l=fo(t),c=l.length;if(u!=c&&!a)return!1;for(var f=u;f--;){var p=s[f];if(!(a?p in t:CR.call(t,p)))return!1}var m=o.get(e),h=o.get(t);if(m&&h)return m==t&&h==e;var E=!0;o.set(e,t),o.set(t,e);for(var C=a;++f<u;){p=s[f];var x=e[p],k=t[p];if(n)var y=a?n(k,x,p,t,e,o):n(x,k,p,e,t,o);if(!(y===void 0?x===k||i(x,k,r,n,o):y)){E=!1;break}C||(C=p=="constructor")}if(E&&!C){var S=e.constructor,v=t.constructor;S!=v&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof v=="function"&&v instanceof v)&&(E=!1)}return o.delete(e),o.delete(t),E}var Hh=wR;var SR=1,Wh="[object Arguments]",Kh="[object Array]",Xa="[object Object]",vR=Object.prototype,Zh=vR.hasOwnProperty;function _R(e,t,r,n,i,o){var a=P(e),s=P(t),u=a?Kh:zt(e),l=s?Kh:zt(t);u=u==Wh?Xa:u,l=l==Wh?Xa:l;var c=u==Xa,f=l==Xa,p=u==l;if(p&&Er(e)){if(!Er(t))return!1;a=!0,c=!1}if(p&&!c)return o||(o=new Vr),a||fi(e)?Ya(e,t,r,n,i,o):Gh(e,t,u,r,n,i,o);if(!(r&SR)){var m=c&&Zh.call(e,"__wrapped__"),h=f&&Zh.call(t,"__wrapped__");if(m||h){var E=m?e.value():e,C=h?t.value():t;return o||(o=new Vr),i(E,C,r,n,o)}}return p?(o||(o=new Vr),Hh(e,t,r,n,i,o)):!1}var Yh=_R;function Xh(e,t,r,n,i){return e===t?!0:e==null||t==null||!Fe(e)&&!Fe(t)?e!==e&&t!==t:Yh(e,t,r,n,Xh,i)}var Ja=Xh;var IR=1,RR=2;function DR(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=r[i];var u=s[0],l=e[u],c=s[1];if(a&&s[2]){if(l===void 0&&!(u in e))return!1}else{var f=new Vr;if(n)var p=n(l,c,u,e,t,f);if(!(p===void 0?Ja(c,l,IR|RR,n,f):p))return!1}}return!0}var Jh=DR;function FR(e){return e===e&&!Ce(e)}var Qa=FR;function OR(e){for(var t=pe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Qa(i)]}return t}var Qh=OR;function NR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var es=NR;function LR(e){var t=Qh(e);return t.length==1&&t[0][2]?es(t[0][0],t[0][1]):function(r){return r===e||Jh(r,e,t)}}var eg=LR;function PR(e,t){return e!=null&&t in Object(e)}var tg=PR;function MR(e,t,r){t=qr(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=rr(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&ci(i)&&Nr(a,i)&&(P(e)||Mr(e)))}var ts=MR;function BR(e,t){return e!=null&&ts(e,t,tg)}var rg=BR;var UR=1,zR=2;function jR(e,t){return pi(e)&&Qa(t)?es(rr(e),t):function(r){var n=Xd(r,e);return n===void 0&&n===t?rg(r,e):Ja(t,n,UR|zR)}}var ng=jR;function $R(e){return function(t){return t?.[e]}}var ig=$R;function qR(e){return function(t){return gi(t,e)}}var og=qR;function VR(e){return pi(e)?ig(rr(e)):og(e)}var ag=VR;function GR(e){return typeof e=="function"?e:e==null?Ot:typeof e=="object"?P(e)?ng(e[0],e[1]):eg(e):ag(e)}var Be=GR;function HR(e,t,r,n){for(var i=-1,o=e==null?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}var sg=HR;function WR(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++i];if(r(o[u],u,o)===!1)break}return t}}var ug=WR;var KR=ug(),lg=KR;function ZR(e,t){return e&&lg(e,t,pe)}var cg=ZR;function YR(e,t){return function(r,n){if(r==null)return r;if(!Me(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}var fg=YR;var XR=fg(cg),gt=XR;function JR(e,t,r,n){return gt(e,function(i,o,a){t(n,i,r(i),a)}),n}var pg=JR;function QR(e,t){return function(r,n){var i=P(r)?sg:pg,o=t?t():{};return i(r,e,Be(n,2),o)}}var mg=QR;var dg=Object.prototype,eD=dg.hasOwnProperty,tD=li(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Pr(t[0],t[1],i)&&(n=1);++r<n;)for(var o=t[r],a=Br(o),s=-1,u=a.length;++s<u;){var l=a[s],c=e[l];(c===void 0||Jt(c,dg[l])&&!eD.call(e,l))&&(e[l]=o[l])}return e}),vi=tD;function rD(e){return Fe(e)&&Me(e)}var ql=rD;function nD(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var rs=nD;var iD=200;function oD(e,t,r,n){var i=-1,o=La,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;r&&(t=Yt(t,tr(r))),n?(o=rs,a=!1):t.length>=iD&&(o=wi,a=!1,t=new Ci(t));e:for(;++i<s;){var c=e[i],f=r==null?c:r(c);if(c=n||c!==0?c:0,a&&f===f){for(var p=l;p--;)if(t[p]===f)continue e;u.push(c)}else o(t,f,n)||u.push(c)}return u}var hg=oD;var aD=li(function(e,t){return ql(e)?hg(e,yi(t,1,ql,!0)):[]}),Hr=aD;function sD(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var ir=sD;function uD(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Xt(t),za(e,t<0?0:t,n)):[]}var Oe=uD;function lD(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Xt(t),t=n-t,za(e,0,t<0?0:t)):[]}var kr=lD;function cD(e){return typeof e=="function"?e:Ot}var gg=cD;function fD(e,t){var r=P(e)?Oa:gt;return r(e,gg(t))}var O=fD;function pD(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var xg=pD;function mD(e,t){var r=!0;return gt(e,function(n,i,o){return r=!!t(n,i,o),r}),r}var yg=mD;function dD(e,t,r){var n=P(e)?xg:yg;return r&&Pr(e,t,r)&&(t=void 0),n(e,Be(t,3))}var tt=dD;function hD(e,t){var r=[];return gt(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}var ns=hD;function gD(e,t){var r=P(e)?bi:ns;return r(e,Be(t,3))}var rt=gD;function xD(e){return function(t,r,n){var i=Object(t);if(!Me(t)){var o=Be(r,3);t=pe(t),r=function(s){return o(i[s],s,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:void 0}}var Eg=xD;var yD=Math.max;function ED(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Xt(r);return i<0&&(i=yD(n+i,0)),Na(e,Be(t,3),i)}var bg=ED;var bD=Eg(bg),or=bD;function kD(e){return e&&e.length?e[0]:void 0}var We=kD;function AD(e,t){var r=-1,n=Me(e)?Array(e.length):[];return gt(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var kg=AD;function TD(e,t){var r=P(e)?Yt:kg;return r(e,Be(t,3))}var D=TD;function CD(e,t){return yi(D(e,t),1)}var ct=CD;var wD=Object.prototype,SD=wD.hasOwnProperty,vD=mg(function(e,t,r){SD.call(e,r)?e[r].push(t):ui(e,r,[t])}),Vl=vD;var _D=Object.prototype,ID=_D.hasOwnProperty;function RD(e,t){return e!=null&&ID.call(e,t)}var Ag=RD;function DD(e,t){return e!=null&&ts(e,t,Ag)}var N=DD;var FD="[object String]";function OD(e){return typeof e=="string"||!P(e)&&Fe(e)&&ut(e)==FD}var Ve=OD;function ND(e,t){return Yt(t,function(r){return e[r]})}var Tg=ND;function LD(e){return e==null?[]:Tg(e,pe(e))}var le=LD;var PD=Math.max;function MD(e,t,r,n){e=Me(e)?e:le(e),r=r&&!n?Xt(r):0;var i=e.length;return r<0&&(r=PD(i+r,0)),Ve(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&si(e,t,r)>-1}var ke=MD;var BD=Math.max;function UD(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Xt(r);return i<0&&(i=BD(n+i,0)),si(e,t,i)}var is=UD;var zD="[object Map]",jD="[object Set]",$D=Object.prototype,qD=$D.hasOwnProperty;function VD(e){if(e==null)return!0;if(Me(e)&&(P(e)||typeof e=="string"||typeof e.splice=="function"||Er(e)||fi(e)||Mr(e)))return!e.length;var t=zt(e);if(t==zD||t==jD)return!e.size;if(er(e))return!Ba(e).length;for(var r in e)if(qD.call(e,r))return!1;return!0}var X=VD;var GD="[object RegExp]";function HD(e){return Fe(e)&&ut(e)==GD}var Cg=HD;var wg=Nt&&Nt.isRegExp,WD=wg?tr(wg):Cg,Lt=WD;function KD(e){return e===void 0}var nt=KD;var ZD="Expected a function";function YD(e){if(typeof e!="function")throw new TypeError(ZD);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var Sg=YD;function XD(e,t,r,n){if(!Ce(e))return e;t=qr(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var u=rr(t[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=a){var c=s[u];l=n?n(c,u,s):void 0,l===void 0&&(l=Ce(c)?c:Nr(t[i+1])?[]:{})}Lr(s,u,l),s=s[u]}return e}var vg=XD;function JD(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=gi(e,a);r(s,a)&&vg(o,qr(a,e),s)}return o}var _g=JD;function QD(e,t){if(e==null)return{};var r=Yt(Va(e),function(n){return[n]});return t=Be(t),_g(e,r,function(n,i){return t(n,i[0])})}var xt=QD;function e0(e,t,r,n,i){return i(e,function(o,a,s){r=n?(n=!1,o):t(r,o,a,s)}),r}var Ig=e0;function t0(e,t,r){var n=P(e)?th:Ig,i=arguments.length<3;return n(e,Be(t,4),r,i,gt)}var Ue=t0;function r0(e,t){var r=P(e)?bi:ns;return r(e,Sg(Be(t,3)))}var Wr=r0;function n0(e,t){var r;return gt(e,function(n,i,o){return r=t(n,i,o),!r}),!!r}var Rg=n0;function i0(e,t,r){var n=P(e)?Za:Rg;return r&&Pr(e,t,r)&&(t=void 0),n(e,Be(t,3))}var po=i0;var o0=1/0,a0=Gr&&1/Si(new Gr([,-0]))[1]==o0?function(e){return new Gr(e)}:we,Dg=a0;var s0=200;function u0(e,t,r){var n=-1,i=La,o=e.length,a=!0,s=[],u=s;if(r)a=!1,i=rs;else if(o>=s0){var l=t?null:Dg(e);if(l)return Si(l);a=!1,i=wi,u=new Ci}else u=t?[]:s;e:for(;++n<o;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,a&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(c)}else i(u,f,r)||(u!==s&&u.push(f),s.push(c))}return s}var Fg=u0;function l0(e){return e&&e.length?Fg(e):[]}var _i=l0;function Ii(e){console&&console.error&&console.error(`Error: ${e}`)}function mo(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function ho(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}function go(e){function t(){}t.prototype=e;let r=new t;function n(){return typeof r.bar}return n(),n(),e;(0,eval)(e)}function c0(e){return f0(e)?e.LABEL:e.name}function f0(e){return Ve(e.LABEL)&&e.LABEL!==""}var St=class{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),O(this.definition,r=>{r.accept(t)})}},he=class extends St{constructor(t){super([]),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}set definition(t){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(t){t.visit(this)}},ft=class extends St{constructor(t){super(t.definition),this.orgText="",Ze(this,xt(t,r=>r!==void 0))}},ge=class extends St{constructor(t){super(t.definition),this.ignoreAmbiguities=!1,Ze(this,xt(t,r=>r!==void 0))}},Ee=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},Ne=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},Le=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},ue=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},_e=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},Ie=class extends St{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ze(this,xt(t,r=>r!==void 0))}},ie=class{constructor(t){this.idx=1,Ze(this,xt(t,r=>r!==void 0))}accept(t){t.visit(this)}};function os(e){return D(e,Ri)}function Ri(e){function t(r){return D(r,Ri)}if(e instanceof he){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return Ve(e.label)&&(r.label=e.label),r}else{if(e instanceof ge)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Ee)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Ne)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Le)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Ri(new ie({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof _e)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Ri(new ie({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof ue)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Ie)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof ie){let r={type:"Terminal",name:e.terminalType.name,label:c0(e.terminalType),idx:e.idx};Ve(e.label)&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=Lt(n)?n.source:n),r}else{if(e instanceof ft)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}var pt=class{visit(t){let r=t;switch(r.constructor){case he:return this.visitNonTerminal(r);case ge:return this.visitAlternative(r);case Ee:return this.visitOption(r);case Ne:return this.visitRepetitionMandatory(r);case Le:return this.visitRepetitionMandatoryWithSeparator(r);case _e:return this.visitRepetitionWithSeparator(r);case ue:return this.visitRepetition(r);case Ie:return this.visitAlternation(r);case ie:return this.visitTerminal(r);case ft:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}};function Gl(e){return e instanceof ge||e instanceof Ee||e instanceof ue||e instanceof Ne||e instanceof Le||e instanceof _e||e instanceof ie||e instanceof ft}function vn(e,t=[]){return e instanceof Ee||e instanceof ue||e instanceof _e?!0:e instanceof Ie?po(e.definition,n=>vn(n,t)):e instanceof he&&ke(t,e)?!1:e instanceof St?(e instanceof he&&t.push(e),tt(e.definition,n=>vn(n,t))):!1}function Hl(e){return e instanceof Ie}function yt(e){if(e instanceof he)return"SUBRULE";if(e instanceof Ee)return"OPTION";if(e instanceof Ie)return"OR";if(e instanceof Ne)return"AT_LEAST_ONE";if(e instanceof Le)return"AT_LEAST_ONE_SEP";if(e instanceof _e)return"MANY_SEP";if(e instanceof ue)return"MANY";if(e instanceof ie)return"CONSUME";throw Error("non exhaustive match")}var Ar=class{walk(t,r=[]){O(t.definition,(n,i)=>{let o=Oe(t.definition,i+1);if(n instanceof he)this.walkProdRef(n,o,r);else if(n instanceof ie)this.walkTerminal(n,o,r);else if(n instanceof ge)this.walkFlat(n,o,r);else if(n instanceof Ee)this.walkOption(n,o,r);else if(n instanceof Ne)this.walkAtLeastOne(n,o,r);else if(n instanceof Le)this.walkAtLeastOneSep(n,o,r);else if(n instanceof _e)this.walkManySep(n,o,r);else if(n instanceof ue)this.walkMany(n,o,r);else if(n instanceof Ie)this.walkOr(n,o,r);else throw Error("non exhaustive match")})}walkTerminal(t,r,n){}walkProdRef(t,r,n){}walkFlat(t,r,n){let i=r.concat(n);this.walk(t,i)}walkOption(t,r,n){let i=r.concat(n);this.walk(t,i)}walkAtLeastOne(t,r,n){let i=[new Ee({definition:t.definition})].concat(r,n);this.walk(t,i)}walkAtLeastOneSep(t,r,n){let i=Og(t,r,n);this.walk(t,i)}walkMany(t,r,n){let i=[new Ee({definition:t.definition})].concat(r,n);this.walk(t,i)}walkManySep(t,r,n){let i=Og(t,r,n);this.walk(t,i)}walkOr(t,r,n){let i=r.concat(n);O(t.definition,o=>{let a=new ge({definition:[o]});this.walk(a,i)})}};function Og(e,t,r){return[new Ee({definition:[new ie({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function _n(e){if(e instanceof he)return _n(e.referencedRule);if(e instanceof ie)return d0(e);if(Gl(e))return p0(e);if(Hl(e))return m0(e);throw Error("non exhaustive match")}function p0(e){let t=[],r=e.definition,n=0,i=r.length>n,o,a=!0;for(;i&&a;)o=r[n],a=vn(o),t=t.concat(_n(o)),n=n+1,i=r.length>n;return _i(t)}function m0(e){let t=D(e.definition,r=>_n(r));return _i(qe(t))}function d0(e){return[e.terminalType]}var as="_~IN~_";var Wl=class extends Ar{constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,r,n){}walkProdRef(t,r,n){let i=h0(t.referencedRule,t.idx)+this.topProd.name,o=r.concat(n),a=new ge({definition:o}),s=_n(a);this.follows[i]=s}};function Ng(e){let t={};return O(e,r=>{let n=new Wl(r).startWalking();Ze(t,n)}),t}function h0(e,t){return e.name+t+as}function j(e){return e.charCodeAt(0)}function ss(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}function Di(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}function In(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function xo(){throw Error("Internal Error - Should never get here!")}function Kl(e){return e.type==="Character"}var yo=[];for(let e=j("0");e<=j("9");e++)yo.push(e);var Eo=[j("_")].concat(yo);for(let e=j("a");e<=j("z");e++)Eo.push(e);for(let e=j("A");e<=j("Z");e++)Eo.push(e);var Zl=[j(" "),j("\f"),j(`
54
- `),j("\r"),j(" "),j("\v"),j(" "),j("\xA0"),j("\u1680"),j("\u2000"),j("\u2001"),j("\u2002"),j("\u2003"),j("\u2004"),j("\u2005"),j("\u2006"),j("\u2007"),j("\u2008"),j("\u2009"),j("\u200A"),j("\u2028"),j("\u2029"),j("\u202F"),j("\u205F"),j("\u3000"),j("\uFEFF")];var g0=/[0-9a-fA-F]/,us=/[0-9]/,x0=/[1-9]/,bo=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Di(n,"global");break;case"i":Di(n,"ignoreCase");break;case"m":Di(n,"multiLine");break;case"u":Di(n,"unicode");break;case"y":Di(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 t=[],r=this.idx;for(t.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(r)}}alternative(){let t=[],r=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}In(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(t)}}return xo()}quantifier(t=!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(t===!0&&r===void 0)return;In(r);break}if(!(t===!0&&r===void 0)&&In(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let t,r=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group();break}return t===void 0&&this.isPatternCharacter()&&(t=this.patternCharacter()),In(t)?(t.loc=this.loc(r),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):xo()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[j(`
54
+ `;return n}function OC(e){let t=[],r=e[0]?.length||0;for(let n=0;n<r;n++){let i=!0;for(let o of e)if(o[n]!==""){i=!1;break}i&&t.push(n)}return t}import{log as Kc}from"remark-mdat";var NC=typeof global=="object"&&global&&global.Object===Object&&global,Ra=NC;var LC=typeof self=="object"&&self&&self.Object===Object&&self,PC=Ra||LC||Function("return this")(),Pe=PC;var MC=Pe.Symbol,He=MC;var Vm=Object.prototype,BC=Vm.hasOwnProperty,UC=Vm.toString,lo=He?He.toStringTag:void 0;function zC(e){var t=BC.call(e,lo),r=e[lo];try{e[lo]=void 0;var n=!0}catch{}var i=UC.call(e);return n&&(t?e[lo]=r:delete e[lo]),i}var Gm=zC;var jC=Object.prototype,$C=jC.toString;function qC(e){return $C.call(e)}var Hm=qC;var VC="[object Null]",GC="[object Undefined]",Wm=He?He.toStringTag:void 0;function HC(e){return e==null?e===void 0?GC:VC:Wm&&Wm in Object(e)?Gm(e):Hm(e)}var ut=HC;function WC(e){return e!=null&&typeof e=="object"}var Fe=WC;var KC="[object Symbol]";function ZC(e){return typeof e=="symbol"||Fe(e)&&ut(e)==KC}var Or=ZC;function YC(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Yt=YC;var XC=Array.isArray,P=XC;var JC=1/0,Km=He?He.prototype:void 0,Zm=Km?Km.toString:void 0;function Ym(e){if(typeof e=="string")return e;if(P(e))return Yt(e,Ym)+"";if(Or(e))return Zm?Zm.call(e):"";var t=e+"";return t=="0"&&1/e==-JC?"-0":t}var Xm=Ym;var QC=/\s/;function ew(e){for(var t=e.length;t--&&QC.test(e.charAt(t)););return t}var Jm=ew;var tw=/^\s+/;function rw(e){return e&&e.slice(0,Jm(e)+1).replace(tw,"")}var Qm=rw;function nw(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ce=nw;var ed=NaN,iw=/^[-+]0x[0-9a-f]+$/i,ow=/^0b[01]+$/i,aw=/^0o[0-7]+$/i,sw=parseInt;function uw(e){if(typeof e=="number")return e;if(Or(e))return ed;if(Ce(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ce(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Qm(e);var r=ow.test(e);return r||aw.test(e)?sw(e.slice(2),r?2:8):iw.test(e)?ed:+e}var td=uw;var rd=1/0,lw=17976931348623157e292;function cw(e){if(!e)return e===0?e:0;if(e=td(e),e===rd||e===-rd){var t=e<0?-1:1;return t*lw}return e===e?e:0}var nd=cw;function fw(e){var t=nd(e),r=t%1;return t===t?r?t-r:t:0}var Xt=fw;function pw(e){return e}var Ot=pw;var mw="[object AsyncFunction]",dw="[object Function]",hw="[object GeneratorFunction]",gw="[object Proxy]";function xw(e){if(!Ce(e))return!1;var t=ut(e);return t==dw||t==hw||t==mw||t==gw}var lt=xw;var yw=Pe["__core-js_shared__"],Da=yw;var id=function(){var e=/[^.]+$/.exec(Da&&Da.keys&&Da.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ew(e){return!!id&&id in e}var od=Ew;var bw=Function.prototype,kw=bw.toString;function Aw(e){if(e!=null){try{return kw.call(e)}catch{}try{return e+""}catch{}}return""}var yr=Aw;var Tw=/[\\^$.*+?()[\]{}|]/g,Cw=/^\[object .+?Constructor\]$/,ww=Function.prototype,Sw=Object.prototype,vw=ww.toString,_w=Sw.hasOwnProperty,Iw=RegExp("^"+vw.call(_w).replace(Tw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Rw(e){if(!Ce(e)||od(e))return!1;var t=lt(e)?Iw:Cw;return t.test(yr(e))}var ad=Rw;function Dw(e,t){return e?.[t]}var sd=Dw;function Fw(e,t){var r=sd(e,t);return ad(r)?r:void 0}var ht=Fw;var Ow=ht(Pe,"WeakMap"),Fa=Ow;var ud=Object.create,Nw=function(){function e(){}return function(t){if(!Ce(t))return{};if(ud)return ud(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),ld=Nw;function Lw(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var cd=Lw;function Pw(){}var we=Pw;function Mw(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var fd=Mw;var Bw=800,Uw=16,zw=Date.now;function jw(e){var t=0,r=0;return function(){var n=zw(),i=Uw-(n-r);if(r=n,i>0){if(++t>=Bw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var pd=jw;function $w(e){return function(){return e}}var md=$w;var qw=function(){try{var e=ht(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ai=qw;var Vw=ai?function(e,t){return ai(e,"toString",{configurable:!0,enumerable:!1,value:md(t),writable:!0})}:Ot,dd=Vw;var Gw=pd(dd),hd=Gw;function Hw(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Oa=Hw;function Ww(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var Na=Ww;function Kw(e){return e!==e}var gd=Kw;function Zw(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var xd=Zw;function Yw(e,t,r){return t===t?xd(e,t,r):Na(e,gd,r)}var si=Yw;function Xw(e,t){var r=e==null?0:e.length;return!!r&&si(e,t,0)>-1}var La=Xw;var Jw=9007199254740991,Qw=/^(?:0|[1-9]\d*)$/;function eS(e,t){var r=typeof e;return t=t??Jw,!!t&&(r=="number"||r!="symbol"&&Qw.test(e))&&e>-1&&e%1==0&&e<t}var Nr=eS;function tS(e,t,r){t=="__proto__"&&ai?ai(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var ui=tS;function rS(e,t){return e===t||e!==e&&t!==t}var Jt=rS;var nS=Object.prototype,iS=nS.hasOwnProperty;function oS(e,t,r){var n=e[t];(!(iS.call(e,t)&&Jt(n,r))||r===void 0&&!(t in e))&&ui(e,t,r)}var Lr=oS;function aS(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),i?ui(r,s,u):Lr(r,s,u)}return r}var Qt=aS;var yd=Math.max;function sS(e,t,r){return t=yd(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=yd(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),cd(e,this,s)}}var Ed=sS;function uS(e,t){return hd(Ed(e,t,Ot),e+"")}var li=uS;var lS=9007199254740991;function cS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=lS}var ci=cS;function fS(e){return e!=null&&ci(e.length)&&!lt(e)}var Me=fS;function pS(e,t,r){if(!Ce(r))return!1;var n=typeof t;return(n=="number"?Me(r)&&Nr(t,r.length):n=="string"&&t in r)?Jt(r[t],e):!1}var Pr=pS;function mS(e){return li(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Pr(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t})}var bd=mS;var dS=Object.prototype;function hS(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||dS;return e===r}var er=hS;function gS(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kd=gS;var xS="[object Arguments]";function yS(e){return Fe(e)&&ut(e)==xS}var Bl=yS;var Ad=Object.prototype,ES=Ad.hasOwnProperty,bS=Ad.propertyIsEnumerable,kS=Bl(function(){return arguments}())?Bl:function(e){return Fe(e)&&ES.call(e,"callee")&&!bS.call(e,"callee")},Mr=kS;function AS(){return!1}var Td=AS;var Sd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cd=Sd&&typeof module=="object"&&module&&!module.nodeType&&module,TS=Cd&&Cd.exports===Sd,wd=TS?Pe.Buffer:void 0,CS=wd?wd.isBuffer:void 0,wS=CS||Td,Er=wS;var SS="[object Arguments]",vS="[object Array]",_S="[object Boolean]",IS="[object Date]",RS="[object Error]",DS="[object Function]",FS="[object Map]",OS="[object Number]",NS="[object Object]",LS="[object RegExp]",PS="[object Set]",MS="[object String]",BS="[object WeakMap]",US="[object ArrayBuffer]",zS="[object DataView]",jS="[object Float32Array]",$S="[object Float64Array]",qS="[object Int8Array]",VS="[object Int16Array]",GS="[object Int32Array]",HS="[object Uint8Array]",WS="[object Uint8ClampedArray]",KS="[object Uint16Array]",ZS="[object Uint32Array]",ye={};ye[jS]=ye[$S]=ye[qS]=ye[VS]=ye[GS]=ye[HS]=ye[WS]=ye[KS]=ye[ZS]=!0;ye[SS]=ye[vS]=ye[US]=ye[_S]=ye[zS]=ye[IS]=ye[RS]=ye[DS]=ye[FS]=ye[OS]=ye[NS]=ye[LS]=ye[PS]=ye[MS]=ye[BS]=!1;function YS(e){return Fe(e)&&ci(e.length)&&!!ye[ut(e)]}var vd=YS;function XS(e){return function(t){return e(t)}}var tr=XS;var _d=typeof exports=="object"&&exports&&!exports.nodeType&&exports,co=_d&&typeof module=="object"&&module&&!module.nodeType&&module,JS=co&&co.exports===_d,Ul=JS&&Ra.process,QS=function(){try{var e=co&&co.require&&co.require("util").types;return e||Ul&&Ul.binding&&Ul.binding("util")}catch{}}(),Nt=QS;var Id=Nt&&Nt.isTypedArray,ev=Id?tr(Id):vd,fi=ev;var tv=Object.prototype,rv=tv.hasOwnProperty;function nv(e,t){var r=P(e),n=!r&&Mr(e),i=!r&&!n&&Er(e),o=!r&&!n&&!i&&fi(e),a=r||n||i||o,s=a?kd(e.length,String):[],u=s.length;for(var l in e)(t||rv.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Nr(l,u)))&&s.push(l);return s}var Pa=nv;function iv(e,t){return function(r){return e(t(r))}}var Ma=iv;var ov=Ma(Object.keys,Object),Rd=ov;var av=Object.prototype,sv=av.hasOwnProperty;function uv(e){if(!er(e))return Rd(e);var t=[];for(var r in Object(e))sv.call(e,r)&&r!="constructor"&&t.push(r);return t}var Ba=uv;function lv(e){return Me(e)?Pa(e):Ba(e)}var pe=lv;var cv=Object.prototype,fv=cv.hasOwnProperty,pv=bd(function(e,t){if(er(t)||Me(t)){Qt(t,pe(t),e);return}for(var r in t)fv.call(t,r)&&Lr(e,r,t[r])}),Ze=pv;function mv(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Dd=mv;var dv=Object.prototype,hv=dv.hasOwnProperty;function gv(e){if(!Ce(e))return Dd(e);var t=er(e),r=[];for(var n in e)n=="constructor"&&(t||!hv.call(e,n))||r.push(n);return r}var Fd=gv;function xv(e){return Me(e)?Pa(e,!0):Fd(e)}var Br=xv;var yv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ev=/^\w*$/;function bv(e,t){if(P(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Or(e)?!0:Ev.test(e)||!yv.test(e)||t!=null&&e in Object(t)}var pi=bv;var kv=ht(Object,"create"),br=kv;function Av(){this.__data__=br?br(null):{},this.size=0}var Od=Av;function Tv(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Nd=Tv;var Cv="__lodash_hash_undefined__",wv=Object.prototype,Sv=wv.hasOwnProperty;function vv(e){var t=this.__data__;if(br){var r=t[e];return r===Cv?void 0:r}return Sv.call(t,e)?t[e]:void 0}var Ld=vv;var _v=Object.prototype,Iv=_v.hasOwnProperty;function Rv(e){var t=this.__data__;return br?t[e]!==void 0:Iv.call(t,e)}var Pd=Rv;var Dv="__lodash_hash_undefined__";function Fv(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=br&&t===void 0?Dv:t,this}var Md=Fv;function mi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}mi.prototype.clear=Od;mi.prototype.delete=Nd;mi.prototype.get=Ld;mi.prototype.has=Pd;mi.prototype.set=Md;var zl=mi;function Ov(){this.__data__=[],this.size=0}var Bd=Ov;function Nv(e,t){for(var r=e.length;r--;)if(Jt(e[r][0],t))return r;return-1}var Ur=Nv;var Lv=Array.prototype,Pv=Lv.splice;function Mv(e){var t=this.__data__,r=Ur(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Pv.call(t,r,1),--this.size,!0}var Ud=Mv;function Bv(e){var t=this.__data__,r=Ur(t,e);return r<0?void 0:t[r][1]}var zd=Bv;function Uv(e){return Ur(this.__data__,e)>-1}var jd=Uv;function zv(e,t){var r=this.__data__,n=Ur(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var $d=zv;function di(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}di.prototype.clear=Bd;di.prototype.delete=Ud;di.prototype.get=zd;di.prototype.has=jd;di.prototype.set=$d;var zr=di;var jv=ht(Pe,"Map"),jr=jv;function $v(){this.size=0,this.__data__={hash:new zl,map:new(jr||zr),string:new zl}}var qd=$v;function qv(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Vd=qv;function Vv(e,t){var r=e.__data__;return Vd(t)?r[typeof t=="string"?"string":"hash"]:r.map}var $r=Vv;function Gv(e){var t=$r(this,e).delete(e);return this.size-=t?1:0,t}var Gd=Gv;function Hv(e){return $r(this,e).get(e)}var Hd=Hv;function Wv(e){return $r(this,e).has(e)}var Wd=Wv;function Kv(e,t){var r=$r(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Kd=Kv;function hi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}hi.prototype.clear=qd;hi.prototype.delete=Gd;hi.prototype.get=Hd;hi.prototype.has=Wd;hi.prototype.set=Kd;var wn=hi;var Zv="Expected a function";function jl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Zv);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(jl.Cache||wn),r}jl.Cache=wn;var Zd=jl;var Yv=500;function Xv(e){var t=Zd(e,function(n){return r.size===Yv&&r.clear(),n}),r=t.cache;return t}var Yd=Xv;var Jv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qv=/\\(\\)?/g,e_=Yd(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Jv,function(r,n,i,o){t.push(i?o.replace(Qv,"$1"):n||r)}),t}),Xd=e_;function t_(e){return e==null?"":Xm(e)}var Jd=t_;function r_(e,t){return P(e)?e:pi(e,t)?[e]:Xd(Jd(e))}var qr=r_;var n_=1/0;function i_(e){if(typeof e=="string"||Or(e))return e;var t=e+"";return t=="0"&&1/e==-n_?"-0":t}var rr=i_;function o_(e,t){t=qr(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[rr(t[r++])];return r&&r==n?e:void 0}var gi=o_;function a_(e,t,r){var n=e==null?void 0:gi(e,t);return n===void 0?r:n}var Qd=a_;function s_(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var xi=s_;var eh=He?He.isConcatSpreadable:void 0;function u_(e){return P(e)||Mr(e)||!!(eh&&e&&e[eh])}var th=u_;function rh(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=th),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?rh(s,t-1,r,n,i):xi(i,s):n||(i[i.length]=s)}return i}var yi=rh;function l_(e){var t=e==null?0:e.length;return t?yi(e,1):[]}var qe=l_;var c_=Ma(Object.getPrototypeOf,Object),Ua=c_;function f_(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}var za=f_;function p_(e,t,r,n){var i=-1,o=e==null?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}var nh=p_;function m_(){this.__data__=new zr,this.size=0}var ih=m_;function d_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var oh=d_;function h_(e){return this.__data__.get(e)}var ah=h_;function g_(e){return this.__data__.has(e)}var sh=g_;var x_=200;function y_(e,t){var r=this.__data__;if(r instanceof zr){var n=r.__data__;if(!jr||n.length<x_-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new wn(n)}return r.set(e,t),this.size=r.size,this}var uh=y_;function Ei(e){var t=this.__data__=new zr(e);this.size=t.size}Ei.prototype.clear=ih;Ei.prototype.delete=oh;Ei.prototype.get=ah;Ei.prototype.has=sh;Ei.prototype.set=uh;var Vr=Ei;function E_(e,t){return e&&Qt(t,pe(t),e)}var lh=E_;function b_(e,t){return e&&Qt(t,Br(t),e)}var ch=b_;var dh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fh=dh&&typeof module=="object"&&module&&!module.nodeType&&module,k_=fh&&fh.exports===dh,ph=k_?Pe.Buffer:void 0,mh=ph?ph.allocUnsafe:void 0;function A_(e,t){if(t)return e.slice();var r=e.length,n=mh?mh(r):new e.constructor(r);return e.copy(n),n}var hh=A_;function T_(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}var bi=T_;function C_(){return[]}var ja=C_;var w_=Object.prototype,S_=w_.propertyIsEnumerable,gh=Object.getOwnPropertySymbols,v_=gh?function(e){return e==null?[]:(e=Object(e),bi(gh(e),function(t){return S_.call(e,t)}))}:ja,ki=v_;function __(e,t){return Qt(e,ki(e),t)}var xh=__;var I_=Object.getOwnPropertySymbols,R_=I_?function(e){for(var t=[];e;)xi(t,ki(e)),e=Ua(e);return t}:ja,$a=R_;function D_(e,t){return Qt(e,$a(e),t)}var yh=D_;function F_(e,t,r){var n=t(e);return P(e)?n:xi(n,r(e))}var qa=F_;function O_(e){return qa(e,pe,ki)}var fo=O_;function N_(e){return qa(e,Br,$a)}var Va=N_;var L_=ht(Pe,"DataView"),Ga=L_;var P_=ht(Pe,"Promise"),Ha=P_;var M_=ht(Pe,"Set"),Gr=M_;var Eh="[object Map]",B_="[object Object]",bh="[object Promise]",kh="[object Set]",Ah="[object WeakMap]",Th="[object DataView]",U_=yr(Ga),z_=yr(jr),j_=yr(Ha),$_=yr(Gr),q_=yr(Fa),Sn=ut;(Ga&&Sn(new Ga(new ArrayBuffer(1)))!=Th||jr&&Sn(new jr)!=Eh||Ha&&Sn(Ha.resolve())!=bh||Gr&&Sn(new Gr)!=kh||Fa&&Sn(new Fa)!=Ah)&&(Sn=function(e){var t=ut(e),r=t==B_?e.constructor:void 0,n=r?yr(r):"";if(n)switch(n){case U_:return Th;case z_:return Eh;case j_:return bh;case $_:return kh;case q_:return Ah}return t});var zt=Sn;var V_=Object.prototype,G_=V_.hasOwnProperty;function H_(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&G_.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Ch=H_;var W_=Pe.Uint8Array,Ai=W_;function K_(e){var t=new e.constructor(e.byteLength);return new Ai(t).set(new Ai(e)),t}var Ti=K_;function Z_(e,t){var r=t?Ti(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var wh=Z_;var Y_=/\w*$/;function X_(e){var t=new e.constructor(e.source,Y_.exec(e));return t.lastIndex=e.lastIndex,t}var Sh=X_;var vh=He?He.prototype:void 0,_h=vh?vh.valueOf:void 0;function J_(e){return _h?Object(_h.call(e)):{}}var Ih=J_;function Q_(e,t){var r=t?Ti(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Rh=Q_;var eI="[object Boolean]",tI="[object Date]",rI="[object Map]",nI="[object Number]",iI="[object RegExp]",oI="[object Set]",aI="[object String]",sI="[object Symbol]",uI="[object ArrayBuffer]",lI="[object DataView]",cI="[object Float32Array]",fI="[object Float64Array]",pI="[object Int8Array]",mI="[object Int16Array]",dI="[object Int32Array]",hI="[object Uint8Array]",gI="[object Uint8ClampedArray]",xI="[object Uint16Array]",yI="[object Uint32Array]";function EI(e,t,r){var n=e.constructor;switch(t){case uI:return Ti(e);case eI:case tI:return new n(+e);case lI:return wh(e,r);case cI:case fI:case pI:case mI:case dI:case hI:case gI:case xI:case yI:return Rh(e,r);case rI:return new n;case nI:case aI:return new n(e);case iI:return Sh(e);case oI:return new n;case sI:return Ih(e)}}var Dh=EI;function bI(e){return typeof e.constructor=="function"&&!er(e)?ld(Ua(e)):{}}var Fh=bI;var kI="[object Map]";function AI(e){return Fe(e)&&zt(e)==kI}var Oh=AI;var Nh=Nt&&Nt.isMap,TI=Nh?tr(Nh):Oh,Lh=TI;var CI="[object Set]";function wI(e){return Fe(e)&&zt(e)==CI}var Ph=wI;var Mh=Nt&&Nt.isSet,SI=Mh?tr(Mh):Ph,Bh=SI;var vI=1,_I=2,II=4,Uh="[object Arguments]",RI="[object Array]",DI="[object Boolean]",FI="[object Date]",OI="[object Error]",zh="[object Function]",NI="[object GeneratorFunction]",LI="[object Map]",PI="[object Number]",jh="[object Object]",MI="[object RegExp]",BI="[object Set]",UI="[object String]",zI="[object Symbol]",jI="[object WeakMap]",$I="[object ArrayBuffer]",qI="[object DataView]",VI="[object Float32Array]",GI="[object Float64Array]",HI="[object Int8Array]",WI="[object Int16Array]",KI="[object Int32Array]",ZI="[object Uint8Array]",YI="[object Uint8ClampedArray]",XI="[object Uint16Array]",JI="[object Uint32Array]",me={};me[Uh]=me[RI]=me[$I]=me[qI]=me[DI]=me[FI]=me[VI]=me[GI]=me[HI]=me[WI]=me[KI]=me[LI]=me[PI]=me[jh]=me[MI]=me[BI]=me[UI]=me[zI]=me[ZI]=me[YI]=me[XI]=me[JI]=!0;me[OI]=me[zh]=me[jI]=!1;function Wa(e,t,r,n,i,o){var a,s=t&vI,u=t&_I,l=t&II;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!Ce(e))return e;var c=P(e);if(c){if(a=Ch(e),!s)return fd(e,a)}else{var f=zt(e),p=f==zh||f==NI;if(Er(e))return hh(e,s);if(f==jh||f==Uh||p&&!i){if(a=u||p?{}:Fh(e),!s)return u?yh(e,ch(a,e)):xh(e,lh(a,e))}else{if(!me[f])return i?e:{};a=Dh(e,f,s)}}o||(o=new Vr);var m=o.get(e);if(m)return m;o.set(e,a),Bh(e)?e.forEach(function(C){a.add(Wa(C,t,r,C,e,o))}):Lh(e)&&e.forEach(function(C,x){a.set(x,Wa(C,t,r,x,e,o))});var h=l?u?Va:fo:u?Br:pe,E=c?void 0:h(e);return Oa(E||e,function(C,x){E&&(x=C,C=e[x]),Lr(a,x,Wa(C,t,r,x,e,o))}),a}var $h=Wa;var QI=4;function eR(e){return $h(e,QI)}var de=eR;function tR(e){for(var t=-1,r=e==null?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i}var nr=tR;var rR="__lodash_hash_undefined__";function nR(e){return this.__data__.set(e,rR),this}var qh=nR;function iR(e){return this.__data__.has(e)}var Vh=iR;function Ka(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new wn;++t<r;)this.add(e[t])}Ka.prototype.add=Ka.prototype.push=qh;Ka.prototype.has=Vh;var Ci=Ka;function oR(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Za=oR;function aR(e,t){return e.has(t)}var wi=aR;var sR=1,uR=2;function lR(e,t,r,n,i,o){var a=r&sR,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,p=!0,m=r&uR?new Ci:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var h=e[f],E=t[f];if(n)var C=a?n(E,h,f,t,e,o):n(h,E,f,e,t,o);if(C!==void 0){if(C)continue;p=!1;break}if(m){if(!Za(t,function(x,k){if(!wi(m,k)&&(h===x||i(h,x,r,n,o)))return m.push(k)})){p=!1;break}}else if(!(h===E||i(h,E,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}var Ya=lR;function cR(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Gh=cR;function fR(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Si=fR;var pR=1,mR=2,dR="[object Boolean]",hR="[object Date]",gR="[object Error]",xR="[object Map]",yR="[object Number]",ER="[object RegExp]",bR="[object Set]",kR="[object String]",AR="[object Symbol]",TR="[object ArrayBuffer]",CR="[object DataView]",Hh=He?He.prototype:void 0,$l=Hh?Hh.valueOf:void 0;function wR(e,t,r,n,i,o,a){switch(r){case CR:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case TR:return!(e.byteLength!=t.byteLength||!o(new Ai(e),new Ai(t)));case dR:case hR:case yR:return Jt(+e,+t);case gR:return e.name==t.name&&e.message==t.message;case ER:case kR:return e==t+"";case xR:var s=Gh;case bR:var u=n&pR;if(s||(s=Si),e.size!=t.size&&!u)return!1;var l=a.get(e);if(l)return l==t;n|=mR,a.set(e,t);var c=Ya(s(e),s(t),n,i,o,a);return a.delete(e),c;case AR:if($l)return $l.call(e)==$l.call(t)}return!1}var Wh=wR;var SR=1,vR=Object.prototype,_R=vR.hasOwnProperty;function IR(e,t,r,n,i,o){var a=r&SR,s=fo(e),u=s.length,l=fo(t),c=l.length;if(u!=c&&!a)return!1;for(var f=u;f--;){var p=s[f];if(!(a?p in t:_R.call(t,p)))return!1}var m=o.get(e),h=o.get(t);if(m&&h)return m==t&&h==e;var E=!0;o.set(e,t),o.set(t,e);for(var C=a;++f<u;){p=s[f];var x=e[p],k=t[p];if(n)var y=a?n(k,x,p,t,e,o):n(x,k,p,e,t,o);if(!(y===void 0?x===k||i(x,k,r,n,o):y)){E=!1;break}C||(C=p=="constructor")}if(E&&!C){var S=e.constructor,v=t.constructor;S!=v&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof v=="function"&&v instanceof v)&&(E=!1)}return o.delete(e),o.delete(t),E}var Kh=IR;var RR=1,Zh="[object Arguments]",Yh="[object Array]",Xa="[object Object]",DR=Object.prototype,Xh=DR.hasOwnProperty;function FR(e,t,r,n,i,o){var a=P(e),s=P(t),u=a?Yh:zt(e),l=s?Yh:zt(t);u=u==Zh?Xa:u,l=l==Zh?Xa:l;var c=u==Xa,f=l==Xa,p=u==l;if(p&&Er(e)){if(!Er(t))return!1;a=!0,c=!1}if(p&&!c)return o||(o=new Vr),a||fi(e)?Ya(e,t,r,n,i,o):Wh(e,t,u,r,n,i,o);if(!(r&RR)){var m=c&&Xh.call(e,"__wrapped__"),h=f&&Xh.call(t,"__wrapped__");if(m||h){var E=m?e.value():e,C=h?t.value():t;return o||(o=new Vr),i(E,C,r,n,o)}}return p?(o||(o=new Vr),Kh(e,t,r,n,i,o)):!1}var Jh=FR;function Qh(e,t,r,n,i){return e===t?!0:e==null||t==null||!Fe(e)&&!Fe(t)?e!==e&&t!==t:Jh(e,t,r,n,Qh,i)}var Ja=Qh;var OR=1,NR=2;function LR(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=r[i];var u=s[0],l=e[u],c=s[1];if(a&&s[2]){if(l===void 0&&!(u in e))return!1}else{var f=new Vr;if(n)var p=n(l,c,u,e,t,f);if(!(p===void 0?Ja(c,l,OR|NR,n,f):p))return!1}}return!0}var eg=LR;function PR(e){return e===e&&!Ce(e)}var Qa=PR;function MR(e){for(var t=pe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Qa(i)]}return t}var tg=MR;function BR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var es=BR;function UR(e){var t=tg(e);return t.length==1&&t[0][2]?es(t[0][0],t[0][1]):function(r){return r===e||eg(r,e,t)}}var rg=UR;function zR(e,t){return e!=null&&t in Object(e)}var ng=zR;function jR(e,t,r){t=qr(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=rr(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&ci(i)&&Nr(a,i)&&(P(e)||Mr(e)))}var ts=jR;function $R(e,t){return e!=null&&ts(e,t,ng)}var ig=$R;var qR=1,VR=2;function GR(e,t){return pi(e)&&Qa(t)?es(rr(e),t):function(r){var n=Qd(r,e);return n===void 0&&n===t?ig(r,e):Ja(t,n,qR|VR)}}var og=GR;function HR(e){return function(t){return t?.[e]}}var ag=HR;function WR(e){return function(t){return gi(t,e)}}var sg=WR;function KR(e){return pi(e)?ag(rr(e)):sg(e)}var ug=KR;function ZR(e){return typeof e=="function"?e:e==null?Ot:typeof e=="object"?P(e)?og(e[0],e[1]):rg(e):ug(e)}var Be=ZR;function YR(e,t,r,n){for(var i=-1,o=e==null?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}var lg=YR;function XR(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++i];if(r(o[u],u,o)===!1)break}return t}}var cg=XR;var JR=cg(),fg=JR;function QR(e,t){return e&&fg(e,t,pe)}var pg=QR;function eD(e,t){return function(r,n){if(r==null)return r;if(!Me(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}var mg=eD;var tD=mg(pg),gt=tD;function rD(e,t,r,n){return gt(e,function(i,o,a){t(n,i,r(i),a)}),n}var dg=rD;function nD(e,t){return function(r,n){var i=P(r)?lg:dg,o=t?t():{};return i(r,e,Be(n,2),o)}}var hg=nD;var gg=Object.prototype,iD=gg.hasOwnProperty,oD=li(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Pr(t[0],t[1],i)&&(n=1);++r<n;)for(var o=t[r],a=Br(o),s=-1,u=a.length;++s<u;){var l=a[s],c=e[l];(c===void 0||Jt(c,gg[l])&&!iD.call(e,l))&&(e[l]=o[l])}return e}),vi=oD;function aD(e){return Fe(e)&&Me(e)}var ql=aD;function sD(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var rs=sD;var uD=200;function lD(e,t,r,n){var i=-1,o=La,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;r&&(t=Yt(t,tr(r))),n?(o=rs,a=!1):t.length>=uD&&(o=wi,a=!1,t=new Ci(t));e:for(;++i<s;){var c=e[i],f=r==null?c:r(c);if(c=n||c!==0?c:0,a&&f===f){for(var p=l;p--;)if(t[p]===f)continue e;u.push(c)}else o(t,f,n)||u.push(c)}return u}var xg=lD;var cD=li(function(e,t){return ql(e)?xg(e,yi(t,1,ql,!0)):[]}),Hr=cD;function fD(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var ir=fD;function pD(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Xt(t),za(e,t<0?0:t,n)):[]}var Oe=pD;function mD(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Xt(t),t=n-t,za(e,0,t<0?0:t)):[]}var kr=mD;function dD(e){return typeof e=="function"?e:Ot}var yg=dD;function hD(e,t){var r=P(e)?Oa:gt;return r(e,yg(t))}var O=hD;function gD(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var Eg=gD;function xD(e,t){var r=!0;return gt(e,function(n,i,o){return r=!!t(n,i,o),r}),r}var bg=xD;function yD(e,t,r){var n=P(e)?Eg:bg;return r&&Pr(e,t,r)&&(t=void 0),n(e,Be(t,3))}var tt=yD;function ED(e,t){var r=[];return gt(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}var ns=ED;function bD(e,t){var r=P(e)?bi:ns;return r(e,Be(t,3))}var rt=bD;function kD(e){return function(t,r,n){var i=Object(t);if(!Me(t)){var o=Be(r,3);t=pe(t),r=function(s){return o(i[s],s,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:void 0}}var kg=kD;var AD=Math.max;function TD(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Xt(r);return i<0&&(i=AD(n+i,0)),Na(e,Be(t,3),i)}var Ag=TD;var CD=kg(Ag),or=CD;function wD(e){return e&&e.length?e[0]:void 0}var We=wD;function SD(e,t){var r=-1,n=Me(e)?Array(e.length):[];return gt(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var Tg=SD;function vD(e,t){var r=P(e)?Yt:Tg;return r(e,Be(t,3))}var D=vD;function _D(e,t){return yi(D(e,t),1)}var ct=_D;var ID=Object.prototype,RD=ID.hasOwnProperty,DD=hg(function(e,t,r){RD.call(e,r)?e[r].push(t):ui(e,r,[t])}),Vl=DD;var FD=Object.prototype,OD=FD.hasOwnProperty;function ND(e,t){return e!=null&&OD.call(e,t)}var Cg=ND;function LD(e,t){return e!=null&&ts(e,t,Cg)}var N=LD;var PD="[object String]";function MD(e){return typeof e=="string"||!P(e)&&Fe(e)&&ut(e)==PD}var Ve=MD;function BD(e,t){return Yt(t,function(r){return e[r]})}var wg=BD;function UD(e){return e==null?[]:wg(e,pe(e))}var le=UD;var zD=Math.max;function jD(e,t,r,n){e=Me(e)?e:le(e),r=r&&!n?Xt(r):0;var i=e.length;return r<0&&(r=zD(i+r,0)),Ve(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&si(e,t,r)>-1}var ke=jD;var $D=Math.max;function qD(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Xt(r);return i<0&&(i=$D(n+i,0)),si(e,t,i)}var is=qD;var VD="[object Map]",GD="[object Set]",HD=Object.prototype,WD=HD.hasOwnProperty;function KD(e){if(e==null)return!0;if(Me(e)&&(P(e)||typeof e=="string"||typeof e.splice=="function"||Er(e)||fi(e)||Mr(e)))return!e.length;var t=zt(e);if(t==VD||t==GD)return!e.size;if(er(e))return!Ba(e).length;for(var r in e)if(WD.call(e,r))return!1;return!0}var X=KD;var ZD="[object RegExp]";function YD(e){return Fe(e)&&ut(e)==ZD}var Sg=YD;var vg=Nt&&Nt.isRegExp,XD=vg?tr(vg):Sg,Lt=XD;function JD(e){return e===void 0}var nt=JD;var QD="Expected a function";function e0(e){if(typeof e!="function")throw new TypeError(QD);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var _g=e0;function t0(e,t,r,n){if(!Ce(e))return e;t=qr(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var u=rr(t[i]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=a){var c=s[u];l=n?n(c,u,s):void 0,l===void 0&&(l=Ce(c)?c:Nr(t[i+1])?[]:{})}Lr(s,u,l),s=s[u]}return e}var Ig=t0;function r0(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=gi(e,a);r(s,a)&&Ig(o,qr(a,e),s)}return o}var Rg=r0;function n0(e,t){if(e==null)return{};var r=Yt(Va(e),function(n){return[n]});return t=Be(t),Rg(e,r,function(n,i){return t(n,i[0])})}var xt=n0;function i0(e,t,r,n,i){return i(e,function(o,a,s){r=n?(n=!1,o):t(r,o,a,s)}),r}var Dg=i0;function o0(e,t,r){var n=P(e)?nh:Dg,i=arguments.length<3;return n(e,Be(t,4),r,i,gt)}var Ue=o0;function a0(e,t){var r=P(e)?bi:ns;return r(e,_g(Be(t,3)))}var Wr=a0;function s0(e,t){var r;return gt(e,function(n,i,o){return r=t(n,i,o),!r}),!!r}var Fg=s0;function u0(e,t,r){var n=P(e)?Za:Fg;return r&&Pr(e,t,r)&&(t=void 0),n(e,Be(t,3))}var po=u0;var l0=1/0,c0=Gr&&1/Si(new Gr([,-0]))[1]==l0?function(e){return new Gr(e)}:we,Og=c0;var f0=200;function p0(e,t,r){var n=-1,i=La,o=e.length,a=!0,s=[],u=s;if(r)a=!1,i=rs;else if(o>=f0){var l=t?null:Og(e);if(l)return Si(l);a=!1,i=wi,u=new Ci}else u=t?[]:s;e:for(;++n<o;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,a&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(c)}else i(u,f,r)||(u!==s&&u.push(f),s.push(c))}return s}var Ng=p0;function m0(e){return e&&e.length?Ng(e):[]}var _i=m0;function Ii(e){console&&console.error&&console.error(`Error: ${e}`)}function mo(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function ho(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}function go(e){function t(){}t.prototype=e;let r=new t;function n(){return typeof r.bar}return n(),n(),e;(0,eval)(e)}function d0(e){return h0(e)?e.LABEL:e.name}function h0(e){return Ve(e.LABEL)&&e.LABEL!==""}var St=class{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),O(this.definition,r=>{r.accept(t)})}},he=class extends St{constructor(t){super([]),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}set definition(t){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(t){t.visit(this)}},ft=class extends St{constructor(t){super(t.definition),this.orgText="",Ze(this,xt(t,r=>r!==void 0))}},ge=class extends St{constructor(t){super(t.definition),this.ignoreAmbiguities=!1,Ze(this,xt(t,r=>r!==void 0))}},Ee=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},Ne=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},Le=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},ue=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},_e=class extends St{constructor(t){super(t.definition),this.idx=1,Ze(this,xt(t,r=>r!==void 0))}},Ie=class extends St{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ze(this,xt(t,r=>r!==void 0))}},ie=class{constructor(t){this.idx=1,Ze(this,xt(t,r=>r!==void 0))}accept(t){t.visit(this)}};function os(e){return D(e,Ri)}function Ri(e){function t(r){return D(r,Ri)}if(e instanceof he){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return Ve(e.label)&&(r.label=e.label),r}else{if(e instanceof ge)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Ee)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Ne)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Le)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Ri(new ie({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof _e)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Ri(new ie({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof ue)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Ie)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof ie){let r={type:"Terminal",name:e.terminalType.name,label:d0(e.terminalType),idx:e.idx};Ve(e.label)&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=Lt(n)?n.source:n),r}else{if(e instanceof ft)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}var pt=class{visit(t){let r=t;switch(r.constructor){case he:return this.visitNonTerminal(r);case ge:return this.visitAlternative(r);case Ee:return this.visitOption(r);case Ne:return this.visitRepetitionMandatory(r);case Le:return this.visitRepetitionMandatoryWithSeparator(r);case _e:return this.visitRepetitionWithSeparator(r);case ue:return this.visitRepetition(r);case Ie:return this.visitAlternation(r);case ie:return this.visitTerminal(r);case ft:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}};function Gl(e){return e instanceof ge||e instanceof Ee||e instanceof ue||e instanceof Ne||e instanceof Le||e instanceof _e||e instanceof ie||e instanceof ft}function vn(e,t=[]){return e instanceof Ee||e instanceof ue||e instanceof _e?!0:e instanceof Ie?po(e.definition,n=>vn(n,t)):e instanceof he&&ke(t,e)?!1:e instanceof St?(e instanceof he&&t.push(e),tt(e.definition,n=>vn(n,t))):!1}function Hl(e){return e instanceof Ie}function yt(e){if(e instanceof he)return"SUBRULE";if(e instanceof Ee)return"OPTION";if(e instanceof Ie)return"OR";if(e instanceof Ne)return"AT_LEAST_ONE";if(e instanceof Le)return"AT_LEAST_ONE_SEP";if(e instanceof _e)return"MANY_SEP";if(e instanceof ue)return"MANY";if(e instanceof ie)return"CONSUME";throw Error("non exhaustive match")}var Ar=class{walk(t,r=[]){O(t.definition,(n,i)=>{let o=Oe(t.definition,i+1);if(n instanceof he)this.walkProdRef(n,o,r);else if(n instanceof ie)this.walkTerminal(n,o,r);else if(n instanceof ge)this.walkFlat(n,o,r);else if(n instanceof Ee)this.walkOption(n,o,r);else if(n instanceof Ne)this.walkAtLeastOne(n,o,r);else if(n instanceof Le)this.walkAtLeastOneSep(n,o,r);else if(n instanceof _e)this.walkManySep(n,o,r);else if(n instanceof ue)this.walkMany(n,o,r);else if(n instanceof Ie)this.walkOr(n,o,r);else throw Error("non exhaustive match")})}walkTerminal(t,r,n){}walkProdRef(t,r,n){}walkFlat(t,r,n){let i=r.concat(n);this.walk(t,i)}walkOption(t,r,n){let i=r.concat(n);this.walk(t,i)}walkAtLeastOne(t,r,n){let i=[new Ee({definition:t.definition})].concat(r,n);this.walk(t,i)}walkAtLeastOneSep(t,r,n){let i=Lg(t,r,n);this.walk(t,i)}walkMany(t,r,n){let i=[new Ee({definition:t.definition})].concat(r,n);this.walk(t,i)}walkManySep(t,r,n){let i=Lg(t,r,n);this.walk(t,i)}walkOr(t,r,n){let i=r.concat(n);O(t.definition,o=>{let a=new ge({definition:[o]});this.walk(a,i)})}};function Lg(e,t,r){return[new Ee({definition:[new ie({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function _n(e){if(e instanceof he)return _n(e.referencedRule);if(e instanceof ie)return y0(e);if(Gl(e))return g0(e);if(Hl(e))return x0(e);throw Error("non exhaustive match")}function g0(e){let t=[],r=e.definition,n=0,i=r.length>n,o,a=!0;for(;i&&a;)o=r[n],a=vn(o),t=t.concat(_n(o)),n=n+1,i=r.length>n;return _i(t)}function x0(e){let t=D(e.definition,r=>_n(r));return _i(qe(t))}function y0(e){return[e.terminalType]}var as="_~IN~_";var Wl=class extends Ar{constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,r,n){}walkProdRef(t,r,n){let i=E0(t.referencedRule,t.idx)+this.topProd.name,o=r.concat(n),a=new ge({definition:o}),s=_n(a);this.follows[i]=s}};function Pg(e){let t={};return O(e,r=>{let n=new Wl(r).startWalking();Ze(t,n)}),t}function E0(e,t){return e.name+t+as}function j(e){return e.charCodeAt(0)}function ss(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}function Di(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}function In(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function xo(){throw Error("Internal Error - Should never get here!")}function Kl(e){return e.type==="Character"}var yo=[];for(let e=j("0");e<=j("9");e++)yo.push(e);var Eo=[j("_")].concat(yo);for(let e=j("a");e<=j("z");e++)Eo.push(e);for(let e=j("A");e<=j("Z");e++)Eo.push(e);var Zl=[j(" "),j("\f"),j(`
55
+ `),j("\r"),j(" "),j("\v"),j(" "),j("\xA0"),j("\u1680"),j("\u2000"),j("\u2001"),j("\u2002"),j("\u2003"),j("\u2004"),j("\u2005"),j("\u2006"),j("\u2007"),j("\u2008"),j("\u2009"),j("\u200A"),j("\u2028"),j("\u2029"),j("\u202F"),j("\u205F"),j("\u3000"),j("\uFEFF")];var b0=/[0-9a-fA-F]/,us=/[0-9]/,k0=/[1-9]/,bo=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Di(n,"global");break;case"i":Di(n,"ignoreCase");break;case"m":Di(n,"multiLine");break;case"u":Di(n,"unicode");break;case"y":Di(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 t=[],r=this.idx;for(t.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(r)}}alternative(){let t=[],r=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}In(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(t)}}return xo()}quantifier(t=!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(t===!0&&r===void 0)return;In(r);break}if(!(t===!0&&r===void 0)&&In(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let t,r=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group();break}return t===void 0&&this.isPatternCharacter()&&(t=this.patternCharacter()),In(t)?(t.loc=this.loc(r),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):xo()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[j(`
55
56
  `),j("\r"),j("\u2028"),j("\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 t,r=!1;switch(this.popChar()){case"d":t=yo;break;case"D":t=yo,r=!0;break;case"s":t=Zl;break;case"S":t=Zl,r=!0;break;case"w":t=Eo;break;case"W":t=Eo,r=!0;break}return In(t)?{type:"Set",value:t,complement:r}:xo()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=j("\f");break;case"n":t=j(`
56
57
  `);break;case"r":t=j("\r");break;case"t":t=j(" ");break;case"v":t=j("\v");break}return In(t)?{type:"Character",value:t}:xo()}controlLetterEscapeAtom(){this.consumeChar("c");let t=this.popChar();if(/[a-zA-Z]/.test(t)===!1)throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:j("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let t=this.popChar();return{type:"Character",value:j(t)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
57
58
  `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let t=this.popChar();return{type:"Character",value:j(t)}}}characterClass(){let t=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(Kl(n)&&this.isRangeDash()){this.consumeChar("-");let o=this.classAtom(),a=o.type==="Character";if(Kl(o)){if(o.value<n.value)throw Error("Range out of order in character class");t.push({from:n.value,to:o.value})}else ss(n.value,t),t.push(j("-")),ss(o.value,t)}else ss(n.value,t)}return this.consumeChar("]"),{type:"Set",complement:r,value:t}}classAtom(){switch(this.peekChar()){case"]":case`
58
- `: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:j("\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 t=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),t=!1;break;default:this.groupIdx++;break}let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:t,value:r};return t&&(n.idx=this.groupIdx),n}positiveInteger(){let t=this.popChar();if(x0.test(t)===!1)throw Error("Expecting a positive integer");for(;us.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(us.test(t)===!1)throw Error("Expecting an integer");for(;us.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){let t=this.popChar();switch(t){case`
59
+ `: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:j("\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 t=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),t=!1;break;default:this.groupIdx++;break}let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:t,value:r};return t&&(n.idx=this.groupIdx),n}positiveInteger(){let t=this.popChar();if(k0.test(t)===!1)throw Error("Expecting a positive integer");for(;us.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(us.test(t)===!1)throw Error("Expecting an integer");for(;us.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){let t=this.popChar();switch(t){case`
59
60
  `: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:j(t)}}}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 us.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case`
60
61
  `: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 t=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(t)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
61
- `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let r="";for(let i=0;i<t;i++){let o=this.popChar();if(g0.test(o)===!1)throw Error("Expecting a HexDecimal digits");r+=o}return{type:"Character",value:parseInt(r,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){let t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(t!==void 0&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' 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(t){return{begin:t,end:this.idx}}};var Kr=class{visitChildren(t){for(let r in t){let n=t[r];t.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t);break}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}};var ls={},y0=new bo;function Fi(e){let t=e.toString();if(ls.hasOwnProperty(t))return ls[t];{let r=y0.pattern(t);return ls[t]=r,r}}function Lg(){ls={}}var Mg="Complement Sets are not supported for first char optimization",ko=`Unable to use "first char" lexer optimizations:
62
- `;function Bg(e,t=!1){try{let r=Fi(e);return Yl(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Mg)t&&mo(`${ko} Unable to optimize: < ${e.toString()} >
62
+ `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let r="";for(let i=0;i<t;i++){let o=this.popChar();if(b0.test(o)===!1)throw Error("Expecting a HexDecimal digits");r+=o}return{type:"Character",value:parseInt(r,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){let t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(t!==void 0&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' 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(t){return{begin:t,end:this.idx}}};var Kr=class{visitChildren(t){for(let r in t){let n=t[r];t.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t);break}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}};var ls={},A0=new bo;function Fi(e){let t=e.toString();if(ls.hasOwnProperty(t))return ls[t];{let r=A0.pattern(t);return ls[t]=r,r}}function Mg(){ls={}}var Ug="Complement Sets are not supported for first char optimization",ko=`Unable to use "first char" lexer optimizations:
63
+ `;function zg(e,t=!1){try{let r=Fi(e);return Yl(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Ug)t&&mo(`${ko} Unable to optimize: < ${e.toString()} >
63
64
  Complement Sets cannot be automatically optimized.
64
65
  This will disable the lexer's first char optimizations.
65
66
  See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n=`
@@ -67,48 +68,48 @@ ${t.fullCommandName}${r}
67
68
  See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Ii(`${ko}
68
69
  Failed parsing: < ${e.toString()} >
69
70
  Using the @chevrotain/regexp-to-ast library
70
- Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Yl(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i<e.value.length;i++)Yl(e.value[i],t,r);break;case"Alternative":let n=e.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 a=o;switch(a.type){case"Character":cs(a.value,t,r);break;case"Set":if(a.complement===!0)throw Error(Mg);O(a.value,u=>{if(typeof u=="number")cs(u,t,r);else{let l=u;if(r===!0)for(let c=l.from;c<=l.to;c++)cs(c,t,r);else{for(let c=l.from;c<=l.to&&c<Oi;c++)cs(c,t,r);if(l.to>=Oi){let c=l.from>=Oi?l.from:Oi,f=l.to,p=ar(c),m=ar(f);for(let h=p;h<=m;h++)t[h]=h}}}});break;case"Group":Yl(a.value,t,r);break;default:throw Error("Non Exhaustive Match")}let s=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&Xl(a)===!1||a.type!=="Group"&&s===!1)break}break;default:throw Error("non exhaustive match!")}return le(t)}function cs(e,t,r){let n=ar(e);t[n]=n,r===!0&&E0(e,t)}function E0(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let i=ar(n.charCodeAt(0));t[i]=i}else{let i=r.toLowerCase();if(i!==r){let o=ar(i.charCodeAt(0));t[o]=o}}}function Pg(e,t){return or(e.value,r=>{if(typeof r=="number")return ke(t,r);{let n=r;return or(t,i=>n.from<=i&&i<=n.to)!==void 0}})}function Xl(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?P(e.value)?tt(e.value,Xl):Xl(e.value):!1}var Jl=class extends Kr{constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}super.visitChildren(t)}}visitCharacter(t){ke(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?Pg(t,this.targetCharCodes)===void 0&&(this.found=!0):Pg(t,this.targetCharCodes)!==void 0&&(this.found=!0)}};function fs(e,t){if(t instanceof RegExp){let r=Fi(t),n=new Jl(e);return n.visit(r),n.found}else return or(t,r=>ke(e,r.charCodeAt(0)))!==void 0}var Rn="PATTERN",Ni="defaultMode",ps="modes",ec=typeof new RegExp("(?:)").sticky=="boolean";function jg(e,t){t=vi(t,{useSticky:ec,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
71
- `],tracer:(k,y)=>y()});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{M0()});let n;r("Reject Lexer.NA",()=>{n=Wr(e,k=>k[Rn]===ee.NA)});let i=!1,o;r("Transform Patterns",()=>{i=!1,o=D(n,k=>{let y=k[Rn];if(Lt(y)){let S=y.source;return S.length===1&&S!=="^"&&S!=="$"&&S!=="."&&!y.ignoreCase?S:S.length===2&&S[0]==="\\"&&!ke(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],S[1])?S[1]:t.useSticky?zg(y):Ug(y)}else{if(lt(y))return i=!0,{exec:y};if(typeof y=="object")return i=!0,y;if(typeof y=="string"){if(y.length===1)return y;{let S=y.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),v=new RegExp(S);return t.useSticky?zg(v):Ug(v)}}else throw Error("non exhaustive match")}})});let a,s,u,l,c;r("misc mapping",()=>{a=D(n,k=>k.tokenTypeIdx),s=D(n,k=>{let y=k.GROUP;if(y!==ee.SKIPPED){if(Ve(y))return y;if(nt(y))return!1;throw Error("non exhaustive match")}}),u=D(n,k=>{let y=k.LONGER_ALT;if(y)return P(y)?D(y,v=>is(n,v)):[is(n,y)]}),l=D(n,k=>k.PUSH_MODE),c=D(n,k=>N(k,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let k=Zg(t.lineTerminatorCharacters);f=D(n,y=>!1),t.positionTracking!=="onlyOffset"&&(f=D(n,y=>N(y,"LINE_BREAKS")?!!y.LINE_BREAKS:Kg(y,k)===!1&&fs(k,y.PATTERN)))});let p,m,h,E;r("Misc Mapping #2",()=>{p=D(n,Hg),m=D(o,L0),h=Ue(n,(k,y)=>{let S=y.GROUP;return Ve(S)&&S!==ee.SKIPPED&&(k[S]=[]),k},{}),E=D(o,(k,y)=>({pattern:o[y],longerAlt:u[y],canLineTerminator:f[y],isCustom:p[y],short:m[y],group:s[y],push:l[y],pop:c[y],tokenTypeIdx:a[y],tokenType:n[y]}))});let C=!0,x=[];return t.safeMode||r("First Char Optimization",()=>{x=Ue(n,(k,y,S)=>{if(typeof y.PATTERN=="string"){let v=y.PATTERN.charCodeAt(0),A=ar(v);Ql(k,A,E[S])}else if(P(y.START_CHARS_HINT)){let v;O(y.START_CHARS_HINT,A=>{let te=typeof A=="string"?A.charCodeAt(0):A,J=ar(te);v!==J&&(v=J,Ql(k,J,E[S]))})}else if(Lt(y.PATTERN))if(y.PATTERN.unicode)C=!1,t.ensureOptimizations&&Ii(`${ko} Unable to analyze < ${y.PATTERN.toString()} > pattern.
71
+ Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Yl(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i<e.value.length;i++)Yl(e.value[i],t,r);break;case"Alternative":let n=e.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 a=o;switch(a.type){case"Character":cs(a.value,t,r);break;case"Set":if(a.complement===!0)throw Error(Ug);O(a.value,u=>{if(typeof u=="number")cs(u,t,r);else{let l=u;if(r===!0)for(let c=l.from;c<=l.to;c++)cs(c,t,r);else{for(let c=l.from;c<=l.to&&c<Oi;c++)cs(c,t,r);if(l.to>=Oi){let c=l.from>=Oi?l.from:Oi,f=l.to,p=ar(c),m=ar(f);for(let h=p;h<=m;h++)t[h]=h}}}});break;case"Group":Yl(a.value,t,r);break;default:throw Error("Non Exhaustive Match")}let s=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&Xl(a)===!1||a.type!=="Group"&&s===!1)break}break;default:throw Error("non exhaustive match!")}return le(t)}function cs(e,t,r){let n=ar(e);t[n]=n,r===!0&&T0(e,t)}function T0(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let i=ar(n.charCodeAt(0));t[i]=i}else{let i=r.toLowerCase();if(i!==r){let o=ar(i.charCodeAt(0));t[o]=o}}}function Bg(e,t){return or(e.value,r=>{if(typeof r=="number")return ke(t,r);{let n=r;return or(t,i=>n.from<=i&&i<=n.to)!==void 0}})}function Xl(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?P(e.value)?tt(e.value,Xl):Xl(e.value):!1}var Jl=class extends Kr{constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}super.visitChildren(t)}}visitCharacter(t){ke(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?Bg(t,this.targetCharCodes)===void 0&&(this.found=!0):Bg(t,this.targetCharCodes)!==void 0&&(this.found=!0)}};function fs(e,t){if(t instanceof RegExp){let r=Fi(t),n=new Jl(e);return n.visit(r),n.found}else return or(t,r=>ke(e,r.charCodeAt(0)))!==void 0}var Rn="PATTERN",Ni="defaultMode",ps="modes",ec=typeof new RegExp("(?:)").sticky=="boolean";function qg(e,t){t=vi(t,{useSticky:ec,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
72
+ `],tracer:(k,y)=>y()});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{j0()});let n;r("Reject Lexer.NA",()=>{n=Wr(e,k=>k[Rn]===ee.NA)});let i=!1,o;r("Transform Patterns",()=>{i=!1,o=D(n,k=>{let y=k[Rn];if(Lt(y)){let S=y.source;return S.length===1&&S!=="^"&&S!=="$"&&S!=="."&&!y.ignoreCase?S:S.length===2&&S[0]==="\\"&&!ke(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],S[1])?S[1]:t.useSticky?$g(y):jg(y)}else{if(lt(y))return i=!0,{exec:y};if(typeof y=="object")return i=!0,y;if(typeof y=="string"){if(y.length===1)return y;{let S=y.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),v=new RegExp(S);return t.useSticky?$g(v):jg(v)}}else throw Error("non exhaustive match")}})});let a,s,u,l,c;r("misc mapping",()=>{a=D(n,k=>k.tokenTypeIdx),s=D(n,k=>{let y=k.GROUP;if(y!==ee.SKIPPED){if(Ve(y))return y;if(nt(y))return!1;throw Error("non exhaustive match")}}),u=D(n,k=>{let y=k.LONGER_ALT;if(y)return P(y)?D(y,v=>is(n,v)):[is(n,y)]}),l=D(n,k=>k.PUSH_MODE),c=D(n,k=>N(k,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let k=Xg(t.lineTerminatorCharacters);f=D(n,y=>!1),t.positionTracking!=="onlyOffset"&&(f=D(n,y=>N(y,"LINE_BREAKS")?!!y.LINE_BREAKS:Yg(y,k)===!1&&fs(k,y.PATTERN)))});let p,m,h,E;r("Misc Mapping #2",()=>{p=D(n,Kg),m=D(o,U0),h=Ue(n,(k,y)=>{let S=y.GROUP;return Ve(S)&&S!==ee.SKIPPED&&(k[S]=[]),k},{}),E=D(o,(k,y)=>({pattern:o[y],longerAlt:u[y],canLineTerminator:f[y],isCustom:p[y],short:m[y],group:s[y],push:l[y],pop:c[y],tokenTypeIdx:a[y],tokenType:n[y]}))});let C=!0,x=[];return t.safeMode||r("First Char Optimization",()=>{x=Ue(n,(k,y,S)=>{if(typeof y.PATTERN=="string"){let v=y.PATTERN.charCodeAt(0),A=ar(v);Ql(k,A,E[S])}else if(P(y.START_CHARS_HINT)){let v;O(y.START_CHARS_HINT,A=>{let te=typeof A=="string"?A.charCodeAt(0):A,J=ar(te);v!==J&&(v=J,Ql(k,J,E[S]))})}else if(Lt(y.PATTERN))if(y.PATTERN.unicode)C=!1,t.ensureOptimizations&&Ii(`${ko} Unable to analyze < ${y.PATTERN.toString()} > pattern.
72
73
  The regexp unicode flag is not currently supported by the regexp-to-ast library.
73
74
  This will disable the lexer's first char optimizations.
74
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let v=Bg(y.PATTERN,t.ensureOptimizations);X(v)&&(C=!1),O(v,A=>{Ql(k,A,E[S])})}else t.ensureOptimizations&&Ii(`${ko} TokenType: <${y.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
75
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let v=zg(y.PATTERN,t.ensureOptimizations);X(v)&&(C=!1),O(v,A=>{Ql(k,A,E[S])})}else t.ensureOptimizations&&Ii(`${ko} TokenType: <${y.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
75
76
  This will disable the lexer's first char optimizations.
76
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),C=!1;return k},[])}),{emptyGroups:h,patternIdxToConfig:E,charCodeToPatternIdxToConfig:x,hasCustom:i,canBeOptimized:C}}function $g(e,t){let r=[],n=k0(e);r=r.concat(n.errors);let i=A0(n.valid),o=i.valid;return r=r.concat(i.errors),r=r.concat(b0(o)),r=r.concat(R0(o)),r=r.concat(D0(o,t)),r=r.concat(F0(o)),r}function b0(e){let t=[],r=rt(e,n=>Lt(n[Rn]));return t=t.concat(C0(r)),t=t.concat(v0(r)),t=t.concat(_0(r)),t=t.concat(I0(r)),t=t.concat(w0(r)),t}function k0(e){let t=rt(e,i=>!N(i,Rn)),r=D(t,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Ae.MISSING_PATTERN,tokenTypes:[i]})),n=Hr(e,t);return{errors:r,valid:n}}function A0(e){let t=rt(e,i=>{let o=i[Rn];return!Lt(o)&&!lt(o)&&!N(o,"exec")&&!Ve(o)}),r=D(t,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:Ae.INVALID_PATTERN,tokenTypes:[i]})),n=Hr(e,t);return{errors:r,valid:n}}var T0=/[^\\][$]/;function C0(e){class t extends Kr{constructor(){super(...arguments),this.found=!1}visitEndAnchor(o){this.found=!0}}let r=rt(e,i=>{let o=i.PATTERN;try{let a=Fi(o),s=new t;return s.visit(a),s.found}catch{return T0.test(o.source)}});return D(r,i=>({message:`Unexpected RegExp Anchor Error:
77
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),C=!1;return k},[])}),{emptyGroups:h,patternIdxToConfig:E,charCodeToPatternIdxToConfig:x,hasCustom:i,canBeOptimized:C}}function Vg(e,t){let r=[],n=w0(e);r=r.concat(n.errors);let i=S0(n.valid),o=i.valid;return r=r.concat(i.errors),r=r.concat(C0(o)),r=r.concat(N0(o)),r=r.concat(L0(o,t)),r=r.concat(P0(o)),r}function C0(e){let t=[],r=rt(e,n=>Lt(n[Rn]));return t=t.concat(_0(r)),t=t.concat(D0(r)),t=t.concat(F0(r)),t=t.concat(O0(r)),t=t.concat(I0(r)),t}function w0(e){let t=rt(e,i=>!N(i,Rn)),r=D(t,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Ae.MISSING_PATTERN,tokenTypes:[i]})),n=Hr(e,t);return{errors:r,valid:n}}function S0(e){let t=rt(e,i=>{let o=i[Rn];return!Lt(o)&&!lt(o)&&!N(o,"exec")&&!Ve(o)}),r=D(t,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:Ae.INVALID_PATTERN,tokenTypes:[i]})),n=Hr(e,t);return{errors:r,valid:n}}var v0=/[^\\][$]/;function _0(e){class t extends Kr{constructor(){super(...arguments),this.found=!1}visitEndAnchor(o){this.found=!0}}let r=rt(e,i=>{let o=i.PATTERN;try{let a=Fi(o),s=new t;return s.visit(a),s.found}catch{return v0.test(o.source)}});return D(r,i=>({message:`Unexpected RegExp Anchor Error:
77
78
  Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
78
- See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ae.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function w0(e){let t=rt(e,n=>n.PATTERN.test(""));return D(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Ae.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}var S0=/[^\\[][\^]|^\^/;function v0(e){class t extends Kr{constructor(){super(...arguments),this.found=!1}visitStartAnchor(o){this.found=!0}}let r=rt(e,i=>{let o=i.PATTERN;try{let a=Fi(o),s=new t;return s.visit(a),s.found}catch{return S0.test(o.source)}});return D(r,i=>({message:`Unexpected RegExp Anchor Error:
79
+ See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ae.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function I0(e){let t=rt(e,n=>n.PATTERN.test(""));return D(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Ae.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}var R0=/[^\\[][\^]|^\^/;function D0(e){class t extends Kr{constructor(){super(...arguments),this.found=!1}visitStartAnchor(o){this.found=!0}}let r=rt(e,i=>{let o=i.PATTERN;try{let a=Fi(o),s=new t;return s.visit(a),s.found}catch{return R0.test(o.source)}});return D(r,i=>({message:`Unexpected RegExp Anchor Error:
79
80
  Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
80
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ae.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function _0(e){let t=rt(e,n=>{let i=n[Rn];return i instanceof RegExp&&(i.multiline||i.global)});return D(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Ae.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function I0(e){let t=[],r=D(e,o=>Ue(e,(a,s)=>(o.PATTERN.source===s.PATTERN.source&&!ke(t,s)&&s.PATTERN!==ee.NA&&(t.push(s),a.push(s)),a),[]));r=nr(r);let n=rt(r,o=>o.length>1);return D(n,o=>{let a=D(o,u=>u.name);return{message:`The same RegExp pattern ->${We(o).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:Ae.DUPLICATE_PATTERNS_FOUND,tokenTypes:o}})}function R0(e){let t=rt(e,n=>{if(!N(n,"GROUP"))return!1;let i=n.GROUP;return i!==ee.SKIPPED&&i!==ee.NA&&!Ve(i)});return D(t,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Ae.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function D0(e,t){let r=rt(e,i=>i.PUSH_MODE!==void 0&&!ke(t,i.PUSH_MODE));return D(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:Ae.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function F0(e){let t=[],r=Ue(e,(n,i,o)=>{let a=i.PATTERN;return a===ee.NA||(Ve(a)?n.push({str:a,idx:o,tokenType:i}):Lt(a)&&N0(a)&&n.push({str:a.source,idx:o,tokenType:i})),n},[]);return O(e,(n,i)=>{O(r,({str:o,idx:a,tokenType:s})=>{if(i<a&&O0(o,n.PATTERN)){let u=`Token: ->${s.name}<- can never be matched.
81
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ae.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function F0(e){let t=rt(e,n=>{let i=n[Rn];return i instanceof RegExp&&(i.multiline||i.global)});return D(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Ae.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function O0(e){let t=[],r=D(e,o=>Ue(e,(a,s)=>(o.PATTERN.source===s.PATTERN.source&&!ke(t,s)&&s.PATTERN!==ee.NA&&(t.push(s),a.push(s)),a),[]));r=nr(r);let n=rt(r,o=>o.length>1);return D(n,o=>{let a=D(o,u=>u.name);return{message:`The same RegExp pattern ->${We(o).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:Ae.DUPLICATE_PATTERNS_FOUND,tokenTypes:o}})}function N0(e){let t=rt(e,n=>{if(!N(n,"GROUP"))return!1;let i=n.GROUP;return i!==ee.SKIPPED&&i!==ee.NA&&!Ve(i)});return D(t,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Ae.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function L0(e,t){let r=rt(e,i=>i.PUSH_MODE!==void 0&&!ke(t,i.PUSH_MODE));return D(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:Ae.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function P0(e){let t=[],r=Ue(e,(n,i,o)=>{let a=i.PATTERN;return a===ee.NA||(Ve(a)?n.push({str:a,idx:o,tokenType:i}):Lt(a)&&B0(a)&&n.push({str:a.source,idx:o,tokenType:i})),n},[]);return O(e,(n,i)=>{O(r,({str:o,idx:a,tokenType:s})=>{if(i<a&&M0(o,n.PATTERN)){let u=`Token: ->${s.name}<- can never be matched.
81
82
  Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
82
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:u,type:Ae.UNREACHABLE_PATTERN,tokenTypes:[n,s]})}})}),t}function O0(e,t){if(Lt(t)){let r=t.exec(e);return r!==null&&r.index===0}else{if(lt(t))return t(e,0,[],{});if(N(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function N0(e){return or([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}function Ug(e){let t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function zg(e){let t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function qg(e,t,r){let n=[];return N(e,Ni)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ni+`> property in its definition
83
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:u,type:Ae.UNREACHABLE_PATTERN,tokenTypes:[n,s]})}})}),t}function M0(e,t){if(Lt(t)){let r=t.exec(e);return r!==null&&r.index===0}else{if(lt(t))return t(e,0,[],{});if(N(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function B0(e){return or([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}function jg(e){let t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function $g(e){let t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function Gg(e,t,r){let n=[];return N(e,Ni)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ni+`> property in its definition
83
84
  `,type:Ae.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),N(e,ps)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+ps+`> property in its definition
84
85
  `,type:Ae.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),N(e,ps)&&N(e,Ni)&&!N(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Ni}: <${e.defaultMode}>which does not exist
85
86
  `,type:Ae.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),N(e,ps)&&O(e.modes,(i,o)=>{O(i,(a,s)=>{if(nt(a))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${o}> at index: <${s}>
86
87
  `,type:Ae.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(N(a,"LONGER_ALT")){let u=P(a.LONGER_ALT)?a.LONGER_ALT:[a.LONGER_ALT];O(u,l=>{!nt(l)&&!ke(i,l)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${l.name}> on token <${a.name}> outside of mode <${o}>
87
- `,type:Ae.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function Vg(e,t,r){let n=[],i=!1,o=nr(qe(le(e.modes))),a=Wr(o,u=>u[Rn]===ee.NA),s=Zg(r);return t&&O(a,u=>{let l=Kg(u,s);if(l!==!1){let f={message:P0(u,l),type:l.issue,tokenType:u};n.push(f)}else N(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):fs(s,u.PATTERN)&&(i=!0)}),t&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
88
+ `,type:Ae.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function Hg(e,t,r){let n=[],i=!1,o=nr(qe(le(e.modes))),a=Wr(o,u=>u[Rn]===ee.NA),s=Xg(r);return t&&O(a,u=>{let l=Yg(u,s);if(l!==!1){let f={message:z0(u,l),type:l.issue,tokenType:u};n.push(f)}else N(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):fs(s,u.PATTERN)&&(i=!0)}),t&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
88
89
  This Lexer has been defined to track line and column information,
89
90
  But none of the Token Types can be identified as matching a line terminator.
90
91
  See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
91
- for details.`,type:Ae.NO_LINE_BREAKS_FLAGS}),n}function Gg(e){let t={},r=pe(e);return O(r,n=>{let i=e[n];if(P(i))t[n]=[];else throw Error("non exhaustive match")}),t}function Hg(e){let t=e.PATTERN;if(Lt(t))return!1;if(lt(t))return!0;if(N(t,"exec"))return!0;if(Ve(t))return!1;throw Error("non exhaustive match")}function L0(e){return Ve(e)&&e.length===1?e.charCodeAt(0):!1}var Wg={test:function(e){let t=e.length;for(let r=this.lastIndex;r<t;r++){let n=e.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return e.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function Kg(e,t){if(N(e,"LINE_BREAKS"))return!1;if(Lt(e.PATTERN)){try{fs(t,e.PATTERN)}catch(r){return{issue:Ae.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(Ve(e.PATTERN))return!1;if(Hg(e))return{issue:Ae.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function P0(e,t){if(t.issue===Ae.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
92
+ for details.`,type:Ae.NO_LINE_BREAKS_FLAGS}),n}function Wg(e){let t={},r=pe(e);return O(r,n=>{let i=e[n];if(P(i))t[n]=[];else throw Error("non exhaustive match")}),t}function Kg(e){let t=e.PATTERN;if(Lt(t))return!1;if(lt(t))return!0;if(N(t,"exec"))return!0;if(Ve(t))return!1;throw Error("non exhaustive match")}function U0(e){return Ve(e)&&e.length===1?e.charCodeAt(0):!1}var Zg={test:function(e){let t=e.length;for(let r=this.lastIndex;r<t;r++){let n=e.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return e.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function Yg(e,t){if(N(e,"LINE_BREAKS"))return!1;if(Lt(e.PATTERN)){try{fs(t,e.PATTERN)}catch(r){return{issue:Ae.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(Ve(e.PATTERN))return!1;if(Kg(e))return{issue:Ae.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function z0(e,t){if(t.issue===Ae.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
92
93
  The problem is in the <${e.name}> Token Type
93
94
  Root cause: ${t.errMsg}.
94
95
  For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Ae.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
95
96
  The problem is in the <${e.name}> Token Type
96
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function Zg(e){return D(e,r=>Ve(r)?r.charCodeAt(0):r)}function Ql(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}var Oi=256,ms=[];function ar(e){return e<Oi?e:ms[e]}function M0(){if(X(ms)){ms=new Array(65536);for(let e=0;e<65536;e++)ms[e]=e>255?255+~~(e/255):e}}function Tr(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}function Li(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var Yg=1,Jg={};function Cr(e){let t=B0(e);U0(t),j0(t),z0(t),O(t,r=>{r.isParent=r.categoryMatches.length>0})}function B0(e){let t=de(e),r=e,n=!0;for(;n;){r=nr(qe(D(r,o=>o.CATEGORIES)));let i=Hr(r,t);t=t.concat(i),X(i)?n=!1:r=i}return t}function U0(e){O(e,t=>{tc(t)||(Jg[Yg]=t,t.tokenTypeIdx=Yg++),Xg(t)&&!P(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Xg(t)||(t.CATEGORIES=[]),$0(t)||(t.categoryMatches=[]),q0(t)||(t.categoryMatchesMap={})})}function z0(e){O(e,t=>{t.categoryMatches=[],O(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(Jg[n].tokenTypeIdx)})})}function j0(e){O(e,t=>{Qg([],t)})}function Qg(e,t){O(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),O(t.CATEGORIES,r=>{let n=e.concat(t);ke(n,r)||Qg(n,r)})}function tc(e){return N(e,"tokenTypeIdx")}function Xg(e){return N(e,"CATEGORIES")}function $0(e){return N(e,"categoryMatches")}function q0(e){return N(e,"categoryMatchesMap")}function ex(e){return N(e,"tokenTypeIdx")}var rc={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}};var Ae;(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Ae||(Ae={}));var Ao={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
97
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function Xg(e){return D(e,r=>Ve(r)?r.charCodeAt(0):r)}function Ql(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}var Oi=256,ms=[];function ar(e){return e<Oi?e:ms[e]}function j0(){if(X(ms)){ms=new Array(65536);for(let e=0;e<65536;e++)ms[e]=e>255?255+~~(e/255):e}}function Tr(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}function Li(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var Jg=1,ex={};function Cr(e){let t=$0(e);q0(t),G0(t),V0(t),O(t,r=>{r.isParent=r.categoryMatches.length>0})}function $0(e){let t=de(e),r=e,n=!0;for(;n;){r=nr(qe(D(r,o=>o.CATEGORIES)));let i=Hr(r,t);t=t.concat(i),X(i)?n=!1:r=i}return t}function q0(e){O(e,t=>{tc(t)||(ex[Jg]=t,t.tokenTypeIdx=Jg++),Qg(t)&&!P(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Qg(t)||(t.CATEGORIES=[]),H0(t)||(t.categoryMatches=[]),W0(t)||(t.categoryMatchesMap={})})}function V0(e){O(e,t=>{t.categoryMatches=[],O(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(ex[n].tokenTypeIdx)})})}function G0(e){O(e,t=>{tx([],t)})}function tx(e,t){O(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),O(t.CATEGORIES,r=>{let n=e.concat(t);ke(n,r)||tx(n,r)})}function tc(e){return N(e,"tokenTypeIdx")}function Qg(e){return N(e,"CATEGORIES")}function H0(e){return N(e,"categoryMatches")}function W0(e){return N(e,"categoryMatchesMap")}function rx(e){return N(e,"tokenTypeIdx")}var rc={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}};var Ae;(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Ae||(Ae={}));var Ao={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
97
98
  `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:rc,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Ao);var ee=class{constructor(t,r=Ao){if(this.lexerDefinition=t,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 a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${a}--> <${i}>`);let{time:s,value:u}=ho(o),l=s>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&l(`${a}<-- <${i}> time: ${s}ms`),this.traceInitIndent--,u}else return o()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
98
- a boolean 2nd argument is no longer supported`);this.config=Ze({},Ao,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===Ao.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Wg;else if(this.config.lineTerminatorCharacters===Ao.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
99
- 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),P(t)?i={modes:{defaultMode:de(t)},defaultMode:Ni}:(o=!1,i=de(t))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(qg(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Vg(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},O(i.modes,(s,u)=>{i.modes[u]=Wr(s,l=>nt(l))});let a=pe(i.modes);if(O(i.modes,(s,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($g(s,a))}),X(this.lexerDefinitionErrors)){Cr(s);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=jg(s,{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=Ze({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=l.canBeOptimized}})}),this.defaultMode=i.defaultMode,!X(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=D(this.lexerDefinitionErrors,l=>l.message).join(`-----------------------
99
+ a boolean 2nd argument is no longer supported`);this.config=Ze({},Ao,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===Ao.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Zg;else if(this.config.lineTerminatorCharacters===Ao.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
100
+ 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),P(t)?i={modes:{defaultMode:de(t)},defaultMode:Ni}:(o=!1,i=de(t))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Gg(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Hg(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},O(i.modes,(s,u)=>{i.modes[u]=Wr(s,l=>nt(l))});let a=pe(i.modes);if(O(i.modes,(s,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(Vg(s,a))}),X(this.lexerDefinitionErrors)){Cr(s);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=qg(s,{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=Ze({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=l.canBeOptimized}})}),this.defaultMode=i.defaultMode,!X(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=D(this.lexerDefinitionErrors,l=>l.message).join(`-----------------------
100
101
  `);throw new Error(`Errors detected in definition of Lexer:
101
102
  `+u)}O(this.lexerDefinitionWarning,s=>{mo(s.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(ec?(this.chopInput=Ot,this.match=this.matchWithTest):(this.updateLastIndex=we,this.match=this.matchWithExec),o&&(this.handleModes=we),this.trackStartLines===!1&&(this.computeNewColumn=Ot),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=we),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let s=Ue(this.canModeBeOptimized,(u,l,c)=>(l===!1&&u.push(c),u),[]);if(r.ensureOptimizations&&!X(s))throw Error(`Lexer Modes: < ${s.join(", ")} > cannot be optimized.
102
103
  Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
103
- Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Lg()}),this.TRACE_INIT("toFastProperties",()=>{go(this)})})}tokenize(t,r=this.defaultMode){if(!X(this.lexerDefinitionErrors)){let i=D(this.lexerDefinitionErrors,o=>o.message).join(`-----------------------
104
+ Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Mg()}),this.TRACE_INIT("toFastProperties",()=>{go(this)})})}tokenize(t,r=this.defaultMode){if(!X(this.lexerDefinitionErrors)){let i=D(this.lexerDefinitionErrors,o=>o.message).join(`-----------------------
104
105
  `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
105
- `+i)}return this.tokenizeInternal(t,r)}tokenizeInternal(t,r){let n,i,o,a,s,u,l,c,f,p,m,h,E,C,x,k,y=t,S=y.length,v=0,A=0,te=this.hasCustom?0:Math.floor(t.length/10),J=new Array(te),re=[],b=this.trackStartLines?1:void 0,ce=this.trackStartLines?1:void 0,Q=Gg(this.emptyGroups),B=this.trackStartLines,V=this.config.lineTerminatorsPattern,G=0,ae=[],xe=[],Ye=[],Et=[];Object.freeze(Et);let d;function it(){return ae}function vt(Re){let se=ar(Re),_t=xe[se];return _t===void 0?Et:_t}let g=Re=>{if(Ye.length===1&&Re.tokenType.PUSH_MODE===void 0){let se=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Re);re.push({offset:Re.startOffset,line:Re.startLine,column:Re.startColumn,length:Re.image.length,message:se})}else{Ye.pop();let se=ir(Ye);ae=this.patternIdxToConfig[se],xe=this.charCodeToPatternIdxToConfig[se],G=ae.length;let _t=this.canModeBeOptimized[se]&&this.config.safeMode===!1;xe&&_t?d=vt:d=it}};function Xe(Re){Ye.push(Re),xe=this.charCodeToPatternIdxToConfig[Re],ae=this.patternIdxToConfig[Re],G=ae.length,G=ae.length;let se=this.canModeBeOptimized[Re]&&this.config.safeMode===!1;xe&&se?d=vt:d=it}Xe.call(this,r);let ze,Pn=this.config.recoveryEnabled;for(;v<S;){u=null;let Re=y.charCodeAt(v),se=d(Re),_t=se.length;for(n=0;n<_t;n++){ze=se[n];let Te=ze.pattern;l=null;let Ke=ze.short;if(Ke!==!1?Re===Ke&&(u=Te):ze.isCustom===!0?(k=Te.exec(y,v,J,Q),k!==null?(u=k[0],k.payload!==void 0&&(l=k.payload)):u=null):(this.updateLastIndex(Te,v),u=this.match(Te,t,v)),u!==null){if(s=ze.longerAlt,s!==void 0){let ot=s.length;for(o=0;o<ot;o++){let bt=ae[s[o]],sr=bt.pattern;if(c=null,bt.isCustom===!0?(k=sr.exec(y,v,J,Q),k!==null?(a=k[0],k.payload!==void 0&&(c=k.payload)):a=null):(this.updateLastIndex(sr,v),a=this.match(sr,t,v)),a&&a.length>u.length){u=a,l=c,ze=bt;break}}}break}}if(u!==null){if(f=u.length,p=ze.group,p!==void 0&&(m=ze.tokenTypeIdx,h=this.createTokenInstance(u,v,m,ze.tokenType,b,ce,f),this.handlePayload(h,l),p===!1?A=this.addToken(J,A,h):Q[p].push(h)),t=this.chopInput(t,f),v=v+f,ce=this.computeNewColumn(ce,f),B===!0&&ze.canLineTerminator===!0){let Te=0,Ke,ot;V.lastIndex=0;do Ke=V.test(u),Ke===!0&&(ot=V.lastIndex-1,Te++);while(Ke===!0);Te!==0&&(b=b+Te,ce=f-ot,this.updateTokenEndLineColumnLocation(h,p,ot,Te,b,ce,f))}this.handleModes(ze,g,Xe,h)}else{let Te=v,Ke=b,ot=ce,bt=Pn===!1;for(;bt===!1&&v<S;)for(t=this.chopInput(t,1),v++,i=0;i<G;i++){let sr=ae[i],Mn=sr.pattern,qi=sr.short;if(qi!==!1?y.charCodeAt(v)===qi&&(bt=!0):sr.isCustom===!0?bt=Mn.exec(y,v,J,Q)!==null:(this.updateLastIndex(Mn,v),bt=Mn.exec(t)!==null),bt===!0)break}if(E=v-Te,ce=this.computeNewColumn(ce,E),x=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(y,Te,E,Ke,ot),re.push({offset:Te,line:Ke,column:ot,length:E,message:x}),Pn===!1)break}}return this.hasCustom||(J.length=A),{tokens:J,groups:Q,errors:re}}handleModes(t,r,n,i){if(t.pop===!0){let o=t.push;r(i),o!==void 0&&n.call(this,o)}else t.push!==void 0&&n.call(this,t.push)}chopInput(t,r){return t.substring(r)}updateLastIndex(t,r){t.lastIndex=r}updateTokenEndLineColumnLocation(t,r,n,i,o,a,s){let u,l;r!==void 0&&(u=n===s-1,l=u?-1:0,i===1&&u===!0||(t.endLine=o+l,t.endColumn=a-1+-l))}computeNewColumn(t,r){return t+r}createOffsetOnlyToken(t,r,n,i){return{image:t,startOffset:r,tokenTypeIdx:n,tokenType:i}}createStartOnlyToken(t,r,n,i,o,a){return{image:t,startOffset:r,startLine:o,startColumn:a,tokenTypeIdx:n,tokenType:i}}createFullToken(t,r,n,i,o,a,s){return{image:t,startOffset:r,endOffset:r+s-1,startLine:o,endLine:o,startColumn:a,endColumn:a+s-1,tokenTypeIdx:n,tokenType:i}}addTokenUsingPush(t,r,n){return t.push(n),r}addTokenUsingMemberAccess(t,r,n){return t[r]=n,r++,r}handlePayloadNoCustom(t,r){}handlePayloadWithCustom(t,r){r!==null&&(t.payload=r)}matchWithTest(t,r,n){return t.test(r)===!0?r.substring(n,t.lastIndex):null}matchWithExec(t,r){let n=t.exec(r);return n!==null?n[0]:null}};ee.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.";ee.NA=/NOT_APPLICABLE/;function Dn(e){return nc(e)?e.LABEL:e.name}function nc(e){return Ve(e.LABEL)&&e.LABEL!==""}var V0="parent",tx="categories",rx="label",nx="group",ix="push_mode",ox="pop_mode",ax="longer_alt",sx="line_breaks",ux="start_chars_hint";function H(e){return G0(e)}function G0(e){let t=e.pattern,r={};if(r.name=e.name,nt(t)||(r.PATTERN=t),N(e,V0))throw`The parent property is no longer supported.
106
- See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return N(e,tx)&&(r.CATEGORIES=e[tx]),Cr([r]),N(e,rx)&&(r.LABEL=e[rx]),N(e,nx)&&(r.GROUP=e[nx]),N(e,ox)&&(r.POP_MODE=e[ox]),N(e,ix)&&(r.PUSH_MODE=e[ix]),N(e,ax)&&(r.LONGER_ALT=e[ax]),N(e,sx)&&(r.LINE_BREAKS=e[sx]),N(e,ux)&&(r.START_CHARS_HINT=e[ux]),r}var jt=H({name:"EOF",pattern:ee.NA});Cr([jt]);function Fn(e,t,r,n,i,o,a,s){return{image:t,startOffset:r,endOffset:n,startLine:i,endLine:o,startColumn:a,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function ic(e,t){return Tr(e,t)}var ds={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${nc(e)?`--> ${Dn(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:i}){let o="Expecting: ",s=`
106
+ `+i)}return this.tokenizeInternal(t,r)}tokenizeInternal(t,r){let n,i,o,a,s,u,l,c,f,p,m,h,E,C,x,k,y=t,S=y.length,v=0,A=0,te=this.hasCustom?0:Math.floor(t.length/10),J=new Array(te),re=[],b=this.trackStartLines?1:void 0,ce=this.trackStartLines?1:void 0,Q=Wg(this.emptyGroups),B=this.trackStartLines,V=this.config.lineTerminatorsPattern,G=0,ae=[],xe=[],Ye=[],Et=[];Object.freeze(Et);let d;function it(){return ae}function vt(Re){let se=ar(Re),_t=xe[se];return _t===void 0?Et:_t}let g=Re=>{if(Ye.length===1&&Re.tokenType.PUSH_MODE===void 0){let se=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Re);re.push({offset:Re.startOffset,line:Re.startLine,column:Re.startColumn,length:Re.image.length,message:se})}else{Ye.pop();let se=ir(Ye);ae=this.patternIdxToConfig[se],xe=this.charCodeToPatternIdxToConfig[se],G=ae.length;let _t=this.canModeBeOptimized[se]&&this.config.safeMode===!1;xe&&_t?d=vt:d=it}};function Xe(Re){Ye.push(Re),xe=this.charCodeToPatternIdxToConfig[Re],ae=this.patternIdxToConfig[Re],G=ae.length,G=ae.length;let se=this.canModeBeOptimized[Re]&&this.config.safeMode===!1;xe&&se?d=vt:d=it}Xe.call(this,r);let ze,Pn=this.config.recoveryEnabled;for(;v<S;){u=null;let Re=y.charCodeAt(v),se=d(Re),_t=se.length;for(n=0;n<_t;n++){ze=se[n];let Te=ze.pattern;l=null;let Ke=ze.short;if(Ke!==!1?Re===Ke&&(u=Te):ze.isCustom===!0?(k=Te.exec(y,v,J,Q),k!==null?(u=k[0],k.payload!==void 0&&(l=k.payload)):u=null):(this.updateLastIndex(Te,v),u=this.match(Te,t,v)),u!==null){if(s=ze.longerAlt,s!==void 0){let ot=s.length;for(o=0;o<ot;o++){let bt=ae[s[o]],sr=bt.pattern;if(c=null,bt.isCustom===!0?(k=sr.exec(y,v,J,Q),k!==null?(a=k[0],k.payload!==void 0&&(c=k.payload)):a=null):(this.updateLastIndex(sr,v),a=this.match(sr,t,v)),a&&a.length>u.length){u=a,l=c,ze=bt;break}}}break}}if(u!==null){if(f=u.length,p=ze.group,p!==void 0&&(m=ze.tokenTypeIdx,h=this.createTokenInstance(u,v,m,ze.tokenType,b,ce,f),this.handlePayload(h,l),p===!1?A=this.addToken(J,A,h):Q[p].push(h)),t=this.chopInput(t,f),v=v+f,ce=this.computeNewColumn(ce,f),B===!0&&ze.canLineTerminator===!0){let Te=0,Ke,ot;V.lastIndex=0;do Ke=V.test(u),Ke===!0&&(ot=V.lastIndex-1,Te++);while(Ke===!0);Te!==0&&(b=b+Te,ce=f-ot,this.updateTokenEndLineColumnLocation(h,p,ot,Te,b,ce,f))}this.handleModes(ze,g,Xe,h)}else{let Te=v,Ke=b,ot=ce,bt=Pn===!1;for(;bt===!1&&v<S;)for(t=this.chopInput(t,1),v++,i=0;i<G;i++){let sr=ae[i],Mn=sr.pattern,qi=sr.short;if(qi!==!1?y.charCodeAt(v)===qi&&(bt=!0):sr.isCustom===!0?bt=Mn.exec(y,v,J,Q)!==null:(this.updateLastIndex(Mn,v),bt=Mn.exec(t)!==null),bt===!0)break}if(E=v-Te,ce=this.computeNewColumn(ce,E),x=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(y,Te,E,Ke,ot),re.push({offset:Te,line:Ke,column:ot,length:E,message:x}),Pn===!1)break}}return this.hasCustom||(J.length=A),{tokens:J,groups:Q,errors:re}}handleModes(t,r,n,i){if(t.pop===!0){let o=t.push;r(i),o!==void 0&&n.call(this,o)}else t.push!==void 0&&n.call(this,t.push)}chopInput(t,r){return t.substring(r)}updateLastIndex(t,r){t.lastIndex=r}updateTokenEndLineColumnLocation(t,r,n,i,o,a,s){let u,l;r!==void 0&&(u=n===s-1,l=u?-1:0,i===1&&u===!0||(t.endLine=o+l,t.endColumn=a-1+-l))}computeNewColumn(t,r){return t+r}createOffsetOnlyToken(t,r,n,i){return{image:t,startOffset:r,tokenTypeIdx:n,tokenType:i}}createStartOnlyToken(t,r,n,i,o,a){return{image:t,startOffset:r,startLine:o,startColumn:a,tokenTypeIdx:n,tokenType:i}}createFullToken(t,r,n,i,o,a,s){return{image:t,startOffset:r,endOffset:r+s-1,startLine:o,endLine:o,startColumn:a,endColumn:a+s-1,tokenTypeIdx:n,tokenType:i}}addTokenUsingPush(t,r,n){return t.push(n),r}addTokenUsingMemberAccess(t,r,n){return t[r]=n,r++,r}handlePayloadNoCustom(t,r){}handlePayloadWithCustom(t,r){r!==null&&(t.payload=r)}matchWithTest(t,r,n){return t.test(r)===!0?r.substring(n,t.lastIndex):null}matchWithExec(t,r){let n=t.exec(r);return n!==null?n[0]:null}};ee.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.";ee.NA=/NOT_APPLICABLE/;function Dn(e){return nc(e)?e.LABEL:e.name}function nc(e){return Ve(e.LABEL)&&e.LABEL!==""}var K0="parent",nx="categories",ix="label",ox="group",ax="push_mode",sx="pop_mode",ux="longer_alt",lx="line_breaks",cx="start_chars_hint";function H(e){return Z0(e)}function Z0(e){let t=e.pattern,r={};if(r.name=e.name,nt(t)||(r.PATTERN=t),N(e,K0))throw`The parent property is no longer supported.
107
+ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return N(e,nx)&&(r.CATEGORIES=e[nx]),Cr([r]),N(e,ix)&&(r.LABEL=e[ix]),N(e,ox)&&(r.GROUP=e[ox]),N(e,sx)&&(r.POP_MODE=e[sx]),N(e,ax)&&(r.PUSH_MODE=e[ax]),N(e,ux)&&(r.LONGER_ALT=e[ux]),N(e,lx)&&(r.LINE_BREAKS=e[lx]),N(e,cx)&&(r.START_CHARS_HINT=e[cx]),r}var jt=H({name:"EOF",pattern:ee.NA});Cr([jt]);function Fn(e,t,r,n,i,o,a,s){return{image:t,startOffset:r,endOffset:n,startLine:i,endLine:o,startColumn:a,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function ic(e,t){return Tr(e,t)}var ds={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${nc(e)?`--> ${Dn(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:i}){let o="Expecting: ",s=`
107
108
  but found: '`+We(t).image+"'";if(n)return o+n+s;{let u=Ue(e,(p,m)=>p.concat(m),[]),l=D(u,p=>`[${D(p,m=>Dn(m)).join(", ")}]`),f=`one of these possible Token sequences:
108
109
  ${D(l,(p,m)=>` ${m+1}. ${p}`).join(`
109
110
  `)}`;return o+f+s}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let i="Expecting: ",a=`
110
111
  but found: '`+We(t).image+"'";if(r)return i+r+a;{let u=`expecting at least one iteration which starts with one of these possible Token sequences::
111
- <${D(e,l=>`[${D(l,c=>Dn(c)).join(",")}]`).join(" ,")}>`;return i+u+a}}};Object.freeze(ds);var lx={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
112
+ <${D(e,l=>`[${D(l,c=>Dn(c)).join(",")}]`).join(" ,")}>`;return i+u+a}}};Object.freeze(ds);var fx={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
112
113
  inside top level rule: ->`+e.name+"<-"}},$t={buildDuplicateFoundError(e,t){function r(c){return c instanceof ie?c.terminalType.name:c instanceof he?c.nonTerminalName:""}let n=e.name,i=We(t),o=i.idx,a=yt(i),s=r(i),u=o>0,l=`->${a}${u?o:""}<- ${s?`with argument: ->${s}<-`:""}
113
114
  appears more than once (${t.length} times) in the top level rule: ->${n}<-.
114
115
  For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
@@ -133,51 +134,51 @@ rule: <${t}> can be invoked from itself (directly or indirectly)
133
134
  without consuming any Tokens. The grammar path that causes this is:
134
135
  ${n}
135
136
  To fix this refactor your grammar to remove the left recursion.
136
- see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof ft?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function cx(e,t){let r=new oc(e,t);return r.resolveRefs(),r.errors}var oc=class extends pt{constructor(t,r){super(),this.nameToTopRule=t,this.errMsgProvider=r,this.errors=[]}resolveRefs(){O(le(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){let r=this.nameToTopRule[t.nonTerminalName];if(r)t.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:Ge.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}};var ac=class extends Ar{constructor(t,r){super(),this.topProd=t,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=de(this.path.ruleStack).reverse(),this.occurrenceStack=de(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,r=[]){this.found||super.walk(t,r)}walkProdRef(t,r,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,i)}}updateExpectedNext(){X(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},hs=class extends ac{constructor(t,r){super(t,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,r,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),o=new ge({definition:i});this.possibleTokTypes=_n(o),this.found=!0}}},Pi=class extends Ar{constructor(t,r){super(),this.topRule=t,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},gs=class extends Pi{walkMany(t,r,n){if(t.idx===this.occurrence){let i=We(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(t,r,n)}},To=class extends Pi{walkManySep(t,r,n){if(t.idx===this.occurrence){let i=We(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(t,r,n)}},xs=class extends Pi{walkAtLeastOne(t,r,n){if(t.idx===this.occurrence){let i=We(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(t,r,n)}},Co=class extends Pi{walkAtLeastOneSep(t,r,n){if(t.idx===this.occurrence){let i=We(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(t,r,n)}};function ys(e,t,r=[]){r=de(r);let n=[],i=0;function o(s){return s.concat(Oe(e,i+1))}function a(s){let u=ys(o(s),t,r);return n.concat(u)}for(;r.length<t&&i<e.length;){let s=e[i];if(s instanceof ge)return a(s.definition);if(s instanceof he)return a(s.definition);if(s instanceof Ee)n=a(s.definition);else if(s instanceof Ne){let u=s.definition.concat([new ue({definition:s.definition})]);return a(u)}else if(s instanceof Le){let u=[new ge({definition:s.definition}),new ue({definition:[new ie({terminalType:s.separator})].concat(s.definition)})];return a(u)}else if(s instanceof _e){let u=s.definition.concat([new ue({definition:[new ie({terminalType:s.separator})].concat(s.definition)})]);n=a(u)}else if(s instanceof ue){let u=s.definition.concat([new ue({definition:s.definition})]);n=a(u)}else{if(s instanceof Ie)return O(s.definition,u=>{X(u.definition)===!1&&(n=a(u.definition))}),n;if(s instanceof ie)r.push(s.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:Oe(e,i)}),n}function Es(e,t,r,n){let i="EXIT_NONE_TERMINAL",o=[i],a="EXIT_ALTERNATIVE",s=!1,u=t.length,l=u-n-1,c=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!X(f);){let p=f.pop();if(p===a){s&&ir(f).idx<=l&&f.pop();continue}let m=p.def,h=p.idx,E=p.ruleStack,C=p.occurrenceStack;if(X(m))continue;let x=m[0];if(x===i){let k={idx:h,def:Oe(m),ruleStack:kr(E),occurrenceStack:kr(C)};f.push(k)}else if(x instanceof ie)if(h<u-1){let k=h+1,y=t[k];if(r(y,x.terminalType)){let S={idx:k,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(S)}}else if(h===u-1)c.push({nextTokenType:x.terminalType,nextTokenOccurrence:x.idx,ruleStack:E,occurrenceStack:C}),s=!0;else throw Error("non exhaustive match");else if(x instanceof he){let k=de(E);k.push(x.nonTerminalName);let y=de(C);y.push(x.idx);let S={idx:h,def:x.definition.concat(o,Oe(m)),ruleStack:k,occurrenceStack:y};f.push(S)}else if(x instanceof Ee){let k={idx:h,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y={idx:h,def:x.definition.concat(Oe(m)),ruleStack:E,occurrenceStack:C};f.push(y)}else if(x instanceof Ne){let k=new ue({definition:x.definition,idx:x.idx}),y=x.definition.concat([k],Oe(m)),S={idx:h,def:y,ruleStack:E,occurrenceStack:C};f.push(S)}else if(x instanceof Le){let k=new ie({terminalType:x.separator}),y=new ue({definition:[k].concat(x.definition),idx:x.idx}),S=x.definition.concat([y],Oe(m)),v={idx:h,def:S,ruleStack:E,occurrenceStack:C};f.push(v)}else if(x instanceof _e){let k={idx:h,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y=new ie({terminalType:x.separator}),S=new ue({definition:[y].concat(x.definition),idx:x.idx}),v=x.definition.concat([S],Oe(m)),A={idx:h,def:v,ruleStack:E,occurrenceStack:C};f.push(A)}else if(x instanceof ue){let k={idx:h,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y=new ue({definition:x.definition,idx:x.idx}),S=x.definition.concat([y],Oe(m)),v={idx:h,def:S,ruleStack:E,occurrenceStack:C};f.push(v)}else if(x instanceof Ie)for(let k=x.definition.length-1;k>=0;k--){let y=x.definition[k],S={idx:h,def:y.definition.concat(Oe(m)),ruleStack:E,occurrenceStack:C};f.push(S),f.push(a)}else if(x instanceof ge)f.push({idx:h,def:x.definition.concat(Oe(m)),ruleStack:E,occurrenceStack:C});else if(x instanceof ft)f.push(H0(x,h,E,C));else throw Error("non exhaustive match")}return c}function H0(e,t,r,n){let i=de(r);i.push(e.name);let o=de(n);return o.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:o}}var Se;(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(Se||(Se={}));function ks(e){if(e instanceof Ee||e==="Option")return Se.OPTION;if(e instanceof ue||e==="Repetition")return Se.REPETITION;if(e instanceof Ne||e==="RepetitionMandatory")return Se.REPETITION_MANDATORY;if(e instanceof Le||e==="RepetitionMandatoryWithSeparator")return Se.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof _e||e==="RepetitionWithSeparator")return Se.REPETITION_WITH_SEPARATOR;if(e instanceof Ie||e==="Alternation")return Se.ALTERNATION;throw Error("non exhaustive match")}function px(e,t,r,n,i,o){let a=wo(e,t,r),s=yx(a)?Li:Tr;return o(a,n,s,i)}function mx(e,t,r,n,i,o){let a=So(e,t,i,r),s=yx(a)?Li:Tr;return o(a[0],s,n)}function dx(e,t,r,n){let i=e.length,o=tt(e,a=>tt(a,s=>s.length===1));if(t)return function(a){let s=D(a,u=>u.GATE);for(let u=0;u<i;u++){let l=e[u],c=l.length,f=s[u];if(!(f!==void 0&&f.call(this)===!1))e:for(let p=0;p<c;p++){let m=l[p],h=m.length;for(let E=0;E<h;E++){let C=this.LA(E+1);if(r(C,m[E])===!1)continue e}return u}}};if(o&&!n){let a=D(e,u=>qe(u)),s=Ue(a,(u,l,c)=>(O(l,f=>{N(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=c),O(f.categoryMatches,p=>{N(u,p)||(u[p]=c)})}),u),{});return function(){let u=this.LA(1);return s[u.tokenTypeIdx]}}else return function(){for(let a=0;a<i;a++){let s=e[a],u=s.length;e:for(let l=0;l<u;l++){let c=s[l],f=c.length;for(let p=0;p<f;p++){let m=this.LA(p+1);if(r(m,c[p])===!1)continue e}return a}}}}function hx(e,t,r){let n=tt(e,o=>o.length===1),i=e.length;if(n&&!r){let o=qe(e);if(o.length===1&&X(o[0].categoryMatches)){let s=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}else{let a=Ue(o,(s,u,l)=>(s[u.tokenTypeIdx]=!0,O(u.categoryMatches,c=>{s[c]=!0}),s),[]);return function(){let s=this.LA(1);return a[s.tokenTypeIdx]===!0}}}else return function(){e:for(let o=0;o<i;o++){let a=e[o],s=a.length;for(let u=0;u<s;u++){let l=this.LA(u+1);if(t(l,a[u])===!1)continue e}return!0}return!1}}var uc=class extends Ar{constructor(t,r,n){super(),this.topProd=t,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,r,n,i){return t.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(t,r,n){this.checkIsTarget(t,Se.OPTION,r,n)||super.walkOption(t,r,n)}walkAtLeastOne(t,r,n){this.checkIsTarget(t,Se.REPETITION_MANDATORY,r,n)||super.walkOption(t,r,n)}walkAtLeastOneSep(t,r,n){this.checkIsTarget(t,Se.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}walkMany(t,r,n){this.checkIsTarget(t,Se.REPETITION,r,n)||super.walkOption(t,r,n)}walkManySep(t,r,n){this.checkIsTarget(t,Se.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}},bs=class extends pt{constructor(t,r,n){super(),this.targetOccurrence=t,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(t,r){t.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||t===this.targetRef)&&(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,Se.OPTION)}visitRepetition(t){this.checkIsTarget(t,Se.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Se.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Se.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Se.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Se.ALTERNATION)}};function fx(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}function sc(e){let t=[""];for(let r=0;r<e.length;r++){let n=e[r],i=[];for(let o=0;o<t.length;o++){let a=t[o];i.push(a+"_"+n.tokenTypeIdx);for(let s=0;s<n.categoryMatches.length;s++){let u="_"+n.categoryMatches[s];i.push(a+u)}}t=i}return t}function W0(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;let i=e[n];for(let o=0;o<t.length;o++){let a=t[o];if(i[a]===!0)return!1}}return!0}function gx(e,t){let r=D(e,a=>ys([a],1)),n=fx(r.length),i=D(r,a=>{let s={};return O(a,u=>{let l=sc(u.partialPath);O(l,c=>{s[c]=!0})}),s}),o=r;for(let a=1;a<=t;a++){let s=o;o=fx(s.length);for(let u=0;u<s.length;u++){let l=s[u];for(let c=0;c<l.length;c++){let f=l[c].partialPath,p=l[c].suffixDef,m=sc(f);if(W0(i,m,u)||X(p)||f.length===t){let E=n[u];if(As(E,f)===!1){E.push(f);for(let C=0;C<m.length;C++){let x=m[C];i[u][x]=!0}}}else{let E=ys(p,a+1,f);o[u]=o[u].concat(E),O(E,C=>{let x=sc(C.partialPath);O(x,k=>{i[u][k]=!0})})}}}}return n}function wo(e,t,r,n){let i=new bs(e,Se.ALTERNATION,n);return t.accept(i),gx(i.result,r)}function So(e,t,r,n){let i=new bs(e,r);t.accept(i);let o=i.result,s=new uc(t,e,r).startWalking(),u=new ge({definition:o}),l=new ge({definition:s});return gx([u,l],n)}function As(e,t){e:for(let r=0;r<e.length;r++){let n=e[r];if(n.length===t.length){for(let i=0;i<n.length;i++){let o=t[i],a=n[i];if((o===a||a.categoryMatchesMap[o.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function xx(e,t){return e.length<t.length&&tt(e,(r,n)=>{let i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function yx(e){return tt(e,t=>tt(t,r=>tt(r,n=>X(n.categoryMatches))))}function Ex(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return D(t,r=>Object.assign({type:Ge.CUSTOM_LOOKAHEAD_VALIDATION},r))}function bx(e,t,r,n){let i=ct(e,u=>K0(u,r)),o=eF(e,t,r),a=ct(e,u=>X0(u,r)),s=ct(e,u=>Y0(u,e,n,r));return i.concat(o,a,s)}function K0(e,t){let r=new lc;e.accept(r);let n=r.allProductions,i=Vl(n,Z0),o=xt(i,s=>s.length>1);return D(le(o),s=>{let u=We(s),l=t.buildDuplicateFoundError(e,s),c=yt(u),f={message:l,type:Ge.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:c,occurrence:u.idx},p=kx(u);return p&&(f.parameter=p),f})}function Z0(e){return`${yt(e)}_#_${e.idx}_#_${kx(e)}`}function kx(e){return e instanceof ie?e.terminalType.name:e instanceof he?e.nonTerminalName:""}var lc=class extends pt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}};function Y0(e,t,r,n){let i=[];if(Ue(t,(a,s)=>s.name===e.name?a+1:a,0)>1){let a=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:a,type:Ge.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function Ax(e,t,r){let n=[],i;return ke(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Ge.INVALID_RULE_OVERRIDE,ruleName:e})),n}function fc(e,t,r,n=[]){let i=[],o=Ts(t.definition);if(X(o))return[];{let a=e.name;ke(o,e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:Ge.LEFT_RECURSION,ruleName:a});let u=Hr(o,n.concat([e])),l=ct(u,c=>{let f=de(n);return f.push(c),fc(e,c,r,f)});return i.concat(l)}}function Ts(e){let t=[];if(X(e))return t;let r=We(e);if(r instanceof he)t.push(r.referencedRule);else if(r instanceof ge||r instanceof Ee||r instanceof Ne||r instanceof Le||r instanceof _e||r instanceof ue)t=t.concat(Ts(r.definition));else if(r instanceof Ie)t=qe(D(r.definition,o=>Ts(o.definition)));else if(!(r instanceof ie))throw Error("non exhaustive match");let n=vn(r),i=e.length>1;if(n&&i){let o=Oe(e);return t.concat(Ts(o))}else return t}var vo=class extends pt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};function Tx(e,t){let r=new vo;e.accept(r);let n=r.alternations;return ct(n,o=>{let a=kr(o.definition);return ct(a,(s,u)=>{let l=Es([s],[],Tr,1);return X(l)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:o,emptyChoiceIdx:u}),type:Ge.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:o.idx,alternative:u+1}]:[]})})}function Cx(e,t,r){let n=new vo;e.accept(n);let i=n.alternations;return i=Wr(i,a=>a.ignoreAmbiguities===!0),ct(i,a=>{let s=a.idx,u=a.maxLookahead||t,l=wo(s,e,u,a),c=J0(l,a,e,r),f=Q0(l,a,e,r);return c.concat(f)})}var cc=class extends pt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}};function X0(e,t){let r=new vo;e.accept(r);let n=r.alternations;return ct(n,o=>o.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:o}),type:Ge.TOO_MANY_ALTS,ruleName:e.name,occurrence:o.idx}]:[])}function wx(e,t,r){let n=[];return O(e,i=>{let o=new cc;i.accept(o);let a=o.allProductions;O(a,s=>{let u=ks(s),l=s.maxLookahead||t,c=s.idx,p=So(c,i,u,l)[0];if(X(qe(p))){let m=r.buildEmptyRepetitionError({topLevelRule:i,repetition:s});n.push({message:m,type:Ge.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function J0(e,t,r,n){let i=[],o=Ue(e,(s,u,l)=>(t.definition[l].ignoreAmbiguities===!0||O(u,c=>{let f=[l];O(e,(p,m)=>{l!==m&&As(p,c)&&t.definition[m].ignoreAmbiguities!==!0&&f.push(m)}),f.length>1&&!As(i,c)&&(i.push(c),s.push({alts:f,path:c}))}),s),[]);return D(o,s=>{let u=D(s.alts,c=>c+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:u,prefixPath:s.path}),type:Ge.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:s.alts}})}function Q0(e,t,r,n){let i=Ue(e,(a,s,u)=>{let l=D(s,c=>({idx:u,path:c}));return a.concat(l)},[]);return nr(ct(i,a=>{if(t.definition[a.idx].ignoreAmbiguities===!0)return[];let u=a.idx,l=a.path,c=rt(i,p=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<u&&xx(p.path,l));return D(c,p=>{let m=[p.idx+1,u+1],h=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:m,prefixPath:p.path}),type:Ge.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:h,alternatives:m}})}))}function eF(e,t,r){let n=[],i=D(t,o=>o.name);return O(e,o=>{let a=o.name;if(ke(i,a)){let s=r.buildNamespaceConflictError(o);n.push({message:s,type:Ge.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),n}function Sx(e){let t=vi(e,{errMsgProvider:lx}),r={};return O(e.rules,n=>{r[n.name]=n}),cx(r,t.errMsgProvider)}function vx(e){return e=vi(e,{errMsgProvider:$t}),bx(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var _x="MismatchedTokenException",Ix="NoViableAltException",Rx="EarlyExitException",Dx="NotAllInputParsedException",Fx=[_x,Ix,Rx,Dx];Object.freeze(Fx);function Zr(e){return ke(Fx,e.name)}var Mi=class extends Error{constructor(t,r){super(t),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},On=class extends Mi{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=_x}},_o=class extends Mi{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Ix}},Io=class extends Mi{constructor(t,r){super(t,r),this.name=Dx}},Ro=class extends Mi{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Rx}};var pc={},dc="InRuleRecoveryException",mc=class extends Error{constructor(t){super(t),this.name=dc}},Cs=class{initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=N(t,"recoveryEnabled")?t.recoveryEnabled:mt.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=tF)}getTokenToInsert(t){let r=Fn(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,r,n,i){let o=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],u=!1,l=this.LA(1),c=this.LA(1),f=()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:p,ruleName:this.getCurrRuleFullName()}),h=new On(m,l,this.LA(0));h.resyncedTokens=kr(s),this.SAVE_ERROR(h)};for(;!u;)if(this.tokenMatcher(c,i)){f();return}else if(n.call(this)){f(),t.apply(this,r);return}else this.tokenMatcher(c,o)?u=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,r)))}getFollowsForInRuleRecovery(t,r){let n=this.getCurrentGrammarPath(t,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(t,r){if(this.canRecoverWithSingleTokenInsertion(t,r))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new mc("sad sad panda")}canPerformInRuleRecovery(t,r){return this.canRecoverWithSingleTokenInsertion(t,r)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,r){if(!this.canTokenTypeBeInsertedInRecovery(t)||X(r))return!1;let n=this.LA(1);return or(r,o=>this.tokenMatcher(n,o))!==void 0}canRecoverWithSingleTokenDeletion(t){return this.canTokenTypeBeDeletedInRecovery(t)?this.tokenMatcher(this.LA(2),t):!1}isInCurrentRuleReSyncSet(t){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return ke(n,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=or(t,o=>ic(r,o));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return pc;let t=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return D(t,(n,i)=>i===0?pc:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(t[i-1])})}flattenFollowSet(){let t=D(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return qe(t)}getFollowSetFromFollowKey(t){if(t===pc)return[jt];let r=t.ruleName+t.idxInCallingRule+as+t.inRule;return this.resyncFollows[r]}addToResyncTokens(t,r){return this.tokenMatcher(t,jt)||r.push(t),r}reSyncTo(t){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,t)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return kr(r)}attemptInRepetitionRecovery(t,r,n,i,o,a,s){}getCurrentGrammarPath(t,r){let n=this.getHumanReadableRuleStack(),i=de(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:t,lastTokOccurrence:r}}getHumanReadableRuleStack(){return D(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}};function tF(e,t,r,n,i,o,a){let s=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[s];if(u===void 0){let p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];u=new o(m,i).startWalking(),this.firstAfterRepMap[s]=u}let l=u.token,c=u.occurrence,f=u.isEndOfRule;this.RULE_STACK.length===1&&f&&l===void 0&&(l=jt,c=1),!(l===void 0||c===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,c,a)&&this.tryInRepetitionRecovery(e,t,r,l)}function ws(e,t,r){return r|t|e}var Do=class{constructor(t){var r;this.maxLookahead=(r=t?.maxLookahead)!==null&&r!==void 0?r:mt.maxLookahead}validate(t){let r=this.validateNoLeftRecursion(t.rules);if(X(r)){let n=this.validateEmptyOrAlternatives(t.rules),i=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),o=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...r,...n,...i,...o]}return r}validateNoLeftRecursion(t){return ct(t,r=>fc(r,r,$t))}validateEmptyOrAlternatives(t){return ct(t,r=>Tx(r,$t))}validateAmbiguousAlternationAlternatives(t,r){return ct(t,n=>Cx(n,r,$t))}validateSomeNonEmptyLookaheadPath(t,r){return wx(t,r,$t)}buildLookaheadForAlternation(t){return px(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,dx)}buildLookaheadForOptional(t){return mx(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,ks(t.prodType),hx)}};var vs=class{initLooksAhead(t){this.dynamicTokensEnabled=N(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:mt.dynamicTokensEnabled,this.maxLookahead=N(t,"maxLookahead")?t.maxLookahead:mt.maxLookahead,this.lookaheadStrategy=N(t,"lookaheadStrategy")?t.lookaheadStrategy:new Do({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){O(t,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:o,repetitionMandatory:a,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:u}=rF(r);O(n,l=>{let c=l.idx===0?"":l.idx;this.TRACE_INIT(`${yt(l)}${c}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:r,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=ws(this.fullRuleNameToShort[r.name],256,l.idx);this.setLaFuncCache(p,f)})}),O(i,l=>{this.computeLookaheadFunc(r,l.idx,768,"Repetition",l.maxLookahead,yt(l))}),O(o,l=>{this.computeLookaheadFunc(r,l.idx,512,"Option",l.maxLookahead,yt(l))}),O(a,l=>{this.computeLookaheadFunc(r,l.idx,1024,"RepetitionMandatory",l.maxLookahead,yt(l))}),O(s,l=>{this.computeLookaheadFunc(r,l.idx,1536,"RepetitionMandatoryWithSeparator",l.maxLookahead,yt(l))}),O(u,l=>{this.computeLookaheadFunc(r,l.idx,1280,"RepetitionWithSeparator",l.maxLookahead,yt(l))})})})}computeLookaheadFunc(t,r,n,i,o,a){this.TRACE_INIT(`${a}${r===0?"":r}`,()=>{let s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:t,maxLookahead:o||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=ws(this.fullRuleNameToShort[t.name],n,r);this.setLaFuncCache(u,s)})}getKeyForAutomaticLookahead(t,r){let n=this.getLastExplicitRuleShortName();return ws(n,t,r)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,r){this.lookAheadFuncsCache.set(t,r)}},hc=class extends pt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},Ss=new hc;function rF(e){Ss.reset(),e.accept(Ss);let t=Ss.dslMethods;return Ss.reset(),t}function yc(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function Ec(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Ox(e,t,r){e.children[r]===void 0?e.children[r]=[t]:e.children[r].push(t)}function Nx(e,t,r){e.children[t]===void 0?e.children[t]=[r]:e.children[t].push(r)}var nF="name";function bc(e,t){Object.defineProperty(e,nF,{enumerable:!1,configurable:!0,writable:!1,value:t})}function iF(e,t){let r=pe(e),n=r.length;for(let i=0;i<n;i++){let o=r[i],a=e[o],s=a.length;for(let u=0;u<s;u++){let l=a[u];l.tokenTypeIdx===void 0&&this[l.name](l.children,t)}}}function Lx(e,t){let r=function(){};bc(r,e+"BaseSemantics");let n={visit:function(i,o){if(P(i)&&(i=i[0]),!nt(i))return this[i.name](i.children,o)},validateVisitor:function(){let i=oF(this,t);if(!X(i)){let o=D(i,a=>a.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
137
+ see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof ft?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function px(e,t){let r=new oc(e,t);return r.resolveRefs(),r.errors}var oc=class extends pt{constructor(t,r){super(),this.nameToTopRule=t,this.errMsgProvider=r,this.errors=[]}resolveRefs(){O(le(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){let r=this.nameToTopRule[t.nonTerminalName];if(r)t.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:Ge.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}};var ac=class extends Ar{constructor(t,r){super(),this.topProd=t,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=de(this.path.ruleStack).reverse(),this.occurrenceStack=de(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,r=[]){this.found||super.walk(t,r)}walkProdRef(t,r,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,i)}}updateExpectedNext(){X(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},hs=class extends ac{constructor(t,r){super(t,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,r,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),o=new ge({definition:i});this.possibleTokTypes=_n(o),this.found=!0}}},Pi=class extends Ar{constructor(t,r){super(),this.topRule=t,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},gs=class extends Pi{walkMany(t,r,n){if(t.idx===this.occurrence){let i=We(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(t,r,n)}},To=class extends Pi{walkManySep(t,r,n){if(t.idx===this.occurrence){let i=We(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(t,r,n)}},xs=class extends Pi{walkAtLeastOne(t,r,n){if(t.idx===this.occurrence){let i=We(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(t,r,n)}},Co=class extends Pi{walkAtLeastOneSep(t,r,n){if(t.idx===this.occurrence){let i=We(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof ie&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(t,r,n)}};function ys(e,t,r=[]){r=de(r);let n=[],i=0;function o(s){return s.concat(Oe(e,i+1))}function a(s){let u=ys(o(s),t,r);return n.concat(u)}for(;r.length<t&&i<e.length;){let s=e[i];if(s instanceof ge)return a(s.definition);if(s instanceof he)return a(s.definition);if(s instanceof Ee)n=a(s.definition);else if(s instanceof Ne){let u=s.definition.concat([new ue({definition:s.definition})]);return a(u)}else if(s instanceof Le){let u=[new ge({definition:s.definition}),new ue({definition:[new ie({terminalType:s.separator})].concat(s.definition)})];return a(u)}else if(s instanceof _e){let u=s.definition.concat([new ue({definition:[new ie({terminalType:s.separator})].concat(s.definition)})]);n=a(u)}else if(s instanceof ue){let u=s.definition.concat([new ue({definition:s.definition})]);n=a(u)}else{if(s instanceof Ie)return O(s.definition,u=>{X(u.definition)===!1&&(n=a(u.definition))}),n;if(s instanceof ie)r.push(s.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:Oe(e,i)}),n}function Es(e,t,r,n){let i="EXIT_NONE_TERMINAL",o=[i],a="EXIT_ALTERNATIVE",s=!1,u=t.length,l=u-n-1,c=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!X(f);){let p=f.pop();if(p===a){s&&ir(f).idx<=l&&f.pop();continue}let m=p.def,h=p.idx,E=p.ruleStack,C=p.occurrenceStack;if(X(m))continue;let x=m[0];if(x===i){let k={idx:h,def:Oe(m),ruleStack:kr(E),occurrenceStack:kr(C)};f.push(k)}else if(x instanceof ie)if(h<u-1){let k=h+1,y=t[k];if(r(y,x.terminalType)){let S={idx:k,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(S)}}else if(h===u-1)c.push({nextTokenType:x.terminalType,nextTokenOccurrence:x.idx,ruleStack:E,occurrenceStack:C}),s=!0;else throw Error("non exhaustive match");else if(x instanceof he){let k=de(E);k.push(x.nonTerminalName);let y=de(C);y.push(x.idx);let S={idx:h,def:x.definition.concat(o,Oe(m)),ruleStack:k,occurrenceStack:y};f.push(S)}else if(x instanceof Ee){let k={idx:h,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y={idx:h,def:x.definition.concat(Oe(m)),ruleStack:E,occurrenceStack:C};f.push(y)}else if(x instanceof Ne){let k=new ue({definition:x.definition,idx:x.idx}),y=x.definition.concat([k],Oe(m)),S={idx:h,def:y,ruleStack:E,occurrenceStack:C};f.push(S)}else if(x instanceof Le){let k=new ie({terminalType:x.separator}),y=new ue({definition:[k].concat(x.definition),idx:x.idx}),S=x.definition.concat([y],Oe(m)),v={idx:h,def:S,ruleStack:E,occurrenceStack:C};f.push(v)}else if(x instanceof _e){let k={idx:h,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y=new ie({terminalType:x.separator}),S=new ue({definition:[y].concat(x.definition),idx:x.idx}),v=x.definition.concat([S],Oe(m)),A={idx:h,def:v,ruleStack:E,occurrenceStack:C};f.push(A)}else if(x instanceof ue){let k={idx:h,def:Oe(m),ruleStack:E,occurrenceStack:C};f.push(k),f.push(a);let y=new ue({definition:x.definition,idx:x.idx}),S=x.definition.concat([y],Oe(m)),v={idx:h,def:S,ruleStack:E,occurrenceStack:C};f.push(v)}else if(x instanceof Ie)for(let k=x.definition.length-1;k>=0;k--){let y=x.definition[k],S={idx:h,def:y.definition.concat(Oe(m)),ruleStack:E,occurrenceStack:C};f.push(S),f.push(a)}else if(x instanceof ge)f.push({idx:h,def:x.definition.concat(Oe(m)),ruleStack:E,occurrenceStack:C});else if(x instanceof ft)f.push(Y0(x,h,E,C));else throw Error("non exhaustive match")}return c}function Y0(e,t,r,n){let i=de(r);i.push(e.name);let o=de(n);return o.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:o}}var Se;(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(Se||(Se={}));function ks(e){if(e instanceof Ee||e==="Option")return Se.OPTION;if(e instanceof ue||e==="Repetition")return Se.REPETITION;if(e instanceof Ne||e==="RepetitionMandatory")return Se.REPETITION_MANDATORY;if(e instanceof Le||e==="RepetitionMandatoryWithSeparator")return Se.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof _e||e==="RepetitionWithSeparator")return Se.REPETITION_WITH_SEPARATOR;if(e instanceof Ie||e==="Alternation")return Se.ALTERNATION;throw Error("non exhaustive match")}function dx(e,t,r,n,i,o){let a=wo(e,t,r),s=bx(a)?Li:Tr;return o(a,n,s,i)}function hx(e,t,r,n,i,o){let a=So(e,t,i,r),s=bx(a)?Li:Tr;return o(a[0],s,n)}function gx(e,t,r,n){let i=e.length,o=tt(e,a=>tt(a,s=>s.length===1));if(t)return function(a){let s=D(a,u=>u.GATE);for(let u=0;u<i;u++){let l=e[u],c=l.length,f=s[u];if(!(f!==void 0&&f.call(this)===!1))e:for(let p=0;p<c;p++){let m=l[p],h=m.length;for(let E=0;E<h;E++){let C=this.LA(E+1);if(r(C,m[E])===!1)continue e}return u}}};if(o&&!n){let a=D(e,u=>qe(u)),s=Ue(a,(u,l,c)=>(O(l,f=>{N(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=c),O(f.categoryMatches,p=>{N(u,p)||(u[p]=c)})}),u),{});return function(){let u=this.LA(1);return s[u.tokenTypeIdx]}}else return function(){for(let a=0;a<i;a++){let s=e[a],u=s.length;e:for(let l=0;l<u;l++){let c=s[l],f=c.length;for(let p=0;p<f;p++){let m=this.LA(p+1);if(r(m,c[p])===!1)continue e}return a}}}}function xx(e,t,r){let n=tt(e,o=>o.length===1),i=e.length;if(n&&!r){let o=qe(e);if(o.length===1&&X(o[0].categoryMatches)){let s=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}else{let a=Ue(o,(s,u,l)=>(s[u.tokenTypeIdx]=!0,O(u.categoryMatches,c=>{s[c]=!0}),s),[]);return function(){let s=this.LA(1);return a[s.tokenTypeIdx]===!0}}}else return function(){e:for(let o=0;o<i;o++){let a=e[o],s=a.length;for(let u=0;u<s;u++){let l=this.LA(u+1);if(t(l,a[u])===!1)continue e}return!0}return!1}}var uc=class extends Ar{constructor(t,r,n){super(),this.topProd=t,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,r,n,i){return t.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(t,r,n){this.checkIsTarget(t,Se.OPTION,r,n)||super.walkOption(t,r,n)}walkAtLeastOne(t,r,n){this.checkIsTarget(t,Se.REPETITION_MANDATORY,r,n)||super.walkOption(t,r,n)}walkAtLeastOneSep(t,r,n){this.checkIsTarget(t,Se.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}walkMany(t,r,n){this.checkIsTarget(t,Se.REPETITION,r,n)||super.walkOption(t,r,n)}walkManySep(t,r,n){this.checkIsTarget(t,Se.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}},bs=class extends pt{constructor(t,r,n){super(),this.targetOccurrence=t,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(t,r){t.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||t===this.targetRef)&&(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,Se.OPTION)}visitRepetition(t){this.checkIsTarget(t,Se.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Se.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Se.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Se.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Se.ALTERNATION)}};function mx(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}function sc(e){let t=[""];for(let r=0;r<e.length;r++){let n=e[r],i=[];for(let o=0;o<t.length;o++){let a=t[o];i.push(a+"_"+n.tokenTypeIdx);for(let s=0;s<n.categoryMatches.length;s++){let u="_"+n.categoryMatches[s];i.push(a+u)}}t=i}return t}function X0(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;let i=e[n];for(let o=0;o<t.length;o++){let a=t[o];if(i[a]===!0)return!1}}return!0}function yx(e,t){let r=D(e,a=>ys([a],1)),n=mx(r.length),i=D(r,a=>{let s={};return O(a,u=>{let l=sc(u.partialPath);O(l,c=>{s[c]=!0})}),s}),o=r;for(let a=1;a<=t;a++){let s=o;o=mx(s.length);for(let u=0;u<s.length;u++){let l=s[u];for(let c=0;c<l.length;c++){let f=l[c].partialPath,p=l[c].suffixDef,m=sc(f);if(X0(i,m,u)||X(p)||f.length===t){let E=n[u];if(As(E,f)===!1){E.push(f);for(let C=0;C<m.length;C++){let x=m[C];i[u][x]=!0}}}else{let E=ys(p,a+1,f);o[u]=o[u].concat(E),O(E,C=>{let x=sc(C.partialPath);O(x,k=>{i[u][k]=!0})})}}}}return n}function wo(e,t,r,n){let i=new bs(e,Se.ALTERNATION,n);return t.accept(i),yx(i.result,r)}function So(e,t,r,n){let i=new bs(e,r);t.accept(i);let o=i.result,s=new uc(t,e,r).startWalking(),u=new ge({definition:o}),l=new ge({definition:s});return yx([u,l],n)}function As(e,t){e:for(let r=0;r<e.length;r++){let n=e[r];if(n.length===t.length){for(let i=0;i<n.length;i++){let o=t[i],a=n[i];if((o===a||a.categoryMatchesMap[o.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function Ex(e,t){return e.length<t.length&&tt(e,(r,n)=>{let i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function bx(e){return tt(e,t=>tt(t,r=>tt(r,n=>X(n.categoryMatches))))}function kx(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return D(t,r=>Object.assign({type:Ge.CUSTOM_LOOKAHEAD_VALIDATION},r))}function Ax(e,t,r,n){let i=ct(e,u=>J0(u,r)),o=iF(e,t,r),a=ct(e,u=>tF(u,r)),s=ct(e,u=>eF(u,e,n,r));return i.concat(o,a,s)}function J0(e,t){let r=new lc;e.accept(r);let n=r.allProductions,i=Vl(n,Q0),o=xt(i,s=>s.length>1);return D(le(o),s=>{let u=We(s),l=t.buildDuplicateFoundError(e,s),c=yt(u),f={message:l,type:Ge.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:c,occurrence:u.idx},p=Tx(u);return p&&(f.parameter=p),f})}function Q0(e){return`${yt(e)}_#_${e.idx}_#_${Tx(e)}`}function Tx(e){return e instanceof ie?e.terminalType.name:e instanceof he?e.nonTerminalName:""}var lc=class extends pt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}};function eF(e,t,r,n){let i=[];if(Ue(t,(a,s)=>s.name===e.name?a+1:a,0)>1){let a=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:a,type:Ge.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function Cx(e,t,r){let n=[],i;return ke(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Ge.INVALID_RULE_OVERRIDE,ruleName:e})),n}function fc(e,t,r,n=[]){let i=[],o=Ts(t.definition);if(X(o))return[];{let a=e.name;ke(o,e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:Ge.LEFT_RECURSION,ruleName:a});let u=Hr(o,n.concat([e])),l=ct(u,c=>{let f=de(n);return f.push(c),fc(e,c,r,f)});return i.concat(l)}}function Ts(e){let t=[];if(X(e))return t;let r=We(e);if(r instanceof he)t.push(r.referencedRule);else if(r instanceof ge||r instanceof Ee||r instanceof Ne||r instanceof Le||r instanceof _e||r instanceof ue)t=t.concat(Ts(r.definition));else if(r instanceof Ie)t=qe(D(r.definition,o=>Ts(o.definition)));else if(!(r instanceof ie))throw Error("non exhaustive match");let n=vn(r),i=e.length>1;if(n&&i){let o=Oe(e);return t.concat(Ts(o))}else return t}var vo=class extends pt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};function wx(e,t){let r=new vo;e.accept(r);let n=r.alternations;return ct(n,o=>{let a=kr(o.definition);return ct(a,(s,u)=>{let l=Es([s],[],Tr,1);return X(l)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:o,emptyChoiceIdx:u}),type:Ge.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:o.idx,alternative:u+1}]:[]})})}function Sx(e,t,r){let n=new vo;e.accept(n);let i=n.alternations;return i=Wr(i,a=>a.ignoreAmbiguities===!0),ct(i,a=>{let s=a.idx,u=a.maxLookahead||t,l=wo(s,e,u,a),c=rF(l,a,e,r),f=nF(l,a,e,r);return c.concat(f)})}var cc=class extends pt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}};function tF(e,t){let r=new vo;e.accept(r);let n=r.alternations;return ct(n,o=>o.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:o}),type:Ge.TOO_MANY_ALTS,ruleName:e.name,occurrence:o.idx}]:[])}function vx(e,t,r){let n=[];return O(e,i=>{let o=new cc;i.accept(o);let a=o.allProductions;O(a,s=>{let u=ks(s),l=s.maxLookahead||t,c=s.idx,p=So(c,i,u,l)[0];if(X(qe(p))){let m=r.buildEmptyRepetitionError({topLevelRule:i,repetition:s});n.push({message:m,type:Ge.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function rF(e,t,r,n){let i=[],o=Ue(e,(s,u,l)=>(t.definition[l].ignoreAmbiguities===!0||O(u,c=>{let f=[l];O(e,(p,m)=>{l!==m&&As(p,c)&&t.definition[m].ignoreAmbiguities!==!0&&f.push(m)}),f.length>1&&!As(i,c)&&(i.push(c),s.push({alts:f,path:c}))}),s),[]);return D(o,s=>{let u=D(s.alts,c=>c+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:u,prefixPath:s.path}),type:Ge.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:s.alts}})}function nF(e,t,r,n){let i=Ue(e,(a,s,u)=>{let l=D(s,c=>({idx:u,path:c}));return a.concat(l)},[]);return nr(ct(i,a=>{if(t.definition[a.idx].ignoreAmbiguities===!0)return[];let u=a.idx,l=a.path,c=rt(i,p=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<u&&Ex(p.path,l));return D(c,p=>{let m=[p.idx+1,u+1],h=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:m,prefixPath:p.path}),type:Ge.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:h,alternatives:m}})}))}function iF(e,t,r){let n=[],i=D(t,o=>o.name);return O(e,o=>{let a=o.name;if(ke(i,a)){let s=r.buildNamespaceConflictError(o);n.push({message:s,type:Ge.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),n}function _x(e){let t=vi(e,{errMsgProvider:fx}),r={};return O(e.rules,n=>{r[n.name]=n}),px(r,t.errMsgProvider)}function Ix(e){return e=vi(e,{errMsgProvider:$t}),Ax(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var Rx="MismatchedTokenException",Dx="NoViableAltException",Fx="EarlyExitException",Ox="NotAllInputParsedException",Nx=[Rx,Dx,Fx,Ox];Object.freeze(Nx);function Zr(e){return ke(Nx,e.name)}var Mi=class extends Error{constructor(t,r){super(t),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},On=class extends Mi{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Rx}},_o=class extends Mi{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Dx}},Io=class extends Mi{constructor(t,r){super(t,r),this.name=Ox}},Ro=class extends Mi{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Fx}};var pc={},dc="InRuleRecoveryException",mc=class extends Error{constructor(t){super(t),this.name=dc}},Cs=class{initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=N(t,"recoveryEnabled")?t.recoveryEnabled:mt.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=oF)}getTokenToInsert(t){let r=Fn(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,r,n,i){let o=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],u=!1,l=this.LA(1),c=this.LA(1),f=()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:p,ruleName:this.getCurrRuleFullName()}),h=new On(m,l,this.LA(0));h.resyncedTokens=kr(s),this.SAVE_ERROR(h)};for(;!u;)if(this.tokenMatcher(c,i)){f();return}else if(n.call(this)){f(),t.apply(this,r);return}else this.tokenMatcher(c,o)?u=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,r)))}getFollowsForInRuleRecovery(t,r){let n=this.getCurrentGrammarPath(t,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(t,r){if(this.canRecoverWithSingleTokenInsertion(t,r))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new mc("sad sad panda")}canPerformInRuleRecovery(t,r){return this.canRecoverWithSingleTokenInsertion(t,r)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,r){if(!this.canTokenTypeBeInsertedInRecovery(t)||X(r))return!1;let n=this.LA(1);return or(r,o=>this.tokenMatcher(n,o))!==void 0}canRecoverWithSingleTokenDeletion(t){return this.canTokenTypeBeDeletedInRecovery(t)?this.tokenMatcher(this.LA(2),t):!1}isInCurrentRuleReSyncSet(t){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return ke(n,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=or(t,o=>ic(r,o));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return pc;let t=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return D(t,(n,i)=>i===0?pc:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(t[i-1])})}flattenFollowSet(){let t=D(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return qe(t)}getFollowSetFromFollowKey(t){if(t===pc)return[jt];let r=t.ruleName+t.idxInCallingRule+as+t.inRule;return this.resyncFollows[r]}addToResyncTokens(t,r){return this.tokenMatcher(t,jt)||r.push(t),r}reSyncTo(t){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,t)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return kr(r)}attemptInRepetitionRecovery(t,r,n,i,o,a,s){}getCurrentGrammarPath(t,r){let n=this.getHumanReadableRuleStack(),i=de(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:t,lastTokOccurrence:r}}getHumanReadableRuleStack(){return D(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}};function oF(e,t,r,n,i,o,a){let s=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[s];if(u===void 0){let p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];u=new o(m,i).startWalking(),this.firstAfterRepMap[s]=u}let l=u.token,c=u.occurrence,f=u.isEndOfRule;this.RULE_STACK.length===1&&f&&l===void 0&&(l=jt,c=1),!(l===void 0||c===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,c,a)&&this.tryInRepetitionRecovery(e,t,r,l)}function ws(e,t,r){return r|t|e}var Do=class{constructor(t){var r;this.maxLookahead=(r=t?.maxLookahead)!==null&&r!==void 0?r:mt.maxLookahead}validate(t){let r=this.validateNoLeftRecursion(t.rules);if(X(r)){let n=this.validateEmptyOrAlternatives(t.rules),i=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),o=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...r,...n,...i,...o]}return r}validateNoLeftRecursion(t){return ct(t,r=>fc(r,r,$t))}validateEmptyOrAlternatives(t){return ct(t,r=>wx(r,$t))}validateAmbiguousAlternationAlternatives(t,r){return ct(t,n=>Sx(n,r,$t))}validateSomeNonEmptyLookaheadPath(t,r){return vx(t,r,$t)}buildLookaheadForAlternation(t){return dx(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,gx)}buildLookaheadForOptional(t){return hx(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,ks(t.prodType),xx)}};var vs=class{initLooksAhead(t){this.dynamicTokensEnabled=N(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:mt.dynamicTokensEnabled,this.maxLookahead=N(t,"maxLookahead")?t.maxLookahead:mt.maxLookahead,this.lookaheadStrategy=N(t,"lookaheadStrategy")?t.lookaheadStrategy:new Do({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){O(t,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:o,repetitionMandatory:a,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:u}=aF(r);O(n,l=>{let c=l.idx===0?"":l.idx;this.TRACE_INIT(`${yt(l)}${c}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:r,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=ws(this.fullRuleNameToShort[r.name],256,l.idx);this.setLaFuncCache(p,f)})}),O(i,l=>{this.computeLookaheadFunc(r,l.idx,768,"Repetition",l.maxLookahead,yt(l))}),O(o,l=>{this.computeLookaheadFunc(r,l.idx,512,"Option",l.maxLookahead,yt(l))}),O(a,l=>{this.computeLookaheadFunc(r,l.idx,1024,"RepetitionMandatory",l.maxLookahead,yt(l))}),O(s,l=>{this.computeLookaheadFunc(r,l.idx,1536,"RepetitionMandatoryWithSeparator",l.maxLookahead,yt(l))}),O(u,l=>{this.computeLookaheadFunc(r,l.idx,1280,"RepetitionWithSeparator",l.maxLookahead,yt(l))})})})}computeLookaheadFunc(t,r,n,i,o,a){this.TRACE_INIT(`${a}${r===0?"":r}`,()=>{let s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:t,maxLookahead:o||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=ws(this.fullRuleNameToShort[t.name],n,r);this.setLaFuncCache(u,s)})}getKeyForAutomaticLookahead(t,r){let n=this.getLastExplicitRuleShortName();return ws(n,t,r)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,r){this.lookAheadFuncsCache.set(t,r)}},hc=class extends pt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},Ss=new hc;function aF(e){Ss.reset(),e.accept(Ss);let t=Ss.dslMethods;return Ss.reset(),t}function yc(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function Ec(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Lx(e,t,r){e.children[r]===void 0?e.children[r]=[t]:e.children[r].push(t)}function Px(e,t,r){e.children[t]===void 0?e.children[t]=[r]:e.children[t].push(r)}var sF="name";function bc(e,t){Object.defineProperty(e,sF,{enumerable:!1,configurable:!0,writable:!1,value:t})}function uF(e,t){let r=pe(e),n=r.length;for(let i=0;i<n;i++){let o=r[i],a=e[o],s=a.length;for(let u=0;u<s;u++){let l=a[u];l.tokenTypeIdx===void 0&&this[l.name](l.children,t)}}}function Mx(e,t){let r=function(){};bc(r,e+"BaseSemantics");let n={visit:function(i,o){if(P(i)&&(i=i[0]),!nt(i))return this[i.name](i.children,o)},validateVisitor:function(){let i=lF(this,t);if(!X(i)){let o=D(i,a=>a.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
137
138
  ${o.join(`
138
139
 
139
140
  `).replace(/\n/g,`
140
- `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function Px(e,t,r){let n=function(){};bc(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return O(t,o=>{i[o]=iF}),n.prototype=i,n.prototype.constructor=n,n}var kc;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(kc||(kc={}));function oF(e,t){return aF(e,t)}function aF(e,t){let r=rt(t,i=>lt(e[i])===!1),n=D(r,i=>({msg:`Missing visitor method: <${i}> on ${e.constructor.name} CST Visitor.`,type:kc.MISSING_METHOD,methodName:i}));return nr(n)}var Ds=class{initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=N(t,"nodeLocationTracking")?t.nodeLocationTracking:mt.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=we,this.cstFinallyStateUpdate=we,this.cstPostTerminal=we,this.cstPostNonTerminal=we,this.cstPostRule=we;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ec,this.setNodeLocationFromNode=Ec,this.cstPostRule=we,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=we,this.setNodeLocationFromNode=we,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=yc,this.setNodeLocationFromNode=yc,this.cstPostRule=we,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=we,this.setNodeLocationFromNode=we,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=we,this.setNodeLocationFromNode=we,this.cstPostRule=we,this.setInitialNodeLocation=we;else throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){let r=this.LA(1);t.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){let r={name:t,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){let r=this.LA(0),n=t.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(t){let r=this.LA(0),n=t.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];Ox(n,r,t),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];Nx(n,r,t),this.setNodeLocationFromNode(n.location,t.location)}getBaseCstVisitorConstructor(){if(nt(this.baseCstVisitorConstructor)){let t=Lx(this.className,pe(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(nt(this.baseCstVisitorWithDefaultsConstructor)){let t=Px(this.className,pe(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){let t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}};var Fs=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Bi}LA(t){let r=this.currIdx+t;return r<0||this.tokVectorLength<=r?Bi:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}};var Os=class{ACTION(t){return t.call(this)}consume(t,r,n){return this.consumeInternal(r,t,n)}subrule(t,r,n){return this.subruleInternal(r,t,n)}option(t,r){return this.optionInternal(r,t)}or(t,r){return this.orInternal(r,t)}many(t,r){return this.manyInternal(t,r)}atLeastOne(t,r){return this.atLeastOneInternal(t,r)}CONSUME(t,r){return this.consumeInternal(t,0,r)}CONSUME1(t,r){return this.consumeInternal(t,1,r)}CONSUME2(t,r){return this.consumeInternal(t,2,r)}CONSUME3(t,r){return this.consumeInternal(t,3,r)}CONSUME4(t,r){return this.consumeInternal(t,4,r)}CONSUME5(t,r){return this.consumeInternal(t,5,r)}CONSUME6(t,r){return this.consumeInternal(t,6,r)}CONSUME7(t,r){return this.consumeInternal(t,7,r)}CONSUME8(t,r){return this.consumeInternal(t,8,r)}CONSUME9(t,r){return this.consumeInternal(t,9,r)}SUBRULE(t,r){return this.subruleInternal(t,0,r)}SUBRULE1(t,r){return this.subruleInternal(t,1,r)}SUBRULE2(t,r){return this.subruleInternal(t,2,r)}SUBRULE3(t,r){return this.subruleInternal(t,3,r)}SUBRULE4(t,r){return this.subruleInternal(t,4,r)}SUBRULE5(t,r){return this.subruleInternal(t,5,r)}SUBRULE6(t,r){return this.subruleInternal(t,6,r)}SUBRULE7(t,r){return this.subruleInternal(t,7,r)}SUBRULE8(t,r){return this.subruleInternal(t,8,r)}SUBRULE9(t,r){return this.subruleInternal(t,9,r)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,r,n=Ui){if(ke(this.definedRulesNames,t)){let a={message:$t.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Ge.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(a)}this.definedRulesNames.push(t);let i=this.defineRule(t,r,n);return this[t]=i,i}OVERRIDE_RULE(t,r,n=Ui){let i=Ax(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let o=this.defineRule(t,r,n);return this[t]=o,o}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return t.apply(this,r),!0}catch(i){if(Zr(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return os(le(this.gastProductionsCache))}};var Ns=class{initRecognizerEngine(t,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Li,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},N(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
141
+ `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function Bx(e,t,r){let n=function(){};bc(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return O(t,o=>{i[o]=uF}),n.prototype=i,n.prototype.constructor=n,n}var kc;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(kc||(kc={}));function lF(e,t){return cF(e,t)}function cF(e,t){let r=rt(t,i=>lt(e[i])===!1),n=D(r,i=>({msg:`Missing visitor method: <${i}> on ${e.constructor.name} CST Visitor.`,type:kc.MISSING_METHOD,methodName:i}));return nr(n)}var Ds=class{initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=N(t,"nodeLocationTracking")?t.nodeLocationTracking:mt.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=we,this.cstFinallyStateUpdate=we,this.cstPostTerminal=we,this.cstPostNonTerminal=we,this.cstPostRule=we;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ec,this.setNodeLocationFromNode=Ec,this.cstPostRule=we,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=we,this.setNodeLocationFromNode=we,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=yc,this.setNodeLocationFromNode=yc,this.cstPostRule=we,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=we,this.setNodeLocationFromNode=we,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=we,this.setNodeLocationFromNode=we,this.cstPostRule=we,this.setInitialNodeLocation=we;else throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){let r=this.LA(1);t.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){let r={name:t,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){let r=this.LA(0),n=t.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(t){let r=this.LA(0),n=t.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];Lx(n,r,t),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];Px(n,r,t),this.setNodeLocationFromNode(n.location,t.location)}getBaseCstVisitorConstructor(){if(nt(this.baseCstVisitorConstructor)){let t=Mx(this.className,pe(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(nt(this.baseCstVisitorWithDefaultsConstructor)){let t=Bx(this.className,pe(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){let t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}};var Fs=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Bi}LA(t){let r=this.currIdx+t;return r<0||this.tokVectorLength<=r?Bi:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}};var Os=class{ACTION(t){return t.call(this)}consume(t,r,n){return this.consumeInternal(r,t,n)}subrule(t,r,n){return this.subruleInternal(r,t,n)}option(t,r){return this.optionInternal(r,t)}or(t,r){return this.orInternal(r,t)}many(t,r){return this.manyInternal(t,r)}atLeastOne(t,r){return this.atLeastOneInternal(t,r)}CONSUME(t,r){return this.consumeInternal(t,0,r)}CONSUME1(t,r){return this.consumeInternal(t,1,r)}CONSUME2(t,r){return this.consumeInternal(t,2,r)}CONSUME3(t,r){return this.consumeInternal(t,3,r)}CONSUME4(t,r){return this.consumeInternal(t,4,r)}CONSUME5(t,r){return this.consumeInternal(t,5,r)}CONSUME6(t,r){return this.consumeInternal(t,6,r)}CONSUME7(t,r){return this.consumeInternal(t,7,r)}CONSUME8(t,r){return this.consumeInternal(t,8,r)}CONSUME9(t,r){return this.consumeInternal(t,9,r)}SUBRULE(t,r){return this.subruleInternal(t,0,r)}SUBRULE1(t,r){return this.subruleInternal(t,1,r)}SUBRULE2(t,r){return this.subruleInternal(t,2,r)}SUBRULE3(t,r){return this.subruleInternal(t,3,r)}SUBRULE4(t,r){return this.subruleInternal(t,4,r)}SUBRULE5(t,r){return this.subruleInternal(t,5,r)}SUBRULE6(t,r){return this.subruleInternal(t,6,r)}SUBRULE7(t,r){return this.subruleInternal(t,7,r)}SUBRULE8(t,r){return this.subruleInternal(t,8,r)}SUBRULE9(t,r){return this.subruleInternal(t,9,r)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,r,n=Ui){if(ke(this.definedRulesNames,t)){let a={message:$t.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Ge.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(a)}this.definedRulesNames.push(t);let i=this.defineRule(t,r,n);return this[t]=i,i}OVERRIDE_RULE(t,r,n=Ui){let i=Cx(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let o=this.defineRule(t,r,n);return this[t]=o,o}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return t.apply(this,r),!0}catch(i){if(Zr(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return os(le(this.gastProductionsCache))}};var Ns=class{initRecognizerEngine(t,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Li,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},N(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
141
142
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
142
143
  For Further details.`);if(P(t)){if(X(t))throw Error(`A Token Vocabulary cannot be empty.
143
144
  Note that the first argument for the parser constructor
144
145
  is no longer a Token vector (since v4.0).`);if(typeof t[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
145
146
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
146
- For Further details.`)}if(P(t))this.tokensMap=Ue(t,(o,a)=>(o[a.name]=a,o),{});else if(N(t,"modes")&&tt(qe(le(t.modes)),ex)){let o=qe(le(t.modes)),a=_i(o);this.tokensMap=Ue(a,(s,u)=>(s[u.name]=u,s),{})}else if(Ce(t))this.tokensMap=de(t);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=jt;let n=N(t,"modes")?qe(le(t.modes)):le(t),i=tt(n,o=>X(o.categoryMatches));this.tokenMatcher=i?Li:Tr,Cr(le(this.tokensMap))}defineRule(t,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called'
147
- Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=N(n,"resyncEnabled")?n.resyncEnabled:Ui.resyncEnabled,o=N(n,"recoveryValueFunc")?n.recoveryValueFunc:Ui.recoveryValueFunc,a=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=t,this.fullRuleNameToShort[t]=a;let s;return this.outputCst===!0?s=function(...c){try{this.ruleInvocationStateUpdate(a,t,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()}}:s=function(...c){try{return this.ruleInvocationStateUpdate(a,t,this.subruleIdx),r.apply(this,c)}catch(f){return this.invokeRuleCatch(f,i,o)}finally{this.ruleFinallyStateUpdate()}},Object.assign(s,{ruleName:t,originalGrammarAction:r})}invokeRuleCatch(t,r,n){let i=this.RULE_STACK.length===1,o=r&&!this.isBackTracking()&&this.recoveryEnabled;if(Zr(t)){let a=t;if(o){let s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))if(a.resyncedTokens=this.reSyncTo(s),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return n(t);else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,a.partialCstResult=u}throw a}}else{if(i)return this.moveToTerminatedState(),n(t);throw a}}else throw t}optionInternal(t,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(t,r,n)}optionInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof t!="function"){o=t.DEF;let a=t.GATE;if(a!==void 0){let s=i;i=()=>a.call(this)&&s.call(this)}}else o=t;if(i.call(this)===!0)return o.call(this)}atLeastOneInternal(t,r){let n=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,r,n)}atLeastOneInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let a=r.GATE;if(a!==void 0){let s=i;i=()=>a.call(this)&&s.call(this)}}else o=r;if(i.call(this)===!0){let a=this.doSingleRepetition(o);for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(o)}else throw this.raiseEarlyExitException(t,Se.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],i,1024,t,xs)}atLeastOneSepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,r,n)}atLeastOneSepFirstInternalLogic(t,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let s=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,s,i,Co],s,1536,t,Co)}else throw this.raiseEarlyExitException(t,Se.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(t,r){let n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,r,n)}manyInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let s=r.GATE;if(s!==void 0){let u=i;i=()=>s.call(this)&&u.call(this)}}else o=r;let a=!0;for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(o);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],i,768,t,gs,a)}manySepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,r,n)}manySepFirstInternalLogic(t,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let s=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,s,i,To],s,1280,t,To)}}repetitionSepSecondInternal(t,r,n,i,o){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,n,i,o],n,1536,t,o)}doSingleRepetition(t){let r=this.getLexerPosition();return t.call(this),this.getLexerPosition()>r}orInternal(t,r){let n=this.getKeyForAutomaticLookahead(256,r),i=P(t)?t:t.DEF,a=this.getLaFuncFromCache(n).call(this,i);if(a!==void 0)return i[a].ALT.call(this);this.raiseNoAltException(r,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let t=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Io(r,t))}}subruleInternal(t,r,n){let i;try{let o=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=t.apply(this,o),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:t.ruleName),i}catch(o){throw this.subruleInternalError(o,n,t.ruleName)}}subruleInternalError(t,r,n){throw Zr(t)&&t.partialCstResult!==void 0&&(this.cstPostNonTerminal(t.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete t.partialCstResult),t}consumeInternal(t,r,n){let i;try{let o=this.LA(1);this.tokenMatcher(o,t)===!0?(this.consumeToken(),i=o):this.consumeInternalError(t,o,n)}catch(o){i=this.consumeInternalRecovery(t,r,o)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:t.name,i),i}consumeInternalError(t,r,n){let i,o=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:r,previous:o,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new On(i,r,o))}consumeInternalRecovery(t,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(t,r);try{return this.tryInRuleRecovery(t,i)}catch(o){throw o.name===dc?n:o}}else throw n}saveRecogState(){let t=this.errors,r=de(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),jt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}};var Ls=class{initErrorHandler(t){this._errors=[],this.errorMessageProvider=N(t,"errorMessageProvider")?t.errorMessageProvider:mt.errorMessageProvider}SAVE_ERROR(t){if(Zr(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:de(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return de(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,r,n){let i=this.getCurrRuleFullName(),o=this.getGAstProductions()[i],s=So(t,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:s,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new Ro(l,this.LA(1),this.LA(0)))}raiseNoAltException(t,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],o=wo(t,i,this.maxLookahead),a=[];for(let l=1;l<=this.maxLookahead;l++)a.push(this.LA(l));let s=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:o,actual:a,previous:s,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new _o(u,this.LA(1),s))}};var Ps=class{initContentAssist(){}computeContentAssist(t,r){let n=this.gastProductionsCache[t];if(nt(n))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return Es([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){let r=We(t.ruleStack),i=this.getGAstProductions()[r];return new hs(i,t).startWalking()}};var Us={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Us);var Mx=!0,Bx=Math.pow(2,8)-1,zx=H({name:"RECORDING_PHASE_TOKEN",pattern:ee.NA});Cr([zx]);var jx=Fn(zx,`This IToken indicates the Parser is in Recording Phase
148
- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(jx);var uF={name:`This CSTNode indicates the Parser is in Recording Phase
147
+ For Further details.`)}if(P(t))this.tokensMap=Ue(t,(o,a)=>(o[a.name]=a,o),{});else if(N(t,"modes")&&tt(qe(le(t.modes)),rx)){let o=qe(le(t.modes)),a=_i(o);this.tokensMap=Ue(a,(s,u)=>(s[u.name]=u,s),{})}else if(Ce(t))this.tokensMap=de(t);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=jt;let n=N(t,"modes")?qe(le(t.modes)):le(t),i=tt(n,o=>X(o.categoryMatches));this.tokenMatcher=i?Li:Tr,Cr(le(this.tokensMap))}defineRule(t,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called'
148
+ Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=N(n,"resyncEnabled")?n.resyncEnabled:Ui.resyncEnabled,o=N(n,"recoveryValueFunc")?n.recoveryValueFunc:Ui.recoveryValueFunc,a=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=t,this.fullRuleNameToShort[t]=a;let s;return this.outputCst===!0?s=function(...c){try{this.ruleInvocationStateUpdate(a,t,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()}}:s=function(...c){try{return this.ruleInvocationStateUpdate(a,t,this.subruleIdx),r.apply(this,c)}catch(f){return this.invokeRuleCatch(f,i,o)}finally{this.ruleFinallyStateUpdate()}},Object.assign(s,{ruleName:t,originalGrammarAction:r})}invokeRuleCatch(t,r,n){let i=this.RULE_STACK.length===1,o=r&&!this.isBackTracking()&&this.recoveryEnabled;if(Zr(t)){let a=t;if(o){let s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))if(a.resyncedTokens=this.reSyncTo(s),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return n(t);else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,a.partialCstResult=u}throw a}}else{if(i)return this.moveToTerminatedState(),n(t);throw a}}else throw t}optionInternal(t,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(t,r,n)}optionInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof t!="function"){o=t.DEF;let a=t.GATE;if(a!==void 0){let s=i;i=()=>a.call(this)&&s.call(this)}}else o=t;if(i.call(this)===!0)return o.call(this)}atLeastOneInternal(t,r){let n=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,r,n)}atLeastOneInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let a=r.GATE;if(a!==void 0){let s=i;i=()=>a.call(this)&&s.call(this)}}else o=r;if(i.call(this)===!0){let a=this.doSingleRepetition(o);for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(o)}else throw this.raiseEarlyExitException(t,Se.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],i,1024,t,xs)}atLeastOneSepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,r,n)}atLeastOneSepFirstInternalLogic(t,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let s=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,s,i,Co],s,1536,t,Co)}else throw this.raiseEarlyExitException(t,Se.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(t,r){let n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,r,n)}manyInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let s=r.GATE;if(s!==void 0){let u=i;i=()=>s.call(this)&&u.call(this)}}else o=r;let a=!0;for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(o);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],i,768,t,gs,a)}manySepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,r,n)}manySepFirstInternalLogic(t,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let s=()=>this.tokenMatcher(this.LA(1),o);for(;this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,s,i,To],s,1280,t,To)}}repetitionSepSecondInternal(t,r,n,i,o){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,n,i,o],n,1536,t,o)}doSingleRepetition(t){let r=this.getLexerPosition();return t.call(this),this.getLexerPosition()>r}orInternal(t,r){let n=this.getKeyForAutomaticLookahead(256,r),i=P(t)?t:t.DEF,a=this.getLaFuncFromCache(n).call(this,i);if(a!==void 0)return i[a].ALT.call(this);this.raiseNoAltException(r,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let t=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Io(r,t))}}subruleInternal(t,r,n){let i;try{let o=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=t.apply(this,o),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:t.ruleName),i}catch(o){throw this.subruleInternalError(o,n,t.ruleName)}}subruleInternalError(t,r,n){throw Zr(t)&&t.partialCstResult!==void 0&&(this.cstPostNonTerminal(t.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete t.partialCstResult),t}consumeInternal(t,r,n){let i;try{let o=this.LA(1);this.tokenMatcher(o,t)===!0?(this.consumeToken(),i=o):this.consumeInternalError(t,o,n)}catch(o){i=this.consumeInternalRecovery(t,r,o)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:t.name,i),i}consumeInternalError(t,r,n){let i,o=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:r,previous:o,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new On(i,r,o))}consumeInternalRecovery(t,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(t,r);try{return this.tryInRuleRecovery(t,i)}catch(o){throw o.name===dc?n:o}}else throw n}saveRecogState(){let t=this.errors,r=de(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),jt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}};var Ls=class{initErrorHandler(t){this._errors=[],this.errorMessageProvider=N(t,"errorMessageProvider")?t.errorMessageProvider:mt.errorMessageProvider}SAVE_ERROR(t){if(Zr(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:de(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return de(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,r,n){let i=this.getCurrRuleFullName(),o=this.getGAstProductions()[i],s=So(t,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:s,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new Ro(l,this.LA(1),this.LA(0)))}raiseNoAltException(t,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],o=wo(t,i,this.maxLookahead),a=[];for(let l=1;l<=this.maxLookahead;l++)a.push(this.LA(l));let s=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:o,actual:a,previous:s,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new _o(u,this.LA(1),s))}};var Ps=class{initContentAssist(){}computeContentAssist(t,r){let n=this.gastProductionsCache[t];if(nt(n))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return Es([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){let r=We(t.ruleStack),i=this.getGAstProductions()[r];return new hs(i,t).startWalking()}};var Us={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Us);var Ux=!0,zx=Math.pow(2,8)-1,$x=H({name:"RECORDING_PHASE_TOKEN",pattern:ee.NA});Cr([$x]);var qx=Fn($x,`This IToken indicates the Parser is in Recording Phase
149
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(qx);var pF={name:`This CSTNode indicates the Parser is in Recording Phase
149
150
  See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Ms=class{initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let t=0;t<10;t++){let r=t>0?t:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,t,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,t,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,t)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,t)},this[`MANY${r}`]=function(n){this.manyInternalRecord(t,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(t,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(t,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(t,n)}}this.consume=function(t,r,n){return this.consumeInternalRecord(r,t,n)},this.subrule=function(t,r,n){return this.subruleInternalRecord(r,t,n)},this.option=function(t,r){return this.optionInternalRecord(r,t)},this.or=function(t,r){return this.orInternalRecord(r,t)},this.many=function(t,r){this.manyInternalRecord(t,r)},this.atLeastOne=function(t,r){this.atLeastOneInternalRecord(t,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 t=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete t[`CONSUME${n}`],delete t[`SUBRULE${n}`],delete t[`OPTION${n}`],delete t[`OR${n}`],delete t[`MANY${n}`],delete t[`MANY_SEP${n}`],delete t[`AT_LEAST_ONE${n}`],delete t[`AT_LEAST_ONE_SEP${n}`]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,r){return()=>!0}LA_RECORD(t){return Bi}topLevelRuleRecord(t,r){try{let n=new ft({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
150
151
  This error was thrown during the "grammar recording phase" For more info see:
151
- https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(t,r){return Oo.call(this,Ee,t,r)}atLeastOneInternalRecord(t,r){Oo.call(this,Ne,r,t)}atLeastOneSepFirstInternalRecord(t,r){Oo.call(this,Le,r,t,Mx)}manyInternalRecord(t,r){Oo.call(this,ue,r,t)}manySepFirstInternalRecord(t,r){Oo.call(this,_e,r,t,Mx)}orInternalRecord(t,r){return lF.call(this,t,r)}subruleInternalRecord(t,r,n){if(Bs(r),!t||N(t,"ruleName")===!1){let s=new Error(`<SUBRULE${Ux(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>
152
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=ir(this.recordingProdStack),o=t.ruleName,a=new he({idx:r,nonTerminalName:o,label:n?.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?uF:Us}consumeInternalRecord(t,r,n){if(Bs(r),!tc(t)){let a=new Error(`<CONSUME${Ux(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>
153
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let i=ir(this.recordingProdStack),o=new ie({idx:r,terminalType:t,label:n?.LABEL});return i.definition.push(o),jx}};function Oo(e,t,r,n=!1){Bs(r);let i=ir(this.recordingProdStack),o=lt(t)?t:t.DEF,a=new e({definition:[],idx:r});return n&&(a.separator=t.SEP),N(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),o.call(this),i.definition.push(a),this.recordingProdStack.pop(),Us}function lF(e,t){Bs(t);let r=ir(this.recordingProdStack),n=P(e)===!1,i=n===!1?e:e.DEF,o=new Ie({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});N(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD);let a=po(i,s=>lt(s.GATE));return o.hasPredicates=a,r.definition.push(o),O(i,s=>{let u=new ge({definition:[]});o.definition.push(u),N(s,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=s.IGNORE_AMBIGUITIES:N(s,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),s.ALT.call(this),this.recordingProdStack.pop()}),Us}function Ux(e){return e===0?"":`${e}`}function Bs(e){if(e<0||e>Bx){let t=new Error(`Invalid DSL Method idx value: <${e}>
154
- Idx value must be a none negative value smaller than ${Bx+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var zs=class{initPerformanceTracer(t){if(N(t,"traceInitPerf")){let r=t.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=mt.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${t}>`);let{time:i,value:o}=ho(r),a=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${t}> time: ${i}ms`),this.traceInitIndent--,o}else return r()}};function $x(e,t){t.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(e.prototype,i,o):e.prototype[i]=r.prototype[i]})})}var Bi=Fn(jt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Bi);var mt=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ds,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Ui=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0}),Ge;(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Ge||(Ge={}));var No=class e{static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{go(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),O(this.definedRulesNames,i=>{let a=this[i].originalGrammarAction,s;this.TRACE_INIT(`${i} Rule`,()=>{s=this.topLevelRuleRecord(i,a)}),this.gastProductionsCache[i]=s})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Sx({rules:le(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(X(n)&&this.skipValidations===!1){let i=vx({rules:le(this.gastProductionsCache),tokenTypes:le(this.tokensMap),errMsgProvider:$t,grammarName:r}),o=Ex({lookaheadStrategy:this.lookaheadStrategy,rules:le(this.gastProductionsCache),tokenTypes:le(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,o)}}),X(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=Ng(le(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:le(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(le(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!X(this.definitionErrors))throw t=D(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
152
+ https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(t,r){return Oo.call(this,Ee,t,r)}atLeastOneInternalRecord(t,r){Oo.call(this,Ne,r,t)}atLeastOneSepFirstInternalRecord(t,r){Oo.call(this,Le,r,t,Ux)}manyInternalRecord(t,r){Oo.call(this,ue,r,t)}manySepFirstInternalRecord(t,r){Oo.call(this,_e,r,t,Ux)}orInternalRecord(t,r){return mF.call(this,t,r)}subruleInternalRecord(t,r,n){if(Bs(r),!t||N(t,"ruleName")===!1){let s=new Error(`<SUBRULE${jx(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>
153
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=ir(this.recordingProdStack),o=t.ruleName,a=new he({idx:r,nonTerminalName:o,label:n?.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?pF:Us}consumeInternalRecord(t,r,n){if(Bs(r),!tc(t)){let a=new Error(`<CONSUME${jx(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>
154
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let i=ir(this.recordingProdStack),o=new ie({idx:r,terminalType:t,label:n?.LABEL});return i.definition.push(o),qx}};function Oo(e,t,r,n=!1){Bs(r);let i=ir(this.recordingProdStack),o=lt(t)?t:t.DEF,a=new e({definition:[],idx:r});return n&&(a.separator=t.SEP),N(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),o.call(this),i.definition.push(a),this.recordingProdStack.pop(),Us}function mF(e,t){Bs(t);let r=ir(this.recordingProdStack),n=P(e)===!1,i=n===!1?e:e.DEF,o=new Ie({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});N(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD);let a=po(i,s=>lt(s.GATE));return o.hasPredicates=a,r.definition.push(o),O(i,s=>{let u=new ge({definition:[]});o.definition.push(u),N(s,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=s.IGNORE_AMBIGUITIES:N(s,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),s.ALT.call(this),this.recordingProdStack.pop()}),Us}function jx(e){return e===0?"":`${e}`}function Bs(e){if(e<0||e>zx){let t=new Error(`Invalid DSL Method idx value: <${e}>
155
+ Idx value must be a none negative value smaller than ${zx+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var zs=class{initPerformanceTracer(t){if(N(t,"traceInitPerf")){let r=t.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=mt.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${t}>`);let{time:i,value:o}=ho(r),a=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${t}> time: ${i}ms`),this.traceInitIndent--,o}else return r()}};function Vx(e,t){t.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(e.prototype,i,o):e.prototype[i]=r.prototype[i]})})}var Bi=Fn(jt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Bi);var mt=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ds,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Ui=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0}),Ge;(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Ge||(Ge={}));var No=class e{static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{go(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),O(this.definedRulesNames,i=>{let a=this[i].originalGrammarAction,s;this.TRACE_INIT(`${i} Rule`,()=>{s=this.topLevelRuleRecord(i,a)}),this.gastProductionsCache[i]=s})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=_x({rules:le(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(X(n)&&this.skipValidations===!1){let i=Ix({rules:le(this.gastProductionsCache),tokenTypes:le(this.tokensMap),errMsgProvider:$t,grammarName:r}),o=kx({lookaheadStrategy:this.lookaheadStrategy,rules:le(this.gastProductionsCache),tokenTypes:le(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,o)}}),X(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=Pg(le(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:le(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(le(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!X(this.definitionErrors))throw t=D(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
155
156
  ${t.join(`
156
157
  -------------------------------
157
158
  `)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),N(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
158
159
  Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
159
160
  See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
160
- For further details.`);this.skipValidations=N(r,"skipValidations")?r.skipValidations:mt.skipValidations}};No.DEFER_DEFINITION_ERRORS_HANDLING=!1;$x(No,[Cs,vs,Ds,Fs,Ns,Os,Ls,Ps,Ms,zs]);var Nn=class extends No{constructor(t,r=mt){let n=de(r);n.outputCst=!0,super(t,n)}};var $s=H({name:"flag",pattern:/--[\w-_]+/}),wc=H({longer_alt:$s,name:"alias",pattern:/-[A-Za-z]/}),qx=H({group:ee.SKIPPED,name:"comma",pattern:/,/}),Vx=H({group:ee.SKIPPED,name:"dollar",pattern:/\$/}),js=H({group:ee.SKIPPED,name:"whiteSpace",pattern:/ /}),Gx=H({group:ee.SKIPPED,name:"newLine",pattern:/\n/}),Sc=H({name:"word",pattern:/\S+/}),Po=H({name:"argument",pattern:/(<\S+>|\[.+])/}),vc=H({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),Hx=H({group:ee.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),Wx=H({group:ee.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),_c=H({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),Ic=H({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),Rc=H({name:"rowDescription",pattern:/\w.+/}),Kx=H({group:ee.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),Zx=H({group:ee.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),fF=new ee({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[Hx,_c,vc,Gx,js],OPTIONS_MODE:[Zx,Ic],ROW_MODE:[Kx,wc,$s,qx,Po,Rc,js],USAGE_MODE:[Wx,Vx,Po,Sc,js]}}),pF=[$s,wc,qx,Vx,js,Gx,Sc,Po,vc,Hx,Wx,_c,Ic,Rc,Kx,Zx],Tc=class extends Nn{programHelp=this.RULE("programHelp",()=>{this.CONSUME(vc,{LABEL:"description"}),this.AT_LEAST_ONE(()=>{this.CONSUME(Sc,{LABEL:"commandName"})}),this.MANY(()=>{this.CONSUME(Po)}),this.OPTION(()=>{this.SUBRULE(this.optionsSection)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(_c),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Ic),this.MANY(()=>{this.OR([{ALT:()=>this.CONSUME(Po)},{ALT:()=>this.CONSUME(wc)},{ALT:()=>this.CONSUME($s)},{ALT:()=>this.CONSUME(Rc,{LABEL:"description"})}])})});constructor(){super(pF),this.performSelfAnalysis()}},Lo=new Tc,Cc=class extends Lo.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}programHelp(t){let{command:r,subcommand:n}=qs(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:r,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,subcommandName:n}}optionsSection(t){return t.sectionRow.map(r=>this.visit(r))}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),description:this.getString(t.description,!0),flags:this.getArray(t.flag)}}getString(t,r=!1){if(t!==void 0)return t.map(n=>r?this.clean(n.image):n.image).join(" ")}getArray(t){if(t!==void 0)return t.map(r=>r.image)}clean(t){return t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}},mF=new Cc;function Yx(e){let t=fF.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);Lo.input=t.tokens;let r=Lo.programHelp();if(Lo.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Lo.errors,void 0,2)}`);let n;try{n=mF.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 Nc=H({name:"flag",pattern:/--[\w-_]+/}),Lc=H({name:"alias",pattern:/-[A-Za-z]/}),Xx=H({group:ee.SKIPPED,name:"comma",pattern:/,/}),zi=H({name:"word",pattern:/\S+/}),Bo=H({name:"argument",pattern:/<\S+>|\[\S+]/}),Pc=H({name:"type",pattern:/\[(boolean|string|array|number)]/}),Mc=H({name:"defaultInfo",pattern:/\[default]/}),Bc=H({name:"required",pattern:/\[required]/}),Uc=H({name:"defaultInfoDescription",pattern:/\[default:\s.+]/}),zc=H({name:"choices",pattern:/\[choices:\s.+?]/}),Dc=H({group:ee.SKIPPED,name:"whiteSpace",pattern:/\s/}),Jx=H({group:ee.SKIPPED,name:"startProgramDescription",pattern:/\n\n/,push_mode:"PROGRAM_DESCRIPTION_MODE"}),jc=H({name:"programDescription",pattern:/.+/}),Qx=H({group:ee.SKIPPED,name:"endProgramDescription",pattern:/\n\n/,pop_mode:!0}),$c=H({name:"startOptionsSection",pattern:/Options:?\n/,push_mode:"SECTION_MODE"}),qc=H({name:"startPositionalsSection",pattern:/Positionals:\n/,push_mode:"SECTION_MODE"}),Vc=H({name:"startCommandsSection",pattern:/Commands:\n/,push_mode:"SECTION_MODE"}),Gc=H({name:"startRow",pattern:/ {2,}/,push_mode:"ROW_MODE"}),Hc=H({name:"rowDescription",pattern:/ {2}\w.+ {2}/}),Wc=H({name:"rowDescriptionTerminal",pattern:/ {2}\w.+/}),ey=H({group:ee.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),ty=H({group:ee.SKIPPED,name:"endSection",pattern:/\n+/,pop_mode:!0}),dF=new ee({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[$c,qc,Vc,Jx,Bo,zi,Dc],PROGRAM_DESCRIPTION_MODE:[Qx,jc],ROW_MODE:[ey,Xx,Pc,Hc,Wc,Uc,Mc,Bc,zc,Nc,Lc,Bo,zi,Dc],SECTION_MODE:[Gc,ty]}}),hF=[Nc,Lc,Xx,zi,Bo,Pc,Mc,Bc,Uc,zc,Dc,Jx,jc,Qx,$c,qc,Vc,Gc,Hc,Wc,ey,ty],Fc=class extends Nn{programHelp=this.RULE("programHelp",()=>{this.AT_LEAST_ONE(()=>{this.CONSUME(zi,{LABEL:"commandName"})}),this.MANY1(()=>{this.CONSUME(Bo)}),this.OPTION(()=>{this.CONSUME(jc,{LABEL:"description"})}),this.OPTION1(()=>{this.SUBRULE(this.commandsSection)}),this.OPTION2(()=>{this.SUBRULE(this.positionalsSection)}),this.OPTION3(()=>{this.SUBRULE(this.optionsSection)})});positionalsSection=this.RULE("positionalsSection",()=>{this.CONSUME(qc),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});commandsSection=this.RULE("commandsSection",()=>{this.CONSUME(Vc),this.MANY1(()=>{this.SUBRULE1(this.sectionRow)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME($c),this.MANY2(()=>{this.SUBRULE2(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Gc),this.OPTION(()=>{this.CONSUME(zi,{LABEL:"parentCommandName"})}),this.MANY(()=>{this.CONSUME1(zi,{LABEL:"commandName"})}),this.MANY1(()=>{this.OR([{ALT:()=>this.CONSUME(Bo)},{ALT:()=>this.CONSUME(Lc)},{ALT:()=>this.CONSUME(Nc)},{ALT:()=>this.CONSUME(Hc,{LABEL:"description"})},{ALT:()=>this.CONSUME(Wc,{LABEL:"description"})},{ALT:()=>this.CONSUME(Pc)},{ALT:()=>this.CONSUME(Bc)},{ALT:()=>this.CONSUME(Uc)},{ALT:()=>this.CONSUME(Mc)},{ALT:()=>this.CONSUME(zc)}])})});constructor(){super(hF),this.performSelfAnalysis()}},Mo=new Fc,Oc=class extends Mo.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}programHelp(t){let{command:r,subcommand:n}=qs(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:r,commands:t.commandsSection?this.visit(t.commandsSection):void 0,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,positionals:t.positionalsSection?this.visit(t.positionalsSection):void 0,subcommandName:n}}positionalsSection(t){return t.sectionRow.map(r=>this.positionalParentCommandToArguments(this.visit(r)))}commandsSection(t){return t.sectionRow.map(r=>this.visit(r))}optionsSection(t){return t.sectionRow.map(r=>this.visit(r))}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),choices:this.splitChoices(this.getString(t.choices)),commandName:this.getString(t.commandName),default:t.defaultInfo?!0:void 0,defaultValue:this.getString(t.defaultInfoDescription,!0),description:this.getString(t.description,!0),flags:this.getArray(t.flag),parentCommandName:this.getString(t.parentCommandName),required:t.required?!0:void 0,type:this.getString(t.type,!0)}}positionalParentCommandToArguments(t){let{arguments:r,parentCommandName:n,...i}=t;return n===void 0?t:{arguments:[n,...r??[]],...i}}getString(t,r=!1){if(t!==void 0)return t.map(n=>r?this.clean(n.image):n.image).join(" ")}getArray(t){if(t!==void 0)return t.map(r=>r.image)}clean(t){return t.endsWith("]]")?t.replaceAll(/(^\[default:\s*)|(]$)/g,""):t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}splitChoices(t){if(t!==void 0)return this.clean(t.replaceAll(/^\[choices:\s/g,"")).split(", ")}},gF=new Oc;function ry(e){let t=dF.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);Mo.input=t.tokens;let r=Mo.programHelp();if(Mo.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Mo.errors,void 0,2)}`);let n;try{n=gF.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 ny={yargs:ry,meow:Yx};function qs(e){if(e===void 0)throw new Error('Could not find "commandName" entry in help');let t=e.split(" ");if(t.length===0&&e===void 0)throw new Error('Could not find "commandName" entry in help');if(t.length===1)return{command:t[0],subcommand:void 0};let r=t.at(-1);return{command:t.slice(0,-1).join(" "),subcommand:r}}function iy(e){for(let[t,r]of Object.entries(ny)){Kc.info(`Trying to parse help string with ${t} parser...`);try{return r(e)}catch(n){n instanceof Error&&Kc.info(`Error in "${t}" parser: ${String(n)}`);continue}}Kc.error("Could not parse help string with any parser")}async function Zc(e,t="--help",r){let n=`${e} ${t}`,i=await bF(n),o=iy(i);return o===void 0?(oy.warn("Falling back to basic cli help text output."),EF(i)):yF(e,t,r??Number.MAX_SAFE_INTEGER,o)}async function yF(e,t,r,n){if(r<=0)return oy.info("Max CLI command help depth reached, stopping recursion"),"";let i=jm(n,r),o=e.split(" ")[0];if(n.commands)for(let a of n.commands){if(!a.parentCommandName||!a.commandName)continue;let s=await Zc(`${o} ${a.commandName}`,t,r-1);if(s==="")return i;i+=`
161
+ For further details.`);this.skipValidations=N(r,"skipValidations")?r.skipValidations:mt.skipValidations}};No.DEFER_DEFINITION_ERRORS_HANDLING=!1;Vx(No,[Cs,vs,Ds,Fs,Ns,Os,Ls,Ps,Ms,zs]);var Nn=class extends No{constructor(t,r=mt){let n=de(r);n.outputCst=!0,super(t,n)}};var $s=H({name:"flag",pattern:/--[\w-]+/}),wc=H({longer_alt:$s,name:"alias",pattern:/-[A-Z]/i}),Gx=H({group:ee.SKIPPED,name:"comma",pattern:/,/}),Hx=H({group:ee.SKIPPED,name:"dollar",pattern:/\$/}),js=H({group:ee.SKIPPED,name:"whiteSpace",pattern:/ /}),Wx=H({group:ee.SKIPPED,name:"newLine",pattern:/\n/}),Sc=H({name:"word",pattern:/\S+/}),Po=H({name:"argument",pattern:/(<\S+>|\[.+\])/}),vc=H({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),Kx=H({group:ee.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),Zx=H({group:ee.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),_c=H({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),Ic=H({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),Rc=H({name:"rowDescription",pattern:/\w.+/}),Yx=H({group:ee.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),Xx=H({group:ee.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),hF=new ee({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[Kx,_c,vc,Wx,js],OPTIONS_MODE:[Xx,Ic],ROW_MODE:[Yx,wc,$s,Gx,Po,Rc,js],USAGE_MODE:[Zx,Hx,Po,Sc,js]}}),gF=[$s,wc,Gx,Hx,js,Wx,Sc,Po,vc,Kx,Zx,_c,Ic,Rc,Yx,Xx],Tc=class extends Nn{sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Ic),this.MANY(()=>{this.OR([{ALT:()=>this.CONSUME(Po)},{ALT:()=>this.CONSUME(wc)},{ALT:()=>this.CONSUME($s)},{ALT:()=>this.CONSUME(Rc,{LABEL:"description"})}])})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(_c),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});programHelp=this.RULE("programHelp",()=>{this.CONSUME(vc,{LABEL:"description"}),this.AT_LEAST_ONE(()=>{this.CONSUME(Sc,{LABEL:"commandName"})}),this.MANY(()=>{this.CONSUME(Po)}),this.OPTION(()=>{this.SUBRULE(this.optionsSection)})});constructor(){super(gF),this.performSelfAnalysis()}},Lo=new Tc,Cc=class extends Lo.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}optionsSection(t){return t.sectionRow.map(r=>this.visit(r))}programHelp(t){let{command:r,subcommand:n}=qs(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:r,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,subcommandName:n}}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),description:this.getString(t.description,!0),flags:this.getArray(t.flag)}}clean(t){return t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}getArray(t){if(t!==void 0)return t.map(r=>r.image)}getString(t,r=!1){if(t!==void 0)return t.map(n=>r?this.clean(n.image):n.image).join(" ")}},xF=new Cc;function Jx(e){let t=hF.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);Lo.input=t.tokens;let r=Lo.programHelp();if(Lo.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Lo.errors,void 0,2)}`);let n;try{n=xF.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 Nc=H({name:"flag",pattern:/--[\w-]+/}),Lc=H({name:"alias",pattern:/-[A-Z]/i}),Qx=H({group:ee.SKIPPED,name:"comma",pattern:/,/}),zi=H({name:"word",pattern:/\S+/}),Bo=H({name:"argument",pattern:/<\S+>|\[\S+\]/}),Pc=H({name:"type",pattern:/\[(boolean|string|array|number)\]/}),Mc=H({name:"defaultInfo",pattern:/\[default\]/}),Bc=H({name:"required",pattern:/\[required\]/}),Uc=H({name:"defaultInfoDescription",pattern:/\[default:\s.+\]/}),zc=H({name:"choices",pattern:/\[choices:\s.+?\]/}),Dc=H({group:ee.SKIPPED,name:"whiteSpace",pattern:/\s/}),ey=H({group:ee.SKIPPED,name:"startProgramDescription",pattern:/\n\n/,push_mode:"PROGRAM_DESCRIPTION_MODE"}),jc=H({name:"programDescription",pattern:/.+/}),ty=H({group:ee.SKIPPED,name:"endProgramDescription",pattern:/\n\n/,pop_mode:!0}),$c=H({name:"startOptionsSection",pattern:/Options:?\n/,push_mode:"SECTION_MODE"}),qc=H({name:"startPositionalsSection",pattern:/Positionals:\n/,push_mode:"SECTION_MODE"}),Vc=H({name:"startCommandsSection",pattern:/Commands:\n/,push_mode:"SECTION_MODE"}),Gc=H({name:"startRow",pattern:/ {2,}/,push_mode:"ROW_MODE"}),Hc=H({name:"rowDescription",pattern:/ {2}\w.+ {2}/}),Wc=H({name:"rowDescriptionTerminal",pattern:/ {2}\w.+/}),ry=H({group:ee.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),ny=H({group:ee.SKIPPED,name:"endSection",pattern:/\n+/,pop_mode:!0}),yF=new ee({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[$c,qc,Vc,ey,Bo,zi,Dc],PROGRAM_DESCRIPTION_MODE:[ty,jc],ROW_MODE:[ry,Qx,Pc,Hc,Wc,Uc,Mc,Bc,zc,Nc,Lc,Bo,zi,Dc],SECTION_MODE:[Gc,ny]}}),EF=[Nc,Lc,Qx,zi,Bo,Pc,Mc,Bc,Uc,zc,Dc,ey,jc,ty,$c,qc,Vc,Gc,Hc,Wc,ry,ny],Fc=class extends Nn{sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(Gc),this.OPTION(()=>{this.CONSUME(zi,{LABEL:"parentCommandName"})}),this.MANY(()=>{this.CONSUME1(zi,{LABEL:"commandName"})}),this.MANY1(()=>{this.OR([{ALT:()=>this.CONSUME(Bo)},{ALT:()=>this.CONSUME(Lc)},{ALT:()=>this.CONSUME(Nc)},{ALT:()=>this.CONSUME(Hc,{LABEL:"description"})},{ALT:()=>this.CONSUME(Wc,{LABEL:"description"})},{ALT:()=>this.CONSUME(Pc)},{ALT:()=>this.CONSUME(Bc)},{ALT:()=>this.CONSUME(Uc)},{ALT:()=>this.CONSUME(Mc)},{ALT:()=>this.CONSUME(zc)}])})});commandsSection=this.RULE("commandsSection",()=>{this.CONSUME(Vc),this.MANY1(()=>{this.SUBRULE1(this.sectionRow)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME($c),this.MANY2(()=>{this.SUBRULE2(this.sectionRow)})});positionalsSection=this.RULE("positionalsSection",()=>{this.CONSUME(qc),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});programHelp=this.RULE("programHelp",()=>{this.AT_LEAST_ONE(()=>{this.CONSUME(zi,{LABEL:"commandName"})}),this.MANY1(()=>{this.CONSUME(Bo)}),this.OPTION(()=>{this.CONSUME(jc,{LABEL:"description"})}),this.OPTION1(()=>{this.SUBRULE(this.commandsSection)}),this.OPTION2(()=>{this.SUBRULE(this.positionalsSection)}),this.OPTION3(()=>{this.SUBRULE(this.optionsSection)})});constructor(){super(EF),this.performSelfAnalysis()}},Mo=new Fc,Oc=class extends Mo.getBaseCstVisitorConstructor(){constructor(){super(),this.validateVisitor()}commandsSection(t){return t.sectionRow.map(r=>this.visit(r))}optionsSection(t){return t.sectionRow.map(r=>this.visit(r))}positionalsSection(t){return t.sectionRow.map(r=>this.positionalParentCommandToArguments(this.visit(r)))}programHelp(t){let{command:r,subcommand:n}=qs(this.getString(t.commandName));return{arguments:this.getArray(t.argument),commandName:r,commands:t.commandsSection?this.visit(t.commandsSection):void 0,description:this.getString(t.description),options:t.optionsSection?this.visit(t.optionsSection):void 0,positionals:t.positionalsSection?this.visit(t.positionalsSection):void 0,subcommandName:n}}sectionRow(t){return{aliases:this.getArray(t.alias),arguments:this.getArray(t.argument),choices:this.splitChoices(this.getString(t.choices)),commandName:this.getString(t.commandName),default:t.defaultInfo?!0:void 0,defaultValue:this.getString(t.defaultInfoDescription,!0),description:this.getString(t.description,!0),flags:this.getArray(t.flag),parentCommandName:this.getString(t.parentCommandName),required:t.required?!0:void 0,type:this.getString(t.type,!0)}}clean(t){return t.endsWith("]]")?t.replaceAll(/(^\[default:\s*)|(\]$)/g,""):t.replaceAll(/^[\s[]*(default:)?\s*|[\s\]]*$/g,"")}getArray(t){if(t!==void 0)return t.map(r=>r.image)}getString(t,r=!1){if(t!==void 0)return t.map(n=>r?this.clean(n.image):n.image).join(" ")}positionalParentCommandToArguments(t){let{arguments:r,parentCommandName:n,...i}=t;return n===void 0?t:{arguments:[n,...r??[]],...i}}splitChoices(t){if(t!==void 0)return this.clean(t.replaceAll(/^\[choices:\s/g,"")).split(", ")}},bF=new Oc;function iy(e){let t=yF.tokenize(e);if(t.errors.length>0)throw new Error(`Errors lexing CLI command: ${JSON.stringify(t.errors,void 0,2)}`);Mo.input=t.tokens;let r=Mo.programHelp();if(Mo.errors.length>0)throw new Error(`Errors parsing CLI command help text: ${JSON.stringify(Mo.errors,void 0,2)}`);let n;try{n=bF.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 oy={yargs:iy,meow:Jx};function qs(e){if(e===void 0)throw new Error('Could not find "commandName" entry in help');let t=e.split(" ");if(t.length===0)throw new Error('Could not find "commandName" entry in help');if(t.length===1)return{command:t[0],subcommand:void 0};let r=t.at(-1);return{command:t.slice(0,-1).join(" "),subcommand:r}}function ay(e){for(let[t,r]of Object.entries(oy)){Kc.info(`Trying to parse help string with ${t} parser...`);try{return r(e)}catch(n){n instanceof Error&&Kc.info(`Error in "${t}" parser: ${String(n)}`);continue}}Kc.error("Could not parse help string with any parser")}async function Zc(e,t="--help",r){let n=`${e} ${t}`,i=await CF(n),o=ay(i);return o===void 0?(sy.warn("Falling back to basic cli help text output."),TF(i)):AF(e,t,r??Number.MAX_SAFE_INTEGER,o)}async function AF(e,t,r,n){if(r<=0)return sy.info("Max CLI command help depth reached, stopping recursion"),"";let i=qm(n,r),o=e.split(" ")[0];if(n.commands)for(let a of n.commands){if(!a.parentCommandName||!a.commandName)continue;let s=await Zc(`${o} ${a.commandName}`,t,r-1);if(s==="")return i;i+=`
161
162
 
162
- ${s}`}return i}function EF(e){return`\`\`\`txt
163
+ ${s}`}return i}function TF(e){return`\`\`\`txt
163
164
  ${e}
164
- \`\`\``}async function bF(e){let t;try{let{stderr:r,stdout:n}=await xF(e);t=n,(t===void 0||t==="")&&(t=r)}catch(r){if(r instanceof Error)throw new TypeError(`Error running CLI help command: "${e}"
165
+ \`\`\``}async function CF(e){let t;try{let{stderr:r,stdout:n}=await kF(e);t=n,(t===void 0||t==="")&&(t=r)}catch(r){if(r instanceof Error)throw new TypeError(`Error running CLI help command: "${e}"
165
166
  ${r.message}
166
167
  `)}if(t===void 0||t==="")throw new Error(`No result from running CLI help command: "${e}"
167
- `);return t}import ay from"node:process";import kF from"node:path";import AF from"node:fs";import TF from"node:fs/promises";var sy=ay.platform==="win32",CF=sy?new Set(ay.env.PATHEXT?.split(";").map(e=>e.toLowerCase())):[];async function uy(e){try{return await TF.access(e,AF.X_OK),sy?CF.has(kF.extname(e)):!0}catch{return!1}}import wF from"node:path";import{log as SF}from"remark-mdat";import vF from"which";async function ly(e){return e??=await _F(),RF(e)}async function _F(){let e=await Ct();if(e?.bin){let t=typeof e.bin=="string"?e.bin:String(Object.values(e.bin).at(0));if(IF(t))return SF.info(`Inferred <!-- cli-help --> command to run from package.json: ${t}`),t}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 IF(e){let t=wF.parse(e);return t.root!==""||t.dir!==""}async function RF(e){let t=await vF(e,{nothrow:!0})??void 0;if(t===null&&(t=await DF(e)??void 0),t!==void 0&&await uy(t))return t;throw new Error(`The cli-help rule noticed that "${t}" is not executable.`)}async function DF(e){return(await Ct())?.bin?.[e]??void 0}var Vs={"cli-help":{async content(e){let t=L.object({cliCommand:L.string().optional(),depth:L.number().optional(),helpFlag:L.string().optional()}).optional().parse(e),r=await ly(t?.cliCommand);return Zc(r,t?.helpFlag,t?.depth)}}};var cy={cli:FF(Vs)};import OF from"node:fs/promises";import fy from"node:path";var py={code:{async content(e){let t=L.object({file:L.string(),language:L.string().optional()}).parse(e),r=(fy.extname(t.file)??"").replace(/^\./,""),n=await OF.readFile(fy.join(process.cwd(),t.file),"utf8");return`\`\`\`${r}
168
+ `);return t}import uy from"node:process";import wF from"node:path";import SF from"node:fs";import vF from"node:fs/promises";var ly=uy.platform==="win32",_F=ly?new Set(uy.env.PATHEXT?.split(";").map(e=>e.toLowerCase())):[];async function cy(e){try{return await vF.access(e,SF.X_OK),ly?_F.has(wF.extname(e)):!0}catch{return!1}}import IF from"node:path";import{log as RF}from"remark-mdat";import DF from"which";async function fy(e){return e??=await FF(),NF(e)}async function FF(){let e=await Ct();if(e.bin){let t=typeof e.bin=="string"?e.bin:String(Object.values(e.bin).at(0));if(OF(t))return RF.info(`Inferred <!-- cli-help --> command to run from package.json: ${t}`),t}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 OF(e){let t=IF.parse(e);return t.root!==""||t.dir!==""}async function NF(e){let t=await DF(e,{nothrow:!0})??void 0;if(t===void 0&&(t=await LF(e)??void 0),t!==void 0&&await cy(t))return t;throw new Error(`The cli-help rule noticed that "${t}" is not executable.`)}async function LF(e){return(await Ct()).bin?.[e]??void 0}var Vs={"cli-help":{async content(e){let t=L.object({cliCommand:L.string().optional(),depth:L.number().optional(),helpFlag:L.string().optional()}).optional().parse(e),r=await fy(t?.cliCommand);return Zc(r,t?.helpFlag,t?.depth)}}};var py={cli:PF(Vs)};import MF from"node:fs/promises";import my from"node:path";var dy={code:{async content(e){let t=L.object({file:L.string(),language:L.string().optional()}).parse(e),r=(my.extname(t.file)??"").replace(/^\./,""),n=await MF.readFile(my.join(process.cwd(),t.file),"utf8");return`\`\`\`${r}
168
169
  ${n}
169
- \`\`\``}}};var Gs={contributing:{async content(){let t=(await Ct())?.bugs?.url;if(t===void 0)throw new Error('Could not find "bugs.url" entry in package.json');return`## Contributing
170
- [Issues](${t}) and pull requests are welcome.`},order:15}};var Hs={description:{async content(){let e=await Ct();if(e.description===void 0)throw new Error('Could not find "description" entry in package.json');return`**${e.description}**`},order:4}};import{getSoleRule as my}from"remark-mdat";var Ws={license:{async content(){let e=await Ct(),{author:t,license:r}=e;if(t?.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
171
- [${r}](license.txt) \xA9 ${t.name}`},order:16}};var dy={footer:{content:[my(Gs),my(Ws)],order:17}};import{getSoleRule as Ys}from"remark-mdat";import{getSoleRule as NF}from"remark-mdat";var Ks={"short-description":NF(Hs)};var Zs={title:{applicationOrder:2,async content(e){let{postfix:t,prefix:r,titleCase:n}=L.object({postfix:L.string().optional().default(""),prefix:L.string().optional().default(""),titleCase:L.boolean().optional().default(!1)}).parse(e??{}),{name:i}=await Ct();return`# ${r}${n?LF(i):i}${t}`},order:1}};function LF(e){return e.split(/[ _-]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}var hy={header:{applicationOrder:2,content:[Ys(Zs),Ys(Ia),Ys(va),Ys(Ks)],order:1}};import GF from"node:path";import zF from"node:fs/promises";import{promisify as xy}from"node:util";import{brotliCompress as jF,gzip as $F}from"node:zlib";var PF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],MF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],BF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],UF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],gy=(e,t,r)=>{let n=e;return typeof t=="string"||Array.isArray(t)?n=e.toLocaleString(t,r):(t===!0||r!==void 0)&&(n=e.toLocaleString(void 0,r)),n};function Yc(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};let r=t.bits?t.binary?UF:BF:t.binary?MF:PF,n=t.space?" ":"";if(t.signed&&e===0)return` 0${n}${r[0]}`;let i=e<0,o=i?"-":t.signed?"+":"";i&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){let c=gy(e,t.locale,a);return o+c+n+r[0]}let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),r.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));let u=gy(Number(e),t.locale,a),l=r[s];return o+u+n+l}var qF=xy(jF),VF=xy($F);function Xc(e,t){let r=t===0?0:(t-e)/t*100;return{bytes:e,bytesPretty:Yc(e,{maximumFractionDigits:1}),percent:r,percentPretty:`${Math.round(r)}%`}}async function Xs(e){try{let t=await zF.readFile(e),r=t.length,[n,i]=await Promise.all([qF(t),VF(t)]);return{brotli:Xc(n.length,r),gzip:Xc(i.length,r),original:Xc(r,r)}}catch(t){throw new Error(`Failed to analyze file: ${t instanceof Error?t.message:"Unknown error"}`)}}var HF=L.object({compression:L.enum(["none","brotli","gzip"]).optional().default("none"),file:L.string()});function WF(e,t){switch(t){case"brotli":return e.brotli.bytesPretty;case"gzip":return e.gzip.bytesPretty;case"none":return e.original.bytesPretty}}var yy={size:{async content(e){let t=HF.parse(e),r=GF.join(process.cwd(),t.file),n=await Xs(r);return WF(n,t.compression)}}};import by from"node:path";var Ey=L.union([L.string(),L.array(L.string())]).transform(e=>Array.isArray(e)?e:[e]),KF=L.union([L.object({brotli:L.boolean().optional().default(!0),file:Ey,gzip:L.boolean().optional().default(!0),original:L.boolean().optional().default(!0),showPercentage:L.boolean().optional().default(!1)}),L.object({brotli:L.boolean().optional().default(!0),files:Ey,gzip:L.boolean().optional().default(!0),original:L.boolean().optional().default(!0),showPercentage:L.boolean().optional().default(!1)})]).transform(e=>{if("file"in e){let{file:t,...r}=e;return{files:t,...r}}return e});function ZF(e,t){let r=["File"];t.original&&r.push("Original"),t.gzip&&r.push("Gzip"),t.brotli&&r.push("Brotli");let n=r.map(()=>"---"),i=e.map(([o,a])=>{let s=[by.basename(o)];return t.original&&s.push(a.original.bytesPretty),t.gzip&&s.push(t.showPercentage?`${a.gzip.bytesPretty} (${a.gzip.percentPretty})`:a.gzip.bytesPretty),t.brotli&&s.push(t.showPercentage?`${a.brotli.bytesPretty} (${a.brotli.percentPretty})`:a.brotli.bytesPretty),s});return[`| ${r.join(" | ")} |`,`| ${n.join(" | ")} |`,...i.map(o=>`| ${o.join(" | ")} |`)].join(`
172
- `)}var ky={"size-table":{async content(e){let t=KF.parse(e),r=await Promise.all(t.files.map(async n=>{let i=by.join(process.cwd(),n),o=await Xs(i);return[n,o]}));return ZF(r,{brotli:t.brotli,gzip:t.gzip,original:t.original,showPercentage:t.showPercentage})}}};var Ay=/[\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 YF=Object.hasOwnProperty,Uo=class{constructor(){this.occurrences,this.reset()}slug(t,r){let n=this,i=XF(t,r===!0),o=i;for(;YF.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 XF(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(Ay,"").replace(/ /g,"-"))}function Js(e){return new RegExp("^("+e+")$","i")}var Ty=new Uo;function Cy(e,t,r){let n="children"in e?e.children.length:0,i=r.skip?Js(r.skip):void 0,o=Kt(r.parents||function(c){return c===e}),a=[],s,u,l;return Ty.reset(),ao(e,"heading",function(c,f,p){let m=hr(c,{includeImageAlt:!1}),h=c.data&&c.data.hProperties&&c.data.hProperties.id,E=Ty.slug(h||m);if(o(p)){if(f!==void 0&&t&&!s&&t.test(m)){s=f+1,l=c;return}f!==void 0&&l&&!u&&c.depth<=l.depth&&(u=f),(u||!t)&&(!r.minDepth||c.depth>=r.minDepth)&&(!r.maxDepth||c.depth<=r.maxDepth)&&(!i||!i.test(m))&&a.push({depth:c.depth,children:c.children,id:E})}}),{index:s===void 0?-1:s,endIndex:s===void 0?-1:u||n,map:a}}var wy=typeof self=="object"?self:globalThis,t1=(e,t)=>{let r=(i,o)=>(e.set(o,i),i),n=i=>{if(e.has(i))return e.get(i);let[o,a]=t[i];switch(o){case 0:case-1:return r(a,i);case 1:{let s=r([],i);for(let u of a)s.push(n(u));return s}case 2:{let s=r({},i);for(let[u,l]of a)s[n(u)]=n(l);return s}case 3:return r(new Date(a),i);case 4:{let{source:s,flags:u}=a;return r(new RegExp(s,u),i)}case 5:{let s=r(new Map,i);for(let[u,l]of a)s.set(n(u),n(l));return s}case 6:{let s=r(new Set,i);for(let u of a)s.add(n(u));return s}case 7:{let{name:s,message:u}=a;return r(new wy[s](u),i)}case 8:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{let{buffer:s}=new Uint8Array(a);return r(new DataView(s),a)}}return r(new wy[o](a),i)};return n},ef=e=>t1(new Map,e)(0);var ji="",{toString:r1}={},{keys:n1}=Object,zo=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let r=r1.call(e).slice(8,-1);switch(r){case"Array":return[1,ji];case"Object":return[2,ji];case"Date":return[3,ji];case"RegExp":return[4,ji];case"Map":return[5,ji];case"Set":return[6,ji];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},eu=([e,t])=>e===0&&(t==="function"||t==="symbol"),i1=(e,t,r,n)=>{let i=(a,s)=>{let u=n.push(a)-1;return r.set(s,u),u},o=a=>{if(r.has(a))return r.get(a);let[s,u]=zo(a);switch(s){case 0:{let c=a;switch(u){case"bigint":s=8,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([-1],a)}return i([s,c],a)}case 1:{if(u){let p=a;return u==="DataView"?p=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(a)),i([u,[...p]],a)}let c=[],f=i([s,c],a);for(let p of a)c.push(o(p));return f}case 2:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());let c=[],f=i([s,c],a);for(let p of n1(a))(e||!eu(zo(a[p])))&&c.push([o(p),o(a[p])]);return f}case 3:return i([s,a.toISOString()],a);case 4:{let{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case 5:{let c=[],f=i([s,c],a);for(let[p,m]of a)(e||!(eu(zo(p))||eu(zo(m))))&&c.push([o(p),o(m)]);return f}case 6:{let c=[],f=i([s,c],a);for(let p of a)(e||!eu(zo(p)))&&c.push(o(p));return f}}let{message:l}=a;return i([s,{name:u,message:l}],a)};return o},tf=(e,{json:t,lossy:r}={})=>{let n=[];return i1(!(t||r),!!t,new Map,n)(e),n};var rf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ef(tf(e,t)):structuredClone(e):(e,t)=>ef(tf(e,t));function Ry(e,t){let{ordered:r=!1,tight:n=!1,prefix:i}=t,o={type:"list",ordered:r,spread:!1,children:[]},a=Number.POSITIVE_INFINITY,s=-1;for(;++s<e.length;)e[s].depth<a&&(a=e[s].depth);for(s=-1;++s<e.length;)e[s].depth-=a-1;for(s=-1;++s<e.length;)jo(e[s],o,{ordered:r,tight:n,prefix:i});return o}function jo(e,t,r){let n=-1,i=t.children[t.children.length-1];if(t.type==="list")if(e.depth===1)t.children.push({type:"listItem",spread:!1,children:[{type:"paragraph",children:[{type:"link",title:null,url:"#"+(r.prefix||"")+e.id,children:nf(e.children)}]}]});else if(t.children.length>0){let o=t.children[t.children.length-1];jo(e,o,r)}else{let o={type:"listItem",spread:!1,children:[]};t.children.push(o),jo(e,o,r)}else if(i&&i.type==="list")e.depth--,jo(e,i,r);else{let o={type:"list",ordered:r.ordered,spread:!1,children:[]};t.children.push(o),e.depth--,jo(e,o,r)}if(t.type==="list"&&!r.tight){for(t.spread=!1;++n<t.children.length;)if(t.children[n].children.length>1){t.spread=!0;break}}else t.spread=!r.tight}function nf(e){let t=[],r=-1;for(;++r<e.length;){let n=o1(e[r]);Array.isArray(n)?t.push(...n):t.push(n)}return t}function o1(e){if(e.type==="footnoteReference")return[];if(e.type==="link"||e.type==="linkReference")return nf(e.children);if("children"in e){let{children:n,position:i,...o}=e;return Object.assign(rf(o),{children:nf(e.children)})}let{position:t,...r}=e;return rf(r)}function of(e,t){let r=t||{},n=r.heading?Js(r.heading):void 0,i=Cy(e,n,r);return{index:n?i.index:void 0,endIndex:n?i.endIndex:void 0,map:i.map.length>0?Ry(i.map,r):void 0}}var tu={"table-of-contents":{applicationOrder:1,async content(e,t){let r=L.object({depth:L.union([L.literal(1),L.literal(2),L.literal(3),L.literal(4),L.literal(5),L.literal(6)]).optional()}).optional().parse(e),n=of(t,{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"},a=ri().use(Dr).stringify(o).replaceAll(`
170
+ \`\`\``}}};var Gs={contributing:{async content(){let t=(await Ct()).bugs?.url;if(t===void 0)throw new Error('Could not find "bugs.url" entry in package.json');return`## Contributing
171
+ [Issues](${t}) and pull requests are welcome.`},order:15}};var Hs={description:{async content(){let e=await Ct();if(e.description===void 0)throw new Error('Could not find "description" entry in package.json');return`**${e.description}**`},order:4}};import{getSoleRule as hy}from"remark-mdat";var Ws={license:{async content(){let e=await Ct(),{author:t,license:r}=e;if(t?.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
172
+ [${r}](license.txt) \xA9 ${t.name}`},order:16}};var gy={footer:{content:[hy(Gs),hy(Ws)],order:17}};import{getSoleRule as Ys}from"remark-mdat";import{getSoleRule as BF}from"remark-mdat";var Ks={"short-description":BF(Hs)};var Zs={title:{applicationOrder:2,async content(e){let{postfix:t,prefix:r,titleCase:n}=L.object({postfix:L.string().optional().default(""),prefix:L.string().optional().default(""),titleCase:L.boolean().optional().default(!1)}).parse(e??{}),{name:i}=await Ct();return`# ${r}${n?UF(i):i}${t}`},order:1}};function UF(e){return e.split(/[ _-]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}var xy={header:{applicationOrder:2,content:[Ys(Zs),Ys(Ia),Ys(va),Ys(Ks)],order:1}};import ZF from"node:path";import VF from"node:fs/promises";import{promisify as Ey}from"node:util";import{brotliCompress as GF,gzip as HF}from"node:zlib";var zF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],jF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],$F=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],qF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],yy=(e,t,r)=>{let n=e;return typeof t=="string"||Array.isArray(t)?n=e.toLocaleString(t,r):(t===!0||r!==void 0)&&(n=e.toLocaleString(void 0,r)),n};function Yc(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};let r=t.bits?t.binary?qF:$F:t.binary?jF:zF,n=t.space?" ":"";if(t.signed&&e===0)return` 0${n}${r[0]}`;let i=e<0,o=i?"-":t.signed?"+":"";i&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){let c=yy(e,t.locale,a);return o+c+n+r[0]}let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),r.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));let u=yy(Number(e),t.locale,a),l=r[s];return o+u+n+l}var WF=Ey(GF),KF=Ey(HF);function Xc(e,t){let r=t===0?0:(t-e)/t*100;return{bytes:e,bytesPretty:Yc(e,{maximumFractionDigits:1}),percent:r,percentPretty:`${Math.round(r)}%`}}async function Xs(e){try{let t=await VF.readFile(e),r=t.length,[n,i]=await Promise.all([WF(t),KF(t)]);return{brotli:Xc(n.length,r),gzip:Xc(i.length,r),original:Xc(r,r)}}catch(t){throw new Error(`Failed to analyze file: ${t instanceof Error?t.message:"Unknown error"}`)}}var YF=L.object({compression:L.enum(["none","brotli","gzip"]).optional().default("none"),file:L.string()});function XF(e,t){switch(t){case"brotli":return e.brotli.bytesPretty;case"gzip":return e.gzip.bytesPretty;case"none":return e.original.bytesPretty}}var by={size:{async content(e){let t=YF.parse(e),r=ZF.join(process.cwd(),t.file),n=await Xs(r);return XF(n,t.compression)}}};import Ay from"node:path";var ky=L.union([L.string(),L.array(L.string())]).transform(e=>Array.isArray(e)?e:[e]),JF=L.union([L.object({brotli:L.boolean().optional().default(!0),file:ky,gzip:L.boolean().optional().default(!0),original:L.boolean().optional().default(!0),showPercentage:L.boolean().optional().default(!1)}),L.object({brotli:L.boolean().optional().default(!0),files:ky,gzip:L.boolean().optional().default(!0),original:L.boolean().optional().default(!0),showPercentage:L.boolean().optional().default(!1)})]).transform(e=>{if("file"in e){let{file:t,...r}=e;return{files:t,...r}}return e});function QF(e,t){let r=["File"];t.original&&r.push("Original"),t.gzip&&r.push("Gzip"),t.brotli&&r.push("Brotli");let n=r.map(()=>"---"),i=e.map(([o,a])=>{let s=[Ay.basename(o)];return t.original&&s.push(a.original.bytesPretty),t.gzip&&s.push(t.showPercentage?`${a.gzip.bytesPretty} (${a.gzip.percentPretty})`:a.gzip.bytesPretty),t.brotli&&s.push(t.showPercentage?`${a.brotli.bytesPretty} (${a.brotli.percentPretty})`:a.brotli.bytesPretty),s});return[`| ${r.join(" | ")} |`,`| ${n.join(" | ")} |`,...i.map(o=>`| ${o.join(" | ")} |`)].join(`
173
+ `)}var Ty={"size-table":{async content(e){let t=JF.parse(e),r=await Promise.all(t.files.map(async n=>{let i=Ay.join(process.cwd(),n),o=await Xs(i);return[n,o]}));return QF(r,{brotli:t.brotli,gzip:t.gzip,original:t.original,showPercentage:t.showPercentage})}}};var Cy=/[\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 e1=Object.hasOwnProperty,Uo=class{constructor(){this.occurrences,this.reset()}slug(t,r){let n=this,i=t1(t,r===!0),o=i;for(;e1.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 t1(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(Cy,"").replace(/ /g,"-"))}function Js(e){return new RegExp("^("+e+")$","i")}var wy=new Uo;function Sy(e,t,r){let n="children"in e?e.children.length:0,i=r.skip?Js(r.skip):void 0,o=Kt(r.parents||function(c){return c===e}),a=[],s,u,l;return wy.reset(),ao(e,"heading",function(c,f,p){let m=hr(c,{includeImageAlt:!1}),h=c.data&&c.data.hProperties&&c.data.hProperties.id,E=wy.slug(h||m);if(o(p)){if(f!==void 0&&t&&!s&&t.test(m)){s=f+1,l=c;return}f!==void 0&&l&&!u&&c.depth<=l.depth&&(u=f),(u||!t)&&(!r.minDepth||c.depth>=r.minDepth)&&(!r.maxDepth||c.depth<=r.maxDepth)&&(!i||!i.test(m))&&a.push({depth:c.depth,children:c.children,id:E})}}),{index:s===void 0?-1:s,endIndex:s===void 0?-1:u||n,map:a}}var vy=typeof self=="object"?self:globalThis,o1=(e,t)=>{let r=(i,o)=>(e.set(o,i),i),n=i=>{if(e.has(i))return e.get(i);let[o,a]=t[i];switch(o){case 0:case-1:return r(a,i);case 1:{let s=r([],i);for(let u of a)s.push(n(u));return s}case 2:{let s=r({},i);for(let[u,l]of a)s[n(u)]=n(l);return s}case 3:return r(new Date(a),i);case 4:{let{source:s,flags:u}=a;return r(new RegExp(s,u),i)}case 5:{let s=r(new Map,i);for(let[u,l]of a)s.set(n(u),n(l));return s}case 6:{let s=r(new Set,i);for(let u of a)s.add(n(u));return s}case 7:{let{name:s,message:u}=a;return r(new vy[s](u),i)}case 8:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{let{buffer:s}=new Uint8Array(a);return r(new DataView(s),a)}}return r(new vy[o](a),i)};return n},ef=e=>o1(new Map,e)(0);var ji="",{toString:a1}={},{keys:s1}=Object,zo=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let r=a1.call(e).slice(8,-1);switch(r){case"Array":return[1,ji];case"Object":return[2,ji];case"Date":return[3,ji];case"RegExp":return[4,ji];case"Map":return[5,ji];case"Set":return[6,ji];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},eu=([e,t])=>e===0&&(t==="function"||t==="symbol"),u1=(e,t,r,n)=>{let i=(a,s)=>{let u=n.push(a)-1;return r.set(s,u),u},o=a=>{if(r.has(a))return r.get(a);let[s,u]=zo(a);switch(s){case 0:{let c=a;switch(u){case"bigint":s=8,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([-1],a)}return i([s,c],a)}case 1:{if(u){let p=a;return u==="DataView"?p=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(a)),i([u,[...p]],a)}let c=[],f=i([s,c],a);for(let p of a)c.push(o(p));return f}case 2:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());let c=[],f=i([s,c],a);for(let p of s1(a))(e||!eu(zo(a[p])))&&c.push([o(p),o(a[p])]);return f}case 3:return i([s,a.toISOString()],a);case 4:{let{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case 5:{let c=[],f=i([s,c],a);for(let[p,m]of a)(e||!(eu(zo(p))||eu(zo(m))))&&c.push([o(p),o(m)]);return f}case 6:{let c=[],f=i([s,c],a);for(let p of a)(e||!eu(zo(p)))&&c.push(o(p));return f}}let{message:l}=a;return i([s,{name:u,message:l}],a)};return o},tf=(e,{json:t,lossy:r}={})=>{let n=[];return u1(!(t||r),!!t,new Map,n)(e),n};var rf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ef(tf(e,t)):structuredClone(e):(e,t)=>ef(tf(e,t));function Fy(e,t){let{ordered:r=!1,tight:n=!1,prefix:i}=t,o={type:"list",ordered:r,spread:!1,children:[]},a=Number.POSITIVE_INFINITY,s=-1;for(;++s<e.length;)e[s].depth<a&&(a=e[s].depth);for(s=-1;++s<e.length;)e[s].depth-=a-1;for(s=-1;++s<e.length;)jo(e[s],o,{ordered:r,tight:n,prefix:i});return o}function jo(e,t,r){let n=-1,i=t.children[t.children.length-1];if(t.type==="list")if(e.depth===1)t.children.push({type:"listItem",spread:!1,children:[{type:"paragraph",children:[{type:"link",title:null,url:"#"+(r.prefix||"")+e.id,children:nf(e.children)}]}]});else if(t.children.length>0){let o=t.children[t.children.length-1];jo(e,o,r)}else{let o={type:"listItem",spread:!1,children:[]};t.children.push(o),jo(e,o,r)}else if(i&&i.type==="list")e.depth--,jo(e,i,r);else{let o={type:"list",ordered:r.ordered,spread:!1,children:[]};t.children.push(o),e.depth--,jo(e,o,r)}if(t.type==="list"&&!r.tight){for(t.spread=!1;++n<t.children.length;)if(t.children[n].children.length>1){t.spread=!0;break}}else t.spread=!r.tight}function nf(e){let t=[],r=-1;for(;++r<e.length;){let n=l1(e[r]);Array.isArray(n)?t.push(...n):t.push(n)}return t}function l1(e){if(e.type==="footnoteReference")return[];if(e.type==="link"||e.type==="linkReference")return nf(e.children);if("children"in e){let{children:n,position:i,...o}=e;return Object.assign(rf(o),{children:nf(e.children)})}let{position:t,...r}=e;return rf(r)}function of(e,t){let r=t||{},n=r.heading?Js(r.heading):void 0,i=Sy(e,n,r);return{index:n?i.index:void 0,endIndex:n?i.endIndex:void 0,map:i.map.length>0?Fy(i.map,r):void 0}}var tu={"table-of-contents":{applicationOrder:1,async content(e,t){let r=L.object({depth:L.union([L.literal(1),L.literal(2),L.literal(3),L.literal(4),L.literal(5),L.literal(6)]).optional()}).optional().parse(e),n=of(t,{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"},a=ri().use(Dr).stringify(o).replaceAll(`
173
174
 
174
175
  `,`
175
176
  `);return[i,a].join(`
176
- `)},order:6}};import{tldrawToImage as Dy}from"@kitschpatrol/tldraw-cli";import a1 from"node:crypto";import $i from"node:fs/promises";import qt from"node:path";var Ly={tldraw:{async content(e){let{alt:t="tldraw diagram",src:r}=L.object({alt:L.string().optional(),src:L.string()}).parse(e),{assetsPath:n}=await dn();if(n===void 0)throw new Error("No assets path found");await $i.mkdir(n,{recursive:!0});let i=await Yn(r)?await Oy(r):void 0;if(i!==void 0){let l=qt.basename(r,qt.extname(r)),c=qt.join(n,`${l}-${i}-light.svg`),f=qt.join(n,`${l}-${i}-dark.svg`);if(await Yn(c)&&await Yn(f))return Fy(c,f,t)}let[o]=await Dy(r,{dark:!1,format:"svg",output:n,transparent:!0});i??=await Oy(o);let a=`${Ny(o)}-${i}-light.svg`;await $i.rename(o,a);let[s]=await Dy(r,{dark:!0,format:"svg",output:n,transparent:!0}),u=`${Ny(s)}-${i}-dark.svg`;if(await $i.rename(s,u),i!==void 0){let l=qt.basename(u),c=qt.basename(a),f=c.replace(`${i}-light.svg`,""),p=await $i.readdir(n);for(let m of p){let h=qt.basename(m);h!==l&&h!==c&&h.startsWith(f)&&h.endsWith(".svg")&&await $i.rm(qt.join(n,h))}}return Fy(a,u,t)}}};async function Fy(e,t,r){let{packageFile:n}=await dn();if(n===void 0)throw new Error("No package file found");let i=qt.dirname(n),o=qt.relative(i,e);return`<picture>
177
+ `)},order:6}};import{tldrawToImage as Oy}from"@kitschpatrol/tldraw-cli";import c1 from"node:crypto";import $i from"node:fs/promises";import qt from"node:path";var My={tldraw:{async content(e){let{alt:t="tldraw diagram",src:r}=L.object({alt:L.string().optional(),src:L.string()}).parse(e),{assetsPath:n}=await dn();if(n===void 0)throw new Error("No assets path found");await $i.mkdir(n,{recursive:!0});let i=await Yn(r)?await Ly(r):void 0;if(i!==void 0){let l=qt.basename(r,qt.extname(r)),c=qt.join(n,`${l}-${i}-light.svg`),f=qt.join(n,`${l}-${i}-dark.svg`);if(await Yn(c)&&await Yn(f))return Ny(c,f,t)}let[o]=await Oy(r,{dark:!1,format:"svg",output:n,transparent:!0});i??=await Ly(o);let a=`${Py(o)}-${i}-light.svg`;await $i.rename(o,a);let[s]=await Oy(r,{dark:!0,format:"svg",output:n,transparent:!0}),u=`${Py(s)}-${i}-dark.svg`;if(await $i.rename(s,u),i!==void 0){let l=qt.basename(u),c=qt.basename(a),f=c.replace(`${i}-light.svg`,""),p=await $i.readdir(n);for(let m of p){let h=qt.basename(m);h!==l&&h!==c&&h.startsWith(f)&&h.endsWith(".svg")&&await $i.rm(qt.join(n,h))}}return Ny(a,u,t)}}};async function Ny(e,t,r){let{packageFile:n}=await dn();if(n===void 0)throw new Error("No package file found");let i=qt.dirname(n),o=qt.relative(i,e);return`<picture>
177
178
  <source media="(prefers-color-scheme: dark)" srcset="${qt.relative(i,t)}">
178
179
  <source media="(prefers-color-scheme: light)" srcset="${o}">
179
180
  <img alt="${r}" src="${o}">
180
- </picture>`}async function Oy(e){let t=await $i.readFile(e),r=a1.createHash("sha1");return r.update(t),r.digest("hex").slice(0,8)}function Ny(e){return e.replace(/\.[^./]+$/,"")}import{getSoleRule as s1}from"remark-mdat";var Py={toc:s1(tu)};var My={...va,...Ia,...cy,...Vs,...py,...Gs,...Hs,...dy,...hy,...Ws,...Ks,...yy,...ky,...tu,...Zs,...Ly,...Py};async function Ln(e){let t={addMetaComment:!0,rules:My},{additionalConfig:r=[],...n}=e??{},i=Array.isArray(r)?r:[r],o=await Ut({additionalConfig:[t,...i],...n});if(o.packageFile===void 0)throw new Error("Package file path is required in `mdat readme` config");return o}import qo from"node:path";import c1 from"node:process";import f1 from"node:path";import zQ,{promises as By}from"node:fs";import{fileURLToPath as p1}from"node:url";var af=class{value;next;constructor(t){this.value=t}},$o=class{#e;#t;#r;constructor(){this.clear()}enqueue(t){let r=new af(t);this.#e?(this.#t.next=r,this.#t=r):(this.#e=r,this.#t=r),this.#r++}dequeue(){let t=this.#e;if(t)return this.#e=this.#e.next,this.#r--,t.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 t=this.#e;for(;t;)yield t.value,t=t.next}};function ru(e){if(!((Number.isInteger(e)||e===Number.POSITIVE_INFINITY)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=new $o,r=0,n=()=>{r--,t.size>0&&t.dequeue()()},i=async(s,u,l)=>{r++;let c=(async()=>s(...l))();u(c);try{await c}catch{}n()},o=(s,u,l)=>{t.enqueue(i.bind(void 0,s,u,l)),(async()=>(await Promise.resolve(),r<e&&t.size>0&&t.dequeue()()))()},a=(s,...u)=>new Promise(l=>{o(s,l,u)});return Object.defineProperties(a,{activeCount:{get:()=>r},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),a}var nu=class extends Error{constructor(t){super(),this.value=t}},u1=async(e,t)=>t(await e),l1=async e=>{let t=await Promise.all(e);if(t[1]===!0)throw new nu(t[0]);return!1};async function sf(e,t,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){let i=ru(r),o=[...e].map(s=>[s,i(u1,s,t)]),a=ru(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(o.map(s=>a(l1,s)))}catch(s){if(s instanceof nu)return s.value;throw s}}var Uy={directory:"isDirectory",file:"isFile"};function m1(e){if(!Object.hasOwnProperty.call(Uy,e))throw new Error(`Invalid type specified: ${e}`)}var d1=(e,t)=>t[Uy[e]](),h1=e=>e instanceof URL?p1(e):e;async function uf(e,{cwd:t=c1.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:i,preserveOrder:o}={}){m1(r),t=h1(t);let a=n?By.stat:By.lstat;return sf(e,async s=>{try{let u=await a(f1.resolve(t,s));return d1(r,u)}catch{return!1}},{concurrency:i,preserveOrder:o})}import{fileURLToPath as g1}from"node:url";function lf(e){return e instanceof URL?g1(e):e}var x1=Symbol("findUpStop");async function y1(e,t={}){let r=qo.resolve(lf(t.cwd)??""),{root:n}=qo.parse(r),i=qo.resolve(r,lf(t.stopAt??n)),o=t.limit??Number.POSITIVE_INFINITY,a=[e].flat(),s=async l=>{if(typeof e!="function")return uf(a,l);let c=await e(l.cwd);return typeof c=="string"?uf([c],l):c},u=[];for(;;){let l=await s({...t,cwd:r});if(l===x1||(l&&u.push(qo.resolve(r,l)),r===i||u.length>=o))break;r=qo.dirname(r)}return u}async function zy(e,t={}){return(await y1(e,{...t,limit:1}))[0]}import E1 from"node:path";async function jy({cwd:e}={}){let t=await Jo("package.json",{cwd:e});return t&&E1.dirname(t)}import{log as $y}from"remark-mdat";async function b1(){$y.info("Searching for package directory...");let e=await jy()??process.cwd(),t=await zy("readme.md",{stopAt:e,type:"file"});if(t!==void 0)return $y.info(`Found closest readme at "${t}"`),t}async function iu(){let e=await b1();if(e===void 0)throw new Error("No readme found");return e}async function k1(e,t,r,n,i){return e??=await iu(),Fr(e,Ln,ii,t,r,n,i)}async function A1(e,t,r){return Cn(e,Ln,ii,t,r)}async function T1(e,t,r,n,i){return e??=await iu(),Fr(e,Ln,oi,t,r,n,i)}async function C1(e,t,r){return Cn(e,Ln,oi,t,r)}async function w1(e,t,r,n,i){return e??=await iu(),Fr(e,Ln,uo,t,r,n,i)}export{xC as checkFiles,T1 as checkReadmeFiles,C1 as checkReadmeString,yC as checkString,EC as collapseFiles,w1 as collapseReadmeFiles,bC as collapseString,hC as expandFiles,k1 as expandReadmeFiles,A1 as expandReadmeString,gC as expandString,Ut as loadConfig,Ln as loadConfigReadme,Gb as mergeConfigs};
181
+ </picture>`}async function Ly(e){let t=await $i.readFile(e),r=c1.createHash("sha1");return r.update(t),r.digest("hex").slice(0,8)}function Py(e){return e.replace(/\.[^./]+$/,"")}import{getSoleRule as f1}from"remark-mdat";var By={toc:f1(tu)};var Uy={...va,...Ia,...py,...Vs,...dy,...Gs,...Hs,...gy,...xy,...Ws,...Ks,...by,...Ty,...tu,...Zs,...My,...By};async function Ln(e){let t={addMetaComment:!0,rules:Uy},{additionalConfig:r=[],...n}=e??{},i=Array.isArray(r)?r:[r],o=await Ut({additionalConfig:[t,...i],...n});if(o.packageFile===void 0)throw new Error("Package file path is required in `mdat readme` config");return o}import qo from"node:path";import d1 from"node:process";import h1 from"node:path";import VQ,{promises as zy}from"node:fs";import{fileURLToPath as g1}from"node:url";var af=class{value;next;constructor(t){this.value=t}},$o=class{#e;#t;#r;constructor(){this.clear()}enqueue(t){let r=new af(t);this.#e?(this.#t.next=r,this.#t=r):(this.#e=r,this.#t=r),this.#r++}dequeue(){let t=this.#e;if(t)return this.#e=this.#e.next,this.#r--,t.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 t=this.#e;for(;t;)yield t.value,t=t.next}};function ru(e){if(!((Number.isInteger(e)||e===Number.POSITIVE_INFINITY)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=new $o,r=0,n=()=>{r--,t.size>0&&t.dequeue()()},i=async(s,u,l)=>{r++;let c=(async()=>s(...l))();u(c);try{await c}catch{}n()},o=(s,u,l)=>{t.enqueue(i.bind(void 0,s,u,l)),(async()=>(await Promise.resolve(),r<e&&t.size>0&&t.dequeue()()))()},a=(s,...u)=>new Promise(l=>{o(s,l,u)});return Object.defineProperties(a,{activeCount:{get:()=>r},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),a}var nu=class extends Error{constructor(t){super(),this.value=t}},p1=async(e,t)=>t(await e),m1=async e=>{let t=await Promise.all(e);if(t[1]===!0)throw new nu(t[0]);return!1};async function sf(e,t,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){let i=ru(r),o=[...e].map(s=>[s,i(p1,s,t)]),a=ru(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(o.map(s=>a(m1,s)))}catch(s){if(s instanceof nu)return s.value;throw s}}var jy={directory:"isDirectory",file:"isFile"};function x1(e){if(!Object.hasOwnProperty.call(jy,e))throw new Error(`Invalid type specified: ${e}`)}var y1=(e,t)=>t[jy[e]](),E1=e=>e instanceof URL?g1(e):e;async function uf(e,{cwd:t=d1.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:i,preserveOrder:o}={}){x1(r),t=E1(t);let a=n?zy.stat:zy.lstat;return sf(e,async s=>{try{let u=await a(h1.resolve(t,s));return y1(r,u)}catch{return!1}},{concurrency:i,preserveOrder:o})}import{fileURLToPath as b1}from"node:url";function lf(e){return e instanceof URL?b1(e):e}var k1=Symbol("findUpStop");async function A1(e,t={}){let r=qo.resolve(lf(t.cwd)??""),{root:n}=qo.parse(r),i=qo.resolve(r,lf(t.stopAt??n)),o=t.limit??Number.POSITIVE_INFINITY,a=[e].flat(),s=async l=>{if(typeof e!="function")return uf(a,l);let c=await e(l.cwd);return typeof c=="string"?uf([c],l):c},u=[];for(;;){let l=await s({...t,cwd:r});if(l===k1||(l&&u.push(qo.resolve(r,l)),r===i||u.length>=o))break;r=qo.dirname(r)}return u}async function $y(e,t={}){return(await A1(e,{...t,limit:1}))[0]}import T1 from"node:path";async function qy({cwd:e}={}){let t=await Jo("package.json",{cwd:e});return t&&T1.dirname(t)}import{log as Vy}from"remark-mdat";async function C1(){Vy.info("Searching for package directory...");let e=await qy()??process.cwd(),t=await $y("readme.md",{stopAt:e,type:"file"});if(t!==void 0)return Vy.info(`Found closest readme at "${t}"`),t}async function iu(){let e=await C1();if(e===void 0)throw new Error("No readme found");return e}async function w1(e,t){return Gy(void 0,void 0,void 0,e,t)}async function Gy(e,t,r,n,i){return e??=await iu(),Fr(e,Ln,ii,t,r,n,i)}async function S1(e,t,r){return Cn(e,Ln,ii,t,r)}async function v1(e,t){return Hy(void 0,void 0,void 0,e,t)}async function Hy(e,t,r,n,i){return e??=await iu(),Fr(e,Ln,oi,t,r,n,i)}async function _1(e,t,r){return Cn(e,Ln,oi,t,r)}async function I1(e,t){return Wy(void 0,void 0,void 0,e,t)}async function Wy(e,t,r,n,i){return e??=await iu(),Fr(e,Ln,uo,t,r,n,i)}export{kC as checkFiles,v1 as checkReadme,Hy as checkReadmeFiles,_1 as checkReadmeString,AC as checkString,TC as collapseFiles,I1 as collapseReadme,Wy as collapseReadmeFiles,CC as collapseString,EC as expandFiles,w1 as expandReadme,Gy as expandReadmeFiles,S1 as expandReadmeString,bC as expandString,Ut as loadConfig,Ln as loadConfigReadme,Yb as mergeConfigs};
181
182
  /*! Bundled license information:
182
183
 
183
184
  lodash-es/lodash.js: