@rynx-ai/server 0.1.0 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-surface-control-queue.d.ts +42 -0
- package/dist/browser-surface-control-queue.js +187 -0
- package/dist/browser-surface-ws.d.ts +14 -0
- package/dist/browser-surface-ws.js +355 -0
- package/dist/control-api.d.ts +59 -4
- package/dist/control-api.js +2213 -132
- package/dist/control-web/assets/highlighted-body-OFNGDK62-e-w61YLy.js +1 -0
- package/dist/control-web/assets/index-BQ7XVBKO.css +32 -0
- package/dist/control-web/assets/index-ClpzuBJx.js +606 -0
- package/dist/control-web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/control-web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/control-web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/control-web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/control-web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/control-web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/control-web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/control-web/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/control-web/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/control-web/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/control-web/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/control-web/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/control-web/assets/mermaid-GHXKKRXX-DZn7Hbr2.js +131 -0
- package/dist/control-web/assets/rynx-wordmark-LL1QRYHD.png +0 -0
- package/dist/control-web/favicon.png +0 -0
- package/dist/control-web/favicon.svg +38 -0
- package/dist/control-web/index.html +16 -0
- package/dist/control-web-dist.d.ts +1 -1
- package/dist/control-web-dist.js +19 -14
- package/dist/desktop-browser-host.d.ts +153 -0
- package/dist/desktop-browser-host.js +936 -0
- package/dist/direct-runtime-browser-surface-server.d.ts +74 -0
- package/dist/direct-runtime-browser-surface-server.js +821 -0
- package/dist/direct-runtime-server.d.ts +137 -0
- package/dist/direct-runtime-server.js +1931 -0
- package/dist/emulator-surface-ws.d.ts +6 -0
- package/dist/emulator-surface-ws.js +197 -0
- package/dist/machine-session-service.d.ts +182 -0
- package/dist/machine-session-service.js +559 -0
- package/dist/provider-cli-host.d.ts +10 -0
- package/dist/provider-cli-host.js +1 -0
- package/dist/remote-runtime-dispatcher.d.ts +94 -0
- package/dist/remote-runtime-dispatcher.js +380 -0
- package/dist/remote-runtime-session-projection.d.ts +19 -0
- package/dist/remote-runtime-session-projection.js +556 -0
- package/dist/remote-runtime.d.ts +22 -0
- package/dist/remote-runtime.js +32 -0
- package/dist/runtime-web-auth.d.ts +21 -0
- package/dist/runtime-web-auth.js +92 -0
- package/dist/server.d.ts +292 -10
- package/dist/server.js +314 -98
- package/dist/session-browser-service.d.ts +218 -0
- package/dist/session-browser-service.js +686 -0
- package/dist/session-browser-surface-coordinator.d.ts +23 -0
- package/dist/session-browser-surface-coordinator.js +563 -0
- package/dist/session-emulator-service.d.ts +167 -0
- package/dist/session-emulator-service.js +464 -0
- package/dist/session-runtime-index.d.ts +17 -0
- package/dist/session-runtime-index.js +86 -0
- package/dist/session-terminal-host.d.ts +46 -0
- package/dist/session-terminal-host.js +252 -0
- package/dist/terminal-ws.d.ts +9 -20
- package/dist/terminal-ws.js +420 -97
- package/package.json +9 -7
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-e-w61YLy.js","assets/index-ClpzuBJx.js","assets/index-BQ7XVBKO.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var ac=Object.defineProperty;var uc=(e,t,n)=>t in e?ac(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ae=(e,t,n)=>uc(e,typeof t!="symbol"?t+"":t,n);import{g as Qu,r as I,j as T,_ as Ku,t as Xu,c as Zu,a as Ju}from"./index-ClpzuBJx.js";const hr=(function(e){if(e==null)return cc;if(typeof e=="function")return fr(e);if(typeof e=="object")return Array.isArray(e)?sc(e):lc(e);if(typeof e=="string")return oc(e);throw new Error("Expected function, string, or object as test")});function sc(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=hr(e[n]);return fr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function lc(e){const t=e;return fr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function oc(e){return fr(t);function t(n){return n&&n.type===e}}function fr(e){return t;function t(n,r,i){return!!(dc(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function cc(){return!0}function dc(e){return e!==null&&typeof e=="object"&&"type"in e}const es=[],cn=!0,Kr=!1,jt="skip";function _i(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=hr(i),u=r?-1:1;s(e,void 0,[])();function s(l,c,d){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const f=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=es,g,A,C;if((!t||a(l,c,d[d.length-1]||void 0))&&(f=hc(n(l,d)),f[0]===Kr))return f;if("children"in l&&l.children){const x=l;if(x.children&&f[0]!==jt)for(A=(r?x.children.length:-1)+u,C=d.concat(x);A>-1&&A<x.children.length;){const R=x.children[A];if(g=s(R,A,C)(),g[0]===Kr)return g;A=typeof g[1]=="number"?g[1]:A+u}}return f}}}function hc(e){return Array.isArray(e)?e:typeof e=="number"?[cn,e]:e==null?es:[e]}function Je(e,t,n,r){let i,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,i=n):(a=t,u=n,i=r),_i(e,a,s,i);function s(l,c){const d=c[c.length-1],h=d?d.children.indexOf(l):void 0;return u(l,h,d)}}const $t={indicator:"indicator",textOnly:"text-only",remove:"remove"};function fc({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:u="text-gray-500",linkBlockPolicy:s=$t.indicator,imageBlockPolicy:l=$t.indicator}){const c=t.length&&!t.every(h=>h==="*"),d=n.length&&!n.every(h=>h==="*");if(!e&&(c||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return h=>{const p=Tc(e,t,n,r,i,a,u,s,l);ts(h),Je(h,p)}}function da(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function pc(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const mc=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),gc=new Set(["javascript:","data:","file:","vbscript:"]);function ha(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const d=e.substring(5);if(d&&d.length>0&&d!=="invalid")return e}}catch{return null}return null}const u=da(e,n);if(!u||gc.has(u.protocol)||!(mc.has(u.protocol)||a.includes(u.protocol)||a.includes("*")))return null;if(u.protocol==="mailto:"||!u.protocol.match(/^https?:$/))return u.href;const l=pc(e);return u&&t.some(c=>{const d=da(c,n);return!d||d.origin!==u.origin?!1:u.href.startsWith(d.href)})?l?u.pathname+u.search+u.hash:u.href:t.includes("*")?u.protocol!=="https:"&&u.protocol!=="http:"?null:l?u.pathname+u.search+u.hash:u.href:null}function ts(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)ts(t)}}const Sr=Symbol("node-seen");function bc(e,t,n){return t===$t.remove?{type:"remove"}:t===$t.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Ec(e,t,n){if(t===$t.remove)return{type:"remove"};if(t===$t.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const Tc=(e,t,n,r,i,a,u,s,l)=>{const c=(d,h,p)=>{if(d.type!=="element"||d[Sr])return cn;if(d.tagName==="a"){const f=ha(d.properties.href,t,e,!1,!1,i);if(f===null){if(d[Sr]=!0,Je(d,c),p&&typeof h=="number"){const g=bc(d,s,u);if(g.type==="remove")return p.children.splice(h,1),[jt,h];p.children[h]=g.element}return jt}else return d.properties.href=f,d.properties.target="_blank",d.properties.rel="noopener noreferrer",cn}if(d.tagName==="img"){const f=ha(d.properties.src,n,e,r,!0,i);if(f===null){if(d[Sr]=!0,Je(d,c),p&&typeof h=="number"){const g=Ec(d,l,a);if(g.type==="remove")return p.children.splice(h,1),[jt,h];p.children[h]=g.element}return jt}else return d.properties.src=f,cn}return cn};return c},ns=-1,pr=0,pn=1,tr=2,Ai=3,Ci=4,yi=5,Ii=6,rs=7,is=8,xc=typeof self=="object"?self:globalThis,fa=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new xc[e](t)},kc=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,u]=t[i];switch(a){case pr:case ns:return n(u,i);case pn:{const s=n([],i);for(const l of u)s.push(r(l));return s}case tr:{const s=n({},i);for(const[l,c]of u)s[r(l)]=r(c);return s}case Ai:return n(new Date(u),i);case Ci:{const{source:s,flags:l}=u;return n(new RegExp(s,l),i)}case yi:{const s=n(new Map,i);for(const[l,c]of u)s.set(r(l),r(c));return s}case Ii:{const s=n(new Set,i);for(const l of u)s.add(r(l));return s}case rs:{const{name:s,message:l}=u;return n(fa(s,l),i)}case is:return n(BigInt(u),i);case"BigInt":return n(Object(BigInt(u)),i);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:s}=new Uint8Array(u);return n(new DataView(s),u)}}return n(fa(a,u),i)};return r},pa=e=>kc(new Map,e)(0),_t="",{toString:_c}={},{keys:Ac}=Object,tn=e=>{const t=typeof e;if(t!=="object"||!e)return[pr,t];const n=_c.call(e).slice(8,-1);switch(n){case"Array":return[pn,_t];case"Object":return[tr,_t];case"Date":return[Ai,_t];case"RegExp":return[Ci,_t];case"Map":return[yi,_t];case"Set":return[Ii,_t];case"DataView":return[pn,n]}return n.includes("Array")?[pn,n]:n.includes("Error")?[rs,n]:[tr,n]},jn=([e,t])=>e===pr&&(t==="function"||t==="symbol"),Cc=(e,t,n,r)=>{const i=(u,s)=>{const l=r.push(u)-1;return n.set(s,l),l},a=u=>{if(n.has(u))return n.get(u);let[s,l]=tn(u);switch(s){case pr:{let d=u;switch(l){case"bigint":s=is,d=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return i([ns],u)}return i([s,d],u)}case pn:{if(l){let p=u;return l==="DataView"?p=new Uint8Array(u.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(u)),i([l,[...p]],u)}const d=[],h=i([s,d],u);for(const p of u)d.push(a(p));return h}case tr:{if(l)switch(l){case"BigInt":return i([l,u.toString()],u);case"Boolean":case"Number":case"String":return i([l,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const d=[],h=i([s,d],u);for(const p of Ac(u))(e||!jn(tn(u[p])))&&d.push([a(p),a(u[p])]);return h}case Ai:return i([s,isNaN(u.getTime())?_t:u.toISOString()],u);case Ci:{const{source:d,flags:h}=u;return i([s,{source:d,flags:h}],u)}case yi:{const d=[],h=i([s,d],u);for(const[p,f]of u)(e||!(jn(tn(p))||jn(tn(f))))&&d.push([a(p),a(f)]);return h}case Ii:{const d=[],h=i([s,d],u);for(const p of u)(e||!jn(tn(p)))&&d.push(a(p));return h}}const{message:c}=u;return i([s,{name:l,message:c}],u)};return a},ma=(e,{json:t,lossy:n}={})=>{const r=[];return Cc(!(t||n),!!t,new Map,r)(e),r},wt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pa(ma(e,t)):structuredClone(e):(e,t)=>pa(ma(e,t));class wn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}wn.prototype.normal={};wn.prototype.property={};wn.prototype.space=void 0;function as(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new wn(n,r,t)}function An(e){return e.toLowerCase()}class Pe{constructor(t,n){this.attribute=n,this.property=t}}Pe.prototype.attribute="";Pe.prototype.booleanish=!1;Pe.prototype.boolean=!1;Pe.prototype.commaOrSpaceSeparated=!1;Pe.prototype.commaSeparated=!1;Pe.prototype.defined=!1;Pe.prototype.mustUseProperty=!1;Pe.prototype.number=!1;Pe.prototype.overloadedBoolean=!1;Pe.prototype.property="";Pe.prototype.spaceSeparated=!1;Pe.prototype.space=void 0;let yc=0;const G=Ot(),me=Ot(),Xr=Ot(),M=Ot(),le=Ot(),It=Ot(),Be=Ot();function Ot(){return 2**++yc}const Zr=Object.freeze(Object.defineProperty({__proto__:null,boolean:G,booleanish:me,commaOrSpaceSeparated:Be,commaSeparated:It,number:M,overloadedBoolean:Xr,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),wr=Object.keys(Zr);class Ni extends Pe{constructor(t,n,r,i){let a=-1;if(super(t,n),ga(this,"space",i),typeof r=="number")for(;++a<wr.length;){const u=wr[a];ga(this,wr[a],(r&Zr[u])===Zr[u])}}}Ni.prototype.defined=!0;function ga(e,t,n){n&&(e[t]=n)}function Vt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Ni(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[An(r)]=r,n[An(a.attribute)]=r}return new wn(t,n,e.space)}const us=Vt({properties:{ariaActiveDescendant:null,ariaAtomic:me,ariaAutoComplete:null,ariaBusy:me,ariaChecked:me,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:me,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:me,ariaFlowTo:le,ariaGrabbed:me,ariaHasPopup:null,ariaHidden:me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:M,ariaLive:null,ariaModal:me,ariaMultiLine:me,ariaMultiSelectable:me,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:me,ariaReadOnly:me,ariaRelevant:null,ariaRequired:me,ariaRoleDescription:le,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:me,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ss(e,t){return t in e?e[t]:t}function ls(e,t){return ss(e,t.toLowerCase())}const Ic=Vt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:It,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:G,allowPaymentRequest:G,allowUserMedia:G,alpha:G,alt:null,as:null,async:G,autoCapitalize:null,autoComplete:le,autoFocus:G,autoPlay:G,blocking:le,capture:null,charSet:null,checked:G,cite:null,className:le,closedBy:null,colorSpace:null,cols:M,colSpan:M,command:null,commandFor:null,content:null,contentEditable:me,controls:G,controlsList:le,coords:M|It,crossOrigin:null,data:null,dateTime:null,decoding:null,default:G,defer:G,dir:null,dirName:null,disabled:G,download:Xr,draggable:me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:G,formTarget:null,headers:le,height:M,hidden:Xr,high:M,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:G,inputMode:null,integrity:null,is:null,isMap:G,itemId:null,itemProp:le,itemRef:le,itemScope:G,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:G,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:G,muted:G,name:null,nonce:null,noModule:G,noValidate:G,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:G,optimum:M,pattern:null,ping:le,placeholder:null,playsInline:G,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:G,referrerPolicy:null,rel:le,required:G,reversed:G,rows:M,rowSpan:M,sandbox:le,scope:null,scoped:G,seamless:G,selected:G,shadowRootClonable:G,shadowRootCustomElementRegistry:G,shadowRootDelegatesFocus:G,shadowRootMode:null,shadowRootSerializable:G,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:G,useMap:null,value:me,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:G,declare:G,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:G,noHref:G,noShade:G,noWrap:G,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:me,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:G,disablePictureInPicture:G,disableRemotePlayback:G,exportParts:It,part:le,prefix:null,property:null,results:M,security:null,unselectable:null},space:"html",transform:ls}),Nc=Vt({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",maskType:"mask-type",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:Be,accentHeight:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,className:le,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:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:G,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,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:It,g2:It,glyphName:It,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:Be,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:M,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:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Be,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Be,rev:Be,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Be,requiredFeatures:Be,requiredFonts:Be,requiredFormats:Be,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:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:Be,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Be,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Be,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ss}),os=Vt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),cs=Vt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ls}),ds=Vt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Sc={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"},wc=/[A-Z]/g,ba=/-[a-z]/g,Lc=/^data[-\w.:]+$/i;function mr(e,t){const n=An(t);let r=t,i=Pe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Lc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ba,Oc);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ba.test(a)){let u=a.replace(wc,Rc);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}i=Ni}return new i(r,t)}function Rc(e){return"-"+e.toLowerCase()}function Oc(e){return e.charAt(1).toUpperCase()}const Ln=as([us,Ic,os,cs,ds],"html"),mt=as([us,Nc,os,cs,ds],"svg");function Ea(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(i,r).trim();(u||!a)&&t.push(u),i=r+1,r=n.indexOf(",",i)}return t}function hs(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ta=/[#.]/g;function Dc(e,t){const n=e||"",r={};let i=0,a,u;for(;i<n.length;){Ta.lastIndex=i;const s=Ta.exec(n),l=n.slice(i,s?s.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:u=l,i+=l.length),s&&(a=s[0],i++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function xa(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function fs(e){return e.join(" ").trim()}function ps(e,t,n){const r=n?Bc(n):void 0;function i(a,u,...s){let l;if(a==null){l={type:"root",children:[]};const c=u;s.unshift(c)}else{l=Dc(a,t);const c=l.tagName.toLowerCase(),d=r?r.get(c):void 0;if(l.tagName=d||c,Pc(u))s.unshift(u);else for(const[h,p]of Object.entries(u))Mc(e,l.properties,h,p)}for(const c of s)Jr(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function Pc(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Mc(e,t,n,r){const i=mr(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=xa(r):i.commaSeparated?a=Ea(r):i.commaOrSpaceSeparated?a=xa(Ea(r).join(" ")):a=ka(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?vc(r):String(r);if(Array.isArray(a)){const u=[];for(const s of a)u.push(ka(i,i.property,s));a=u}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Jr(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Jr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Jr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ka(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||An(n)===An(t)))return!0}return n}function vc(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Bc(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Fc=["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"],Hc=ps(Ln,"div"),Uc=ps(mt,"g",Fc);function jc(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let s=n[u];if(s===void 0){const l=_a(t,n[u-1]);s=l===-1?t.length+1:l+1,n[u]=s}if(s>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const s=n[n.length-1],l=_a(t,s),c=l===-1?t.length+1:l+1;if(s===c)break;n.push(c)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function _a(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
3
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const yt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},ms={}.hasOwnProperty,zc=Object.prototype;function $c(e,t){const n=t||{};return Si({file:n.file||void 0,location:!1,schema:n.space==="svg"?mt:Ln,verbose:n.verbose||!1},e)}function Si(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Kn(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:gs(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),u=jc(a),s=u.toPoint(0),l=u.toPoint(a.length);n.position={start:s,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Kn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Kn(e,r,n),n}default:return n=Yc(e,t),n}}function gs(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Si(e,t[n]);r.push(i)}return r}function Yc(e,t){const n=e.schema;e.schema=t.namespaceURI===yt.svg?mt:Ln;let r=-1;const i={};for(;++r<t.attrs.length;){const s=t.attrs[r],l=(s.prefix?s.prefix+":":"")+s.name;ms.call(zc,l)||(i[l]=s.value)}const u=(e.schema.space==="svg"?Uc:Hc)(t.tagName,i,gs(e,t.childNodes));if(Kn(e,t,u),u.tagName==="template"){const s=t,l=s.sourceCodeLocation,c=l&&l.startTag&&zt(l.startTag),d=l&&l.endTag&&zt(l.endTag),h=Si(e,s.content);c&&d&&e.file&&(h.position={start:c.end,end:d.start}),u.content=h}return e.schema=n,u}function Kn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=qc(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function qc(e,t,n){const r=zt(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)ms.call(n.attrs,u)&&(a[mr(e.schema,u).property]=zt(n.attrs[u]));n.startTag;const s=zt(n.startTag),l=n.endTag?zt(n.endTag):void 0,c={opening:s};l&&(c.closing=l),c.properties=a,t.data={position:c}}}return r}function zt(e){const t=Aa({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Aa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Aa(e){return e.line&&e.column?e:void 0}const Ca={}.hasOwnProperty;function bs(e,t){const n=t||{};function r(i,...a){let u=r.invalid;const s=r.handlers;if(i&&Ca.call(i,e)){const l=String(i[e]);u=Ca.call(s,l)?s[l]:r.unknown}if(u)return u.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Vc={},Wc={}.hasOwnProperty,Es=bs("type",{handlers:{root:Qc,element:ed,text:Zc,comment:Jc,doctype:Xc}});function Gc(e,t){const r=(t||Vc).space;return Es(e,r==="svg"?mt:Ln)}function Qc(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=wi(e.children,n,t),Wt(e,n),n}function Kc(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=wi(e.children,n,t),Wt(e,n),n}function Xc(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Wt(e,t),t}function Zc(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Wt(e,t),t}function Jc(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Wt(e,t),t}function ed(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=mt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Wc.call(e.properties,a)){const l=td(r,a,e.properties[a]);l&&i.push(l)}}const u=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:yt[u],childNodes:[],parentNode:null};return s.childNodes=wi(e.children,s,r),Wt(e,s),e.tagName==="template"&&e.content&&(s.content=Kc(e.content,r)),s}function td(e,t,n){const r=mr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?hs(n):fs(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=yt[r.space]}return i}function wi(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=Es(e[r],n);a.parentNode=t,i.push(a)}return i}function Wt(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const nd=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],rd=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),de="�";var m;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(m||(m={}));const Oe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ts(e){return e>=55296&&e<=57343}function id(e){return e>=56320&&e<=57343}function ad(e,t){return(e-55296)*1024+9216+t}function xs(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ks(e){return e>=64976&&e<=65007||rd.has(e)}var w;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(w||(w={}));const ud=65536;class sd{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=ud,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,u=i+n,s=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:s,endOffset:s}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(id(n))return this.pos++,this._addGap(),ad(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,m.EOF;return this._err(w.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;const r=this.html.charCodeAt(n);return r===m.CARRIAGE_RETURN?m.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;let t=this.html.charCodeAt(this.pos);return t===m.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,m.LINE_FEED):t===m.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ts(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===m.LINE_FEED||t===m.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){xs(t)?this._err(w.controlCharacterInInputStream):ks(t)&&this._err(w.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var X;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(X||(X={}));function _s(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const ld=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),od=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function cd(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=od.get(e))!==null&&t!==void 0?t:e}var Te;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Te||(Te={}));const dd=32;var ht;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ht||(ht={}));function ei(e){return e>=Te.ZERO&&e<=Te.NINE}function hd(e){return e>=Te.UPPER_A&&e<=Te.UPPER_F||e>=Te.LOWER_A&&e<=Te.LOWER_F}function fd(e){return e>=Te.UPPER_A&&e<=Te.UPPER_Z||e>=Te.LOWER_A&&e<=Te.LOWER_Z||ei(e)}function pd(e){return e===Te.EQUALS||fd(e)}var Ee;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ee||(Ee={}));var ut;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ut||(ut={}));class md{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ee.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ut.Strict}startEntity(t){this.decodeMode=t,this.state=Ee.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ee.EntityStart:return t.charCodeAt(n)===Te.NUM?(this.state=Ee.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ee.NamedEntity,this.stateNamedEntity(t,n));case Ee.NumericStart:return this.stateNumericStart(t,n);case Ee.NumericDecimal:return this.stateNumericDecimal(t,n);case Ee.NumericHex:return this.stateNumericHex(t,n);case Ee.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|dd)===Te.LOWER_X?(this.state=Ee.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ee.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ei(i)||hd(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ei(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Te.SEMI)this.consumed+=1;else if(this.decodeMode===ut.Strict)return 0;return this.emitCodePoint(cd(this.result),this.consumed),this.errors&&(t!==Te.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&ht.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=gd(r,i,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ut.Attribute&&(a===0||pd(u))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&ht.VALUE_LENGTH)>>14,a!==0){if(u===Te.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ut.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&ht.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~ht.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Ee.NamedEntity:return this.result!==0&&(this.decodeMode!==ut.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ee.NumericDecimal:return this.emitNumericEntity(0,2);case Ee.NumericHex:return this.emitNumericEntity(0,3);case Ee.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ee.EntityStart:return 0}}}function gd(e,t,n,r){const i=(t&ht.BRANCH_LENGTH)>>7,a=t&ht.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const l=r-a;return l<0||l>=i?-1:e[n+l]-1}let u=n,s=u+i-1;for(;u<=s;){const l=u+s>>>1,c=e[l];if(c<r)u=l+1;else if(c>r)s=l-1;else return e[l+i]}return-1}var D;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(D||(D={}));var Nt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Nt||(Nt={}));var je;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(je||(je={}));var y;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(y||(y={}));var o;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(o||(o={}));const bd=new Map([[y.A,o.A],[y.ADDRESS,o.ADDRESS],[y.ANNOTATION_XML,o.ANNOTATION_XML],[y.APPLET,o.APPLET],[y.AREA,o.AREA],[y.ARTICLE,o.ARTICLE],[y.ASIDE,o.ASIDE],[y.B,o.B],[y.BASE,o.BASE],[y.BASEFONT,o.BASEFONT],[y.BGSOUND,o.BGSOUND],[y.BIG,o.BIG],[y.BLOCKQUOTE,o.BLOCKQUOTE],[y.BODY,o.BODY],[y.BR,o.BR],[y.BUTTON,o.BUTTON],[y.CAPTION,o.CAPTION],[y.CENTER,o.CENTER],[y.CODE,o.CODE],[y.COL,o.COL],[y.COLGROUP,o.COLGROUP],[y.DD,o.DD],[y.DESC,o.DESC],[y.DETAILS,o.DETAILS],[y.DIALOG,o.DIALOG],[y.DIR,o.DIR],[y.DIV,o.DIV],[y.DL,o.DL],[y.DT,o.DT],[y.EM,o.EM],[y.EMBED,o.EMBED],[y.FIELDSET,o.FIELDSET],[y.FIGCAPTION,o.FIGCAPTION],[y.FIGURE,o.FIGURE],[y.FONT,o.FONT],[y.FOOTER,o.FOOTER],[y.FOREIGN_OBJECT,o.FOREIGN_OBJECT],[y.FORM,o.FORM],[y.FRAME,o.FRAME],[y.FRAMESET,o.FRAMESET],[y.H1,o.H1],[y.H2,o.H2],[y.H3,o.H3],[y.H4,o.H4],[y.H5,o.H5],[y.H6,o.H6],[y.HEAD,o.HEAD],[y.HEADER,o.HEADER],[y.HGROUP,o.HGROUP],[y.HR,o.HR],[y.HTML,o.HTML],[y.I,o.I],[y.IMG,o.IMG],[y.IMAGE,o.IMAGE],[y.INPUT,o.INPUT],[y.IFRAME,o.IFRAME],[y.KEYGEN,o.KEYGEN],[y.LABEL,o.LABEL],[y.LI,o.LI],[y.LINK,o.LINK],[y.LISTING,o.LISTING],[y.MAIN,o.MAIN],[y.MALIGNMARK,o.MALIGNMARK],[y.MARQUEE,o.MARQUEE],[y.MATH,o.MATH],[y.MENU,o.MENU],[y.META,o.META],[y.MGLYPH,o.MGLYPH],[y.MI,o.MI],[y.MO,o.MO],[y.MN,o.MN],[y.MS,o.MS],[y.MTEXT,o.MTEXT],[y.NAV,o.NAV],[y.NOBR,o.NOBR],[y.NOFRAMES,o.NOFRAMES],[y.NOEMBED,o.NOEMBED],[y.NOSCRIPT,o.NOSCRIPT],[y.OBJECT,o.OBJECT],[y.OL,o.OL],[y.OPTGROUP,o.OPTGROUP],[y.OPTION,o.OPTION],[y.P,o.P],[y.PARAM,o.PARAM],[y.PLAINTEXT,o.PLAINTEXT],[y.PRE,o.PRE],[y.RB,o.RB],[y.RP,o.RP],[y.RT,o.RT],[y.RTC,o.RTC],[y.RUBY,o.RUBY],[y.S,o.S],[y.SCRIPT,o.SCRIPT],[y.SEARCH,o.SEARCH],[y.SECTION,o.SECTION],[y.SELECT,o.SELECT],[y.SOURCE,o.SOURCE],[y.SMALL,o.SMALL],[y.SPAN,o.SPAN],[y.STRIKE,o.STRIKE],[y.STRONG,o.STRONG],[y.STYLE,o.STYLE],[y.SUB,o.SUB],[y.SUMMARY,o.SUMMARY],[y.SUP,o.SUP],[y.TABLE,o.TABLE],[y.TBODY,o.TBODY],[y.TEMPLATE,o.TEMPLATE],[y.TEXTAREA,o.TEXTAREA],[y.TFOOT,o.TFOOT],[y.TD,o.TD],[y.TH,o.TH],[y.THEAD,o.THEAD],[y.TITLE,o.TITLE],[y.TR,o.TR],[y.TRACK,o.TRACK],[y.TT,o.TT],[y.U,o.U],[y.UL,o.UL],[y.SVG,o.SVG],[y.VAR,o.VAR],[y.WBR,o.WBR],[y.XMP,o.XMP]]);function Gt(e){var t;return(t=bd.get(e))!==null&&t!==void 0?t:o.UNKNOWN}const P=o,Ed={[D.HTML]:new Set([P.ADDRESS,P.APPLET,P.AREA,P.ARTICLE,P.ASIDE,P.BASE,P.BASEFONT,P.BGSOUND,P.BLOCKQUOTE,P.BODY,P.BR,P.BUTTON,P.CAPTION,P.CENTER,P.COL,P.COLGROUP,P.DD,P.DETAILS,P.DIR,P.DIV,P.DL,P.DT,P.EMBED,P.FIELDSET,P.FIGCAPTION,P.FIGURE,P.FOOTER,P.FORM,P.FRAME,P.FRAMESET,P.H1,P.H2,P.H3,P.H4,P.H5,P.H6,P.HEAD,P.HEADER,P.HGROUP,P.HR,P.HTML,P.IFRAME,P.IMG,P.INPUT,P.LI,P.LINK,P.LISTING,P.MAIN,P.MARQUEE,P.MENU,P.META,P.NAV,P.NOEMBED,P.NOFRAMES,P.NOSCRIPT,P.OBJECT,P.OL,P.P,P.PARAM,P.PLAINTEXT,P.PRE,P.SCRIPT,P.SECTION,P.SELECT,P.SOURCE,P.STYLE,P.SUMMARY,P.TABLE,P.TBODY,P.TD,P.TEMPLATE,P.TEXTAREA,P.TFOOT,P.TH,P.THEAD,P.TITLE,P.TR,P.TRACK,P.UL,P.WBR,P.XMP]),[D.MATHML]:new Set([P.MI,P.MO,P.MN,P.MS,P.MTEXT,P.ANNOTATION_XML]),[D.SVG]:new Set([P.TITLE,P.FOREIGN_OBJECT,P.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},ti=new Set([P.H1,P.H2,P.H3,P.H4,P.H5,P.H6]);y.STYLE,y.SCRIPT,y.XMP,y.IFRAME,y.NOEMBED,y.NOFRAMES,y.PLAINTEXT;var b;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(b||(b={}));const fe={DATA:b.DATA,RCDATA:b.RCDATA,RAWTEXT:b.RAWTEXT,SCRIPT_DATA:b.SCRIPT_DATA,PLAINTEXT:b.PLAINTEXT,CDATA_SECTION:b.CDATA_SECTION};function Td(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function dn(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function xd(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function ot(e){return xd(e)||dn(e)}function ya(e){return ot(e)||Td(e)}function zn(e){return e+32}function As(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function Ia(e){return As(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function kd(e){return e===m.NULL?w.nullCharacterReference:e>1114111?w.characterReferenceOutsideUnicodeRange:Ts(e)?w.surrogateCharacterReference:ks(e)?w.noncharacterCharacterReference:xs(e)||e===m.CARRIAGE_RETURN?w.controlCharacterReference:null}class _d{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=b.DATA,this.returnState=b.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new sd(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new md(ld,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(w.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(w.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=kd(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:X.START_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:X.END_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:X.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:X.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(_s(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(w.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Gt(t.tagName),t.type===X.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(w.endTagWithAttributes),t.selfClosing&&this._err(w.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case X.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case X.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case X.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:X.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=As(t)?X.WHITESPACE_CHARACTER:t===m.NULL?X.NULL_CHARACTER:X.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(X.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=b.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ut.Attribute:ut.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===b.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case b.DATA:{this._stateData(t);break}case b.RCDATA:{this._stateRcdata(t);break}case b.RAWTEXT:{this._stateRawtext(t);break}case b.SCRIPT_DATA:{this._stateScriptData(t);break}case b.PLAINTEXT:{this._statePlaintext(t);break}case b.TAG_OPEN:{this._stateTagOpen(t);break}case b.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case b.TAG_NAME:{this._stateTagName(t);break}case b.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case b.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case b.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case b.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case b.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case b.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case b.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case b.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case b.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case b.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case b.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case b.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case b.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case b.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case b.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case b.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case b.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case b.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case b.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case b.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case b.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case b.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case b.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case b.BOGUS_COMMENT:{this._stateBogusComment(t);break}case b.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case b.COMMENT_START:{this._stateCommentStart(t);break}case b.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case b.COMMENT:{this._stateComment(t);break}case b.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case b.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case b.COMMENT_END:{this._stateCommentEnd(t);break}case b.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case b.DOCTYPE:{this._stateDoctype(t);break}case b.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case b.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case b.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case b.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case b.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case b.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case b.CDATA_SECTION:{this._stateCdataSection(t);break}case b.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case b.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case b.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case b.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=b.TAG_OPEN;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(w.unexpectedNullCharacter),this._emitCodePoint(t);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case m.AMPERSAND:{this._startCharacterReference();break}case m.LESS_THAN_SIGN:{this.state=b.RCDATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(w.unexpectedNullCharacter),this._emitChars(de);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case m.LESS_THAN_SIGN:{this.state=b.RAWTEXT_LESS_THAN_SIGN;break}case m.NULL:{this._err(w.unexpectedNullCharacter),this._emitChars(de);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(w.unexpectedNullCharacter),this._emitChars(de);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case m.NULL:{this._err(w.unexpectedNullCharacter),this._emitChars(de);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ot(t))this._createStartTagToken(),this.state=b.TAG_NAME,this._stateTagName(t);else switch(t){case m.EXCLAMATION_MARK:{this.state=b.MARKUP_DECLARATION_OPEN;break}case m.SOLIDUS:{this.state=b.END_TAG_OPEN;break}case m.QUESTION_MARK:{this._err(w.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t);break}case m.EOF:{this._err(w.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(w.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=b.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ot(t))this._createEndTagToken(),this.state=b.TAG_NAME,this._stateTagName(t);else switch(t){case m.GREATER_THAN_SIGN:{this._err(w.missingEndTagName),this.state=b.DATA;break}case m.EOF:{this._err(w.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(w.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(w.unexpectedNullCharacter),n.tagName+=de;break}case m.EOF:{this._err(w.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(dn(t)?zn(t):t)}}_stateRcdataLessThanSign(t){t===m.SOLIDUS?this.state=b.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ot(t)?(this.state=b.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=b.BEFORE_ATTRIBUTE_NAME,!1;case m.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=b.SELF_CLOSING_START_TAG,!1;case m.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=b.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===m.SOLIDUS?this.state=b.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ot(t)?(this.state=b.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case m.SOLIDUS:{this.state=b.SCRIPT_DATA_END_TAG_OPEN;break}case m.EXCLAMATION_MARK:{this.state=b.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=b.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ot(t)?(this.state=b.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===m.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===m.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(w.unexpectedNullCharacter),this._emitChars(de);break}case m.EOF:{this._err(w.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(w.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(de);break}case m.EOF:{this._err(w.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(w.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(de);break}case m.EOF:{this._err(w.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===m.SOLIDUS?this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ot(t)?(this._emitChars("<"),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ot(t)?(this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Oe.SCRIPT,!1)&&Ia(this.preprocessor.peek(Oe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Oe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(w.unexpectedNullCharacter),this._emitChars(de);break}case m.EOF:{this._err(w.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(w.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(de);break}case m.EOF:{this._err(w.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(w.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(de);break}case m.EOF:{this._err(w.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===m.SOLIDUS?(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Oe.SCRIPT,!1)&&Ia(this.preprocessor.peek(Oe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Oe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._err(w.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=b.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this._leaveAttrName(),this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._leaveAttrName(),this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:{this._err(w.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case m.NULL:{this._err(w.unexpectedNullCharacter),this.currentAttr.name+=de;break}default:this.currentAttr.name+=String.fromCodePoint(dn(t)?zn(t):t)}}_stateAfterAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case m.EQUALS_SIGN:{this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(w.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{this.state=b.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this.state=b.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(w.missingAttributeValue),this.state=b.DATA,this.emitCurrentTagToken();break}default:this.state=b.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case m.QUOTATION_MARK:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(w.unexpectedNullCharacter),this.currentAttr.value+=de;break}case m.EOF:{this._err(w.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case m.APOSTROPHE:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(w.unexpectedNullCharacter),this.currentAttr.value+=de;break}case m.EOF:{this._err(w.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(w.unexpectedNullCharacter),this.currentAttr.value+=de;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:case m.EQUALS_SIGN:case m.GRAVE_ACCENT:{this._err(w.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case m.EOF:{this._err(w.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this._leaveAttrValue(),this.state=b.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(w.eofInTag),this._emitEOFToken();break}default:this._err(w.missingWhitespaceBetweenAttributes),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case m.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=b.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(w.eofInTag),this._emitEOFToken();break}default:this._err(w.unexpectedSolidusInTag),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case m.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case m.NULL:{this._err(w.unexpectedNullCharacter),n.data+=de;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Oe.DASH_DASH,!0)?(this._createCommentToken(Oe.DASH_DASH.length+1),this.state=b.COMMENT_START):this._consumeSequenceIfMatch(Oe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Oe.DOCTYPE.length+1),this.state=b.DOCTYPE):this._consumeSequenceIfMatch(Oe.CDATA_START,!0)?this.inForeignNode?this.state=b.CDATA_SECTION:(this._err(w.cdataInHtmlContent),this._createCommentToken(Oe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=b.BOGUS_COMMENT):this._ensureHibernation()||(this._err(w.incorrectlyOpenedComment),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_START_DASH;break}case m.GREATER_THAN_SIGN:{this._err(w.abruptClosingOfEmptyComment),this.state=b.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=b.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case m.GREATER_THAN_SIGN:{this._err(w.abruptClosingOfEmptyComment),this.state=b.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(w.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_END_DASH;break}case m.LESS_THAN_SIGN:{n.data+="<",this.state=b.COMMENT_LESS_THAN_SIGN;break}case m.NULL:{this._err(w.unexpectedNullCharacter),n.data+=de;break}case m.EOF:{this._err(w.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case m.EXCLAMATION_MARK:{n.data+="!",this.state=b.COMMENT_LESS_THAN_SIGN_BANG;break}case m.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=b.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===m.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=b.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===m.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=b.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==m.GREATER_THAN_SIGN&&t!==m.EOF&&this._err(w.nestedComment),this.state=b.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case m.EOF:{this._err(w.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case m.EXCLAMATION_MARK:{this.state=b.COMMENT_END_BANG;break}case m.HYPHEN_MINUS:{n.data+="-";break}case m.EOF:{this._err(w.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=b.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{n.data+="--!",this.state=b.COMMENT_END_DASH;break}case m.GREATER_THAN_SIGN:{this._err(w.incorrectlyClosedComment),this.state=b.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(w.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=b.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case m.EOF:{this._err(w.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(w.missingWhitespaceBeforeDoctypeName),this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(dn(t))this._createDoctypeToken(String.fromCharCode(zn(t))),this.state=b.DOCTYPE_NAME;else switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.NULL:{this._err(w.unexpectedNullCharacter),this._createDoctypeToken(de),this.state=b.DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this._err(w.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(w.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=b.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.AFTER_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.NULL:{this._err(w.unexpectedNullCharacter),n.name+=de;break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(dn(t)?zn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Oe.PUBLIC,!1)?this.state=b.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Oe.SYSTEM,!1)?this.state=b.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(w.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(w.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(w.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(w.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(w.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(w.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(w.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(w.unexpectedNullCharacter),n.publicId+=de;break}case m.GREATER_THAN_SIGN:{this._err(w.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(w.unexpectedNullCharacter),n.publicId+=de;break}case m.GREATER_THAN_SIGN:{this._err(w.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.QUOTATION_MARK:{this._err(w.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(w.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(w.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(w.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(w.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(w.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(w.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(w.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(w.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(w.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(w.unexpectedNullCharacter),n.systemId+=de;break}case m.GREATER_THAN_SIGN:{this._err(w.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(w.unexpectedNullCharacter),n.systemId+=de;break}case m.GREATER_THAN_SIGN:{this._err(w.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(w.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(w.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.NULL:{this._err(w.unexpectedNullCharacter);break}case m.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case m.RIGHT_SQUARE_BRACKET:{this.state=b.CDATA_SECTION_BRACKET;break}case m.EOF:{this._err(w.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===m.RIGHT_SQUARE_BRACKET?this.state=b.CDATA_SECTION_END:(this._emitChars("]"),this.state=b.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case m.GREATER_THAN_SIGN:{this.state=b.DATA;break}case m.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=b.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(m.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ya(this.preprocessor.peek(1))?b.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ya(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===m.SEMICOLON&&this._err(w.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Cs=new Set([o.DD,o.DT,o.LI,o.OPTGROUP,o.OPTION,o.P,o.RB,o.RP,o.RT,o.RTC]),Na=new Set([...Cs,o.CAPTION,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]),nr=new Set([o.APPLET,o.CAPTION,o.HTML,o.MARQUEE,o.OBJECT,o.TABLE,o.TD,o.TEMPLATE,o.TH]),Ad=new Set([...nr,o.OL,o.UL]),Cd=new Set([...nr,o.BUTTON]),Sa=new Set([o.ANNOTATION_XML,o.MI,o.MN,o.MO,o.MS,o.MTEXT]),wa=new Set([o.DESC,o.FOREIGN_OBJECT,o.TITLE]),yd=new Set([o.TR,o.TEMPLATE,o.HTML]),Id=new Set([o.TBODY,o.TFOOT,o.THEAD,o.TEMPLATE,o.HTML]),Nd=new Set([o.TABLE,o.TEMPLATE,o.HTML]),Sd=new Set([o.TD,o.TH]);class wd{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=o.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===D.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==D.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(ti,D.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Sd,D.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Nd,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Id,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(yd,D.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===o.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===o.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case D.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case D.SVG:{if(wa.has(i))return!1;break}case D.MATHML:{if(Sa.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,nr)}hasInListItemScope(t){return this.hasInDynamicScope(t,Ad)}hasInButtonScope(t){return this.hasInDynamicScope(t,Cd)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case D.HTML:{if(ti.has(n))return!0;if(nr.has(n))return!1;break}case D.SVG:{if(wa.has(n))return!1;break}case D.MATHML:{if(Sa.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===D.HTML)switch(this.tagIDs[t]){case o.TBODY:case o.THEAD:case o.TFOOT:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case o.OPTION:case o.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Cs.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Na.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Na.has(this.currentTagId);)this.pop()}}const Lr=3;var Ze;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ze||(Ze={}));const La={type:Ze.Marker};class Ld{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const l=this.entries[s];if(l.type===Ze.Marker)break;const{element:c}=l;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===u){const d=this.treeAdapter.getAttrList(c);d.length===i&&r.push({idx:s,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Lr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Lr)return;const i=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const s=r[u];s.attrs.every(l=>i.get(l.name)===l.value)&&(a+=1,a>=Lr&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(La)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ze.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ze.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(La);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ze.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ze.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ze.Element&&n.element===t)}}const ct={createDocument(){return{nodeName:"#document",mode:je.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ct.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ct.isTextNode(n)){n.value+=t;return}}ct.appendChild(e,ct.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ct.isTextNode(r)?r.value+=t:ct.insertBefore(e,ct.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},ys="html",Rd="about:legacy-compat",Od="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Is=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Dd=[...Is,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Pd=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ns=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Md=[...Ns,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ra(e,t){return t.some(n=>e.startsWith(n))}function vd(e){return e.name===ys&&e.publicId===null&&(e.systemId===null||e.systemId===Rd)}function Bd(e){if(e.name!==ys)return je.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Od)return je.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Pd.has(n))return je.QUIRKS;let r=t===null?Dd:Is;if(Ra(n,r))return je.QUIRKS;if(r=t===null?Ns:Md,Ra(n,r))return je.LIMITED_QUIRKS}return je.NO_QUIRKS}const Oa={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Fd="definitionurl",Hd="definitionURL",Ud=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),jd=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:D.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:D.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:D.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:D.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:D.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:D.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:D.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:D.XML}],["xml:space",{prefix:"xml",name:"space",namespace:D.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:D.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:D.XMLNS}]]),zd=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),$d=new Set([o.B,o.BIG,o.BLOCKQUOTE,o.BODY,o.BR,o.CENTER,o.CODE,o.DD,o.DIV,o.DL,o.DT,o.EM,o.EMBED,o.H1,o.H2,o.H3,o.H4,o.H5,o.H6,o.HEAD,o.HR,o.I,o.IMG,o.LI,o.LISTING,o.MENU,o.META,o.NOBR,o.OL,o.P,o.PRE,o.RUBY,o.S,o.SMALL,o.SPAN,o.STRONG,o.STRIKE,o.SUB,o.SUP,o.TABLE,o.TT,o.U,o.UL,o.VAR]);function Yd(e){const t=e.tagID;return t===o.FONT&&e.attrs.some(({name:r})=>r===Nt.COLOR||r===Nt.SIZE||r===Nt.FACE)||$d.has(t)}function Ss(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Fd){e.attrs[t].name=Hd;break}}function ws(e){for(let t=0;t<e.attrs.length;t++){const n=Ud.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Li(e){for(let t=0;t<e.attrs.length;t++){const n=jd.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function qd(e){const t=zd.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Gt(e.tagName))}function Vd(e,t){return t===D.MATHML&&(e===o.MI||e===o.MO||e===o.MN||e===o.MS||e===o.MTEXT)}function Wd(e,t,n){if(t===D.MATHML&&e===o.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Nt.ENCODING){const i=n[r].value.toLowerCase();return i===Oa.TEXT_HTML||i===Oa.APPLICATION_XML}}return t===D.SVG&&(e===o.FOREIGN_OBJECT||e===o.DESC||e===o.TITLE)}function Gd(e,t,n,r){return(!r||r===D.HTML)&&Wd(e,t,n)||(!r||r===D.MATHML)&&Vd(e,t)}const Qd="hidden",Kd=8,Xd=3;var E;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(E||(E={}));const Zd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ls=new Set([o.TABLE,o.TBODY,o.TFOOT,o.THEAD,o.TR]),Da={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ct,onParseError:null};class Pa{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=E.INITIAL,this.originalInsertionMode=E.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Da,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new _d(this.options,this),this.activeFormattingElements=new Ld(this.treeAdapter),this.fragmentContextID=r?Gt(this.treeAdapter.getTagName(r)):o.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new wd(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Da,...n};t??(t=r.treeAdapter.createElement(y.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===o.TEMPLATE&&a.tmplInsertionModeStack.unshift(E.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:Zd,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===D.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,D.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=E.TEXT}switchToPlaintextParsing(){this.insertionMode=E.TEXT,this.originalInsertionMode=E.IN_BODY,this.tokenizer.state=fe.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===y.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==D.HTML))switch(this.fragmentContextID){case o.TITLE:case o.TEXTAREA:{this.tokenizer.state=fe.RCDATA;break}case o.STYLE:case o.XMP:case o.IFRAME:case o.NOEMBED:case o.NOFRAMES:case o.NOSCRIPT:{this.tokenizer.state=fe.RAWTEXT;break}case o.SCRIPT:{this.tokenizer.state=fe.SCRIPT_DATA;break}case o.PLAINTEXT:{this.tokenizer.state=fe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,D.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,D.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(y.HTML,D.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,o.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,u=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:l,endCol:c,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:l,endCol:c,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===X.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===o.SVG&&this.treeAdapter.getTagName(n)===y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===D.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===o.MGLYPH||t.tagID===o.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,D.HTML)}_processToken(t){switch(t.type){case X.CHARACTER:{this.onCharacter(t);break}case X.NULL_CHARACTER:{this.onNullCharacter(t);break}case X.COMMENT:{this.onComment(t);break}case X.DOCTYPE:{this.onDoctype(t);break}case X.START_TAG:{this._processStartTag(t);break}case X.END_TAG:{this.onEndTag(t);break}case X.EOF:{this.onEof(t);break}case X.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return Gd(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Ze.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=E.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(o.P),this.openElements.popUntilTagNamePopped(o.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case o.TR:{this.insertionMode=E.IN_ROW;return}case o.TBODY:case o.THEAD:case o.TFOOT:{this.insertionMode=E.IN_TABLE_BODY;return}case o.CAPTION:{this.insertionMode=E.IN_CAPTION;return}case o.COLGROUP:{this.insertionMode=E.IN_COLUMN_GROUP;return}case o.TABLE:{this.insertionMode=E.IN_TABLE;return}case o.BODY:{this.insertionMode=E.IN_BODY;return}case o.FRAMESET:{this.insertionMode=E.IN_FRAMESET;return}case o.SELECT:{this._resetInsertionModeForSelect(t);return}case o.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case o.HTML:{this.insertionMode=this.headElement?E.AFTER_HEAD:E.BEFORE_HEAD;return}case o.TD:case o.TH:{if(t>0){this.insertionMode=E.IN_CELL;return}break}case o.HEAD:{if(t>0){this.insertionMode=E.IN_HEAD;return}break}}this.insertionMode=E.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===o.TEMPLATE)break;if(r===o.TABLE){this.insertionMode=E.IN_SELECT_IN_TABLE;return}}this.insertionMode=E.IN_SELECT}_isElementCausesFosterParenting(t){return Ls.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case o.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===D.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case o.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return Ed[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){wf(this,t);return}switch(this.insertionMode){case E.INITIAL:{nn(this,t);break}case E.BEFORE_HTML:{mn(this,t);break}case E.BEFORE_HEAD:{gn(this,t);break}case E.IN_HEAD:{bn(this,t);break}case E.IN_HEAD_NO_SCRIPT:{En(this,t);break}case E.AFTER_HEAD:{Tn(this,t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:{Os(this,t);break}case E.TEXT:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Rr(this,t);break}case E.IN_TABLE_TEXT:{Fs(this,t);break}case E.IN_COLUMN_GROUP:{rr(this,t);break}case E.AFTER_BODY:{ir(this,t);break}case E.AFTER_AFTER_BODY:{Xn(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Sf(this,t);return}switch(this.insertionMode){case E.INITIAL:{nn(this,t);break}case E.BEFORE_HTML:{mn(this,t);break}case E.BEFORE_HEAD:{gn(this,t);break}case E.IN_HEAD:{bn(this,t);break}case E.IN_HEAD_NO_SCRIPT:{En(this,t);break}case E.AFTER_HEAD:{Tn(this,t);break}case E.TEXT:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Rr(this,t);break}case E.IN_COLUMN_GROUP:{rr(this,t);break}case E.AFTER_BODY:{ir(this,t);break}case E.AFTER_AFTER_BODY:{Xn(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ni(this,t);return}switch(this.insertionMode){case E.INITIAL:case E.BEFORE_HTML:case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_TEMPLATE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{ni(this,t);break}case E.IN_TABLE_TEXT:{rn(this,t);break}case E.AFTER_BODY:{ah(this,t);break}case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{uh(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case E.INITIAL:{sh(this,t);break}case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:{this._err(t,w.misplacedDoctype);break}case E.IN_TABLE_TEXT:{rn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,w.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Lf(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{nn(this,t);break}case E.BEFORE_HTML:{lh(this,t);break}case E.BEFORE_HEAD:{ch(this,t);break}case E.IN_HEAD:{Ge(this,t);break}case E.IN_HEAD_NO_SCRIPT:{fh(this,t);break}case E.AFTER_HEAD:{mh(this,t);break}case E.IN_BODY:{_e(this,t);break}case E.IN_TABLE:{Yt(this,t);break}case E.IN_TABLE_TEXT:{rn(this,t);break}case E.IN_CAPTION:{hf(this,t);break}case E.IN_COLUMN_GROUP:{Di(this,t);break}case E.IN_TABLE_BODY:{Er(this,t);break}case E.IN_ROW:{Tr(this,t);break}case E.IN_CELL:{mf(this,t);break}case E.IN_SELECT:{js(this,t);break}case E.IN_SELECT_IN_TABLE:{bf(this,t);break}case E.IN_TEMPLATE:{Tf(this,t);break}case E.AFTER_BODY:{kf(this,t);break}case E.IN_FRAMESET:{_f(this,t);break}case E.AFTER_FRAMESET:{Cf(this,t);break}case E.AFTER_AFTER_BODY:{If(this,t);break}case E.AFTER_AFTER_FRAMESET:{Nf(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Rf(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{nn(this,t);break}case E.BEFORE_HTML:{oh(this,t);break}case E.BEFORE_HEAD:{dh(this,t);break}case E.IN_HEAD:{hh(this,t);break}case E.IN_HEAD_NO_SCRIPT:{ph(this,t);break}case E.AFTER_HEAD:{gh(this,t);break}case E.IN_BODY:{br(this,t);break}case E.TEXT:{tf(this,t);break}case E.IN_TABLE:{Cn(this,t);break}case E.IN_TABLE_TEXT:{rn(this,t);break}case E.IN_CAPTION:{ff(this,t);break}case E.IN_COLUMN_GROUP:{pf(this,t);break}case E.IN_TABLE_BODY:{ri(this,t);break}case E.IN_ROW:{Us(this,t);break}case E.IN_CELL:{gf(this,t);break}case E.IN_SELECT:{zs(this,t);break}case E.IN_SELECT_IN_TABLE:{Ef(this,t);break}case E.IN_TEMPLATE:{xf(this,t);break}case E.AFTER_BODY:{Ys(this,t);break}case E.IN_FRAMESET:{Af(this,t);break}case E.AFTER_FRAMESET:{yf(this,t);break}case E.AFTER_AFTER_BODY:{Xn(this,t);break}}}onEof(t){switch(this.insertionMode){case E.INITIAL:{nn(this,t);break}case E.BEFORE_HTML:{mn(this,t);break}case E.BEFORE_HEAD:{gn(this,t);break}case E.IN_HEAD:{bn(this,t);break}case E.IN_HEAD_NO_SCRIPT:{En(this,t);break}case E.AFTER_HEAD:{Tn(this,t);break}case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{vs(this,t);break}case E.TEXT:{nf(this,t);break}case E.IN_TABLE_TEXT:{rn(this,t);break}case E.IN_TEMPLATE:{$s(this,t);break}case E.AFTER_BODY:case E.IN_FRAMESET:case E.AFTER_FRAMESET:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{Oi(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===m.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.TEXT:case E.IN_COLUMN_GROUP:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{this._insertCharacters(t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:case E.AFTER_BODY:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{Rs(this,t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Rr(this,t);break}case E.IN_TABLE_TEXT:{Bs(this,t);break}}}}function Jd(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Ms(e,t),n}function eh(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function th(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,u=i;u!==n;a++,u=i){i=e.openElements.getCommonAncestor(u);const s=e.activeFormattingElements.getElementEntry(u),l=s&&a>=Xd;!s||l?(l&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(u)):(u=nh(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function nh(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function rh(e,t,n){const r=e.treeAdapter.getTagName(t),i=Gt(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===o.TEMPLATE&&a===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ih(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Ri(e,t){for(let n=0;n<Kd;n++){const r=Jd(e,t);if(!r)break;const i=eh(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=th(e,i,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&rh(e,u,a),ih(e,i,r)}}function ni(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function ah(e,t){e._appendCommentNode(t,e.openElements.items[0])}function uh(e,t){e._appendCommentNode(t,e.document)}function Oi(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function sh(e,t){e._setDocumentType(t);const n=t.forceQuirks?je.QUIRKS:Bd(t);vd(t)||e._err(t,w.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=E.BEFORE_HTML}function nn(e,t){e._err(t,w.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,je.QUIRKS),e.insertionMode=E.BEFORE_HTML,e._processToken(t)}function lh(e,t){t.tagID===o.HTML?(e._insertElement(t,D.HTML),e.insertionMode=E.BEFORE_HEAD):mn(e,t)}function oh(e,t){const n=t.tagID;(n===o.HTML||n===o.HEAD||n===o.BODY||n===o.BR)&&mn(e,t)}function mn(e,t){e._insertFakeRootElement(),e.insertionMode=E.BEFORE_HEAD,e._processToken(t)}function ch(e,t){switch(t.tagID){case o.HTML:{_e(e,t);break}case o.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD;break}default:gn(e,t)}}function dh(e,t){const n=t.tagID;n===o.HEAD||n===o.BODY||n===o.HTML||n===o.BR?gn(e,t):e._err(t,w.endTagWithoutMatchingOpenElement)}function gn(e,t){e._insertFakeElement(y.HEAD,o.HEAD),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD,e._processToken(t)}function Ge(e,t){switch(t.tagID){case o.HTML:{_e(e,t);break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case o.TITLE:{e._switchToTextParsing(t,fe.RCDATA);break}case o.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,fe.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=E.IN_HEAD_NO_SCRIPT);break}case o.NOFRAMES:case o.STYLE:{e._switchToTextParsing(t,fe.RAWTEXT);break}case o.SCRIPT:{e._switchToTextParsing(t,fe.SCRIPT_DATA);break}case o.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=E.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(E.IN_TEMPLATE);break}case o.HEAD:{e._err(t,w.misplacedStartTagForHeadElement);break}default:bn(e,t)}}function hh(e,t){switch(t.tagID){case o.HEAD:{e.openElements.pop(),e.insertionMode=E.AFTER_HEAD;break}case o.BODY:case o.BR:case o.HTML:{bn(e,t);break}case o.TEMPLATE:{Dt(e,t);break}default:e._err(t,w.endTagWithoutMatchingOpenElement)}}function Dt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==o.TEMPLATE&&e._err(t,w.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,w.endTagWithoutMatchingOpenElement)}function bn(e,t){e.openElements.pop(),e.insertionMode=E.AFTER_HEAD,e._processToken(t)}function fh(e,t){switch(t.tagID){case o.HTML:{_e(e,t);break}case o.BASEFONT:case o.BGSOUND:case o.HEAD:case o.LINK:case o.META:case o.NOFRAMES:case o.STYLE:{Ge(e,t);break}case o.NOSCRIPT:{e._err(t,w.nestedNoscriptInHead);break}default:En(e,t)}}function ph(e,t){switch(t.tagID){case o.NOSCRIPT:{e.openElements.pop(),e.insertionMode=E.IN_HEAD;break}case o.BR:{En(e,t);break}default:e._err(t,w.endTagWithoutMatchingOpenElement)}}function En(e,t){const n=t.type===X.EOF?w.openElementsLeftAfterEof:w.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=E.IN_HEAD,e._processToken(t)}function mh(e,t){switch(t.tagID){case o.HTML:{_e(e,t);break}case o.BODY:{e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=E.IN_BODY;break}case o.FRAMESET:{e._insertElement(t,D.HTML),e.insertionMode=E.IN_FRAMESET;break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{e._err(t,w.abandonedHeadElementChild),e.openElements.push(e.headElement,o.HEAD),Ge(e,t),e.openElements.remove(e.headElement);break}case o.HEAD:{e._err(t,w.misplacedStartTagForHeadElement);break}default:Tn(e,t)}}function gh(e,t){switch(t.tagID){case o.BODY:case o.HTML:case o.BR:{Tn(e,t);break}case o.TEMPLATE:{Dt(e,t);break}default:e._err(t,w.endTagWithoutMatchingOpenElement)}}function Tn(e,t){e._insertFakeElement(y.BODY,o.BODY),e.insertionMode=E.IN_BODY,gr(e,t)}function gr(e,t){switch(t.type){case X.CHARACTER:{Os(e,t);break}case X.WHITESPACE_CHARACTER:{Rs(e,t);break}case X.COMMENT:{ni(e,t);break}case X.START_TAG:{_e(e,t);break}case X.END_TAG:{br(e,t);break}case X.EOF:{vs(e,t);break}}}function Rs(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Os(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function bh(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Eh(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Th(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,D.HTML),e.insertionMode=E.IN_FRAMESET)}function xh(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function kh(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ti.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,D.HTML)}function _h(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ah(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,D.HTML),n||(e.formElement=e.openElements.current))}function Ch(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===o.LI&&i===o.LI||(n===o.DD||n===o.DT)&&(i===o.DD||i===o.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==o.ADDRESS&&i!==o.DIV&&i!==o.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function yh(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=fe.PLAINTEXT}function Ih(e,t){e.openElements.hasInScope(o.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1}function Nh(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(y.A);n&&(Ri(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Sh(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function wh(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(o.NOBR)&&(Ri(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Lh(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Rh(e,t){e.treeAdapter.getDocumentMode(e.document)!==je.QUIRKS&&e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=E.IN_TABLE}function Ds(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ps(e){const t=_s(e,Nt.TYPE);return t!=null&&t.toLowerCase()===Qd}function Oh(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),Ps(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Dh(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function Ph(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Mh(e,t){t.tagName=y.IMG,t.tagID=o.IMG,Ds(e,t)}function vh(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=fe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=E.TEXT}function Bh(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function Fh(e,t){e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function Ma(e,t){e._switchToTextParsing(t,fe.RAWTEXT)}function Hh(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===E.IN_TABLE||e.insertionMode===E.IN_CAPTION||e.insertionMode===E.IN_TABLE_BODY||e.insertionMode===E.IN_ROW||e.insertionMode===E.IN_CELL?E.IN_SELECT_IN_TABLE:E.IN_SELECT}function Uh(e,t){e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function jh(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function zh(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(o.RTC),e._insertElement(t,D.HTML)}function $h(e,t){e._reconstructActiveFormattingElements(),Ss(t),Li(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function Yh(e,t){e._reconstructActiveFormattingElements(),ws(t),Li(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function va(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function _e(e,t){switch(t.tagID){case o.I:case o.S:case o.B:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.SMALL:case o.STRIKE:case o.STRONG:{Sh(e,t);break}case o.A:{Nh(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{kh(e,t);break}case o.P:case o.DL:case o.OL:case o.UL:case o.DIV:case o.DIR:case o.NAV:case o.MAIN:case o.MENU:case o.ASIDE:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.DETAILS:case o.ADDRESS:case o.ARTICLE:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{xh(e,t);break}case o.LI:case o.DD:case o.DT:{Ch(e,t);break}case o.BR:case o.IMG:case o.WBR:case o.AREA:case o.EMBED:case o.KEYGEN:{Ds(e,t);break}case o.HR:{Ph(e,t);break}case o.RB:case o.RTC:{jh(e,t);break}case o.RT:case o.RP:{zh(e,t);break}case o.PRE:case o.LISTING:{_h(e,t);break}case o.XMP:{Bh(e,t);break}case o.SVG:{Yh(e,t);break}case o.HTML:{bh(e,t);break}case o.BASE:case o.LINK:case o.META:case o.STYLE:case o.TITLE:case o.SCRIPT:case o.BGSOUND:case o.BASEFONT:case o.TEMPLATE:{Ge(e,t);break}case o.BODY:{Eh(e,t);break}case o.FORM:{Ah(e,t);break}case o.NOBR:{wh(e,t);break}case o.MATH:{$h(e,t);break}case o.TABLE:{Rh(e,t);break}case o.INPUT:{Oh(e,t);break}case o.PARAM:case o.TRACK:case o.SOURCE:{Dh(e,t);break}case o.IMAGE:{Mh(e,t);break}case o.BUTTON:{Ih(e,t);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{Lh(e,t);break}case o.IFRAME:{Fh(e,t);break}case o.SELECT:{Hh(e,t);break}case o.OPTION:case o.OPTGROUP:{Uh(e,t);break}case o.NOEMBED:case o.NOFRAMES:{Ma(e,t);break}case o.FRAMESET:{Th(e,t);break}case o.TEXTAREA:{vh(e,t);break}case o.NOSCRIPT:{e.options.scriptingEnabled?Ma(e,t):va(e,t);break}case o.PLAINTEXT:{yh(e,t);break}case o.COL:case o.TH:case o.TD:case o.TR:case o.HEAD:case o.FRAME:case o.TBODY:case o.TFOOT:case o.THEAD:case o.CAPTION:case o.COLGROUP:break;default:va(e,t)}}function qh(e,t){if(e.openElements.hasInScope(o.BODY)&&(e.insertionMode=E.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Vh(e,t){e.openElements.hasInScope(o.BODY)&&(e.insertionMode=E.AFTER_BODY,Ys(e,t))}function Wh(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Gh(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(o.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(o.FORM):n&&e.openElements.remove(n))}function Qh(e){e.openElements.hasInButtonScope(o.P)||e._insertFakeElement(y.P,o.P),e._closePElement()}function Kh(e){e.openElements.hasInListItemScope(o.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(o.LI),e.openElements.popUntilTagNamePopped(o.LI))}function Xh(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Zh(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Jh(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function ef(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(y.BR,o.BR),e.openElements.pop(),e.framesetOk=!1}function Ms(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],u=e.openElements.tagIDs[i];if(r===u&&(r!==o.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,u))break}}function br(e,t){switch(t.tagID){case o.A:case o.B:case o.I:case o.S:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.NOBR:case o.SMALL:case o.STRIKE:case o.STRONG:{Ri(e,t);break}case o.P:{Qh(e);break}case o.DL:case o.UL:case o.OL:case o.DIR:case o.DIV:case o.NAV:case o.PRE:case o.MAIN:case o.MENU:case o.ASIDE:case o.BUTTON:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.ADDRESS:case o.ARTICLE:case o.DETAILS:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.LISTING:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{Wh(e,t);break}case o.LI:{Kh(e);break}case o.DD:case o.DT:{Xh(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{Zh(e);break}case o.BR:{ef(e);break}case o.BODY:{qh(e,t);break}case o.HTML:{Vh(e,t);break}case o.FORM:{Gh(e);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{Jh(e,t);break}case o.TEMPLATE:{Dt(e,t);break}default:Ms(e,t)}}function vs(e,t){e.tmplInsertionModeStack.length>0?$s(e,t):Oi(e,t)}function tf(e,t){var n;t.tagID===o.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function nf(e,t){e._err(t,w.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Rr(e,t){if(e.openElements.currentTagId!==void 0&&Ls.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=E.IN_TABLE_TEXT,t.type){case X.CHARACTER:{Fs(e,t);break}case X.WHITESPACE_CHARACTER:{Bs(e,t);break}}else Rn(e,t)}function rf(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=E.IN_CAPTION}function af(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=E.IN_COLUMN_GROUP}function uf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(y.COLGROUP,o.COLGROUP),e.insertionMode=E.IN_COLUMN_GROUP,Di(e,t)}function sf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=E.IN_TABLE_BODY}function lf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(y.TBODY,o.TBODY),e.insertionMode=E.IN_TABLE_BODY,Er(e,t)}function of(e,t){e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function cf(e,t){Ps(t)?e._appendElement(t,D.HTML):Rn(e,t),t.ackSelfClosing=!0}function df(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Yt(e,t){switch(t.tagID){case o.TD:case o.TH:case o.TR:{lf(e,t);break}case o.STYLE:case o.SCRIPT:case o.TEMPLATE:{Ge(e,t);break}case o.COL:{uf(e,t);break}case o.FORM:{df(e,t);break}case o.TABLE:{of(e,t);break}case o.TBODY:case o.TFOOT:case o.THEAD:{sf(e,t);break}case o.INPUT:{cf(e,t);break}case o.CAPTION:{rf(e,t);break}case o.COLGROUP:{af(e,t);break}default:Rn(e,t)}}function Cn(e,t){switch(t.tagID){case o.TABLE:{e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode());break}case o.TEMPLATE:{Dt(e,t);break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:Rn(e,t)}}function Rn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,gr(e,t),e.fosterParentingEnabled=n}function Bs(e,t){e.pendingCharacterTokens.push(t)}function Fs(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function rn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Rn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Hs=new Set([o.CAPTION,o.COL,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]);function hf(e,t){const n=t.tagID;Hs.has(n)?e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,Yt(e,t)):_e(e,t)}function ff(e,t){const n=t.tagID;switch(n){case o.CAPTION:case o.TABLE:{e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,n===o.TABLE&&Cn(e,t));break}case o.BODY:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:br(e,t)}}function Di(e,t){switch(t.tagID){case o.HTML:{_e(e,t);break}case o.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case o.TEMPLATE:{Ge(e,t);break}default:rr(e,t)}}function pf(e,t){switch(t.tagID){case o.COLGROUP:{e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case o.TEMPLATE:{Dt(e,t);break}case o.COL:break;default:rr(e,t)}}function rr(e,t){e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE,e._processToken(t))}function Er(e,t){switch(t.tagID){case o.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,D.HTML),e.insertionMode=E.IN_ROW;break}case o.TH:case o.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(y.TR,o.TR),e.insertionMode=E.IN_ROW,Tr(e,t);break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,Yt(e,t));break}default:Yt(e,t)}}function ri(e,t){const n=t.tagID;switch(t.tagID){case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case o.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,Cn(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:case o.TR:break;default:Cn(e,t)}}function Tr(e,t){switch(t.tagID){case o.TH:case o.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,D.HTML),e.insertionMode=E.IN_CELL,e.activeFormattingElements.insertMarker();break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,Er(e,t));break}default:Yt(e,t)}}function Us(e,t){switch(t.tagID){case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY);break}case o.TABLE:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,ri(e,t));break}case o.TBODY:case o.TFOOT:case o.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(o.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,ri(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:break;default:Cn(e,t)}}function mf(e,t){const n=t.tagID;Hs.has(n)?(e.openElements.hasInTableScope(o.TD)||e.openElements.hasInTableScope(o.TH))&&(e._closeTableCell(),Tr(e,t)):_e(e,t)}function gf(e,t){const n=t.tagID;switch(n){case o.TD:case o.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_ROW);break}case o.TABLE:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Us(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:break;default:br(e,t)}}function js(e,t){switch(t.tagID){case o.HTML:{_e(e,t);break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case o.OPTGROUP:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case o.HR:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case o.INPUT:case o.KEYGEN:case o.TEXTAREA:case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),t.tagID!==o.SELECT&&e._processStartTag(t));break}case o.SCRIPT:case o.TEMPLATE:{Ge(e,t);break}}}function zs(e,t){switch(t.tagID){case o.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===o.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===o.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop();break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop();break}case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode());break}case o.TEMPLATE:{Dt(e,t);break}}}function bf(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e._processStartTag(t)):js(e,t)}function Ef(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e.onEndTag(t)):zs(e,t)}function Tf(e,t){switch(t.tagID){case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{Ge(e,t);break}case o.CAPTION:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.tmplInsertionModeStack[0]=E.IN_TABLE,e.insertionMode=E.IN_TABLE,Yt(e,t);break}case o.COL:{e.tmplInsertionModeStack[0]=E.IN_COLUMN_GROUP,e.insertionMode=E.IN_COLUMN_GROUP,Di(e,t);break}case o.TR:{e.tmplInsertionModeStack[0]=E.IN_TABLE_BODY,e.insertionMode=E.IN_TABLE_BODY,Er(e,t);break}case o.TD:case o.TH:{e.tmplInsertionModeStack[0]=E.IN_ROW,e.insertionMode=E.IN_ROW,Tr(e,t);break}default:e.tmplInsertionModeStack[0]=E.IN_BODY,e.insertionMode=E.IN_BODY,_e(e,t)}}function xf(e,t){t.tagID===o.TEMPLATE&&Dt(e,t)}function $s(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Oi(e,t)}function kf(e,t){t.tagID===o.HTML?_e(e,t):ir(e,t)}function Ys(e,t){var n;if(t.tagID===o.HTML){if(e.fragmentContext||(e.insertionMode=E.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===o.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else ir(e,t)}function ir(e,t){e.insertionMode=E.IN_BODY,gr(e,t)}function _f(e,t){switch(t.tagID){case o.HTML:{_e(e,t);break}case o.FRAMESET:{e._insertElement(t,D.HTML);break}case o.FRAME:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case o.NOFRAMES:{Ge(e,t);break}}}function Af(e,t){t.tagID===o.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==o.FRAMESET&&(e.insertionMode=E.AFTER_FRAMESET))}function Cf(e,t){switch(t.tagID){case o.HTML:{_e(e,t);break}case o.NOFRAMES:{Ge(e,t);break}}}function yf(e,t){t.tagID===o.HTML&&(e.insertionMode=E.AFTER_AFTER_FRAMESET)}function If(e,t){t.tagID===o.HTML?_e(e,t):Xn(e,t)}function Xn(e,t){e.insertionMode=E.IN_BODY,gr(e,t)}function Nf(e,t){switch(t.tagID){case o.HTML:{_e(e,t);break}case o.NOFRAMES:{Ge(e,t);break}}}function Sf(e,t){t.chars=de,e._insertCharacters(t)}function wf(e,t){e._insertCharacters(t),e.framesetOk=!1}function qs(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==D.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Lf(e,t){if(Yd(t))qs(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?Ss(t):r===D.SVG&&(qd(t),ws(t)),Li(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Rf(e,t){if(t.tagID===o.P||t.tagID===o.BR){qs(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===D.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}y.AREA,y.BASE,y.BASEFONT,y.BGSOUND,y.BR,y.COL,y.EMBED,y.FRAME,y.HR,y.IMG,y.INPUT,y.KEYGEN,y.LINK,y.META,y.PARAM,y.SOURCE,y.TRACK,y.WBR;const xr=Vs("end"),et=Vs("start");function Vs(e){return t;function t(n){const r=n&&n.position&&n.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 Ws(e){const t=et(e),n=xr(e);if(t&&n)return{start:t,end:n}}const Of=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Df=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ba={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Gs(e,t){const n=$f(e),r=bs("type",{handlers:{root:Pf,element:Mf,text:vf,comment:Ks,doctype:Bf,raw:Hf},unknown:Uf}),i={parser:n?new Pa(Ba):Pa.getFragmentParser(void 0,Ba),handle(s){r(s,i)},stitches:!1,options:t||{}};r(e,i),Qt(i,et());const a=n?i.parser.document:i.parser.getFragment(),u=$c(a,{file:i.options.file});return i.stitches&&Je(u,"comment",function(s,l,c){const d=s;if(d.value.stitch&&c&&l!==void 0){const h=c.children;return h[l]=d.value.stitch,l}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Qs(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Pf(e,t){Qs(e.children,t)}function Mf(e,t){jf(e,t),Qs(e.children,t),zf(e,t)}function vf(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:X.CHARACTER,chars:e.value,location:On(e)};Qt(t,et(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Bf(e,t){const n={type:X.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:On(e)};Qt(t,et(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ff(e,t){t.stitches=!0;const n=Yf(e);if("children"in e&&"children"in n){const r=Gs({type:"root",children:e.children},t.options);n.children=r.children}Ks({type:"comment",value:{stitch:n}},t)}function Ks(e,t){const n=e.value,r={type:X.COMMENT,data:n,location:On(e)};Qt(t,et(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Hf(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Xs(t,et(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Of,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function Uf(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Ff(n,t);else{let r="";throw Df.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Qt(e,t){Xs(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=fe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Xs(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function jf(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===fe.PLAINTEXT)return;Qt(t,et(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:yt.html;i===yt.html&&n==="svg"&&(i=yt.svg);const a=Gc({...e,children:[]},{space:i===yt.svg?"svg":"html"}),u={type:X.START_TAG,tagName:n,tagID:Gt(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:On(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function zf(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&nd.includes(n)||t.parser.tokenizer.state===fe.PLAINTEXT)return;Qt(t,xr(e));const r={type:X.END_TAG,tagName:n,tagID:Gt(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:On(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===fe.RCDATA||t.parser.tokenizer.state===fe.RAWTEXT||t.parser.tokenizer.state===fe.SCRIPT_DATA)&&(t.parser.tokenizer.state=fe.DATA)}function $f(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function On(e){const t=et(e)||{line:void 0,column:void 0,offset:void 0},n=xr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Yf(e){return"children"in e?wt({...e,children:[]}):wt(e)}function ii(e){return function(t,n){return Gs(t,{...e,file:n})}}const xt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],At={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...xt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...xt],h2:[["className","sr-only"]],img:[...xt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...xt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...xt],table:[...xt],ul:[...xt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},dt={}.hasOwnProperty;function qf(e,t){let n={type:"root",children:[]};const r={schema:t?{...At,...t}:At,stack:[]},i=Zs(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Zs(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Vf(e,n);case"doctype":return Wf(e,n);case"element":return Gf(e,n);case"root":return Qf(e,n);case"text":return Kf(e,n)}}}function Vf(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Dn(a,t),a}}function Wf(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Dn(n,t),n}}function Gf(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Js(e,t.children),i=Xf(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&dt.call(e.schema.ancestors,n))){const s=e.schema.ancestors[n];let l=-1;for(a=!1;++l<s.length;)e.stack.includes(s[l])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:i,children:r};return Dn(u,t),u}function Qf(e,t){const r={type:"root",children:Js(e,t.children)};return Dn(r,t),r}function Kf(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Dn(r,t),r}function Js(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=Zs(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function Xf(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&dt.call(r,n)?r[n]:void 0,u=r&&dt.call(r,"*")?r["*"]:void 0,s=t&&typeof t=="object"?t:{},l={};let c;for(c in s)if(dt.call(s,c)){const d=s[c];let h=Fa(e,Ha(a,c),c,d);h==null&&(h=Fa(e,Ha(u,c),c,d)),h!=null&&(l[c]=h)}if(i&&dt.call(i,n)){const d=i[n];for(c in d)dt.call(d,c)&&!dt.call(l,c)&&(l[c]=d[c])}return l}function Fa(e,t,n,r){return t?Array.isArray(r)?Zf(e,t,n,r):el(e,t,n,r):void 0}function Zf(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const u=el(e,t,n,r[i]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function el(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Jf(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){i=!0;break}}else if(u===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Jf(e,t,n){const r=e.schema.protocols&&dt.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),u=i.indexOf("?"),s=i.indexOf("#"),l=i.indexOf("/");if(a<0||l>-1&&a>l||u>-1&&a>u||s>-1&&a>s)return!0;let c=-1;for(;++c<r.length;){const d=r[c];if(a===d.length&&i.slice(0,d.length)===d)return!0}return!1}function Dn(e,t){const n=Ws(t);t.data&&(e.data=wt(t.data)),n&&(e.position=n)}function Ha(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function tl(e){return function(t){return qf(t,e)}}function Ua(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ie=gt(/[A-Za-z]/),ke=gt(/[\dA-Za-z]/),e0=gt(/[#-'*+\--9=?A-Z^-~]/);function ar(e){return e!==null&&(e<32||e===127)}const ai=gt(/\d/),t0=gt(/[\dA-Fa-f]/),n0=gt(/[!-/:-@[-`{-~]/);function V(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const kr=gt(new RegExp("\\p{P}|\\p{S}","u")),Lt=gt(/\s/);function gt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function r0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function i0(e,t,n){const i=hr((n||{}).ignore||[]),a=a0(t);let u=-1;for(;++u<a.length;)_i(e,"text",s);function s(c,d){let h=-1,p;for(;++h<d.length;){const f=d[h],g=p?p.children:void 0;if(i(f,g?g.indexOf(f):void 0,p))return;p=f}if(p)return l(c,d)}function l(c,d){const h=d[d.length-1],p=a[u][0],f=a[u][1];let g=0;const C=h.children.indexOf(c);let x=!1,R=[];p.lastIndex=0;let L=p.exec(c.value);for(;L;){const B=L.index,v={index:L.index,input:L.input,stack:[...d,c]};let N=f(...L,v);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=B+1:(g!==B&&R.push({type:"text",value:c.value.slice(g,B)}),Array.isArray(N)?R.push(...N):N&&R.push(N),g=B+L[0].length,x=!0),!p.global)break;L=p.exec(c.value)}return x?(g<c.value.length&&R.push({type:"text",value:c.value.slice(g)}),h.children.splice(C,1,...R)):R=[c],C+R.length}}function a0(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([u0(i[0]),s0(i[1])])}return t}function u0(e){return typeof e=="string"?new RegExp(r0(e),"g"):e}function s0(e){return typeof e=="function"?e:function(){return e}}const Or="phrasing",Dr=["autolink","link","image","label"];function l0(){return{transforms:[m0],enter:{literalAutolink:c0,literalAutolinkEmail:Pr,literalAutolinkHttp:Pr,literalAutolinkWww:Pr},exit:{literalAutolink:p0,literalAutolinkEmail:f0,literalAutolinkHttp:d0,literalAutolinkWww:h0}}}function o0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Or,notInConstruct:Dr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Or,notInConstruct:Dr},{character:":",before:"[ps]",after:"\\/",inConstruct:Or,notInConstruct:Dr}]}}function c0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Pr(e){this.config.enter.autolinkProtocol.call(this,e)}function d0(e){this.config.exit.autolinkProtocol.call(this,e)}function h0(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function f0(e){this.config.exit.autolinkEmail.call(this,e)}function p0(e){this.exit(e)}function m0(e){i0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,g0],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),b0]],{ignore:["link","linkReference"]})}function g0(e,t,n,r,i){let a="";if(!nl(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!E0(n)))return!1;const u=T0(n+r);if(!u[0])return!1;const s={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[s,{type:"text",value:u[1]}]:s}function b0(e,t,n,r){return!nl(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function E0(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function T0(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Ua(e,"(");let a=Ua(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function nl(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Lt(n)||kr(n))&&(!t||n!==47)}function We(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}rl.peek=S0;function x0(){this.buffer()}function k0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function _0(){this.buffer()}function A0(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function C0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=We(this.sliceSerialize(e)).toLowerCase(),n.label=t}function y0(e){this.exit(e)}function I0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=We(this.sliceSerialize(e)).toLowerCase(),n.label=t}function N0(e){this.exit(e)}function S0(){return"["}function rl(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const u=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),u(),a+=i.move("]"),a}function w0(){return{enter:{gfmFootnoteCallString:x0,gfmFootnoteCall:k0,gfmFootnoteDefinitionLabelString:_0,gfmFootnoteDefinition:A0},exit:{gfmFootnoteCallString:C0,gfmFootnoteCall:y0,gfmFootnoteDefinitionLabelString:I0,gfmFootnoteDefinition:N0}}}function L0(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:rl},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,u){const s=a.createTracker(u);let l=s.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return l+=s.move(a.safe(a.associationId(r),{before:l,after:"]"})),d(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
4
|
+
`:" ")+a.indentLines(a.containerFlow(r,s.current()),t?il:R0))),c(),l}}function R0(e,t,n){return t===0?e:il(e,t,n)}function il(e,t,n){return(n?"":" ")+e}const O0=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];al.peek=B0;function D0(){return{canContainEols:["delete"],enter:{strikethrough:M0},exit:{strikethrough:v0}}}function P0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:O0}],handlers:{delete:al}}}function M0(e){this.enter({type:"delete",children:[]},e)}function v0(e){this.exit(e)}function al(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let u=i.move("~~");return u+=n.containerPhrasing(e,{...i.current(),before:u,after:"~"}),u+=i.move("~~"),a(),u}function B0(){return"~"}function F0(e){return e.length}function H0(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||F0,a=[],u=[],s=[],l=[];let c=0,d=-1;for(;++d<e.length;){const A=[],C=[];let x=-1;for(e[d].length>c&&(c=e[d].length);++x<e[d].length;){const R=U0(e[d][x]);if(n.alignDelimiters!==!1){const L=i(R);C[x]=L,(l[x]===void 0||L>l[x])&&(l[x]=L)}A.push(R)}u[d]=A,s[d]=C}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<c;)a[h]=ja(r[h]);else{const A=ja(r);for(;++h<c;)a[h]=A}h=-1;const p=[],f=[];for(;++h<c;){const A=a[h];let C="",x="";A===99?(C=":",x=":"):A===108?C=":":A===114&&(x=":");let R=n.alignDelimiters===!1?1:Math.max(1,l[h]-C.length-x.length);const L=C+"-".repeat(R)+x;n.alignDelimiters!==!1&&(R=C.length+R+x.length,R>l[h]&&(l[h]=R),f[h]=R),p[h]=L}u.splice(1,0,p),s.splice(1,0,f),d=-1;const g=[];for(;++d<u.length;){const A=u[d],C=s[d];h=-1;const x=[];for(;++h<c;){const R=A[h]||"";let L="",B="";if(n.alignDelimiters!==!1){const v=l[h]-(C[h]||0),N=a[h];N===114?L=" ".repeat(v):N===99?v%2?(L=" ".repeat(v/2+.5),B=" ".repeat(v/2-.5)):(L=" ".repeat(v/2),B=L):B=" ".repeat(v)}n.delimiterStart!==!1&&!h&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||h)&&x.push(" "),n.alignDelimiters!==!1&&x.push(L),x.push(R),n.alignDelimiters!==!1&&x.push(B),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||h!==c-1)&&x.push("|")}g.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return g.join(`
|
|
5
|
+
`)}function U0(e){return e==null?"":String(e)}function ja(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function j0(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),z0);return i(),u}function z0(e,t,n){return">"+(n?"":" ")+e}function $0(e,t){return za(e,t.inConstruct,!0)&&!za(e,t.notInConstruct,!1)}function za(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function $a(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
6
|
+
`&&$0(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
7
|
+
`}function Y0(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>u&&(u=a):a=1,i=r+t.length,r=n.indexOf(t,i);return u}function q0(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function V0(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function W0(e,t,n,r){const i=V0(n),a=e.value||"",u=i==="`"?"GraveAccent":"Tilde";if(q0(e,n)){const h=n.enter("codeIndented"),p=n.indentLines(a,G0);return h(),p}const s=n.createTracker(r),l=i.repeat(Math.max(Y0(a,i)+1,3)),c=n.enter("codeFenced");let d=s.move(l);if(e.lang){const h=n.enter(`codeFencedLang${u}`);d+=s.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${u}`);d+=s.move(" "),d+=s.move(n.safe(e.meta,{before:d,after:`
|
|
8
|
+
`,encode:["`"],...s.current()})),h()}return d+=s.move(`
|
|
9
|
+
`),a&&(d+=s.move(a+`
|
|
10
|
+
`)),d+=s.move(l),c(),d}function G0(e,t,n){return(n?"":" ")+e}function Pi(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Q0(e,t,n,r){const i=Pi(n),a=i==='"'?"Quote":"Apostrophe",u=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
11
|
+
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),u(),c}function K0(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function yn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function qt(e){if(e===null||oe(e)||Lt(e))return 1;if(kr(e))return 2}function ur(e,t,n){const r=qt(e),i=qt(t);return r===void 0?i===void 0?n==="_"?{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}}ul.peek=X0;function ul(e,t,n,r){const i=K0(n),a=n.enter("emphasis"),u=n.createTracker(r),s=u.move(i);let l=u.move(n.containerPhrasing(e,{after:i,before:s,...u.current()}));const c=l.charCodeAt(0),d=ur(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(l=yn(c)+l.slice(1));const h=l.charCodeAt(l.length-1),p=ur(r.after.charCodeAt(0),h,i);p.inside&&(l=l.slice(0,-1)+yn(h));const f=u.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},s+l+f}function X0(e,t,n){return n.options.emphasis||"*"}const Z0={};function Mi(e,t){const n=Z0,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return sl(e,r,i)}function sl(e,t,n){if(J0(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ya(e.children,t,n)}return Array.isArray(e)?Ya(e,t,n):""}function Ya(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=sl(e[i],t,n);return r.join("")}function J0(e){return!!(e&&typeof e=="object")}function ep(e,t){let n=!1;return Je(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Kr}),!!((!e.depth||e.depth<3)&&Mi(e)&&(t.options.setext||n))}function tp(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(ep(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
|
|
12
|
+
`,after:`
|
|
13
|
+
`});return h(),d(),p+`
|
|
14
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
15
|
+
`))+1))}const u="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");a.move(u+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
16
|
+
`,...a.current()});return/^[\t ]/.test(c)&&(c=yn(c.charCodeAt(0))+c.slice(1)),c=c?u+" "+c:u,n.options.closeAtx&&(c+=" "+u),l(),s(),c}ll.peek=np;function ll(e){return e.value||""}function np(){return"<"}ol.peek=rp;function ol(e,t,n,r){const i=Pi(n),a=i==='"'?"Quote":"Apostrophe",u=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),u(),c}function rp(){return"!"}cl.peek=ip;function cl(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),u();const d=n.stack;n.stack=[],u=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return u(),n.stack=d,a(),i==="full"||!c||c!==h?l+=s.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function ip(){return"!"}dl.peek=ap;function dl(e,t,n){let r=e.value||"",i="`",a=-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+" ");++a<n.unsafe.length;){const u=n.unsafe[a],s=n.compilePattern(u);let l;if(u.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function ap(){return"`"}function hl(e,t){const n=Mi(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}fl.peek=up;function fl(e,t,n,r){const i=Pi(n),a=i==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let s,l;if(hl(e,n)){const d=n.stack;n.stack=[],s=n.enter("autolink");let h=u.move("<");return h+=u.move(n.containerPhrasing(e,{before:h,after:">",...u.current()})),h+=u.move(">"),s(),n.stack=d,h}s=n.enter("link"),l=n.enter("label");let c=u.move("[");return c+=u.move(n.containerPhrasing(e,{before:c,after:"](",...u.current()})),c+=u.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),l()),c+=u.move(")"),s(),c}function up(e,t,n){return hl(e,n)?"<":"["}pl.peek=sp;function pl(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),u();const d=n.stack;n.stack=[],u=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return u(),n.stack=d,a(),i==="full"||!c||c!==h?l+=s.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function sp(){return"["}function vi(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function lp(e){const t=vi(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function op(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ml(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function cp(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?op(n):vi(n);const s=e.ordered?u==="."?")":".":lp(n);let l=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),ml(n)===u&&d){let h=-1;for(;++h<e.children.length;){const p=e.children[h];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(u=s),n.bulletCurrent=u;const c=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,i(),c}function dp(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function hp(e,t,n,r){const i=dp(n);let a=n.bulletCurrent||vi(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const s=n.createTracker(r);s.move(a+" ".repeat(u-a.length)),s.shift(u);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),d);return l(),c;function d(h,p,f){return p?(f?"":" ".repeat(u))+h:(f?a:a+" ".repeat(u-a.length))+h}}function fp(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),i(),u}const pp=hr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mp(e,t,n,r){return(e.children.some(function(u){return pp(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gp(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}gl.peek=bp;function gl(e,t,n,r){const i=gp(n),a=n.enter("strong"),u=n.createTracker(r),s=u.move(i+i);let l=u.move(n.containerPhrasing(e,{after:i,before:s,...u.current()}));const c=l.charCodeAt(0),d=ur(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(l=yn(c)+l.slice(1));const h=l.charCodeAt(l.length-1),p=ur(r.after.charCodeAt(0),h,i);p.inside&&(l=l.slice(0,-1)+yn(h));const f=u.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},s+l+f}function bp(e,t,n){return n.options.strong||"*"}function Ep(e,t,n,r){return n.safe(e.value,r)}function Tp(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function xp(e,t,n){const r=(ml(n)+(n.options.ruleSpaces?" ":"")).repeat(Tp(n));return n.options.ruleSpaces?r.slice(0,-1):r}const bl={blockquote:j0,break:$a,code:W0,definition:Q0,emphasis:ul,hardBreak:$a,heading:tp,html:ll,image:ol,imageReference:cl,inlineCode:dl,link:fl,linkReference:pl,list:cp,listItem:hp,paragraph:fp,root:mp,strong:gl,text:Ep,thematicBreak:xp},qa=document.createElement("i");function Bi(e){const t="&"+e+";";qa.innerHTML=t;const n=qa.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function El(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const kp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _p(e){return e.replace(kp,Ap)}function Ap(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return El(n.slice(a?2:1),a?16:10)}return Bi(n)||e}function Cp(){return{enter:{table:yp,tableData:Va,tableHeader:Va,tableRow:Np},exit:{codeText:Sp,table:Ip,tableData:Mr,tableHeader:Mr,tableRow:Mr}}}function yp(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Ip(e){this.exit(e),this.data.inTable=void 0}function Np(e){this.enter({type:"tableRow",children:[]},e)}function Mr(e){this.exit(e)}function Va(e){this.enter({type:"tableCell",children:[]},e)}function Sp(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,wp));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function wp(e,t){return t==="|"?t:e}function Lp(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
17
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:u,tableCell:l,tableRow:s}};function u(f,g,A,C){return c(d(f,A,C),f.align)}function s(f,g,A,C){const x=h(f,A,C),R=c([x]);return R.slice(0,R.indexOf(`
|
|
18
|
+
`))}function l(f,g,A,C){const x=A.enter("tableCell"),R=A.enter("phrasing"),L=A.containerPhrasing(f,{...C,before:a,after:a});return R(),x(),L}function c(f,g){return H0(f,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function d(f,g,A){const C=f.children;let x=-1;const R=[],L=g.enter("table");for(;++x<C.length;)R[x]=h(C[x],g,A);return L(),R}function h(f,g,A){const C=f.children;let x=-1;const R=[],L=g.enter("tableRow");for(;++x<C.length;)R[x]=l(C[x],f,g,A);return L(),R}function p(f,g,A){let C=bl.inlineCode(f,g,A);return A.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Rp(){return{exit:{taskListCheckValueChecked:Wa,taskListCheckValueUnchecked:Wa,paragraph:Dp}}}function Op(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Pp}}}function Wa(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Dp(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,u;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){u=s;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Pp(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(u);let l=bl.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+u}}function Mp(){return[l0(),w0(),D0(),Cp(),Rp()]}function vp(e){return{extensions:[o0(),L0(e),P0(),Lp(e),Op()]}}function Fe(e,t,n,r){const i=e.length;let a=0,u;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function ze(e,t){return e.length>0?(Fe(e,e.length,0,t),e):t}const Ga={}.hasOwnProperty;function Tl(e){const t={};let n=-1;for(;++n<e.length;)Bp(t,e[n]);return t}function Bp(e,t){let n;for(n in t){const i=(Ga.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){Ga.call(i,u)||(i[u]=[]);const s=a[u];Fp(i[u],Array.isArray(s)?s:s?[s]:[])}}}function Fp(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Fe(e,0,0,r)}const Hp={tokenize:qp,partial:!0},xl={tokenize:Vp,partial:!0},kl={tokenize:Wp,partial:!0},_l={tokenize:Gp,partial:!0},Up={tokenize:Qp,partial:!0},Al={name:"wwwAutolink",tokenize:$p,previous:yl},Cl={name:"protocolAutolink",tokenize:Yp,previous:Il},st={name:"emailAutolink",tokenize:zp,previous:Nl},tt={};function jp(){return{text:tt}}let kt=48;for(;kt<123;)tt[kt]=st,kt++,kt===58?kt=65:kt===91&&(kt=97);tt[43]=st;tt[45]=st;tt[46]=st;tt[95]=st;tt[72]=[st,Cl];tt[104]=[st,Cl];tt[87]=[st,Al];tt[119]=[st,Al];function zp(e,t,n){const r=this;let i,a;return u;function u(h){return!ui(h)||!Nl.call(r,r.previous)||Fi(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(h))}function s(h){return ui(h)?(e.consume(h),s):h===64?(e.consume(h),l):n(h)}function l(h){return h===46?e.check(Up,d,c)(h):h===45||h===95||ke(h)?(a=!0,e.consume(h),l):d(h)}function c(h){return e.consume(h),i=!0,l}function d(h){return a&&i&&Ie(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function $p(e,t,n){const r=this;return i;function i(u){return u!==87&&u!==119||!yl.call(r,r.previous)||Fi(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Hp,e.attempt(xl,e.attempt(kl,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function Yp(e,t,n){const r=this;let i="",a=!1;return u;function u(h){return(h===72||h===104)&&Il.call(r,r.previous)&&!Fi(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),s):n(h)}function s(h){if(Ie(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),s;if(h===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(h),l}return n(h)}function l(h){return h===47?(e.consume(h),a?c:(a=!0,l)):n(h)}function c(h){return h===null||ar(h)||oe(h)||Lt(h)||kr(h)?n(h):e.attempt(xl,e.attempt(kl,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function qp(e,t,n){let r=0;return i;function i(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),i):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function Vp(e,t,n){let r,i,a;return u;function u(c){return c===46||c===95?e.check(_l,l,s)(c):c===null||oe(c)||Lt(c)||c!==45&&kr(c)?l(c):(a=!0,e.consume(c),u)}function s(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),u}function l(c){return i||r||!a?n(c):t(c)}}function Wp(e,t){let n=0,r=0;return i;function i(u){return u===40?(n++,e.consume(u),i):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(_l,t,a)(u):u===null||oe(u)||Lt(u)?t(u):(e.consume(u),i)}function a(u){return u===41&&r++,e.consume(u),i}}function Gp(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||oe(s)||Lt(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||oe(s)||Lt(s)?t(s):r(s)}function a(s){return Ie(s)?u(s):n(s)}function u(s){return s===59?(e.consume(s),r):Ie(s)?(e.consume(s),u):n(s)}}function Qp(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return ke(a)?n(a):t(a)}}function yl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oe(e)}function Il(e){return!Ie(e)}function Nl(e){return!(e===47||ui(e))}function ui(e){return e===43||e===45||e===46||e===95||ke(e)}function Fi(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Kt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&ke(e.charCodeAt(n+1))&&ke(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(u=String.fromCharCode(a,s),i=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+i+1,u=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function _r(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const si={name:"attention",resolveAll:Kp,tokenize:Xp};function Kp(e,t){let n=-1,r,i,a,u,s,l,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},p={...e[n][1].start};Qa(h,-l),Qa(p,l),u={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...u.start},end:{...s.end}},e[r][1].end={...u.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ze(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=ze(c,[["enter",i,t],["enter",u,t],["exit",u,t],["enter",a,t]]),c=ze(c,_r(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=ze(c,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=ze(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Fe(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Xp(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=qt(r);let a;return u;function u(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;const c=e.exit("attentionSequence"),d=qt(l),h=!d||d===2&&i||n.includes(l),p=!i||i===2&&d||n.includes(r);return c._open=!!(a===42?h:h&&(i||!p)),c._close=!!(a===42?p:p&&(d||!h)),t(l)}}function Qa(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Zp={name:"autolink",tokenize:Jp};function Jp(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(f){return Ie(f)?(e.consume(f),u):f===64?n(f):c(f)}function u(f){return f===43||f===45||f===46||ke(f)?(r=1,s(f)):c(f)}function s(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||ke(f))&&r++<32?(e.consume(f),s):(r=0,c(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||ar(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),d):e0(f)?(e.consume(f),c):n(f)}function d(f){return ke(f)?h(f):n(f)}function h(f){return f===46?(e.consume(f),r=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||ke(f))&&r++<63){const g=f===45?p:h;return e.consume(f),g}return n(f)}}function re(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(l){return Z(l)?(e.enter(n),s(l)):t(l)}function s(l){return Z(l)&&a++<i?(e.consume(l),s):(e.exit(n),t(l))}}const Pn={partial:!0,tokenize:em};function em(e,t,n){return r;function r(a){return Z(a)?re(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||V(a)?t(a):n(a)}}const Sl={continuation:{tokenize:nm},exit:rm,name:"blockQuote",tokenize:tm};function tm(e,t,n){const r=this;return i;function i(u){if(u===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Z(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function nm(e,t,n){const r=this;return i;function i(u){return Z(u)?re(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(Sl,t,n)(u)}}function rm(e){e.exit("blockQuote")}const wl={name:"characterEscape",tokenize:im};function im(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return n0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Ll={name:"characterReference",tokenize:am};function am(e,t,n){const r=this;let i=0,a,u;return s;function s(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),l}function l(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,u=ke,d(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=t0,d):(e.enter("characterReferenceValue"),a=7,u=ai,d(h))}function d(h){if(h===59&&i){const p=e.exit("characterReferenceValue");return u===ke&&!Bi(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(h)&&i++<a?(e.consume(h),d):n(h)}}const Ka={partial:!0,tokenize:sm},Xa={concrete:!0,name:"codeFenced",tokenize:um};function um(e,t,n){const r=this,i={partial:!0,tokenize:v};let a=0,u=0,s;return l;function l(N){return c(N)}function c(N){const $=r.events[r.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,s=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===s?(u++,e.consume(N),d):u<3?n(N):(e.exit("codeFencedFenceSequence"),Z(N)?re(e,h,"whitespace")(N):h(N))}function h(N){return N===null||V(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(Ka,A,B)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||V(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(N)):Z(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),re(e,f,"whitespace")(N)):N===96&&N===s?n(N):(e.consume(N),p)}function f(N){return N===null||V(N)?h(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(N))}function g(N){return N===null||V(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(N)):N===96&&N===s?n(N):(e.consume(N),g)}function A(N){return e.attempt(i,B,C)(N)}function C(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),x}function x(N){return a>0&&Z(N)?re(e,R,"linePrefix",a+1)(N):R(N)}function R(N){return N===null||V(N)?e.check(Ka,A,B)(N):(e.enter("codeFlowValue"),L(N))}function L(N){return N===null||V(N)?(e.exit("codeFlowValue"),R(N)):(e.consume(N),L)}function B(N){return e.exit("codeFenced"),t(N)}function v(N,$,q){let W=0;return S;function S(H){return N.enter("lineEnding"),N.consume(H),N.exit("lineEnding"),U}function U(H){return N.enter("codeFencedFence"),Z(H)?re(N,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):j(H)}function j(H){return H===s?(N.enter("codeFencedFenceSequence"),J(H)):q(H)}function J(H){return H===s?(W++,N.consume(H),J):W>=u?(N.exit("codeFencedFenceSequence"),Z(H)?re(N,Y,"whitespace")(H):Y(H)):q(H)}function Y(H){return H===null||V(H)?(N.exit("codeFencedFence"),$(H)):q(H)}}}function sm(e,t,n){const r=this;return i;function i(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const vr={name:"codeIndented",tokenize:om},lm={partial:!0,tokenize:cm};function om(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),re(e,a,"linePrefix",5)(c)}function a(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?u(c):n(c)}function u(c){return c===null?l(c):V(c)?e.attempt(lm,u,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||V(c)?(e.exit("codeFlowValue"),u(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function cm(e,t,n){const r=this;return i;function i(u){return r.parser.lazy[r.now().line]?n(u):V(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),i):re(e,a,"linePrefix",5)(u)}function a(u){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(u):V(u)?i(u):n(u)}}const dm={name:"codeText",previous:fm,resolve:hm,tokenize:pm};function hm(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||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),t-=r-i-2,r=i+2),i=void 0);return e}function fm(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pm(e,t,n){let r=0,i,a;return u;function u(h){return e.enter("codeText"),e.enter("codeTextSequence"),s(h)}function s(h){return h===96?(e.consume(h),r++,s):(e.exit("codeTextSequence"),l(h))}function l(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),l):h===96?(a=e.enter("codeTextSequence"),i=0,d(h)):V(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||V(h)?(e.exit("codeTextData"),l(h)):(e.consume(h),c)}function d(h){return h===96?(e.consume(h),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",c(h))}}class mm{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&an(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),an(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),an(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);an(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);an(this.left,n.reverse())}}}function an(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Rl(e){const t={};let n=-1,r,i,a,u,s,l,c;const d=new mm(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,gm(d,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(u=d.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),u[1].type="lineEnding",i=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},s=d.slice(i,n),s.unshift(r),d.splice(i,n-i+1,s))}}return Fe(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function gm(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const s=u.events,l=[],c={};let d,h,p=-1,f=n,g=0,A=0;const C=[A];for(;f;){for(;e.get(++i)[1]!==f;);a.push(i),f._tokenizer||(d=r.sliceStream(f),f.next||d.push(null),h&&u.defineSkip(f.start),f._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(d),f._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(A=p+1,C.push(A),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(u.events=[],f?(f._tokenizer=void 0,f.previous=void 0):C.pop(),p=C.length;p--;){const x=s.slice(C[p],C[p+1]),R=a.pop();l.push([R,R+x.length-1]),e.splice(R,2,x)}for(l.reverse(),p=-1;++p<l.length;)c[g+l[p][0]]=g+l[p][1],g+=l[p][1]-l[p][0]-1;return c}const bm={resolve:Tm,tokenize:xm},Em={partial:!0,tokenize:km};function Tm(e){return Rl(e),e}function xm(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):V(s)?e.check(Em,u,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function u(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function km(e,t,n){const r=this;return i;function i(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),re(e,a,"linePrefix")}function a(u){if(u===null||V(u))return n(u);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function Ol(e,t,n,r,i,a,u,s,l){const c=l||Number.POSITIVE_INFINITY;let d=0;return h;function h(x){return x===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(x),e.exit(a),p):x===null||x===32||x===41||ar(x)?n(x):(e.enter(r),e.enter(u),e.enter(s),e.enter("chunkString",{contentType:"string"}),A(x))}function p(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(x))}function f(x){return x===62?(e.exit("chunkString"),e.exit(s),p(x)):x===null||x===60||V(x)?n(x):(e.consume(x),x===92?g:f)}function g(x){return x===60||x===62||x===92?(e.consume(x),f):f(x)}function A(x){return!d&&(x===null||x===41||oe(x))?(e.exit("chunkString"),e.exit(s),e.exit(u),e.exit(r),t(x)):d<c&&x===40?(e.consume(x),d++,A):x===41?(e.consume(x),d--,A):x===null||x===32||x===40||ar(x)?n(x):(e.consume(x),x===92?C:A)}function C(x){return x===40||x===41||x===92?(e.consume(x),A):A(x)}}function Dl(e,t,n,r,i,a){const u=this;let s=0,l;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(a),d}function d(f){return s>999||f===null||f===91||f===93&&!l||f===94&&!s&&"_hiddenFootnoteSupport"in u.parser.constructs?n(f):f===93?(e.exit(a),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):V(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||V(f)||s++>999?(e.exit("chunkString"),d(f)):(e.consume(f),l||(l=!Z(f)),f===92?p:h)}function p(f){return f===91||f===92||f===93?(e.consume(f),s++,h):h(f)}}function Pl(e,t,n,r,i,a){let u;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),u=p===40?41:p,l):n(p)}function l(p){return p===u?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===u?(e.exit(a),l(u)):p===null?n(p):V(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),re(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===u||p===null||V(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?h:d)}function h(p){return p===u||p===92?(e.consume(p),d):d(p)}}function xn(e,t){let n;return r;function r(i){return V(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?re(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const _m={name:"definition",tokenize:Cm},Am={partial:!0,tokenize:ym};function Cm(e,t,n){const r=this;let i;return a;function a(f){return e.enter("definition"),u(f)}function u(f){return Dl.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return i=We(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return oe(f)?xn(e,c)(f):c(f)}function c(f){return Ol(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(Am,h,h)(f)}function h(f){return Z(f)?re(e,p,"whitespace")(f):p(f)}function p(f){return f===null||V(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function ym(e,t,n){return r;function r(s){return oe(s)?xn(e,i)(s):n(s)}function i(s){return Pl(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Z(s)?re(e,u,"whitespace")(s):u(s)}function u(s){return s===null||V(s)?t(s):n(s)}}const Im={name:"hardBreakEscape",tokenize:Nm};function Nm(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return V(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Sm={name:"headingAtx",resolve:wm,tokenize:Lm};function wm(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Fe(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Lm(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),u(d)}function u(d){return d===35&&r++<6?(e.consume(d),u):d===null||oe(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||V(d)?(e.exit("atxHeading"),t(d)):Z(d)?re(e,s,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),s(d))}function c(d){return d===null||d===35||oe(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),c)}}const Rm=["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"],Za=["pre","script","style","textarea"],Om={concrete:!0,name:"htmlFlow",resolveTo:Mm,tokenize:vm},Dm={partial:!0,tokenize:Fm},Pm={partial:!0,tokenize:Bm};function Mm(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function vm(e,t,n){const r=this;let i,a,u,s,l;return c;function c(_){return d(_)}function d(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),h}function h(_){return _===33?(e.consume(_),p):_===47?(e.consume(_),a=!0,A):_===63?(e.consume(_),i=3,r.interrupt?t:k):Ie(_)?(e.consume(_),u=String.fromCharCode(_),C):n(_)}function p(_){return _===45?(e.consume(_),i=2,f):_===91?(e.consume(_),i=5,s=0,g):Ie(_)?(e.consume(_),i=4,r.interrupt?t:k):n(_)}function f(_){return _===45?(e.consume(_),r.interrupt?t:k):n(_)}function g(_){const Le="CDATA[";return _===Le.charCodeAt(s++)?(e.consume(_),s===Le.length?r.interrupt?t:j:g):n(_)}function A(_){return Ie(_)?(e.consume(_),u=String.fromCharCode(_),C):n(_)}function C(_){if(_===null||_===47||_===62||oe(_)){const Le=_===47,be=u.toLowerCase();return!Le&&!a&&Za.includes(be)?(i=1,r.interrupt?t(_):j(_)):Rm.includes(u.toLowerCase())?(i=6,Le?(e.consume(_),x):r.interrupt?t(_):j(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?R(_):L(_))}return _===45||ke(_)?(e.consume(_),u+=String.fromCharCode(_),C):n(_)}function x(_){return _===62?(e.consume(_),r.interrupt?t:j):n(_)}function R(_){return Z(_)?(e.consume(_),R):S(_)}function L(_){return _===47?(e.consume(_),S):_===58||_===95||Ie(_)?(e.consume(_),B):Z(_)?(e.consume(_),L):S(_)}function B(_){return _===45||_===46||_===58||_===95||ke(_)?(e.consume(_),B):v(_)}function v(_){return _===61?(e.consume(_),N):Z(_)?(e.consume(_),v):L(_)}function N(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),l=_,$):Z(_)?(e.consume(_),N):q(_)}function $(_){return _===l?(e.consume(_),l=null,W):_===null||V(_)?n(_):(e.consume(_),$)}function q(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||oe(_)?v(_):(e.consume(_),q)}function W(_){return _===47||_===62||Z(_)?L(_):n(_)}function S(_){return _===62?(e.consume(_),U):n(_)}function U(_){return _===null||V(_)?j(_):Z(_)?(e.consume(_),U):n(_)}function j(_){return _===45&&i===2?(e.consume(_),z):_===60&&i===1?(e.consume(_),ne):_===62&&i===4?(e.consume(_),xe):_===63&&i===3?(e.consume(_),k):_===93&&i===5?(e.consume(_),Me):V(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Dm,Ce,J)(_)):_===null||V(_)?(e.exit("htmlFlowData"),J(_)):(e.consume(_),j)}function J(_){return e.check(Pm,Y,Ce)(_)}function Y(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),H}function H(_){return _===null||V(_)?J(_):(e.enter("htmlFlowData"),j(_))}function z(_){return _===45?(e.consume(_),k):j(_)}function ne(_){return _===47?(e.consume(_),u="",ge):j(_)}function ge(_){if(_===62){const Le=u.toLowerCase();return Za.includes(Le)?(e.consume(_),xe):j(_)}return Ie(_)&&u.length<8?(e.consume(_),u+=String.fromCharCode(_),ge):j(_)}function Me(_){return _===93?(e.consume(_),k):j(_)}function k(_){return _===62?(e.consume(_),xe):_===45&&i===2?(e.consume(_),k):j(_)}function xe(_){return _===null||V(_)?(e.exit("htmlFlowData"),Ce(_)):(e.consume(_),xe)}function Ce(_){return e.exit("htmlFlow"),t(_)}}function Bm(e,t,n){const r=this;return i;function i(u){return V(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function Fm(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Pn,t,n)}}const Hm={name:"htmlText",tokenize:Um};function Um(e,t,n){const r=this;let i,a,u;return s;function s(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),l}function l(k){return k===33?(e.consume(k),c):k===47?(e.consume(k),v):k===63?(e.consume(k),L):Ie(k)?(e.consume(k),q):n(k)}function c(k){return k===45?(e.consume(k),d):k===91?(e.consume(k),a=0,g):Ie(k)?(e.consume(k),R):n(k)}function d(k){return k===45?(e.consume(k),f):n(k)}function h(k){return k===null?n(k):k===45?(e.consume(k),p):V(k)?(u=h,ne(k)):(e.consume(k),h)}function p(k){return k===45?(e.consume(k),f):h(k)}function f(k){return k===62?z(k):k===45?p(k):h(k)}function g(k){const xe="CDATA[";return k===xe.charCodeAt(a++)?(e.consume(k),a===xe.length?A:g):n(k)}function A(k){return k===null?n(k):k===93?(e.consume(k),C):V(k)?(u=A,ne(k)):(e.consume(k),A)}function C(k){return k===93?(e.consume(k),x):A(k)}function x(k){return k===62?z(k):k===93?(e.consume(k),x):A(k)}function R(k){return k===null||k===62?z(k):V(k)?(u=R,ne(k)):(e.consume(k),R)}function L(k){return k===null?n(k):k===63?(e.consume(k),B):V(k)?(u=L,ne(k)):(e.consume(k),L)}function B(k){return k===62?z(k):L(k)}function v(k){return Ie(k)?(e.consume(k),N):n(k)}function N(k){return k===45||ke(k)?(e.consume(k),N):$(k)}function $(k){return V(k)?(u=$,ne(k)):Z(k)?(e.consume(k),$):z(k)}function q(k){return k===45||ke(k)?(e.consume(k),q):k===47||k===62||oe(k)?W(k):n(k)}function W(k){return k===47?(e.consume(k),z):k===58||k===95||Ie(k)?(e.consume(k),S):V(k)?(u=W,ne(k)):Z(k)?(e.consume(k),W):z(k)}function S(k){return k===45||k===46||k===58||k===95||ke(k)?(e.consume(k),S):U(k)}function U(k){return k===61?(e.consume(k),j):V(k)?(u=U,ne(k)):Z(k)?(e.consume(k),U):W(k)}function j(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,J):V(k)?(u=j,ne(k)):Z(k)?(e.consume(k),j):(e.consume(k),Y)}function J(k){return k===i?(e.consume(k),i=void 0,H):k===null?n(k):V(k)?(u=J,ne(k)):(e.consume(k),J)}function Y(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||oe(k)?W(k):(e.consume(k),Y)}function H(k){return k===47||k===62||oe(k)?W(k):n(k)}function z(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function ne(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),ge}function ge(k){return Z(k)?re(e,Me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):Me(k)}function Me(k){return e.enter("htmlTextData"),u(k)}}const Hi={name:"labelEnd",resolveAll:Ym,resolveTo:qm,tokenize:Vm},jm={tokenize:Wm},zm={tokenize:Gm},$m={tokenize:Qm};function Ym(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Fe(e,0,e.length,n),e}function qm(e,t){let n=e.length,r=0,i,a,u,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(u=n);const l={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[u][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[u-2][1].start}};return s=[["enter",l,t],["enter",c,t]],s=ze(s,e.slice(a+1,a+r+3)),s=ze(s,[["enter",d,t]]),s=ze(s,_r(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),s=ze(s,[["exit",d,t],e[u-2],e[u-1],["exit",c,t]]),s=ze(s,e.slice(u+1)),s=ze(s,[["exit",l,t]]),Fe(e,a,e.length,s),e}function Vm(e,t,n){const r=this;let i=r.events.length,a,u;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(p){return a?a._inactive?h(p):(u=r.parser.defined.includes(We(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(jm,d,u?d:h)(p):p===91?e.attempt(zm,d,u?c:h)(p):u?d(p):h(p)}function c(p){return e.attempt($m,d,h)(p)}function d(p){return t(p)}function h(p){return a._balanced=!0,n(p)}}function Wm(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return oe(h)?xn(e,a)(h):a(h)}function a(h){return h===41?d(h):Ol(e,u,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function u(h){return oe(h)?xn(e,l)(h):d(h)}function s(h){return n(h)}function l(h){return h===34||h===39||h===40?Pl(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function c(h){return oe(h)?xn(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function Gm(e,t,n){const r=this;return i;function i(s){return Dl.call(r,e,a,u,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(We(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function u(s){return n(s)}}function Qm(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Km={name:"labelStartImage",resolveAll:Hi.resolveAll,tokenize:Xm};function Xm(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),u):n(s)}function u(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Zm={name:"labelStartLink",resolveAll:Hi.resolveAll,tokenize:Jm};function Jm(e,t,n){const r=this;return i;function i(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Br={name:"lineEnding",tokenize:e1};function e1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),re(e,t,"linePrefix")}}const Zn={name:"thematicBreak",tokenize:t1};function t1(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),u(c)}function u(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||V(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),Z(c)?re(e,s,"whitespace")(c):s(c))}}const De={continuation:{tokenize:a1},exit:s1,name:"list",tokenize:i1},n1={partial:!0,tokenize:l1},r1={partial:!0,tokenize:u1};function i1(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,u=0;return s;function s(f){const g=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:ai(f)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Zn,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return ai(f)&&++u<10?(e.consume(f),l):(!r.interrupt||u<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Pn,r.interrupt?n:d,e.attempt(n1,p,h))}function d(f){return r.containerState.initialBlankLine=!0,a++,p(f)}function h(f){return Z(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function a1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Pn,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,re(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!Z(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(r1,t,u)(s))}function u(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,re(e,e.attempt(De,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function u1(e,t,n){const r=this;return re(e,i,"listItemIndent",r.containerState.size+1);function i(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function s1(e){e.exit(this.containerState.type)}function l1(e,t,n){const r=this;return re(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const u=r.events[r.events.length-1];return!Z(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Ja={name:"setextUnderline",resolveTo:o1,tokenize:c1};function o1(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=u,e.push(["exit",u,t]),e}function c1(e,t,n){const r=this;let i;return a;function a(c){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=c,u(c)):n(c)}function u(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),Z(c)?re(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||V(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const d1={tokenize:T1,partial:!0};function h1(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:g1,continuation:{tokenize:b1},exit:E1}},text:{91:{name:"gfmFootnoteCall",tokenize:m1},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:f1,resolveTo:p1}}}}function f1(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){u=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!u||!u._balanced)return n(l);const c=We(r.sliceSerialize({start:u.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function p1(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function m1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return s;function s(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(a>999||h===93&&!u||h===null||h===91||oe(h))return n(h);if(h===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(We(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return oe(h)||(u=!0),a++,e.consume(h),h===92?d:c}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function g1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,s;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(u>999||g===93&&!s||g===null||g===91||oe(g))return n(g);if(g===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=We(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return oe(g)||(s=!0),u++,e.consume(g),g===92?h:d}function h(g){return g===91||g===92||g===93?(e.consume(g),u++,d):d(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),re(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function b1(e,t,n){return e.check(Pn,t,e.attempt(d1,t,n))}function E1(e){e.exit("gfmFootnoteDefinition")}function T1(e,t,n){const r=this;return re(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function x1(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(u,s){let l=-1;for(;++l<u.length;)if(u[l][0]==="enter"&&u[l][1].type==="strikethroughSequenceTemporary"&&u[l][1]._close){let c=l;for(;c--;)if(u[c][0]==="exit"&&u[c][1].type==="strikethroughSequenceTemporary"&&u[c][1]._open&&u[l][1].end.offset-u[l][1].start.offset===u[c][1].end.offset-u[c][1].start.offset){u[l][1].type="strikethroughSequence",u[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},u[c][1].start),end:Object.assign({},u[l][1].end)},h={type:"strikethroughText",start:Object.assign({},u[c][1].end),end:Object.assign({},u[l][1].start)},p=[["enter",d,s],["enter",u[c][1],s],["exit",u[c][1],s],["enter",h,s]],f=s.parser.constructs.insideSpan.null;f&&Fe(p,p.length,0,_r(f,u.slice(c+1,l),s)),Fe(p,p.length,0,[["exit",h,s],["enter",u[l][1],s],["exit",u[l][1],s],["exit",d,s]]),Fe(u,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<u.length;)u[l][1].type==="strikethroughSequenceTemporary"&&(u[l][1].type="data");return u}function a(u,s,l){const c=this.previous,d=this.events;let h=0;return p;function p(g){return c===126&&d[d.length-1][1].type!=="characterEscape"?l(g):(u.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const A=qt(c);if(g===126)return h>1?l(g):(u.consume(g),h++,f);if(h<2&&!n)return l(g);const C=u.exit("strikethroughSequenceTemporary"),x=qt(g);return C._open=!x||x===2&&!!A,C._close=!A||A===2&&!!x,s(g)}}}class k1{constructor(){this.map=[]}add(t,n,r){_1(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function _1(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function A1(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function C1(){return{flow:{null:{name:"table",tokenize:y1,resolveAll:I1}}}}function y1(e,t,n){const r=this;let i=0,a=0,u;return s;function s(S){let U=r.events.length-1;for(;U>-1;){const Y=r.events[U][1].type;if(Y==="lineEnding"||Y==="linePrefix")U--;else break}const j=U>-1?r.events[U][1].type:null,J=j==="tableHead"||j==="tableRow"?N:l;return J===N&&r.parser.lazy[r.now().line]?n(S):J(S)}function l(S){return e.enter("tableHead"),e.enter("tableRow"),c(S)}function c(S){return S===124||(u=!0,a+=1),d(S)}function d(S){return S===null?n(S):V(S)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),f):n(S):Z(S)?re(e,d,"whitespace")(S):(a+=1,u&&(u=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),u=!0,d):(e.enter("data"),h(S)))}function h(S){return S===null||S===124||oe(S)?(e.exit("data"),d(S)):(e.consume(S),S===92?p:h)}function p(S){return S===92||S===124?(e.consume(S),h):h(S)}function f(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),u=!1,Z(S)?re(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):g(S))}function g(S){return S===45||S===58?C(S):S===124?(u=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),A):v(S)}function A(S){return Z(S)?re(e,C,"whitespace")(S):C(S)}function C(S){return S===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),x):S===45?(a+=1,x(S)):S===null||V(S)?B(S):v(S)}function x(S){return S===45?(e.enter("tableDelimiterFiller"),R(S)):v(S)}function R(S){return S===45?(e.consume(S),R):S===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(S))}function L(S){return Z(S)?re(e,B,"whitespace")(S):B(S)}function B(S){return S===124?g(S):S===null||V(S)?!u||i!==a?v(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):v(S)}function v(S){return n(S)}function N(S){return e.enter("tableRow"),$(S)}function $(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),$):S===null||V(S)?(e.exit("tableRow"),t(S)):Z(S)?re(e,$,"whitespace")(S):(e.enter("data"),q(S))}function q(S){return S===null||S===124||oe(S)?(e.exit("data"),$(S)):(e.consume(S),S===92?W:q)}function W(S){return S===92||S===124?(e.consume(S),q):q(S)}}function I1(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],u=[0,0,0,0],s=!1,l=0,c,d,h;const p=new k1;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(eu(p,t,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,h=void 0,a=[0,0,0,0],u=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",d,t]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],h=$n(p,t,a,i,void 0,h),a=[0,0,0,0]),u[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],h=$n(p,t,a,i,void 0,h)),a=u,u=[a[1],n,0,0])):g.type==="tableHead"?(s=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,a[1]!==0?(u[0]=u[1],h=$n(p,t,a,i,n,h)):u[1]!==0&&(h=$n(p,t,u,i,n,h)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(u[3]=n)}for(l!==0&&eu(p,t,l,c,d),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=A1(t.events,n))}return e}function $n(e,t,n,r,i,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},Ut(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=Ut(t.events,n[1]);if(a={type:u,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Ut(t.events,n[2]),d=Ut(t.events,n[3]),h={type:s,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,A=n[3]-n[2]-1;e.add(g,A,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(a.end=Object.assign({},Ut(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function eu(e,t,n,r,i){const a=[],u=Ut(t.events,n);i&&(i.end=Object.assign({},u),a.push(["exit",i,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function Ut(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const N1={name:"tasklistCheck",tokenize:w1};function S1(){return{text:{91:N1}}}function w1(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return oe(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),u):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),u):n(l)}function u(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return V(l)?t(l):Z(l)?e.check({tokenize:L1},t,n)(l):n(l)}}function L1(e,t,n){return re(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function R1(e){return Tl([jp(),h1(),x1(e),C1(),S1()])}const O1={};function D1(e){const t=this,n=e||O1,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(R1(n)),a.push(Mp()),u.push(vp(n))}var P1=Object.defineProperty,M1=Object.defineProperties,v1=Object.getOwnPropertyDescriptors,tu=Object.getOwnPropertySymbols,B1=Object.prototype.hasOwnProperty,F1=Object.prototype.propertyIsEnumerable,nu=(e,t,n)=>t in e?P1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ml=(e,t)=>{for(var n in t||(t={}))B1.call(t,n)&&nu(e,n,t[n]);if(tu)for(var n of tu(t))F1.call(t,n)&&nu(e,n,t[n]);return e},vl=(e,t)=>M1(e,v1(t)),Se=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},H1=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},U1=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!H1(e,n)&&(t+=1)}return t},ft=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},j1=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,z1=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(j1,(t,n,r,i)=>Se(e,i)?t:`${n}\\>${r}`),$1=/(\*\*)([^*]*\*?)$/,Y1=/(__)([^_]*?)$/,q1=/(\*\*\*)([^*]*?)$/,V1=/(\*)([^*]*?)$/,W1=/(_)([^_]*?)$/,G1=/(`)([^`]*?)$/,Q1=/(~~)([^~]*?)$/,Pt=/^[\s_~*`]*$/,Bl=/^[\s]*[-*+][\s]+$/,K1=/[\p{L}\p{N}_]/u,X1=/^```[^`\n]*```?$/,Z1=/^\*{4,}$/,J1=/(__)([^_]+)_$/,eg=/(~~)([^~]+)~$/,ru=/~~/g,pt=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:K1.test(e)},tg=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Fl=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},Ar=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},ng=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
19
|
+
`)return!1}return!1},Hl=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?ng(e,t):!1;if(e[n]===`
|
|
20
|
+
`)return!1}return!1},rg=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
|
|
21
|
+
`)return!1}return!1},Ui=(e,t,n)=>{let r=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
|
|
22
|
+
`){r=l+1;break}let i=e.length;for(let l=t;l<e.length;l+=1)if(e[l]===`
|
|
23
|
+
`){i=l;break}let a=e.substring(r,i),u=0,s=!1;for(let l of a)if(l===n)u+=1;else if(l!==" "&&l!==" "){s=!0;break}return u>=3&&!s},ig=(e,t,n,r)=>n==="\\"||e.includes("$")&&Ar(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&pt(n)&&pt(r)||(!n||n===" "||n===" "||n===`
|
|
24
|
+
`)&&(!r||r===" "||r===" "||r===`
|
|
25
|
+
`)),Ul=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let a=i>0?e[i-1]:"",u=i<r-1?e[i+1]:"";ig(e,i,a,u)||(t+=1)}return t},ag=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Ar(e,t)||Hl(e,t)||rg(e,t)||n==="_"||r==="_"||n&&r&&pt(n)&&pt(r)),ug=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let a=i>0?e[i-1]:"",u=i<r-1?e[i+1]:"";ag(e,i,a,u)||(t+=1)}return t},sg=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},ji=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},iu=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},lg=(e,t,n)=>{if(!t||Pt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
26
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return Bl.test(a)&&t.includes(`
|
|
27
|
+
`)?!0:Ui(e,n,"*")},og=e=>{let t=e.match($1);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Se(e,r)||ft(e,r)||lg(e,n,r)?e:ji(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},cg=(e,t,n)=>{if(!t||Pt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
28
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return Bl.test(a)&&t.includes(`
|
|
29
|
+
`)?!0:Ui(e,n,"_")},dg=e=>{let t=e.match(Y1);if(!t){let i=e.match(J1);if(i){let a=e.lastIndexOf(i[1]);if(!(Se(e,a)||ft(e,a))&&iu(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Se(e,r)||ft(e,r)||cg(e,n,r)?e:iu(e)%2===1?`${e}__`:e},hg=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Ar(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
|
|
30
|
+
`)&&(!i||i===" "||i===" "||i===`
|
|
31
|
+
`)||r&&i&&pt(r)&&pt(i))continue;return n}}return-1},fg=e=>{if(!e.match(V1))return e;let t=hg(e);if(t===-1||Se(e,t)||ft(e,t))return e;let n=e.substring(t+1);return!n||Pt.test(n)?e:Ul(e)%2===1?`${e}*`:e},jl=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Ar(e,n)&&!Hl(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&pt(r)&&pt(i))continue;return n}}return-1},pg=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
32
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},mg=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(ji(t)%2!==1)return null;let n=t.indexOf("**"),r=jl(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},gg=e=>{if(!e.match(W1))return e;let t=jl(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Pt.test(n)||Se(e,t)||ft(e,t))return e;if(ug(e)%2===1){let r=mg(e);return r!==null?r:pg(e)}return e},bg=e=>{let t=ji(e),n=Ul(e);return t%2===0&&n%2===0},Eg=(e,t,n)=>!t||Pt.test(t)||Se(e,n)||ft(e,n)?!0:Ui(e,n,"*"),Tg=e=>{if(Z1.test(e))return e;let t=e.match(q1);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Eg(e,n,r)?e:sg(e)%2===1?bg(e)?e:`${e}***`:e},xg=/<[a-zA-Z/][^>]*$/,kg=e=>{let t=e.match(xg);return!t||t.index===void 0||Se(e,t.index)?e:e.substring(0,t.index).trimEnd()},_g=e=>!e.match(X1)||e.includes(`
|
|
33
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Ag=e=>(e.match(/```/g)||[]).length%2===1,Cg=e=>{let t=_g(e);if(t!==null)return t;let n=e.match(G1);if(n&&!Ag(e)){let r=n[2];if(!r||Pt.test(r))return e;if(U1(e)%2===1)return`${e}\``}return e},zl=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",yg=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!zl(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},Ig=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!zl(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},Ng=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
34
|
+
`,t)!==-1&&!e.endsWith(`
|
|
35
|
+
`)?`${e}
|
|
36
|
+
$$`:`${e}$$`},Sg=e=>yg(e)%2===0?e:Ng(e),wg=e=>Ig(e)%2===1?`${e}$`:e,Lg=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=tg(e,t);if(r===-1||Se(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,u=e.substring(0,a);if(i)return u;let s=e.substring(r+1,t);return n==="text-only"?`${u}${s}`:`${u}[${s}](streamdown:incomplete-link)`},au=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!Se(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Fl(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},Rg=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let u=au(e,t);return e.substring(0,u)+e.substring(u+1)}return`${e}](streamdown:incomplete-link)`}if(Fl(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let u=au(e,t);return e.substring(0,u)+e.substring(u+1)}return`${e}](streamdown:incomplete-link)`}return null},$l=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Se(e,n)){let r=Lg(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Se(e,r)){let i=Rg(e,r,t);if(i!==null)return i}return e},Og=/^-{1,2}$/,Dg=/^[\s]*-{1,2}[\s]+$/,Pg=/^={1,2}$/,Mg=/^[\s]*={1,2}[\s]+$/,vg=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
37
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(Og.test(i)&&!n.match(Dg)){let a=r.split(`
|
|
38
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}if(Pg.test(i)&&!n.match(Mg)){let a=r.split(`
|
|
39
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},Bg=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),Fg=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(Bg,(t,n)=>Se(e,n)?t:"\\~"),Hg=e=>{var t,n;let r=e.match(Q1);if(r){let i=r[2];if(!i||Pt.test(i))return e;let a=e.lastIndexOf(r[1]);if(Se(e,a)||ft(e,a))return e;if(((t=e.match(ru))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(eg);if(i){let a=e.lastIndexOf(i[0].slice(0,2));if(Se(e,a)||ft(e,a))return e;if(((n=e.match(ru))==null?void 0:n.length)%2===1)return`${e}~`}}return e},Fr=e=>e!==!1,Ug=e=>e===!0,ye={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},jg=[{handler:{name:"singleTilde",handle:Fg,priority:ye.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:z1,priority:ye.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:kg,priority:ye.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:vg,priority:ye.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:$l,priority:ye.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:Tg,priority:ye.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:og,priority:ye.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:dg,priority:ye.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:fg,priority:ye.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:gg,priority:ye.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:Cg,priority:ye.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Hg,priority:ye.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:Sg,priority:ye.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:wg,priority:ye.INLINE_KATEX},optionKey:"inlineKatex"}],zg=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return jg.filter(({handler:r,optionKey:i})=>r.name==="links"?Fr(e==null?void 0:e.links)||Fr(e==null?void 0:e.images):r.name==="inlineKatex"?Ug(e==null?void 0:e.inlineKatex):Fr(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:vl(Ml({},r),{handle:a=>$l(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},$g=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=zg(t),a=((n=t==null?void 0:t.handlers)!=null?n:[]).map(s=>{var l;return{handler:vl(Ml({},s),{priority:(l=s.priority)!=null?l:ye.DEFAULT}),earlyReturn:void 0}}),u=[...i,...a].sort((s,l)=>{var c,d;return((c=s.handler.priority)!=null?c:0)-((d=l.handler.priority)!=null?d:0)});for(let{handler:s,earlyReturn:l}of u)if(r=s.handle(r),l!=null&&l(r))return r;return r},Yg=$g;const qg=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vg=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wg={};function uu(e,t){return(Wg.jsx?Vg:qg).test(e)}const Gg=/[ \t\n\f\r]/g;function Qg(e){return typeof e=="object"?e.type==="text"?su(e.value):!1:su(e)}function su(e){return e.replace(Gg,"")===""}var Ht={},Hr,lu;function Kg(){if(lu)return Hr;lu=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
|
|
40
|
+
`,c="/",d="*",h="",p="comment",f="declaration";function g(C,x){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];x=x||{};var R=1,L=1;function B(Y){var H=Y.match(t);H&&(R+=H.length);var z=Y.lastIndexOf(l);L=~z?Y.length-z:L+Y.length}function v(){var Y={line:R,column:L};return function(H){return H.position=new N(Y),W(),H}}function N(Y){this.start=Y,this.end={line:R,column:L},this.source=x.source}N.prototype.content=C;function $(Y){var H=new Error(x.source+":"+R+":"+L+": "+Y);if(H.reason=Y,H.filename=x.source,H.line=R,H.column=L,H.source=C,!x.silent)throw H}function q(Y){var H=Y.exec(C);if(H){var z=H[0];return B(z),C=C.slice(z.length),H}}function W(){q(n)}function S(Y){var H;for(Y=Y||[];H=U();)H!==!1&&Y.push(H);return Y}function U(){var Y=v();if(!(c!=C.charAt(0)||d!=C.charAt(1))){for(var H=2;h!=C.charAt(H)&&(d!=C.charAt(H)||c!=C.charAt(H+1));)++H;if(H+=2,h===C.charAt(H-1))return $("End of comment missing");var z=C.slice(2,H-2);return L+=2,B(z),C=C.slice(H),L+=2,Y({type:p,comment:z})}}function j(){var Y=v(),H=q(r);if(H){if(U(),!q(i))return $("property missing ':'");var z=q(a),ne=Y({type:f,property:A(H[0].replace(e,h)),value:z?A(z[0].replace(e,h)):h});return q(u),ne}}function J(){var Y=[];S(Y);for(var H;H=j();)H!==!1&&(Y.push(H),S(Y));return Y}return W(),J()}function A(C){return C?C.replace(s,h):h}return Hr=g,Hr}var ou;function Xg(){if(ou)return Ht;ou=1;var e=Ht&&Ht.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.default=n;const t=e(Kg());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),s=typeof i=="function";return u.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:d}=l;s?i(c,d,l):d&&(a=a||{},a[c]=d)}),a}return Ht}var un={},cu;function Zg(){if(cu)return un;cu=1,Object.defineProperty(un,"__esModule",{value:!0}),un.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(c){return!c||n.test(c)||e.test(c)},u=function(c,d){return d.toUpperCase()},s=function(c,d){return"".concat(d,"-")},l=function(c,d){return d===void 0&&(d={}),a(c)?c:(c=c.toLowerCase(),d.reactCompat?c=c.replace(i,s):c=c.replace(r,s),c.replace(t,u))};return un.camelCase=l,un}var sn,du;function Jg(){if(du)return sn;du=1;var e=sn&&sn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Xg()),n=Zg();function r(i,a){var u={};return!i||typeof i!="string"||(0,t.default)(i,function(s,l){s&&l&&(u[(0,n.camelCase)(s,a)]=l)}),u}return r.default=r,sn=r,sn}var eb=Jg();const tb=Qu(eb);function kn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?hu(e.position):"start"in e||"end"in e?hu(e):"line"in e||"column"in e?li(e):""}function li(e){return fu(e&&e.line)+":"+fu(e&&e.column)}function hu(e){return li(e&&e.start)+"-"+li(e&&e.end)}function fu(e){return e&&typeof e=="number"?e:1}class Ae extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(u=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=kn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ae.prototype.file="";Ae.prototype.name="";Ae.prototype.reason="";Ae.prototype.message="";Ae.prototype.stack="";Ae.prototype.column=void 0;Ae.prototype.line=void 0;Ae.prototype.ancestors=void 0;Ae.prototype.cause=void 0;Ae.prototype.fatal=void 0;Ae.prototype.place=void 0;Ae.prototype.ruleId=void 0;Ae.prototype.source=void 0;const zi={}.hasOwnProperty,nb=new Map,rb=/[A-Z]/g,ib=new Set(["table","tbody","thead","tfoot","tr"]),ab=new Set(["td","th"]),Yl="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ub(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=pb(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=fb(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?mt:Ln,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ql(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ql(e,t,n){if(t.type==="element")return sb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return lb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return cb(e,t,n);if(t.type==="mdxjsEsm")return ob(e,t);if(t.type==="root")return db(e,t,n);if(t.type==="text")return hb(e,t)}function sb(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=mt,e.schema=i),e.ancestors.push(t);const a=Wl(e,t.tagName,!1),u=mb(e,t);let s=Yi(e,t);return ib.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Qg(l):!0})),Vl(e,u,a,t),$i(u,s),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function lb(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}In(e,t.position)}function ob(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);In(e,t.position)}function cb(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=mt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Wl(e,t.name,!0),u=gb(e,t),s=Yi(e,t);return Vl(e,u,a,t),$i(u,s),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function db(e,t,n){const r={};return $i(r,Yi(e,t)),e.create(t,e.Fragment,r,n)}function hb(e,t){return t.value}function Vl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function $i(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function fb(e,t,n){return r;function r(i,a,u,s){const c=Array.isArray(u.children)?n:t;return s?c(a,u,s):c(a,u)}}function pb(e,t){return n;function n(r,i,a,u){const s=Array.isArray(a.children),l=et(r);return t(i,a,u,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function mb(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&zi.call(t.properties,i)){const a=bb(e,i,t.properties[i]);if(a){const[u,s]=a;e.tableCellAlignToStyle&&u==="align"&&typeof s=="string"&&ab.has(t.tagName)?r=s:n[u]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function gb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const s=u.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else In(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else In(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Yi(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:nb;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const c=i.get(l)||0;u=l+"-"+c,i.set(l,c+1)}}const s=ql(e,a,u);s!==void 0&&n.push(s)}return n}function bb(e,t,n){const r=mr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?hs(n):fs(n)),r.property==="style"){let i=typeof n=="object"?n:Eb(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Tb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Sc[r.property]||r.property:r.attribute,n]}}function Eb(e,t){try{return tb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ae("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=Yl+"#cannot-parse-style-attribute",i}}function Wl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,u;for(;++a<i.length;){const s=uu(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};u=u?{type:"MemberExpression",object:u,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=u}else r=uu(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return zi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);In(e)}function In(e,t){const n=new Ae("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Yl+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Tb(e){const t={};let n;for(n in e)zi.call(e,n)&&(t[xb(n)]=e[n]);return t}function xb(e){let t=e.replace(rb,kb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kb(e){return"-"+e.toLowerCase()}const Ur={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"]},_b={tokenize:Ab};function Ab(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),re(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,u(s)}function u(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return V(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),u)}}const Cb={tokenize:yb},pu={tokenize:Ib};function yb(e){const t=this,n=[];let r=0,i,a,u;return s;function s(L){if(r<n.length){const B=n[r];return t.containerState=B[1],e.attempt(B[0].continuation,l,c)(L)}return c(L)}function l(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&R();const B=t.events.length;let v=B,N;for(;v--;)if(t.events[v][0]==="exit"&&t.events[v][1].type==="chunkFlow"){N=t.events[v][1].end;break}x(r);let $=B;for(;$<t.events.length;)t.events[$][1].end={...N},$++;return Fe(t.events,v+1,0,t.events.slice(B)),t.events.length=$,c(L)}return s(L)}function c(L){if(r===n.length){if(!i)return p(L);if(i.currentConstruct&&i.currentConstruct.concrete)return g(L);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(pu,d,h)(L)}function d(L){return i&&R(),x(r),p(L)}function h(L){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,g(L)}function p(L){return t.containerState={},e.attempt(pu,f,g)(L)}function f(L){return r++,n.push([t.currentConstruct,t.containerState]),p(L)}function g(L){if(L===null){i&&R(),x(0),e.consume(L);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),A(L)}function A(L){if(L===null){C(e.exit("chunkFlow"),!0),x(0),e.consume(L);return}return V(L)?(e.consume(L),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(L),A)}function C(L,B){const v=t.sliceStream(L);if(B&&v.push(null),L.previous=a,a&&(a.next=L),a=L,i.defineSkip(L.start),i.write(v),t.parser.lazy[L.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<u&&(!i.events[N][1].end||i.events[N][1].end.offset>u))return;const $=t.events.length;let q=$,W,S;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(W){S=t.events[q][1].end;break}W=!0}for(x(r),N=$;N<t.events.length;)t.events[N][1].end={...S},N++;Fe(t.events,q+1,0,t.events.slice($)),t.events.length=N}}function x(L){let B=n.length;for(;B-- >L;){const v=n[B];t.containerState=v[1],v[0].exit.call(t,e)}n.length=L}function R(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ib(e,t,n){return re(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const Nb={tokenize:Sb};function Sb(e){const t=this,n=e.attempt(Pn,r,e.attempt(this.parser.constructs.flowInitial,i,re(e,e.attempt(this.parser.constructs.flow,i,e.attempt(bm,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const wb={resolveAll:Ql()},Lb=Gl("string"),Rb=Gl("text");function Gl(e){return{resolveAll:Ql(e==="text"?Ob:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,u,s);return u;function u(d){return c(d)?a(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),l)}function c(d){if(d===null)return!0;const h=i[d];let p=-1;if(h)for(;++p<h.length;){const f=h[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Ql(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function Ob(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,u=-1,s=0,l;for(;a--;){const c=i[a];if(typeof c=="string"){for(u=c.length;c.charCodeAt(u-1)===32;)s++,u--;if(u)break;u=-1}else if(c===-2)l=!0,s++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const Db={42:De,43:De,45:De,48:De,49:De,50:De,51:De,52:De,53:De,54:De,55:De,56:De,57:De,62:Sl},Pb={91:_m},Mb={[-2]:vr,[-1]:vr,32:vr},vb={35:Sm,42:Zn,45:[Ja,Zn],60:Om,61:Ja,95:Zn,96:Xa,126:Xa},Bb={38:Ll,92:wl},Fb={[-5]:Br,[-4]:Br,[-3]:Br,33:Km,38:Ll,42:si,60:[Zp,Hm],91:Zm,92:[Im,wl],93:Hi,95:si,96:dm},Hb={null:[si,wb]},Ub={null:[42,95]},jb={null:[]},zb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ub,contentInitial:Pb,disable:jb,document:Db,flow:vb,flowInitial:Mb,insideSpan:Hb,string:Bb,text:Fb},Symbol.toStringTag,{value:"Module"}));function $b(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let u=[],s=[];const l={attempt:$(v),check:$(N),consume:R,enter:L,exit:B,interrupt:$(N,{interrupt:!0})},c={code:null,containerState:{},defineSkip:A,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:h};let d=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function h(U){return u=ze(u,U),C(),u[u.length-1]!==null?[]:(q(t,0),c.events=_r(a,c.events,c),c.events)}function p(U,j){return qb(f(U),j)}function f(U){return Yb(u,U)}function g(){const{_bufferIndex:U,_index:j,line:J,column:Y,offset:H}=r;return{_bufferIndex:U,_index:j,line:J,column:Y,offset:H}}function A(U){i[U.line]=U.column,S()}function C(){let U;for(;r._index<u.length;){const j=u[r._index];if(typeof j=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<j.length;)x(j.charCodeAt(r._bufferIndex));else x(j)}}function x(U){d=d(U)}function R(U){V(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,S()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=U}function L(U,j){const J=j||{};return J.type=U,J.start=g(),c.events.push(["enter",J,c]),s.push(J),J}function B(U){const j=s.pop();return j.end=g(),c.events.push(["exit",j,c]),j}function v(U,j){q(U,j.from)}function N(U,j){j.restore()}function $(U,j){return J;function J(Y,H,z){let ne,ge,Me,k;return Array.isArray(Y)?Ce(Y):"tokenize"in Y?Ce([Y]):xe(Y);function xe(pe){return bt;function bt(He){const Ue=He!==null&&pe[He],rt=He!==null&&pe.null,vt=[...Array.isArray(Ue)?Ue:Ue?[Ue]:[],...Array.isArray(rt)?rt:rt?[rt]:[]];return Ce(vt)(He)}}function Ce(pe){return ne=pe,ge=0,pe.length===0?z:_(pe[ge])}function _(pe){return bt;function bt(He){return k=W(),Me=pe,pe.partial||(c.currentConstruct=pe),pe.name&&c.parser.constructs.disable.null.includes(pe.name)?be():pe.tokenize.call(j?Object.assign(Object.create(c),j):c,l,Le,be)(He)}}function Le(pe){return U(Me,k),H}function be(pe){return k.restore(),++ge<ne.length?_(ne[ge]):z}}}function q(U,j){U.resolveAll&&!a.includes(U)&&a.push(U),U.resolve&&Fe(c.events,j,c.events.length-j,U.resolve(c.events.slice(j),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c))}function W(){const U=g(),j=c.previous,J=c.currentConstruct,Y=c.events.length,H=Array.from(s);return{from:Y,restore:z};function z(){r=U,c.previous=j,c.currentConstruct=J,c.events.length=Y,s=H,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Yb(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let u;if(n===i)u=[e[n].slice(r,a)];else{if(u=e.slice(n,i),r>-1){const s=u[0];typeof s=="string"?u[0]=s.slice(r):u.shift()}a>0&&u.push(e[i].slice(0,a))}return u}function qb(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
41
|
+
`;break}case-3:{u=`\r
|
|
42
|
+
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&i)continue;u=" ";break}default:u=String.fromCharCode(a)}i=a===-2,r.push(u)}return r.join("")}function Vb(e){const r={constructs:Tl([zb,...(e||{}).extensions||[]]),content:i(_b),defined:[],document:i(Cb),flow:i(Nb),lazy:{},string:i(Lb),text:i(Rb)};return r;function i(a){return u;function u(s){return $b(r,a,s)}}}function Wb(e){for(;!Rl(e););return e}const mu=/[\0\t\n\r]/g;function Gb(){let e=1,t="",n=!0,r;return i;function i(a,u,s){const l=[];let c,d,h,p,f;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),h=0,t="",n&&(a.charCodeAt(0)===65279&&h++,n=void 0);h<a.length;){if(mu.lastIndex=h,c=mu.exec(a),p=c&&c.index!==void 0?c.index:a.length,f=a.charCodeAt(p),!c){t=a.slice(h);break}if(f===10&&h===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),h<p&&(l.push(a.slice(h,p)),e+=p-h),f){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const Kl={}.hasOwnProperty;function Qb(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Kb(n)(Wb(Vb(n).document().write(Gb()(e,t,!0))))}function Kb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ce),autolinkProtocol:W,autolinkEmail:W,atxHeading:a(Zt),blockQuote:a(rt),characterEscape:W,characterReference:W,codeFenced:a(vt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(vt,u),codeText:a(Bn,u),codeTextData:W,data:W,codeFlowValue:W,definition:a(Fn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Hn),hardBreakEscape:a(Bt),hardBreakTrailing:a(Bt),htmlFlow:a(Un,u),htmlFlowData:W,htmlText:a(Un,u),htmlTextData:W,image:a(ee),label:u,link:a(ce),listItem:a(Qe),listItemValue:p,listOrdered:a(Re,h),listUnordered:a(Re),paragraph:a(Et),reference:_,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Zt),strong:a(nc),thematicBreak:a(ic)},exit:{atxHeading:l(),atxHeadingSequence:v,autolink:l(),autolinkEmail:Ue,autolinkProtocol:He,blockQuote:l(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:pe,characterReference:bt,codeFenced:l(C),codeFencedFence:A,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:S,codeIndented:l(x),codeText:l(H),codeTextData:S,data:S,definition:l(),definitionDestinationString:B,definitionLabelString:R,definitionTitleString:L,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(J),htmlFlowData:S,htmlText:l(Y),htmlTextData:S,image:l(ne),label:Me,labelText:ge,lineEnding:U,link:l(z),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Le,resourceDestinationString:k,resourceTitleString:xe,resource:Ce,setextHeading:l(q),setextHeadingLineSequence:$,setextHeadingText:N,strong:l(),thematicBreak:l()}};Xl(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let F={type:"root",children:[]};const Q={stack:[F],tokenStack:[],config:t,enter:s,exit:c,buffer:u,resume:d,data:n},te=[];let se=-1;for(;++se<O.length;)if(O[se][1].type==="listOrdered"||O[se][1].type==="listUnordered")if(O[se][0]==="enter")te.push(se);else{const qe=te.pop();se=i(O,qe,se)}for(se=-1;++se<O.length;){const qe=t[O[se][0]];Kl.call(qe,O[se][1].type)&&qe[O[se][1].type].call(Object.assign({sliceSerialize:O[se][2].sliceSerialize},Q),O[se][1])}if(Q.tokenStack.length>0){const qe=Q.tokenStack[Q.tokenStack.length-1];(qe[1]||gu).call(Q,void 0,qe[0])}for(F.position={start:lt(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:lt(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se<t.transforms.length;)F=t.transforms[se](F)||F;return F}function i(O,F,Q){let te=F-1,se=-1,qe=!1,Tt,it,Jt,en;for(;++te<=Q;){const ve=O[te];switch(ve[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ve[0]==="enter"?se++:se--,en=void 0;break}case"lineEndingBlank":{ve[0]==="enter"&&(Tt&&!en&&!se&&!Jt&&(Jt=te),en=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:en=void 0}if(!se&&ve[0]==="enter"&&ve[1].type==="listItemPrefix"||se===-1&&ve[0]==="exit"&&(ve[1].type==="listUnordered"||ve[1].type==="listOrdered")){if(Tt){let Ft=te;for(it=void 0;Ft--;){const at=O[Ft];if(at[1].type==="lineEnding"||at[1].type==="lineEndingBlank"){if(at[0]==="exit")continue;it&&(O[it][1].type="lineEndingBlank",qe=!0),at[1].type="lineEnding",it=Ft}else if(!(at[1].type==="linePrefix"||at[1].type==="blockQuotePrefix"||at[1].type==="blockQuotePrefixWhitespace"||at[1].type==="blockQuoteMarker"||at[1].type==="listItemIndent"))break}Jt&&(!it||Jt<it)&&(Tt._spread=!0),Tt.end=Object.assign({},it?O[it][1].start:ve[1].end),O.splice(it||te,0,["exit",Tt,ve[2]]),te++,Q++}if(ve[1].type==="listItemPrefix"){const Ft={type:"listItem",_spread:!1,start:Object.assign({},ve[1].start),end:void 0};Tt=Ft,O.splice(te,0,["enter",Ft,ve[2]]),te++,Q++,Jt=void 0,en=!0}}}return O[F][1]._spread=qe,Q}function a(O,F){return Q;function Q(te){s.call(this,O(te),te),F&&F.call(this,te)}}function u(){this.stack.push({type:"fragment",children:[]})}function s(O,F,Q){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([F,Q||void 0]),O.position={start:lt(F.start),end:void 0}}function l(O){return F;function F(Q){O&&O.call(this,Q),c.call(this,Q)}}function c(O,F){const Q=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==O.type&&(F?F.call(this,O,te[0]):(te[1]||gu).call(this,O,te[0]));else throw new Error("Cannot close `"+O.type+"` ("+kn({start:O.start,end:O.end})+"): it’s not open");Q.position.end=lt(O.end)}function d(){return Mi(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(O){if(this.data.expectingFirstListItemValue){const F=this.stack[this.stack.length-2];F.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function f(){const O=this.resume(),F=this.stack[this.stack.length-1];F.lang=O}function g(){const O=this.resume(),F=this.stack[this.stack.length-1];F.meta=O}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const O=this.resume(),F=this.stack[this.stack.length-1];F.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const O=this.resume(),F=this.stack[this.stack.length-1];F.value=O.replace(/(\r?\n|\r)$/g,"")}function R(O){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.label=F,Q.identifier=We(this.sliceSerialize(O)).toLowerCase()}function L(){const O=this.resume(),F=this.stack[this.stack.length-1];F.title=O}function B(){const O=this.resume(),F=this.stack[this.stack.length-1];F.url=O}function v(O){const F=this.stack[this.stack.length-1];if(!F.depth){const Q=this.sliceSerialize(O).length;F.depth=Q}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function $(O){const F=this.stack[this.stack.length-1];F.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function W(O){const Q=this.stack[this.stack.length-1].children;let te=Q[Q.length-1];(!te||te.type!=="text")&&(te=rc(),te.position={start:lt(O.start),end:void 0},Q.push(te)),this.stack.push(te)}function S(O){const F=this.stack.pop();F.value+=this.sliceSerialize(O),F.position.end=lt(O.end)}function U(O){const F=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Q=F.children[F.children.length-1];Q.position.end=lt(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(F.type)&&(W.call(this,O),S.call(this,O))}function j(){this.data.atHardBreak=!0}function J(){const O=this.resume(),F=this.stack[this.stack.length-1];F.value=O}function Y(){const O=this.resume(),F=this.stack[this.stack.length-1];F.value=O}function H(){const O=this.resume(),F=this.stack[this.stack.length-1];F.value=O}function z(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const F=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=F,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function ne(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const F=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=F,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function ge(O){const F=this.sliceSerialize(O),Q=this.stack[this.stack.length-2];Q.label=_p(F),Q.identifier=We(F).toLowerCase()}function Me(){const O=this.stack[this.stack.length-1],F=this.resume(),Q=this.stack[this.stack.length-1];if(this.data.inReference=!0,Q.type==="link"){const te=O.children;Q.children=te}else Q.alt=F}function k(){const O=this.resume(),F=this.stack[this.stack.length-1];F.url=O}function xe(){const O=this.resume(),F=this.stack[this.stack.length-1];F.title=O}function Ce(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function Le(O){const F=this.resume(),Q=this.stack[this.stack.length-1];Q.label=F,Q.identifier=We(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function be(O){this.data.characterReferenceType=O.type}function pe(O){const F=this.sliceSerialize(O),Q=this.data.characterReferenceType;let te;Q?(te=El(F,Q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Bi(F);const se=this.stack[this.stack.length-1];se.value+=te}function bt(O){const F=this.stack.pop();F.position.end=lt(O.end)}function He(O){S.call(this,O);const F=this.stack[this.stack.length-1];F.url=this.sliceSerialize(O)}function Ue(O){S.call(this,O);const F=this.stack[this.stack.length-1];F.url="mailto:"+this.sliceSerialize(O)}function rt(){return{type:"blockquote",children:[]}}function vt(){return{type:"code",lang:null,meta:null,value:""}}function Bn(){return{type:"inlineCode",value:""}}function Fn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Hn(){return{type:"emphasis",children:[]}}function Zt(){return{type:"heading",depth:0,children:[]}}function Bt(){return{type:"break"}}function Un(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function ce(){return{type:"link",title:null,url:"",children:[]}}function Re(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function Qe(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function Et(){return{type:"paragraph",children:[]}}function nc(){return{type:"strong",children:[]}}function rc(){return{type:"text",value:""}}function ic(){return{type:"thematicBreak"}}}function lt(e){return{line:e.line,column:e.column,offset:e.offset}}function Xl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xl(e,r):Xb(e,r)}}function Xb(e,t){let n;for(n in t)if(Kl.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function gu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+kn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+kn({start:t.start,end:t.end})+") is still open")}function Zb(e){const t=this;t.parser=n;function n(r){return Qb(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Jb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function eE(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
43
|
+
`}]}function tE(e,t){const n=t.value?t.value+`
|
|
44
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function nE(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rE(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iE(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Kt(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function aE(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uE(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Zl(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const u=i[i.length-1];return u&&u.type==="text"?u.value+=r:i.push({type:"text",value:r}),i}function sE(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zl(e,t);const i={src:Kt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function lE(e,t){const n={src:Kt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function oE(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function cE(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zl(e,t);const i={href:Kt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function dE(e,t){const n={href:Kt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function hE(e,t,n){const r=e.all(t),i=n?fE(n):Jl(t),a={},u=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const d=r[s];(i||s!==0||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
|
|
45
|
+
`}),d.type==="element"&&d.tagName==="p"&&!i?u.push(...d.children):u.push(d)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&u.push({type:"text",value:`
|
|
46
|
+
`});const c={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,c),e.applyData(t,c)}function fE(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Jl(n[r])}return t}function Jl(e){const t=e.spread;return t??e.children.length>1}function pE(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const u=r[i];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function mE(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gE(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function bE(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function EE(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),i.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=et(t.children[1]),l=xr(t.children[t.children.length-1]);s&&l&&(u.position={start:s,end:l}),i.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function TE(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,s=u?u.length:t.children.length;let l=-1;const c=[];for(;++l<s;){const h=t.children[l],p={},f=u?u[l]:void 0;f&&(p.align=f);let g={type:"element",tagName:a,properties:p,children:[]};h&&(g.children=e.all(h),e.patch(h,g),g=e.applyData(h,g)),c.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function xE(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const bu=9,Eu=32;function kE(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Tu(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Tu(t.slice(i),i>0,!1)),a.join("")}function Tu(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===bu||a===Eu;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===bu||a===Eu;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function _E(e,t){const n={type:"text",value:kE(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function AE(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const CE={blockquote:Jb,break:eE,code:tE,delete:nE,emphasis:rE,footnoteReference:iE,heading:aE,html:uE,imageReference:sE,image:lE,inlineCode:oE,linkReference:cE,link:dE,listItem:hE,list:pE,paragraph:mE,root:gE,strong:bE,table:EE,tableCell:xE,tableRow:TE,text:_E,thematicBreak:AE,toml:Yn,yaml:Yn,definition:Yn,footnoteDefinition:Yn};function Yn(){}function yE(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function IE(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function NE(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||yE,r=e.options.footnoteBackLabel||IE,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const d=e.all(c),h=String(c.identifier).toUpperCase(),p=Kt(h.toLowerCase());let f=0;const g=[],A=e.footnoteCounts.get(h);for(;A!==void 0&&++f<=A;){g.length>0&&g.push({type:"text",value:" "});let R=typeof n=="string"?n:n(l,f);typeof R=="string"&&(R={type:"text",value:R}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const C=d[d.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const R=C.children[C.children.length-1];R&&R.type==="text"?R.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...g)}else d.push(...g);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(c,x),s.push(x)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...wt(u),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
47
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
48
|
+
`}]}}const oi={}.hasOwnProperty,SE={};function wE(e,t){const n=t||SE,r=new Map,i=new Map,a=new Map,u={...CE,...n.handlers},s={all:c,applyData:RE,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:u,one:l,options:n,patch:LE,wrap:DE};return Je(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();h.has(p)||h.set(p,d)}}),s;function l(d,h){const p=d.type,f=s.handlers[p];if(oi.call(s.handlers,p)&&f)return f(s,d,h);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in d){const{children:A,...C}=d,x=wt(C);return x.children=s.all(d),x}return wt(d)}return(s.options.unknownHandler||OE)(s,d,h)}function c(d){const h=[];if("children"in d){const p=d.children;let f=-1;for(;++f<p.length;){const g=s.one(p[f],d);if(g){if(f&&p[f-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=xu(g.value)),!Array.isArray(g)&&g.type==="element")){const A=g.children[0];A&&A.type==="text"&&(A.value=xu(A.value))}Array.isArray(g)?h.push(...g):h.push(g)}}}return h}}function LE(e,t){e.position&&(t.position=Ws(e))}function RE(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,wt(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function OE(e,t){const n=t.data||{},r="value"in t&&!(oi.call(n,"hProperties")||oi.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function DE(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
49
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
50
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
51
|
+
`}),n}function xu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ku(e,t){const n=wE(e,t),r=n.one(e,void 0),i=NE(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
52
|
+
`},i),a}function PE(e,t){return e&&"run"in e?async function(n,r){const i=ku(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ku(n,{file:r,...e||t})}}function _u(e){if(e)throw e}var jr,Au;function ME(){if(Au)return jr;Au=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!h)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},u=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},s=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return jr=function l(){var c,d,h,p,f,g,A=arguments[0],C=1,x=arguments.length,R=!1;for(typeof A=="boolean"&&(R=A,A=arguments[1]||{},C=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});C<x;++C)if(c=arguments[C],c!=null)for(d in c)h=s(A,d),p=s(c,d),A!==p&&(R&&p&&(a(p)||(f=i(p)))?(f?(f=!1,g=h&&i(h)?h:[]):g=h&&a(h)?h:{},u(A,{name:d,newValue:l(R,g,p)})):typeof p<"u"&&u(A,{name:d,newValue:p}));return A},jr}var vE=ME();const zr=Qu(vE);function ci(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function BE(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const u=i.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);s(null,...i);function s(l,...c){const d=e[++a];let h=-1;if(l){u(l);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,d?FE(d,s)(...c):u(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function FE(e,t){let n;return r;function r(...u){const s=e.length>u.length;let l;s&&u.push(i);try{l=e.apply(this,u)}catch(c){const d=c;if(s&&n)throw d;return i(d)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(u,...s){n||(n=!0,t(u,...s))}function a(u){i(null,u)}}const Xe={basename:HE,dirname:UE,extname:jE,join:zE,sep:"/"};function HE(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Mn(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else u<0&&(a=!0,u=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function UE(e){if(Mn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function jE(e){Mn(e);let t=e.length,n=-1,r=0,i=-1,a=0,u;for(;t--;){const s=e.codePointAt(t);if(s===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function zE(...e){let t=-1,n;for(;++t<e.length;)Mn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":$E(n)}function $E(e){Mn(e);const t=e.codePointAt(0)===47;let n=YE(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function YE(e,t){let n="",r=0,i=-1,a=0,u=-1,s,l;for(;++u<=e.length;){if(u<e.length)s=e.codePointAt(u);else{if(s===47)break;s=47}if(s===47){if(!(i===u-1||a===1))if(i!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=u,a=0;continue}}else if(n.length>0){n="",r=0,i=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,u):n=e.slice(i+1,u),r=u-i-1;i=u,a=0}else s===46&&a>-1?a++:a=-1}return n}function Mn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const qE={cwd:VE};function VE(){return"/"}function di(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function WE(e){if(typeof e=="string")e=new URL(e);else if(!di(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return GE(e)}function GE(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 t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+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(t)}const $r=["history","path","basename","stem","extname","dirname"];class QE{constructor(t){let n;t?di(t)?n={path:t}:typeof t=="string"||KE(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":qE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<$r.length;){const a=$r[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)$r.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Xe.basename(this.path):void 0}set basename(t){qr(t,"basename"),Yr(t,"basename"),this.path=Xe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Xe.dirname(this.path):void 0}set dirname(t){Cu(this.basename,"dirname"),this.path=Xe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Xe.extname(this.path):void 0}set extname(t){if(Yr(t,"extname"),Cu(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Xe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){di(t)&&(t=WE(t)),qr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Xe.basename(this.path,this.extname):void 0}set stem(t){qr(t,"stem"),Yr(t,"stem"),this.path=Xe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ae(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Yr(e,t){if(e&&e.includes(Xe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Xe.sep+"`")}function qr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Cu(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function KE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XE=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),ZE={}.hasOwnProperty;class qi extends XE{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=BE()}copy(){const t=new qi;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(zr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Gr("data",this.frozen),this.namespace[t]=n,this):ZE.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gr("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=qn(t),r=this.parser||this.Parser;return Vr("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Vr("process",this.parser||this.Parser),Wr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,u){const s=qn(t),l=r.parse(s);r.run(l,s,function(d,h,p){if(d||!h||!p)return c(d);const f=h,g=r.stringify(f,p);tT(g)?p.value=g:p.result=g,c(d,p)});function c(d,h){d||!h?u(d):a?a(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),Vr("processSync",this.parser||this.Parser),Wr("processSync",this.compiler||this.Compiler),this.process(t,i),Iu("processSync","process",n),r;function i(a,u){n=!0,_u(a),r=u}}run(t,n,r){yu(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,s){const l=qn(n);i.run(t,l,c);function c(d,h,p){const f=h||t;d?s(d):u?u(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Iu("runSync","run",r),i;function a(u,s){_u(u),i=s,r=!0}}stringify(t,n){this.freeze();const r=qn(n),i=this.compiler||this.Compiler;return Wr("stringify",i),yu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Gr("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...h]=c;l(d,h)}else u(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function u(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(i.settings=zr(!0,i.settings,c.settings))}function s(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const h=c[d];a(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,d){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===c){p=h;break}if(p===-1)r.push([c,...d]);else if(d.length>0){let[f,...g]=d;const A=r[p][1];ci(A)&&ci(f)&&(f=zr(!0,A,f)),r[p]=[c,f,...g]}}}}const JE=new qi().freeze();function Vr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Wr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gr(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function yu(e){if(!ci(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Iu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qn(e){return eT(e)?e:new QE(e)}function eT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tT(e){return typeof e=="string"||nT(e)}function nT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Vi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mt=Vi();function eo(e){Mt=e}var Ct={exec:()=>null};function ie(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let u=typeof a=="string"?a:a.source;return u=u.replace(Ne.caret,"$1"),n=n.replace(i,u),r},getRegex:()=>new RegExp(n,t)};return r}var rT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ne={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},iT=/^(?:[ \t]*(?:\n|$))+/,aT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,uT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,vn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,sT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Wi=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,to=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,no=ie(to).replace(/bull/g,Wi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),lT=ie(to).replace(/bull/g,Wi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Gi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,oT=/^[^\n]+/,Qi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,cT=ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Qi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),dT=ie(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Wi).getRegex(),Cr="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ki=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hT=ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ki).replace("tag",Cr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ro=ie(Gi).replace("hr",vn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cr).getRegex(),fT=ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ro).getRegex(),Xi={blockquote:fT,code:aT,def:cT,fences:uT,heading:sT,hr:vn,html:hT,lheading:no,list:dT,newline:iT,paragraph:ro,table:Ct,text:oT},Nu=ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cr).getRegex(),pT={...Xi,lheading:lT,table:Nu,paragraph:ie(Gi).replace("hr",vn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Nu).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cr).getRegex()},mT={...Xi,html:ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ki).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ct,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ie(Gi).replace("hr",vn).replace("heading",` *#{1,6} *[^
|
|
53
|
+
]`).replace("lheading",no).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},gT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,io=/^( {2,}|\\)\n(?!\s*$)/,ET=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Xt=/[\p{P}\p{S}]/u,yr=/[\s\p{P}\p{S}]/u,Zi=/[^\s\p{P}\p{S}]/u,TT=ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,yr).getRegex(),ao=/(?!~)[\p{P}\p{S}]/u,xT=/(?!~)[\s\p{P}\p{S}]/u,kT=/(?:[^\s\p{P}\p{S}]|~)/u,_T=ie(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",rT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),uo=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,AT=ie(uo,"u").replace(/punct/g,Xt).getRegex(),CT=ie(uo,"u").replace(/punct/g,ao).getRegex(),so="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",yT=ie(so,"gu").replace(/notPunctSpace/g,Zi).replace(/punctSpace/g,yr).replace(/punct/g,Xt).getRegex(),IT=ie(so,"gu").replace(/notPunctSpace/g,kT).replace(/punctSpace/g,xT).replace(/punct/g,ao).getRegex(),NT=ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Zi).replace(/punctSpace/g,yr).replace(/punct/g,Xt).getRegex(),ST=ie(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Xt).getRegex(),wT="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",LT=ie(wT,"gu").replace(/notPunctSpace/g,Zi).replace(/punctSpace/g,yr).replace(/punct/g,Xt).getRegex(),RT=ie(/\\(punct)/,"gu").replace(/punct/g,Xt).getRegex(),OT=ie(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),DT=ie(Ki).replace("(?:-->|$)","-->").getRegex(),PT=ie("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",DT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,MT=ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",sr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),lo=ie(/^!?\[(label)\]\[(ref)\]/).replace("label",sr).replace("ref",Qi).getRegex(),oo=ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",Qi).getRegex(),vT=ie("reflink|nolink(?!\\()","g").replace("reflink",lo).replace("nolink",oo).getRegex(),Su=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ji={_backpedal:Ct,anyPunctuation:RT,autolink:OT,blockSkip:_T,br:io,code:bT,del:Ct,delLDelim:Ct,delRDelim:Ct,emStrongLDelim:AT,emStrongRDelimAst:yT,emStrongRDelimUnd:NT,escape:gT,link:MT,nolink:oo,punctuation:TT,reflink:lo,reflinkSearch:vT,tag:PT,text:ET,url:Ct},BT={...Ji,link:ie(/^!?\[(label)\]\((.*?)\)/).replace("label",sr).getRegex(),reflink:ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sr).getRegex()},hi={...Ji,emStrongRDelimAst:IT,emStrongLDelim:CT,delLDelim:ST,delRDelim:LT,url:ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Su).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Su).getRegex()},FT={...hi,br:ie(io).replace("{2,}","*").getRegex(),text:ie(hi.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Vn={normal:Xi,gfm:pT,pedantic:mT},ln={normal:Ji,gfm:hi,breaks:FT,pedantic:BT},HT={"&":"&","<":"<",">":">",'"':""","'":"'"},wu=e=>HT[e];function Ke(e,t){if(t){if(Ne.escapeTest.test(e))return e.replace(Ne.escapeReplace,wu)}else if(Ne.escapeTestNoEncode.test(e))return e.replace(Ne.escapeReplaceNoEncode,wu);return e}function Lu(e){try{e=encodeURI(e).replace(Ne.percentDecode,"%")}catch{return null}return e}function Ru(e,t){var a;let n=e.replace(Ne.findPipe,(u,s,l)=>{let c=!1,d=s;for(;--d>=0&&l[d]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Ne.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((a=r.at(-1))!=null&&a.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(Ne.slashPipe,"|");return r}function on(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function UT(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function jT(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let a=4-n%4;r+=" ".repeat(a),n+=a}else r+=i,n++;return r}function Ou(e,t,n,r,i){let a=t.href,u=t.title||null,s=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:u,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}function zT(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
54
|
+
`).map(a=>{let u=a.match(n.other.beginningSpace);if(u===null)return a;let[s]=u;return s.length>=i.length?a.slice(i.length):a}).join(`
|
|
55
|
+
`)}var lr=class{constructor(e){ae(this,"options");ae(this,"rules");ae(this,"lexer");this.options=e||Mt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:on(n,`
|
|
56
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=zT(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=on(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:on(t[0],`
|
|
57
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=on(t[0],`
|
|
58
|
+
`).split(`
|
|
59
|
+
`),r="",i="",a=[];for(;n.length>0;){let u=!1,s=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))s.push(n[l]),u=!0;else if(!u)s.push(n[l]);else break;n=n.slice(l);let c=s.join(`
|
|
60
|
+
`),d=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
61
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
62
|
+
${c}`:c,i=i?`${i}
|
|
63
|
+
${d}`:d;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=h,n.length===0)break;let p=a.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let f=p,g=f.raw+`
|
|
64
|
+
`+n.join(`
|
|
65
|
+
`),A=this.blockquote(g);a[a.length-1]=A,r=r.substring(0,r.length-f.raw.length)+A.raw,i=i.substring(0,i.length-f.text.length)+A.text;break}else if((p==null?void 0:p.type)==="list"){let f=p,g=f.raw+`
|
|
66
|
+
`+n.join(`
|
|
67
|
+
`),A=this.list(g);a[a.length-1]=A,r=r.substring(0,r.length-p.raw.length)+A.raw,i=i.substring(0,i.length-f.raw.length)+A.raw,n=g.substring(a.at(-1).raw.length).split(`
|
|
68
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),a=i.length>1,u={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let s=this.rules.other.listItemRegex(i),l=!1;for(;e;){let d=!1,h="",p="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let f=jT(t[2].split(`
|
|
69
|
+
`,1)[0],t[1].length),g=e.split(`
|
|
70
|
+
`,1)[0],A=!f.trim(),C=0;if(this.options.pedantic?(C=2,p=f.trimStart()):A?C=t[1].length+1:(C=f.search(this.rules.other.nonSpaceChar),C=C>4?1:C,p=f.slice(C),C+=t[1].length),A&&this.rules.other.blankLine.test(g)&&(h+=g+`
|
|
71
|
+
`,e=e.substring(g.length+1),d=!0),!d){let x=this.rules.other.nextBulletRegex(C),R=this.rules.other.hrRegex(C),L=this.rules.other.fencesBeginRegex(C),B=this.rules.other.headingBeginRegex(C),v=this.rules.other.htmlBeginRegex(C),N=this.rules.other.blockquoteBeginRegex(C);for(;e;){let $=e.split(`
|
|
72
|
+
`,1)[0],q;if(g=$,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),q=g):q=g.replace(this.rules.other.tabCharGlobal," "),L.test(g)||B.test(g)||v.test(g)||N.test(g)||x.test(g)||R.test(g))break;if(q.search(this.rules.other.nonSpaceChar)>=C||!g.trim())p+=`
|
|
73
|
+
`+q.slice(C);else{if(A||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(f)||B.test(f)||R.test(f))break;p+=`
|
|
74
|
+
`+g}A=!g.trim(),h+=$+`
|
|
75
|
+
`,e=e.substring($.length+1),f=q.slice(C)}}u.loose||(l?u.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(l=!0)),u.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),u.raw+=h}let c=u.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;u.raw=u.raw.trimEnd();for(let d of u.items){if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),d.task){if(d.text=d.text.replace(this.rules.other.listReplaceTask,""),((n=d.tokens[0])==null?void 0:n.type)==="text"||((r=d.tokens[0])==null?void 0:r.type)==="paragraph"){d.tokens[0].raw=d.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),d.tokens[0].text=d.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}}let h=this.rules.other.listTaskCheckbox.exec(d.raw);if(h){let p={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};d.checked=p.checked,u.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=p.raw+d.tokens[0].raw,d.tokens[0].text=p.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(p)):d.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):d.tokens.unshift(p)}}if(!u.loose){let h=d.tokens.filter(f=>f.type==="space"),p=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));u.loose=p}}if(u.loose)for(let d of u.items){d.loose=!0;for(let h of d.tokens)h.type==="text"&&(h.type="paragraph")}return u}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){var u;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Ru(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(u=t[3])!=null&&u.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
76
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<n.length;s++)a.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:a.align[s]});for(let s of i)a.rows.push(Ru(s,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
77
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=on(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=UT(t[2],"()");if(a===-2)return;if(a>-1){let u=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,u).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Ou(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return Ou(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,u,s=i,l=0,c=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);(r=c.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(u=[...a].length,r[3]||r[4]){s+=u;continue}else if((r[5]||r[6])&&i%3&&!((i+u)%3)){l+=u;continue}if(s-=u,s>0)continue;u=Math.min(u,u+s+l);let d=[...r[0]][0].length,h=e.slice(0,i+r.index+d+u);if(Math.min(i,u)%2){let f=h.slice(1,-1);return{type:"em",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}let p=h.slice(2,-2);return{type:"strong",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,u,s=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a||(u=[...a].length,u!==i))continue;if(r[3]||r[4]){s+=u;continue}if(s-=u,s>0)continue;u=Math.min(u,u+s);let c=[...r[0]][0].length,d=e.slice(0,i+r.index+c+u),h=d.slice(i,-i);return{type:"del",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let a;do a=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(a!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},$e=class fi{constructor(t){ae(this,"tokens");ae(this,"options");ae(this,"state");ae(this,"inlineQueue");ae(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Mt,this.options.tokenizer=this.options.tokenizer||new lr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Ne,block:Vn.normal,inline:ln.normal};this.options.pedantic?(n.block=Vn.pedantic,n.inline=ln.pedantic):this.options.gfm&&(n.block=Vn.gfm,this.options.breaks?n.inline=ln.breaks:n.inline=ln.gfm),this.tokenizer.rules=n}static get rules(){return{block:Vn,inline:ln}}static lex(t,n){return new fi(n).lex(t)}static lexInline(t,n){return new fi(n).inlineTokens(t)}lex(t){t=t.replace(Ne.carriageReturn,`
|
|
78
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var i,a,u;for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Ne.tabCharGlobal," ").replace(Ne.spaceLine,""));t;){let s;if((a=(i=this.options.extensions)==null?void 0:i.block)!=null&&a.some(c=>(s=c.call({lexer:this},t,n))?(t=t.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let c=n.at(-1);s.raw.length===1&&c!==void 0?c.raw+=`
|
|
79
|
+
`:n.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
80
|
+
`)?"":`
|
|
81
|
+
`)+s.raw,c.text+=`
|
|
82
|
+
`+s.text,this.inlineQueue.at(-1).src=c.text):n.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
83
|
+
`)?"":`
|
|
84
|
+
`)+s.raw,c.text+=`
|
|
85
|
+
`+s.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},n.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),n.push(s);continue}let l=t;if((u=this.options.extensions)!=null&&u.startBlock){let c=1/0,d=t.slice(1),h;this.options.extensions.startBlock.forEach(p=>{h=p.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){let c=n.at(-1);r&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
|
|
86
|
+
`)?"":`
|
|
87
|
+
`)+s.raw,c.text+=`
|
|
88
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(s),r=l.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
89
|
+
`)?"":`
|
|
90
|
+
`)+s.raw,c.text+=`
|
|
91
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(s);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var l,c,d,h,p;this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)f.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},r))??r;let u=!1,s="";for(;t;){u||(s=""),u=!1;let f;if((h=(d=this.options.extensions)==null?void 0:d.inline)!=null&&h.some(A=>(f=A.call({lexer:this},t,n))?(t=t.substring(f.raw.length),n.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let A=n.at(-1);f.type==="text"&&(A==null?void 0:A.type)==="text"?(A.raw+=f.raw,A.text+=f.text):n.push(f);continue}if(f=this.tokenizer.emStrong(t,r,s)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.del(t,r,s)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),n.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),n.push(f);continue}let g=t;if((p=this.options.extensions)!=null&&p.startInline){let A=1/0,C=t.slice(1),x;this.options.extensions.startInline.forEach(R=>{x=R.call({lexer:this},C),typeof x=="number"&&x>=0&&(A=Math.min(A,x))}),A<1/0&&A>=0&&(g=t.substring(0,A+1))}if(f=this.tokenizer.inlineText(g)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(s=f.raw.slice(-1)),u=!0;let A=n.at(-1);(A==null?void 0:A.type)==="text"?(A.raw+=f.raw,A.text+=f.text):n.push(f);continue}if(t){let A="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(A);break}else throw new Error(A)}}return n}},or=class{constructor(t){ae(this,"options");ae(this,"parser");this.options=t||Mt}space(t){return""}code({text:t,lang:n,escaped:r}){var u;let i=(u=(n||"").match(Ne.notSpaceStart))==null?void 0:u[0],a=t.replace(Ne.endingNewline,"")+`
|
|
92
|
+
`;return i?'<pre><code class="language-'+Ke(i)+'">'+(r?a:Ke(a,!0))+`</code></pre>
|
|
93
|
+
`:"<pre><code>"+(r?a:Ke(a,!0))+`</code></pre>
|
|
94
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
95
|
+
${this.parser.parse(t)}</blockquote>
|
|
96
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
97
|
+
`}hr(t){return`<hr>
|
|
98
|
+
`}list(t){let n=t.ordered,r=t.start,i="";for(let s=0;s<t.items.length;s++){let l=t.items[s];i+=this.listitem(l)}let a=n?"ol":"ul",u=n&&r!==1?' start="'+r+'"':"";return"<"+a+u+`>
|
|
99
|
+
`+i+"</"+a+`>
|
|
100
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
101
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
102
|
+
`}table(t){let n="",r="";for(let a=0;a<t.header.length;a++)r+=this.tablecell(t.header[a]);n+=this.tablerow({text:r});let i="";for(let a=0;a<t.rows.length;a++){let u=t.rows[a];r="";for(let s=0;s<u.length;s++)r+=this.tablecell(u[s]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
103
|
+
<thead>
|
|
104
|
+
`+n+`</thead>
|
|
105
|
+
`+i+`</table>
|
|
106
|
+
`}tablerow({text:t}){return`<tr>
|
|
107
|
+
${t}</tr>
|
|
108
|
+
`}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
|
|
109
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ke(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let i=this.parser.parseInline(r),a=Lu(t);if(a===null)return i;t=a;let u='<a href="'+t+'"';return n&&(u+=' title="'+Ke(n)+'"'),u+=">"+i+"</a>",u}image({href:t,title:n,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let a=Lu(t);if(a===null)return Ke(r);t=a;let u=`<img src="${t}" alt="${Ke(r)}"`;return n&&(u+=` title="${Ke(n)}"`),u+=">",u}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ke(t.text)}},ea=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Ve=class pi{constructor(t){ae(this,"options");ae(this,"renderer");ae(this,"textRenderer");this.options=t||Mt,this.options.renderer=this.options.renderer||new or,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ea}static parse(t,n){return new pi(n).parse(t)}static parseInline(t,n){return new pi(n).parseInline(t)}parse(t){var r,i;this.renderer.parser=this;let n="";for(let a=0;a<t.length;a++){let u=t[a];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[u.type]){let l=u,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=c||"";continue}}let s=u;switch(s.type){case"space":{n+=this.renderer.space(s);break}case"hr":{n+=this.renderer.hr(s);break}case"heading":{n+=this.renderer.heading(s);break}case"code":{n+=this.renderer.code(s);break}case"table":{n+=this.renderer.table(s);break}case"blockquote":{n+=this.renderer.blockquote(s);break}case"list":{n+=this.renderer.list(s);break}case"checkbox":{n+=this.renderer.checkbox(s);break}case"html":{n+=this.renderer.html(s);break}case"def":{n+=this.renderer.def(s);break}case"paragraph":{n+=this.renderer.paragraph(s);break}case"text":{n+=this.renderer.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,n=this.renderer){var i,a;this.renderer.parser=this;let r="";for(let u=0;u<t.length;u++){let s=t[u];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[s.type]){let c=this.options.extensions.renderers[s.type].call({parser:this},s);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=c||"";continue}}let l=s;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"checkbox":{r+=n.checkbox(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}},Qn,hn=(Qn=class{constructor(e){ae(this,"options");ae(this,"block");this.options=e||Mt}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?$e.lex:$e.lexInline}provideParser(e=this.block){return e?Ve.parse:Ve.parseInline}},ae(Qn,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),ae(Qn,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Qn),$T=class{constructor(...t){ae(this,"defaults",Vi());ae(this,"options",this.setOptions);ae(this,"parse",this.parseMarkdown(!0));ae(this,"parseInline",this.parseMarkdown(!1));ae(this,"Parser",Ve);ae(this,"Renderer",or);ae(this,"TextRenderer",ea);ae(this,"Lexer",$e);ae(this,"Tokenizer",lr);ae(this,"Hooks",hn);this.use(...t)}walkTokens(t,n){var i,a;let r=[];for(let u of t)switch(r=r.concat(n.call(this,u)),u.type){case"table":{let s=u;for(let l of s.header)r=r.concat(this.walkTokens(l.tokens,n));for(let l of s.rows)for(let c of l)r=r.concat(this.walkTokens(c.tokens,n));break}case"list":{let s=u;r=r.concat(this.walkTokens(s.items,n));break}default:{let s=u;(a=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&a[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{let c=s[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let u=n.renderers[a.name];u?n.renderers[a.name]=function(...s){let l=a.renderer.apply(this,s);return l===!1&&(l=u.apply(this,s)),l}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let u=n[a.level];u?u.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),r.renderer){let a=this.defaults.renderer||new or(this.defaults);for(let u in r.renderer){if(!(u in a))throw new Error(`renderer '${u}' does not exist`);if(["options","parser"].includes(u))continue;let s=u,l=r.renderer[s],c=a[s];a[s]=(...d)=>{let h=l.apply(a,d);return h===!1&&(h=c.apply(a,d)),h||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new lr(this.defaults);for(let u in r.tokenizer){if(!(u in a))throw new Error(`tokenizer '${u}' does not exist`);if(["options","rules","lexer"].includes(u))continue;let s=u,l=r.tokenizer[s],c=a[s];a[s]=(...d)=>{let h=l.apply(a,d);return h===!1&&(h=c.apply(a,d)),h}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new hn;for(let u in r.hooks){if(!(u in a))throw new Error(`hook '${u}' does not exist`);if(["options","block"].includes(u))continue;let s=u,l=r.hooks[s],c=a[s];hn.passThroughHooks.has(u)?a[s]=d=>{if(this.defaults.async&&hn.passThroughHooksRespectAsync.has(u))return(async()=>{let p=await l.call(a,d);return c.call(a,p)})();let h=l.call(a,d);return c.call(a,h)}:a[s]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(a,d);return p===!1&&(p=await c.apply(a,d)),p})();let h=l.apply(a,d);return h===!1&&(h=c.apply(a,d)),h}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,u=r.walkTokens;i.walkTokens=function(s){let l=[];return l.push(u.call(this,s)),a&&(l=l.concat(a.call(this,s))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return $e.lex(t,n??this.defaults)}parser(t,n){return Ve.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},a={...this.defaults,...i},u=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return u(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return u(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return u(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let s=a.hooks?await a.hooks.preprocess(n):n,l=await(a.hooks?await a.hooks.provideLexer(t):t?$e.lex:$e.lexInline)(s,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let d=await(a.hooks?await a.hooks.provideParser(t):t?Ve.parse:Ve.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(d):d})().catch(u);try{a.hooks&&(n=a.hooks.preprocess(n));let s=(a.hooks?a.hooks.provideLexer(t):t?$e.lex:$e.lexInline)(n,a);a.hooks&&(s=a.hooks.processAllTokens(s)),a.walkTokens&&this.walkTokens(s,a.walkTokens);let l=(a.hooks?a.hooks.provideParser(t):t?Ve.parse:Ve.parseInline)(s,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(s){return u(s)}}}onError(t,n){return r=>{if(r.message+=`
|
|
110
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Ke(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Rt=new $T;function ue(e,t){return Rt.parse(e,t)}ue.options=ue.setOptions=function(e){return Rt.setOptions(e),ue.defaults=Rt.defaults,eo(ue.defaults),ue};ue.getDefaults=Vi;ue.defaults=Mt;ue.use=function(...e){return Rt.use(...e),ue.defaults=Rt.defaults,eo(ue.defaults),ue};ue.walkTokens=function(e,t){return Rt.walkTokens(e,t)};ue.parseInline=Rt.parseInline;ue.Parser=Ve;ue.parser=Ve.parse;ue.Renderer=or;ue.TextRenderer=ea;ue.Lexer=$e;ue.lexer=$e.lex;ue.Tokenizer=lr;ue.Hooks=hn;ue.parse=ue;ue.options;ue.setOptions;ue.use;ue.walkTokens;ue.parseInline;Ve.parse;$e.lex;var YT=300,qT="300px",VT=500;function WT(e={}){let{immediate:t=!1,debounceDelay:n=YT,rootMargin:r=qT,idleTimeout:i=VT}=e,[a,u]=I.useState(!1),s=I.useRef(null),l=I.useRef(null),c=I.useRef(null),d=I.useMemo(()=>f=>{let g=Date.now();return window.setTimeout(()=>{f({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),h=I.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(f,g)=>window.requestIdleCallback(f,g):d,[d]),p=I.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?f=>window.cancelIdleCallback(f):f=>{clearTimeout(f)},[]);return I.useEffect(()=>{if(t){u(!0);return}let f=s.current;if(!f)return;l.current&&(clearTimeout(l.current),l.current=null),c.current&&(p(c.current),c.current=null);let g=()=>{l.current&&(clearTimeout(l.current),l.current=null),c.current&&(p(c.current),c.current=null)},A=L=>{c.current=h(B=>{B.timeRemaining()>0||B.didTimeout?(u(!0),L.disconnect()):c.current=h(()=>{u(!0),L.disconnect()},{timeout:i/2})},{timeout:i})},C=L=>{g(),l.current=window.setTimeout(()=>{var B,v;let N=L.takeRecords();(N.length===0||(v=(B=N.at(-1))==null?void 0:B.isIntersecting)!=null&&v)&&A(L)},n)},x=(L,B)=>{L.isIntersecting?C(B):g()},R=new IntersectionObserver(L=>{for(let B of L)x(B,R)},{rootMargin:r,threshold:0});return R.observe(f),()=>{l.current&&clearTimeout(l.current),c.current&&p(c.current),R.disconnect()}},[t,n,r,i,p,h]),{shouldRender:a,containerRef:s}}var co=/\s/,GT=/^\s+$/,QT=new Set(["code","pre","svg","math","annotation"]),KT=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",XT=e=>e.some(t=>KT(t)&&QT.has(t.tagName)),ZT=e=>{let t=[],n="",r=!1;for(let i of e){let a=co.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},JT=e=>{let t=[],n="";for(let r of e)co.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},e2=(e,t,n,r,i,a)=>{let u=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(u+=`;--sd-delay:${a}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:u},children:[{type:"text",value:e}]}},t2=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&"children"in a))return;if(XT(t))return jt;let u=a,s=u.children.indexOf(e);if(s===-1)return;let l=e.value;if(!l.trim()){i.count+=l.length;return}let c=n.sep==="char"?JT(l):ZT(l),d=r.prevContentLength,h=c.map(p=>{let f=i.count;if(i.count+=p.length,GT.test(p))return{type:"text",value:p};let g=d>0&&f<d,A=g?0:i.newIndex++*n.stagger;return e2(p,n.animation,n.duration,n.easing,g,A)});return u.children.splice(s,1,...h),s+h.length},n2=0;function cr(e){var t,n,r,i,a;let u={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word",stagger:(a=e==null?void 0:e.stagger)!=null?a:40},s={prevContentLength:0,lastRenderCharCount:0},l=n2++,c=()=>d=>{let h={count:0,newIndex:0};_i(d,"text",(p,f)=>t2(p,f,u,s,h)),s.lastRenderCharCount=h.count,s.prevContentLength=0};return Object.defineProperty(c,"name",{value:`rehypeAnimate$${l}`}),{name:"animate",type:"animate",rehypePlugin:c,setPrevContentLength(d){s.prevContentLength=d},getLastRenderCharCount(){let d=s.lastRenderCharCount;return s.lastRenderCharCount=0,d}}}cr();var ho=I.createContext(!1),fo=()=>I.useContext(ho),ta=(...e)=>Xu(Zu(e)),r2=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},i2=e=>e?(...t)=>r2(e,Xu(Zu(t))):ta,St=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),u=document.createElement("a");u.href=a,u.download=e,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(a)},mi=I.createContext(ta),K=()=>I.useContext(mi),a2=ta("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),u2=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},s2=I.memo(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:a=!0,...u})=>{let s=K(),l=I.useMemo(()=>s(a2),[s]),c=I.useMemo(()=>{let d={};return t.bg&&(d["--sdm-bg"]=t.bg),t.fg&&(d["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(d,u2(t.rootStyle)),d},[t.bg,t.fg,t.rootStyle]);return T.jsx("div",{className:s(r,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...u,children:T.jsx("pre",{className:s(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:c,children:T.jsx("code",{className:a?s("[counter-increment:line_0] [counter-reset:line]"):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((d,h)=>T.jsx("span",{className:a?l:void 0,children:d.length===0||d.length===1&&d[0].content===""?`
|
|
111
|
+
`:d.map((p,f)=>{let g={},A=!!p.bgColor;if(p.color&&(g["--sdm-c"]=p.color),p.bgColor&&(g["--sdm-tbg"]=p.bgColor),p.htmlStyle)for(let[C,x]of Object.entries(p.htmlStyle))C==="color"?g["--sdm-c"]=x:C==="background-color"?(g["--sdm-tbg"]=x,A=!0):g[C]=x;return T.jsx("span",{className:s("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",A&&"bg-[var(--sdm-tbg)]",A&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:g,...p.htmlAttrs,children:p.content},f)})},h))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),po=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let a=K();return T.jsx("div",{className:a("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},mo=I.createContext({code:""}),go=()=>I.useContext(mo),bo=({language:e})=>{let t=K();return T.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:T.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},l2=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
112
|
+
`;)t--;return e.slice(0,t)},o2=I.lazy(()=>Ku(()=>import("./highlighted-body-OFNGDK62-e-w61YLy.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.HighlightedCodeBlockBody}))),Eo=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:u,...s})=>{let l=K(),c=I.useMemo(()=>l2(e),[e]),d=I.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:c.split(`
|
|
113
|
+
`).map(h=>[{content:h,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[c]);return T.jsx(mo.Provider,{value:{code:e},children:T.jsxs(po,{isIncomplete:i,language:t,children:[T.jsx(bo,{language:t}),r?T.jsx("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:T.jsx("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,T.jsx(I.Suspense,{fallback:T.jsx(s2,{className:n,language:t,lineNumbers:u,result:d,startLine:a,...s}),children:T.jsx(o2,{className:n,code:c,language:t,lineNumbers:u,raw:d,startLine:a,...s})})]})})},c2=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),d2=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),h2=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),f2=e=>T.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[T.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),p2=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),m2=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),g2=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),b2=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),E2=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),T2=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),fn={CheckIcon:c2,CopyIcon:d2,DownloadIcon:h2,ExternalLinkIcon:b2,Loader2Icon:f2,Maximize2Icon:p2,RotateCcwIcon:m2,XIcon:g2,ZoomInIcon:E2,ZoomOutIcon:T2},To=I.createContext(fn),x2=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},Du=({icons:e,children:t})=>{let n=I.useRef(e),r=I.useRef(e?{...fn,...e}:fn);x2(n.current,e)||(n.current=e,r.current=e?{...fn,...e}:fn);let i=r.current;return T.jsx(To.Provider,{value:i,children:t})},Ye=()=>I.useContext(To),na={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},gi=I.createContext(na),nt=()=>I.useContext(gi),bi=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...u})=>{let s=K(),[l,c]=I.useState(!1),d=I.useRef(0),{code:h}=go(),{isAnimating:p}=I.useContext(we),f=nt(),g=a??h,A=async()=>{var R;if(typeof window>"u"||!((R=navigator==null?void 0:navigator.clipboard)!=null&&R.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{l||(await navigator.clipboard.writeText(g),c(!0),e==null||e(),d.current=window.setTimeout(()=>c(!1),n))}catch(L){t==null||t(L)}};I.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);let C=Ye(),x=l?C.CheckIcon:C.CopyIcon;return T.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:p,onClick:A,title:f.copyCode,type:"button",...u,children:r??T.jsx(x,{size:14})})},Pu={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},xo=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...u})=>{let s=K(),{code:l}=go(),{isAnimating:c}=I.useContext(we),d=nt(),h=Ye(),p=a??l,f=`file.${n&&n in Pu?Pu[n]:"txt"}`,g="text/plain",A=()=>{try{St(f,p,g),e==null||e()}catch(C){t==null||t(C)}};return T.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:c,onClick:A,title:d.downloadFile,type:"button",...u,children:r??T.jsx(h.DownloadIcon,{size:14})})},Ei=()=>{let{Loader2Icon:e}=Ye(),t=K();return T.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[T.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),T.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:T.jsx(e,{className:t("size-4 animate-spin")})})]})},k2=/\.[^/.]+$/,_2=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...u})=>{let{DownloadIcon:s}=Ye(),l=K(),c=I.useRef(null),[d,h]=I.useState(!1),[p,f]=I.useState(!1),g=nt(),A=u.width!=null||u.height!=null,C=(d||A)&&!p,x=p&&!A;I.useEffect(()=>{let v=c.current;if(v!=null&&v.complete){let N=v.naturalWidth>0;h(N),f(!N)}},[]);let R=I.useCallback(v=>{h(!0),f(!1),i==null||i(v)},[i]),L=I.useCallback(v=>{h(!1),f(!0),a==null||a(v)},[a]),B=async()=>{if(n)try{let v=await(await fetch(n)).blob(),N=new URL(n,window.location.origin).pathname.split("/").pop()||"",$=N.split(".").pop(),q=N.includes(".")&&$!==void 0&&$.length<=4,W="";if(q)W=N;else{let S=v.type,U="png";S.includes("jpeg")||S.includes("jpg")?U="jpg":S.includes("png")?U="png":S.includes("svg")?U="svg":S.includes("gif")?U="gif":S.includes("webp")&&(U="webp"),W=`${(r||N||"image").replace(k2,"")}.${U}`}St(W,v,v.type)}catch{window.open(n,"_blank")}};return n?T.jsxs("div",{className:l("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[T.jsx("img",{alt:r,className:l("max-w-full rounded-lg",x&&"hidden",t),"data-streamdown":"image",onError:L,onLoad:R,ref:c,src:n,...u}),x&&T.jsx("span",{className:l("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:g.imageNotAvailable}),T.jsx("div",{className:l("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),C&&T.jsx("button",{className:l("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:B,title:g.downloadImage,type:"button",children:T.jsx(s,{size:14})})]}):null},_n=0,ra=()=>{_n+=1,_n===1&&(document.body.style.overflow="hidden")},ia=()=>{_n=Math.max(0,_n-1),_n===0&&(document.body.style.overflow="")},A2=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:u,XIcon:s}=Ye(),l=K(),[c,d]=I.useState(!1),h=nt(),p=I.useCallback(async()=>{try{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)}catch{}},[e]),f=I.useCallback(()=>{r(),n()},[r,n]);return I.useEffect(()=>{if(t){ra();let g=A=>{A.key==="Escape"&&n()};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),ia()}}},[t,n]),t?T.jsx("div",{className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:g=>{g.key==="Escape"&&n()},role:"button",tabIndex:0,children:T.jsxs("div",{className:l("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[T.jsx("button",{className:l("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:h.close,type:"button",children:T.jsx(s,{size:16})}),T.jsxs("div",{className:l("flex flex-col gap-2"),children:[T.jsxs("div",{className:l("flex items-center gap-2 font-semibold text-lg"),children:[T.jsx(u,{size:20}),T.jsx("span",{children:h.openExternalLink})]}),T.jsx("p",{className:l("text-muted-foreground text-sm"),children:h.externalLinkWarning})]}),T.jsx("div",{className:l("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),T.jsxs("div",{className:l("flex gap-2"),children:[T.jsx("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:p,type:"button",children:c?T.jsxs(T.Fragment,{children:[T.jsx(i,{size:14}),T.jsx("span",{children:h.copied})]}):T.jsxs(T.Fragment,{children:[T.jsx(a,{size:14}),T.jsx("span",{children:h.copyLink})]})}),T.jsxs("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:f,type:"button",children:[T.jsx(u,{size:14}),T.jsx("span",{children:h.openLink})]})]})]})}):null},Ti=I.createContext(null),aa=()=>I.useContext(Ti),_x=()=>{var e;let t=aa();return(e=t==null?void 0:t.code)!=null?e:null},ua=()=>{var e;let t=aa();return(e=t==null?void 0:t.mermaid)!=null?e:null},C2=e=>{var t;let n=aa();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},y2=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let u="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),s=new Image;s.crossOrigin="anonymous",s.onload=()=>{let l=document.createElement("canvas"),c=s.width*r,d=s.height*r;l.width=c,l.height=d;let h=l.getContext("2d");if(!h){a(new Error("Failed to create 2D canvas context for PNG export"));return}h.drawImage(s,0,0,c,d),l.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},s.onerror=()=>a(new Error("Failed to load SVG image")),s.src=u})},I2=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let u=K(),[s,l]=I.useState(!1),c=I.useRef(null),{isAnimating:d}=I.useContext(we),h=Ye(),p=ua(),f=nt(),g=async A=>{try{if(A==="mmd"){St("diagram.mmd",e,"text/plain"),l(!1),r==null||r(A);return}if(!p){a==null||a(new Error("Mermaid plugin not available"));return}let C=p.getMermaid(i),x=e.split("").reduce((B,v)=>(B<<5)-B+v.charCodeAt(0)|0,0),R=`mermaid-${Math.abs(x)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:L}=await C.render(R,e);if(!L){a==null||a(new Error("SVG not found. Please wait for the diagram to render."));return}if(A==="svg"){St("diagram.svg",L,"image/svg+xml"),l(!1),r==null||r(A);return}if(A==="png"){let B=await y2(L);St("diagram.png",B,"image/png"),r==null||r(A),l(!1);return}}catch(C){a==null||a(C)}};return I.useEffect(()=>{let A=C=>{let x=C.composedPath();c.current&&!x.includes(c.current)&&l(!1)};return document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[]),T.jsxs("div",{className:u("relative"),ref:c,children:[T.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:d,onClick:()=>l(!s),title:f.downloadDiagram,type:"button",children:t??T.jsx(h.DownloadIcon,{size:14})}),s?T.jsxs("div",{className:u("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("svg"),title:f.downloadDiagramAsSvg,type:"button",children:f.mermaidFormatSvg}),T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("png"),title:f.downloadDiagramAsPng,type:"button",children:f.mermaidFormatPng}),T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("mmd"),title:f.downloadDiagramAsMmd,type:"button",children:f.mermaidFormatMmd})]}):null]})},N2=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:u,XIcon:s}=Ye(),l=K(),[c,d]=I.useState(!1),{isAnimating:h,controls:p}=I.useContext(we),f=nt(),g=(()=>{if(typeof p=="boolean")return p;let C=p.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.panZoom!==!1})(),A=()=>{d(!c)};return I.useEffect(()=>{if(c){ra();let C=x=>{x.key==="Escape"&&d(!1)};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C),ia()}}},[c]),I.useEffect(()=>{c?n==null||n():r&&r()},[c,n,r]),T.jsxs(T.Fragment,{children:[T.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:h,onClick:A,title:f.viewFullscreen,type:"button",...a,children:T.jsx(u,{size:14})}),c?Ju.createPortal(T.jsxs("div",{className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:A,onKeyDown:C=>{C.key==="Escape"&&A()},role:"button",tabIndex:0,children:[T.jsx("button",{className:l("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:A,title:f.exitFullscreen,type:"button",children:T.jsx(s,{size:20})}),T.jsx("div",{className:l("flex size-full items-center justify-center p-4"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:T.jsx(tc,{chart:e,className:l("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:g})})]}),document.body):null]})},Ir=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let s of a)r.push(((t=s.textContent)==null?void 0:t.trim())||"");let u=e.querySelectorAll("tbody tr");for(let s of u){let l=[],c=s.querySelectorAll("td");for(let d of c)l.push(((n=d.textContent)==null?void 0:n.trim())||"");i.push(l)}return{headers:r,rows:i}},Nn=e=>{let{headers:t,rows:n}=e,r=s=>{let l=!1,c=!1;for(let d of s){if(d==='"'){l=!0,c=!0;break}(d===","||d===`
|
|
114
|
+
`)&&(l=!0)}return l?c?`"${s.replace(/"/g,'""')}"`:`"${s}"`:s},i=t.length>0?n.length+1:n.length,a=new Array(i),u=0;t.length>0&&(a[u]=t.map(r).join(","),u+=1);for(let s of n)a[u]=s.map(r).join(","),u+=1;return a.join(`
|
|
115
|
+
`)},ko=e=>{let{headers:t,rows:n}=e,r=s=>{let l=!1;for(let d of s)if(d===" "||d===`
|
|
116
|
+
`||d==="\r"){l=!0;break}if(!l)return s;let c=[];for(let d of s)d===" "?c.push("\\t"):d===`
|
|
117
|
+
`?c.push("\\n"):d==="\r"?c.push("\\r"):c.push(d);return c.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),u=0;t.length>0&&(a[u]=t.map(r).join(" "),u+=1);for(let s of n)a[u]=s.map(r).join(" "),u+=1;return a.join(`
|
|
118
|
+
`)},Jn=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},Sn=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(s=>Jn(s));r[i]=`| ${a.join(" | ")} |`,i+=1;let u=new Array(t.length);for(let s=0;s<t.length;s+=1)u[s]="---";r[i]=`| ${u.join(" | ")} |`,i+=1;for(let s of n)if(s.length<t.length){let l=new Array(t.length);for(let c=0;c<t.length;c+=1)l[c]=c<s.length?Jn(s[c]):"";r[i]=`| ${l.join(" | ")} |`,i+=1}else{let l=s.map(c=>Jn(c));r[i]=`| ${l.join(" | ")} |`,i+=1}return r.join(`
|
|
119
|
+
`)},sa=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=K(),[u,s]=I.useState(!1),[l,c]=I.useState(!1),d=I.useRef(null),h=I.useRef(0),{isAnimating:p}=I.useContext(we),f=nt(),g=async x=>{var R,L;if(typeof window>"u"||!((R=navigator==null?void 0:navigator.clipboard)!=null&&R.write)){r==null||r(new Error("Clipboard API not available"));return}try{let B=(L=d.current)==null?void 0:L.closest('[data-streamdown="table-wrapper"]'),v=B==null?void 0:B.querySelector("table");if(!v){r==null||r(new Error("Table not found"));return}let N=Ir(v),$=({csv:Nn,tsv:ko,md:Sn}[x]||Sn)(N),q=new ClipboardItem({"text/plain":new Blob([$],{type:"text/plain"}),"text/html":new Blob([v.outerHTML],{type:"text/html"})});await navigator.clipboard.write([q]),c(!0),s(!1),n==null||n(x),h.current=window.setTimeout(()=>c(!1),i)}catch(B){r==null||r(B)}};I.useEffect(()=>{let x=R=>{let L=R.composedPath();d.current&&!L.includes(d.current)&&s(!1)};return document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x),window.clearTimeout(h.current)}},[]);let A=Ye(),C=l?A.CheckIcon:A.CopyIcon;return T.jsxs("div",{className:a("relative"),ref:d,children:[T.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:p,onClick:()=>s(!u),title:f.copyTable,type:"button",children:e??T.jsx(C,{height:14,width:14})}),u?T.jsxs("div",{className:a("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("md"),title:f.copyTableAsMarkdown,type:"button",children:f.tableFormatMarkdown}),T.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("csv"),title:f.copyTableAsCsv,type:"button",children:f.tableFormatCsv}),T.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("tsv"),title:f.copyTableAsTsv,type:"button",children:f.tableFormatTsv})]}):null]})},S2=({children:e,className:t,onDownload:n,onError:r,format:i="csv",filename:a})=>{let u=K(),{isAnimating:s}=I.useContext(we),l=nt(),c=Ye(),d=h=>{try{let p=h.currentTarget.closest('[data-streamdown="table-wrapper"]'),f=p==null?void 0:p.querySelector("table");if(!f){r==null||r(new Error("Table not found"));return}let g=Ir(f),A="",C="",x="";switch(i){case"csv":A=Nn(g),C="text/csv",x="csv";break;case"markdown":A=Sn(g),C="text/markdown",x="md";break;default:A=Nn(g),C="text/csv",x="csv"}St(`${a||"table"}.${x}`,A,C),n==null||n()}catch(p){r==null||r(p)}};return T.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:s,onClick:d,title:i==="csv"?l.downloadTableAsCsv:l.downloadTableAsMarkdown,type:"button",children:e??T.jsx(c.DownloadIcon,{size:14})})},la=({children:e,className:t,onDownload:n,onError:r})=>{let i=K(),[a,u]=I.useState(!1),s=I.useRef(null),{isAnimating:l}=I.useContext(we),c=nt(),d=Ye(),h=p=>{var f;try{let g=(f=s.current)==null?void 0:f.closest('[data-streamdown="table-wrapper"]'),A=g==null?void 0:g.querySelector("table");if(!A){r==null||r(new Error("Table not found"));return}let C=Ir(A),x=p==="csv"?Nn(C):Sn(C);St(`table.${p==="csv"?"csv":"md"}`,x,p==="csv"?"text/csv":"text/markdown"),u(!1),n==null||n(p)}catch(g){r==null||r(g)}};return I.useEffect(()=>{let p=f=>{let g=f.composedPath();s.current&&!g.includes(s.current)&&u(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),T.jsxs("div",{className:i("relative"),ref:s,children:[T.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:()=>u(!a),title:c.downloadTable,type:"button",children:e??T.jsx(d.DownloadIcon,{size:14})}),a?T.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>h("csv"),title:c.downloadTableAsCsv,type:"button",children:c.tableFormatCsv}),T.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>h("markdown"),title:c.downloadTableAsMarkdown,type:"button",children:c.tableFormatMarkdown})]}):null]})},w2=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=Ye(),u=K(),[s,l]=I.useState(!1),{isAnimating:c}=I.useContext(we),d=nt(),h=()=>{l(!0)},p=()=>{l(!1)};return I.useEffect(()=>{if(s){ra();let f=g=>{g.key==="Escape"&&l(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),ia()}}},[s]),T.jsxs(T.Fragment,{children:[T.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:h,title:d.viewFullscreen,type:"button",children:T.jsx(i,{size:14})}),s?Ju.createPortal(T.jsx("div",{"aria-label":d.viewFullscreen,"aria-modal":"true",className:u("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:p,onKeyDown:f=>{f.key==="Escape"&&p()},role:"dialog",children:T.jsxs("div",{className:u("flex h-full flex-col"),onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:[T.jsxs("div",{className:u("flex items-center justify-end gap-1 p-4"),children:[n?T.jsx(sa,{}):null,r?T.jsx(la,{}):null,T.jsx("button",{className:u("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:p,title:d.exitFullscreen,type:"button",children:T.jsx(a,{size:20})})]}),T.jsx("div",{className:u("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:T.jsx("table",{className:u("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},L2=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...u})=>{let s=K(),l=n&&r,c=n&&i,d=n&&a,h=l||c||d;return T.jsxs("div",{className:s("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[h?T.jsxs("div",{className:s("flex items-center justify-end gap-1"),children:[l?T.jsx(sa,{}):null,c?T.jsx(la,{}):null,d?T.jsx(w2,{showCopy:l,showDownload:c,children:e}):null]}):null,T.jsx("div",{className:s("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:T.jsx("table",{className:s("w-full divide-y divide-border",t),"data-streamdown":"table",...u,children:e})})]})},R2=/startLine=(\d+)/,O2=/\bnoLineNumbers\b/,D2=I.lazy(()=>Ku(()=>Promise.resolve().then(()=>bx),void 0).then(e=>({default:e.Mermaid}))),P2=/language-([^\s]+)/;function Nr(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(i==null?void 0:i.line)===(a==null?void 0:a.line)&&(i==null?void 0:i.column)===(a==null?void 0:a.column)}function he(e,t){return e.className===t.className&&Nr(e.node,t.node)}var xi=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Qr=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Mu=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Wn=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},oa=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>he(e,t));oa.displayName="MarkdownOl";var _o=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&Nr(e.node,t.node));_o.displayName="MarkdownLi";var Ao=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>he(e,t));Ao.displayName="MarkdownUl";var Co=I.memo(({className:e,node:t,...n})=>{let r=K();return T.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>he(e,t));Co.displayName="MarkdownHr";var yo=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>he(e,t));yo.displayName="MarkdownStrong";var M2=({children:e,className:t,href:n,node:r,...i})=>{let a=K(),{linkSafety:u}=I.useContext(we),[s,l]=I.useState(!1),c=n==="streamdown:incomplete-link",d=I.useCallback(async g=>{if(!(!(u!=null&&u.enabled&&n)||c)){if(g.preventDefault(),u.onLinkCheck&&await u.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}l(!0)}},[u,n,c]),h=I.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),p=I.useCallback(()=>{l(!1)},[]),f={url:n??"",isOpen:s,onClose:p,onConfirm:h};return u!=null&&u.enabled&&n?T.jsxs(T.Fragment,{children:[T.jsx("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",onClick:d,type:"button",children:e}),u.renderModal?u.renderModal(f):T.jsx(A2,{...f})]}):T.jsx("a",{className:a("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Io=I.memo(M2,(e,t)=>he(e,t)&&e.href===t.href);Io.displayName="MarkdownA";var No=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>he(e,t));No.displayName="MarkdownH1";var So=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>he(e,t));So.displayName="MarkdownH2";var wo=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>he(e,t));wo.displayName="MarkdownH3";var Lo=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>he(e,t));Lo.displayName="MarkdownH4";var Ro=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>he(e,t));Ro.displayName="MarkdownH5";var Oo=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>he(e,t));Oo.displayName="MarkdownH6";var Do=I.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=I.useContext(we),a=xi(i,"table"),u=Qr(i,"copy"),s=Qr(i,"download"),l=Qr(i,"fullscreen");return T.jsx(L2,{className:t,showControls:a,showCopy:u,showDownload:s,showFullscreen:l,...r,children:e})},(e,t)=>he(e,t));Do.displayName="MarkdownTable";var Po=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>he(e,t));Po.displayName="MarkdownThead";var Mo=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>he(e,t));Mo.displayName="MarkdownTbody";var vo=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>he(e,t));vo.displayName="MarkdownTr";var Bo=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>he(e,t));Bo.displayName="MarkdownTh";var Fo=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>he(e,t));Fo.displayName="MarkdownTd";var Ho=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>he(e,t));Ho.displayName="MarkdownBlockquote";var Uo=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>he(e,t));Uo.displayName="MarkdownSup";var jo=I.memo(({children:e,className:t,node:n,...r})=>{let i=K();return T.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>he(e,t));jo.displayName="MarkdownSub";var zo=I.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=u=>{var s,l;if(!I.isValidElement(u))return!1;let c=Array.isArray(u.props.children)?u.props.children:[u.props.children],d=!1,h=!1;for(let p of c)if(p){if(typeof p=="string")p.trim()!==""&&(d=!0);else if(I.isValidElement(p))if(((s=p.props)==null?void 0:s["data-footnote-backref"])!==void 0)h=!0;else{let f=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let g of f){if(typeof g=="string"&&g.trim()!==""){d=!0;break}if(I.isValidElement(g)&&((l=g.props)==null?void 0:l["data-footnote-backref"])===void 0){d=!0;break}}}}return h&&!d},a=Array.isArray(e)?e.map(u=>{if(!I.isValidElement(u))return u;if(u.type===oa){let s=(Array.isArray(u.props.children)?u.props.children:[u.props.children]).filter(l=>!i(l));return s.length===0?null:{...u,props:{...u.props,children:s}}}return u}):e;return(Array.isArray(a)?a.some(u=>u!==null):a!==null)?T.jsx("section",{className:t,...r,children:a}):null}return T.jsx("section",{className:t,...r,children:e})},(e,t)=>he(e,t));zo.displayName="MarkdownSection";var v2=({node:e,className:t,children:n,...r})=>{var i,a;let u=K(),s=!("data-block"in r),{mermaid:l,controls:c,lineNumbers:d}=I.useContext(we),h=ua(),p=fo(),f=t==null?void 0:t.match(P2),g=(i=f==null?void 0:f.at(1))!=null?i:"",A=C2(g);if(s)return T.jsx("code",{className:u("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let C=(a=e==null?void 0:e.properties)==null?void 0:a.metastring,x=C==null?void 0:C.match(R2),R=x?Number.parseInt(x[1],10):void 0,L=R!==void 0&&R>=1?R:void 0,B=!(C&&O2.test(C))&&d!==!1,v="";if(I.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?v=n.props.children:typeof n=="string"&&(v=n),A){let W=A.component;return T.jsx(I.Suspense,{fallback:T.jsx(Ei,{}),children:T.jsx(W,{code:v,isIncomplete:p,language:g,meta:C})})}if(g==="mermaid"&&h){let W=xi(c,"mermaid"),S=Wn(c,"download"),U=Wn(c,"copy"),j=Wn(c,"fullscreen"),J=Wn(c,"panZoom"),Y=W&&(S||U||j);return T.jsx(I.Suspense,{fallback:T.jsx(Ei,{}),children:T.jsxs("div",{className:u("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[T.jsx("div",{className:u("flex h-8 items-center text-muted-foreground text-xs"),children:T.jsx("span",{className:u("ml-1 font-mono lowercase"),children:"mermaid"})}),Y?T.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:T.jsxs("div",{className:u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[S?T.jsx(I2,{chart:v,config:l==null?void 0:l.config}):null,U?T.jsx(bi,{code:v}):null,j?T.jsx(N2,{chart:v,config:l==null?void 0:l.config}):null]})}):null,T.jsx("div",{className:u("rounded-md border border-border bg-background"),children:T.jsx(D2,{chart:v,config:l==null?void 0:l.config,showControls:J})})]})})}let N=xi(c,"code"),$=Mu(c,"download"),q=Mu(c,"copy");return T.jsx(Eo,{className:t,code:v,isIncomplete:p,language:g,lineNumbers:B,startLine:L,children:N?T.jsxs(T.Fragment,{children:[$?T.jsx(xo,{code:v,language:g}):null,q?T.jsx(bi,{}):null]}):null})},$o=I.memo(v2,(e,t)=>e.className===t.className&&Nr(e.node,t.node));$o.displayName="MarkdownCode";var Yo=I.memo(_2,(e,t)=>e.className===t.className&&Nr(e.node,t.node));Yo.displayName="MarkdownImg";var qo=I.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&I.isValidElement(r[0])){let i=r[0].props.node,a=i==null?void 0:i.tagName;if(a==="img")return T.jsx(T.Fragment,{children:e});if(a==="code"&&"data-block"in r[0].props)return T.jsx(T.Fragment,{children:e})}return T.jsx("p",{...n,children:e})},(e,t)=>he(e,t));qo.displayName="MarkdownParagraph";var B2={ol:oa,li:_o,ul:Ao,hr:Co,strong:yo,a:Io,h1:No,h2:So,h3:wo,h4:Lo,h5:Ro,h6:Oo,table:Do,thead:Po,tbody:Mo,tr:vo,th:Bo,td:Fo,blockquote:Ho,code:$o,img:Yo,pre:({children:e})=>I.isValidElement(e)?I.cloneElement(e,{"data-block":"true"}):e,sup:Uo,sub:jo,p:qo,section:zo},F2=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,H2=new RegExp("\\p{L}","u");function ki(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(F2.test(n))return"rtl";if(H2.test(n))return"ltr"}return"ltr"}var U2=/^[ \t]{0,3}(`{3,}|~{3,})/,j2=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,vu=e=>{let t=e.split(`
|
|
120
|
+
`),n=null,r=0;for(let i of t){let a=U2.exec(i);if(n===null){if(a){let u=a[1];n=u[0],r=u.length}}else if(a){let u=a[1],s=u[0],l=u.length;s===n&&l>=r&&(n=null,r=0)}}return n!==null},z2=e=>{let t=e.split(`
|
|
121
|
+
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&j2.test(r))return!0}return!1},$2=()=>e=>{Je(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Bu=[],Fu={allowDangerousHtml:!0},Gn=new WeakMap,Y2=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let d="default";return this.keyCache.set(e,d),d}let a=d=>{if(!d||d.length===0)return"";let h="";for(let p=0;p<d.length;p+=1){let f=d[p];if(p>0&&(h+=","),Array.isArray(f)){let[g,A]=f;if(typeof g=="function"){let C=Gn.get(g);C||(C=g.name,Gn.set(g,C)),h+=C}else h+=String(g);h+=":",h+=JSON.stringify(A)}else if(typeof f=="function"){let g=Gn.get(f);g||(g=f.name,Gn.set(f,g)),h+=g}else h+=String(f)}return h},u=a(n),s=a(r),l=i?JSON.stringify(i):"",c=`${s}::${u}::${l}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Hu=new Y2,Vo=e=>{let t=q2(e),n=e.children||"",r=t.runSync(t.parse(n),n);return X2(r,e)},q2=e=>{let t=Hu.get(e);if(t)return t;let n=W2(e);return Hu.set(e,n),n},V2=e=>e.some(t=>Array.isArray(t)?t[0]===ii:t===ii),W2=e=>{let t=e.rehypePlugins||Bu,n=e.remarkPlugins||Bu,r=V2(t)?n:[...n,$2],i=e.remarkRehypeOptions?{...Fu,...e.remarkRehypeOptions}:Fu;return JE().use(Zb).use(r).use(PE,i).use(t)},Wo=e=>e,G2=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},Q2=(e,t)=>{var n;for(let r in Ur)if(Object.hasOwn(Ur,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Ur[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},K2=(e,t,n,r,i,a)=>{let u=!1;return r?u=!r.includes(e.tagName):i&&(u=i.includes(e.tagName)),!u&&a&&typeof t=="number"&&(u=!a(e,t,n)),u},X2=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:u,urlTransform:s}=t;if(n||r||i||a||s){let l=s||Wo;Je(e,(c,d,h)=>{if(c.type==="raw"&&h&&typeof d=="number")return G2(h,d,a,c.value),d;if(c.type==="element"&&(Q2(c,l),K2(c,d,h,r,i,n)&&h&&typeof d=="number"))return u&&c.children?h.children.splice(d,1,...c.children):h.children.splice(d,1),d})}return ub(e,{Fragment:T.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0})},Z2=/\[\^[\w-]{1,200}\](?!:)/,J2=/\[\^[\w-]{1,200}\]:/,ex=/<(\w+)[\s>]/,tx=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Uu=new Map,ju=new Map,nx=e=>{let t=e.toLowerCase(),n=Uu.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Uu.set(t,r),r},rx=e=>{let t=e.toLowerCase(),n=ju.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return ju.set(t,r),r},zu=(e,t)=>{if(tx.has(t.toLowerCase()))return 0;let n=e.match(nx(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},$u=(e,t)=>{let n=e.match(rx(t));return n?n.length:0},ix=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},Go=e=>{let t=Z2.test(e),n=J2.test(e);if(t||n)return[e];let r=$e.lex(e,{gfm:!0}),i=[],a=[],u=!1;for(let s of r){let l=s.raw,c=i.length;if(a.length>0){i[c-1]+=l;let d=a.at(-1),h=zu(l,d),p=$u(l,d);for(let f=0;f<h;f+=1)a.push(d);for(let f=0;f<p;f+=1)a.length>0&&a.at(-1)===d&&a.pop();continue}if(s.type==="html"&&s.block){let d=l.match(ex);if(d){let h=d[1],p=zu(l,h),f=$u(l,h);p>f&&a.push(h)}}if(c>0&&!u){let d=i[c-1];if(ix(d)%2===1){i[c-1]=d+l;continue}}i.push(l),s.type!=="space"&&(u=s.type==="code")}return i},ax=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,u,s,l)=>{if(!s.includes(`
|
|
122
|
+
|
|
123
|
+
`))return u+s+l;let c=s.replace(/\n\n/g,`
|
|
124
|
+
<!---->
|
|
125
|
+
`),d=(c.startsWith(`
|
|
126
|
+
`)?"":`
|
|
127
|
+
`)+c+(c.endsWith(`
|
|
128
|
+
`)?"":`
|
|
129
|
+
`);return`${u}${d}${l}
|
|
130
|
+
|
|
131
|
+
`})}return n},ux=/([\\`*_~[\]|])/g,sx=e=>e.replace(ux,"\\$1"),lx=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,u,s,l)=>{let c=sx(s).replace(/\n\n/g," ");return u+c+l})}return n},Qo=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Qo).join(""):"",ox=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));Je(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=Qo(r);r.children=i?[{type:"text",value:i}]:[]}})},cx=()=>e=>{Je(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},dx=/^[ \t]*<[\w!/?-]/,hx=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,Ko=e=>typeof e!="string"||e.length===0||!dx.test(e)?e:e.replace(hx,"$1"),Yu,qu,Vu,Wu,er={...At,protocols:{...At.protocols,href:[...(qu=(Yu=At.protocols)==null?void 0:Yu.href)!=null?qu:[],"tel"]},attributes:{...At.attributes,code:[...(Wu=(Vu=At.attributes)==null?void 0:Vu.code)!=null?Wu:[],"metastring"]}},dr={raw:ii,sanitize:[tl,er],harden:[fc,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Xo={gfm:[D1,{}],codeMeta:cx},Gu=Object.values(dr),fx=Object.values(Xo),px={block:" ▋",circle:" ●"},Zo=["github-light","github-dark"],Jo={enabled:!0},mx={shikiTheme:Zo,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Jo},we=I.createContext(mx),ca=I.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:u,...s})=>{if(u){let d=u.getLastRenderCharCount();u.setPrevContentLength(d)}let l=typeof e=="string"&&n?Ko(e):e,c=T.jsx(Vo,{...s,children:l});return T.jsx(ho.Provider,{value:i,children:a?T.jsx("div",{dir:a,style:{display:"contents"},children:c}):c})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,u;return((a=e.components)==null?void 0:a[i])!==((u=t.components)==null?void 0:u[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});ca.displayName="Block";var ec=I.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:u=Gu,remarkPlugins:s=fx,className:l,shikiTheme:c=Zo,mermaid:d,controls:h=!0,isAnimating:p=!1,animated:f,BlockComponent:g=ca,parseMarkdownIntoBlocksFn:A=Go,caret:C,plugins:x,remend:R,linkSafety:L=Jo,lineNumbers:B=!0,allowedTags:v,literalTagContent:N,translations:$,icons:q,prefix:W,onAnimationStart:S,onAnimationEnd:U,...j})=>{let J=I.useId(),[Y,H]=I.useTransition(),z=I.useMemo(()=>i2(W),[W]),ne=I.useRef(null),ge=I.useRef(S),Me=I.useRef(U);ge.current=S,Me.current=U,I.useEffect(()=>{var ee,ce,Re;if(t==="static")return;let Qe=ne.current;if(ne.current=p,Qe===null){p&&((ee=ge.current)==null||ee.call(ge));return}p&&!Qe?(ce=ge.current)==null||ce.call(ge):!p&&Qe&&((Re=Me.current)==null||Re.call(Me))},[p,t]);let k=I.useMemo(()=>v?Object.keys(v):[],[v]),xe=I.useMemo(()=>{if(typeof e!="string")return"";let ee=t==="streaming"&&r?Yg(e,R):e;return N&&N.length>0&&(ee=lx(ee,N)),k.length>0&&(ee=ax(ee,k)),ee},[e,t,r,R,k,N]),Ce=I.useMemo(()=>A(xe),[xe,A]),[_,Le]=I.useState(Ce);I.useEffect(()=>{t==="streaming"&&!Ue?H(()=>{Le(Ce)}):Le(Ce)},[Ce,t]);let be=t==="streaming"?_:Ce,pe=I.useMemo(()=>n==="auto"?be.map(ki):void 0,[be,n]),bt=I.useMemo(()=>be.map((ee,ce)=>`${J}-${ce}`),[be.length,J]),He=I.useMemo(()=>f===!0?"true":f?JSON.stringify(f):"",[f]),Ue=I.useMemo(()=>He?He==="true"?cr():cr(f):null,[He]),rt=I.useMemo(()=>{var ee,ce;return{shikiTheme:(ce=(ee=x==null?void 0:x.code)==null?void 0:ee.getThemes())!=null?ce:c,controls:h,isAnimating:p,lineNumbers:B,mode:t,mermaid:d,linkSafety:L}},[c,h,p,B,t,d,L,x==null?void 0:x.code]),vt=I.useMemo(()=>$?JSON.stringify($):"",[$]),Bn=I.useMemo(()=>({...na,...$}),[vt]),Fn=I.useMemo(()=>{let{inlineCode:ee,...ce}=a??{},Re={...B2,...ce};if(ee){let Qe=Re.code;Re.code=Et=>"data-block"in Et?Qe?I.createElement(Qe,Et):null:I.createElement(ee,Et)}return Re},[a]),Hn=I.useMemo(()=>{let ee=[];return x!=null&&x.cjk&&(ee=[...ee,...x.cjk.remarkPluginsBefore]),ee=[...ee,...s],x!=null&&x.cjk&&(ee=[...ee,...x.cjk.remarkPluginsAfter]),x!=null&&x.math&&(ee=[...ee,x.math.remarkPlugin]),ee},[s,x==null?void 0:x.math,x==null?void 0:x.cjk]),Zt=I.useMemo(()=>{var ee;let ce=u;if(v&&Object.keys(v).length>0&&u===Gu){let Re={...er,tagNames:[...(ee=er.tagNames)!=null?ee:[],...Object.keys(v)],attributes:{...er.attributes,...v}};ce=[dr.raw,[tl,Re],dr.harden]}return N&&N.length>0&&(ce=[...ce,[ox,N]]),x!=null&&x.math&&(ce=[...ce,x.math.rehypePlugin]),Ue&&p&&(ce=[...ce,Ue.rehypePlugin]),ce},[u,x==null?void 0:x.math,Ue,p,v,N]),Bt=I.useMemo(()=>{if(!p||be.length===0)return!1;let ee=be.at(-1);return vu(ee)||z2(ee)},[p,be]),Un=I.useMemo(()=>C&&p&&!Bt?{"--streamdown-caret":`"${px[C]}"`}:void 0,[C,p,Bt]);return t==="static"?T.jsx(gi.Provider,{value:Bn,children:T.jsx(Ti.Provider,{value:x??null,children:T.jsx(we.Provider,{value:rt,children:T.jsx(Du,{icons:q,children:T.jsx(mi.Provider,{value:z,children:T.jsx("div",{className:z("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",l),dir:n==="auto"?ki(xe):n,children:T.jsx(Vo,{components:Fn,rehypePlugins:Zt,remarkPlugins:Hn,...j,children:xe})})})})})})}):T.jsx(gi.Provider,{value:Bn,children:T.jsx(Ti.Provider,{value:x??null,children:T.jsx(we.Provider,{value:rt,children:T.jsx(Du,{icons:q,children:T.jsx(mi.Provider,{value:z,children:T.jsxs("div",{className:z("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",C&&!Bt?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,l),style:Un,children:[be.length===0&&C&&p&&T.jsx("span",{}),be.map((ee,ce)=>{var Re;let Qe=ce===be.length-1,Et=p&&Qe&&vu(ee);return T.jsx(g,{animatePlugin:Ue,components:Fn,content:ee,dir:(Re=pe==null?void 0:pe[ce])!=null?Re:n!=="auto"?n:void 0,index:ce,isIncomplete:Et,rehypePlugins:Zt,remarkPlugins:Hn,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...j},bt[ce])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);ec.displayName="Streamdown";var gx=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:u=1,fullscreen:s=!1})=>{let{RotateCcwIcon:l,ZoomInIcon:c,ZoomOutIcon:d}=Ye(),h=K(),p=I.useRef(null),f=I.useRef(null),[g,A]=I.useState(u),[C,x]=I.useState({x:0,y:0}),[R,L]=I.useState(!1),[B,v]=I.useState({x:0,y:0}),[N,$]=I.useState({x:0,y:0}),q=I.useCallback(z=>{A(ne=>Math.max(n,Math.min(r,ne+z)))},[n,r]),W=I.useCallback(()=>{q(i)},[q,i]),S=I.useCallback(()=>{q(-i)},[q,i]),U=I.useCallback(()=>{A(u),x({x:0,y:0})},[u]),j=I.useCallback(z=>{z.preventDefault();let ne=z.deltaY>0?-i:i;q(ne)},[q,i]),J=I.useCallback(z=>{if(z.button!==0||z.isPrimary===!1)return;L(!0),v({x:z.clientX,y:z.clientY}),$(C);let ne=z.currentTarget;ne instanceof HTMLElement&&ne.setPointerCapture(z.pointerId)},[C]),Y=I.useCallback(z=>{if(!R)return;z.preventDefault();let ne=z.clientX-B.x,ge=z.clientY-B.y;x({x:N.x+ne,y:N.y+ge})},[R,B,N]),H=I.useCallback(z=>{L(!1);let ne=z.currentTarget;ne instanceof HTMLElement&&ne.releasePointerCapture(z.pointerId)},[]);return I.useEffect(()=>{let z=p.current;if(z)return z.addEventListener("wheel",j,{passive:!1}),()=>{z.removeEventListener("wheel",j)}},[j]),I.useEffect(()=>{let z=f.current;if(z&&R)return document.body.style.userSelect="none",z.addEventListener("pointermove",Y,{passive:!1}),z.addEventListener("pointerup",H),z.addEventListener("pointercancel",H),()=>{document.body.style.userSelect="",z.removeEventListener("pointermove",Y),z.removeEventListener("pointerup",H),z.removeEventListener("pointercancel",H)}},[R,Y,H]),T.jsxs("div",{className:h("relative flex flex-col",s?"h-full w-full":"min-h-28 w-full",t),ref:p,style:{cursor:R?"grabbing":"grab"},children:[a?T.jsxs("div",{className:h("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",s?"bottom-4 left-4":"bottom-2 left-2"),children:[T.jsx("button",{className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g>=r,onClick:W,title:"Zoom in",type:"button",children:T.jsx(c,{size:16})}),T.jsx("button",{className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g<=n,onClick:S,title:"Zoom out",type:"button",children:T.jsx(d,{size:16})}),T.jsx("button",{className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:U,title:"Reset zoom and pan",type:"button",children:T.jsx(l,{size:16})})]}):null,T.jsx("div",{className:h("flex-1 origin-center transition-transform duration-150 ease-out",s?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:J,ref:f,role:"application",style:{transform:`translate(${C.x}px, ${C.y}px) scale(${g})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},tc=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=K(),[u,s]=I.useState(null),[l,c]=I.useState(!1),[d,h]=I.useState(""),[p,f]=I.useState(""),[g,A]=I.useState(0),{mermaid:C}=I.useContext(we),x=ua(),R=C==null?void 0:C.errorComponent,{shouldRender:L,containerRef:B}=WT({immediate:r});if(I.useEffect(()=>{if(L){if(!x){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),c(!0);let N=x.getMermaid(n),$=e.split("").reduce((S,U)=>(S<<5)-S+U.charCodeAt(0)|0,0),q=`mermaid-${Math.abs($)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:W}=await N.render(q,e);h(W),f(W)}catch(N){if(!(p||d)){let $=N instanceof Error?N.message:"Failed to render Mermaid chart";s($)}}finally{c(!1)}})()}},[e,n,g,L,x]),!(L||d||p))return T.jsx("div",{className:a("my-4 min-h-[200px]",t),ref:B});if(l&&!d&&!p)return T.jsx("div",{className:a("my-4 flex justify-center p-4",t),ref:B,children:T.jsxs("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[T.jsx("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),T.jsx("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(u&&!d&&!p){let N=()=>A($=>$+1);return R?T.jsx("div",{ref:B,children:T.jsx(R,{chart:e,error:u,retry:N})}):T.jsxs("div",{className:a("rounded-md bg-red-50 p-4",t),ref:B,children:[T.jsxs("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",u]}),T.jsxs("details",{className:a("mt-2"),children:[T.jsx("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),T.jsx("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let v=d||p;return T.jsx("div",{className:a("size-full",t),"data-streamdown":"mermaid",ref:B,children:T.jsx(gx,{className:a(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:T.jsx("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:v},role:"img"})})})};const Ax=Object.freeze(Object.defineProperty({__proto__:null,Block:ca,CodeBlock:Eo,CodeBlockContainer:po,CodeBlockCopyButton:bi,CodeBlockDownloadButton:xo,CodeBlockHeader:bo,CodeBlockSkeleton:Ei,Streamdown:ec,StreamdownContext:we,TableCopyDropdown:sa,TableDownloadButton:S2,TableDownloadDropdown:la,createAnimatePlugin:cr,defaultRehypePlugins:dr,defaultRemarkPlugins:Xo,defaultTranslations:na,defaultUrlTransform:Wo,detectTextDirection:ki,escapeMarkdownTableCell:Jn,extractTableDataFromElement:Ir,normalizeHtmlIndentation:Ko,parseMarkdownIntoBlocks:Go,tableDataToCSV:Nn,tableDataToMarkdown:Sn,tableDataToTSV:ko,useIsCodeFenceIncomplete:fo},Symbol.toStringTag,{value:"Module"})),bx=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:tc},Symbol.toStringTag,{value:"Module"}));export{s2 as A,_x as L,we as R,Ax as i};
|