mdat 0.9.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,65 +1,66 @@
1
- var Wy=Object.create;var iu=Object.defineProperty;var Ky=Object.getOwnPropertyDescriptor;var Zy=Object.getOwnPropertyNames;var Yy=Object.getPrototypeOf,Xy=Object.prototype.hasOwnProperty;var ou=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Jy=(e,t)=>{for(var r in t)iu(e,r,{get:t[r],enumerable:!0})},Qy=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Zy(t))!Xy.call(e,i)&&i!==r&&iu(e,i,{get:()=>t[i],enumerable:!(n=Ky(t,i))||n.enumerable});return e};var pf=(e,t,r)=>(r=e!=null?Wy(Yy(e)):{},Qy(t||!e||!e.__esModule?iu(r,"default",{value:e,enumerable:!0}):r,e));var Cf=ou((M1,hE)=>{hE.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 Sf=ou((B1,wf)=>{"use strict";var gE=Cf();wf.exports=new Map(Object.entries(gE))});var fd=ou((S2,cd)=>{"use strict";var Aa=Object.prototype.hasOwnProperty,ld=Object.prototype.toString,nd=Object.defineProperty,id=Object.getOwnPropertyDescriptor,od=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ld.call(t)==="[object Array]"},ad=function(t){if(!t||ld.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)},sd=function(t,r){nd&&r.name==="__proto__"?nd(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},ud=function(t,r){if(r==="__proto__")if(Aa.call(t,r)){if(id)return id(t,r).value}else return;return t[r]};cd.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=ud(s,r),i=ud(t,r),s!==i&&(c&&i&&(ad(i)||(o=od(i)))?(o?(o=!1,a=n&&od(n)?n:[]):a=n&&ad(n)?n:{},sd(s,{name:r,newValue:e(c,a,i)})):typeof i<"u"&&sd(s,{name:r,newValue:i}));return s}});var df=(e=0)=>t=>`\x1B[${t+e}m`,mf=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,hf=(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]}},C1=Object.keys(be.modifier),eE=Object.keys(be.color),tE=Object.keys(be.bgColor),w1=[...eE,...tE];function rE(){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=mf(),be.color.ansi16m=hf(),be.bgColor.ansi=df(10),be.bgColor.ansi256=mf(10),be.bgColor.ansi16m=hf(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 nE=rE(),Mt=nE;import au from"node:process";import iE from"node:os";import gf from"node:tty";function It(e,t=globalThis.Deno?globalThis.Deno.args:au.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}=au,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 oE(){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 aE(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function sE(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=oE();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(au.platform==="win32"){let a=iE.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 xf(e,t={}){let r=sE(e,{streamIsTTY:e&&e.isTTY,...t});return aE(r)}var uE={stdout:xf({isTTY:gf.isatty(1)}),stderr:xf({isTTY:gf.isatty(2)})},yf=uE;function Ef(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 bf(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:kf,stderr:Af}=yf,su=Symbol("GENERATOR"),Un=Symbol("STYLER"),Hi=Symbol("IS_EMPTY"),Tf=["ansi","ansi","ansi256","ansi16m"],zn=Object.create(null),lE=(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=kf?kf.level:0;e.level=t.level===void 0?r:t.level};var cE=e=>{let t=(...r)=>r.join(" ");return lE(t,e),Object.setPrototypeOf(t,Wi.prototype),t};function Wi(e){return cE(e)}Object.setPrototypeOf(Wi.prototype,Function.prototype);for(let[e,t]of Object.entries(Mt))zn[e]={get(){let r=Go(this,lu(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 uu=(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"?uu("rgb",t,r,...Mt.hexToRgb(...n)):Mt[r][e](...n),fE=["rgb","hex","ansi256"];for(let e of fE){zn[e]={get(){let{level:r}=this;return function(...n){let i=lu(uu(e,Tf[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=lu(uu(e,Tf[r],"bgColor",...n),Mt.bgColor.close,this[Un]);return Go(this,i,this[Hi])}}}}var pE=Object.defineProperties(()=>{},{...zn,level:{enumerable:!0,get(){return this[su].level},set(e){this[su].level=e}}}),lu=(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)=>dE(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,pE),n[su]=e,n[Un]=t,n[Hi]=r,n},dE=(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=Ef(t,r.close,r.open),r=r.parent;let o=t.indexOf(`
5
- `);return o!==-1&&(t=bf(t,i,n,o)),n+t+i};Object.defineProperties(Wi.prototype,zn);var mE=Wi(),L1=Wi({level:Af?Af.level:0});var cu=mE;import{cosmiconfig as Wf}from"cosmiconfig";import{TypeScriptLoader as Kf}from"cosmiconfig-typescript-loader";import Mb from"node:fs/promises";import Xf from"node:path";var fu=pf(Sf(),1);function pu(e,t,r){if(typeof t=="number"&&(r=t),fu.default.has(e.toLowerCase())){t=fu.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 Bb}from"read-pkg";import{deepMergeDefined as Qo,log as Ft,optionsSchema as Ub,rulesSchema as zb}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 mu;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(mu||(mu={}));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"]),xE=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}},If=qn;function yE(e){If=e}function Ho(){return If}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}},EE=[];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}),hu=e=>e.status==="aborted",gu=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 Rf(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}},vf=(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 vf(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 vf(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 dr.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 dn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},bE=/^c[^\s-]{8,}$/i,kE=/^[0-9a-z]+$/,AE=/^[0-9A-HJKMNP-TV-Z]{26}$/i,TE=/^[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,CE=/^[a-z0-9_-]{21}$/i,wE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,SE=/^[-+]?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)?)??$/,vE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_E="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",du,IE=/^(?:(?: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])$/,RE=/^(?:(?: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])$/,DE=/^(([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]))$/,FE=/^(([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])$/,OE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,NE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Df="((\\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])))",LE=new RegExp(`^${Df}$`);function Ff(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 PE(e){return new RegExp(`^${Ff(e)}$`)}function Of(e){let t=`${Df}T${Ff(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 ME(e,t){return!!((t==="v4"||!t)&&IE.test(e)||(t==="v6"||!t)&&DE.test(e))}function BE(e,t){if(!wE.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 UE(e,t){return!!((t==="v4"||!t)&&RE.test(e)||(t==="v6"||!t)&&FE.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")vE.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(_E,"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")TE.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")CE.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")bE.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")kE.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")AE.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"?Of(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"?LE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{code:w.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?PE(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"?SE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"duration",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?ME(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"?BE(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"?UE(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"?OE.test(t.data)||(i=this._getOrReturnCtx(t,i),I(i,{validation:"base64",code:w.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?NE.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 zE(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"?zE(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 dr=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)}};dr.create=(e,t)=>new dr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...K(t)});function jn(e){if(e instanceof mt){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Rt.create(jn(n))}return new mt({...e._def,shape:()=>t})}else return e instanceof dr?new dr({...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 mt=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 Nf(oe.objectKeys(this.shape))}};mt.create=(e,t)=>new mt({shape:()=>e,unknownKeys:"strip",catchall:Bt.create(),typeName:$.ZodObject,...K(t)});mt.strictCreate=(e,t)=>new mt({shape:()=>e,unknownKeys:"strict",catchall:Bt.create(),typeName:$.ZodObject,...K(t)});mt.lazycreate=(e,t)=>new mt({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 dn?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 xu(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=xu(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=xu(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(hu(o)||hu(a))return q;let s=xu(o.value,a.value);return s.valid?((gu(o)||gu(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(d=>{throw l.addIssue(n(u,d)),l}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,o).catch(d=>{throw l.addIssue(i(f,d)),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 Nf(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")||Rf(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=Nf;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")||Rf(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 jE=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})}},dn=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}};dn.create=(e,t)=>new dn({innerType:e,typeName:$.ZodReadonly,...K(t)});function Lf(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 $E={object:mt.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 qE=(e,t={message:`Input not instance of ${e.name}`})=>Lf(r=>r instanceof e,t),Pf=wr.create,Mf=Jr.create,VE=Kn.create,GE=Qr.create,Bf=en.create,HE=tn.create,WE=Vn.create,KE=rn.create,ZE=nn.create,YE=Sr.create,XE=pr.create,JE=Bt.create,QE=Gn.create,eb=dr.create,tb=mt.create,rb=mt.strictCreate,nb=on.create,ib=Zo.create,ob=an.create,ab=Vt.create,sb=Yo.create,ub=Hn.create,lb=Wn.create,cb=Xo.create,fb=sn.create,pb=un.create,db=ln.create,mb=cn.create,hb=vr.create,_f=Tt.create,gb=Rt.create,xb=Gt.create,yb=Tt.createWithPreprocess,Eb=Ji.create,bb=()=>Pf().optional(),kb=()=>Mf().optional(),Ab=()=>Bf().optional(),Tb={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})},Cb=q,L=Object.freeze({__proto__:null,defaultErrorMap:qn,setErrorMap:yE,getErrorMap:Ho,makeIssue:Wo,EMPTY_PATH:EE,addIssueToContext:I,ParseStatus:Je,INVALID:q,DIRTY:$n,OK:at,isAborted:hu,isDirty:gu,isValid:Xr,isAsync:Yi,get util(){return oe},get objectUtil(){return mu},ZodParsedType:F,getParsedType:fr,ZodType:Z,datetimeRegex:Of,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:dr,ZodObject:mt,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:jE,ZodBranded:Xi,ZodPipeline:Ji,ZodReadonly:dn,custom:Lf,Schema:Z,ZodSchema:Z,late:$E,get ZodFirstPartyTypeKind(){return $},coerce:Tb,any:YE,array:eb,bigint:GE,boolean:Bf,date:HE,discriminatedUnion:ib,effect:_f,enum:db,function:cb,instanceof:qE,intersection:ob,lazy:fb,literal:pb,map:ub,nan:VE,nativeEnum:mb,never:JE,null:ZE,nullable:xb,number:Mf,object:tb,oboolean:Ab,onumber:kb,optional:gb,ostring:bb,pipeline:Eb,preprocess:yb,promise:hb,record:sb,set:lb,strictObject:rb,string:Pf,symbol:WE,transformer:_f,tuple:ab,undefined:KE,union:nb,unknown:XE,void:QE,NEVER:Cb,ZodIssueCode:w,quotelessJson:xE,ZodError:At});import{defaultLoaders as wb}from"cosmiconfig";function yu(e,t){let r=wb[".json"],n=r(e,t);return Uf(n)}function Uf(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)?Uf(i,o,r):i===null?r[o]="null":r[o]=i.toString()}return r}import Nb from"node:fs";import mr from"node:path";import Rb from"node:process";import Sb from"node:process";import vb from"node:fs/promises";import{fileURLToPath as _b}from"node:url";import Zn from"node:path";var zf=e=>e instanceof URL?_b(e):e;async function Jo(e,{cwd:t=Sb.cwd(),type:r="file",stopAt:n}={}){let i=Zn.resolve(zf(t)??""),{root:o}=Zn.parse(i);for(n=Zn.resolve(i,zf(n??o));i&&i!==n&&i!==o;){let a=Zn.isAbsolute(e)?e:Zn.join(i,e);try{let s=await vb.stat(a);if(r==="file"&&s.isFile()||r==="directory"&&s.isDirectory())return a}catch{}i=Zn.dirname(i)}}async function jf({cwd:e=Rb.cwd()}={}){return Jo("package.json",{cwd:e})}import Db from"node:fs";import Fb from"node:fs/promises";async function Eu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await Fb[e](r))[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function bu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return Db[e](r)[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var Yn=Eu.bind(void 0,"stat","isFile"),Q1=Eu.bind(void 0,"stat","isDirectory"),eO=Eu.bind(void 0,"lstat","isSymbolicLink"),ku=bu.bind(void 0,"statSync","isFile"),tO=bu.bind(void 0,"statSync","isDirectory"),rO=bu.bind(void 0,"lstatSync","isSymbolicLink");import Ob from"node:os";var $f=Ob.homedir();function Au(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return $f?e.replace(/^~(?=$|\/|\\)/,$f):e}function Lb(e,t){let r=t===0?1:Math.floor(Math.log10(Math.abs(t))+1);return e.toString().padStart(r,"0")}function Vf(e,t,r,n){let i=[];for(let[o,a]of e.entries()){let s=r&&e.length>1?`-${Lb(o+1,e.length+1)}`:"",u=Pb(a,t,r,n,s);i.push(u)}return i}function Pb(e,t,r,n,i=""){let o=qf(e),a=t?qf(t):void 0;if(!ku(o))throw new Error(`Input file not found: "${o}"`);if(a){if(ku(a))throw new Error(`Output path must be a directory, received a file path: "${a}"`);Nb.mkdirSync(a,{recursive:!0})}let s=r?mr.basename(r,mr.extname(r)):mr.basename(o,mr.extname(o)),u=`.${n??(r&&mr.extname(r)!==""?mr.extname(r):mr.extname(e)===""?"":mr.extname(e))}`,l=`${s}${i}${u}`,c=a??mr.dirname(o);return{input:o,name:l,output:c}}function qf(e){return Au(e)}async function Gf(){return jf()}function Hf(e){return e==null?[]:Array.isArray(e)?e:[e]}var Zf=Ub.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 Gf(),rules:{mdat:"Powered by the Markdown Autophagic Template system: [mdat](https://github.com/kitschpatrol/mdat)."}},o=Wf("mdat",{loaders:{".ts":Kf()}}),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=Yf(l,Zf);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:d}=f;Ft.info(`Loaded additional config from "${d}"`),l=p}else l=u;if(l===void 0)continue;Ft.info("Merging configuration object");let c=Yf(l,Zf);c!==void 0&&(i=Qo(i,c))}}if(r!==void 0){let s=Array.isArray(r)?r:[r],u=Wf("mdat",{loaders:{".json":yu,".ts":Kf()}});for(let l of s){let c;if(typeof l=="string"){let p;if(Xf.basename(l).endsWith("package.json")){let E=await Mb.readFile(l,"utf8");p={config:yu(l,E),filepath:l}}else p=await u.load(l);if(p==null)continue;let{config:d,filepath:h}=p;Ft.info(`Loaded additional config from "${h}"`),c=d}else c=l;if(c===void 0)continue;Ft.info("Merging rules into configuration object");let f=jb(c,zb);f!==void 0&&(i=Qo(i,f))}}if(i.rules){let s=Object.keys(i.rules).sort().map(u=>`"${cu.bold.green(u)}"`);Ft.info(`Loaded ${cu.bold(s.length)} mdat comment expansion ${pu("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 jb(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 Yf(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 mn(){return ea===void 0&&(Ft.warn("getConfig(): config was undefined"),ea??=await Ut()),ea}var Tu;async function Ct(){let{packageFile:e}=await mn();if(e===void 0)throw new Error("No packageFile found or set in config");if(Tu??=await Bb({cwd:Xf.dirname(e)}),Tu===void 0)throw new Error("No package.json found");return Tu}function $b(e,t){return Qo(e,t)}var qb={};function hr(e,t){let r=t||qb,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Qf(e,n,i)}function Qf(e,t,r){if(Vb(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 Jf(e.children,t,r)}return Array.isArray(e)?Jf(e,t,r):""}function Jf(e,t,r){let n=[],i=-1;for(;++i<e.length;)n[i]=Qf(e[i],t,r);return n.join("")}function Vb(e){return!!(e&&typeof e=="object")}var Cu={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 Gb={}.hasOwnProperty;function Xn(e){return Gb.call(Cu,e)?Cu[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 ep={}.hasOwnProperty;function ta(e){let t={},r=-1;for(;++r<e.length;)Hb(t,e[r]);return t}function Hb(e,t){let r;for(r in t){let i=(ep.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r],a;if(o)for(a in o){ep.call(i,a)||(i[a]=[]);let s=o[a];Wb(i[a],Array.isArray(s)?s:s?[s]:[])}}}function Wb(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]/),tp=_r(/[#-'*+\--9=?A-Z^-~]/);function hn(e){return e!==null&&(e<32||e===127)}var Qi=_r(/\d/),rp=_r(/[\dA-Fa-f]/),np=_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 ip={tokenize:Kb};function Kb(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 ap={tokenize:Zb},op={tokenize:Yb};function Zb(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(op,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(op,d,h)(y)}function d(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){T(e.exit("chunkFlow"),!0),x(0),e.consume(y);return}return R(y)?(e.consume(y),T(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(y),E)}function T(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 Yb(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:Xb,tokenize:Jb};function Xb(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};sp(f,-u),sp(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 Jb(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 sp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var wu={name:"autolink",tokenize:Qb};function Qb(e,t,r){let n=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return je(d)?(e.consume(d),a):d===64?r(d):l(d)}function a(d){return d===43||d===45||d===46||$e(d)?(n=1,s(d)):l(d)}function s(d){return d===58?(e.consume(d),n=0,u):(d===43||d===45||d===46||$e(d))&&n++<32?(e.consume(d),s):(n=0,l(d))}function u(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||hn(d)?r(d):(e.consume(d),u)}function l(d){return d===64?(e.consume(d),c):tp(d)?(e.consume(d),l):r(d)}function c(d){return $e(d)?f(d):r(d)}function f(d){return d===46?(e.consume(d),n=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||$e(d))&&n++<63){let h=d===45?p:f;return e.consume(d),h}return r(d)}}var Wt={partial:!0,tokenize:ek};function ek(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:rk},exit:nk,name:"blockQuote",tokenize:tk};function tk(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 rk(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 nk(e){e.exit("blockQuote")}var ia={name:"characterEscape",tokenize:ik};function ik(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 np(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}var oa={name:"characterReference",tokenize:ok};function ok(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=rp,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 up={partial:!0,tokenize:sk},aa={concrete:!0,name:"codeFenced",tokenize:ak};function ak(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(up,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,d,"whitespace")(A)):A===96&&A===s?r(A):(e.consume(A),p)}function d(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,T)(A)}function T(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(up,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 sk(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:lk},uk={partial:!0,tokenize:ck};function lk(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(uk,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 ck(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 Su={name:"codeText",previous:pk,resolve:fk,tokenize:dk};function fk(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 pk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function dk(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,mk(c,r)),r=t[r],l=!0);else if(n[1]._container){for(o=r,i=void 0;o--&&(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);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 mk(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,d=r,h=0,E=0,T=[E];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=n.sliceStream(d),d.next||c.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=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,T.push(E),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):T.pop(),p=T.length;p--;){let x=s.slice(T[p],T[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 vu={resolve:gk,tokenize:xk},hk={partial:!0,tokenize:yk};function gk(e){return ua(e),e}function xk(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(hk,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 yk(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"}),d(x))}function d(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:d)}function h(x){return x===60||x===62||x===92?(e.consume(x),d):d(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?T:E)}function T(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(d){return e.enter(n),e.enter(i),e.consume(d),e.exit(i),e.enter(o),c}function c(d){return s>999||d===null||d===91||d===93&&!u||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?r(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(n),t):R(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||R(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),u||(u=!z(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}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 _u={name:"definition",tokenize:bk},Ek={partial:!0,tokenize:kk};function bk(e,t,r){let n=this,i;return o;function o(d){return e.enter("definition"),a(d)}function a(d){return ca.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=Qe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),u):r(d)}function u(d){return Y(d)?xn(e,l)(d):l(d)}function l(d){return la(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(Ek,f,f)(d)}function f(d){return z(d)?U(e,p,"whitespace")(d):p(d)}function p(d){return d===null||R(d)?(e.exit("definition"),n.parser.defined.push(i),t(d)):r(d)}}function kk(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 Iu={name:"hardBreakEscape",tokenize:Ak};function Ak(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 Ru={name:"headingAtx",resolve:Tk,tokenize:Ck};function Tk(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 Ck(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 lp=["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"],Du=["pre","script","style","textarea"];var Fu={concrete:!0,name:"htmlFlow",resolveTo:vk,tokenize:_k},wk={partial:!0,tokenize:Rk},Sk={partial:!0,tokenize:Ik};function vk(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 _k(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:m):je(g)?(e.consume(g),a=String.fromCharCode(g),T):r(g)}function p(g){return g===45?(e.consume(g),i=2,d):g===91?(e.consume(g),i=5,s=0,h):je(g)?(e.consume(g),i=4,n.interrupt?t:m):r(g)}function d(g){return g===45?(e.consume(g),n.interrupt?t:m):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),T):r(g)}function T(g){if(g===null||g===47||g===62||Y(g)){let Xe=g===47,ze=a.toLowerCase();return!Xe&&!o&&Du.includes(ze)?(i=1,n.interrupt?t(g):Q(g)):lp.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),T):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),m):g===93&&i===5?(e.consume(g),Et):R(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(wk,vt,B)(g)):g===null||R(g)?(e.exit("htmlFlowData"),B(g)):(e.consume(g),Q)}function B(g){return e.check(Sk,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),m):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 Du.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),m):Q(g)}function m(g){return g===62?(e.consume(g),it):g===45&&i===2?(e.consume(g),m):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 Ik(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 Rk(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Wt,t,r)}}var Ou={name:"htmlText",tokenize:Dk};function Dk(e,t,r){let n=this,i,o,a;return s;function s(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),l):m===47?(e.consume(m),v):m===63?(e.consume(m),y):je(m)?(e.consume(m),J):r(m)}function l(m){return m===45?(e.consume(m),c):m===91?(e.consume(m),o=0,h):je(m)?(e.consume(m),k):r(m)}function c(m){return m===45?(e.consume(m),d):r(m)}function f(m){return m===null?r(m):m===45?(e.consume(m),p):R(m)?(a=f,xe(m)):(e.consume(m),f)}function p(m){return m===45?(e.consume(m),d):f(m)}function d(m){return m===62?ae(m):m===45?p(m):f(m)}function h(m){let it="CDATA[";return m===it.charCodeAt(o++)?(e.consume(m),o===it.length?E:h):r(m)}function E(m){return m===null?r(m):m===93?(e.consume(m),T):R(m)?(a=E,xe(m)):(e.consume(m),E)}function T(m){return m===93?(e.consume(m),x):E(m)}function x(m){return m===62?ae(m):m===93?(e.consume(m),x):E(m)}function k(m){return m===null||m===62?ae(m):R(m)?(a=k,xe(m)):(e.consume(m),k)}function y(m){return m===null?r(m):m===63?(e.consume(m),S):R(m)?(a=y,xe(m)):(e.consume(m),y)}function S(m){return m===62?ae(m):y(m)}function v(m){return je(m)?(e.consume(m),A):r(m)}function A(m){return m===45||$e(m)?(e.consume(m),A):te(m)}function te(m){return R(m)?(a=te,xe(m)):z(m)?(e.consume(m),te):ae(m)}function J(m){return m===45||$e(m)?(e.consume(m),J):m===47||m===62||Y(m)?re(m):r(m)}function re(m){return m===47?(e.consume(m),ae):m===58||m===95||je(m)?(e.consume(m),b):R(m)?(a=re,xe(m)):z(m)?(e.consume(m),re):ae(m)}function b(m){return m===45||m===46||m===58||m===95||$e(m)?(e.consume(m),b):ce(m)}function ce(m){return m===61?(e.consume(m),Q):R(m)?(a=ce,xe(m)):z(m)?(e.consume(m),ce):re(m)}function Q(m){return m===null||m===60||m===61||m===62||m===96?r(m):m===34||m===39?(e.consume(m),i=m,B):R(m)?(a=Q,xe(m)):z(m)?(e.consume(m),Q):(e.consume(m),V)}function B(m){return m===i?(e.consume(m),i=void 0,G):m===null?r(m):R(m)?(a=B,xe(m)):(e.consume(m),B)}function V(m){return m===null||m===34||m===39||m===60||m===61||m===96?r(m):m===47||m===62||Y(m)?re(m):(e.consume(m),V)}function G(m){return m===47||m===62||Y(m)?re(m):r(m)}function ae(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):r(m)}function xe(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Ye}function Ye(m){return z(m)?U(e,Et,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):Et(m)}function Et(m){return e.enter("htmlTextData"),a(m)}}var yn={name:"labelEnd",resolveAll:Lk,resolveTo:Pk,tokenize:Mk},Fk={tokenize:Bk},Ok={tokenize:Uk},Nk={tokenize:zk};function Lk(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 Pk(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 Mk(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(Fk,c,a?c:f)(p):p===91?e.attempt(Ok,c,a?l:f)(p):a?c(p):f(p)}function l(p){return e.attempt(Nk,c,f)(p)}function c(p){return t(p)}function f(p){return o._balanced=!0,r(p)}}function Bk(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 Uk(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 zk(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 Nu={name:"labelStartImage",resolveAll:yn.resolveAll,tokenize:jk};function jk(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 Lu={name:"labelStartLink",resolveAll:yn.resolveAll,tokenize:$k};function $k(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:qk};function qk(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:Vk};function Vk(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:Kk},exit:Yk,name:"list",tokenize:Wk},Gk={partial:!0,tokenize:Xk},Hk={partial:!0,tokenize:Zk};function Wk(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(d){let h=n.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!n.containerState.marker||d===n.containerState.marker:Qi(d)){if(n.containerState.type||(n.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(En,r,l)(d):l(d);if(!n.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(d)}return r(d)}function u(d){return Qi(d)&&++a<10?(e.consume(d),u):(!n.interrupt||a<2)&&(n.containerState.marker?d===n.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),l(d)):r(d)}function l(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||d,e.check(Wt,n.interrupt?r:c,e.attempt(Gk,p,f))}function c(d){return n.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return z(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):r(d)}function p(d){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function Kk(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(Hk,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 Zk(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 Yk(e){e.exit(this.containerState.type)}function Xk(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:Jk,tokenize:Qk};function Jk(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 Qk(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 cp={tokenize:eA};function eA(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(vu,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 fp={resolveAll:hp()},pp=mp("string"),dp=mp("text");function mp(e){return{resolveAll:hp(e==="text"?tA: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 d=f[p];if(!d.previous||d.previous.call(n,n.previous))return!0}return!1}}}function hp(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 tA(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 Pu={};Jy(Pu,{attentionMarkers:()=>lA,contentInitial:()=>nA,disable:()=>cA,document:()=>rA,flow:()=>oA,flowInitial:()=>iA,insideSpan:()=>uA,string:()=>aA,text:()=>sA});var rA={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},nA={91:_u},iA={[-2]:to,[-1]:to,32:to},oA={35:Ru,42:En,45:[pa,En],60:Fu,61:pa,95:En,96:aa,126:aa},aA={38:oa,92:ia},sA={[-5]:no,[-4]:no,[-3]:no,33:Nu,38:oa,42:eo,60:[wu,Ou],91:Lu,92:[Iu,ia],93:yn,95:eo,96:Su},uA={null:[eo,fp]},lA={null:[42,95]},cA={null:[]};function gp(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:T,parser:e,previous:null,sliceSerialize:h,sliceStream:E,write:d},f=t.tokenize.call(c,l),p;return t.resolveAll&&o.push(t),c;function d(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 pA(E(B),V)}function E(B){return fA(a,B)}function T(){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=T(),c.events.push(["enter",G,c]),s.push(G),G}function A(B){let V=s.pop();return V.end=T(),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,m,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,m=0,se.length===0?Ye:ze(se[m])}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(),++m<Et.length?ze(Et[m]):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=T(),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 fA(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 pA(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 Mu(e){let n={constructs:ta([Pu,...(e||{}).extensions||[]]),content:i(ip),defined:[],document:i(ap),flow:i(cp),lazy:{},string:i(pp),text:i(dp)};return n;function i(o){return a;function a(s){return gp(n,o,s)}}}function Bu(e){for(;!ua(e););return e}var xp=/[\0\t\n\r]/g;function Uu(){let e=1,t="",r=!0,n;return i;function i(o,a,s){let u=[],l,c,f,p,d;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(xp.lastIndex=f,l=xp.exec(o),p=l&&l.index!==void 0?l.index:o.length,d=o.charCodeAt(p),!l){t=o.slice(f);break}if(d===10&&f===p&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),f<p&&(u.push(o.slice(f,p)),e+=p-f),d){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 dA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function da(e){return e.replace(dA,mA)}function mA(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?yp(e.position):"start"in e||"end"in e?yp(e):"line"in e||"column"in e?zu(e):""}function zu(e){return Ep(e&&e.line)+":"+Ep(e&&e.column)}function yp(e){return zu(e&&e.start)+"-"+zu(e&&e.end)}function Ep(e){return e&&typeof e=="number"?e:1}var kp={}.hasOwnProperty;function ju(e,t,r){return typeof t!="string"&&(r=t,t=void 0),hA(r)(Bu(Mu(r).document().write(Uu()(e,t,!0))))}function hA(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(cf),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(lf,a),htmlFlowData:re,htmlText:o(lf,a),htmlTextData:re,image:o(jy),label:a,link:o(cf),listItem:o($y),listItemValue:p,listOrdered:o(ff,f),listUnordered:o(ff),paragraph:o(qy),reference:g,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Mn),strong:o(Vy),thematicBreak:o(Hy)},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(T),codeFencedFence:E,codeFencedFenceInfo:d,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:m,resourceTitleString:it,resource:vt,setextHeading:u(J),setextHeadingLineSequence:te,setextHeadingText:A,strong:u(),thematicBreak:u()}};Ap(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(C){let _={type:"root",children:[]},W={stack:[_],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:c,data:r},ne=[],fe=-1;for(;++fe<C.length;)if(C[fe][1].type==="listOrdered"||C[fe][1].type==="listUnordered")if(C[fe][0]==="enter")ne.push(fe);else{let Pt=ne.pop();fe=i(C,Pt,fe)}for(fe=-1;++fe<C.length;){let Pt=t[C[fe][0]];kp.call(Pt,C[fe][1].type)&&Pt[C[fe][1].type].call(Object.assign({sliceSerialize:C[fe][2].sliceSerialize},W),C[fe][1])}if(W.tokenStack.length>0){let Pt=W.tokenStack[W.tokenStack.length-1];(Pt[1]||bp).call(W,void 0,Pt[0])}for(_.position={start:Rr(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:Rr(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)_=t.transforms[fe](_)||_;return _}function i(C,_,W){let ne=_-1,fe=-1,Pt=!1,Yr,ur,Vi,Gi;for(;++ne<=W;){let kt=C[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=C[Bn];if(lr[1].type==="lineEnding"||lr[1].type==="lineEndingBlank"){if(lr[0]==="exit")continue;ur&&(C[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?C[ur][1].start:kt[1].end),C.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,C.splice(ne,0,["enter",Bn,kt[2]]),ne++,W++,Vi=void 0,Gi=!0}}}return C[_][1]._spread=Pt,W}function o(C,_){return W;function W(ne){s.call(this,C(ne),ne),_&&_.call(this,ne)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(C,_,W){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([_,W||void 0]),C.position={start:Rr(_.start),end:void 0}}function u(C){return _;function _(W){C&&C.call(this,W),l.call(this,W)}}function l(C,_){let W=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==C.type&&(_?_.call(this,C,ne[0]):(ne[1]||bp).call(this,C,ne[0]));else throw new Error("Cannot close `"+C.type+"` ("+Jn({start:C.start,end:C.end})+"): it\u2019s not open");W.position.end=Rr(C.end)}function c(){return hr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(C){if(this.data.expectingFirstListItemValue){let _=this.stack[this.stack.length-2];_.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function d(){let C=this.resume(),_=this.stack[this.stack.length-1];_.lang=C}function h(){let C=this.resume(),_=this.stack[this.stack.length-1];_.meta=C}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){let C=this.resume(),_=this.stack[this.stack.length-1];_.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){let C=this.resume(),_=this.stack[this.stack.length-1];_.value=C.replace(/(\r?\n|\r)$/g,"")}function k(C){let _=this.resume(),W=this.stack[this.stack.length-1];W.label=_,W.identifier=Qe(this.sliceSerialize(C)).toLowerCase()}function y(){let C=this.resume(),_=this.stack[this.stack.length-1];_.title=C}function S(){let C=this.resume(),_=this.stack[this.stack.length-1];_.url=C}function v(C){let _=this.stack[this.stack.length-1];if(!_.depth){let W=this.sliceSerialize(C).length;_.depth=W}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function te(C){let _=this.stack[this.stack.length-1];_.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function re(C){let W=this.stack[this.stack.length-1].children,ne=W[W.length-1];(!ne||ne.type!=="text")&&(ne=Gy(),ne.position={start:Rr(C.start),end:void 0},W.push(ne)),this.stack.push(ne)}function b(C){let _=this.stack.pop();_.value+=this.sliceSerialize(C),_.position.end=Rr(C.end)}function ce(C){let _=this.stack[this.stack.length-1];if(this.data.atHardBreak){let W=_.children[_.children.length-1];W.position.end=Rr(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_.type)&&(re.call(this,C),b.call(this,C))}function Q(){this.data.atHardBreak=!0}function B(){let C=this.resume(),_=this.stack[this.stack.length-1];_.value=C}function V(){let C=this.resume(),_=this.stack[this.stack.length-1];_.value=C}function G(){let C=this.resume(),_=this.stack[this.stack.length-1];_.value=C}function ae(){let C=this.stack[this.stack.length-1];if(this.data.inReference){let _=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=_,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function xe(){let C=this.stack[this.stack.length-1];if(this.data.inReference){let _=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=_,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function Ye(C){let _=this.sliceSerialize(C),W=this.stack[this.stack.length-2];W.label=da(_),W.identifier=Qe(_).toLowerCase()}function Et(){let C=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=C.children;W.children=ne}else W.alt=_}function m(){let C=this.resume(),_=this.stack[this.stack.length-1];_.url=C}function it(){let C=this.resume(),_=this.stack[this.stack.length-1];_.title=C}function vt(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function Xe(C){let _=this.resume(),W=this.stack[this.stack.length-1];W.label=_,W.identifier=Qe(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function ze(C){this.data.characterReferenceType=C.type}function Pn(C){let _=this.sliceSerialize(C),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(C){let _=this.stack.pop();_.position.end=Rr(C.end)}function se(C){b.call(this,C);let _=this.stack[this.stack.length-1];_.url=this.sliceSerialize(C)}function _t(C){b.call(this,C);let _=this.stack[this.stack.length-1];_.url="mailto:"+this.sliceSerialize(C)}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 lf(){return{type:"html",value:""}}function jy(){return{type:"image",title:null,url:"",alt:null}}function cf(){return{type:"link",title:null,url:"",children:[]}}function ff(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function $y(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function qy(){return{type:"paragraph",children:[]}}function Vy(){return{type:"strong",children:[]}}function Gy(){return{type:"text",value:""}}function Hy(){return{type:"thematicBreak"}}}function Rr(e){return{line:e.line,column:e.column,offset:e.offset}}function Ap(e,t){let r=-1;for(;++r<t.length;){let n=t[r];Array.isArray(n)?Ap(e,n):gA(e,n)}}function gA(e,t){let r;for(r in t)if(kp.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 bp(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 ma(e){let t=this;t.parser=r;function r(n){return ju(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var Tp={}.hasOwnProperty;function Cp(e,t){let r=t||{};function n(i,...o){let a=n.invalid,s=n.handlers;if(i&&Tp.call(i,e)){let u=String(i[e]);a=Tp.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 xA={}.hasOwnProperty;function $u(e,t){let r=-1,n;if(t.extensions)for(;++r<t.extensions.length;)$u(e,t.extensions[r]);for(n in t)if(xA.call(t,n))switch(n){case"extensions":break;case"unsafe":{wp(e[n],t[n]);break}case"join":{wp(e[n],t[n]);break}case"handlers":{yA(e[n],t[n]);break}default:e.options[n]=t[n]}return e}function wp(e,t){t&&e.push(...t)}function yA(e,t){t&&Object.assign(e,t)}function Sp(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()),EA);return i(),a}function EA(e,t,r){return">"+(r?"":" ")+e}function ha(e,t){return vp(e,t.inConstruct,!0)&&!vp(e,t.notInConstruct,!1)}function vp(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 qu(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 _p(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 Ip(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 Rp(e,t,r,n){let i=Ip(r),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(io(e,r)){let f=r.enter("codeIndented"),p=r.indentLines(o,bA);return f(),p}let s=r.createTracker(n),u=i.repeat(Math.max(_p(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 bA(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 Dp(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 Fp(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}}Vu.peek=kA;function Vu(e,t,r,n){let i=Fp(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 d=a.move(i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},s+u+d}function kA(e,t,r){return r.options.emphasis||"*"}var Kt=function(e){if(e==null)return wA;if(typeof e=="function")return ga(e);if(typeof e=="object")return Array.isArray(e)?AA(e):TA(e);if(typeof e=="string")return CA(e);throw new Error("Expected function, string, or object as test")};function AA(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 TA(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 CA(e){return ga(t);function t(r){return r&&r.type===e}}function ga(e){return t;function t(r,n,i){return!!(SA(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function wA(){return!0}function SA(e){return e!==null&&typeof e=="object"&&"type"in e}function Op(e){return"\x1B[33m"+e+"\x1B[39m"}var Np=[],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 d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+Op(u.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=Np,h,E,T;if((!t||o(u,l,c[c.length-1]||void 0))&&(d=vA(r(u,c)),d[0]===bn))return d;if("children"in u&&u.children){let x=u;if(x.children&&d[0]!==ya)for(E=(n?x.children.length:-1)+a,T=c.concat(x);E>-1&&E<x.children.length;){let k=x.children[E];if(h=s(k,E,T)(),h[0]===bn)return h;E=typeof h[1]=="number"?h[1]:E+a}}return d}}}function vA(e){return Array.isArray(e)?e:typeof e=="number"?[xa,e]:e==null?Np:[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 Lp(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}Gu.peek=_A;function Gu(e){return e.value||""}function _A(){return"<"}Hu.peek=IA;function Hu(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 IA(){return"!"}Wu.peek=RA;function Wu(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 RA(){return"!"}Ku.peek=DA;function Ku(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 DA(){return"`"}function Zu(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))}Yu.peek=FA;function Yu(e,t,r,n){let i=Qn(r),o=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n),s,u;if(Zu(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 FA(e,t,r){return Zu(e,r)?"<":"["}Xu.peek=OA;function Xu(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 OA(){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 Pp(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 Mp(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 Bp(e,t,r,n){let i=r.enter("list"),o=r.bulletCurrent,a=e.ordered?Mp(r):ti(r),s=e.ordered?a==="."?")":".":Pp(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 Up(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 zp(e,t,r,n){let i=Up(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,d){return p?(d?"":" ".repeat(a))+f:(d?o:o+" ".repeat(a-o.length))+f}}function jp(e,t,r,n){let i=r.enter("paragraph"),o=r.enter("phrasing"),a=r.containerPhrasing(e,n);return o(),i(),a}var Ju=Kt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $p(e,t,r,n){return(e.children.some(function(a){return Ju(a)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function qp(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Qu.peek=NA;function Qu(e,t,r,n){let i=qp(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 d=a.move(i+i);return o(),r.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},s+u+d}function NA(e,t,r){return r.options.strong||"*"}function Vp(e,t,r,n){return r.safe(e.value,n)}function Gp(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 Hp(e,t,r){let n=(ba(r)+(r.options.ruleSpaces?" ":"")).repeat(Gp(r));return r.options.ruleSpaces?n.slice(0,-1):n}var kn={blockquote:Sp,break:qu,code:Rp,definition:Dp,emphasis:Vu,hardBreak:qu,heading:Lp,html:Gu,image:Hu,imageReference:Wu,inlineCode:Ku,link:Yu,linkReference:Xu,list:Bp,listItem:zp,paragraph:jp,root:$p,strong:Qu,text:Vp,thematicBreak:Hp};var Wp=[LA];function LA(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"],Kp=[{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 Zp(e){return e.label||!e.identifier?e.label||"":da(e.identifier)}function Yp(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 Xp(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 d=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,u=void 0,d&&(o.length>0&&d.before&&s===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+wt(s.charCodeAt(0))),d.after&&(u=f)),l.move(p),o.push(p),s=p.slice(-1)}return n.pop(),o.join("")}function Jp(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(PA(u,i[s+1],e,t)))}return n.pop(),a.join("")}function PA(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 MA=/\r?\n|\r/g;function Qp(e,t){let r=[],n=0,i=0,o;for(;o=MA.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 td(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 d="before"in c||!!c.atBreak,h="after"in c,E=p.index+(d?p[1].length:0);i.includes(E)?(a[E].before&&!d&&(a[E].before=!1),a[E].after&&!h&&(a[E].after=!1)):(i.push(E),a[E]={before:d,after:h})}}i.sort(BA);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(ed(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(ed(n.slice(u,l),r.after)),o.join("")}function BA(e,t){return e-t}function ed(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 rd(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 el(e,t){let r=t||{},n={associationId:Zp,containerPhrasing:$A,containerFlow:qA,createTracker:rd,compilePattern:Yp,enter:o,handlers:{...kn},handle:void 0,indentLines:Qp,indexStack:[],join:[...Wp],options:{},safe:VA,stack:[],unsafe:[...Kp]};$u(n,r),n.options.tightDefinitions&&n.join.push(jA),n.handle=Cp("type",{invalid:UA,unknown:zA,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 UA(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function zA(e){let t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function jA(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function $A(e,t){return Xp(e,this,t)}function qA(e,t){return Jp(e,this,t)}function VA(e,t){return td(this,e,t)}function ka(e){let t=this;t.compiler=r;function r(n){return el(n,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function tl(e){if(e)throw e}var Ca=pf(fd(),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 rl(){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?pd(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 pd(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 GA}from"vfile";var dd=function(e){let n=this.constructor.prototype,i=n[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,n),o};var HA={}.hasOwnProperty,al=class e extends dd{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=rl()}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?(ol("data",this.frozen),this.namespace[t]=r,this):HA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ol("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 nl("parse",n),n(String(r),r)}process(t,r){let n=this;return this.freeze(),nl("process",this.parser||this.Parser),il("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 d=f,h=n.stringify(d,p);KA(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(),nl("processSync",this.parser||this.Parser),il("processSync",this.compiler||this.Compiler),this.process(t,i),hd("processSync","process",r),n;function i(o,a){r=!0,tl(o),n=a}}run(t,r,n){md(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 d=f||t;c?s(c):a?a(d):n(void 0,d,p)}}}runSync(t,r){let n=!1,i;return this.run(t,r,o),hd("runSync","run",n),i;function o(a,s){tl(a),i=s,n=!0}}stringify(t,r){this.freeze();let n=Ta(r),i=this.compiler||this.Compiler;return il("stringify",i),md(t),i(t,n)}use(t,...r){let n=this.attachers,i=this.namespace;if(ol("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[d,...h]=c,E=n[p][1];so(E)&&so(d)&&(d=(0,Ca.default)(!0,E,d)),n[p]=[l,d,...h]}}}},sl=new al().freeze();function nl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function il(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ol(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 md(e){if(!so(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hd(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ta(e){return WA(e)?e:new GA(e)}function WA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function KA(e){return typeof e=="string"||ZA(e)}function ZA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var ri=sl().use(ma).use(ka).freeze();function ul(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 ll(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function cl(e,t,r){let i=Kt((r||{}).ignore||[]),o=YA(t),a=-1;for(;++a<o.length;)oo(e,"text",s);function s(l,c){let f=-1,p;for(;++f<c.length;){let d=c[f],h=p?p.children:void 0;if(i(d,h?h.indexOf(d):void 0,p))return;p=d}if(p)return u(l,c)}function u(l,c){let f=c[c.length-1],p=o[a][0],d=o[a][1],h=0,T=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=d(...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(T,1,...k)):k=[l],T+k.length}}function YA(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([XA(i[0]),JA(i[1])])}return t}function XA(e){return typeof e=="string"?new RegExp(ll(e),"g"):e}function JA(e){return typeof e=="function"?e:function(){return e}}var fl="phrasing",pl=["autolink","link","image","label"];function ml(){return{transforms:[iT],enter:{literalAutolink:QA,literalAutolinkEmail:dl,literalAutolinkHttp:dl,literalAutolinkWww:dl},exit:{literalAutolink:nT,literalAutolinkEmail:rT,literalAutolinkHttp:eT,literalAutolinkWww:tT}}}function hl(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:fl,notInConstruct:pl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:fl,notInConstruct:pl},{character:":",before:"[ps]",after:"\\/",inConstruct:fl,notInConstruct:pl}]}}function QA(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function dl(e){this.config.enter.autolinkProtocol.call(this,e)}function eT(e){this.config.exit.autolinkProtocol.call(this,e)}function tT(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 rT(e){this.config.exit.autolinkEmail.call(this,e)}function nT(e){this.exit(e)}function iT(e){cl(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),aT]],{ignore:["link","linkReference"]})}function oT(e,t,r,n,i){let o="";if(!gd(i)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!sT(r)))return!1;let a=uT(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 aT(e,t,r,n){return!gd(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function sT(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 uT(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=ul(e,"("),o=ul(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 gd(e,t){let r=e.input.charCodeAt(e.index-1);return(e.index===0||Ht(r)||gn(r))&&(!t||r!==47)}xd.peek=xT;function gl(){return{enter:{gfmFootnoteDefinition:lT,gfmFootnoteDefinitionLabelString:cT,gfmFootnoteCall:dT,gfmFootnoteCallString:mT},exit:{gfmFootnoteDefinition:pT,gfmFootnoteDefinitionLabelString:fT,gfmFootnoteCall:gT,gfmFootnoteCallString:hT}}}function xl(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:yT,footnoteReference:xd}}}function lT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function cT(){this.buffer()}function fT(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 pT(e){this.exit(e)}function dT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function mT(){this.buffer()}function hT(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 gT(e){this.exit(e)}function xd(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 xT(){return"["}function yT(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()),ET)),a(),o}function ET(e,t,r){return t===0?e:(r?"":" ")+e}var bT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yd.peek=TT;function yl(){return{canContainEols:["delete"],enter:{strikethrough:kT},exit:{strikethrough:AT}}}function El(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bT}],handlers:{delete:yd}}}function kT(e){this.enter({type:"delete",children:[]},e)}function AT(e){this.exit(e)}function yd(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 TT(){return"~"}function CT(e){return e.length}function bd(e,t){let r=t||{},n=(r.align||[]).concat(),i=r.stringLength||CT,o=[],a=[],s=[],u=[],l=0,c=-1;for(;++c<e.length;){let E=[],T=[],x=-1;for(e[c].length>l&&(l=e[c].length);++x<e[c].length;){let k=wT(e[c][x]);if(r.alignDelimiters!==!1){let y=i(k);T[x]=y,(u[x]===void 0||y>u[x])&&(u[x]=y)}E.push(k)}a[c]=E,s[c]=T}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<l;)o[f]=Ed(n[f]);else{let E=Ed(n);for(;++f<l;)o[f]=E}f=-1;let p=[],d=[];for(;++f<l;){let E=o[f],T="",x="";E===99?(T=":",x=":"):E===108?T=":":E===114&&(x=":");let k=r.alignDelimiters===!1?1:Math.max(1,u[f]-T.length-x.length),y=T+"-".repeat(k)+x;r.alignDelimiters!==!1&&(k=T.length+k+x.length,k>u[f]&&(u[f]=k),d[f]=k),p[f]=y}a.splice(1,0,p),s.splice(1,0,d),c=-1;let h=[];for(;++c<a.length;){let E=a[c],T=s[c];f=-1;let x=[];for(;++f<l;){let k=E[f]||"",y="",S="";if(r.alignDelimiters!==!1){let v=u[f]-(T[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 wT(e){return e==null?"":String(e)}function Ed(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 kl(){return{enter:{table:ST,tableData:kd,tableHeader:kd,tableRow:_T},exit:{codeText:IT,table:vT,tableData:bl,tableHeader:bl,tableRow:bl}}}function ST(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 vT(e){this.exit(e),this.data.inTable=void 0}function _T(e){this.enter({type:"tableRow",children:[]},e)}function bl(e){this.exit(e)}function kd(e){this.enter({type:"tableCell",children:[]},e)}function IT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,RT));let r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function RT(e,t){return t==="|"?t:e}function Al(e){let t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
42
- `,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(d,h,E,T){return l(c(d,E,T),d.align)}function s(d,h,E,T){let x=f(d,E,T),k=l([x]);return k.slice(0,k.indexOf(`
43
- `))}function u(d,h,E,T){let x=E.enter("tableCell"),k=E.enter("phrasing"),y=E.containerPhrasing(d,{...T,before:o,after:o});return k(),x(),y}function l(d,h){return bd(d,{align:h,alignDelimiters:n,padding:r,stringLength:i})}function c(d,h,E){let T=d.children,x=-1,k=[],y=h.enter("table");for(;++x<T.length;)k[x]=f(T[x],h,E);return y(),k}function f(d,h,E){let T=d.children,x=-1,k=[],y=h.enter("tableRow");for(;++x<T.length;)k[x]=u(T[x],d,h,E);return y(),k}function p(d,h,E){let T=kn.inlineCode(d,h,E);return E.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function Tl(){return{exit:{taskListCheckValueChecked:Ad,taskListCheckValueUnchecked:Ad,paragraph:DT}}}function Cl(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:FT}}}function Ad(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function DT(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 FT(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 wl(){return[ml(),gl(),yl(),kl(),Tl()]}function Sl(e){return{extensions:[hl(),xl(),El(),Al(e),Cl()]}}var OT={tokenize:BT,partial:!0},Td={tokenize:UT,partial:!0},Cd={tokenize:zT,partial:!0},wd={tokenize:jT,partial:!0},NT={tokenize:$T,partial:!0},Sd={name:"wwwAutolink",tokenize:PT,previous:_d},vd={name:"protocolAutolink",tokenize:MT,previous:Id},xr={name:"emailAutolink",tokenize:LT,previous:Rd},Zt={};function _l(){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,vd];Zt[104]=[xr,vd];Zt[87]=[xr,Sd];Zt[119]=[xr,Sd];function LT(e,t,r){let n=this,i,o;return a;function a(f){return!vl(f)||!Rd.call(n,n.previous)||Il(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return vl(f)?(e.consume(f),s):f===64?(e.consume(f),u):r(f)}function u(f){return f===46?e.check(NT,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 PT(e,t,r){let n=this;return i;function i(a){return a!==87&&a!==119||!_d.call(n,n.previous)||Il(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(OT,e.attempt(Td,e.attempt(Cd,o),r),r)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function MT(e,t,r){let n=this,i="",o=!1;return a;function a(f){return(f===72||f===104)&&Id.call(n,n.previous)&&!Il(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(Td,e.attempt(Cd,c),r)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function BT(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 UT(e,t,r){let n,i,o;return a;function a(l){return l===46||l===95?e.check(wd,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 zT(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(wd,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 jT(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 $T(e,t,r){return n;function n(o){return e.consume(o),i}function i(o){return $e(o)?r(o):t(o)}}function _d(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Y(e)}function Id(e){return!je(e)}function Rd(e){return!(e===47||vl(e))}function vl(e){return e===43||e===45||e===46||e===95||$e(e)}function Il(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 qT={tokenize:YT,partial:!0};function Rl(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:WT,continuation:{tokenize:KT},exit:ZT}},text:{91:{name:"gfmFootnoteCall",tokenize:HT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:VT,resolveTo:GT}}}}function VT(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 GT(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 HT(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 WT(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,d,"gfmFootnoteDefinitionWhitespace")):r(h)}function d(h){return t(h)}}function KT(e,t,r){return e.check(Wt,t,e.attempt(qT,t,r))}function ZT(e){e.exit("gfmFootnoteDefinition")}function YT(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 Dl(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]],d=s.parser.constructs.insideSpan.null;d&&De(p,p.length,0,Ir(d,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"),d(h))}function d(h){let E=gr(l);if(h===126)return f>1?u(h):(a.consume(h),f++,d);if(f<2&&!r)return u(h);let T=a.exit("strikethroughSequenceTemporary"),x=gr(h);return T._open=!x||x===2&&!!E,T._close=!E||E===2&&!!x,s(h)}}}var wa=class{constructor(){this.map=[]}add(t,r,n){XT(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 XT(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 Dd(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 Fl(){return{flow:{null:{name:"table",tokenize:JT,resolveAll:QT}}}}function JT(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"),d):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 d(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?T(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,T,"whitespace")(b):T(b)}function T(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 QT(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 d=e[r],h=d[1];d[0]==="enter"?h.type==="tableHead"?(s=!1,u!==0&&(Fd(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&&Fd(p,t,u,l,c),p.consume(t.events),r=-1;++r<t.events.length;){let d=t.events[r];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=Dd(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]],d=t.events[r[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){let 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 Fd(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 eC={name:"tasklistCheck",tokenize:tC};function Ol(){return{text:{91:eC}}}function tC(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:rC},t,r)(u):r(u)}}function rC(e,t,r){return U(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function Od(e){return ta([_l(),Rl(),Dl(e),Fl(),Ol()])}var nC={};function Dr(e){let t=this,r=e||nC,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Od(r)),o.push(wl()),a.push(Sl(r))}import{mdatCheck as lC,mdatClean as Ld,mdatExpand as cC,mdatSplit as Pd}from"remark-mdat";import iC from"node:fs";import oC from"node:path";import{VFile as aC}from"vfile";function Nl(e,t,r){let n=Nd(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=oC.resolve(n.cwd,n.path)}catch(c){return s(c)}iC.readFile(u,t,l);function l(c,f){c?s(c):(n.value=f,a(n))}}}function Nd(e){return typeof e=="string"||e instanceof URL?e={path:e}:uC(e)&&(e={path:new TextDecoder().decode(e)}),sC(e)?e:new aC(e)}function sC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function uC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}import{VFile as fC}from"vfile";async function Fr(e,t,r,n,i,o,a){let s=await t({additionalConfig:o,additionalRules:a});o=s;let u=Hf(e),l=Vf(u,i,n,"md"),c=[],f=r(s);for(let{input:p,name:d,output:h}of l){let E=await Nl(p),T=await f.process(E);T.dirname=h,T.basename=d,c.push(T)}return c}async function Cn(e,t,r,n,i){let o=await t({additionalConfig:n,additionalRules:i});return n=o,r(o).process(new fC(e))}function ii(e){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(()=>async function(r,n){Pd(r,n),Ld(r,n,e),await cC(r,n,e)})}function uo(e){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(()=>function(r,n){Pd(r,n),Ld(r,n,e)})}function oi(e){return ri().use({settings:{bullet:"-",emphasis:"_"}}).use(Dr).use(()=>async function(r,n){await lC(r,n,{...e,paranoid:!1})})}async function pC(e,t,r,n,i){return Fr(e,Ut,ii,t,r,n,i)}async function dC(e,t,r){return Cn(e,Ut,ii,t,r)}async function mC(e,t,r,n,i){return Fr(e,Ut,oi,t,r,n,i)}async function hC(e,t,r){return Cn(e,Ut,oi,t,r)}async function gC(e,t,r,n,i){return Fr(e,Ut,uo,t,r,n,i)}async function xC(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 yC}from"globby";import _a from"node:path";import{readPackage as EC}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 mn();if(n===void 0)throw new Error("No package.json found");let i=t?.src??await Md(r)??await Md();if(i===void 0)throw new Error("Banner image not found at any typical location, consider adding something at ./assets/banner.webp");if(!Bd(i)&&!await Yn(i))throw new Error(`Banner image not found at "${i}"`);let o=t?.alt??`${(await EC({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 Md(e){let{packageFile:t}=await mn();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 yC(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 Bd(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?Bd(`https://${e}`,!1):!1}}import{getSoleRule as IF}from"remark-mdat";import{execaCommand as mF}from"execa";import{log as ny}from"remark-mdat";function Ud(e,t=Number.MAX_SAFE_INTEGER){let r=[],n=bC(e,t);return r.push(kC(n)),r.push(AC(e,n)),n.hasMultipleSubcommands&&n.canRecurse&&r.push(TC(n.fullCommandName)),n.defaultCommand?.commandName!==void 0&&r.push(CC(n)),r.push(wC(e,n)),e.positionals&&!n.commandsOnly&&r.push(Ll(["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(Ll(["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(Ll(["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(`
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:`
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(`
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 bC(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 kC(e){return`#### ${e.isTopLevel?"Command":"Subcommand"}: \`${e.fullCommandName}\``}function AC(e,t){return t.isTopLevel&&t.topLevelCommand?.description?(e.commands=e.commands?.filter(r=>r!==t.topLevelCommand),t.topLevelCommand.description):e.description??""}function TC(e){return`This section lists top-level commands for \`${e}\`.`}function CC(e){return`If no command is provided, \`${e.defaultCommand?.parentCommandName} ${e.defaultCommand?.commandName}\` is run by default.`}function wC(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 Ll(e,t){let r=SC(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 SC(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 Hc}from"remark-mdat";var vC=typeof global=="object"&&global&&global.Object===Object&&global,Ra=vC;var _C=typeof self=="object"&&self&&self.Object===Object&&self,IC=Ra||_C||Function("return this")(),Pe=IC;var RC=Pe.Symbol,He=RC;var zd=Object.prototype,DC=zd.hasOwnProperty,FC=zd.toString,lo=He?He.toStringTag:void 0;function OC(e){var t=DC.call(e,lo),r=e[lo];try{e[lo]=void 0;var n=!0}catch{}var i=FC.call(e);return n&&(t?e[lo]=r:delete e[lo]),i}var jd=OC;var NC=Object.prototype,LC=NC.toString;function PC(e){return LC.call(e)}var $d=PC;var MC="[object Null]",BC="[object Undefined]",qd=He?He.toStringTag:void 0;function UC(e){return e==null?e===void 0?BC:MC:qd&&qd in Object(e)?jd(e):$d(e)}var ut=UC;function zC(e){return e!=null&&typeof e=="object"}var Fe=zC;var jC="[object Symbol]";function $C(e){return typeof e=="symbol"||Fe(e)&&ut(e)==jC}var Or=$C;function qC(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=qC;var VC=Array.isArray,P=VC;var GC=1/0,Vd=He?He.prototype:void 0,Gd=Vd?Vd.toString:void 0;function Hd(e){if(typeof e=="string")return e;if(P(e))return Yt(e,Hd)+"";if(Or(e))return Gd?Gd.call(e):"";var t=e+"";return t=="0"&&1/e==-GC?"-0":t}var Wd=Hd;var HC=/\s/;function WC(e){for(var t=e.length;t--&&HC.test(e.charAt(t)););return t}var Kd=WC;var KC=/^\s+/;function ZC(e){return e&&e.slice(0,Kd(e)+1).replace(KC,"")}var Zd=ZC;function YC(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ce=YC;var Yd=NaN,XC=/^[-+]0x[0-9a-f]+$/i,JC=/^0b[01]+$/i,QC=/^0o[0-7]+$/i,ew=parseInt;function tw(e){if(typeof e=="number")return e;if(Or(e))return Yd;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=Zd(e);var r=JC.test(e);return r||QC.test(e)?ew(e.slice(2),r?2:8):XC.test(e)?Yd:+e}var Xd=tw;var Jd=1/0,rw=17976931348623157e292;function nw(e){if(!e)return e===0?e:0;if(e=Xd(e),e===Jd||e===-Jd){var t=e<0?-1:1;return t*rw}return e===e?e:0}var Qd=nw;function iw(e){var t=Qd(e),r=t%1;return t===t?r?t-r:t:0}var Xt=iw;function ow(e){return e}var Ot=ow;var aw="[object AsyncFunction]",sw="[object Function]",uw="[object GeneratorFunction]",lw="[object Proxy]";function cw(e){if(!Ce(e))return!1;var t=ut(e);return t==sw||t==uw||t==aw||t==lw}var lt=cw;var fw=Pe["__core-js_shared__"],Da=fw;var em=function(){var e=/[^.]+$/.exec(Da&&Da.keys&&Da.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pw(e){return!!em&&em in e}var tm=pw;var dw=Function.prototype,mw=dw.toString;function hw(e){if(e!=null){try{return mw.call(e)}catch{}try{return e+""}catch{}}return""}var yr=hw;var gw=/[\\^$.*+?()[\]{}|]/g,xw=/^\[object .+?Constructor\]$/,yw=Function.prototype,Ew=Object.prototype,bw=yw.toString,kw=Ew.hasOwnProperty,Aw=RegExp("^"+bw.call(kw).replace(gw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Tw(e){if(!Ce(e)||tm(e))return!1;var t=lt(e)?Aw:xw;return t.test(yr(e))}var rm=Tw;function Cw(e,t){return e?.[t]}var nm=Cw;function ww(e,t){var r=nm(e,t);return rm(r)?r:void 0}var ht=ww;var Sw=ht(Pe,"WeakMap"),Fa=Sw;var im=Object.create,vw=function(){function e(){}return function(t){if(!Ce(t))return{};if(im)return im(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),om=vw;function _w(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 am=_w;function Iw(){}var we=Iw;function Rw(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var sm=Rw;var Dw=800,Fw=16,Ow=Date.now;function Nw(e){var t=0,r=0;return function(){var n=Ow(),i=Fw-(n-r);if(r=n,i>0){if(++t>=Dw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var um=Nw;function Lw(e){return function(){return e}}var lm=Lw;var Pw=function(){try{var e=ht(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ai=Pw;var Mw=ai?function(e,t){return ai(e,"toString",{configurable:!0,enumerable:!1,value:lm(t),writable:!0})}:Ot,cm=Mw;var Bw=um(cm),fm=Bw;function Uw(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Oa=Uw;function zw(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=zw;function jw(e){return e!==e}var pm=jw;function $w(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var dm=$w;function qw(e,t,r){return t===t?dm(e,t,r):Na(e,pm,r)}var si=qw;function Vw(e,t){var r=e==null?0:e.length;return!!r&&si(e,t,0)>-1}var La=Vw;var Gw=9007199254740991,Hw=/^(?:0|[1-9]\d*)$/;function Ww(e,t){var r=typeof e;return t=t??Gw,!!t&&(r=="number"||r!="symbol"&&Hw.test(e))&&e>-1&&e%1==0&&e<t}var Nr=Ww;function Kw(e,t,r){t=="__proto__"&&ai?ai(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var ui=Kw;function Zw(e,t){return e===t||e!==e&&t!==t}var Jt=Zw;var Yw=Object.prototype,Xw=Yw.hasOwnProperty;function Jw(e,t,r){var n=e[t];(!(Xw.call(e,t)&&Jt(n,r))||r===void 0&&!(t in e))&&ui(e,t,r)}var Lr=Jw;function Qw(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=Qw;var mm=Math.max;function eS(e,t,r){return t=mm(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=mm(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),am(e,this,s)}}var hm=eS;function tS(e,t){return fm(hm(e,t,Ot),e+"")}var li=tS;var rS=9007199254740991;function nS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=rS}var ci=nS;function iS(e){return e!=null&&ci(e.length)&&!lt(e)}var Me=iS;function oS(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=oS;function aS(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 gm=aS;var sS=Object.prototype;function uS(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||sS;return e===r}var er=uS;function lS(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var xm=lS;var cS="[object Arguments]";function fS(e){return Fe(e)&&ut(e)==cS}var Pl=fS;var ym=Object.prototype,pS=ym.hasOwnProperty,dS=ym.propertyIsEnumerable,mS=Pl(function(){return arguments}())?Pl:function(e){return Fe(e)&&pS.call(e,"callee")&&!dS.call(e,"callee")},Mr=mS;function hS(){return!1}var Em=hS;var Am=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bm=Am&&typeof module=="object"&&module&&!module.nodeType&&module,gS=bm&&bm.exports===Am,km=gS?Pe.Buffer:void 0,xS=km?km.isBuffer:void 0,yS=xS||Em,Er=yS;var ES="[object Arguments]",bS="[object Array]",kS="[object Boolean]",AS="[object Date]",TS="[object Error]",CS="[object Function]",wS="[object Map]",SS="[object Number]",vS="[object Object]",_S="[object RegExp]",IS="[object Set]",RS="[object String]",DS="[object WeakMap]",FS="[object ArrayBuffer]",OS="[object DataView]",NS="[object Float32Array]",LS="[object Float64Array]",PS="[object Int8Array]",MS="[object Int16Array]",BS="[object Int32Array]",US="[object Uint8Array]",zS="[object Uint8ClampedArray]",jS="[object Uint16Array]",$S="[object Uint32Array]",ye={};ye[NS]=ye[LS]=ye[PS]=ye[MS]=ye[BS]=ye[US]=ye[zS]=ye[jS]=ye[$S]=!0;ye[ES]=ye[bS]=ye[FS]=ye[kS]=ye[OS]=ye[AS]=ye[TS]=ye[CS]=ye[wS]=ye[SS]=ye[vS]=ye[_S]=ye[IS]=ye[RS]=ye[DS]=!1;function qS(e){return Fe(e)&&ci(e.length)&&!!ye[ut(e)]}var Tm=qS;function VS(e){return function(t){return e(t)}}var tr=VS;var Cm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,co=Cm&&typeof module=="object"&&module&&!module.nodeType&&module,GS=co&&co.exports===Cm,Ml=GS&&Ra.process,HS=function(){try{var e=co&&co.require&&co.require("util").types;return e||Ml&&Ml.binding&&Ml.binding("util")}catch{}}(),Nt=HS;var wm=Nt&&Nt.isTypedArray,WS=wm?tr(wm):Tm,fi=WS;var KS=Object.prototype,ZS=KS.hasOwnProperty;function YS(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?xm(e.length,String):[],u=s.length;for(var l in e)(t||ZS.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=YS;function XS(e,t){return function(r){return e(t(r))}}var Ma=XS;var JS=Ma(Object.keys,Object),Sm=JS;var QS=Object.prototype,ev=QS.hasOwnProperty;function tv(e){if(!er(e))return Sm(e);var t=[];for(var r in Object(e))ev.call(e,r)&&r!="constructor"&&t.push(r);return t}var Ba=tv;function rv(e){return Me(e)?Pa(e):Ba(e)}var pe=rv;var nv=Object.prototype,iv=nv.hasOwnProperty,ov=gm(function(e,t){if(er(t)||Me(t)){Qt(t,pe(t),e);return}for(var r in t)iv.call(t,r)&&Lr(e,r,t[r])}),Ze=ov;function av(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var vm=av;var sv=Object.prototype,uv=sv.hasOwnProperty;function lv(e){if(!Ce(e))return vm(e);var t=er(e),r=[];for(var n in e)n=="constructor"&&(t||!uv.call(e,n))||r.push(n);return r}var _m=lv;function cv(e){return Me(e)?Pa(e,!0):_m(e)}var Br=cv;var fv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pv=/^\w*$/;function dv(e,t){if(P(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Or(e)?!0:pv.test(e)||!fv.test(e)||t!=null&&e in Object(t)}var pi=dv;var mv=ht(Object,"create"),br=mv;function hv(){this.__data__=br?br(null):{},this.size=0}var Im=hv;function gv(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Rm=gv;var xv="__lodash_hash_undefined__",yv=Object.prototype,Ev=yv.hasOwnProperty;function bv(e){var t=this.__data__;if(br){var r=t[e];return r===xv?void 0:r}return Ev.call(t,e)?t[e]:void 0}var Dm=bv;var kv=Object.prototype,Av=kv.hasOwnProperty;function Tv(e){var t=this.__data__;return br?t[e]!==void 0:Av.call(t,e)}var Fm=Tv;var Cv="__lodash_hash_undefined__";function wv(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=br&&t===void 0?Cv:t,this}var Om=wv;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=Im;di.prototype.delete=Rm;di.prototype.get=Dm;di.prototype.has=Fm;di.prototype.set=Om;var Bl=di;function Sv(){this.__data__=[],this.size=0}var Nm=Sv;function vv(e,t){for(var r=e.length;r--;)if(Jt(e[r][0],t))return r;return-1}var Ur=vv;var _v=Array.prototype,Iv=_v.splice;function Rv(e){var t=this.__data__,r=Ur(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Iv.call(t,r,1),--this.size,!0}var Lm=Rv;function Dv(e){var t=this.__data__,r=Ur(t,e);return r<0?void 0:t[r][1]}var Pm=Dv;function Fv(e){return Ur(this.__data__,e)>-1}var Mm=Fv;function Ov(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 Bm=Ov;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=Nm;mi.prototype.delete=Lm;mi.prototype.get=Pm;mi.prototype.has=Mm;mi.prototype.set=Bm;var zr=mi;var Nv=ht(Pe,"Map"),jr=Nv;function Lv(){this.size=0,this.__data__={hash:new Bl,map:new(jr||zr),string:new Bl}}var Um=Lv;function Pv(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var zm=Pv;function Mv(e,t){var r=e.__data__;return zm(t)?r[typeof t=="string"?"string":"hash"]:r.map}var $r=Mv;function Bv(e){var t=$r(this,e).delete(e);return this.size-=t?1:0,t}var jm=Bv;function Uv(e){return $r(this,e).get(e)}var $m=Uv;function zv(e){return $r(this,e).has(e)}var qm=zv;function jv(e,t){var r=$r(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Vm=jv;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=Um;hi.prototype.delete=jm;hi.prototype.get=$m;hi.prototype.has=qm;hi.prototype.set=Vm;var wn=hi;var $v="Expected a function";function Ul(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($v);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(Ul.Cache||wn),r}Ul.Cache=wn;var Gm=Ul;var qv=500;function Vv(e){var t=Gm(e,function(n){return r.size===qv&&r.clear(),n}),r=t.cache;return t}var Hm=Vv;var Gv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hv=/\\(\\)?/g,Wv=Hm(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Gv,function(r,n,i,o){t.push(i?o.replace(Hv,"$1"):n||r)}),t}),Wm=Wv;function Kv(e){return e==null?"":Wd(e)}var Km=Kv;function Zv(e,t){return P(e)?e:pi(e,t)?[e]:Wm(Km(e))}var qr=Zv;var Yv=1/0;function Xv(e){if(typeof e=="string"||Or(e))return e;var t=e+"";return t=="0"&&1/e==-Yv?"-0":t}var rr=Xv;function Jv(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=Jv;function Qv(e,t,r){var n=e==null?void 0:gi(e,t);return n===void 0?r:n}var Zm=Qv;function e_(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var xi=e_;var Ym=He?He.isConcatSpreadable:void 0;function t_(e){return P(e)||Mr(e)||!!(Ym&&e&&e[Ym])}var Xm=t_;function Jm(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=Xm),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?Jm(s,t-1,r,n,i):xi(i,s):n||(i[i.length]=s)}return i}var yi=Jm;function r_(e){var t=e==null?0:e.length;return t?yi(e,1):[]}var qe=r_;var n_=Ma(Object.getPrototypeOf,Object),Ua=n_;function i_(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=i_;function o_(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 Qm=o_;function a_(){this.__data__=new zr,this.size=0}var eh=a_;function s_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var th=s_;function u_(e){return this.__data__.get(e)}var rh=u_;function l_(e){return this.__data__.has(e)}var nh=l_;var c_=200;function f_(e,t){var r=this.__data__;if(r instanceof zr){var n=r.__data__;if(!jr||n.length<c_-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 ih=f_;function Ei(e){var t=this.__data__=new zr(e);this.size=t.size}Ei.prototype.clear=eh;Ei.prototype.delete=th;Ei.prototype.get=rh;Ei.prototype.has=nh;Ei.prototype.set=ih;var Vr=Ei;function p_(e,t){return e&&Qt(t,pe(t),e)}var oh=p_;function d_(e,t){return e&&Qt(t,Br(t),e)}var ah=d_;var ch=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sh=ch&&typeof module=="object"&&module&&!module.nodeType&&module,m_=sh&&sh.exports===ch,uh=m_?Pe.Buffer:void 0,lh=uh?uh.allocUnsafe:void 0;function h_(e,t){if(t)return e.slice();var r=e.length,n=lh?lh(r):new e.constructor(r);return e.copy(n),n}var fh=h_;function g_(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=g_;function x_(){return[]}var ja=x_;var y_=Object.prototype,E_=y_.propertyIsEnumerable,ph=Object.getOwnPropertySymbols,b_=ph?function(e){return e==null?[]:(e=Object(e),bi(ph(e),function(t){return E_.call(e,t)}))}:ja,ki=b_;function k_(e,t){return Qt(e,ki(e),t)}var dh=k_;var A_=Object.getOwnPropertySymbols,T_=A_?function(e){for(var t=[];e;)xi(t,ki(e)),e=Ua(e);return t}:ja,$a=T_;function C_(e,t){return Qt(e,$a(e),t)}var mh=C_;function w_(e,t,r){var n=t(e);return P(e)?n:xi(n,r(e))}var qa=w_;function S_(e){return qa(e,pe,ki)}var fo=S_;function v_(e){return qa(e,Br,$a)}var Va=v_;var __=ht(Pe,"DataView"),Ga=__;var I_=ht(Pe,"Promise"),Ha=I_;var R_=ht(Pe,"Set"),Gr=R_;var hh="[object Map]",D_="[object Object]",gh="[object Promise]",xh="[object Set]",yh="[object WeakMap]",Eh="[object DataView]",F_=yr(Ga),O_=yr(jr),N_=yr(Ha),L_=yr(Gr),P_=yr(Fa),Sn=ut;(Ga&&Sn(new Ga(new ArrayBuffer(1)))!=Eh||jr&&Sn(new jr)!=hh||Ha&&Sn(Ha.resolve())!=gh||Gr&&Sn(new Gr)!=xh||Fa&&Sn(new Fa)!=yh)&&(Sn=function(e){var t=ut(e),r=t==D_?e.constructor:void 0,n=r?yr(r):"";if(n)switch(n){case F_:return Eh;case O_:return hh;case N_:return gh;case L_:return xh;case P_:return yh}return t});var zt=Sn;var M_=Object.prototype,B_=M_.hasOwnProperty;function U_(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&B_.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var bh=U_;var z_=Pe.Uint8Array,Ai=z_;function j_(e){var t=new e.constructor(e.byteLength);return new Ai(t).set(new Ai(e)),t}var Ti=j_;function $_(e,t){var r=t?Ti(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var kh=$_;var q_=/\w*$/;function V_(e){var t=new e.constructor(e.source,q_.exec(e));return t.lastIndex=e.lastIndex,t}var Ah=V_;var Th=He?He.prototype:void 0,Ch=Th?Th.valueOf:void 0;function G_(e){return Ch?Object(Ch.call(e)):{}}var wh=G_;function H_(e,t){var r=t?Ti(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Sh=H_;var W_="[object Boolean]",K_="[object Date]",Z_="[object Map]",Y_="[object Number]",X_="[object RegExp]",J_="[object Set]",Q_="[object String]",eI="[object Symbol]",tI="[object ArrayBuffer]",rI="[object DataView]",nI="[object Float32Array]",iI="[object Float64Array]",oI="[object Int8Array]",aI="[object Int16Array]",sI="[object Int32Array]",uI="[object Uint8Array]",lI="[object Uint8ClampedArray]",cI="[object Uint16Array]",fI="[object Uint32Array]";function pI(e,t,r){var n=e.constructor;switch(t){case tI:return Ti(e);case W_:case K_:return new n(+e);case rI:return kh(e,r);case nI:case iI:case oI:case aI:case sI:case uI:case lI:case cI:case fI:return Sh(e,r);case Z_:return new n;case Y_:case Q_:return new n(e);case X_:return Ah(e);case J_:return new n;case eI:return wh(e)}}var vh=pI;function dI(e){return typeof e.constructor=="function"&&!er(e)?om(Ua(e)):{}}var _h=dI;var mI="[object Map]";function hI(e){return Fe(e)&&zt(e)==mI}var Ih=hI;var Rh=Nt&&Nt.isMap,gI=Rh?tr(Rh):Ih,Dh=gI;var xI="[object Set]";function yI(e){return Fe(e)&&zt(e)==xI}var Fh=yI;var Oh=Nt&&Nt.isSet,EI=Oh?tr(Oh):Fh,Nh=EI;var bI=1,kI=2,AI=4,Lh="[object Arguments]",TI="[object Array]",CI="[object Boolean]",wI="[object Date]",SI="[object Error]",Ph="[object Function]",vI="[object GeneratorFunction]",_I="[object Map]",II="[object Number]",Mh="[object Object]",RI="[object RegExp]",DI="[object Set]",FI="[object String]",OI="[object Symbol]",NI="[object WeakMap]",LI="[object ArrayBuffer]",PI="[object DataView]",MI="[object Float32Array]",BI="[object Float64Array]",UI="[object Int8Array]",zI="[object Int16Array]",jI="[object Int32Array]",$I="[object Uint8Array]",qI="[object Uint8ClampedArray]",VI="[object Uint16Array]",GI="[object Uint32Array]",de={};de[Lh]=de[TI]=de[LI]=de[PI]=de[CI]=de[wI]=de[MI]=de[BI]=de[UI]=de[zI]=de[jI]=de[_I]=de[II]=de[Mh]=de[RI]=de[DI]=de[FI]=de[OI]=de[$I]=de[qI]=de[VI]=de[GI]=!0;de[SI]=de[Ph]=de[NI]=!1;function Wa(e,t,r,n,i,o){var a,s=t&bI,u=t&kI,l=t&AI;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=bh(e),!s)return sm(e,a)}else{var f=zt(e),p=f==Ph||f==vI;if(Er(e))return fh(e,s);if(f==Mh||f==Lh||p&&!i){if(a=u||p?{}:_h(e),!s)return u?mh(e,ah(a,e)):dh(e,oh(a,e))}else{if(!de[f])return i?e:{};a=vh(e,f,s)}}o||(o=new Vr);var d=o.get(e);if(d)return d;o.set(e,a),Nh(e)?e.forEach(function(T){a.add(Wa(T,t,r,T,e,o))}):Dh(e)&&e.forEach(function(T,x){a.set(x,Wa(T,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(T,x){E&&(x=T,T=e[x]),Lr(a,x,Wa(T,t,r,x,e,o))}),a}var Bh=Wa;var HI=4;function WI(e){return Bh(e,HI)}var me=WI;function KI(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=KI;var ZI="__lodash_hash_undefined__";function YI(e){return this.__data__.set(e,ZI),this}var Uh=YI;function XI(e){return this.__data__.has(e)}var zh=XI;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=Uh;Ka.prototype.has=zh;var Ci=Ka;function JI(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=JI;function QI(e,t){return e.has(t)}var wi=QI;var eR=1,tR=2;function rR(e,t,r,n,i,o){var a=r&eR,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,d=r&tR?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 T=a?n(E,h,f,t,e,o):n(h,E,f,e,t,o);if(T!==void 0){if(T)continue;p=!1;break}if(d){if(!Za(t,function(x,k){if(!wi(d,k)&&(h===x||i(h,x,r,n,o)))return d.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=rR;function nR(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var jh=nR;function iR(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Si=iR;var oR=1,aR=2,sR="[object Boolean]",uR="[object Date]",lR="[object Error]",cR="[object Map]",fR="[object Number]",pR="[object RegExp]",dR="[object Set]",mR="[object String]",hR="[object Symbol]",gR="[object ArrayBuffer]",xR="[object DataView]",$h=He?He.prototype:void 0,zl=$h?$h.valueOf:void 0;function yR(e,t,r,n,i,o,a){switch(r){case xR:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gR:return!(e.byteLength!=t.byteLength||!o(new Ai(e),new Ai(t)));case sR:case uR:case fR:return Jt(+e,+t);case lR:return e.name==t.name&&e.message==t.message;case pR:case mR:return e==t+"";case cR:var s=jh;case dR:var u=n&oR;if(s||(s=Si),e.size!=t.size&&!u)return!1;var l=a.get(e);if(l)return l==t;n|=aR,a.set(e,t);var c=Ya(s(e),s(t),n,i,o,a);return a.delete(e),c;case hR:if(zl)return zl.call(e)==zl.call(t)}return!1}var qh=yR;var ER=1,bR=Object.prototype,kR=bR.hasOwnProperty;function AR(e,t,r,n,i,o){var a=r&ER,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:kR.call(t,p)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var E=!0;o.set(e,t),o.set(t,e);for(var T=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}T||(T=p=="constructor")}if(E&&!T){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 Vh=AR;var TR=1,Gh="[object Arguments]",Hh="[object Array]",Xa="[object Object]",CR=Object.prototype,Wh=CR.hasOwnProperty;function wR(e,t,r,n,i,o){var a=P(e),s=P(t),u=a?Hh:zt(e),l=s?Hh:zt(t);u=u==Gh?Xa:u,l=l==Gh?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):qh(e,t,u,r,n,i,o);if(!(r&TR)){var d=c&&Wh.call(e,"__wrapped__"),h=f&&Wh.call(t,"__wrapped__");if(d||h){var E=d?e.value():e,T=h?t.value():t;return o||(o=new Vr),i(E,T,r,n,o)}}return p?(o||(o=new Vr),Vh(e,t,r,n,i,o)):!1}var Kh=wR;function Zh(e,t,r,n,i){return e===t?!0:e==null||t==null||!Fe(e)&&!Fe(t)?e!==e&&t!==t:Kh(e,t,r,n,Zh,i)}var Ja=Zh;var SR=1,vR=2;function _R(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,SR|vR,n,f):p))return!1}}return!0}var Yh=_R;function IR(e){return e===e&&!Ce(e)}var Qa=IR;function RR(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 Xh=RR;function DR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var es=DR;function FR(e){var t=Xh(e);return t.length==1&&t[0][2]?es(t[0][0],t[0][1]):function(r){return r===e||Yh(r,e,t)}}var Jh=FR;function OR(e,t){return e!=null&&t in Object(e)}var Qh=OR;function NR(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=NR;function LR(e,t){return e!=null&&ts(e,t,Qh)}var eg=LR;var PR=1,MR=2;function BR(e,t){return pi(e)&&Qa(t)?es(rr(e),t):function(r){var n=Zm(r,e);return n===void 0&&n===t?eg(r,e):Ja(t,n,PR|MR)}}var tg=BR;function UR(e){return function(t){return t?.[e]}}var rg=UR;function zR(e){return function(t){return gi(t,e)}}var ng=zR;function jR(e){return pi(e)?rg(rr(e)):ng(e)}var ig=jR;function $R(e){return typeof e=="function"?e:e==null?Ot:typeof e=="object"?P(e)?tg(e[0],e[1]):Jh(e):ig(e)}var Be=$R;function qR(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 og=qR;function VR(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 ag=VR;var GR=ag(),sg=GR;function HR(e,t){return e&&sg(e,t,pe)}var ug=HR;function WR(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 lg=WR;var KR=lg(ug),gt=KR;function ZR(e,t,r,n){return gt(e,function(i,o,a){t(n,i,r(i),a)}),n}var cg=ZR;function YR(e,t){return function(r,n){var i=P(r)?og:cg,o=t?t():{};return i(r,e,Be(n,2),o)}}var fg=YR;var pg=Object.prototype,XR=pg.hasOwnProperty,JR=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,pg[l])&&!XR.call(e,l))&&(e[l]=o[l])}return e}),vi=JR;function QR(e){return Fe(e)&&Me(e)}var jl=QR;function eD(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=eD;var tD=200;function rD(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>=tD&&(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 dg=rD;var nD=li(function(e,t){return jl(e)?dg(e,yi(t,1,jl,!0)):[]}),Hr=nD;function iD(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var ir=iD;function oD(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=oD;function aD(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=aD;function sD(e){return typeof e=="function"?e:Ot}var mg=sD;function uD(e,t){var r=P(e)?Oa:gt;return r(e,mg(t))}var O=uD;function lD(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 hg=lD;function cD(e,t){var r=!0;return gt(e,function(n,i,o){return r=!!t(n,i,o),r}),r}var gg=cD;function fD(e,t,r){var n=P(e)?hg:gg;return r&&Pr(e,t,r)&&(t=void 0),n(e,Be(t,3))}var tt=fD;function pD(e,t){var r=[];return gt(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}var ns=pD;function dD(e,t){var r=P(e)?bi:ns;return r(e,Be(t,3))}var rt=dD;function mD(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 xg=mD;var hD=Math.max;function gD(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=hD(n+i,0)),Na(e,Be(t,3),i)}var yg=gD;var xD=xg(yg),or=xD;function yD(e){return e&&e.length?e[0]:void 0}var We=yD;function ED(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 Eg=ED;function bD(e,t){var r=P(e)?Yt:Eg;return r(e,Be(t,3))}var D=bD;function kD(e,t){return yi(D(e,t),1)}var ct=kD;var AD=Object.prototype,TD=AD.hasOwnProperty,CD=fg(function(e,t,r){TD.call(e,r)?e[r].push(t):ui(e,r,[t])}),$l=CD;var wD=Object.prototype,SD=wD.hasOwnProperty;function vD(e,t){return e!=null&&SD.call(e,t)}var bg=vD;function _D(e,t){return e!=null&&ts(e,t,bg)}var N=_D;var ID="[object String]";function RD(e){return typeof e=="string"||!P(e)&&Fe(e)&&ut(e)==ID}var Ve=RD;function DD(e,t){return Yt(t,function(r){return e[r]})}var kg=DD;function FD(e){return e==null?[]:kg(e,pe(e))}var le=FD;var OD=Math.max;function ND(e,t,r,n){e=Me(e)?e:le(e),r=r&&!n?Xt(r):0;var i=e.length;return r<0&&(r=OD(i+r,0)),Ve(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&si(e,t,r)>-1}var ke=ND;var LD=Math.max;function PD(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=LD(n+i,0)),si(e,t,i)}var is=PD;var MD="[object Map]",BD="[object Set]",UD=Object.prototype,zD=UD.hasOwnProperty;function jD(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==MD||t==BD)return!e.size;if(er(e))return!Ba(e).length;for(var r in e)if(zD.call(e,r))return!1;return!0}var X=jD;var $D="[object RegExp]";function qD(e){return Fe(e)&&ut(e)==$D}var Ag=qD;var Tg=Nt&&Nt.isRegExp,VD=Tg?tr(Tg):Ag,Lt=VD;function GD(e){return e===void 0}var nt=GD;var HD="Expected a function";function WD(e){if(typeof e!="function")throw new TypeError(HD);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 Cg=WD;function KD(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 wg=KD;function ZD(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=gi(e,a);r(s,a)&&wg(o,qr(a,e),s)}return o}var Sg=ZD;function YD(e,t){if(e==null)return{};var r=Yt(Va(e),function(n){return[n]});return t=Be(t),Sg(e,r,function(n,i){return t(n,i[0])})}var xt=YD;function XD(e,t,r,n,i){return i(e,function(o,a,s){r=n?(n=!1,o):t(r,o,a,s)}),r}var vg=XD;function JD(e,t,r){var n=P(e)?Qm:vg,i=arguments.length<3;return n(e,Be(t,4),r,i,gt)}var Ue=JD;function QD(e,t){var r=P(e)?bi:ns;return r(e,Cg(Be(t,3)))}var Wr=QD;function e0(e,t){var r;return gt(e,function(n,i,o){return r=t(n,i,o),!r}),!!r}var _g=e0;function t0(e,t,r){var n=P(e)?Za:_g;return r&&Pr(e,t,r)&&(t=void 0),n(e,Be(t,3))}var po=t0;var r0=1/0,n0=Gr&&1/Si(new Gr([,-0]))[1]==r0?function(e){return new Gr(e)}:we,Ig=n0;var i0=200;function o0(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>=i0){var l=t?null:Ig(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 Rg=o0;function a0(e){return e&&e.length?Rg(e):[]}var _i=a0;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 s0(e){return u0(e)?e.LABEL:e.name}function u0(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:s0(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 ql(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 Vl(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=Dg(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=Dg(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 Dg(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 f0(e);if(ql(e))return l0(e);if(Vl(e))return c0(e);throw Error("non exhaustive match")}function l0(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 c0(e){let t=D(e.definition,r=>_n(r));return _i(qe(t))}function f0(e){return[e.terminalType]}var as="_~IN~_";var Gl=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=p0(t.referencedRule,t.idx)+this.topProd.name,o=r.concat(n),a=new ge({definition:o}),s=_n(a);this.follows[i]=s}};function Fg(e){let t={};return O(e,r=>{let n=new Gl(r).startWalking();Ze(t,n)}),t}function p0(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 Hl(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 Wl=[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 d0=/[0-9a-fA-F]/,us=/[0-9]/,m0=/[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
- `),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=Wl;break;case"S":t=Wl,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(`
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(`
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
- `: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(Hl(n)&&this.isRangeDash()){this.consumeChar("-");let o=this.classAtom(),a=o.type==="Character";if(Hl(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(m0.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`
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`
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(d0.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={},h0=new bo;function Fi(e){let t=e.toString();if(ls.hasOwnProperty(t))return ls[t];{let r=h0.pattern(t);return ls[t]=r,r}}function Og(){ls={}}var Lg="Complement Sets are not supported for first char optimization",ko=`Unable to use "first char" lexer optimizations:
62
- `;function Pg(e,t=!1){try{let r=Fi(e);return Kl(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Lg)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 Kl(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i<e.value.length;i++)Kl(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(Lg);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),d=ar(f);for(let h=p;h<=d;h++)t[h]=h}}}});break;case"Group":Kl(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"&&Zl(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&&g0(e,t)}function g0(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 Ng(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 Zl(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?P(e.value)?tt(e.value,Zl):Zl(e.value):!1}var Yl=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?Ng(t,this.targetCharCodes)===void 0&&(this.found=!0):Ng(t,this.targetCharCodes)!==void 0&&(this.found=!0)}};function fs(e,t){if(t instanceof RegExp){let r=Fi(t),n=new Yl(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",Jl=typeof new RegExp("(?:)").sticky=="boolean";function Ug(e,t){t=vi(t,{useSticky:Jl,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
71
- `],tracer:(k,y)=>y()});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{N0()});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?Bg(y):Mg(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?Bg(v):Mg(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=Wg(t.lineTerminatorCharacters);f=D(n,y=>!1),t.positionTracking!=="onlyOffset"&&(f=D(n,y=>N(y,"LINE_BREAKS")?!!y.LINE_BREAKS:Hg(y,k)===!1&&fs(k,y.PATTERN)))});let p,d,h,E;r("Misc Mapping #2",()=>{p=D(n,Vg),d=D(o,F0),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:d[y],group:s[y],push:l[y],pop:c[y],tokenTypeIdx:a[y],tokenType:n[y]}))});let T=!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);Xl(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,Xl(k,J,E[S]))})}else if(Lt(y.PATTERN))if(y.PATTERN.unicode)T=!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=Pg(y.PATTERN,t.ensureOptimizations);X(v)&&(T=!1),O(v,A=>{Xl(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`),T=!1;return k},[])}),{emptyGroups:h,patternIdxToConfig:E,charCodeToPatternIdxToConfig:x,hasCustom:i,canBeOptimized:T}}function zg(e,t){let r=[],n=y0(e);r=r.concat(n.errors);let i=E0(n.valid),o=i.valid;return r=r.concat(i.errors),r=r.concat(x0(o)),r=r.concat(v0(o)),r=r.concat(_0(o,t)),r=r.concat(I0(o)),r}function x0(e){let t=[],r=rt(e,n=>Lt(n[Rn]));return t=t.concat(k0(r)),t=t.concat(C0(r)),t=t.concat(w0(r)),t=t.concat(S0(r)),t=t.concat(A0(r)),t}function y0(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 E0(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 b0=/[^\\][$]/;function k0(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 b0.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 A0(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 T0=/[^\\[][\^]|^\^/;function C0(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 T0.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 w0(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 S0(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 v0(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 _0(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 I0(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)&&D0(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&&R0(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 R0(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 D0(e){return or([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}function Mg(e){let t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function Bg(e){let t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function jg(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 $g(e,t,r){let n=[],i=!1,o=nr(qe(le(e.modes))),a=Wr(o,u=>u[Rn]===ee.NA),s=Wg(r);return t&&O(a,u=>{let l=Hg(u,s);if(l!==!1){let f={message:O0(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 qg(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 Vg(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 F0(e){return Ve(e)&&e.length===1?e.charCodeAt(0):!1}var Gg={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 Hg(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(Vg(e))return{issue:Ae.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function O0(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 Wg(e){return D(e,r=>Ve(r)?r.charCodeAt(0):r)}function Xl(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}var Oi=256,ds=[];function ar(e){return e<Oi?e:ds[e]}function N0(){if(X(ds)){ds=new Array(65536);for(let e=0;e<65536;e++)ds[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 Kg=1,Yg={};function Cr(e){let t=L0(e);P0(t),B0(t),M0(t),O(t,r=>{r.isParent=r.categoryMatches.length>0})}function L0(e){let t=me(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 P0(e){O(e,t=>{Ql(t)||(Yg[Kg]=t,t.tokenTypeIdx=Kg++),Zg(t)&&!P(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Zg(t)||(t.CATEGORIES=[]),U0(t)||(t.categoryMatches=[]),z0(t)||(t.categoryMatchesMap={})})}function M0(e){O(e,t=>{t.categoryMatches=[],O(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(Yg[n].tokenTypeIdx)})})}function B0(e){O(e,t=>{Xg([],t)})}function Xg(e,t){O(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),O(t.CATEGORIES,r=>{let n=e.concat(t);ke(n,r)||Xg(n,r)})}function Ql(e){return N(e,"tokenTypeIdx")}function Zg(e){return N(e,"CATEGORIES")}function U0(e){return N(e,"categoryMatches")}function z0(e){return N(e,"categoryMatchesMap")}function Jg(e){return N(e,"tokenTypeIdx")}var ec={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
- `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:ec,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=Gg;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:me(t)},defaultMode:Ni}:(o=!1,i=me(t))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(jg(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat($g(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(zg(s,a))}),X(this.lexerDefinitionErrors)){Cr(s);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=Ug(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(`-----------------------
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:[`
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.
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
- `+u)}O(this.lexerDefinitionWarning,s=>{mo(s.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Jl?(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
+ `+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",()=>{Og()}),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,d,h,E,T,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=qg(this.emptyGroups),B=this.trackStartLines,V=this.config.lineTerminatorsPattern,G=0,ae=[],xe=[],Ye=[],Et=[];Object.freeze(Et);let m;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?m=vt:m=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?m=vt:m=it}Xe.call(this,r);let ze,Pn=this.config.recoveryEnabled;for(;v<S;){u=null;let Re=y.charCodeAt(v),se=m(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&&(d=ze.tokenTypeIdx,h=this.createTokenInstance(u,v,d,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 tc(e)?e.LABEL:e.name}function tc(e){return Ve(e.LABEL)&&e.LABEL!==""}var j0="parent",Qg="categories",ex="label",tx="group",rx="push_mode",nx="pop_mode",ix="longer_alt",ox="line_breaks",ax="start_chars_hint";function H(e){return $0(e)}function $0(e){let t=e.pattern,r={};if(r.name=e.name,nt(t)||(r.PATTERN=t),N(e,j0))throw`The parent property is no longer supported.
106
- See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return N(e,Qg)&&(r.CATEGORIES=e[Qg]),Cr([r]),N(e,ex)&&(r.LABEL=e[ex]),N(e,tx)&&(r.GROUP=e[tx]),N(e,nx)&&(r.POP_MODE=e[nx]),N(e,rx)&&(r.PUSH_MODE=e[rx]),N(e,ix)&&(r.LONGER_ALT=e[ix]),N(e,ox)&&(r.LINE_BREAKS=e[ox]),N(e,ax)&&(r.START_CHARS_HINT=e[ax]),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 rc(e,t){return Tr(e,t)}var ms={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${tc(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
- but found: '`+We(t).image+"'";if(n)return o+n+s;{let u=Ue(e,(p,d)=>p.concat(d),[]),l=D(u,p=>`[${D(p,d=>Dn(d)).join(", ")}]`),f=`one of these possible Token sequences:
108
- ${D(l,(p,d)=>` ${d+1}. ${p}`).join(`
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=`
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:
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(ms);var sx={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 ux(e,t){let r=new nc(e,t);return r.resolveRefs(),r.errors}var nc=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 ic=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=me(this.path.ruleStack).reverse(),this.occurrenceStack=me(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(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 ic{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=me(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 d=p.def,h=p.idx,E=p.ruleStack,T=p.occurrenceStack;if(X(d))continue;let x=d[0];if(x===i){let k={idx:h,def:Oe(d),ruleStack:kr(E),occurrenceStack:kr(T)};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(d),ruleStack:E,occurrenceStack:T};f.push(S)}}else if(h===u-1)c.push({nextTokenType:x.terminalType,nextTokenOccurrence:x.idx,ruleStack:E,occurrenceStack:T}),s=!0;else throw Error("non exhaustive match");else if(x instanceof he){let k=me(E);k.push(x.nonTerminalName);let y=me(T);y.push(x.idx);let S={idx:h,def:x.definition.concat(o,Oe(d)),ruleStack:k,occurrenceStack:y};f.push(S)}else if(x instanceof Ee){let k={idx:h,def:Oe(d),ruleStack:E,occurrenceStack:T};f.push(k),f.push(a);let y={idx:h,def:x.definition.concat(Oe(d)),ruleStack:E,occurrenceStack:T};f.push(y)}else if(x instanceof Ne){let k=new ue({definition:x.definition,idx:x.idx}),y=x.definition.concat([k],Oe(d)),S={idx:h,def:y,ruleStack:E,occurrenceStack:T};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(d)),v={idx:h,def:S,ruleStack:E,occurrenceStack:T};f.push(v)}else if(x instanceof _e){let k={idx:h,def:Oe(d),ruleStack:E,occurrenceStack:T};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(d)),A={idx:h,def:v,ruleStack:E,occurrenceStack:T};f.push(A)}else if(x instanceof ue){let k={idx:h,def:Oe(d),ruleStack:E,occurrenceStack:T};f.push(k),f.push(a);let y=new ue({definition:x.definition,idx:x.idx}),S=x.definition.concat([y],Oe(d)),v={idx:h,def:S,ruleStack:E,occurrenceStack:T};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(d)),ruleStack:E,occurrenceStack:T};f.push(S),f.push(a)}else if(x instanceof ge)f.push({idx:h,def:x.definition.concat(Oe(d)),ruleStack:E,occurrenceStack:T});else if(x instanceof ft)f.push(q0(x,h,E,T));else throw Error("non exhaustive match")}return c}function q0(e,t,r,n){let i=me(r);i.push(e.name);let o=me(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 cx(e,t,r,n,i,o){let a=wo(e,t,r),s=gx(a)?Li:Tr;return o(a,n,s,i)}function fx(e,t,r,n,i,o){let a=So(e,t,i,r),s=gx(a)?Li:Tr;return o(a[0],s,n)}function px(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 d=l[p],h=d.length;for(let E=0;E<h;E++){let T=this.LA(E+1);if(r(T,d[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 d=this.LA(p+1);if(r(d,c[p])===!1)continue e}return a}}}}function dx(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 ac=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 lx(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}function oc(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 V0(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 mx(e,t){let r=D(e,a=>ys([a],1)),n=lx(r.length),i=D(r,a=>{let s={};return O(a,u=>{let l=oc(u.partialPath);O(l,c=>{s[c]=!0})}),s}),o=r;for(let a=1;a<=t;a++){let s=o;o=lx(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,d=oc(f);if(V0(i,d,u)||X(p)||f.length===t){let E=n[u];if(As(E,f)===!1){E.push(f);for(let T=0;T<d.length;T++){let x=d[T];i[u][x]=!0}}}else{let E=ys(p,a+1,f);o[u]=o[u].concat(E),O(E,T=>{let x=oc(T.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),mx(i.result,r)}function So(e,t,r,n){let i=new bs(e,r);t.accept(i);let o=i.result,s=new ac(t,e,r).startWalking(),u=new ge({definition:o}),l=new ge({definition:s});return mx([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 hx(e,t){return e.length<t.length&&tt(e,(r,n)=>{let i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function gx(e){return tt(e,t=>tt(t,r=>tt(r,n=>X(n.categoryMatches))))}function xx(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 yx(e,t,r,n){let i=ct(e,u=>G0(u,r)),o=X0(e,t,r),a=ct(e,u=>K0(u,r)),s=ct(e,u=>W0(u,e,n,r));return i.concat(o,a,s)}function G0(e,t){let r=new sc;e.accept(r);let n=r.allProductions,i=$l(n,H0),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=Ex(u);return p&&(f.parameter=p),f})}function H0(e){return`${yt(e)}_#_${e.idx}_#_${Ex(e)}`}function Ex(e){return e instanceof ie?e.terminalType.name:e instanceof he?e.nonTerminalName:""}var sc=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 W0(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 bx(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 lc(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=me(n);return f.push(c),lc(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 kx(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 Ax(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=Z0(l,a,e,r),f=Y0(l,a,e,r);return c.concat(f)})}var uc=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 K0(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 Tx(e,t,r){let n=[];return O(e,i=>{let o=new uc;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 d=r.buildEmptyRepetitionError({topLevelRule:i,repetition:s});n.push({message:d,type:Ge.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function Z0(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,d)=>{l!==d&&As(p,c)&&t.definition[d].ignoreAmbiguities!==!0&&f.push(d)}),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 Y0(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&&hx(p.path,l));return D(c,p=>{let d=[p.idx+1,u+1],h=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:d,prefixPath:p.path}),type:Ge.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:h,alternatives:d}})}))}function X0(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 Cx(e){let t=vi(e,{errMsgProvider:sx}),r={};return O(e.rules,n=>{r[n.name]=n}),ux(r,t.errMsgProvider)}function wx(e){return e=vi(e,{errMsgProvider:$t}),yx(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var Sx="MismatchedTokenException",vx="NoViableAltException",_x="EarlyExitException",Ix="NotAllInputParsedException",Rx=[Sx,vx,_x,Ix];Object.freeze(Rx);function Zr(e){return ke(Rx,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=Sx}},_o=class extends Mi{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=vx}},Io=class extends Mi{constructor(t,r){super(t,r),this.name=Ix}},Ro=class extends Mi{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=_x}};var cc={},pc="InRuleRecoveryException",fc=class extends Error{constructor(t){super(t),this.name=pc}},Cs=class{initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=N(t,"recoveryEnabled")?t.recoveryEnabled:dt.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=J0)}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),d=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:p,ruleName:this.getCurrRuleFullName()}),h=new On(d,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 fc("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=>rc(r,o));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return cc;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?cc:{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===cc)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=me(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:t,lastTokOccurrence:r}}getHumanReadableRuleStack(){return D(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}};function J0(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(),d=this.getGAstProductions()[p];u=new o(d,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:dt.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=>lc(r,r,$t))}validateEmptyOrAlternatives(t){return ct(t,r=>kx(r,$t))}validateAmbiguousAlternationAlternatives(t,r){return ct(t,n=>Ax(n,r,$t))}validateSomeNonEmptyLookaheadPath(t,r){return Tx(t,r,$t)}buildLookaheadForAlternation(t){return cx(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,px)}buildLookaheadForOptional(t){return fx(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,ks(t.prodType),dx)}};var vs=class{initLooksAhead(t){this.dynamicTokensEnabled=N(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:dt.dynamicTokensEnabled,this.maxLookahead=N(t,"maxLookahead")?t.maxLookahead:dt.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}=Q0(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)}},dc=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 dc;function Q0(e){Ss.reset(),e.accept(Ss);let t=Ss.dslMethods;return Ss.reset(),t}function gc(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function xc(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 Dx(e,t,r){e.children[r]===void 0?e.children[r]=[t]:e.children[r].push(t)}function Fx(e,t,r){e.children[t]===void 0?e.children[t]=[r]:e.children[t].push(r)}var eF="name";function yc(e,t){Object.defineProperty(e,eF,{enumerable:!1,configurable:!0,writable:!1,value:t})}function tF(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 Ox(e,t){let r=function(){};yc(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=rF(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 Nx(e,t,r){let n=function(){};yc(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return O(t,o=>{i[o]=tF}),n.prototype=i,n.prototype.constructor=n,n}var Ec;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(Ec||(Ec={}));function rF(e,t){return nF(e,t)}function nF(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:Ec.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:dt.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=xc,this.setNodeLocationFromNode=xc,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=gc,this.setNodeLocationFromNode=gc,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];Dx(n,r,t),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];Fx(n,r,t),this.setNodeLocationFromNode(n.location,t.location)}getBaseCstVisitorConstructor(){if(nt(this.baseCstVisitorConstructor)){let t=Ox(this.className,pe(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(nt(this.baseCstVisitorWithDefaultsConstructor)){let t=Nx(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=bx(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)),Jg)){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=me(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===pc?n:o}}else throw n}saveRecogState(){let t=this.errors,r=me(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:dt.errorMessageProvider}SAVE_ERROR(t){if(Zr(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:me(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return me(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 Lx=!0,Px=Math.pow(2,8)-1,Bx=H({name:"RECORDING_PHASE_TOKEN",pattern:ee.NA});Cr([Bx]);var Ux=Fn(Bx,`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(Ux);var oF={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,Lx)}manyInternalRecord(t,r){Oo.call(this,ue,r,t)}manySepFirstInternalRecord(t,r){Oo.call(this,_e,r,t,Lx)}orInternalRecord(t,r){return aF.call(this,t,r)}subruleInternalRecord(t,r,n){if(Bs(r),!t||N(t,"ruleName")===!1){let s=new Error(`<SUBRULE${Mx(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?oF:Us}consumeInternalRecord(t,r,n){if(Bs(r),!Ql(t)){let a=new Error(`<CONSUME${Mx(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),Ux}};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 aF(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 Mx(e){return e===0?"":`${e}`}function Bs(e){if(e<0||e>Px){let t=new Error(`Invalid DSL Method idx value: <${e}>
154
- Idx value must be a none negative value smaller than ${Px+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=dt.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 zx(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 dt=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ms,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=Cx({rules:le(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(X(n)&&this.skipValidations===!1){let i=wx({rules:le(this.gastProductionsCache),tokenTypes:le(this.tokensMap),errMsgProvider:$t,grammarName:r}),o=xx({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=Fg(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:dt.skipValidations}};No.DEFER_DEFINITION_ERRORS_HANDLING=!1;zx(No,[Cs,vs,Ds,Fs,Ns,Os,Ls,Ps,Ms,zs]);var Nn=class extends No{constructor(t,r=dt){let n=me(r);n.outputCst=!0,super(t,n)}};var $s=H({name:"flag",pattern:/--[\w-_]+/}),Tc=H({longer_alt:$s,name:"alias",pattern:/-[A-Za-z]/}),jx=H({group:ee.SKIPPED,name:"comma",pattern:/,/}),$x=H({group:ee.SKIPPED,name:"dollar",pattern:/\$/}),js=H({group:ee.SKIPPED,name:"whiteSpace",pattern:/ /}),qx=H({group:ee.SKIPPED,name:"newLine",pattern:/\n/}),Cc=H({name:"word",pattern:/\S+/}),Po=H({name:"argument",pattern:/(<\S+>|\[.+])/}),wc=H({name:"programDescription",pattern:/\w.+(?=\n\n {2}Usage)/}),Vx=H({group:ee.SKIPPED,name:"startUsage",pattern:/ {2}Usage\n/,push_mode:"USAGE_MODE"}),Gx=H({group:ee.SKIPPED,name:"endUsage",pattern:/\n/,pop_mode:!0}),Sc=H({name:"startOptions",pattern:/ {2}Options\n/,push_mode:"OPTIONS_MODE"}),vc=H({name:"startRow",pattern:/ {4}/,push_mode:"ROW_MODE"}),_c=H({name:"rowDescription",pattern:/\w.+/}),Hx=H({group:ee.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),Wx=H({group:ee.SKIPPED,name:"endOptions",pattern:/\n/,pop_mode:!0}),uF=new ee({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[Vx,Sc,wc,qx,js],OPTIONS_MODE:[Wx,vc],ROW_MODE:[Hx,Tc,$s,jx,Po,_c,js],USAGE_MODE:[Gx,$x,Po,Cc,js]}}),lF=[$s,Tc,jx,$x,js,qx,Cc,Po,wc,Vx,Gx,Sc,vc,_c,Hx,Wx],kc=class extends Nn{programHelp=this.RULE("programHelp",()=>{this.CONSUME(wc,{LABEL:"description"}),this.AT_LEAST_ONE(()=>{this.CONSUME(Cc,{LABEL:"commandName"})}),this.MANY(()=>{this.CONSUME(Po)}),this.OPTION(()=>{this.SUBRULE(this.optionsSection)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(Sc),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(vc),this.MANY(()=>{this.OR([{ALT:()=>this.CONSUME(Po)},{ALT:()=>this.CONSUME(Tc)},{ALT:()=>this.CONSUME($s)},{ALT:()=>this.CONSUME(_c,{LABEL:"description"})}])})});constructor(){super(lF),this.performSelfAnalysis()}},Lo=new kc,Ac=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,"")}},cF=new Ac;function Kx(e){let t=uF.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=cF.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 Fc=H({name:"flag",pattern:/--[\w-_]+/}),Oc=H({name:"alias",pattern:/-[A-Za-z]/}),Zx=H({group:ee.SKIPPED,name:"comma",pattern:/,/}),zi=H({name:"word",pattern:/\S+/}),Bo=H({name:"argument",pattern:/<\S+>|\[\S+]/}),Nc=H({name:"type",pattern:/\[(boolean|string|array|number)]/}),Lc=H({name:"defaultInfo",pattern:/\[default]/}),Pc=H({name:"required",pattern:/\[required]/}),Mc=H({name:"defaultInfoDescription",pattern:/\[default:\s.+]/}),Bc=H({name:"choices",pattern:/\[choices:\s.+?]/}),Ic=H({group:ee.SKIPPED,name:"whiteSpace",pattern:/\s/}),Yx=H({group:ee.SKIPPED,name:"startProgramDescription",pattern:/\n\n/,push_mode:"PROGRAM_DESCRIPTION_MODE"}),Uc=H({name:"programDescription",pattern:/.+/}),Xx=H({group:ee.SKIPPED,name:"endProgramDescription",pattern:/\n\n/,pop_mode:!0}),zc=H({name:"startOptionsSection",pattern:/Options:?\n/,push_mode:"SECTION_MODE"}),jc=H({name:"startPositionalsSection",pattern:/Positionals:\n/,push_mode:"SECTION_MODE"}),$c=H({name:"startCommandsSection",pattern:/Commands:\n/,push_mode:"SECTION_MODE"}),qc=H({name:"startRow",pattern:/ {2,}/,push_mode:"ROW_MODE"}),Vc=H({name:"rowDescription",pattern:/ {2}\w.+ {2}/}),Gc=H({name:"rowDescriptionTerminal",pattern:/ {2}\w.+/}),Jx=H({group:ee.SKIPPED,name:"endRow",pattern:/\n/,pop_mode:!0}),Qx=H({group:ee.SKIPPED,name:"endSection",pattern:/\n+/,pop_mode:!0}),fF=new ee({defaultMode:"DEFAULT_MODE",modes:{DEFAULT_MODE:[zc,jc,$c,Yx,Bo,zi,Ic],PROGRAM_DESCRIPTION_MODE:[Xx,Uc],ROW_MODE:[Jx,Zx,Nc,Vc,Gc,Mc,Lc,Pc,Bc,Fc,Oc,Bo,zi,Ic],SECTION_MODE:[qc,Qx]}}),pF=[Fc,Oc,Zx,zi,Bo,Nc,Lc,Pc,Mc,Bc,Ic,Yx,Uc,Xx,zc,jc,$c,qc,Vc,Gc,Jx,Qx],Rc=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(Uc,{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(jc),this.MANY(()=>{this.SUBRULE(this.sectionRow)})});commandsSection=this.RULE("commandsSection",()=>{this.CONSUME($c),this.MANY1(()=>{this.SUBRULE1(this.sectionRow)})});optionsSection=this.RULE("optionsSection",()=>{this.CONSUME(zc),this.MANY2(()=>{this.SUBRULE2(this.sectionRow)})});sectionRow=this.RULE("sectionRow",()=>{this.CONSUME(qc),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(Oc)},{ALT:()=>this.CONSUME(Fc)},{ALT:()=>this.CONSUME(Vc,{LABEL:"description"})},{ALT:()=>this.CONSUME(Gc,{LABEL:"description"})},{ALT:()=>this.CONSUME(Nc)},{ALT:()=>this.CONSUME(Pc)},{ALT:()=>this.CONSUME(Mc)},{ALT:()=>this.CONSUME(Lc)},{ALT:()=>this.CONSUME(Bc)}])})});constructor(){super(pF),this.performSelfAnalysis()}},Mo=new Rc,Dc=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(", ")}},dF=new Dc;function ey(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)}`);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=dF.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 ty={yargs:ey,meow:Kx};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 ry(e){for(let[t,r]of Object.entries(ty)){Hc.info(`Trying to parse help string with ${t} parser...`);try{return r(e)}catch(n){n instanceof Error&&Hc.info(`Error in "${t}" parser: ${String(n)}`);continue}}Hc.error("Could not parse help string with any parser")}async function Wc(e,t="--help",r){let n=`${e} ${t}`,i=await xF(n),o=ry(i);return o===void 0?(ny.warn("Falling back to basic cli help text output."),gF(i)):hF(e,t,r??Number.MAX_SAFE_INTEGER,o)}async function hF(e,t,r,n){if(r<=0)return ny.info("Max CLI command help depth reached, stopping recursion"),"";let i=Ud(n,r),o=e.split(" ")[0];if(n.commands)for(let a of n.commands){if(!a.parentCommandName||!a.commandName)continue;let s=await Wc(`${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 gF(e){return`\`\`\`txt
163
+ ${s}`}return i}function TF(e){return`\`\`\`txt
163
164
  ${e}
164
- \`\`\``}async function xF(e){let t;try{let{stderr:r,stdout:n}=await mF(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 iy from"node:process";import yF from"node:path";import EF from"node:fs";import bF from"node:fs/promises";var oy=iy.platform==="win32",kF=oy?new Set(iy.env.PATHEXT?.split(";").map(e=>e.toLowerCase())):[];async function ay(e){try{return await bF.access(e,EF.X_OK),oy?kF.has(yF.extname(e)):!0}catch{return!1}}import AF from"node:path";import{log as TF}from"remark-mdat";import CF from"which";async function sy(e){return e??=await wF(),vF(e)}async function wF(){let e=await Ct();if(e?.bin){let t=typeof e.bin=="string"?e.bin:String(Object.values(e.bin).at(0));if(SF(t))return TF.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 SF(e){let t=AF.parse(e);return t.root!==""||t.dir!==""}async function vF(e){let t=await CF(e,{nothrow:!0})??void 0;if(t===null&&(t=await _F(e)??void 0),t!==void 0&&await ay(t))return t;throw new Error(`The cli-help rule noticed that "${t}" is not executable.`)}async function _F(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 sy(t?.cliCommand);return Wc(r,t?.helpFlag,t?.depth)}}};var uy={cli:IF(Vs)};import RF from"node:fs/promises";import ly from"node:path";var cy={code:{async content(e){let t=L.object({file:L.string(),language:L.string().optional()}).parse(e),r=(ly.extname(t.file)??"").replace(/^\./,""),n=await RF.readFile(ly.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 fy}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 py={footer:{content:[fy(Gs),fy(Ws)],order:17}};import{getSoleRule as Ys}from"remark-mdat";import{getSoleRule as DF}from"remark-mdat";var Ks={"short-description":DF(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?FF(i):i}${t}`},order:1}};function FF(e){return e.split(/[ _-]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}var dy={header:{applicationOrder:2,content:[Ys(Zs),Ys(Ia),Ys(va),Ys(Ks)],order:1}};import $F from"node:path";import MF from"node:fs/promises";import{promisify as hy}from"node:util";import{brotliCompress as BF,gzip as UF}from"node:zlib";var OF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],NF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],LF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],PF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],my=(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 Kc(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?PF:LF:t.binary?NF:OF,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=my(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=my(Number(e),t.locale,a),l=r[s];return o+u+n+l}var zF=hy(BF),jF=hy(UF);function Zc(e,t){let r=t===0?0:(t-e)/t*100;return{bytes:e,bytesPretty:Kc(e,{maximumFractionDigits:1}),percent:r,percentPretty:`${Math.round(r)}%`}}async function Xs(e){try{let t=await MF.readFile(e),r=t.length,[n,i]=await Promise.all([zF(t),jF(t)]);return{brotli:Zc(n.length,r),gzip:Zc(i.length,r),original:Zc(r,r)}}catch(t){throw new Error(`Failed to analyze file: ${t instanceof Error?t.message:"Unknown error"}`)}}var qF=L.object({compression:L.enum(["none","brotli","gzip"]).optional().default("none"),file:L.string()});function VF(e,t){switch(t){case"brotli":return e.brotli.bytesPretty;case"gzip":return e.gzip.bytesPretty;case"none":return e.original.bytesPretty}}var gy={size:{async content(e){let t=qF.parse(e),r=$F.join(process.cwd(),t.file),n=await Xs(r);return VF(n,t.compression)}}};import yy from"node:path";var xy=L.union([L.string(),L.array(L.string())]).transform(e=>Array.isArray(e)?e:[e]),GF=L.union([L.object({brotli:L.boolean().optional().default(!0),file:xy,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:xy,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 HF(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=[yy.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 Ey={"size-table":{async content(e){let t=GF.parse(e),r=await Promise.all(t.files.map(async n=>{let i=yy.join(process.cwd(),n),o=await Xs(i);return[n,o]}));return HF(r,{brotli:t.brotli,gzip:t.gzip,original:t.original,showPercentage:t.showPercentage})}}};var by=/[\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 WF=Object.hasOwnProperty,Uo=class{constructor(){this.occurrences,this.reset()}slug(t,r){let n=this,i=KF(t,r===!0),o=i;for(;WF.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 KF(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(by,"").replace(/ /g,"-"))}function Js(e){return new RegExp("^("+e+")$","i")}var ky=new Uo;function Ay(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 ky.reset(),ao(e,"heading",function(c,f,p){let d=hr(c,{includeImageAlt:!1}),h=c.data&&c.data.hProperties&&c.data.hProperties.id,E=ky.slug(h||d);if(o(p)){if(f!==void 0&&t&&!s&&t.test(d)){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(d))&&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 Ty=typeof self=="object"?self:globalThis,JF=(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 Ty[s](u),i)}case 8:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i)}return r(new Ty[o](a),i)};return n},Qc=e=>JF(new Map,e)(0);var ji="",{toString:QF}={},{keys:e1}=Object,zo=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let r=QF.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]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},Qs=([e,t])=>e===0&&(t==="function"||t==="symbol"),t1=(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)return i([u,[...a]],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 e1(a))(e||!Qs(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,d]of a)(e||!(Qs(zo(p))||Qs(zo(d))))&&c.push([o(p),o(d)]);return f}case 6:{let c=[],f=i([s,c],a);for(let p of a)(e||!Qs(zo(p)))&&c.push(o(p));return f}}let{message:l}=a;return i([s,{name:u,message:l}],a)};return o},ef=(e,{json:t,lossy:r}={})=>{let n=[];return t1(!(t||r),!!t,new Map,n)(e),n};var tf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Qc(ef(e,t)):structuredClone(e):(e,t)=>Qc(ef(e,t));function _y(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:rf(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 rf(e){let t=[],r=-1;for(;++r<e.length;){let n=r1(e[r]);Array.isArray(n)?t.push(...n):t.push(n)}return t}function r1(e){if(e.type==="footnoteReference")return[];if(e.type==="link"||e.type==="linkReference")return rf(e.children);if("children"in e){let{children:n,position:i,...o}=e;return Object.assign(tf(o),{children:rf(e.children)})}let{position:t,...r}=e;return tf(r)}function nf(e,t){let r=t||{},n=r.heading?Js(r.heading):void 0,i=Ay(e,n,r);return{index:n?i.index:void 0,endIndex:n?i.endIndex:void 0,map:i.map.length>0?_y(i.map,r):void 0}}var eu={"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=nf(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 Iy}from"@kitschpatrol/tldraw-cli";import n1 from"node:crypto";import $i from"node:fs/promises";import qt from"node:path";var Oy={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 mn();if(n===void 0)throw new Error("No assets path found");await $i.mkdir(n,{recursive:!0});let i=await Yn(r)?await Dy(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 Ry(c,f,t)}let[o]=await Iy(r,{dark:!1,format:"svg",output:n,transparent:!0});i??=await Dy(o);let a=`${Fy(o)}-${i}-light.svg`;await $i.rename(o,a);let[s]=await Iy(r,{dark:!0,format:"svg",output:n,transparent:!0}),u=`${Fy(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 d of p){let h=qt.basename(d);h!==l&&h!==c&&h.startsWith(f)&&h.endsWith(".svg")&&await $i.rm(qt.join(n,h))}}return Ry(a,u,t)}}};async function Ry(e,t,r){let{packageFile:n}=await mn();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 Dy(e){let t=await $i.readFile(e),r=n1.createHash("sha1");return r.update(t),r.digest("hex").slice(0,8)}function Fy(e){return e.replace(/\.[^./]+$/,"")}import{getSoleRule as i1}from"remark-mdat";var Ny={toc:i1(eu)};var Ly={...va,...Ia,...uy,...Vs,...cy,...Gs,...Hs,...py,...dy,...Ws,...Ks,...gy,...Ey,...eu,...Zs,...Oy,...Ny};async function Ln(e){let t={addMetaComment:!0,rules:Ly},{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 s1 from"node:process";import u1 from"node:path";import LQ,{promises as Py}from"node:fs";import{fileURLToPath as l1}from"node:url";var of=class{value;next;constructor(t){this.value=t}},$o=class{#e;#t;#r;constructor(){this.clear()}enqueue(t){let r=new of(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 tu(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 ru=class extends Error{constructor(t){super(),this.value=t}},o1=async(e,t)=>t(await e),a1=async e=>{let t=await Promise.all(e);if(t[1]===!0)throw new ru(t[0]);return!1};async function af(e,t,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){let i=tu(r),o=[...e].map(s=>[s,i(o1,s,t)]),a=tu(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(o.map(s=>a(a1,s)))}catch(s){if(s instanceof ru)return s.value;throw s}}var My={directory:"isDirectory",file:"isFile"};function c1(e){if(!Object.hasOwnProperty.call(My,e))throw new Error(`Invalid type specified: ${e}`)}var f1=(e,t)=>t[My[e]](),p1=e=>e instanceof URL?l1(e):e;async function sf(e,{cwd:t=s1.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:i,preserveOrder:o}={}){c1(r),t=p1(t);let a=n?Py.stat:Py.lstat;return af(e,async s=>{try{let u=await a(u1.resolve(t,s));return f1(r,u)}catch{return!1}},{concurrency:i,preserveOrder:o})}import{fileURLToPath as d1}from"node:url";function uf(e){return e instanceof URL?d1(e):e}var m1=Symbol("findUpStop");async function h1(e,t={}){let r=qo.resolve(uf(t.cwd)??""),{root:n}=qo.parse(r),i=qo.resolve(r,uf(t.stopAt??n)),o=t.limit??Number.POSITIVE_INFINITY,a=[e].flat(),s=async l=>{if(typeof e!="function")return sf(a,l);let c=await e(l.cwd);return typeof c=="string"?sf([c],l):c},u=[];for(;;){let l=await s({...t,cwd:r});if(l===m1||(l&&u.push(qo.resolve(r,l)),r===i||u.length>=o))break;r=qo.dirname(r)}return u}async function By(e,t={}){return(await h1(e,{...t,limit:1}))[0]}import g1 from"node:path";async function Uy({cwd:e}={}){let t=await Jo("package.json",{cwd:e});return t&&g1.dirname(t)}import{log as zy}from"remark-mdat";async function x1(){zy.info("Searching for package directory...");let e=await Uy()??process.cwd(),t=await By("readme.md",{stopAt:e,type:"file"});if(t!==void 0)return zy.info(`Found closest readme at "${t}"`),t}async function nu(){let e=await x1();if(e===void 0)throw new Error("No readme found");return e}async function y1(e,t,r,n,i){return e??=await nu(),Fr(e,Ln,ii,t,r,n,i)}async function E1(e,t,r){return Cn(e,Ln,ii,t,r)}async function b1(e,t,r,n,i){return e??=await nu(),Fr(e,Ln,oi,t,r,n,i)}async function k1(e,t,r){return Cn(e,Ln,oi,t,r)}async function A1(e,t,r,n,i){return e??=await nu(),Fr(e,Ln,uo,t,r,n,i)}export{mC as checkFiles,b1 as checkReadmeFiles,k1 as checkReadmeString,hC as checkString,gC as collapseFiles,A1 as collapseReadmeFiles,xC as collapseString,pC as expandFiles,y1 as expandReadmeFiles,E1 as expandReadmeString,dC as expandString,Ut as loadConfig,Ln as loadConfigReadme,$b 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: