@ian2018cs/agenthub 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/LICENSE +675 -0
  2. package/README.md +330 -0
  3. package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  4. package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  5. package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  6. package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  7. package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  8. package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  9. package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  10. package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  11. package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  12. package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  13. package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  14. package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  15. package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  16. package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  17. package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  18. package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  19. package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  20. package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  21. package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  22. package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  23. package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  24. package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  25. package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  26. package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  27. package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  28. package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  29. package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  30. package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  31. package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  32. package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  33. package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  34. package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  35. package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  36. package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  37. package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  38. package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  39. package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  40. package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  41. package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  42. package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  43. package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  44. package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  45. package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  46. package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  47. package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  48. package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  49. package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  50. package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  51. package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  52. package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  53. package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  54. package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  55. package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  56. package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  57. package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  58. package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  59. package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  60. package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  61. package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  62. package/dist/assets/index-B4ru3EJb.css +32 -0
  63. package/dist/assets/index-DDFuyrpY.js +154 -0
  64. package/dist/assets/vendor-codemirror-C_VWDoZS.js +39 -0
  65. package/dist/assets/vendor-icons-CJV4dnDL.js +326 -0
  66. package/dist/assets/vendor-katex-DK8hFnhL.js +261 -0
  67. package/dist/assets/vendor-markdown-VwNYkg_0.js +35 -0
  68. package/dist/assets/vendor-react-BeVl62c0.js +59 -0
  69. package/dist/assets/vendor-syntax-CdGaPJRS.js +16 -0
  70. package/dist/assets/vendor-utils-00TdZexr.js +1 -0
  71. package/dist/assets/vendor-xterm-CvdiG4-n.js +66 -0
  72. package/dist/clear-cache.html +85 -0
  73. package/dist/convert-icons.md +53 -0
  74. package/dist/favicon.png +0 -0
  75. package/dist/favicon.svg +9 -0
  76. package/dist/generate-icons.js +49 -0
  77. package/dist/icons/claude-ai-icon.svg +1 -0
  78. package/dist/icons/codex-white.svg +3 -0
  79. package/dist/icons/codex.svg +3 -0
  80. package/dist/icons/cursor-white.svg +12 -0
  81. package/dist/icons/cursor.svg +1 -0
  82. package/dist/icons/generate-icons.md +19 -0
  83. package/dist/icons/icon-128x128.png +0 -0
  84. package/dist/icons/icon-128x128.svg +12 -0
  85. package/dist/icons/icon-144x144.png +0 -0
  86. package/dist/icons/icon-144x144.svg +12 -0
  87. package/dist/icons/icon-152x152.png +0 -0
  88. package/dist/icons/icon-152x152.svg +12 -0
  89. package/dist/icons/icon-192x192.png +0 -0
  90. package/dist/icons/icon-192x192.svg +12 -0
  91. package/dist/icons/icon-384x384.png +0 -0
  92. package/dist/icons/icon-384x384.svg +12 -0
  93. package/dist/icons/icon-512x512.png +0 -0
  94. package/dist/icons/icon-512x512.svg +12 -0
  95. package/dist/icons/icon-72x72.png +0 -0
  96. package/dist/icons/icon-72x72.svg +12 -0
  97. package/dist/icons/icon-96x96.png +0 -0
  98. package/dist/icons/icon-96x96.svg +12 -0
  99. package/dist/icons/icon-template.svg +12 -0
  100. package/dist/index.html +57 -0
  101. package/dist/logo-128.png +0 -0
  102. package/dist/logo-256.png +0 -0
  103. package/dist/logo-32.png +0 -0
  104. package/dist/logo-512.png +0 -0
  105. package/dist/logo-64.png +0 -0
  106. package/dist/logo.svg +17 -0
  107. package/dist/manifest.json +61 -0
  108. package/dist/screenshots/cli-selection.png +0 -0
  109. package/dist/screenshots/desktop-main.png +0 -0
  110. package/dist/screenshots/mobile-chat.png +0 -0
  111. package/dist/screenshots/tools-modal.png +0 -0
  112. package/dist/sw.js +49 -0
  113. package/package.json +113 -0
  114. package/server/claude-sdk.js +791 -0
  115. package/server/cli.js +330 -0
  116. package/server/database/auth.db +0 -0
  117. package/server/database/db.js +523 -0
  118. package/server/database/init.sql +23 -0
  119. package/server/index.js +1678 -0
  120. package/server/load-env.js +27 -0
  121. package/server/middleware/auth.js +118 -0
  122. package/server/projects.js +899 -0
  123. package/server/routes/admin.js +89 -0
  124. package/server/routes/auth.js +144 -0
  125. package/server/routes/commands.js +570 -0
  126. package/server/routes/mcp-utils.js +37 -0
  127. package/server/routes/mcp.js +593 -0
  128. package/server/routes/projects.js +216 -0
  129. package/server/routes/skills.js +891 -0
  130. package/server/routes/usage.js +206 -0
  131. package/server/services/pricing.js +196 -0
  132. package/server/services/usage-scanner.js +283 -0
  133. package/server/services/user-directories.js +123 -0
  134. package/server/utils/commandParser.js +303 -0
  135. package/server/utils/mcp-detector.js +73 -0
  136. package/shared/modelConstants.js +23 -0
@@ -0,0 +1,35 @@
1
+ import{j as mt}from"./vendor-codemirror-C_VWDoZS.js";import{g as yr}from"./vendor-react-BeVl62c0.js";import{k as dn}from"./vendor-katex-DK8hFnhL.js";function yn(e){const n=[],t=String(e||"");let r=t.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=t.length,o=!0);const l=t.slice(i,r).trim();(l||!o)&&n.push(l),i=r+1,r=t.indexOf(",",i)}return n}function $i(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const qi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ui={};function xn(e,n){return(Ui.jsx?Hi:qi).test(e)}const Vi=/[ \t\n\f\r]/g;function Wi(e){return typeof e=="object"?e.type==="text"?kn(e.value):!1:kn(e)}function kn(e){return e.replace(Vi,"")===""}class Xe{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Xe.prototype.normal={};Xe.prototype.property={};Xe.prototype.space=void 0;function xr(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Xe(t,r,n)}function We(e){return e.toLowerCase()}class ee{constructor(n,t){this.attribute=t,this.property=n}}ee.prototype.attribute="";ee.prototype.booleanish=!1;ee.prototype.boolean=!1;ee.prototype.commaOrSpaceSeparated=!1;ee.prototype.commaSeparated=!1;ee.prototype.defined=!1;ee.prototype.mustUseProperty=!1;ee.prototype.number=!1;ee.prototype.overloadedBoolean=!1;ee.prototype.property="";ee.prototype.spaceSeparated=!1;ee.prototype.space=void 0;let Yi=0;const N=Ee(),W=Ee(),vt=Ee(),E=Ee(),V=Ee(),Le=Ee(),ne=Ee();function Ee(){return 2**++Yi}const Mt=Object.freeze(Object.defineProperty({__proto__:null,boolean:N,booleanish:W,commaOrSpaceSeparated:ne,commaSeparated:Le,number:E,overloadedBoolean:vt,spaceSeparated:V},Symbol.toStringTag,{value:"Module"})),gt=Object.keys(Mt);class Vt extends ee{constructor(n,t,r,i){let o=-1;if(super(n,t),bn(this,"space",i),typeof r=="number")for(;++o<gt.length;){const l=gt[o];bn(this,gt[o],(r&Mt[l])===Mt[l])}}}Vt.prototype.defined=!0;function bn(e,n,t){t&&(e[n]=t)}function Me(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new Vt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[We(r)]=r,t[We(o.attribute)]=r}return new Xe(n,t,e.space)}const kr=Me({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:V,ariaCurrent:null,ariaDescribedBy:V,ariaDetails:null,ariaDisabled:W,ariaDropEffect:V,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:V,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:V,ariaLevel:E,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:V,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:V,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:W,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function br(e,n){return n in e?e[n]:n}function wr(e,n){return br(e,n.toLowerCase())}const Gi=Me({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Le,acceptCharset:V,accessKey:V,action:null,allow:null,allowFullScreen:N,allowPaymentRequest:N,allowUserMedia:N,alt:null,as:null,async:N,autoCapitalize:null,autoComplete:V,autoFocus:N,autoPlay:N,blocking:V,capture:null,charSet:null,checked:N,cite:null,className:V,cols:E,colSpan:null,content:null,contentEditable:W,controls:N,controlsList:V,coords:E|Le,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N,defer:N,dir:null,dirName:null,disabled:N,download:vt,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N,formTarget:null,headers:V,height:E,hidden:vt,high:E,href:null,hrefLang:null,htmlFor:V,httpEquiv:V,id:null,imageSizes:null,imageSrcSet:null,inert:N,inputMode:null,integrity:null,is:null,isMap:N,itemId:null,itemProp:V,itemRef:V,itemScope:N,itemType:V,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:N,muted:N,name:null,nonce:null,noModule:N,noValidate:N,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:N,optimum:E,pattern:null,ping:V,placeholder:null,playsInline:N,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N,referrerPolicy:null,rel:V,required:N,reversed:N,rows:E,rowSpan:E,sandbox:V,scope:null,scoped:N,seamless:N,selected:N,shadowRootClonable:N,shadowRootDelegatesFocus:N,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:N,useMap:null,value:W,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:V,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N,declare:N,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:N,noHref:N,noShade:N,noWrap:N,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:N,disableRemotePlayback:N,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:wr}),Xi=Me({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ne,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:V,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:N,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Le,g2:Le,glyphName:Le,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:ne,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:E,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:V,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ne,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ne,rev:ne,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ne,requiredFeatures:ne,requiredFonts:ne,requiredFormats:ne,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:ne,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ne,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ne,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:br}),Sr=Me({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Cr=Me({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wr}),Er=Me({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Qi={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Ki=/[A-Z]/g,wn=/-[a-z]/g,Ji=/^data[-\w.:]+$/i;function Ir(e,n){const t=We(n);let r=n,i=ee;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Ji.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(wn,el);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!wn.test(o)){let l=o.replace(Ki,Zi);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=Vt}return new i(r,n)}function Zi(e){return"-"+e.toLowerCase()}function el(e){return e.charAt(1).toUpperCase()}const Ar=xr([kr,Gi,Sr,Cr,Er],"html"),st=xr([kr,Xi,Sr,Cr,Er],"svg");function Sn(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function tl(e){return e.join(" ").trim()}var Pe={},dt,Cn;function nl(){if(Cn)return dt;Cn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
2
+ `,s="/",f="*",c="",p="comment",h="declaration";dt=function(y,C){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];C=C||{};var x=1,k=1;function I(D){var T=D.match(n);T&&(x+=T.length);var L=D.lastIndexOf(u);k=~L?D.length-L:k+D.length}function v(){var D={line:x,column:k};return function(T){return T.position=new M(D),q(),T}}function M(D){this.start=D,this.end={line:x,column:k},this.source=C.source}M.prototype.content=y;function S(D){var T=new Error(C.source+":"+x+":"+k+": "+D);if(T.reason=D,T.filename=C.source,T.line=x,T.column=k,T.source=y,!C.silent)throw T}function _(D){var T=D.exec(y);if(T){var L=T[0];return I(L),y=y.slice(L.length),T}}function q(){_(t)}function O(D){var T;for(D=D||[];T=b();)T!==!1&&D.push(T);return D}function b(){var D=v();if(!(s!=y.charAt(0)||f!=y.charAt(1))){for(var T=2;c!=y.charAt(T)&&(f!=y.charAt(T)||s!=y.charAt(T+1));)++T;if(T+=2,c===y.charAt(T-1))return S("End of comment missing");var L=y.slice(2,T-2);return k+=2,I(L),y=y.slice(T),k+=2,D({type:p,comment:L})}}function P(){var D=v(),T=_(r);if(T){if(b(),!_(i))return S("property missing ':'");var L=_(o),Y=D({type:h,property:d(T[0].replace(e,c)),value:L?d(L[0].replace(e,c)):c});return _(l),Y}}function z(){var D=[];O(D);for(var T;T=P();)T!==!1&&(D.push(T),O(D));return D}return q(),z()};function d(y){return y?y.replace(a,c):c}return dt}var En;function rl(){if(En)return Pe;En=1;var e=Pe&&Pe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.default=t;var n=e(nl());function t(r,i){var o=null;if(!r||typeof r!="string")return o;var l=(0,n.default)(r),a=typeof i=="function";return l.forEach(function(u){if(u.type==="declaration"){var s=u.property,f=u.value;a?i(s,f,u):f&&(o=o||{},o[s]=f)}}),o}return Pe}var Be={},In;function il(){if(In)return Be;In=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(s){return!s||t.test(s)||e.test(s)},l=function(s,f){return f.toUpperCase()},a=function(s,f){return"".concat(f,"-")},u=function(s,f){return f===void 0&&(f={}),o(s)?s:(s=s.toLowerCase(),f.reactCompat?s=s.replace(i,a):s=s.replace(r,a),s.replace(n,l))};return Be.camelCase=u,Be}var je,An;function ll(){if(An)return je;An=1;var e=je&&je.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(rl()),t=il();function r(i,o){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(a,u){a&&u&&(l[(0,t.camelCase)(a,o)]=u)}),l}return r.default=r,je=r,je}var ol=ll();const al=yr(ol),Tr=Fr("end"),Wt=Fr("start");function Fr(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ul(e){const n=Wt(e),t=Tr(e);if(n&&t)return{start:n,end:t}}function He(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Tn(e.position):"start"in e||"end"in e?Tn(e):"line"in e||"column"in e?Ot(e):""}function Ot(e){return Fn(e&&e.line)+":"+Fn(e&&e.column)}function Tn(e){return Ot(e&&e.start)+"-"+Ot(e&&e.end)}function Fn(e){return e&&typeof e=="number"?e:1}class K extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=He(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const Yt={}.hasOwnProperty,sl=new Map,cl=/[A-Z]/g,fl=new Set(["table","tbody","thead","tfoot","tr"]),hl=new Set(["td","th"]),Pr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pl(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=wl(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=bl(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?st:Ar,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=zr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function zr(e,n,t){if(n.type==="element")return ml(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return gl(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return yl(e,n,t);if(n.type==="mdxjsEsm")return dl(e,n);if(n.type==="root")return xl(e,n,t);if(n.type==="text")return kl(e,n)}function ml(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=st,e.schema=i),e.ancestors.push(n);const o=Lr(e,n.tagName,!1),l=Sl(e,n);let a=Xt(e,n);return fl.has(n.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Wi(u):!0})),Dr(e,l,o,n),Gt(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function gl(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ye(e,n.position)}function dl(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ye(e,n.position)}function yl(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=st,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:Lr(e,n.name,!0),l=Cl(e,n),a=Xt(e,n);return Dr(e,l,o,n),Gt(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function xl(e,n,t){const r={};return Gt(r,Xt(e,n)),e.create(n,e.Fragment,r,t)}function kl(e,n){return n.value}function Dr(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Gt(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function bl(e,n,t){return r;function r(i,o,l,a){const s=Array.isArray(l.children)?t:n;return a?s(o,l,a):s(o,l)}}function wl(e,n){return t;function t(r,i,o,l){const a=Array.isArray(o.children),u=Wt(r);return n(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Sl(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Yt.call(n.properties,i)){const o=El(e,i,n.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&hl.has(n.tagName)?r=a:t[l]=a}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Cl(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Ye(e,n.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else Ye(e,n.position);else o=r.value===null?!0:r.value;t[i]=o}return t}function Xt(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:sl;for(;++r<n.children.length;){const o=n.children[r];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const s=i.get(u)||0;l=u+"-"+s,i.set(u,s+1)}}const a=zr(e,o,l);a!==void 0&&t.push(a)}return t}function El(e,n,t){const r=Ir(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?$i(t):tl(t)),r.property==="style"){let i=typeof t=="object"?t:Il(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Al(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Qi[r.property]||r.property:r.attribute,t]}}function Il(e,n){try{return al(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new K("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Pr+"#cannot-parse-style-attribute",i}}function Lr(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let o=-1,l;for(;++o<i.length;){const a=xn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=xn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return Yt.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ye(e)}function Ye(e,n){const t=new K("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Pr+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Al(e){const n={};let t;for(t in e)Yt.call(e,t)&&(n[Tl(t)]=e[t]);return n}function Tl(e){let n=e.replace(cl,Fl);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Fl(e){return"-"+e.toLowerCase()}const yt={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Pl={};function Qt(e,n){const t=Pl,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return vr(e,r,i)}function vr(e,n,t){if(zl(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Pn(e.children,n,t)}return Array.isArray(e)?Pn(e,n,t):""}function Pn(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=vr(e[i],n,t);return r.join("")}function zl(e){return!!(e&&typeof e=="object")}const zn=document.createElement("i");function Kt(e){const n="&"+e+";";zn.innerHTML=n;const t=zn.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function re(e,n,t,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function ie(e,n){return e.length>0?(re(e,e.length,0,n),e):n}const Dn={}.hasOwnProperty;function Mr(e){const n={};let t=-1;for(;++t<e.length;)Dl(n,e[t]);return n}function Dl(e,n){let t;for(t in n){const i=(Dn.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let l;if(o)for(l in o){Dn.call(i,l)||(i[l]=[]);const a=o[l];Ll(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Ll(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);re(e,0,0,r)}function Or(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function se(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const J=ke(/[A-Za-z]/),Q=ke(/[\dA-Za-z]/),vl=ke(/[#-'*+\--9=?A-Z^-~]/);function lt(e){return e!==null&&(e<32||e===127)}const Rt=ke(/\d/),Ml=ke(/[\dA-Fa-f]/),Ol=ke(/[!-/:-@[-`{-~]/);function F(e){return e!==null&&e<-2}function U(e){return e!==null&&(e<0||e===32)}function j(e){return e===-2||e===-1||e===32}const ct=ke(new RegExp("\\p{P}|\\p{S}","u")),Ce=ke(/\s/);function ke(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Oe(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let l="";if(o===37&&Q(e.charCodeAt(t+1))&&Q(e.charCodeAt(t+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function B(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return j(u)?(e.enter(t),a(u)):n(u)}function a(u){return j(u)&&o++<i?(e.consume(u),a):(e.exit(t),n(u))}}const Rl={tokenize:_l};function _l(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),B(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return F(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Nl={tokenize:Bl},Ln={tokenize:jl};function Bl(e){const n=this,t=[];let r=0,i,o,l;return a;function a(I){if(r<t.length){const v=t[r];return n.containerState=v[1],e.attempt(v[0].continuation,u,s)(I)}return s(I)}function u(I){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&k();const v=n.events.length;let M=v,S;for(;M--;)if(n.events[M][0]==="exit"&&n.events[M][1].type==="chunkFlow"){S=n.events[M][1].end;break}x(r);let _=v;for(;_<n.events.length;)n.events[_][1].end={...S},_++;return re(n.events,M+1,0,n.events.slice(v)),n.events.length=_,s(I)}return a(I)}function s(I){if(r===t.length){if(!i)return p(I);if(i.currentConstruct&&i.currentConstruct.concrete)return d(I);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Ln,f,c)(I)}function f(I){return i&&k(),x(r),p(I)}function c(I){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,d(I)}function p(I){return n.containerState={},e.attempt(Ln,h,d)(I)}function h(I){return r++,t.push([n.currentConstruct,n.containerState]),p(I)}function d(I){if(I===null){i&&k(),x(0),e.consume(I);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),y(I)}function y(I){if(I===null){C(e.exit("chunkFlow"),!0),x(0),e.consume(I);return}return F(I)?(e.consume(I),C(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(I),y)}function C(I,v){const M=n.sliceStream(I);if(v&&M.push(null),I.previous=o,o&&(o.next=I),o=I,i.defineSkip(I.start),i.write(M),n.parser.lazy[I.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<l&&(!i.events[S][1].end||i.events[S][1].end.offset>l))return;const _=n.events.length;let q=_,O,b;for(;q--;)if(n.events[q][0]==="exit"&&n.events[q][1].type==="chunkFlow"){if(O){b=n.events[q][1].end;break}O=!0}for(x(r),S=_;S<n.events.length;)n.events[S][1].end={...b},S++;re(n.events,q+1,0,n.events.slice(_)),n.events.length=S}}function x(I){let v=t.length;for(;v-- >I;){const M=t[v];n.containerState=M[1],M[0].exit.call(n,e)}t.length=I}function k(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function jl(e,n,t){return B(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ve(e){if(e===null||U(e)||Ce(e))return 1;if(ct(e))return 2}function ft(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const _t={name:"attention",resolveAll:$l,tokenize:ql};function $l(e,n){let t=-1,r,i,o,l,a,u,s,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[t][1].start};vn(c,-u),vn(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=ie(s,[["enter",e[r][1],n],["exit",e[r][1],n]])),s=ie(s,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",o,n]]),s=ie(s,ft(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),s=ie(s,[["exit",o,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,s=ie(s,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,re(e,r-1,t-r+3,s),t=r+s.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function ql(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ve(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const s=e.exit("attentionSequence"),f=ve(u),c=!f||f===2&&i||t.includes(u),p=!i||i===2&&f||t.includes(r);return s._open=!!(o===42?c:c&&(i||!p)),s._close=!!(o===42?p:p&&(f||!c)),n(u)}}function vn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Hl={name:"autolink",tokenize:Ul};function Ul(e,n,t){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return J(h)?(e.consume(h),l):h===64?t(h):s(h)}function l(h){return h===43||h===45||h===46||Q(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||Q(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):h===null||h===32||h===60||lt(h)?t(h):(e.consume(h),u)}function s(h){return h===64?(e.consume(h),f):vl(h)?(e.consume(h),s):t(h)}function f(h){return Q(h)?c(h):t(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):p(h)}function p(h){if((h===45||Q(h))&&r++<63){const d=h===45?p:c;return e.consume(h),d}return t(h)}}const Qe={partial:!0,tokenize:Vl};function Vl(e,n,t){return r;function r(o){return j(o)?B(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||F(o)?n(o):t(o)}}const Rr={continuation:{tokenize:Yl},exit:Gl,name:"blockQuote",tokenize:Wl};function Wl(e,n,t){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return t(l)}function o(l){return j(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function Yl(e,n,t){const r=this;return i;function i(l){return j(l)?B(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Rr,n,t)(l)}}function Gl(e){e.exit("blockQuote")}const _r={name:"characterEscape",tokenize:Xl};function Xl(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Ol(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}const Nr={name:"characterReference",tokenize:Ql};function Ql(e,n,t){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,l=Q,f(c))}function s(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Ml,f):(e.enter("characterReferenceValue"),o=7,l=Rt,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===Q&&!Kt(r.sliceSerialize(p))?t(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(c)&&i++<o?(e.consume(c),f):t(c)}}const Mn={partial:!0,tokenize:Jl},On={concrete:!0,name:"codeFenced",tokenize:Kl};function Kl(e,n,t){const r=this,i={partial:!0,tokenize:M};let o=0,l=0,a;return u;function u(S){return s(S)}function s(S){const _=r.events[r.events.length-1];return o=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,a=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(S)}function f(S){return S===a?(l++,e.consume(S),f):l<3?t(S):(e.exit("codeFencedFenceSequence"),j(S)?B(e,c,"whitespace")(S):c(S))}function c(S){return S===null||F(S)?(e.exit("codeFencedFence"),r.interrupt?n(S):e.check(Mn,y,v)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||F(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(S)):j(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),B(e,h,"whitespace")(S)):S===96&&S===a?t(S):(e.consume(S),p)}function h(S){return S===null||F(S)?c(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(S))}function d(S){return S===null||F(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(S)):S===96&&S===a?t(S):(e.consume(S),d)}function y(S){return e.attempt(i,v,C)(S)}function C(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),x}function x(S){return o>0&&j(S)?B(e,k,"linePrefix",o+1)(S):k(S)}function k(S){return S===null||F(S)?e.check(Mn,y,v)(S):(e.enter("codeFlowValue"),I(S))}function I(S){return S===null||F(S)?(e.exit("codeFlowValue"),k(S)):(e.consume(S),I)}function v(S){return e.exit("codeFenced"),n(S)}function M(S,_,q){let O=0;return b;function b(L){return S.enter("lineEnding"),S.consume(L),S.exit("lineEnding"),P}function P(L){return S.enter("codeFencedFence"),j(L)?B(S,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):z(L)}function z(L){return L===a?(S.enter("codeFencedFenceSequence"),D(L)):q(L)}function D(L){return L===a?(O++,S.consume(L),D):O>=l?(S.exit("codeFencedFenceSequence"),j(L)?B(S,T,"whitespace")(L):T(L)):q(L)}function T(L){return L===null||F(L)?(S.exit("codeFencedFence"),_(L)):q(L)}}}function Jl(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const xt={name:"codeIndented",tokenize:eo},Zl={partial:!0,tokenize:to};function eo(e,n,t){const r=this;return i;function i(s){return e.enter("codeIndented"),B(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(s):t(s)}function l(s){return s===null?u(s):F(s)?e.attempt(Zl,l,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||F(s)?(e.exit("codeFlowValue"),l(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),n(s)}}function to(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):F(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):B(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):F(l)?i(l):t(l)}}const no={name:"codeText",previous:io,resolve:ro,tokenize:lo};function ro(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function io(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function lo(e,n,t){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?t(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):F(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),s(c))}function s(c){return c===null||c===32||c===96||F(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),s)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(c)):(o.type="codeTextData",s(c))}}class oo{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&$e(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),$e(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),$e(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);$e(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);$e(this.left,t.reverse())}}}function $e(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Br(e){const n={};let t=-1,r,i,o,l,a,u,s;const f=new oo(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(u=r[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(r[0]==="enter")r[1].contentType&&(Object.assign(n,ao(f,t)),t=n[t],s=!0);else if(r[1]._container){for(o=t,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,t),a.unshift(r),f.splice(i,t-i+1,a))}}return re(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!s}function ao(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],s={};let f,c,p=-1,h=t,d=0,y=0;const C=[y];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=t;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(y=p+1,C.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):C.pop(),p=C.length;p--;){const x=a.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;)s[d+u[p][0]]=d+u[p][1],d+=u[p][1]-u[p][0]-1;return s}const uo={resolve:co,tokenize:fo},so={partial:!0,tokenize:ho};function co(e){return Br(e),e}function fo(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):F(a)?e.check(so,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function ho(e,n,t){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),B(e,o,"linePrefix")}function o(l){if(l===null||F(l))return t(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function jr(e,n,t,r,i,o,l,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||lt(x)?t(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(a),p(x)):x===null||x===60||F(x)?t(x):(e.consume(x),x===92?d:h)}function d(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function y(x){return!f&&(x===null||x===41||U(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(x)):f<s&&x===40?(e.consume(x),f++,y):x===41?(e.consume(x),f--,y):x===null||x===32||x===40||lt(x)?t(x):(e.consume(x),x===92?C:y)}function C(x){return x===40||x===41||x===92?(e.consume(x),y):y(x)}}function $r(e,n,t,r,i,o){const l=this;let a=0,u;return s;function s(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):F(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||F(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!j(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function qr(e,n,t,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):t(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),u(l)):p===null?t(p):F(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),B(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||F(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function Ue(e,n){let t;return r;function r(i){return F(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):j(i)?B(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const po={name:"definition",tokenize:go},mo={partial:!0,tokenize:yo};function go(e,n,t){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return $r.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):t(h)}function u(h){return U(h)?Ue(e,s)(h):s(h)}function s(h){return jr(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(mo,c,c)(h)}function c(h){return j(h)?B(e,p,"whitespace")(h):p(h)}function p(h){return h===null||F(h)?(e.exit("definition"),r.parser.defined.push(i),n(h)):t(h)}}function yo(e,n,t){return r;function r(a){return U(a)?Ue(e,i)(a):t(a)}function i(a){return qr(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return j(a)?B(e,l,"whitespace")(a):l(a)}function l(a){return a===null||F(a)?n(a):t(a)}}const xo={name:"hardBreakEscape",tokenize:ko};function ko(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return F(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const bo={name:"headingAtx",resolve:wo,tokenize:So};function wo(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},re(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function So(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||U(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||F(f)?(e.exit("atxHeading"),n(f)):j(f)?B(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||U(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const Co=["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"],Rn=["pre","script","style","textarea"],Eo={concrete:!0,name:"htmlFlow",resolveTo:To,tokenize:Fo},Io={partial:!0,tokenize:zo},Ao={partial:!0,tokenize:Po};function To(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Fo(e,n,t){const r=this;let i,o,l,a,u;return s;function s(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,y):g===63?(e.consume(g),i=3,r.interrupt?n:m):J(g)?(e.consume(g),l=String.fromCharCode(g),C):t(g)}function p(g){return g===45?(e.consume(g),i=2,h):g===91?(e.consume(g),i=5,a=0,d):J(g)?(e.consume(g),i=4,r.interrupt?n:m):t(g)}function h(g){return g===45?(e.consume(g),r.interrupt?n:m):t(g)}function d(g){const ae="CDATA[";return g===ae.charCodeAt(a++)?(e.consume(g),a===ae.length?r.interrupt?n:z:d):t(g)}function y(g){return J(g)?(e.consume(g),l=String.fromCharCode(g),C):t(g)}function C(g){if(g===null||g===47||g===62||U(g)){const ae=g===47,be=l.toLowerCase();return!ae&&!o&&Rn.includes(be)?(i=1,r.interrupt?n(g):z(g)):Co.includes(l.toLowerCase())?(i=6,ae?(e.consume(g),x):r.interrupt?n(g):z(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(g):o?k(g):I(g))}return g===45||Q(g)?(e.consume(g),l+=String.fromCharCode(g),C):t(g)}function x(g){return g===62?(e.consume(g),r.interrupt?n:z):t(g)}function k(g){return j(g)?(e.consume(g),k):b(g)}function I(g){return g===47?(e.consume(g),b):g===58||g===95||J(g)?(e.consume(g),v):j(g)?(e.consume(g),I):b(g)}function v(g){return g===45||g===46||g===58||g===95||Q(g)?(e.consume(g),v):M(g)}function M(g){return g===61?(e.consume(g),S):j(g)?(e.consume(g),M):I(g)}function S(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),u=g,_):j(g)?(e.consume(g),S):q(g)}function _(g){return g===u?(e.consume(g),u=null,O):g===null||F(g)?t(g):(e.consume(g),_)}function q(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||U(g)?M(g):(e.consume(g),q)}function O(g){return g===47||g===62||j(g)?I(g):t(g)}function b(g){return g===62?(e.consume(g),P):t(g)}function P(g){return g===null||F(g)?z(g):j(g)?(e.consume(g),P):t(g)}function z(g){return g===45&&i===2?(e.consume(g),Y):g===60&&i===1?(e.consume(g),G):g===62&&i===4?(e.consume(g),oe):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),he):F(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Io,pe,D)(g)):g===null||F(g)?(e.exit("htmlFlowData"),D(g)):(e.consume(g),z)}function D(g){return e.check(Ao,T,pe)(g)}function T(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),L}function L(g){return g===null||F(g)?D(g):(e.enter("htmlFlowData"),z(g))}function Y(g){return g===45?(e.consume(g),m):z(g)}function G(g){return g===47?(e.consume(g),l="",le):z(g)}function le(g){if(g===62){const ae=l.toLowerCase();return Rn.includes(ae)?(e.consume(g),oe):z(g)}return J(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),le):z(g)}function he(g){return g===93?(e.consume(g),m):z(g)}function m(g){return g===62?(e.consume(g),oe):g===45&&i===2?(e.consume(g),m):z(g)}function oe(g){return g===null||F(g)?(e.exit("htmlFlowData"),pe(g)):(e.consume(g),oe)}function pe(g){return e.exit("htmlFlow"),n(g)}}function Po(e,n,t){const r=this;return i;function i(l){return F(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):t(l)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function zo(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qe,n,t)}}const Do={name:"htmlText",tokenize:Lo};function Lo(e,n,t){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),s):m===47?(e.consume(m),M):m===63?(e.consume(m),I):J(m)?(e.consume(m),q):t(m)}function s(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,d):J(m)?(e.consume(m),k):t(m)}function f(m){return m===45?(e.consume(m),h):t(m)}function c(m){return m===null?t(m):m===45?(e.consume(m),p):F(m)?(l=c,G(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?Y(m):m===45?p(m):c(m)}function d(m){const oe="CDATA[";return m===oe.charCodeAt(o++)?(e.consume(m),o===oe.length?y:d):t(m)}function y(m){return m===null?t(m):m===93?(e.consume(m),C):F(m)?(l=y,G(m)):(e.consume(m),y)}function C(m){return m===93?(e.consume(m),x):y(m)}function x(m){return m===62?Y(m):m===93?(e.consume(m),x):y(m)}function k(m){return m===null||m===62?Y(m):F(m)?(l=k,G(m)):(e.consume(m),k)}function I(m){return m===null?t(m):m===63?(e.consume(m),v):F(m)?(l=I,G(m)):(e.consume(m),I)}function v(m){return m===62?Y(m):I(m)}function M(m){return J(m)?(e.consume(m),S):t(m)}function S(m){return m===45||Q(m)?(e.consume(m),S):_(m)}function _(m){return F(m)?(l=_,G(m)):j(m)?(e.consume(m),_):Y(m)}function q(m){return m===45||Q(m)?(e.consume(m),q):m===47||m===62||U(m)?O(m):t(m)}function O(m){return m===47?(e.consume(m),Y):m===58||m===95||J(m)?(e.consume(m),b):F(m)?(l=O,G(m)):j(m)?(e.consume(m),O):Y(m)}function b(m){return m===45||m===46||m===58||m===95||Q(m)?(e.consume(m),b):P(m)}function P(m){return m===61?(e.consume(m),z):F(m)?(l=P,G(m)):j(m)?(e.consume(m),P):O(m)}function z(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),i=m,D):F(m)?(l=z,G(m)):j(m)?(e.consume(m),z):(e.consume(m),T)}function D(m){return m===i?(e.consume(m),i=void 0,L):m===null?t(m):F(m)?(l=D,G(m)):(e.consume(m),D)}function T(m){return m===null||m===34||m===39||m===60||m===61||m===96?t(m):m===47||m===62||U(m)?O(m):(e.consume(m),T)}function L(m){return m===47||m===62||U(m)?O(m):t(m)}function Y(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),n):t(m)}function G(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),le}function le(m){return j(m)?B(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):he(m)}function he(m){return e.enter("htmlTextData"),l(m)}}const Jt={name:"labelEnd",resolveAll:Ro,resolveTo:_o,tokenize:No},vo={tokenize:Bo},Mo={tokenize:jo},Oo={tokenize:$o};function Ro(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&re(e,0,e.length,t),e}function _o(e,n){let t=e.length,r=0,i,o,l,a;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,n],["enter",s,n]],a=ie(a,e.slice(o+1,o+r+3)),a=ie(a,[["enter",f,n]]),a=ie(a,ft(n.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),n)),a=ie(a,[["exit",f,n],e[l-2],e[l-1],["exit",s,n]]),a=ie(a,e.slice(l+1)),a=ie(a,[["exit",u,n]]),re(e,o,e.length,a),e}function No(e,n,t){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(se(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):t(p)}function u(p){return p===40?e.attempt(vo,f,l?f:c)(p):p===91?e.attempt(Mo,f,l?s:c)(p):l?f(p):c(p)}function s(p){return e.attempt(Oo,f,c)(p)}function f(p){return n(p)}function c(p){return o._balanced=!0,t(p)}}function Bo(e,n,t){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return U(c)?Ue(e,o)(c):o(c)}function o(c){return c===41?f(c):jr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return U(c)?Ue(e,u)(c):f(c)}function a(c){return t(c)}function u(c){return c===34||c===39||c===40?qr(e,s,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function s(c){return U(c)?Ue(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),n):t(c)}}function jo(e,n,t){const r=this;return i;function i(a){return $r.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function $o(e,n,t){return r;function r(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"),n):t(o)}}const qo={name:"labelStartImage",resolveAll:Jt.resolveAll,tokenize:Ho};function Ho(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const Uo={name:"labelStartLink",resolveAll:Jt.resolveAll,tokenize:Vo};function Vo(e,n,t){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const kt={name:"lineEnding",tokenize:Wo};function Wo(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),B(e,n,"linePrefix")}}const it={name:"thematicBreak",tokenize:Yo};function Yo(e,n,t){let r=0,i;return o;function o(s){return e.enter("thematicBreak"),l(s)}function l(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),u(s)):r>=3&&(s===null||F(s))?(e.exit("thematicBreak"),n(s)):t(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),j(s)?B(e,a,"whitespace")(s):a(s))}}const Z={continuation:{tokenize:Ko},exit:Zo,name:"list",tokenize:Qo},Go={partial:!0,tokenize:ea},Xo={partial:!0,tokenize:Jo};function Qo(e,n,t){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const d=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Rt(h)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(it,t,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return t(h)}function u(h){return Rt(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):t(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Qe,r.interrupt?t:f,e.attempt(Go,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return j(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):t(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(h)}}function Ko(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Qe,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!j(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Xo,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(e,e.attempt(Z,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Jo(e,n,t){const r=this;return B(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(o):t(o)}}function Zo(e){e.exit(this.containerState.type)}function ea(e,n,t){const r=this;return B(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!j(o)&&l&&l[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const _n={name:"setextUnderline",resolveTo:ta,tokenize:na};function ta(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function na(e,n,t){const r=this;let i;return o;function o(s){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=s,l(s)):t(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),j(s)?B(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||F(s)?(e.exit("setextHeadingLine"),n(s)):t(s)}}const ra={tokenize:ia};function ia(e){const n=this,t=e.attempt(Qe,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(uo,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const la={resolveAll:Ur()},oa=Hr("string"),aa=Hr("text");function Hr(e){return{resolveAll:Ur(e==="text"?ua:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),u}function u(f){return s(f)?(t.exit("data"),o(f)):(t.consume(f),u)}function s(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Ur(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function ua(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const s=i[o];if(typeof s=="string"){for(l=s.length;s.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(s===-2)u=!0,a++;else if(s!==-1){o++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const s={type:t===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(t,0,["enter",s,n],["exit",s,n]),t+=2)}t++}return e}const sa={42:Z,43:Z,45:Z,48:Z,49:Z,50:Z,51:Z,52:Z,53:Z,54:Z,55:Z,56:Z,57:Z,62:Rr},ca={91:po},fa={[-2]:xt,[-1]:xt,32:xt},ha={35:bo,42:it,45:[_n,it],60:Eo,61:_n,95:it,96:On,126:On},pa={38:Nr,92:_r},ma={[-5]:kt,[-4]:kt,[-3]:kt,33:qo,38:Nr,42:_t,60:[Hl,Do],91:Uo,92:[xo,_r],93:Jt,95:_t,96:no},ga={null:[_t,la]},da={null:[42,95]},ya={null:[]},xa=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:da,contentInitial:ca,disable:ya,document:sa,flow:ha,flowInitial:fa,insideSpan:ga,string:pa,text:ma},Symbol.toStringTag,{value:"Module"}));function ka(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:_(M),check:_(S),consume:k,enter:I,exit:v,interrupt:_(S,{interrupt:!0})},s={code:null,containerState:{},defineSkip:y,events:[],now:d,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=n.tokenize.call(s,u);return n.resolveAll&&o.push(n),s;function c(P){return l=ie(l,P),C(),l[l.length-1]!==null?[]:(q(n,0),s.events=ft(o,s.events,s),s.events)}function p(P,z){return wa(h(P),z)}function h(P){return ba(l,P)}function d(){const{_bufferIndex:P,_index:z,line:D,column:T,offset:L}=r;return{_bufferIndex:P,_index:z,line:D,column:T,offset:L}}function y(P){i[P.line]=P.column,b()}function C(){let P;for(;r._index<l.length;){const z=l[r._index];if(typeof z=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<z.length;)x(z.charCodeAt(r._bufferIndex));else x(z)}}function x(P){f=f(P)}function k(P){F(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,b()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=P}function I(P,z){const D=z||{};return D.type=P,D.start=d(),s.events.push(["enter",D,s]),a.push(D),D}function v(P){const z=a.pop();return z.end=d(),s.events.push(["exit",z,s]),z}function M(P,z){q(P,z.from)}function S(P,z){z.restore()}function _(P,z){return D;function D(T,L,Y){let G,le,he,m;return Array.isArray(T)?pe(T):"tokenize"in T?pe([T]):oe(T);function oe(X){return Re;function Re(ye){const Ae=ye!==null&&X[ye],Te=ye!==null&&X.null,Ze=[...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(Te)?Te:Te?[Te]:[]];return pe(Ze)(ye)}}function pe(X){return G=X,le=0,X.length===0?Y:g(X[le])}function g(X){return Re;function Re(ye){return m=O(),he=X,X.partial||(s.currentConstruct=X),X.name&&s.parser.constructs.disable.null.includes(X.name)?be():X.tokenize.call(z?Object.assign(Object.create(s),z):s,u,ae,be)(ye)}}function ae(X){return P(he,m),L}function be(X){return m.restore(),++le<G.length?g(G[le]):Y}}}function q(P,z){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&re(s.events,z,s.events.length-z,P.resolve(s.events.slice(z),s)),P.resolveTo&&(s.events=P.resolveTo(s.events,s))}function O(){const P=d(),z=s.previous,D=s.currentConstruct,T=s.events.length,L=Array.from(a);return{from:T,restore:Y};function Y(){r=P,s.previous=z,s.currentConstruct=D,s.events.length=T,a=L,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ba(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,o)];else{if(l=e.slice(t,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function wa(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
3
+ `;break}case-3:{l=`\r
4
+ `;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Sa(e){const r={constructs:Mr([xa,...(e||{}).extensions||[]]),content:i(Rl),defined:[],document:i(Nl),flow:i(ra),lazy:{},string:i(oa),text:i(aa)};return r;function i(o){return l;function l(a){return ka(r,o,a)}}}function Ca(e){for(;!Br(e););return e}const Nn=/[\0\t\n\r]/g;function Ea(){let e=1,n="",t=!0,r;return i;function i(o,l,a){const u=[];let s,f,c,p,h;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,n="",t&&(o.charCodeAt(0)===65279&&c++,t=void 0);c<o.length;){if(Nn.lastIndex=c,s=Nn.exec(o),p=s&&s.index!==void 0?s.index:o.length,h=o.charCodeAt(p),!s){n=o.slice(c);break}if(h===10&&c===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<p&&(u.push(o.slice(c,p)),e+=p-c),h){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}const Ia=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Aa(e){return e.replace(Ia,Ta)}function Ta(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return Or(t.slice(o?2:1),o?16:10)}return Kt(t)||e}const Vr={}.hasOwnProperty;function Fa(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Pa(t)(Ca(Sa(t).document().write(Ea()(e,n,!0))))}function Pa(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(mn),autolinkProtocol:O,autolinkEmail:O,atxHeading:o(fn),blockQuote:o(Te),characterEscape:O,characterReference:O,codeFenced:o(Ze),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Ze,l),codeText:o(Li,l),codeTextData:O,data:O,codeFlowValue:O,definition:o(vi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Mi),hardBreakEscape:o(hn),hardBreakTrailing:o(hn),htmlFlow:o(pn,l),htmlFlowData:O,htmlText:o(pn,l),htmlTextData:O,image:o(Oi),label:l,link:o(mn),listItem:o(Ri),listItemValue:p,listOrdered:o(gn,c),listUnordered:o(gn),paragraph:o(_i),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(fn),strong:o(Ni),thematicBreak:o(ji)},exit:{atxHeading:u(),atxHeadingSequence:M,autolink:u(),autolinkEmail:Ae,autolinkProtocol:ye,blockQuote:u(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:X,characterReference:Re,codeFenced:u(C),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:d,codeFlowValue:b,codeIndented:u(x),codeText:u(L),codeTextData:b,data:b,definition:u(),definitionDestinationString:v,definitionLabelString:k,definitionTitleString:I,emphasis:u(),hardBreakEscape:u(z),hardBreakTrailing:u(z),htmlFlow:u(D),htmlFlowData:b,htmlText:u(T),htmlTextData:b,image:u(G),label:he,labelText:le,lineEnding:P,link:u(Y),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ae,resourceDestinationString:m,resourceTitleString:oe,resource:pe,setextHeading:u(q),setextHeadingLineSequence:_,setextHeadingText:S,strong:u(),thematicBreak:u()}};Wr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(w){let A={type:"root",children:[]};const R={stack:[A],tokenStack:[],config:n,enter:a,exit:s,buffer:l,resume:f,data:t},$=[];let H=-1;for(;++H<w.length;)if(w[H][1].type==="listOrdered"||w[H][1].type==="listUnordered")if(w[H][0]==="enter")$.push(H);else{const ue=$.pop();H=i(w,ue,H)}for(H=-1;++H<w.length;){const ue=n[w[H][0]];Vr.call(ue,w[H][1].type)&&ue[w[H][1].type].call(Object.assign({sliceSerialize:w[H][2].sliceSerialize},R),w[H][1])}if(R.tokenStack.length>0){const ue=R.tokenStack[R.tokenStack.length-1];(ue[1]||Bn).call(R,void 0,ue[0])}for(A.position={start:xe(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:xe(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},H=-1;++H<n.transforms.length;)A=n.transforms[H](A)||A;return A}function i(w,A,R){let $=A-1,H=-1,ue=!1,we,me,_e,Ne;for(;++$<=R;){const te=w[$];switch(te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{te[0]==="enter"?H++:H--,Ne=void 0;break}case"lineEndingBlank":{te[0]==="enter"&&(we&&!Ne&&!H&&!_e&&(_e=$),Ne=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ne=void 0}if(!H&&te[0]==="enter"&&te[1].type==="listItemPrefix"||H===-1&&te[0]==="exit"&&(te[1].type==="listUnordered"||te[1].type==="listOrdered")){if(we){let Fe=$;for(me=void 0;Fe--;){const ge=w[Fe];if(ge[1].type==="lineEnding"||ge[1].type==="lineEndingBlank"){if(ge[0]==="exit")continue;me&&(w[me][1].type="lineEndingBlank",ue=!0),ge[1].type="lineEnding",me=Fe}else if(!(ge[1].type==="linePrefix"||ge[1].type==="blockQuotePrefix"||ge[1].type==="blockQuotePrefixWhitespace"||ge[1].type==="blockQuoteMarker"||ge[1].type==="listItemIndent"))break}_e&&(!me||_e<me)&&(we._spread=!0),we.end=Object.assign({},me?w[me][1].start:te[1].end),w.splice(me||$,0,["exit",we,te[2]]),$++,R++}if(te[1].type==="listItemPrefix"){const Fe={type:"listItem",_spread:!1,start:Object.assign({},te[1].start),end:void 0};we=Fe,w.splice($,0,["enter",Fe,te[2]]),$++,R++,_e=void 0,Ne=!0}}}return w[A][1]._spread=ue,R}function o(w,A){return R;function R($){a.call(this,w($),$),A&&A.call(this,$)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,A,R){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([A,R||void 0]),w.position={start:xe(A.start),end:void 0}}function u(w){return A;function A(R){w&&w.call(this,R),s.call(this,R)}}function s(w,A){const R=this.stack.pop(),$=this.tokenStack.pop();if($)$[0].type!==w.type&&(A?A.call(this,w,$[0]):($[1]||Bn).call(this,w,$[0]));else throw new Error("Cannot close `"+w.type+"` ("+He({start:w.start,end:w.end})+"): it’s not open");R.position.end=xe(w.end)}function f(){return Qt(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(w){if(this.data.expectingFirstListItemValue){const A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function h(){const w=this.resume(),A=this.stack[this.stack.length-1];A.lang=w}function d(){const w=this.resume(),A=this.stack[this.stack.length-1];A.meta=w}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w.replace(/(\r?\n|\r)$/g,"")}function k(w){const A=this.resume(),R=this.stack[this.stack.length-1];R.label=A,R.identifier=se(this.sliceSerialize(w)).toLowerCase()}function I(){const w=this.resume(),A=this.stack[this.stack.length-1];A.title=w}function v(){const w=this.resume(),A=this.stack[this.stack.length-1];A.url=w}function M(w){const A=this.stack[this.stack.length-1];if(!A.depth){const R=this.sliceSerialize(w).length;A.depth=R}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function _(w){const A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function O(w){const R=this.stack[this.stack.length-1].children;let $=R[R.length-1];(!$||$.type!=="text")&&($=Bi(),$.position={start:xe(w.start),end:void 0},R.push($)),this.stack.push($)}function b(w){const A=this.stack.pop();A.value+=this.sliceSerialize(w),A.position.end=xe(w.end)}function P(w){const A=this.stack[this.stack.length-1];if(this.data.atHardBreak){const R=A.children[A.children.length-1];R.position.end=xe(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(A.type)&&(O.call(this,w),b.call(this,w))}function z(){this.data.atHardBreak=!0}function D(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function T(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function L(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function Y(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=A,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function G(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=A,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function le(w){const A=this.sliceSerialize(w),R=this.stack[this.stack.length-2];R.label=Aa(A),R.identifier=se(A).toLowerCase()}function he(){const w=this.stack[this.stack.length-1],A=this.resume(),R=this.stack[this.stack.length-1];if(this.data.inReference=!0,R.type==="link"){const $=w.children;R.children=$}else R.alt=A}function m(){const w=this.resume(),A=this.stack[this.stack.length-1];A.url=w}function oe(){const w=this.resume(),A=this.stack[this.stack.length-1];A.title=w}function pe(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function ae(w){const A=this.resume(),R=this.stack[this.stack.length-1];R.label=A,R.identifier=se(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function be(w){this.data.characterReferenceType=w.type}function X(w){const A=this.sliceSerialize(w),R=this.data.characterReferenceType;let $;R?($=Or(A,R==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$=Kt(A);const H=this.stack[this.stack.length-1];H.value+=$}function Re(w){const A=this.stack.pop();A.position.end=xe(w.end)}function ye(w){b.call(this,w);const A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(w)}function Ae(w){b.call(this,w);const A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(w)}function Te(){return{type:"blockquote",children:[]}}function Ze(){return{type:"code",lang:null,meta:null,value:""}}function Li(){return{type:"inlineCode",value:""}}function vi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Mi(){return{type:"emphasis",children:[]}}function fn(){return{type:"heading",depth:0,children:[]}}function hn(){return{type:"break"}}function pn(){return{type:"html",value:""}}function Oi(){return{type:"image",title:null,url:"",alt:null}}function mn(){return{type:"link",title:null,url:"",children:[]}}function gn(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function Ri(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function _i(){return{type:"paragraph",children:[]}}function Ni(){return{type:"strong",children:[]}}function Bi(){return{type:"text",value:""}}function ji(){return{type:"thematicBreak"}}}function xe(e){return{line:e.line,column:e.column,offset:e.offset}}function Wr(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?Wr(e,r):za(e,r)}}function za(e,n){let t;for(t in n)if(Vr.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Bn(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+He({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+He({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+He({start:n.start,end:n.end})+") is still open")}function Da(e){const n=this;n.parser=t;function t(r){return Fa(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function La(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function va(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
5
+ `}]}function Ma(e,n){const t=n.value?n.value+`
6
+ `:"",r={};n.lang&&(r.className=["language-"+n.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function Oa(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ra(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function _a(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Oe(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,s),e.applyData(n,s)}function Na(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ba(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Yr(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function ja(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Yr(e,n);const i={src:Oe(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,o),e.applyData(n,o)}function $a(e,n){const t={src:Oe(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function qa(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Ha(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Yr(e,n);const i={href:Oe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function Ua(e,n){const t={href:Oe(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Va(e,n,t){const r=e.all(n),i=t?Wa(t):Gr(n),o={},l=[];if(typeof n.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
7
+ `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
8
+ `});const s={type:"element",tagName:"li",properties:o,children:l};return e.patch(n,s),e.applyData(n,s)}function Wa(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=Gr(t[r])}return n}function Gr(e){const n=e.spread;return n??e.children.length>1}function Ya(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function Ga(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Xa(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Qa(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ka(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=Wt(n.children[1]),u=Tr(n.children[n.children.length-1]);a&&u&&(l.position={start:a,end:u}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,o),e.applyData(n,o)}function Ja(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,a=l?l.length:n.children.length;let u=-1;const s=[];for(;++u<a;){const c=n.children[u],p={},h=l?l[u]:void 0;h&&(p.align=h);let d={type:"element",tagName:o,properties:p,children:[]};c&&(d.children=e.all(c),e.patch(c,d),d=e.applyData(c,d)),s.push(d)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(n,f),e.applyData(n,f)}function Za(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const jn=9,$n=32;function eu(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const o=[];for(;r;)o.push(qn(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return o.push(qn(n.slice(i),i>0,!1)),o.join("")}function qn(e,n,t){let r=0,i=e.length;if(n){let o=e.codePointAt(r);for(;o===jn||o===$n;)r++,o=e.codePointAt(r)}if(t){let o=e.codePointAt(i-1);for(;o===jn||o===$n;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function tu(e,n){const t={type:"text",value:eu(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function nu(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const ru={blockquote:La,break:va,code:Ma,delete:Oa,emphasis:Ra,footnoteReference:_a,heading:Na,html:Ba,imageReference:ja,image:$a,inlineCode:qa,linkReference:Ha,link:Ua,listItem:Va,list:Ya,paragraph:Ga,root:Xa,strong:Qa,table:Ka,tableCell:Za,tableRow:Ja,text:tu,thematicBreak:nu,toml:et,yaml:et,definition:et,footnoteDefinition:et};function et(){}const Xr=-1,ht=0,Ve=1,ot=2,Zt=3,en=4,tn=5,nn=6,Qr=7,Kr=8,Hn=typeof self=="object"?self:globalThis,iu=(e,n)=>{const t=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=n[i];switch(o){case ht:case Xr:return t(l,i);case Ve:{const a=t([],i);for(const u of l)a.push(r(u));return a}case ot:{const a=t({},i);for(const[u,s]of l)a[r(u)]=r(s);return a}case Zt:return t(new Date(l),i);case en:{const{source:a,flags:u}=l;return t(new RegExp(a,u),i)}case tn:{const a=t(new Map,i);for(const[u,s]of l)a.set(r(u),r(s));return a}case nn:{const a=t(new Set,i);for(const u of l)a.add(r(u));return a}case Qr:{const{name:a,message:u}=l;return t(new Hn[a](u),i)}case Kr:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return t(new DataView(a),l)}}return t(new Hn[o](l),i)};return r},Un=e=>iu(new Map,e)(0),ze="",{toString:lu}={},{keys:ou}=Object,qe=e=>{const n=typeof e;if(n!=="object"||!e)return[ht,n];const t=lu.call(e).slice(8,-1);switch(t){case"Array":return[Ve,ze];case"Object":return[ot,ze];case"Date":return[Zt,ze];case"RegExp":return[en,ze];case"Map":return[tn,ze];case"Set":return[nn,ze];case"DataView":return[Ve,t]}return t.includes("Array")?[Ve,t]:t.includes("Error")?[Qr,t]:[ot,t]},tt=([e,n])=>e===ht&&(n==="function"||n==="symbol"),au=(e,n,t,r)=>{const i=(l,a)=>{const u=r.push(l)-1;return t.set(a,u),u},o=l=>{if(t.has(l))return t.get(l);let[a,u]=qe(l);switch(a){case ht:{let f=l;switch(u){case"bigint":a=Kr,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([Xr],l)}return i([a,f],l)}case Ve:{if(u){let p=l;return u==="DataView"?p=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(l)),i([u,[...p]],l)}const f=[],c=i([a,f],l);for(const p of l)f.push(o(p));return c}case ot:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(n&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const p of ou(l))(e||!tt(qe(l[p])))&&f.push([o(p),o(l[p])]);return c}case Zt:return i([a,l.toISOString()],l);case en:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case tn:{const f=[],c=i([a,f],l);for(const[p,h]of l)(e||!(tt(qe(p))||tt(qe(h))))&&f.push([o(p),o(h)]);return c}case nn:{const f=[],c=i([a,f],l);for(const p of l)(e||!tt(qe(p)))&&f.push(o(p));return c}}const{message:s}=l;return i([a,{name:u,message:s}],l)};return o},Vn=(e,{json:n,lossy:t}={})=>{const r=[];return au(!(n||t),!!n,new Map,r)(e),r},at=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Un(Vn(e,n)):structuredClone(e):(e,n)=>Un(Vn(e,n));function uu(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function su(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function cu(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||uu,r=e.options.footnoteBackLabel||su,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const s=e.footnoteById.get(e.footnoteOrder[u]);if(!s)continue;const f=e.all(s),c=String(s.identifier).toUpperCase(),p=Oe(c.toLowerCase());let h=0;const d=[],y=e.footnoteCounts.get(c);for(;y!==void 0&&++h<=y;){d.length>0&&d.push({type:"text",value:" "});let k=typeof t=="string"?t:t(u,h);typeof k=="string"&&(k={type:"text",value:k}),d.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const k=C.children[C.children.length-1];k&&k.type==="text"?k.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...d)}else f.push(...d);const x={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(f,!0)};e.patch(s,x),a.push(x)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...at(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
10
+ `}]}}const Ke=function(e){if(e==null)return mu;if(typeof e=="function")return pt(e);if(typeof e=="object")return Array.isArray(e)?fu(e):hu(e);if(typeof e=="string")return pu(e);throw new Error("Expected function, string, or object as test")};function fu(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Ke(e[t]);return pt(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function hu(e){const n=e;return pt(t);function t(r){const i=r;let o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function pu(e){return pt(n);function n(t){return t&&t.type===e}}function pt(e){return n;function n(t,r,i){return!!(gu(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function mu(){return!0}function gu(e){return e!==null&&typeof e=="object"&&"type"in e}const Jr=[],du=!0,Nt=!1,Zr="skip";function rn(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const o=Ke(i),l=r?-1:1;a(e,void 0,[])();function a(u,s,f){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Jr,d,y,C;if((!n||o(u,s,f[f.length-1]||void 0))&&(h=yu(t(u,f)),h[0]===Nt))return h;if("children"in u&&u.children){const x=u;if(x.children&&h[0]!==Zr)for(y=(r?x.children.length:-1)+l,C=f.concat(x);y>-1&&y<x.children.length;){const k=x.children[y];if(d=a(k,y,C)(),d[0]===Nt)return d;y=typeof d[1]=="number"?d[1]:y+l}}return h}}}function yu(e){return Array.isArray(e)?e:typeof e=="number"?[du,e]:e==null?Jr:[e]}function ln(e,n,t,r){let i,o,l;typeof n=="function"&&typeof t!="function"?(o=void 0,l=n,i=t):(o=n,l=t,i=r),rn(e,o,a,i);function a(u,s){const f=s[s.length-1],c=f?f.children.indexOf(u):void 0;return l(u,c,f)}}const Bt={}.hasOwnProperty,xu={};function ku(e,n){const t=n||xu,r=new Map,i=new Map,o=new Map,l={...ru,...t.handlers},a={all:s,applyData:wu,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:u,options:t,patch:bu,wrap:Cu};return ln(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),a;function u(f,c){const p=f.type,h=a.handlers[p];if(Bt.call(a.handlers,p)&&h)return h(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in f){const{children:y,...C}=f,x=at(C);return x.children=a.all(f),x}return at(f)}return(a.options.unknownHandler||Su)(a,f,c)}function s(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const d=a.one(p[h],f);if(d){if(h&&p[h-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=Wn(d.value)),!Array.isArray(d)&&d.type==="element")){const y=d.children[0];y&&y.type==="text"&&(y.value=Wn(y.value))}Array.isArray(d)?c.push(...d):c.push(d)}}}return c}}function bu(e,n){e.position&&(n.position=ul(e))}function wu(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&o&&Object.assign(t.properties,at(o)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Su(e,n){const t=n.data||{},r="value"in n&&!(Bt.call(t,"hProperties")||Bt.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Cu(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
11
+ `});++r<e.length;)r&&t.push({type:"text",value:`
12
+ `}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
13
+ `}),t}function Wn(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Yn(e,n){const t=ku(e,n),r=t.one(e,void 0),i=cu(t),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
14
+ `},i),o}function Eu(e,n){return e&&"run"in e?async function(t,r){const i=Yn(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Yn(t,{file:r,...e||n})}}function Gn(e){if(e)throw e}var bt,Xn;function Iu(){if(Xn)return bt;Xn=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(s){return typeof Array.isArray=="function"?Array.isArray(s):n.call(s)==="[object Array]"},o=function(s){if(!s||n.call(s)!=="[object Object]")return!1;var f=e.call(s,"constructor"),c=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!f&&!c)return!1;var p;for(p in s);return typeof p>"u"||e.call(s,p)},l=function(s,f){t&&f.name==="__proto__"?t(s,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):s[f.name]=f.newValue},a=function(s,f){if(f==="__proto__")if(e.call(s,f)){if(r)return r(s,f).value}else return;return s[f]};return bt=function u(){var s,f,c,p,h,d,y=arguments[0],C=1,x=arguments.length,k=!1;for(typeof y=="boolean"&&(k=y,y=arguments[1]||{},C=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});C<x;++C)if(s=arguments[C],s!=null)for(f in s)c=a(y,f),p=a(s,f),y!==p&&(k&&p&&(o(p)||(h=i(p)))?(h?(h=!1,d=c&&i(c)?c:[]):d=c&&o(c)?c:{},l(y,{name:f,newValue:u(k,d,p)})):typeof p<"u"&&l(y,{name:f,newValue:p}));return y},bt}var Au=Iu();const wt=yr(Au);function jt(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Tu(){const e=[],n={run:t,use:r};return n;function t(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(u,...s){const f=e[++o];let c=-1;if(u){l(u);return}for(;++c<i.length;)(s[c]===null||s[c]===void 0)&&(s[c]=i[c]);i=s,f?Fu(f,a)(...s):l(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Fu(e,n){let t;return r;function r(...l){const a=e.length>l.length;let u;a&&l.push(i);try{u=e.apply(this,l)}catch(s){const f=s;if(a&&t)throw f;return i(f)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...a){t||(t=!0,n(l,...a))}function o(l){i(null,l)}}const ce={basename:Pu,dirname:zu,extname:Du,join:Lu,sep:"/"};function Pu(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Je(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function zu(e){if(Je(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Du(e){Je(e);let n=e.length,t=-1,r=0,i=-1,o=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Lu(...e){let n=-1,t;for(;++n<e.length;)Je(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":vu(t)}function vu(e){Je(e);const n=e.codePointAt(0)===47;let t=Mu(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Mu(e,n){let t="",r=0,i=-1,o=0,l=-1,a,u;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(u=t.lastIndexOf("/"),u!==t.length-1){u<0?(t="",r=0):(t=t.slice(0,u),r=t.length-1-t.lastIndexOf("/")),i=l,o=0;continue}}else if(t.length>0){t="",r=0,i=l,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return t}function Je(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ou={cwd:Ru};function Ru(){return"/"}function $t(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function _u(e){if(typeof e=="string")e=new URL(e);else if(!$t(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Nu(e)}function Nu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}const St=["history","path","basename","stem","extname","dirname"];class ei{constructor(n){let t;n?$t(n)?t={path:n}:typeof n=="string"||Bu(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Ou.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<St.length;){const o=St[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)St.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ce.basename(this.path):void 0}set basename(n){Et(n,"basename"),Ct(n,"basename"),this.path=ce.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ce.dirname(this.path):void 0}set dirname(n){Qn(this.basename,"dirname"),this.path=ce.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ce.extname(this.path):void 0}set extname(n){if(Ct(n,"extname"),Qn(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ce.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){$t(n)&&(n=_u(n)),Et(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ce.basename(this.path,this.extname):void 0}set stem(n){Et(n,"stem"),Ct(n,"stem"),this.path=ce.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new K(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Ct(e,n){if(e&&e.includes(ce.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ce.sep+"`")}function Et(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Qn(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Bu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ju=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},$u={}.hasOwnProperty;class on extends ju{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=Tu()}copy(){const n=new on;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(wt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(Tt("data",this.frozen),this.namespace[n]=t,this):$u.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Tt("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=nt(n),r=this.parser||this.Parser;return It("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),It("process",this.parser||this.Parser),At("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,l){const a=nt(n),u=r.parse(a);r.run(u,a,function(f,c,p){if(f||!c||!p)return s(f);const h=c,d=r.stringify(h,p);Uu(d)?p.value=d:p.result=d,s(f,p)});function s(f,c){f||!c?l(f):o?o(c):t(void 0,c)}}}processSync(n){let t=!1,r;return this.freeze(),It("processSync",this.parser||this.Parser),At("processSync",this.compiler||this.Compiler),this.process(n,i),Jn("processSync","process",t),r;function i(o,l){t=!0,Gn(o),r=l}}run(n,t,r){Kn(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const u=nt(t);i.run(n,u,s);function s(f,c,p){const h=c||n;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),Jn("runSync","run",r),i;function o(l,a){Gn(l),i=a,r=!0}}stringify(n,t){this.freeze();const r=nt(t),i=this.compiler||this.Compiler;return At("stringify",i),Kn(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(Tt("use",this.frozen),n!=null)if(typeof n=="function")u(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(s){if(typeof s=="function")u(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[f,...c]=s;u(f,c)}else l(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function l(s){if(!("plugins"in s)&&!("settings"in s))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(s.plugins),s.settings&&(i.settings=wt(!0,i.settings,s.settings))}function a(s){let f=-1;if(s!=null)if(Array.isArray(s))for(;++f<s.length;){const c=s[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function u(s,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===s){p=c;break}if(p===-1)r.push([s,...f]);else if(f.length>0){let[h,...d]=f;const y=r[p][1];jt(y)&&jt(h)&&(h=wt(!0,y,h)),r[p]=[s,h,...d]}}}}const qu=new on().freeze();function It(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function At(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Tt(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Kn(e){if(!jt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Jn(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function nt(e){return Hu(e)?e:new ei(e)}function Hu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Uu(e){return typeof e=="string"||Vu(e)}function Vu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Wu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Zn=[],er={allowDangerousHtml:!0},Yu=/^(https?|ircs?|mailto|xmpp)$/i,Gu=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Kf(e){const n=Xu(e),t=Qu(e);return Ku(n.runSync(n.parse(t),t),e)}function Xu(e){const n=e.rehypePlugins||Zn,t=e.remarkPlugins||Zn,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...er}:er;return qu().use(Da).use(t).use(Eu,r).use(n)}function Qu(e){const n=e.children||"",t=new ei;return typeof n=="string"&&(t.value=n),t}function Ku(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,o=n.disallowedElements,l=n.skipHtml,a=n.unwrapDisallowed,u=n.urlTransform||Ju;for(const f of Gu)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Wu+f.id,void 0);return ln(e,s),pl(e,{Fragment:mt.Fragment,components:i,ignoreInvalidStyle:!0,jsx:mt.jsx,jsxs:mt.jsxs,passKeys:!0,passNode:!0});function s(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return l?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in yt)if(Object.hasOwn(yt,h)&&Object.hasOwn(f.properties,h)){const d=f.properties[h],y=yt[h];(y===null||y.includes(f.tagName))&&(f.properties[h]=u(String(d||""),h,f))}}if(f.type==="element"){let h=t?!t.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return a&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function Ju(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||Yu.test(e.slice(0,n))?e:""}function tr(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}function Zu(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function es(e,n,t){const i=Ke((t||{}).ignore||[]),o=ts(n);let l=-1;for(;++l<o.length;)rn(e,"text",a);function a(s,f){let c=-1,p;for(;++c<f.length;){const h=f[c],d=p?p.children:void 0;if(i(h,d?d.indexOf(h):void 0,p))return;p=h}if(p)return u(s,f)}function u(s,f){const c=f[f.length-1],p=o[l][0],h=o[l][1];let d=0;const C=c.children.indexOf(s);let x=!1,k=[];p.lastIndex=0;let I=p.exec(s.value);for(;I;){const v=I.index,M={index:I.index,input:I.input,stack:[...f,s]};let S=h(...I,M);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=v+1:(d!==v&&k.push({type:"text",value:s.value.slice(d,v)}),Array.isArray(S)?k.push(...S):S&&k.push(S),d=v+I[0].length,x=!0),!p.global)break;I=p.exec(s.value)}return x?(d<s.value.length&&k.push({type:"text",value:s.value.slice(d)}),c.children.splice(C,1,...k)):k=[s],C+k.length}}function ts(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([ns(i[0]),rs(i[1])])}return n}function ns(e){return typeof e=="string"?new RegExp(Zu(e),"g"):e}function rs(e){return typeof e=="function"?e:function(){return e}}const Ft="phrasing",Pt=["autolink","link","image","label"];function is(){return{transforms:[fs],enter:{literalAutolink:os,literalAutolinkEmail:zt,literalAutolinkHttp:zt,literalAutolinkWww:zt},exit:{literalAutolink:cs,literalAutolinkEmail:ss,literalAutolinkHttp:as,literalAutolinkWww:us}}}function ls(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ft,notInConstruct:Pt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ft,notInConstruct:Pt},{character:":",before:"[ps]",after:"\\/",inConstruct:Ft,notInConstruct:Pt}]}}function os(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function zt(e){this.config.enter.autolinkProtocol.call(this,e)}function as(e){this.config.exit.autolinkProtocol.call(this,e)}function us(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function ss(e){this.config.exit.autolinkEmail.call(this,e)}function cs(e){this.exit(e)}function fs(e){es(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,hs],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ps]],{ignore:["link","linkReference"]})}function hs(e,n,t,r,i){let o="";if(!ti(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!ms(t)))return!1;const l=gs(t+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function ps(e,n,t,r){return!ti(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function ms(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function gs(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=tr(e,"(");let o=tr(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function ti(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Ce(t)||ct(t))&&(!n||t!==47)}ni.peek=Es;function ds(){this.buffer()}function ys(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function xs(){this.buffer()}function ks(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function bs(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=se(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ws(e){this.exit(e)}function Ss(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=se(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Cs(e){this.exit(e)}function Es(){return"["}function ni(e,n,t,r){const i=t.createTracker(r);let o=i.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Is(){return{enter:{gfmFootnoteCallString:ds,gfmFootnoteCall:ys,gfmFootnoteDefinitionLabelString:xs,gfmFootnoteDefinition:ks},exit:{gfmFootnoteCallString:bs,gfmFootnoteCall:ws,gfmFootnoteDefinitionLabelString:Ss,gfmFootnoteDefinition:Cs}}}function As(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:ni},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,o,l){const a=o.createTracker(l);let u=a.move("[^");const s=o.enter("footnoteDefinition"),f=o.enter("label");return u+=a.move(o.safe(o.associationId(r),{before:u,after:"]"})),f(),u+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),u+=a.move((n?`
15
+ `:" ")+o.indentLines(o.containerFlow(r,a.current()),n?ri:Ts))),s(),u}}function Ts(e,n,t){return n===0?e:ri(e,n,t)}function ri(e,n,t){return(t?"":" ")+e}const Fs=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ii.peek=vs;function Ps(){return{canContainEols:["delete"],enter:{strikethrough:Ds},exit:{strikethrough:Ls}}}function zs(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Fs}],handlers:{delete:ii}}}function Ds(e){this.enter({type:"delete",children:[]},e)}function Ls(e){this.exit(e)}function ii(e,n,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function vs(){return"~"}function Ms(e){return e.length}function Os(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||Ms,o=[],l=[],a=[],u=[];let s=0,f=-1;for(;++f<e.length;){const y=[],C=[];let x=-1;for(e[f].length>s&&(s=e[f].length);++x<e[f].length;){const k=Rs(e[f][x]);if(t.alignDelimiters!==!1){const I=i(k);C[x]=I,(u[x]===void 0||I>u[x])&&(u[x]=I)}y.push(k)}l[f]=y,a[f]=C}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<s;)o[c]=nr(r[c]);else{const y=nr(r);for(;++c<s;)o[c]=y}c=-1;const p=[],h=[];for(;++c<s;){const y=o[c];let C="",x="";y===99?(C=":",x=":"):y===108?C=":":y===114&&(x=":");let k=t.alignDelimiters===!1?1:Math.max(1,u[c]-C.length-x.length);const I=C+"-".repeat(k)+x;t.alignDelimiters!==!1&&(k=C.length+k+x.length,k>u[c]&&(u[c]=k),h[c]=k),p[c]=I}l.splice(1,0,p),a.splice(1,0,h),f=-1;const d=[];for(;++f<l.length;){const y=l[f],C=a[f];c=-1;const x=[];for(;++c<s;){const k=y[c]||"";let I="",v="";if(t.alignDelimiters!==!1){const M=u[c]-(C[c]||0),S=o[c];S===114?I=" ".repeat(M):S===99?M%2?(I=" ".repeat(M/2+.5),v=" ".repeat(M/2-.5)):(I=" ".repeat(M/2),v=I):v=" ".repeat(M)}t.delimiterStart!==!1&&!c&&x.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&k==="")&&(t.delimiterStart!==!1||c)&&x.push(" "),t.alignDelimiters!==!1&&x.push(I),x.push(k),t.alignDelimiters!==!1&&x.push(v),t.padding!==!1&&x.push(" "),(t.delimiterEnd!==!1||c!==s-1)&&x.push("|")}d.push(t.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return d.join(`
16
+ `)}function Rs(e){return e==null?"":String(e)}function nr(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function _s(e,n,t,r){const i=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);const l=t.indentLines(t.containerFlow(e,o.current()),Ns);return i(),l}function Ns(e,n,t){return">"+(t?"":" ")+e}function Bs(e,n){return rr(e,n.inConstruct,!0)&&!rr(e,n.notInConstruct,!1)}function rr(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function ir(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
17
+ `&&Bs(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
+ `}function li(e,n){const t=String(e);let r=t.indexOf(n),i=r,o=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+n.length,r=t.indexOf(n,i);return l}function js(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function $s(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function qs(e,n,t,r){const i=$s(t),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(js(e,t)){const c=t.enter("codeIndented"),p=t.indentLines(o,Hs);return c(),p}const a=t.createTracker(r),u=i.repeat(Math.max(li(o,i)+1,3)),s=t.enter("codeFenced");let f=a.move(u);if(e.lang){const c=t.enter(`codeFencedLang${l}`);f+=a.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=t.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(t.safe(e.meta,{before:f,after:`
19
+ `,encode:["`"],...a.current()})),c()}return f+=a.move(`
20
+ `),o&&(f+=a.move(o+`
21
+ `)),f+=a.move(u),s(),f}function Hs(e,n,t){return(t?"":" ")+e}function an(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Us(e,n,t,r){const i=an(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let a=t.enter("label");const u=t.createTracker(r);let s=u.move("[");return s+=u.move(t.safe(t.associationId(e),{before:s,after:"]",...u.current()})),s+=u.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(t.safe(e.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(a=t.enter("destinationRaw"),s+=u.move(t.safe(e.url,{before:s,after:e.title?" ":`
22
+ `,...u.current()}))),a(),e.title&&(a=t.enter(`title${o}`),s+=u.move(" "+i),s+=u.move(t.safe(e.title,{before:s,after:i,...u.current()})),s+=u.move(i),a()),l(),s}function Vs(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Ge(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ut(e,n,t){const r=ve(e),i=ve(n);return r===void 0?i===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===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}}oi.peek=Ws;function oi(e,n,t,r){const i=Vs(t),o=t.enter("emphasis"),l=t.createTracker(r),a=l.move(i);let u=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const s=u.charCodeAt(0),f=ut(r.before.charCodeAt(r.before.length-1),s,i);f.inside&&(u=Ge(s)+u.slice(1));const c=u.charCodeAt(u.length-1),p=ut(r.after.charCodeAt(0),c,i);p.inside&&(u=u.slice(0,-1)+Ge(c));const h=l.move(i);return o(),t.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+h}function Ws(e,n,t){return t.options.emphasis||"*"}function Ys(e,n){let t=!1;return ln(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Nt}),!!((!e.depth||e.depth<3)&&Qt(e)&&(n.options.setext||t))}function Gs(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(Ys(e,t)){const f=t.enter("headingSetext"),c=t.enter("phrasing"),p=t.containerPhrasing(e,{...o.current(),before:`
23
+ `,after:`
24
+ `});return c(),f(),p+`
25
+ `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
26
+ `))+1))}const l="#".repeat(i),a=t.enter("headingAtx"),u=t.enter("phrasing");o.move(l+" ");let s=t.containerPhrasing(e,{before:"# ",after:`
27
+ `,...o.current()});return/^[\t ]/.test(s)&&(s=Ge(s.charCodeAt(0))+s.slice(1)),s=s?l+" "+s:l,t.options.closeAtx&&(s+=" "+l),u(),a(),s}ai.peek=Xs;function ai(e){return e.value||""}function Xs(){return"<"}ui.peek=Qs;function ui(e,n,t,r){const i=an(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let a=t.enter("label");const u=t.createTracker(r);let s=u.move("![");return s+=u.move(t.safe(e.alt,{before:s,after:"]",...u.current()})),s+=u.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(t.safe(e.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(a=t.enter("destinationRaw"),s+=u.move(t.safe(e.url,{before:s,after:e.title?" ":")",...u.current()}))),a(),e.title&&(a=t.enter(`title${o}`),s+=u.move(" "+i),s+=u.move(t.safe(e.title,{before:s,after:i,...u.current()})),s+=u.move(i),a()),s+=u.move(")"),l(),s}function Qs(){return"!"}si.peek=Ks;function si(e,n,t,r){const i=e.referenceType,o=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let u=a.move("![");const s=t.safe(e.alt,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:u,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!s||s!==c?u+=a.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function Ks(){return"!"}ci.peek=Js;function ci(e,n,t){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){const l=t.unsafe[o],a=t.compilePattern(l);let u;if(l.atBreak)for(;u=a.exec(r);){let s=u.index;r.charCodeAt(s)===10&&r.charCodeAt(s-1)===13&&s--,r=r.slice(0,s)+" "+r.slice(u.index+1)}}return i+r+i}function Js(){return"`"}function fi(e,n){const t=Qt(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}hi.peek=Zs;function hi(e,n,t,r){const i=an(t),o=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let a,u;if(fi(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let c=l.move("<");return c+=l.move(t.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),t.stack=f,c}a=t.enter("link"),u=t.enter("label");let s=l.move("[");return s+=l.move(t.containerPhrasing(e,{before:s,after:"](",...l.current()})),s+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),s+=l.move("<"),s+=l.move(t.safe(e.url,{before:s,after:">",...l.current()})),s+=l.move(">")):(u=t.enter("destinationRaw"),s+=l.move(t.safe(e.url,{before:s,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=t.enter(`title${o}`),s+=l.move(" "+i),s+=l.move(t.safe(e.title,{before:s,after:i,...l.current()})),s+=l.move(i),u()),s+=l.move(")"),a(),s}function Zs(e,n,t){return fi(e,t)?"<":"["}pi.peek=ec;function pi(e,n,t,r){const i=e.referenceType,o=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let u=a.move("[");const s=t.containerPhrasing(e,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:u,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!s||s!==c?u+=a.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function ec(){return"["}function un(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function tc(e){const n=un(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function nc(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function mi(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function rc(e,n,t,r){const i=t.enter("list"),o=t.bulletCurrent;let l=e.ordered?nc(t):un(t);const a=e.ordered?l==="."?")":".":tc(t);let u=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(u=!0),mi(t)===l&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(l=a),t.bulletCurrent=l;const s=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=o,i(),s}function ic(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function lc(e,n,t,r){const i=ic(t);let o=t.bulletCurrent||un(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=t.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const u=t.enter("listItem"),s=t.indentLines(t.containerFlow(e,a.current()),f);return u(),s;function f(c,p,h){return p?(h?"":" ".repeat(l))+c:(h?o:o+" ".repeat(l-o.length))+c}}function oc(e,n,t,r){const i=t.enter("paragraph"),o=t.enter("phrasing"),l=t.containerPhrasing(e,r);return o(),i(),l}const ac=Ke(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uc(e,n,t,r){return(e.children.some(function(l){return ac(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function sc(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}gi.peek=cc;function gi(e,n,t,r){const i=sc(t),o=t.enter("strong"),l=t.createTracker(r),a=l.move(i+i);let u=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const s=u.charCodeAt(0),f=ut(r.before.charCodeAt(r.before.length-1),s,i);f.inside&&(u=Ge(s)+u.slice(1));const c=u.charCodeAt(u.length-1),p=ut(r.after.charCodeAt(0),c,i);p.inside&&(u=u.slice(0,-1)+Ge(c));const h=l.move(i+i);return o(),t.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+h}function cc(e,n,t){return t.options.strong||"*"}function fc(e,n,t,r){return t.safe(e.value,r)}function hc(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function pc(e,n,t){const r=(mi(t)+(t.options.ruleSpaces?" ":"")).repeat(hc(t));return t.options.ruleSpaces?r.slice(0,-1):r}const di={blockquote:_s,break:ir,code:qs,definition:Us,emphasis:oi,hardBreak:ir,heading:Gs,html:ai,image:ui,imageReference:si,inlineCode:ci,link:hi,linkReference:pi,list:rc,listItem:lc,paragraph:oc,root:uc,strong:gi,text:fc,thematicBreak:pc};function mc(){return{enter:{table:gc,tableData:lr,tableHeader:lr,tableRow:yc},exit:{codeText:xc,table:dc,tableData:Dt,tableHeader:Dt,tableRow:Dt}}}function gc(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function dc(e){this.exit(e),this.data.inTable=void 0}function yc(e){this.enter({type:"tableRow",children:[]},e)}function Dt(e){this.exit(e)}function lr(e){this.enter({type:"tableCell",children:[]},e)}function xc(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,kc));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function kc(e,n){return n==="|"?n:e}function bc(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:u,tableRow:a}};function l(h,d,y,C){return s(f(h,y,C),h.align)}function a(h,d,y,C){const x=c(h,y,C),k=s([x]);return k.slice(0,k.indexOf(`
29
+ `))}function u(h,d,y,C){const x=y.enter("tableCell"),k=y.enter("phrasing"),I=y.containerPhrasing(h,{...C,before:o,after:o});return k(),x(),I}function s(h,d){return Os(h,{align:d,alignDelimiters:r,padding:t,stringLength:i})}function f(h,d,y){const C=h.children;let x=-1;const k=[],I=d.enter("table");for(;++x<C.length;)k[x]=c(C[x],d,y);return I(),k}function c(h,d,y){const C=h.children;let x=-1;const k=[],I=d.enter("tableRow");for(;++x<C.length;)k[x]=u(C[x],h,d,y);return I(),k}function p(h,d,y){let C=di.inlineCode(h,d,y);return y.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function wc(){return{exit:{taskListCheckValueChecked:or,taskListCheckValueUnchecked:or,paragraph:Cc}}}function Sc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ec}}}function or(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Cc(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Ec(e,n,t,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(l);let u=di.listItem(e,n,t,{...r,...a.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,s)),u;function s(f){return f+l}}function Ic(){return[is(),Is(),Ps(),mc(),wc()]}function Ac(e){return{extensions:[ls(),As(e),zs(),bc(e),Sc()]}}const Tc={tokenize:vc,partial:!0},yi={tokenize:Mc,partial:!0},xi={tokenize:Oc,partial:!0},ki={tokenize:Rc,partial:!0},Fc={tokenize:_c,partial:!0},bi={name:"wwwAutolink",tokenize:Dc,previous:Si},wi={name:"protocolAutolink",tokenize:Lc,previous:Ci},de={name:"emailAutolink",tokenize:zc,previous:Ei},fe={};function Pc(){return{text:fe}}let Se=48;for(;Se<123;)fe[Se]=de,Se++,Se===58?Se=65:Se===91&&(Se=97);fe[43]=de;fe[45]=de;fe[46]=de;fe[95]=de;fe[72]=[de,wi];fe[104]=[de,wi];fe[87]=[de,bi];fe[119]=[de,bi];function zc(e,n,t){const r=this;let i,o;return l;function l(c){return!qt(c)||!Ei.call(r,r.previous)||sn(r.events)?t(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return qt(c)?(e.consume(c),a):c===64?(e.consume(c),u):t(c)}function u(c){return c===46?e.check(Fc,f,s)(c):c===45||c===95||Q(c)?(o=!0,e.consume(c),u):f(c)}function s(c){return e.consume(c),i=!0,u}function f(c){return o&&i&&J(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(c)):t(c)}}function Dc(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!Si.call(r,r.previous)||sn(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Tc,e.attempt(yi,e.attempt(xi,o),t),t)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function Lc(e,n,t){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Ci.call(r,r.previous)&&!sn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):t(c)}function a(c){if(J(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),u}return t(c)}function u(c){return c===47?(e.consume(c),o?s:(o=!0,u)):t(c)}function s(c){return c===null||lt(c)||U(c)||Ce(c)||ct(c)?t(c):e.attempt(yi,e.attempt(xi,f),t)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(c)}}function vc(e,n,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):t(l)}function o(l){return l===null?t(l):n(l)}}function Mc(e,n,t){let r,i,o;return l;function l(s){return s===46||s===95?e.check(ki,u,a)(s):s===null||U(s)||Ce(s)||s!==45&&ct(s)?u(s):(o=!0,e.consume(s),l)}function a(s){return s===95?r=!0:(i=r,r=void 0),e.consume(s),l}function u(s){return i||r||!o?t(s):n(s)}}function Oc(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(ki,n,o)(l):l===null||U(l)||Ce(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function Rc(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||U(a)||Ce(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||U(a)||Ce(a)?n(a):r(a)}function o(a){return J(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):J(a)?(e.consume(a),l):t(a)}}function _c(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return Q(o)?t(o):n(o)}}function Si(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||U(e)}function Ci(e){return!J(e)}function Ei(e){return!(e===47||qt(e))}function qt(e){return e===43||e===45||e===46||e===95||Q(e)}function sn(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Nc={tokenize:Wc,partial:!0};function Bc(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Hc,continuation:{tokenize:Uc},exit:Vc}},text:{91:{name:"gfmFootnoteCall",tokenize:qc},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:jc,resolveTo:$c}}}}function jc(e,n,t){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){l=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!l||!l._balanced)return t(u);const s=se(r.sliceSerialize({start:l.end,end:r.now()}));return s.codePointAt(0)!==94||!o.includes(s.slice(1))?t(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function $c(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function qc(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?t(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(c){if(o>999||c===93&&!l||c===null||c===91||U(c))return t(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(se(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(c)}return U(c)||(l=!0),o++,e.consume(c),c===92?f:s}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,s):s(c)}}function Hc(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return u;function u(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),s}function s(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(d)}function f(d){if(l>999||d===93&&!a||d===null||d===91||U(d))return t(d);if(d===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return o=se(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return U(d)||(a=!0),l++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),l++,f):f(d)}function p(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(o)||i.push(o),B(e,h,"gfmFootnoteDefinitionWhitespace")):t(d)}function h(d){return n(d)}}function Uc(e,n,t){return e.check(Qe,n,e.attempt(Nc,n,t))}function Vc(e){e.exit("gfmFootnoteDefinition")}function Wc(e,n,t){const r=this;return B(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(o):t(o)}}function Yc(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let u=-1;for(;++u<l.length;)if(l[u][0]==="enter"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._close){let s=u;for(;s--;)if(l[s][0]==="exit"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._open&&l[u][1].end.offset-l[u][1].start.offset===l[s][1].end.offset-l[s][1].start.offset){l[u][1].type="strikethroughSequence",l[s][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[s][1].start),end:Object.assign({},l[u][1].end)},c={type:"strikethroughText",start:Object.assign({},l[s][1].end),end:Object.assign({},l[u][1].start)},p=[["enter",f,a],["enter",l[s][1],a],["exit",l[s][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&re(p,p.length,0,ft(h,l.slice(s+1,u),a)),re(p,p.length,0,[["exit",c,a],["enter",l[u][1],a],["exit",l[u][1],a],["exit",f,a]]),re(l,s-1,u-s+3,p),u=s+p.length-2;break}}for(u=-1;++u<l.length;)l[u][1].type==="strikethroughSequenceTemporary"&&(l[u][1].type="data");return l}function o(l,a,u){const s=this.previous,f=this.events;let c=0;return p;function p(d){return s===126&&f[f.length-1][1].type!=="characterEscape"?u(d):(l.enter("strikethroughSequenceTemporary"),h(d))}function h(d){const y=ve(s);if(d===126)return c>1?u(d):(l.consume(d),c++,h);if(c<2&&!t)return u(d);const C=l.exit("strikethroughSequenceTemporary"),x=ve(d);return C._open=!x||x===2&&!!y,C._close=!y||y===2&&!!x,a(d)}}}class Gc{constructor(){this.map=[]}add(n,t,r){Xc(this,n,t,r)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const o of i)n.push(o);i=r.pop()}this.map.length=0}}function Xc(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function Qc(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function Kc(){return{flow:{null:{name:"table",tokenize:Jc,resolveAll:Zc}}}}function Jc(e,n,t){const r=this;let i=0,o=0,l;return a;function a(b){let P=r.events.length-1;for(;P>-1;){const T=r.events[P][1].type;if(T==="lineEnding"||T==="linePrefix")P--;else break}const z=P>-1?r.events[P][1].type:null,D=z==="tableHead"||z==="tableRow"?S:u;return D===S&&r.parser.lazy[r.now().line]?t(b):D(b)}function u(b){return e.enter("tableHead"),e.enter("tableRow"),s(b)}function s(b){return b===124||(l=!0,o+=1),f(b)}function f(b){return b===null?t(b):F(b)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):t(b):j(b)?B(e,f,"whitespace")(b):(o+=1,l&&(l=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(b)))}function c(b){return b===null||b===124||U(b)?(e.exit("data"),f(b)):(e.consume(b),b===92?p:c)}function p(b){return b===92||b===124?(e.consume(b),c):c(b)}function h(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(b):(e.enter("tableDelimiterRow"),l=!1,j(b)?B(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):d(b))}function d(b){return b===45||b===58?C(b):b===124?(l=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),y):M(b)}function y(b){return j(b)?B(e,C,"whitespace")(b):C(b)}function C(b){return b===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),x):b===45?(o+=1,x(b)):b===null||F(b)?v(b):M(b)}function x(b){return b===45?(e.enter("tableDelimiterFiller"),k(b)):M(b)}function k(b){return b===45?(e.consume(b),k):b===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I(b))}function I(b){return j(b)?B(e,v,"whitespace")(b):v(b)}function v(b){return b===124?d(b):b===null||F(b)?!l||i!==o?M(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(b)):M(b)}function M(b){return t(b)}function S(b){return e.enter("tableRow"),_(b)}function _(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),_):b===null||F(b)?(e.exit("tableRow"),n(b)):j(b)?B(e,_,"whitespace")(b):(e.enter("data"),q(b))}function q(b){return b===null||b===124||U(b)?(e.exit("data"),_(b)):(e.consume(b),b===92?O:q)}function O(b){return b===92||b===124?(e.consume(b),q):q(b)}}function Zc(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,u=0,s,f,c;const p=new Gc;for(;++t<e.length;){const h=e[t],d=h[1];h[0]==="enter"?d.type==="tableHead"?(a=!1,u!==0&&(ar(p,n,u,s,f),f=void 0,u=0),s={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(t,0,[["enter",s,n]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(t,0,[["enter",f,n]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=rt(p,n,o,i,void 0,c),o=[0,0,0,0]),l[2]=t)):d.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=rt(p,n,o,i,void 0,c)),o=l,l=[o[1],t,0,0])):d.type==="tableHead"?(a=!0,u=t):d.type==="tableRow"||d.type==="tableDelimiterRow"?(u=t,o[1]!==0?(l[0]=l[1],c=rt(p,n,o,i,t,c)):l[1]!==0&&(c=rt(p,n,l,i,t,c)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(l[3]=t)}for(u!==0&&ar(p,n,u,s,f),p.consume(n.events),t=-1;++t<n.events.length;){const h=n.events[t];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Qc(n.events,t))}return e}function rt(e,n,t,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},De(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const u=De(n.events,t[1]);if(o={type:l,start:Object.assign({},u),end:Object.assign({},u)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const s=De(n.events,t[2]),f=De(n.events,t[3]),c={type:a,start:Object.assign({},s),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",c,n]]),r!==2){const p=n.events[t[2]],h=n.events[t[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",t[3]>t[2]+1){const d=t[2]+1,y=t[3]-t[2]-1;e.add(d,y,[])}}e.add(t[3]+1,0,[["exit",c,n]])}return i!==void 0&&(o.end=Object.assign({},De(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function ar(e,n,t,r,i){const o=[],l=De(n.events,t);i&&(i.end=Object.assign({},l),o.push(["exit",i,n])),r.end=Object.assign({},l),o.push(["exit",r,n]),e.add(t+1,0,o)}function De(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const ef={name:"tasklistCheck",tokenize:nf};function tf(){return{text:{91:ef}}}function nf(e,n,t){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return U(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),l):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),l):t(u)}function l(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(u)}function a(u){return F(u)?n(u):j(u)?e.check({tokenize:rf},n,t)(u):t(u)}}function rf(e,n,t){return B(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function lf(e){return Mr([Pc(),Bc(),Yc(e),Kc(),tf()])}const of={};function Jf(e){const n=this,t=e||of,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(lf(t)),o.push(Ic()),l.push(Ac(t))}function af(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:o},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:a,mathText:l,mathTextData:a}};function e(u){const s={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[s]}},u)}function n(){this.buffer()}function t(){const u=this.resume(),s=this.stack[this.stack.length-1];s.type,s.meta=u}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(u){const s=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),f=this.stack[this.stack.length-1];f.type,this.exit(u),f.value=s;const c=f.data.hChildren[0];c.type,c.tagName,c.children.push({type:"text",value:s}),this.data.mathFlowInside=void 0}function o(u){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},u),this.buffer()}function l(u){const s=this.resume(),f=this.stack[this.stack.length-1];f.type,this.exit(u),f.value=s,f.data.hChildren.push({type:"text",value:s})}function a(u){this.config.enter.data.call(this,u),this.config.exit.data.call(this,u)}}function uf(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
30
+ `,inConstruct:"mathFlowMeta"},{character:"$",after:n?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:r}};function t(o,l,a,u){const s=o.value||"",f=a.createTracker(u),c="$".repeat(Math.max(li(s,"$")+1,2)),p=a.enter("mathFlow");let h=f.move(c);if(o.meta){const d=a.enter("mathFlowMeta");h+=f.move(a.safe(o.meta,{after:`
31
+ `,before:h,encode:["$"],...f.current()})),d()}return h+=f.move(`
32
+ `),s&&(h+=f.move(s+`
33
+ `)),h+=f.move(c),p(),h}function r(o,l,a){let u=o.value||"",s=1;for(n||s++;new RegExp("(^|[^$])"+"\\$".repeat(s)+"([^$]|$)").test(u);)s++;const f="$".repeat(s);/[^ \r\n]/.test(u)&&(/^[ \r\n]/.test(u)&&/[ \r\n]$/.test(u)||/^\$|\$$/.test(u))&&(u=" "+u+" ");let c=-1;for(;++c<a.unsafe.length;){const p=a.unsafe[c];if(!p.atBreak)continue;const h=a.compilePattern(p);let d;for(;d=h.exec(u);){let y=d.index;u.codePointAt(y)===10&&u.codePointAt(y-1)===13&&y--,u=u.slice(0,y)+" "+u.slice(d.index+1)}}return f+u+f}function i(){return"$"}}const sf={tokenize:cf,concrete:!0,name:"mathFlow"},ur={tokenize:ff,partial:!0};function cf(e,n,t){const r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let l=0;return a;function a(k){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),u(k)}function u(k){return k===36?(e.consume(k),l++,u):l<2?t(k):(e.exit("mathFlowFenceSequence"),B(e,s,"whitespace")(k))}function s(k){return k===null||F(k)?c(k):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===null||F(k)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),c(k)):k===36?t(k):(e.consume(k),f)}function c(k){return e.exit("mathFlowFence"),r.interrupt?n(k):e.attempt(ur,p,C)(k)}function p(k){return e.attempt({tokenize:x,partial:!0},C,h)(k)}function h(k){return(o?B(e,d,"linePrefix",o+1):d)(k)}function d(k){return k===null?C(k):F(k)?e.attempt(ur,p,C)(k):(e.enter("mathFlowValue"),y(k))}function y(k){return k===null||F(k)?(e.exit("mathFlowValue"),d(k)):(e.consume(k),y)}function C(k){return e.exit("mathFlow"),n(k)}function x(k,I,v){let M=0;return B(k,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function S(O){return k.enter("mathFlowFence"),k.enter("mathFlowFenceSequence"),_(O)}function _(O){return O===36?(M++,k.consume(O),_):M<l?v(O):(k.exit("mathFlowFenceSequence"),B(k,q,"whitespace")(O))}function q(O){return O===null||F(O)?(k.exit("mathFlowFence"),I(O)):v(O)}}}function ff(e,n,t){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function hf(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),{tokenize:r,resolve:pf,previous:mf,name:"mathText"};function r(i,o,l){let a=0,u,s;return f;function f(y){return i.enter("mathText"),i.enter("mathTextSequence"),c(y)}function c(y){return y===36?(i.consume(y),a++,c):a<2&&!t?l(y):(i.exit("mathTextSequence"),p(y))}function p(y){return y===null?l(y):y===36?(s=i.enter("mathTextSequence"),u=0,d(y)):y===32?(i.enter("space"),i.consume(y),i.exit("space"),p):F(y)?(i.enter("lineEnding"),i.consume(y),i.exit("lineEnding"),p):(i.enter("mathTextData"),h(y))}function h(y){return y===null||y===32||y===36||F(y)?(i.exit("mathTextData"),p(y)):(i.consume(y),h)}function d(y){return y===36?(i.consume(y),u++,d):u===a?(i.exit("mathTextSequence"),i.exit("mathText"),o(y)):(s.type="mathTextData",h(y))}}}function pf(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="mathTextData"){e[n][1].type="mathTextPadding",e[t][1].type="mathTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="mathTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function mf(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function gf(e){return{flow:{36:sf},text:{36:hf(e)}}}const df={};function Zf(e){const n=this,t=e||df,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(gf(t)),o.push(af()),l.push(uf(t))}const sr=/[#.]/g;function yf(e,n){const t=e||"",r={};let i=0,o,l;for(;i<t.length;){sr.lastIndex=i;const a=sr.exec(t),u=t.slice(i,a?a.index:t.length);u&&(o?o==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:l=u,i+=u.length),a&&(o=a[0],i++)}return{type:"element",tagName:l||n||"div",properties:r,children:[]}}function Ii(e,n,t){const r=t?wf(t):void 0;function i(o,l,...a){let u;if(o==null){u={type:"root",children:[]};const s=l;a.unshift(s)}else{u=yf(o,n);const s=u.tagName.toLowerCase(),f=r?r.get(s):void 0;if(u.tagName=f||s,xf(l))a.unshift(l);else for(const[c,p]of Object.entries(l))kf(e,u.properties,c,p)}for(const s of a)Ht(u.children,s);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function xf(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const n=e,t=Object.keys(e);for(const r of t){const i=n[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const o=i;for(const l of o)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function kf(e,n,t,r){const i=Ir(e,t);let o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?i.spaceSeparated?o=Sn(r):i.commaSeparated?o=yn(r):i.commaOrSpaceSeparated?o=Sn(yn(r).join(" ")):o=cr(i,i.property,r):Array.isArray(r)?o=[...r]:o=i.property==="style"?bf(r):String(r);if(Array.isArray(o)){const l=[];for(const a of o)l.push(cr(i,i.property,a));o=l}i.property==="className"&&Array.isArray(n.className)&&(o=n.className.concat(o)),n[i.property]=o}}function Ht(e,n){if(n!=null)if(typeof n=="number"||typeof n=="string")e.push({type:"text",value:String(n)});else if(Array.isArray(n))for(const t of n)Ht(e,t);else if(typeof n=="object"&&"type"in n)n.type==="root"?Ht(e,n.children):e.push(n);else throw new Error("Expected node, nodes, or string, got `"+n+"`")}function cr(e,n,t){if(typeof t=="string"){if(e.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((e.boolean||e.overloadedBoolean)&&(t===""||We(t)===We(n)))return!0}return t}function bf(e){const n=[];for(const[t,r]of Object.entries(e))n.push([t,r].join(": "));return n.join("; ")}function wf(e){const n=new Map;for(const t of e)n.set(t.toLowerCase(),t);return n}const Sf=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Cf=Ii(Ar,"div"),Ef=Ii(st,"g",Sf),Lt={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function If(e,n){return Ai(e,{})||{type:"root",children:[]}}function Ai(e,n){const t=Af(e,n);return t&&n.afterTransform&&n.afterTransform(e,t),t}function Af(e,n){switch(e.nodeType){case 1:return zf(e,n);case 3:return Ff(e);case 8:return Pf(e);case 9:return fr(e,n);case 10:return Tf();case 11:return fr(e,n);default:return}}function fr(e,n){return{type:"root",children:Ti(e,n)}}function Tf(){return{type:"doctype"}}function Ff(e){return{type:"text",value:e.nodeValue||""}}function Pf(e){return{type:"comment",value:e.nodeValue||""}}function zf(e,n){const t=e.namespaceURI,r=t===Lt.svg?Ef:Cf,i=t===Lt.html?e.tagName.toLowerCase():e.tagName,o=t===Lt.html&&i==="template"?e.content:e,l=e.getAttributeNames(),a={};let u=-1;for(;++u<l.length;)a[l[u]]=e.getAttribute(l[u])||"";return r(i,a,Ti(o,n))}function Ti(e,n){const t=e.childNodes,r=[];let i=-1;for(;++i<t.length;){const o=Ai(t[i],n);o!==void 0&&r.push(o)}return r}new DOMParser;function Df(e,n){const t=Lf(e);return If(t)}function Lf(e){const n=document.createElement("template");return n.innerHTML=e,n.content}const hr=function(e,n,t){const r=Ke(t);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof n=="number"){if(n<0||n===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(n=e.children.indexOf(n),n<0)throw new Error("Expected child node or index");for(;++n<e.children.length;)if(r(e.children[n],n,e))return e.children[n]},Ie=function(e){if(e==null)return Of;if(typeof e=="string")return Mf(e);if(typeof e=="object")return vf(e);if(typeof e=="function")return cn(e);throw new Error("Expected function, string, or array as `test`")};function vf(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Ie(e[t]);return cn(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function Mf(e){return cn(n);function n(t){return t.tagName===e}}function cn(e){return n;function n(t,r,i){return!!(Rf(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Of(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function Rf(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const pr=/\n/g,mr=/[\t ]+/g,Ut=Ie("br"),gr=Ie(Uf),_f=Ie("p"),dr=Ie("tr"),Nf=Ie(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Hf,Vf]),Fi=Ie(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function Bf(e,n){const t=n||{},r="children"in e?e.children:[],i=Fi(e),o=Di(e,{whitespace:t.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...zi(e,{breakBefore:!0,breakAfter:!0}));let a=-1;for(;++a<r.length;)l.push(...Pi(r[a],e,{whitespace:o,breakBefore:a?void 0:i,breakAfter:a<r.length-1?Ut(r[a+1]):i}));const u=[];let s;for(a=-1;++a<l.length;){const f=l[a];typeof f=="number"?s!==void 0&&f>s&&(s=f):f&&(s!==void 0&&s>-1&&u.push(`
34
+ `.repeat(s)||" "),s=-1,u.push(f))}return u.join("")}function Pi(e,n,t){return e.type==="element"?jf(e,n,t):e.type==="text"?t.whitespace==="normal"?zi(e,t):$f(e):[]}function jf(e,n,t){const r=Di(e,t),i=e.children||[];let o=-1,l=[];if(Nf(e))return l;let a,u;for(Ut(e)||dr(e)&&hr(n,e,dr)?u=`
35
+ `:_f(e)?(a=2,u=2):Fi(e)&&(a=1,u=1);++o<i.length;)l=l.concat(Pi(i[o],e,{whitespace:r,breakBefore:o?void 0:a,breakAfter:o<i.length-1?Ut(i[o+1]):u}));return gr(e)&&hr(n,e,gr)&&l.push(" "),a&&l.unshift(a),u&&l.push(u),l}function zi(e,n){const t=String(e.value),r=[],i=[];let o=0;for(;o<=t.length;){pr.lastIndex=o;const u=pr.exec(t),s=u&&"index"in u?u.index:t.length;r.push(qf(t.slice(o,s).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?n.breakBefore:!0,s===t.length?n.breakAfter:!0)),o=s+1}let l=-1,a;for(;++l<r.length;)r[l].charCodeAt(r[l].length-1)===8203||l<r.length-1&&r[l+1].charCodeAt(0)===8203?(i.push(r[l]),a=void 0):r[l]?(typeof a=="number"&&i.push(a),i.push(r[l]),a=0):(l===0||l===r.length-1)&&i.push(0);return i}function $f(e){return[String(e.value)]}function qf(e,n,t){const r=[];let i=0,o;for(;i<e.length;){mr.lastIndex=i;const l=mr.exec(e);o=l?l.index:e.length,!i&&!o&&l&&!n&&r.push(""),i!==o&&r.push(e.slice(i,o)),i=l?o+l[0].length:o}return i!==o&&!t&&r.push(""),r.join(" ")}function Di(e,n){if(e.type==="element"){const t=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":n.whitespace;case"textarea":return"pre-wrap"}}return n.whitespace}function Hf(e){return!!(e.properties||{}).hidden}function Uf(e){return e.tagName==="td"||e.tagName==="th"}function Vf(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const Wf={},Yf=[];function eh(e){const n=e||Wf;return function(t,r){rn(t,"element",function(i,o){const l=Array.isArray(i.properties.className)?i.properties.className:Yf,a=l.includes("language-math"),u=l.includes("math-display"),s=l.includes("math-inline");let f=u;if(!a&&!u&&!s)return;let c=o[o.length-1],p=i;if(i.tagName==="code"&&a&&c&&c.type==="element"&&c.tagName==="pre"&&(p=c,c=o[o.length-2],f=!0),!c)return;const h=Bf(p,{whitespace:"pre"});let d;try{d=dn.renderToString(h,{...n,displayMode:f,throwOnError:!0})}catch(C){const x=C,k=x.name.toLowerCase();r.message("Could not render math with KaTeX",{ancestors:[...o,i],cause:x,place:i.position,ruleId:k,source:"rehype-katex"});try{d=dn.renderToString(h,{...n,displayMode:f,strict:"ignore",throwOnError:!1})}catch{d=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(n.errorColor||"#cc0000"),title:String(C)},children:[{type:"text",value:h}]}]}}typeof d=="string"&&(d=Df(d).children);const y=c.children.indexOf(p);return c.children.splice(y,1,...d),Zr})}}export{Kf as M,Zf as a,eh as b,Jf as r};