← Back
Editing: NcRichText-DJlaHs_Q-tqMkpCtc.chunk.mjs
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('', '', 'dist/index-9Li44d4f.chunk.mjs'),window.OC.filePath('', '', 'dist/index-Bndk0DrU.chunk.mjs'),window.OC.filePath('', '', 'dist/NcAvatar-C9d7Wrc8-eVjVuCIX.chunk.mjs'),window.OC.filePath('', '', 'dist/index-BT4ljBnH.chunk.mjs'),window.OC.filePath('', '', 'dist/runtime-dom.esm-bundler-CU8rrbZA.chunk.mjs'),window.OC.filePath('', '', 'dist/string_decoder-BO00msnV.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-C_WKCRq3.chunk.mjs'),window.OC.filePath('', '', 'dist/translation-DoG5ZELJ-Bni_xMHF.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-C_oBIsvc.chunk.css'),window.OC.filePath('', '', 'dist/index-BrC2bLMO.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-CklyzrxW.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-R3us1MM8.chunk.css'),window.OC.filePath('', '', 'dist/mdi-Bm11w6Fn.chunk.mjs'),window.OC.filePath('', '', 'dist/mdi-BYHcrfvW.chunk.css'),window.OC.filePath('', '', 'dist/index-CySLkPBX.chunk.css'),window.OC.filePath('', '', 'dist/colors-BHGKZFDI-BKHpzg2v.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DCpg1aui.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-XiwrgeCm-Bx6e8UaI.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-XiwrgeCm-Bq_6hmXG.chunk.css'),window.OC.filePath('', '', 'dist/PencilOutline-BR85Y6ME.chunk.mjs'),window.OC.filePath('', '', 'dist/PencilOutline-DdQinVMt.chunk.css'),window.OC.filePath('', '', 'dist/NcDateTime.vue_vue_type_script_setup_true_lang-BhB8yA4U-BLfKZ80U.chunk.mjs'),window.OC.filePath('', '', 'dist/NcDateTime-DS-ziNw6.chunk.css'),window.OC.filePath('', '', 'dist/NcAvatar-C9d7Wrc8-D_G6wUEW.chunk.css'),window.OC.filePath('', '', 'dist/NcNoteCard-Cok_4Fld-C71YD40i.chunk.mjs'),window.OC.filePath('', '', 'dist/NcNoteCard-Cok_4Fld-Jq77EThs.chunk.css'),window.OC.filePath('', '', 'dist/NcCheckboxRadioSwitch-BMsPx74L-CrcuxmoM.chunk.mjs'),window.OC.filePath('', '', 'dist/NcCheckboxRadioSwitch-BMsPx74L-CQwJiKOs.chunk.css'),window.OC.filePath('', '', 'dist/Plus-QzdZMNfM.chunk.mjs'),window.OC.filePath('', '', 'dist/Plus-DoZPzs7J.chunk.css'),window.OC.filePath('', '', 'dist/NcSelect-DLheQ2yp-CP6uPo1K.chunk.mjs'),window.OC.filePath('', '', 'dist/NcSelect-DLheQ2yp-B9mkBKAR.chunk.css'),window.OC.filePath('', '', 'dist/TrashCanOutline-B5FsJrKA.chunk.mjs'),window.OC.filePath('', '', 'dist/NcInputField-o5OFv3z6-DJtp_yB7.chunk.mjs'),window.OC.filePath('', '', 'dist/NcInputField-o5OFv3z6-BYlw6Xsd.chunk.css')])))=>i.map(i=>d[i]); import{c as So,e as Ut,f as oi,a as Eo}from"./index-Bndk0DrU.chunk.mjs";import{l as qt,g as zo,_ as Po}from"./index-DCpg1aui.chunk.mjs";import{J as Io,K as Do,u as Fn,L as _o,M as Ao}from"./index-BrC2bLMO.chunk.mjs";import{i as To,v as at,A as Nn,r as xe,Z as Gt,c as Ze,o as ne,J as li,I as Ve,am as Mo,j as we,p as X,m as Qe,M as ai,u as se,a6 as ee,L as st,ap as Ie,f as ut,l as De,t as Ue,F as Rn,n as $e,E as bn,H as si,G as wn,k as qe,e as We,w as Ne,b as Yt,N as Lo,g as Cn,ao as Oo,a2 as Fo,x as ar,z as No,C as Ro}from"./runtime-dom.esm-bundler-CU8rrbZA.chunk.mjs";import{l as Re,h as jo,N as Pt,c as Bo,y as Ho,r as Vo}from"./logger-D3RVzcfQ-CklyzrxW.chunk.mjs";import{r as je,E as Uo,_ as pt,N as jn,a as Be,F as qo,G as $o,H as Wo,j as Zo,I as Go,J as ui,K as Yo,L as Ko,M as Qo,O as Xo,d as Jo,P as el,c as nn,b as Ot}from"./createElementId-DhjFt1I9-C_WKCRq3.chunk.mjs";import{R as ci}from"./NcNoteCard-Cok_4Fld-C71YD40i.chunk.mjs";import{N as tl}from"./NcCheckboxRadioSwitch-BMsPx74L-CrcuxmoM.chunk.mjs";import{c as Ft}from"./index-BT4ljBnH.chunk.mjs";import"./Plus-QzdZMNfM.chunk.mjs";import"./NcSelect-DLheQ2yp-CP6uPo1K.chunk.mjs";import{g as fi,v as Ge,c as nl,a as rl,p as il,r as ol,U as sr,E as ll,u as ur,S as al}from"./NcAvatar-C9d7Wrc8-eVjVuCIX.chunk.mjs";import"./mdi-Bm11w6Fn.chunk.mjs";import"./TrashCanOutline-B5FsJrKA.chunk.mjs";const wo="nextcloud-ui",Co="1.0.0",sl={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(e,{emit:n}){const t=n,r=e,o=To(),i=xe([]),l=X(()=>i.value.reduce((w,E)=>(w[~~E.id]=E)&&w,{})),a=X(()=>i.value.length),s=xe(null),u=xe(!1),f=xe({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),c=xe({splitter:null,timeoutId:null}),h=X(()=>({[`splitpanes splitpanes--${r.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":f.value.dragging})),p=()=>{document.addEventListener("mousemove",k,{passive:!1}),document.addEventListener("mouseup",v),"ontouchstart"in window&&(document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("touchend",v))},m=()=>{document.removeEventListener("mousemove",k,{passive:!1}),document.removeEventListener("mouseup",v),"ontouchstart"in window&&(document.removeEventListener("touchmove",k,{passive:!1}),document.removeEventListener("touchend",v))},x=(w,E)=>{const _=w.target.closest(".splitpanes__splitter");if(_){const{left:I,top:A}=_.getBoundingClientRect(),{clientX:R,clientY:W}="ontouchstart"in window&&w.touches?w.touches[0]:w;f.value.cursorOffset=r.horizontal?W-A:R-I}p(),f.value.mouseDown=!0,f.value.activeSplitter=E},k=w=>{f.value.mouseDown&&(w.preventDefault(),f.value.dragging=!0,requestAnimationFrame(()=>{V(U(w)),ie("resize",{event:w},!0)}))},v=w=>{f.value.dragging&&(window.getSelection().removeAllRanges(),ie("resized",{event:w},!0)),f.value.mouseDown=!1,f.value.activeSplitter=null,setTimeout(()=>{f.value.dragging=!1,m()},100)},S=(w,E)=>{"ontouchstart"in window&&(w.preventDefault(),c.value.splitter===E?(clearTimeout(c.value.timeoutId),c.value.timeoutId=null,P(w,E),c.value.splitter=null):(c.value.splitter=E,c.value.timeoutId=setTimeout(()=>c.value.splitter=null,500))),f.value.dragging||ie("splitter-click",{event:w,index:E},!0)},P=(w,E)=>{if(ie("splitter-dblclick",{event:w,index:E},!0),r.maximizePanes){let _=0;i.value=i.value.map((I,A)=>(I.size=A===E?I.max:I.min,A!==E&&(_+=I.min),I)),i.value[E].size-=_,ie("pane-maximize",{event:w,index:E,pane:i.value[E]}),ie("resized",{event:w,index:E},!0)}},M=(w,E)=>{ie("pane-click",{event:w,index:l.value[E].index,pane:l.value[E]})},U=w=>{const E=s.value.getBoundingClientRect(),{clientX:_,clientY:I}="ontouchstart"in window&&w.touches?w.touches[0]:w;return{x:_-(r.horizontal?0:f.value.cursorOffset)-E.left,y:I-(r.horizontal?f.value.cursorOffset:0)-E.top}},C=w=>{w=w[r.horizontal?"y":"x"];const E=s.value[r.horizontal?"clientHeight":"clientWidth"];return r.rtl&&!r.horizontal&&(w=E-w),w*100/E},V=w=>{const E=f.value.activeSplitter;let _={prevPanesSize:$(E),nextPanesSize:y(E),prevReachedMinPanes:0,nextReachedMinPanes:0};const I=0+(r.pushOtherPanes?0:_.prevPanesSize),A=100-(r.pushOtherPanes?0:_.nextPanesSize),R=Math.max(Math.min(C(w),A),I);let W=[E,E+1],le=i.value[W[0]]||null,ce=i.value[W[1]]||null;const gt=le.max<100&&R>=le.max+_.prevPanesSize,Mt=ce.max<100&&R<=100-(ce.max+y(E+1));if(gt||Mt){gt?(le.size=le.max,ce.size=Math.max(100-le.max-_.prevPanesSize-_.nextPanesSize,0)):(le.size=Math.max(100-ce.max-_.prevPanesSize-y(E+1),0),ce.size=ce.max);return}if(r.pushOtherPanes){const Lt=L(_,R);if(!Lt)return;({sums:_,panesToResize:W}=Lt),le=i.value[W[0]]||null,ce=i.value[W[1]]||null}le!==null&&(le.size=Math.min(Math.max(R-_.prevPanesSize-_.prevReachedMinPanes,le.min),le.max)),ce!==null&&(ce.size=Math.min(Math.max(100-R-_.nextPanesSize-_.nextReachedMinPanes,ce.min),ce.max))},L=(w,E)=>{const _=f.value.activeSplitter,I=[_,_+1];return E<w.prevPanesSize+i.value[I[0]].min&&(I[0]=O(_).index,w.prevReachedMinPanes=0,I[0]<_&&i.value.forEach((A,R)=>{R>I[0]&&R<=_&&(A.size=A.min,w.prevReachedMinPanes+=A.min)}),w.prevPanesSize=$(I[0]),I[0]===void 0)?(w.prevReachedMinPanes=0,i.value[0].size=i.value[0].min,i.value.forEach((A,R)=>{R>0&&R<=_&&(A.size=A.min,w.prevReachedMinPanes+=A.min)}),i.value[I[1]].size=100-w.prevReachedMinPanes-i.value[0].min-w.prevPanesSize-w.nextPanesSize,null):E>100-w.nextPanesSize-i.value[I[1]].min&&(I[1]=F(_).index,w.nextReachedMinPanes=0,I[1]>_+1&&i.value.forEach((A,R)=>{R>_&&R<I[1]&&(A.size=A.min,w.nextReachedMinPanes+=A.min)}),w.nextPanesSize=y(I[1]-1),I[1]===void 0)?(w.nextReachedMinPanes=0,i.value.forEach((A,R)=>{R<a.value-1&&R>=_+1&&(A.size=A.min,w.nextReachedMinPanes+=A.min)}),i.value[I[0]].size=100-w.prevPanesSize-y(I[0]-1),null):{sums:w,panesToResize:I}},$=w=>i.value.reduce((E,_,I)=>E+(I<w?_.size:0),0),y=w=>i.value.reduce((E,_,I)=>E+(I>w+1?_.size:0),0),O=w=>[...i.value].reverse().find(E=>E.index<w&&E.size>E.min)||{},F=w=>i.value.find(E=>E.index>w+1&&E.size>E.min)||{},N=()=>{var w;const E=Array.from(((w=s.value)==null?void 0:w.children)||[]);for(const _ of E){const I=_.classList.contains("splitpanes__pane"),A=_.classList.contains("splitpanes__splitter");!I&&!A&&(_.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},T=(w,E,_=!1)=>{const I=w-1,A=document.createElement("div");A.classList.add("splitpanes__splitter"),_||(A.onmousedown=R=>x(R,I),typeof window<"u"&&"ontouchstart"in window&&(A.ontouchstart=R=>x(R,I)),A.onclick=R=>S(R,I+1)),A.ondblclick=R=>P(R,I+1),E.parentNode.insertBefore(A,E)},j=w=>{w.onmousedown=void 0,w.onclick=void 0,w.ondblclick=void 0,w.remove()},J=()=>{var w;const E=Array.from(((w=s.value)==null?void 0:w.children)||[]);for(const I of E)I.className.includes("splitpanes__splitter")&&j(I);let _=0;for(const I of E)I.className.includes("splitpanes__pane")&&(!_&&r.firstSplitter?T(_,I,!0):_&&T(_,I),_++)},re=({uid:w,...E})=>{const _=l.value[w];for(const[I,A]of Object.entries(E))_[I]=A},ge=w=>{var E;let _=-1;Array.from(((E=s.value)==null?void 0:E.children)||[]).some(I=>(I.className.includes("splitpanes__pane")&&_++,I.isSameNode(w.el))),i.value.splice(_,0,{...w,index:_}),i.value.forEach((I,A)=>I.index=A),u.value&&st(()=>{J(),d({addedPane:i.value[_]}),ie("pane-add",{pane:i.value[_]})})},Ce=w=>{const E=i.value.findIndex(I=>I.id===w);i.value[E].el=null;const _=i.value.splice(E,1)[0];i.value.forEach((I,A)=>I.index=A),st(()=>{J(),ie("pane-remove",{pane:_}),d({removedPane:{..._}})})},d=(w={})=>{!w.addedPane&&!w.removedPane?Se():i.value.some(E=>E.givenSize!==null||E.min||E.max<100)?g(w):me(),u.value&&ie("resized")},me=()=>{const w=100/a.value;let E=0;const _=[],I=[];for(const A of i.value)A.size=Math.max(Math.min(w,A.max),A.min),E-=A.size,A.size>=A.max&&_.push(A.id),A.size<=A.min&&I.push(A.id);E>.1&&ue(E,_,I)},Se=()=>{let w=100;const E=[],_=[];let I=0;for(const R of i.value)w-=R.size,R.givenSize!==null&&I++,R.size>=R.max&&E.push(R.id),R.size<=R.min&&_.push(R.id);let A=100;if(w>.1){for(const R of i.value)R.givenSize===null&&(R.size=Math.max(Math.min(w/(a.value-I),R.max),R.min)),A-=R.size;A>.1&&ue(A,E,_)}},g=({addedPane:w,removedPane:E}={})=>{let _=100/a.value,I=0;const A=[],R=[];(w?.givenSize??null)!==null&&(_=(100-w.givenSize)/(a.value-1));for(const W of i.value)I-=W.size,W.size>=W.max&&A.push(W.id),W.size<=W.min&&R.push(W.id);if(!(Math.abs(I)<.1)){for(const W of i.value)w?.givenSize!==null&&w?.id===W.id||(W.size=Math.max(Math.min(_,W.max),W.min)),I-=W.size,W.size>=W.max&&A.push(W.id),W.size<=W.min&&R.push(W.id);I>.1&&ue(I,A,R)}},ue=(w,E,_)=>{let I;w>0?I=w/(a.value-E.length):I=w/(a.value-_.length),i.value.forEach((A,R)=>{if(w>0&&!E.includes(A.id)){const W=Math.max(Math.min(A.size+I,A.max),A.min),le=W-A.size;w-=le,A.size=W}else if(!_.includes(A.id)){const W=Math.max(Math.min(A.size+I,A.max),A.min),le=W-A.size;w-=le,A.size=W}}),Math.abs(w)>.1&&st(()=>{u.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},ie=(w,E=void 0,_=!1)=>{const I=E?.index??f.value.activeSplitter??null;t(w,{...E,...I!==null&&{index:I},..._&&I!==null&&{prevPane:i.value[I-(r.firstSplitter?1:0)],nextPane:i.value[I+(r.firstSplitter?0:1)]},panes:i.value.map(A=>({min:A.min,max:A.max,size:A.size}))})};at(()=>r.firstSplitter,()=>J()),Nn(()=>{N(),J(),d(),ie("ready"),u.value=!0}),Gt(()=>u.value=!1);const oe=()=>{var w;return ee("div",{ref:s,class:h.value},(w=o.default)==null?void 0:w.call(o))};return Ie("panes",i),Ie("indexedPanes",l),Ie("horizontal",X(()=>r.horizontal)),Ie("requestUpdate",re),Ie("onPaneAdd",ge),Ie("onPaneRemove",Ce),Ie("onPaneClick",M),(w,E)=>(ne(),Ze(li(oe)))}},ul={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(e){var n;const t=e,r=Ve("requestUpdate"),o=Ve("onPaneAdd"),i=Ve("horizontal"),l=Ve("onPaneRemove"),a=Ve("onPaneClick"),s=(n=Mo())==null?void 0:n.uid,u=Ve("indexedPanes"),f=X(()=>u.value[s]),c=xe(null),h=X(()=>{const k=isNaN(t.size)||t.size===void 0?0:parseFloat(t.size);return Math.max(Math.min(k,m.value),p.value)}),p=X(()=>{const k=parseFloat(t.minSize);return isNaN(k)?0:k}),m=X(()=>{const k=parseFloat(t.maxSize);return isNaN(k)?100:k}),x=X(()=>{var k;return`${i.value?"height":"width"}: ${(k=f.value)==null?void 0:k.size}%`});return at(()=>h.value,k=>r({uid:s,size:k})),at(()=>p.value,k=>r({uid:s,min:k})),at(()=>m.value,k=>r({uid:s,max:k})),Nn(()=>{o({id:s,el:c.value,min:p.value,max:m.value,givenSize:t.size===void 0?null:h.value,size:h.value})}),Gt(()=>l(s)),(k,v)=>(ne(),we("div",{ref_key:"paneEl",ref:c,class:"splitpanes__pane",onClick:v[0]||(v[0]=S=>se(a)(S,k._.uid)),style:ai(x.value)},[Qe(k.$slots,"default")],4))}};function cl(e){let n=!1,t;return(...r)=>(n||(n=!0,t=e(...r)),t)}let pi="missing-app-name";try{pi=wo}catch{Re.error("The `@nextcloud/vue` library was used without setting / replacing the `appName`.")}const fl=pi;let pl="";try{pl=Co}catch{Re.error("The `@nextcloud/vue` library was used without setting / replacing the `appVersion`.")}function hi(){return Ve("appName",fl)}const hl=cl(()=>{const e=qt("core","apps",[]),n=hi();return e.find(({id:t})=>t===n)?.name??n});je(Uo);const dl=Yt({__name:"NcAppContentDetailsToggle",setup(e){const n=Fn();at(n,t),Nn(()=>{t(n.value)}),Gt(()=>{n.value&&t(!1)});function t(r=!0){const o=document.querySelector(".app-navigation .app-navigation-toggle");o&&(o.style.display=r?"none":"",r===!0&&Ut("toggle-navigation",{open:!1}))}return(r,o)=>(ne(),Ze(se(Pt),{"aria-label":se(Be)("Go back to the list"),class:$e(["app-details-toggle",{"app-details-toggle--mobile":se(n)}]),title:se(Be)("Go back to the list"),variant:"tertiary"},{icon:Ne(()=>[We(se(jn),{directional:"",path:se(jo)},null,8,["path"])]),_:1},8,["aria-label","class","title"]))}}),gl=pt(dl,[["__scopeId","data-v-a28923a1"]]),cr=So("nextcloud").persist().build(),ml=zo().theming?.name??"Nextcloud",vl={name:"NcAppContent",components:{NcAppContentDetailsToggle:gl,Pane:ul,Splitpanes:sl},props:{disableSwipe:{type:Boolean,default:!1},listSize:{type:Number,default:20},listMinWidth:{type:Number,default:15},listMaxWidth:{type:Number,default:40},paneConfigKey:{type:String,default:""},showDetails:{type:Boolean,default:!0},layout:{type:String,default:"vertical-split",validator(e){return["no-split","vertical-split","horizontal-split"].includes(e)}},pageHeading:{type:String,default:null},pageTitle:{type:String,default:null}},emits:["update:showDetails","resizeList"],setup(){return{appName:hi(),localizedAppName:hl(),isMobile:Fn(),isRtl:Do}},data(){return{contentHeight:0,swiping:{},listPaneSize:this.restorePaneConfig()}},computed:{paneConfigID(){if(this.paneConfigKey!=="")return`pane-list-size-${this.paneConfigKey}`;try{return`pane-list-size-${this.appName}`}catch{return Re.info("[NcAppContent]: falling back to global nextcloud pane config"),"pane-list-size-nextcloud"}},detailsPaneSize(){return this.listPaneSize?100-this.listPaneSize:this.paneDefaults.details.size},paneDefaults(){return{list:{size:this.listSize,min:this.listMinWidth,max:this.listMaxWidth},details:{size:100-this.listSize,min:100-this.listMaxWidth,max:100-this.listMinWidth}}},realPageTitle(){const e=new Set;if(this.pageTitle)for(const n of this.pageTitle.split(" - "))e.add(n);else if(this.pageHeading){for(const n of this.pageHeading.split(" - "))e.add(n);e.size>0&&e.add(this.localizedAppName)}else return null;return e.add(ml),[...e.values()].join(" - ")}},watch:{realPageTitle:{immediate:!0,handler(){this.realPageTitle!==null&&(document.title=this.realPageTitle)}},paneConfigKey:{immediate:!0,handler(){this.restorePaneConfig()}}},mounted(){this.disableSwipe||(this.swiping=Io(this.$el,{onSwipeEnd:this.handleSwipe})),this.restorePaneConfig()},methods:{handleSwipe(e,n){Math.abs(this.swiping.lengthX)>70&&(this.swiping.coordsStart.x<300/2&&n==="right"?Ut("toggle-navigation",{open:!0}):this.swiping.coordsStart.x<300*1.5&&n==="left"&&Ut("toggle-navigation",{open:!1}))},handlePaneResize(e){const n=parseInt(e.panes[0].size,10);cr.setItem(this.paneConfigID,JSON.stringify(n)),this.listPaneSize=n,this.$emit("resizeList",{size:n}),Re.debug("[NcAppContent] pane config",{listPaneSize:n})},restorePaneConfig(){const e=parseInt(cr.getItem(this.paneConfigID),10);if(!isNaN(e)&&e!==this.listPaneSize)return Re.debug("[NcAppContent] pane config",{listPaneSize:e}),this.listPaneSize=e,e},hideDetails(){this.$emit("update:showDetails",!1)}}},yl={key:0,class:"hidden-visually"},xl={key:1,class:"app-content-wrapper"};function kl(e,n,t,r,o,i){const l=ut("NcAppContentDetailsToggle"),a=ut("Pane"),s=ut("Splitpanes");return ne(),we("main",{id:"app-content-vue",class:$e(["app-content no-snapper",{"app-content--has-list":!!e.$slots.list}])},[t.pageHeading?(ne(),we("h1",yl,Ue(t.pageHeading),1)):De("",!0),e.$slots.list?(ne(),we(Rn,{key:1},[r.isMobile||t.layout==="no-split"?(ne(),we("div",{key:0,class:$e(["app-content-wrapper app-content-wrapper--no-split",{"app-content-wrapper--show-details":t.showDetails,"app-content-wrapper--show-list":!t.showDetails,"app-content-wrapper--mobile":r.isMobile}])},[t.showDetails?(ne(),Ze(l,{key:0,onClick:si(i.hideDetails,["stop","prevent"])},null,8,["onClick"])):De("",!0),bn(qe("div",null,[Qe(e.$slots,"list",{},void 0,!0)],512),[[wn,!t.showDetails]]),t.showDetails?Qe(e.$slots,"default",{key:1},void 0,!0):De("",!0)],2)):t.layout==="vertical-split"||t.layout==="horizontal-split"?(ne(),we("div",xl,[We(s,{horizontal:t.layout==="horizontal-split",class:$e(["default-theme",{"splitpanes--horizontal":t.layout==="horizontal-split","splitpanes--vertical":t.layout==="vertical-split"}]),rtl:r.isRtl,onResized:i.handlePaneResize},{default:Ne(()=>[We(a,{class:"splitpanes__pane-list",size:o.listPaneSize||i.paneDefaults.list.size,minSize:i.paneDefaults.list.min,maxSize:i.paneDefaults.list.max},{default:Ne(()=>[Qe(e.$slots,"list",{},void 0,!0)]),_:3},8,["size","minSize","maxSize"]),We(a,{class:"splitpanes__pane-details",size:i.detailsPaneSize,minSize:i.paneDefaults.details.min,maxSize:i.paneDefaults.details.max},{default:Ne(()=>[Qe(e.$slots,"default",{},void 0,!0)]),_:3},8,["size","minSize","maxSize"])]),_:3},8,["horizontal","class","rtl","onResized"])])):De("",!0)],64)):De("",!0),e.$slots.list?De("",!0):Qe(e.$slots,"default",{key:2},void 0,!0)],2)}const vd=pt(vl,[["render",kl],["__scopeId","data-v-563c4ac4"]]),bl=Symbol.for("NcContent:setHasAppNavigation"),wl=Symbol.for("NcContent:selector");je(qo);const Cl=`<!-- - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors - SPDX-License-Identifier: AGPL-3.0-or-later --> <svg width="395" height="314" viewBox="0 0 395 314" fill="none" xmlns="http://www.w3.org/2000/svg"> <rect width="395" height="314" rx="11" fill="#439DCD"/> <rect x="13" y="51" width="366" height="248" rx="8" fill="white"/> <rect x="22" y="111" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="127" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="63" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="191" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="143" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="79" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="159" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="95" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="175" width="92" height="12" rx="6" fill="#DEDEDE"/> <path d="M288 145C277.56 147.8 265.32 149 254 149C242.68 149 230.44 147.8 220 145L218 153C225.44 155 234 156.32 242 157V209H250V185H258V209H266V157C274 156.32 282.56 155 290 153L288 145ZM254 145C258.4 145 262 141.4 262 137C262 132.6 258.4 129 254 129C249.6 129 246 132.6 246 137C246 141.4 249.6 145 254 145Z" fill="#DEDEDE"/> <path d="M43.5358 13C38.6641 13 34.535 16.2415 33.2552 20.6333C32.143 18.3038 29.7327 16.6718 26.9564 16.6718C23.1385 16.6718 20 19.7521 20 23.4993C20 27.2465 23.1385 30.3282 26.9564 30.3282C29.7327 30.3282 32.1429 28.6952 33.2552 26.3653C34.535 30.7575 38.6641 34 43.5358 34C48.3715 34 52.4796 30.8064 53.7921 26.4637C54.9249 28.7407 57.3053 30.3282 60.0421 30.3282C63.8601 30.3282 67 27.2465 67 23.4993C67 19.7521 63.8601 16.6718 60.0421 16.6718C57.3053 16.6718 54.9249 18.2583 53.7921 20.5349C52.4796 16.1926 48.3715 13 43.5358 13ZM43.5358 17.0079C47.2134 17.0079 50.1512 19.8899 50.1512 23.4993C50.1512 27.1087 47.2134 29.9921 43.5358 29.9921C39.8583 29.9921 36.9218 27.1087 36.9218 23.4993C36.9218 19.8899 39.8583 17.0079 43.5358 17.0079ZM26.9564 20.6797C28.5677 20.6797 29.8307 21.9179 29.8307 23.4993C29.8307 25.0807 28.5677 26.3203 26.9564 26.3203C25.3452 26.3203 24.0836 25.0807 24.0836 23.4993C24.0836 21.9179 25.3452 20.6797 26.9564 20.6797ZM60.0421 20.6797C61.6534 20.6797 62.9164 21.9179 62.9164 23.4993C62.9164 25.0807 61.6534 26.3203 60.0421 26.3203C58.4309 26.3203 57.1693 25.0807 57.1693 23.4993C57.1693 21.9179 58.4309 20.6797 60.0421 20.6797Z" fill="white"/> <rect x="79" y="20" width="8" height="8" rx="4" fill="white"/> <rect x="99" y="20" width="8" height="8" rx="4" fill="white"/> <rect x="119" y="20" width="8" height="8" rx="4" fill="white"/> <rect x="139" y="20" width="8" height="8" rx="4" fill="white"/> <rect x="159" y="20" width="8" height="8" rx="4" fill="white"/> <rect x="179" y="20" width="8" height="8" rx="4" fill="white"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C5.37258 0 0 5.37259 0 12V302C0 308.627 5.37259 314 12 314H383C389.627 314 395 308.627 395 302V12C395 5.37258 389.627 0 383 0H12ZM140 44C132.268 44 126 50.268 126 58V292C126 299.732 132.268 306 140 306H372C379.732 306 386 299.732 386 292V58C386 50.268 379.732 44 372 44H140Z" fill="black" fill-opacity="0.35"/> </svg> `,Sl=`<!-- - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors - SPDX-License-Identifier: AGPL-3.0-or-later --> <svg width="395" height="314" viewBox="0 0 395 314" fill="none" xmlns="http://www.w3.org/2000/svg"> <rect width="395" height="314" rx="11" fill="#439DCD"/> <rect x="13" y="51" width="366" height="248" rx="8" fill="white"/> <rect x="22" y="111" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="127" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="63" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="191" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="143" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="79" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="159" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="95" width="92" height="12" rx="6" fill="#DEDEDE"/> <rect x="22" y="175" width="92" height="12" rx="6" fill="#DEDEDE"/> <path d="M288 145C277.56 147.8 265.32 149 254 149C242.68 149 230.44 147.8 220 145L218 153C225.44 155 234 156.32 242 157V209H250V185H258V209H266V157C274 156.32 282.56 155 290 153L288 145ZM254 145C258.4 145 262 141.4 262 137C262 132.6 258.4 129 254 129C249.6 129 246 132.6 246 137C246 141.4 249.6 145 254 145Z" fill="#DEDEDE"/> <path d="M43.5358 13C38.6641 13 34.535 16.2415 33.2552 20.6333C32.143 18.3038 29.7327 16.6718 26.9564 16.6718C23.1385 16.6718 20 19.7521 20 23.4993C20 27.2465 23.1385 30.3282 26.9564 30.3282C29.7327 30.3282 32.1429 28.6952 33.2552 26.3653C34.535 30.7575 38.6641 34 43.5358 34C48.3715 34 52.4796 30.8064 53.7921 26.4637C54.9249 28.7407 57.3053 30.3282 60.0421 30.3282C63.8601 30.3282 67 27.2465 67 23.4993C67 19.7521 63.8601 16.6718 60.0421 16.6718C57.3053 16.6718 54.9249 18.2583 53.7921 20.5349C52.4796 16.1926 48.3715 13 43.5358 13ZM43.5358 17.0079C47.2134 17.0079 50.1512 19.8899 50.1512 23.4993C50.1512 27.1087 47.2134 29.9921 43.5358 29.9921C39.8583 29.9921 36.9218 27.1087 36.9218 23.4993C36.9218 19.8899 39.8583 17.0079 43.5358 17.0079ZM26.9564 20.6797C28.5677 20.6797 29.8307 21.9179 29.8307 23.4993C29.8307 25.0807 28.5677 26.3203 26.9564 26.3203C25.3452 26.3203 24.0836 25.0807 24.0836 23.4993C24.0836 21.9179 25.3452 20.6797 26.9564 20.6797ZM60.0421 20.6797C61.6534 20.6797 62.9164 21.9179 62.9164 23.4993C62.9164 25.0807 61.6534 26.3203 60.0421 26.3203C58.4309 26.3203 57.1693 25.0807 57.1693 23.4993C57.1693 21.9179 58.4309 20.6797 60.0421 20.6797Z" fill="white"/> <rect x="79" y="20" width="8" height="8" rx="4" fill="white"/> <rect x="99" y="20" width="8" height="8" rx="4" fill="white"/> <rect x="119" y="20" width="8" height="8" rx="4" fill="white"/> <rect x="139" y="20" width="8" height="8" rx="4" fill="white"/> <rect x="159" y="20" width="8" height="8" rx="4" fill="white"/> <rect x="179" y="20" width="8" height="8" rx="4" fill="white"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C5.37258 0 0 5.37259 0 12V302C0 308.627 5.37259 314 12 314H383C389.627 314 395 308.627 395 302V12C395 5.37258 389.627 0 383 0H12ZM112 44C119.732 44 126 50.268 126 58V292C126 299.732 119.732 306 112 306H20C12.268 306 6 299.732 6 292V58C6 50.268 12.268 44 20 44H112Z" fill="black" fill-opacity="0.35"/> </svg> `,El={class:"vue-skip-actions__container"},zl={class:"vue-skip-actions__headline"},Pl={class:"vue-skip-actions__buttons"},Il=Yt({__name:"NcContent",props:{appName:{}},setup(e){const n=e;Ie(bl,a),Ie(wl,"#content-vue"),Ie("appName",X(()=>n.appName));const t=Fn(),r=xe(!1),o=xe(),i=X(()=>o.value==="navigation"?Sl:Cl);Lo(()=>{const s=document.getElementById("skip-actions");s&&(s.innerHTML="",s.classList.add("vue-skip-actions"))});function l(){Ut("toggle-navigation",{open:!0}),st(()=>{window.location.hash="app-navigation-vue",document.getElementById("app-navigation-vue").focus()})}function a(s){r.value=s,o.value||(o.value="navigation")}return(s,u)=>(ne(),we("div",{id:"content-vue",class:$e(["content",`app-${s.appName.toLowerCase()}`])},[(ne(),Ze(Oo,{to:"#skip-actions"},[qe("div",El,[qe("div",zl,Ue(se(Be)("Keyboard navigation help")),1),qe("div",Pl,[bn(We(Pt,{href:"#app-navigation-vue",variant:"tertiary",onClick:si(l,["prevent"]),onFocusin:u[0]||(u[0]=f=>o.value="navigation"),onMouseover:u[1]||(u[1]=f=>o.value="navigation")},{default:Ne(()=>[Cn(Ue(se(Be)("Skip to app navigation")),1)]),_:1},512),[[wn,r.value]]),We(Pt,{href:"#app-content-vue",variant:"tertiary",onFocusin:u[2]||(u[2]=f=>o.value="content"),onMouseover:u[3]||(u[3]=f=>o.value="content")},{default:Ne(()=>[Cn(Ue(se(Be)("Skip to main content")),1)]),_:1})]),bn(We(jn,{class:"vue-skip-actions__image",svg:i.value,size:"auto"},null,8,["svg"]),[[wn,!se(t)]])])])),Qe(s.$slots,"default",{},void 0,!0)],2))}}),yd=pt(Il,[["__scopeId","data-v-d9b0d7e8"]]);je($o);const Dl=2e3;function _l(e){const n=xe(!1),t=X(()=>n.value?Bo:Ho),r=X(()=>n.value?Be("Copied"):Be("Copy to clipboard"));async function o(){if(n.value)return;const i=Fo(e);try{await navigator.clipboard.writeText(i)}catch{prompt("",i)}n.value=!0,setTimeout(()=>{n.value=!1},Dl)}return{isCopied:n,copy:o,icon:t,altText:r}}function fr(){return qt("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}window._vue_richtext_widgets??={},window._registerWidget??=(e,n,t,r)=>{Al(e,n,t,r)};function Al(e,n,t=()=>{},r){const o={hasInteractiveView:!0,fullWidth:!1,...r};if(window._vue_richtext_widgets[e]){Re.error(`[ReferencePicker]: Widget for id ${e} already registered`);return}window._vue_richtext_widgets[e]={id:e,callback:n,onDestroy:t,...o}}function Tl(e,n){const{richObjectType:t,richObject:r,accessible:o,interactive:i}=n;if(t!=="open-graph"){if(!window._vue_richtext_widgets[t]){Re.error("Widget for rich object type "+t+" not registered");return}window._vue_richtext_widgets[t].callback(e,{richObjectType:t,richObject:r,accessible:o,interactive:i})}}function Ml(e,n){e!=="open-graph"&&window._vue_richtext_widgets[e]&&window._vue_richtext_widgets[e].onDestroy(n)}function Ll(e){return!!window._vue_richtext_widgets[e]}function Ol(e){return!!window._vue_richtext_widgets[e]?.hasInteractiveView}function Fl(e){return!!window._vue_richtext_widgets[e]?.fullWidth}window._vue_richtext_custom_picker_elements??={},window._registerCustomPickerElement??=Nl;function Nl(e,n,t=()=>{},r="large"){if(window._vue_richtext_custom_picker_elements[e]){Re.error(`Custom reference picker element for id ${e} already registered`);return}window._vue_richtext_custom_picker_elements[e]={id:e,callback:n,onDestroy:t,size:r}}je(Wo),Be("Any link"),Zo("core","filetypes/link.svg"),window._vue_richtext_reference_providers??=qt("core","reference-provider-list",[]),window._vue_richtext_reference_provider_timestamps??=qt("core","reference-provider-timestamps",{}),je(ui,Go),je(Yo);const Rl=["src"],jl={class:"widget-default--details"},Bl={class:"widget-default--name"},Hl={class:"widget-default--link"},Vl=180*1e3,Ul=Yt({__name:"NcReferenceWidget",props:{reference:{},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},setup(e){const n=e,t=Ve(Vo,null),r=xe(!1),o=ar("customWidget"),i=ar("widgetRoot"),{width:l}=_o(i);Ao(i,([L])=>{st(()=>{r.value=L.isIntersecting})});const a=xe(!1),s=xe(!1);let u=null;const f=X(()=>!n.interactiveOptIn&&n.interactive||a.value),c=X(()=>Fl(n.reference.richObjectType)),h=X(()=>Ll(n.reference.richObjectType)),p=X(()=>h.value&&Ol(n.reference.richObjectType)),m=X(()=>!n.reference.accessible),x=X(()=>[450,550,650,1/0].findIndex(L=>l.value<L)),k=X(()=>{if(x.value===0)return{display:"none"};const L=x.value;return{lineClamp:L,webkitLineClamp:L}}),v=X(()=>{const L=n.reference.openGraphObject.link;return L?L.startsWith("https://")?L.substring(8):L.startsWith("http://")?L.substring(7):L:""}),S=X(()=>fi(t,n.reference.openGraphObject.link)),P=X(()=>S.value?ci:"a"),M=X(()=>S.value?{to:S.value}:{href:n.reference.openGraphObject.link,target:"_blank"});at(r,L=>{if(!L){u=setTimeout(()=>{r.value||V()},Vl);return}u&&(clearTimeout(u),u=null),s.value||C()},{immediate:!0}),Gt(()=>{V()});function U(){a.value=!0,C()}function C(){if(!o.value||n.reference.richObjectType==="open-graph")return;o.value.innerHTML="";const L=document.createElement("div");L.style.width="100%",o.value.appendChild(L),st(()=>{Tl(L,{...n.reference,interactive:f.value}),s.value=!0})}function V(){s.value&&i.value&&(Ml(n.reference.richObjectType,i.value),s.value=!1)}return(L,$)=>(ne(),we("div",{ref_key:"widgetRoot",ref:i,class:$e({"toggle-interactive":p.value&&!f.value})},[L.reference&&h.value?(ne(),we("div",{key:0,ref_key:"customWidget",ref:o,class:$e(["widget-custom",{"full-width":c.value}])},null,2)):!m.value&&L.reference&&L.reference.openGraphObject&&!h.value?(ne(),Ze(li(P.value),No({key:1},M.value,{rel:"noopener noreferrer",class:"widget-default"}),{default:Ne(()=>[L.reference.openGraphObject.thumb?(ne(),we("img",{key:0,class:"widget-default--image",src:L.reference.openGraphObject.thumb},null,8,Rl)):De("",!0),qe("div",jl,[qe("p",Bl,Ue(L.reference.openGraphObject.name),1),qe("p",{class:"widget-default--description",style:ai(k.value)},Ue(L.reference.openGraphObject.description),5),qe("p",Hl,Ue(v.value),1)])]),_:1},16)):De("",!0),L.interactiveOptIn&&p.value&&!f.value?(ne(),Ze(Pt,{key:2,class:"toggle-interactive--button",onClick:U},{default:Ne(()=>[Cn(Ue(se(Be)("Enable interactive view")),1)]),_:1})):De("",!0)],2))}}),ql=pt(Ul,[["__scopeId","data-v-8ce33442"]]);je(Ko),je(Xo,ui,Qo),je(el,Jo);const di=-1,Kt=0,Ct=1,$t=2,Bn=3,Hn=4,Vn=5,Un=6,gi=7,mi=8,pr=typeof self=="object"?self:globalThis,$l=(e,n)=>{const t=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,l]=n[o];switch(i){case Kt:case di:return t(l,o);case Ct:{const a=t([],o);for(const s of l)a.push(r(s));return a}case $t:{const a=t({},o);for(const[s,u]of l)a[r(s)]=r(u);return a}case Bn:return t(new Date(l),o);case Hn:{const{source:a,flags:s}=l;return t(new RegExp(a,s),o)}case Vn:{const a=t(new Map,o);for(const[s,u]of l)a.set(r(s),r(u));return a}case Un:{const a=t(new Set,o);for(const s of l)a.add(r(s));return a}case gi:{const{name:a,message:s}=l;return t(new pr[a](s),o)}case mi:return t(BigInt(l),o);case"BigInt":return t(Object(BigInt(l)),o);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return t(new DataView(a),l)}}return t(new pr[i](l),o)};return r},hr=e=>$l(new Map,e)(0),rt="",{toString:Wl}={},{keys:Zl}=Object,yt=e=>{const n=typeof e;if(n!=="object"||!e)return[Kt,n];const t=Wl.call(e).slice(8,-1);switch(t){case"Array":return[Ct,rt];case"Object":return[$t,rt];case"Date":return[Bn,rt];case"RegExp":return[Hn,rt];case"Map":return[Vn,rt];case"Set":return[Un,rt];case"DataView":return[Ct,t]}return t.includes("Array")?[Ct,t]:t.includes("Error")?[gi,t]:[$t,t]},Nt=([e,n])=>e===Kt&&(n==="function"||n==="symbol"),Gl=(e,n,t,r)=>{const o=(l,a)=>{const s=r.push(l)-1;return t.set(a,s),s},i=l=>{if(t.has(l))return t.get(l);let[a,s]=yt(l);switch(a){case Kt:{let f=l;switch(s){case"bigint":a=mi,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return o([di],l)}return o([a,f],l)}case Ct:{if(s){let h=l;return s==="DataView"?h=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(h=new Uint8Array(l)),o([s,[...h]],l)}const f=[],c=o([a,f],l);for(const h of l)f.push(i(h));return c}case $t:{if(s)switch(s){case"BigInt":return o([s,l.toString()],l);case"Boolean":case"Number":case"String":return o([s,l.valueOf()],l)}if(n&&"toJSON"in l)return i(l.toJSON());const f=[],c=o([a,f],l);for(const h of Zl(l))(e||!Nt(yt(l[h])))&&f.push([i(h),i(l[h])]);return c}case Bn:return o([a,l.toISOString()],l);case Hn:{const{source:f,flags:c}=l;return o([a,{source:f,flags:c}],l)}case Vn:{const f=[],c=o([a,f],l);for(const[h,p]of l)(e||!(Nt(yt(h))||Nt(yt(p))))&&f.push([i(h),i(p)]);return c}case Un:{const f=[],c=o([a,f],l);for(const h of l)(e||!Nt(yt(h)))&&f.push(i(h));return c}}const{message:u}=l;return o([a,{name:s,message:u}],l)};return i},dr=(e,{json:n,lossy:t}={})=>{const r=[];return Gl(!(n||t),!!n,new Map,r)(e),r},Xe=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?hr(dr(e,n)):structuredClone(e):(e,n)=>hr(dr(e,n)),vi=(function(e){if(e==null)return Ql;if(typeof e=="string")return Kl(e);if(typeof e=="object")return Yl(e);if(typeof e=="function")return qn(e);throw new Error("Expected function, string, or array as `test`")});function Yl(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=vi(e[t]);return qn(r);function r(...o){let i=-1;for(;++i<n.length;)if(n[i].apply(this,o))return!0;return!1}}function Kl(e){return qn(n);function n(t){return t.tagName===e}}function qn(e){return n;function n(t,r,o){return!!(Xl(t)&&e.call(this,t,typeof r=="number"?r:void 0,o||void 0))}}function Ql(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function Xl(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Jl=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,ea=/^[a-zA-Z]:\\/;function ta(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return ea.test(e)?!1:Jl.test(e)}function na(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function ra(e){return e.join(" ").trim()}const ia=["http","https"],oa=["nofollow"],la={};function aa(e){const n=e||la,t=n.protocols||ia,r=vi(n.test);return function(o){Ge(o,"element",function(i,l,a){if(i.tagName==="a"&&typeof i.properties.href=="string"&&r(i,l,a)){const s=i.properties.href;if(ta(s)?t.includes(s.slice(0,s.indexOf(":"))):s.startsWith("//")){const u=xt(n.content,i),f=u&&!Array.isArray(u)?[u]:u,c=xt(n.rel,i)||oa,h=typeof c=="string"?na(c):c,p=xt(n.target,i),m=xt(n.properties,i);if(m&&Object.assign(i.properties,Xe(m)),h.length>0&&(i.properties.rel=[...h]),p&&(i.properties.target=p),f){const x=xt(n.contentProperties,i)||{};i.children.push({type:"element",tagName:"span",properties:Xe(x),children:Xe(f)})}}}})}}function xt(e,n){return typeof e=="function"?e(n):e}function sa(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const ua=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ca=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fa={};function gr(e,n){return(fa.jsx?ca:ua).test(e)}const pa=/[ \t\n\f\r]/g;function ha(e){return typeof e=="object"?e.type==="text"?mr(e.value):!1:mr(e)}function mr(e){return e.replace(pa,"")===""}class St{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}St.prototype.normal={},St.prototype.property={},St.prototype.space=void 0;function yi(e,n){const t={},r={};for(const o of e)Object.assign(t,o.property),Object.assign(r,o.normal);return new St(t,r,n)}function Sn(e){return e.toLowerCase()}class pe{constructor(n,t){this.attribute=t,this.property=n}}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 da=0;const q=et(),te=et(),En=et(),z=et(),Y=et(),ct=et(),ye=et();function et(){return 2**++da}const zn=Object.freeze(Object.defineProperty({__proto__:null,boolean:q,booleanish:te,commaOrSpaceSeparated:ye,commaSeparated:ct,number:z,overloadedBoolean:En,spaceSeparated:Y},Symbol.toStringTag,{value:"Module"})),rn=Object.keys(zn);class $n extends pe{constructor(n,t,r,o){let i=-1;if(super(n,t),vr(this,"space",o),typeof r=="number")for(;++i<rn.length;){const l=rn[i];vr(this,rn[i],(r&zn[l])===zn[l])}}}$n.prototype.defined=!0;function vr(e,n,t){t&&(e[n]=t)}function ht(e){const n={},t={};for(const[r,o]of Object.entries(e.properties)){const i=new $n(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),n[r]=i,t[Sn(r)]=r,t[Sn(i.attribute)]=r}return new St(n,t,e.space)}const xi=ht({properties:{ariaActiveDescendant:null,ariaAtomic:te,ariaAutoComplete:null,ariaBusy:te,ariaChecked:te,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:Y,ariaCurrent:null,ariaDescribedBy:Y,ariaDetails:null,ariaDisabled:te,ariaDropEffect:Y,ariaErrorMessage:null,ariaExpanded:te,ariaFlowTo:Y,ariaGrabbed:te,ariaHasPopup:null,ariaHidden:te,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Y,ariaLevel:z,ariaLive:null,ariaModal:te,ariaMultiLine:te,ariaMultiSelectable:te,ariaOrientation:null,ariaOwns:Y,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:te,ariaReadOnly:te,ariaRelevant:null,ariaRequired:te,ariaRoleDescription:Y,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:te,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function ki(e,n){return n in e?e[n]:n}function bi(e,n){return ki(e,n.toLowerCase())}const ga=ht({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ct,acceptCharset:Y,accessKey:Y,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:Y,autoFocus:q,autoPlay:q,blocking:Y,capture:null,charSet:null,checked:q,cite:null,className:Y,cols:z,colSpan:null,content:null,contentEditable:te,controls:q,controlsList:Y,coords:z|ct,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:En,draggable:te,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:Y,height:z,hidden:En,high:z,href:null,hrefLang:null,htmlFor:Y,httpEquiv:Y,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:Y,itemRef:Y,itemScope:q,itemType:Y,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,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:q,optimum:z,pattern:null,ping:Y,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:Y,required:q,reversed:q,rows:z,rowSpan:z,sandbox:Y,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:te,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:te,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Y,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:te,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:q,disableRemotePlayback:q,prefix:null,property:null,results:z,security:null,unselectable:null},space:"html",transform:bi}),ma=ht({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ye,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:Y,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:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,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:ct,g2:ct,glyphName:ct,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:ye,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:z,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:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Y,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ye,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ye,rev:ye,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ye,requiredFeatures:ye,requiredFonts:ye,requiredFormats:ye,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:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:ye,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ye,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ye,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ki}),wi=ht({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Ci=ht({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bi}),Si=ht({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),va={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"},ya=/[A-Z]/g,yr=/-[a-z]/g,xa=/^data[-\w.:]+$/i;function ka(e,n){const t=Sn(n);let r=n,o=pe;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&xa.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(yr,wa);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!yr.test(i)){let l=i.replace(ya,ba);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}o=$n}return new o(r,n)}function ba(e){return"-"+e.toLowerCase()}function wa(e){return e.charAt(1).toUpperCase()}const Ca=yi([xi,ga,wi,Ci,Si],"html"),Wn=yi([xi,ma,wi,Ci,Si],"svg");var it={},on,xr;function Sa(){if(xr)return on;xr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=` `,u="/",f="*",c="",h="comment",p="declaration";on=function(x,k){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];k=k||{};var v=1,S=1;function P(N){var T=N.match(n);T&&(v+=T.length);var j=N.lastIndexOf(s);S=~j?N.length-j:S+N.length}function M(){var N={line:v,column:S};return function(T){return T.position=new U(N),L(),T}}function U(N){this.start=N,this.end={line:v,column:S},this.source=k.source}U.prototype.content=x;function C(N){var T=new Error(k.source+":"+v+":"+S+": "+N);if(T.reason=N,T.filename=k.source,T.line=v,T.column=S,T.source=x,!k.silent)throw T}function V(N){var T=N.exec(x);if(T){var j=T[0];return P(j),x=x.slice(j.length),T}}function L(){V(t)}function $(N){var T;for(N=N||[];T=y();)T!==!1&&N.push(T);return N}function y(){var N=M();if(!(u!=x.charAt(0)||f!=x.charAt(1))){for(var T=2;c!=x.charAt(T)&&(f!=x.charAt(T)||u!=x.charAt(T+1));)++T;if(T+=2,c===x.charAt(T-1))return C("End of comment missing");var j=x.slice(2,T-2);return S+=2,P(j),x=x.slice(T),S+=2,N({type:h,comment:j})}}function O(){var N=M(),T=V(r);if(T){if(y(),!V(o))return C("property missing ':'");var j=V(i),J=N({type:p,property:m(T[0].replace(e,c)),value:j?m(j[0].replace(e,c)):c});return V(l),J}}function F(){var N=[];$(N);for(var T;T=O();)T!==!1&&(N.push(T),$(N));return N}return L(),F()};function m(x){return x?x.replace(a,c):c}return on}var kr;function Ea(){if(kr)return it;kr=1;var e=it&&it.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(it,"__esModule",{value:!0}),it.default=t;const n=e(Sa());function t(r,o){let i=null;if(!r||typeof r!="string")return i;const l=(0,n.default)(r),a=typeof o=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?o(u,f,s):f&&(i=i||{},i[u]=f)}),i}return it}var kt={},br;function za(){if(br)return kt;br=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(u){return!u||t.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),i(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(o,a):u=u.replace(r,a),u.replace(n,l))};return kt.camelCase=s,kt}var bt,wr;function Pa(){if(wr)return bt;wr=1;var e=bt&&bt.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(Ea()),t=za();function r(o,i){var l={};return!o||typeof o!="string"||(0,n.default)(o,function(a,s){a&&s&&(l[(0,t.camelCase)(a,i)]=s)}),l}return r.default=r,bt=r,bt}var Ia=Pa();const Da=oi(Ia),Ei=zi("end"),Zn=zi("start");function zi(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function _a(e){const n=Zn(e),t=Ei(e);if(n&&t)return{start:n,end:t}}function Et(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Cr(e.position):"start"in e||"end"in e?Cr(e):"line"in e||"column"in e?Pn(e):""}function Pn(e){return Sr(e&&e.line)+":"+Sr(e&&e.column)}function Cr(e){return Pn(e&&e.start)+"-"+Pn(e&&e.end)}function Sr(e){return e&&typeof e=="number"?e:1}class ae extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let o="",i={},l=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof n=="string"?o=n:!i.cause&&n&&(l=!0,o=n.message,i.cause=n),!i.ruleId&&!i.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?i.ruleId=r:(i.source=r.slice(0,s),i.ruleId=r.slice(s+1))}if(!i.place&&i.ancestors&&i.ancestors){const s=i.ancestors[i.ancestors.length-1];s&&(i.place=s.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=a?a.line:void 0,this.name=Et(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=l&&i.cause&&typeof i.cause.stack=="string"?i.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 Gn={}.hasOwnProperty,Aa=new Map,Ta=/[A-Z]/g,Ma=new Set(["table","tbody","thead","tfoot","tr"]),La=new Set(["td","th"]),Pi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Oa(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ua(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Va(t,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Wn:Ca,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=Ii(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Ii(e,n,t){if(n.type==="element")return Fa(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Na(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return ja(e,n,t);if(n.type==="mdxjsEsm")return Ra(e,n);if(n.type==="root")return Ba(e,n,t);if(n.type==="text")return Ha(e,n)}function Fa(e,n,t){const r=e.schema;let o=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Wn,e.schema=o),e.ancestors.push(n);const i=_i(e,n.tagName,!1),l=qa(e,n);let a=Kn(e,n);return Ma.has(n.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!ha(s):!0})),Di(e,l,i,n),Yn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,i,l,t)}function Na(e,n){if(n.data&&n.data.estree&&e.evaluater){const t=n.data.estree.body[0];return t.type,e.evaluater.evaluateExpression(t.expression)}It(e,n.position)}function Ra(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);It(e,n.position)}function ja(e,n,t){const r=e.schema;let o=r;n.name==="svg"&&r.space==="html"&&(o=Wn,e.schema=o),e.ancestors.push(n);const i=n.name===null?e.Fragment:_i(e,n.name,!0),l=$a(e,n),a=Kn(e,n);return Di(e,l,i,n),Yn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,i,l,t)}function Ba(e,n,t){const r={};return Yn(r,Kn(e,n)),e.create(n,e.Fragment,r,t)}function Ha(e,n){return n.value}function Di(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Yn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Va(e,n,t){return r;function r(o,i,l,a){const s=Array.isArray(l.children)?t:n;return a?s(i,l,a):s(i,l)}}function Ua(e,n){return t;function t(r,o,i,l){const a=Array.isArray(i.children),s=Zn(r);return n(o,i,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function qa(e,n){const t={};let r,o;for(o in n.properties)if(o!=="children"&&Gn.call(n.properties,o)){const i=Wa(e,o,n.properties[o]);if(i){const[l,a]=i;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&La.has(n.tagName)?r=a:t[l]=a}}if(r){const i=t.style||(t.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function $a(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const i=o.expression;i.type;const l=i.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else It(e,n.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else It(e,n.position);else i=r.value===null?!0:r.value;t[o]=i}return t}function Kn(e,n){const t=[];let r=-1;const o=e.passKeys?new Map:Aa;for(;++r<n.children.length;){const i=n.children[r];let l;if(e.passKeys){const s=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(s){const u=o.get(s)||0;l=s+"-"+u,o.set(s,u+1)}}const a=Ii(e,i,l);a!==void 0&&t.push(a)}return t}function Wa(e,n,t){const r=ka(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?sa(t):ra(t)),r.property==="style"){let o=typeof t=="object"?t:Za(e,String(t));return e.stylePropertyNameCase==="css"&&(o=Ga(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?va[r.property]||r.property:r.attribute,t]}}function Za(e,n){try{return Da(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,o=new ae("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Pi+"#cannot-parse-style-attribute",o}}function _i(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let i=-1,l;for(;++i<o.length;){const a=gr(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(i&&a.type==="Literal"),optional:!1}:a}r=l}else r=gr(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const o=r.value;return Gn.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);It(e)}function It(e,n){const t=new ae("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Pi+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Ga(e){const n={};let t;for(t in e)Gn.call(e,t)&&(n[Ya(t)]=e[t]);return n}function Ya(e){let n=e.replace(Ta,Ka);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Ka(e){return"-"+e.toLowerCase()}function Qa(e){const n=this;n.compiler=t;function t(r,o){return Oa(r,{filePath:o.path,...e})}}function Xa(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ja(e,n,t){const r=nl({}.ignore||[]),o=es(n);let i=-1;for(;++i<o.length;)rl(e,"text",l);function l(s,u){let f=-1,c;for(;++f<u.length;){const h=u[f],p=c?c.children:void 0;if(r(h,p?p.indexOf(h):void 0,c))return;c=h}if(c)return a(s,u)}function a(s,u){const f=u[u.length-1],c=o[i][0],h=o[i][1];let p=0;const m=f.children.indexOf(s);let x=!1,k=[];c.lastIndex=0;let v=c.exec(s.value);for(;v;){const S=v.index,P={index:v.index,input:v.input,stack:[...u,s]};let M=h(...v,P);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?c.lastIndex=S+1:(p!==S&&k.push({type:"text",value:s.value.slice(p,S)}),Array.isArray(M)?k.push(...M):M&&k.push(M),p=S+v[0].length,x=!0),!c.global)break;v=c.exec(s.value)}return x?(p<s.value.length&&k.push({type:"text",value:s.value.slice(p)}),f.children.splice(m,1,...k)):k=[s],m+k.length}}function es(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const o=t[r];n.push([ts(o[0]),ns(o[1])])}return n}function ts(e){return typeof e=="string"?new RegExp(Xa(e),"g"):e}function ns(e){return typeof e=="function"?e:function(){return e}}function rs(e){Ja(e,[/\r?\n|\r/g,is])}function is(){return{type:"break"}}function os(){return function(e){rs(e)}}const ls={};function as(e,n){const t=ls,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,o=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Ai(e,r,o)}function Ai(e,n,t){if(ss(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Er(e.children,n,t)}return Array.isArray(e)?Er(e,n,t):""}function Er(e,n,t){const r=[];let o=-1;for(;++o<e.length;)r[o]=Ai(e[o],n,t);return r.join("")}function ss(e){return!!(e&&typeof e=="object")}const zr=document.createElement("i");function Qn(e){const n="&"+e+";";zr.innerHTML=n;const t=zr.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function Ae(e,n,t,r){const o=e.length;let i=0,l;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);i<r.length;)l=r.slice(i,i+1e4),l.unshift(n,0),e.splice(...l),i+=1e4,n+=1e4}function be(e,n){return e.length>0?(Ae(e,e.length,0,n),e):n}const Pr={}.hasOwnProperty;function us(e){const n={};let t=-1;for(;++t<e.length;)cs(n,e[t]);return n}function cs(e,n){let t;for(t in n){const r=(Pr.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let i;if(o)for(i in o){Pr.call(r,i)||(r[i]=[]);const l=o[i];fs(r[i],Array.isArray(l)?l:l?[l]:[])}}}function fs(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);Ae(e,0,0,r)}function Ti(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function ft(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const _e=Ye(/[A-Za-z]/),ke=Ye(/[\dA-Za-z]/),ps=Ye(/[#-'*+\--9=?A-Z^-~]/);function In(e){return e!==null&&(e<32||e===127)}const Dn=Ye(/\d/),hs=Ye(/[\dA-Fa-f]/),ds=Ye(/[!-/:-@[-`{-~]/);function B(e){return e!==null&&e<-2}function he(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const gs=Ye(new RegExp("\\p{P}|\\p{S}","u")),ms=Ye(/\s/);function Ye(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function dt(e){const n=[];let t=-1,r=0,o=0;for(;++t<e.length;){const i=e.charCodeAt(t);let l="";if(i===37&&ke(e.charCodeAt(t+1))&&ke(e.charCodeAt(t+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const a=e.charCodeAt(t+1);i<56320&&a>56319&&a<57344?(l=String.fromCharCode(i,a),o=1):l="�"}else l=String.fromCharCode(i);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+o+1,l=""),o&&(t+=o,o=0)}return n.join("")+e.slice(r)}function K(e,n,t,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return l;function l(s){return Z(s)?(e.enter(t),a(s)):n(s)}function a(s){return Z(s)&&i++<o?(e.consume(s),a):(e.exit(t),n(s))}}const vs={tokenize:ys};function ys(e){const n=e.attempt(this.parser.constructs.contentInitial,r,o);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),K(e,n,"linePrefix")}function o(a){return e.enter("paragraph"),i(a)}function i(a){const s=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=s),t=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return B(a)?(e.consume(a),e.exit("chunkText"),i):(e.consume(a),l)}}const xs={tokenize:ks},Ir={tokenize:bs};function ks(e){const n=this,t=[];let r=0,o,i,l;return a;function a(P){if(r<t.length){const M=t[r];return n.containerState=M[1],e.attempt(M[0].continuation,s,u)(P)}return u(P)}function s(P){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&S();const M=n.events.length;let U=M,C;for(;U--;)if(n.events[U][0]==="exit"&&n.events[U][1].type==="chunkFlow"){C=n.events[U][1].end;break}v(r);let V=M;for(;V<n.events.length;)n.events[V][1].end={...C},V++;return Ae(n.events,U+1,0,n.events.slice(M)),n.events.length=V,u(P)}return a(P)}function u(P){if(r===t.length){if(!o)return h(P);if(o.currentConstruct&&o.currentConstruct.concrete)return m(P);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Ir,f,c)(P)}function f(P){return o&&S(),v(r),h(P)}function c(P){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,m(P)}function h(P){return n.containerState={},e.attempt(Ir,p,m)(P)}function p(P){return r++,t.push([n.currentConstruct,n.containerState]),h(P)}function m(P){if(P===null){o&&S(),v(0),e.consume(P);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),x(P)}function x(P){if(P===null){k(e.exit("chunkFlow"),!0),v(0),e.consume(P);return}return B(P)?(e.consume(P),k(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(P),x)}function k(P,M){const U=n.sliceStream(P);if(M&&U.push(null),P.previous=i,i&&(i.next=P),i=P,o.defineSkip(P.start),o.write(U),n.parser.lazy[P.start.line]){let C=o.events.length;for(;C--;)if(o.events[C][1].start.offset<l&&(!o.events[C][1].end||o.events[C][1].end.offset>l))return;const V=n.events.length;let L=V,$,y;for(;L--;)if(n.events[L][0]==="exit"&&n.events[L][1].type==="chunkFlow"){if($){y=n.events[L][1].end;break}$=!0}for(v(r),C=V;C<n.events.length;)n.events[C][1].end={...y},C++;Ae(n.events,L+1,0,n.events.slice(V)),n.events.length=C}}function v(P){let M=t.length;for(;M-- >P;){const U=t[M];n.containerState=U[1],U[0].exit.call(n,e)}t.length=P}function S(){o.write([null]),i=void 0,o=void 0,n.containerState._closeFlow=void 0}}function bs(e,n,t){return K(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dr(e){if(e===null||he(e)||ms(e))return 1;if(gs(e))return 2}function Xn(e,n,t){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(n=i(n,t),r.push(i))}return n}const _n={name:"attention",resolveAll:ws,tokenize:Cs};function ws(e,n){let t=-1,r,o,i,l,a,s,u,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},h={...e[t][1].start};_r(c,-s),_r(h,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:h},i={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},o={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=be(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=be(u,[["enter",o,n],["enter",l,n],["exit",l,n],["enter",i,n]]),u=be(u,Xn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=be(u,[["exit",i,n],["enter",a,n],["exit",a,n],["exit",o,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,u=be(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,Ae(e,r-1,t-r+3,u),t=r+u.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Cs(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Dr(r);let i;return l;function l(s){return i=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===i)return e.consume(s),a;const u=e.exit("attentionSequence"),f=Dr(s),c=!f||f===2&&o||t.includes(s),h=!o||o===2&&f||t.includes(r);return u._open=!!(i===42?c:c&&(o||!h)),u._close=!!(i===42?h:h&&(f||!c)),n(s)}}function _r(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Ss={name:"autolink",tokenize:Es};function Es(e,n,t){let r=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return _e(p)?(e.consume(p),l):p===64?t(p):u(p)}function l(p){return p===43||p===45||p===46||ke(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,s):(p===43||p===45||p===46||ke(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function s(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||In(p)?t(p):(e.consume(p),s)}function u(p){return p===64?(e.consume(p),f):ps(p)?(e.consume(p),u):t(p)}function f(p){return ke(p)?c(p):t(p)}function c(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):h(p)}function h(p){if((p===45||ke(p))&&r++<63){const m=p===45?h:c;return e.consume(p),m}return t(p)}}const Qt={partial:!0,tokenize:zs};function zs(e,n,t){return r;function r(i){return Z(i)?K(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||B(i)?n(i):t(i)}}const Mi={continuation:{tokenize:Is},exit:Ds,name:"blockQuote",tokenize:Ps};function Ps(e,n,t){const r=this;return o;function o(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),i}return t(l)}function i(l){return Z(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function Is(e,n,t){const r=this;return o;function o(l){return Z(l)?K(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):i(l)}function i(l){return e.attempt(Mi,n,t)(l)}}function Ds(e){e.exit("blockQuote")}const Li={name:"characterEscape",tokenize:_s};function _s(e,n,t){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return ds(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(i)}}const Oi={name:"characterReference",tokenize:As};function As(e,n,t){const r=this;let o=0,i,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,l=ke,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,l=hs,f):(e.enter("characterReferenceValue"),i=7,l=Dn,f(c))}function f(c){if(c===59&&o){const h=e.exit("characterReferenceValue");return l===ke&&!Qn(r.sliceSerialize(h))?t(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(c)&&o++<i?(e.consume(c),f):t(c)}}const Ar={partial:!0,tokenize:Ms},Tr={concrete:!0,name:"codeFenced",tokenize:Ts};function Ts(e,n,t){const r=this,o={partial:!0,tokenize:U};let i=0,l=0,a;return s;function s(C){return u(C)}function u(C){const V=r.events[r.events.length-1];return i=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===a?(l++,e.consume(C),f):l<3?t(C):(e.exit("codeFencedFenceSequence"),Z(C)?K(e,c,"whitespace")(C):c(C))}function c(C){return C===null||B(C)?(e.exit("codeFencedFence"),r.interrupt?n(C):e.check(Ar,x,M)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||B(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(C)):Z(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),K(e,p,"whitespace")(C)):C===96&&C===a?t(C):(e.consume(C),h)}function p(C){return C===null||B(C)?c(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||B(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(C)):C===96&&C===a?t(C):(e.consume(C),m)}function x(C){return e.attempt(o,M,k)(C)}function k(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),v}function v(C){return i>0&&Z(C)?K(e,S,"linePrefix",i+1)(C):S(C)}function S(C){return C===null||B(C)?e.check(Ar,x,M)(C):(e.enter("codeFlowValue"),P(C))}function P(C){return C===null||B(C)?(e.exit("codeFlowValue"),S(C)):(e.consume(C),P)}function M(C){return e.exit("codeFenced"),n(C)}function U(C,V,L){let $=0;return y;function y(j){return C.enter("lineEnding"),C.consume(j),C.exit("lineEnding"),O}function O(j){return C.enter("codeFencedFence"),Z(j)?K(C,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):F(j)}function F(j){return j===a?(C.enter("codeFencedFenceSequence"),N(j)):L(j)}function N(j){return j===a?($++,C.consume(j),N):$>=l?(C.exit("codeFencedFenceSequence"),Z(j)?K(C,T,"whitespace")(j):T(j)):L(j)}function T(j){return j===null||B(j)?(C.exit("codeFencedFence"),V(j)):L(j)}}}function Ms(e,n,t){const r=this;return o;function o(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i)}function i(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const ln={name:"codeIndented",tokenize:Os},Ls={partial:!0,tokenize:Fs};function Os(e,n,t){const r=this;return o;function o(u){return e.enter("codeIndented"),K(e,i,"linePrefix",5)(u)}function i(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):t(u)}function l(u){return u===null?s(u):B(u)?e.attempt(Ls,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||B(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),n(u)}}function Fs(e,n,t){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?t(l):B(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):K(e,i,"linePrefix",5)(l)}function i(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):B(l)?o(l):t(l)}}const Ns={name:"codeText",previous:js,resolve:Rs,tokenize:Bs};function Rs(e){let n=e.length-4,t=3,r,o;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)o===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(o=r):(r===n||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),n-=r-o-2,r=o+2),o=void 0);return e}function js(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Bs(e,n,t){let r=0,o,i;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?t(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(i=e.enter("codeTextSequence"),o=0,f(c)):B(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||B(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),o++,f):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(c)):(i.type="codeTextData",u(c))}}class Hs{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const o=t||0;this.setCursor(Math.trunc(n));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&wt(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),wt(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),wt(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);wt(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);wt(this.left,t.reverse())}}}function wt(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Fi(e){const n={};let t=-1,r,o,i,l,a,s,u;const f=new Hs(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,i=0,i<s.length&&s[i][1].type==="lineEndingBlank"&&(i+=2),i<s.length&&s[i][1].type==="content"))for(;++i<s.length&&s[i][1].type!=="content";)s[i][1].type==="chunkText"&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Vs(f,t)),t=n[t],u=!0);else if(r[1]._container){for(i=t,o=void 0;i--;)if(l=f.get(i),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(f.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=i);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end={...f.get(o)[1].start},a=f.slice(o,t),a.unshift(r),f.splice(o,t-o+1,a))}}return Ae(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Vs(e,n){const t=e.get(n)[1],r=e.get(n)[2];let o=n-1;const i=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,h=-1,p=t,m=0,x=0;const k=[x];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=t;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(x=h+1,k.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):k.pop(),h=k.length;h--;){const v=a.slice(k[h],k[h+1]),S=i.pop();s.push([S,S+v.length-1]),e.splice(S,2,v)}for(s.reverse(),h=-1;++h<s.length;)u[m+s[h][0]]=m+s[h][1],m+=s[h][1]-s[h][0]-1;return u}const Us={resolve:$s,tokenize:Ws},qs={partial:!0,tokenize:Zs};function $s(e){return Fi(e),e}function Ws(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),o(a)}function o(a){return a===null?i(a):B(a)?e.check(qs,l,i)(a):(e.consume(a),o)}function i(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,o}}function Zs(e,n,t){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),K(e,i,"linePrefix")}function i(l){if(l===null||B(l))return t(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function Ni(e,n,t,r,o,i,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(v){return v===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(v),e.exit(i),h):v===null||v===32||v===41||In(v)?t(v):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(v))}function h(v){return v===62?(e.enter(i),e.consume(v),e.exit(i),e.exit(o),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(a),h(v)):v===null||v===60||B(v)?t(v):(e.consume(v),v===92?m:p)}function m(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function x(v){return!f&&(v===null||v===41||he(v))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(v)):f<u&&v===40?(e.consume(v),f++,x):v===41?(e.consume(v),f--,x):v===null||v===32||v===40||In(v)?t(v):(e.consume(v),v===92?k:x)}function k(v){return v===40||v===41||v===92?(e.consume(v),x):x(v)}}function Ri(e,n,t,r,o,i){const l=this;let a=0,s;return u;function u(p){return e.enter(r),e.enter(o),e.consume(p),e.exit(o),e.enter(i),f}function f(p){return a>999||p===null||p===91||p===93&&!s||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(p):p===93?(e.exit(i),e.enter(o),e.consume(p),e.exit(o),e.exit(r),n):B(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||B(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s||(s=!Z(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function ji(e,n,t,r,o,i){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(o),e.consume(h),e.exit(o),l=h===40?41:h,s):t(h)}function s(h){return h===l?(e.enter(o),e.consume(h),e.exit(o),e.exit(r),n):(e.enter(i),u(h))}function u(h){return h===l?(e.exit(i),s(l)):h===null?t(h):B(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),K(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===l||h===null||B(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===l||h===92?(e.consume(h),f):f(h)}}function zt(e,n){let t;return r;function r(o){return B(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t=!0,r):Z(o)?K(e,r,t?"linePrefix":"lineSuffix")(o):n(o)}}const Gs={name:"definition",tokenize:Ks},Ys={partial:!0,tokenize:Qs};function Ks(e,n,t){const r=this;let o;return i;function i(p){return e.enter("definition"),l(p)}function l(p){return Ri.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return o=ft(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):t(p)}function s(p){return he(p)?zt(e,u)(p):u(p)}function u(p){return Ni(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Ys,c,c)(p)}function c(p){return Z(p)?K(e,h,"whitespace")(p):h(p)}function h(p){return p===null||B(p)?(e.exit("definition"),r.parser.defined.push(o),n(p)):t(p)}}function Qs(e,n,t){return r;function r(a){return he(a)?zt(e,o)(a):t(a)}function o(a){return ji(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return Z(a)?K(e,l,"whitespace")(a):l(a)}function l(a){return a===null||B(a)?n(a):t(a)}}const Xs={name:"hardBreakEscape",tokenize:Js};function Js(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return B(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const eu={name:"headingAtx",resolve:tu,tokenize:nu};function tu(e,n){let t=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},i={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Ae(e,r,t-r+1,[["enter",o,n],["enter",i,n],["exit",i,n],["exit",o,n]])),e}function nu(e,n,t){let r=0;return o;function o(f){return e.enter("atxHeading"),i(f)}function i(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||he(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||B(f)?(e.exit("atxHeading"),n(f)):Z(f)?K(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||he(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const ru=["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"],Mr=["pre","script","style","textarea"],iu={concrete:!0,name:"htmlFlow",resolveTo:au,tokenize:su},ou={partial:!0,tokenize:cu},lu={partial:!0,tokenize:uu};function au(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function su(e,n,t){const r=this;let o,i,l,a,s;return u;function u(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),h):g===47?(e.consume(g),i=!0,x):g===63?(e.consume(g),o=3,r.interrupt?n:d):_e(g)?(e.consume(g),l=String.fromCharCode(g),k):t(g)}function h(g){return g===45?(e.consume(g),o=2,p):g===91?(e.consume(g),o=5,a=0,m):_e(g)?(e.consume(g),o=4,r.interrupt?n:d):t(g)}function p(g){return g===45?(e.consume(g),r.interrupt?n:d):t(g)}function m(g){const ue="CDATA[";return g===ue.charCodeAt(a++)?(e.consume(g),a===ue.length?r.interrupt?n:F:m):t(g)}function x(g){return _e(g)?(e.consume(g),l=String.fromCharCode(g),k):t(g)}function k(g){if(g===null||g===47||g===62||he(g)){const ue=g===47,ie=l.toLowerCase();return!ue&&!i&&Mr.includes(ie)?(o=1,r.interrupt?n(g):F(g)):ru.includes(l.toLowerCase())?(o=6,ue?(e.consume(g),v):r.interrupt?n(g):F(g)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(g):i?S(g):P(g))}return g===45||ke(g)?(e.consume(g),l+=String.fromCharCode(g),k):t(g)}function v(g){return g===62?(e.consume(g),r.interrupt?n:F):t(g)}function S(g){return Z(g)?(e.consume(g),S):y(g)}function P(g){return g===47?(e.consume(g),y):g===58||g===95||_e(g)?(e.consume(g),M):Z(g)?(e.consume(g),P):y(g)}function M(g){return g===45||g===46||g===58||g===95||ke(g)?(e.consume(g),M):U(g)}function U(g){return g===61?(e.consume(g),C):Z(g)?(e.consume(g),U):P(g)}function C(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),s=g,V):Z(g)?(e.consume(g),C):L(g)}function V(g){return g===s?(e.consume(g),s=null,$):g===null||B(g)?t(g):(e.consume(g),V)}function L(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||he(g)?U(g):(e.consume(g),L)}function $(g){return g===47||g===62||Z(g)?P(g):t(g)}function y(g){return g===62?(e.consume(g),O):t(g)}function O(g){return g===null||B(g)?F(g):Z(g)?(e.consume(g),O):t(g)}function F(g){return g===45&&o===2?(e.consume(g),J):g===60&&o===1?(e.consume(g),re):g===62&&o===4?(e.consume(g),me):g===63&&o===3?(e.consume(g),d):g===93&&o===5?(e.consume(g),Ce):B(g)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(ou,Se,N)(g)):g===null||B(g)?(e.exit("htmlFlowData"),N(g)):(e.consume(g),F)}function N(g){return e.check(lu,T,Se)(g)}function T(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),j}function j(g){return g===null||B(g)?N(g):(e.enter("htmlFlowData"),F(g))}function J(g){return g===45?(e.consume(g),d):F(g)}function re(g){return g===47?(e.consume(g),l="",ge):F(g)}function ge(g){if(g===62){const ue=l.toLowerCase();return Mr.includes(ue)?(e.consume(g),me):F(g)}return _e(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),ge):F(g)}function Ce(g){return g===93?(e.consume(g),d):F(g)}function d(g){return g===62?(e.consume(g),me):g===45&&o===2?(e.consume(g),d):F(g)}function me(g){return g===null||B(g)?(e.exit("htmlFlowData"),Se(g)):(e.consume(g),me)}function Se(g){return e.exit("htmlFlow"),n(g)}}function uu(e,n,t){const r=this;return o;function o(l){return B(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):t(l)}function i(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function cu(e,n,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Qt,n,t)}}const fu={name:"htmlText",tokenize:pu};function pu(e,n,t){const r=this;let o,i,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),U):d===63?(e.consume(d),P):_e(d)?(e.consume(d),L):t(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),i=0,m):_e(d)?(e.consume(d),S):t(d)}function f(d){return d===45?(e.consume(d),p):t(d)}function c(d){return d===null?t(d):d===45?(e.consume(d),h):B(d)?(l=c,re(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?J(d):d===45?h(d):c(d)}function m(d){const me="CDATA[";return d===me.charCodeAt(i++)?(e.consume(d),i===me.length?x:m):t(d)}function x(d){return d===null?t(d):d===93?(e.consume(d),k):B(d)?(l=x,re(d)):(e.consume(d),x)}function k(d){return d===93?(e.consume(d),v):x(d)}function v(d){return d===62?J(d):d===93?(e.consume(d),v):x(d)}function S(d){return d===null||d===62?J(d):B(d)?(l=S,re(d)):(e.consume(d),S)}function P(d){return d===null?t(d):d===63?(e.consume(d),M):B(d)?(l=P,re(d)):(e.consume(d),P)}function M(d){return d===62?J(d):P(d)}function U(d){return _e(d)?(e.consume(d),C):t(d)}function C(d){return d===45||ke(d)?(e.consume(d),C):V(d)}function V(d){return B(d)?(l=V,re(d)):Z(d)?(e.consume(d),V):J(d)}function L(d){return d===45||ke(d)?(e.consume(d),L):d===47||d===62||he(d)?$(d):t(d)}function $(d){return d===47?(e.consume(d),J):d===58||d===95||_e(d)?(e.consume(d),y):B(d)?(l=$,re(d)):Z(d)?(e.consume(d),$):J(d)}function y(d){return d===45||d===46||d===58||d===95||ke(d)?(e.consume(d),y):O(d)}function O(d){return d===61?(e.consume(d),F):B(d)?(l=O,re(d)):Z(d)?(e.consume(d),O):$(d)}function F(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),o=d,N):B(d)?(l=F,re(d)):Z(d)?(e.consume(d),F):(e.consume(d),T)}function N(d){return d===o?(e.consume(d),o=void 0,j):d===null?t(d):B(d)?(l=N,re(d)):(e.consume(d),N)}function T(d){return d===null||d===34||d===39||d===60||d===61||d===96?t(d):d===47||d===62||he(d)?$(d):(e.consume(d),T)}function j(d){return d===47||d===62||he(d)?$(d):t(d)}function J(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),n):t(d)}function re(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ge}function ge(d){return Z(d)?K(e,Ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):Ce(d)}function Ce(d){return e.enter("htmlTextData"),l(d)}}const Jn={name:"labelEnd",resolveAll:mu,resolveTo:vu,tokenize:yu},hu={tokenize:xu},du={tokenize:ku},gu={tokenize:bu};function mu(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",n+=o}}return e.length!==t.length&&Ae(e,0,e.length,t),e}function vu(e,n){let t=e.length,r=0,o,i,l,a;for(;t--;)if(o=e[t][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[t][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=t,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(l=t);const s={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,n],["enter",u,n]],a=be(a,e.slice(i+1,i+r+3)),a=be(a,[["enter",f,n]]),a=be(a,Xn(n.parser.constructs.insideSpan.null,e.slice(i+r+4,l-3),n)),a=be(a,[["exit",f,n],e[l-2],e[l-1],["exit",u,n]]),a=be(a,e.slice(l+1)),a=be(a,[["exit",s,n]]),Ae(e,i,e.length,a),e}function yu(e,n,t){const r=this;let o=r.events.length,i,l;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return a;function a(h){return i?i._inactive?c(h):(l=r.parser.defined.includes(ft(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):t(h)}function s(h){return h===40?e.attempt(hu,f,l?f:c)(h):h===91?e.attempt(du,f,l?u:c)(h):l?f(h):c(h)}function u(h){return e.attempt(gu,f,c)(h)}function f(h){return n(h)}function c(h){return i._balanced=!0,t(h)}}function xu(e,n,t){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),o}function o(c){return he(c)?zt(e,i)(c):i(c)}function i(c){return c===41?f(c):Ni(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return he(c)?zt(e,s)(c):f(c)}function a(c){return t(c)}function s(c){return c===34||c===39||c===40?ji(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return he(c)?zt(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),n):t(c)}}function ku(e,n,t){const r=this;return o;function o(a){return Ri.call(r,e,i,l,"reference","referenceMarker","referenceString")(a)}function i(a){return r.parser.defined.includes(ft(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function bu(e,n,t){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),n):t(i)}}const wu={name:"labelStartImage",resolveAll:Jn.resolveAll,tokenize:Cu};function Cu(e,n,t){const r=this;return o;function o(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),i}function i(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const Su={name:"labelStartLink",resolveAll:Jn.resolveAll,tokenize:Eu};function Eu(e,n,t){const r=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),i}function i(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const an={name:"lineEnding",tokenize:zu};function zu(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),K(e,n,"linePrefix")}}const Ht={name:"thematicBreak",tokenize:Pu};function Pu(e,n,t){let r=0,o;return i;function i(u){return e.enter("thematicBreak"),l(u)}function l(u){return o=u,a(u)}function a(u){return u===o?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||B(u))?(e.exit("thematicBreak"),n(u)):t(u)}function s(u){return u===o?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),Z(u)?K(e,a,"whitespace")(u):a(u))}}const fe={continuation:{tokenize:Au},exit:Mu,name:"list",tokenize:_u},Iu={partial:!0,tokenize:Lu},Du={partial:!0,tokenize:Tu};function _u(e,n,t){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Dn(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ht,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return t(p)}function s(p){return Dn(p)&&++l<10?(e.consume(p),s):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Qt,r.interrupt?t:f,e.attempt(Iu,h,c))}function f(p){return r.containerState.initialBlankLine=!0,i++,h(p)}function c(p){return Z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):t(p)}function h(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function Au(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Qt,o,i);function o(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,K(e,n,"listItemIndent",r.containerState.size+1)(a)}function i(a){return r.containerState.furtherBlankLines||!Z(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Du,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,K(e,e.attempt(fe,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Tu(e,n,t){const r=this;return K(e,o,"listItemIndent",r.containerState.size+1);function o(i){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(i):t(i)}}function Mu(e){e.exit(this.containerState.type)}function Lu(e,n,t){const r=this;return K(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const l=r.events[r.events.length-1];return!Z(i)&&l&&l[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const Lr={name:"setextUnderline",resolveTo:Ou,tokenize:Fu};function Ou(e,n){let t=e.length,r,o,i;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(o=t)}else e[t][1].type==="content"&&e.splice(t,1),!i&&e[t][1].type==="definition"&&(i=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",l,n]),e.splice(i+1,0,["exit",e[r][1],n]),e[r][1].end={...e[i][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function Fu(e,n,t){const r=this;let o;return i;function i(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),o=u,l(u)):t(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===o?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Z(u)?K(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||B(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const Nu={tokenize:Ru};function Ru(e){const n=this,t=e.attempt(Qt,r,e.attempt(this.parser.constructs.flowInitial,o,K(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Us,o)),"linePrefix")));return t;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ju={resolveAll:Hi()},Bu=Bi("string"),Hu=Bi("text");function Bi(e){return{resolveAll:Hi(e==="text"?Vu:void 0),tokenize:n};function n(t){const r=this,o=this.parser.constructs[e],i=t.attempt(o,l,a);return l;function l(f){return u(f)?i(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),s}function s(f){return u(f)?(t.exit("data"),i(f)):(t.consume(f),s)}function u(f){if(f===null)return!0;const c=o[f];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Hi(e){return n;function n(t,r){let o=-1,i;for(;++o<=t.length;)i===void 0?t[o]&&t[o][1].type==="data"&&(i=o,o++):(!t[o]||t[o][1].type!=="data")&&(o!==i+2&&(t[i][1].end=t[o-1][1].end,t.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(t,r):t}}function Vu(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],o=n.sliceStream(r);let i=o.length,l=-1,a=0,s;for(;i--;){const u=o[i];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){i++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const u={type:t===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?l:r.start._bufferIndex+l,_index:r.start._index+i,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const Uu={42:fe,43:fe,45:fe,48:fe,49:fe,50:fe,51:fe,52:fe,53:fe,54:fe,55:fe,56:fe,57:fe,62:Mi},qu={91:Gs},$u={[-2]:ln,[-1]:ln,32:ln},Wu={35:eu,42:Ht,45:[Lr,Ht],60:iu,61:Lr,95:Ht,96:Tr,126:Tr},Zu={38:Oi,92:Li},Gu={[-5]:an,[-4]:an,[-3]:an,33:wu,38:Oi,42:_n,60:[Ss,fu],91:Su,92:[Xs,Li],93:Jn,95:_n,96:Ns},Yu={null:[_n,ju]},Ku={null:[42,95]},Qu={null:[]},Xu=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ku,contentInitial:qu,disable:Qu,document:Uu,flow:Wu,flowInitial:$u,insideSpan:Yu,string:Zu,text:Gu},Symbol.toStringTag,{value:"Module"}));function Ju(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const o={},i=[];let l=[],a=[];const s={attempt:V(U),check:V(C),consume:S,enter:P,exit:M,interrupt:V(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=n.tokenize.call(u,s);return n.resolveAll&&i.push(n),u;function c(O){return l=be(l,O),k(),l[l.length-1]!==null?[]:(L(n,0),u.events=Xn(i,u.events,u),u.events)}function h(O,F){return tc(p(O),F)}function p(O){return ec(l,O)}function m(){const{_bufferIndex:O,_index:F,line:N,column:T,offset:j}=r;return{_bufferIndex:O,_index:F,line:N,column:T,offset:j}}function x(O){o[O.line]=O.column,y()}function k(){let O;for(;r._index<l.length;){const F=l[r._index];if(typeof F=="string")for(O=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===O&&r._bufferIndex<F.length;)v(F.charCodeAt(r._bufferIndex));else v(F)}}function v(O){f=f(O)}function S(O){B(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,y()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=O}function P(O,F){const N=F||{};return N.type=O,N.start=m(),u.events.push(["enter",N,u]),a.push(N),N}function M(O){const F=a.pop();return F.end=m(),u.events.push(["exit",F,u]),F}function U(O,F){L(O,F.from)}function C(O,F){F.restore()}function V(O,F){return N;function N(T,j,J){let re,ge,Ce,d;return Array.isArray(T)?Se(T):"tokenize"in T?Se([T]):me(T);function me(oe){return w;function w(E){const _=E!==null&&oe[E],I=E!==null&&oe.null,A=[...Array.isArray(_)?_:_?[_]:[],...Array.isArray(I)?I:I?[I]:[]];return Se(A)(E)}}function Se(oe){return re=oe,ge=0,oe.length===0?J:g(oe[ge])}function g(oe){return w;function w(E){return d=$(),Ce=oe,oe.partial||(u.currentConstruct=oe),oe.name&&u.parser.constructs.disable.null.includes(oe.name)?ie():oe.tokenize.call(F?Object.assign(Object.create(u),F):u,s,ue,ie)(E)}}function ue(oe){return O(Ce,d),j}function ie(oe){return d.restore(),++ge<re.length?g(re[ge]):J}}}function L(O,F){O.resolveAll&&!i.includes(O)&&i.push(O),O.resolve&&Ae(u.events,F,u.events.length-F,O.resolve(u.events.slice(F),u)),O.resolveTo&&(u.events=O.resolveTo(u.events,u))}function $(){const O=m(),F=u.previous,N=u.currentConstruct,T=u.events.length,j=Array.from(a);return{from:T,restore:J};function J(){r=O,u.previous=F,u.currentConstruct=N,u.events.length=T,a=j,y()}}function y(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function ec(e,n){const t=n.start._index,r=n.start._bufferIndex,o=n.end._index,i=n.end._bufferIndex;let l;if(t===o)l=[e[t].slice(r,i)];else{if(l=e.slice(t,o),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}i>0&&l.push(e[o].slice(0,i))}return l}function tc(e,n){let t=-1;const r=[];let o;for(;++t<e.length;){const i=e[t];let l;if(typeof i=="string")l=i;else switch(i){case-5:{l="\r";break}case-4:{l=` `;break}case-3:{l=`\r `;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&o)continue;l=" ";break}default:l=String.fromCharCode(i)}o=i===-2,r.push(l)}return r.join("")}function nc(e){const n={constructs:us([Xu,...(e||{}).extensions||[]]),content:t(vs),defined:[],document:t(xs),flow:t(Nu),lazy:{},string:t(Bu),text:t(Hu)};return n;function t(r){return o;function o(i){return Ju(n,r,i)}}}function rc(e){for(;!Fi(e););return e}const Or=/[\0\t\n\r]/g;function ic(){let e=1,n="",t=!0,r;return o;function o(i,l,a){const s=[];let u,f,c,h,p;for(i=n+(typeof i=="string"?i.toString():new TextDecoder(l||void 0).decode(i)),c=0,n="",t&&(i.charCodeAt(0)===65279&&c++,t=void 0);c<i.length;){if(Or.lastIndex=c,u=Or.exec(i),h=u&&u.index!==void 0?u.index:i.length,p=i.charCodeAt(h),!u){n=i.slice(c);break}if(p===10&&c===h&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<h&&(s.push(i.slice(c,h)),e+=h-c),p){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return a&&(r&&s.push(-5),n&&s.push(n),s.push(null)),s}}const oc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lc(e){return e.replace(oc,ac)}function ac(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const r=t.charCodeAt(1),o=r===120||r===88;return Ti(t.slice(o?2:1),o?16:10)}return Qn(t)||e}const Vi={}.hasOwnProperty;function sc(e,n,t){return typeof n!="string"&&(t=n,n=void 0),uc(t)(rc(nc(t).document().write(ic()(e,n,!0))))}function uc(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(or),autolinkProtocol:$,autolinkEmail:$,atxHeading:i(ce),blockQuote:i(I),characterEscape:$,characterReference:$,codeFenced:i(A),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(A,l),codeText:i(R,l),codeTextData:$,data:$,codeFlowValue:$,definition:i(W),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(le),hardBreakEscape:i(gt),hardBreakTrailing:i(gt),htmlFlow:i(Mt,l),htmlFlowData:$,htmlText:i(Mt,l),htmlTextData:$,image:i(Lt),label:l,link:i(or),listItem:i(vo),listItemValue:h,listOrdered:i(lr,c),listUnordered:i(lr),paragraph:i(yo),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(ce),strong:i(xo),thematicBreak:i(bo)},exit:{atxHeading:s(),atxHeadingSequence:U,autolink:s(),autolinkEmail:_,autolinkProtocol:E,blockQuote:s(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:oe,characterReference:w,codeFenced:s(k),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:y,codeIndented:s(v),codeText:s(j),codeTextData:y,data:y,definition:s(),definitionDestinationString:M,definitionLabelString:S,definitionTitleString:P,emphasis:s(),hardBreakEscape:s(F),hardBreakTrailing:s(F),htmlFlow:s(N),htmlFlowData:y,htmlText:s(T),htmlTextData:y,image:s(re),label:Ce,labelText:ge,lineEnding:O,link:s(J),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:ue,resourceDestinationString:d,resourceTitleString:me,resource:Se,setextHeading:s(L),setextHeadingLineSequence:V,setextHeadingText:C,strong:s(),thematicBreak:s()}};Ui(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(b){let D={type:"root",children:[]};const H={stack:[D],tokenStack:[],config:n,enter:a,exit:u,buffer:l,resume:f,data:t},G=[];let Q=-1;for(;++Q<b.length;)if(b[Q][1].type==="listOrdered"||b[Q][1].type==="listUnordered")if(b[Q][0]==="enter")G.push(Q);else{const Ee=G.pop();Q=o(b,Ee,Q)}for(Q=-1;++Q<b.length;){const Ee=n[b[Q][0]];Vi.call(Ee,b[Q][1].type)&&Ee[b[Q][1].type].call(Object.assign({sliceSerialize:b[Q][2].sliceSerialize},H),b[Q][1])}if(H.tokenStack.length>0){const Ee=H.tokenStack[H.tokenStack.length-1];(Ee[1]||Fr).call(H,void 0,Ee[0])}for(D.position={start:He(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:He(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},Q=-1;++Q<n.transforms.length;)D=n.transforms[Q](D)||D;return D}function o(b,D,H){let G=D-1,Q=-1,Ee=!1,tt,Te,mt,vt;for(;++G<=H;){const ve=b[G];switch(ve[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ve[0]==="enter"?Q++:Q--,vt=void 0;break}case"lineEndingBlank":{ve[0]==="enter"&&(tt&&!vt&&!Q&&!mt&&(mt=G),vt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:vt=void 0}if(!Q&&ve[0]==="enter"&&ve[1].type==="listItemPrefix"||Q===-1&&ve[0]==="exit"&&(ve[1].type==="listUnordered"||ve[1].type==="listOrdered")){if(tt){let nt=G;for(Te=void 0;nt--;){const Me=b[nt];if(Me[1].type==="lineEnding"||Me[1].type==="lineEndingBlank"){if(Me[0]==="exit")continue;Te&&(b[Te][1].type="lineEndingBlank",Ee=!0),Me[1].type="lineEnding",Te=nt}else if(!(Me[1].type==="linePrefix"||Me[1].type==="blockQuotePrefix"||Me[1].type==="blockQuotePrefixWhitespace"||Me[1].type==="blockQuoteMarker"||Me[1].type==="listItemIndent"))break}mt&&(!Te||mt<Te)&&(tt._spread=!0),tt.end=Object.assign({},Te?b[Te][1].start:ve[1].end),b.splice(Te||G,0,["exit",tt,ve[2]]),G++,H++}if(ve[1].type==="listItemPrefix"){const nt={type:"listItem",_spread:!1,start:Object.assign({},ve[1].start),end:void 0};tt=nt,b.splice(G,0,["enter",nt,ve[2]]),G++,H++,mt=void 0,vt=!0}}}return b[D][1]._spread=Ee,H}function i(b,D){return H;function H(G){a.call(this,b(G),G),D&&D.call(this,G)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(b,D,H){this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([D,H||void 0]),b.position={start:He(D.start),end:void 0}}function s(b){return D;function D(H){b&&b.call(this,H),u.call(this,H)}}function u(b,D){const H=this.stack.pop(),G=this.tokenStack.pop();if(G)G[0].type!==b.type&&(D?D.call(this,b,G[0]):(G[1]||Fr).call(this,b,G[0]));else throw new Error("Cannot close `"+b.type+"` ("+Et({start:b.start,end:b.end})+"): it’s not open");H.position.end=He(b.end)}function f(){return as(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(b){if(this.data.expectingFirstListItemValue){const D=this.stack[this.stack.length-2];D.start=Number.parseInt(this.sliceSerialize(b),10),this.data.expectingFirstListItemValue=void 0}}function p(){const b=this.resume(),D=this.stack[this.stack.length-1];D.lang=b}function m(){const b=this.resume(),D=this.stack[this.stack.length-1];D.meta=b}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const b=this.resume(),D=this.stack[this.stack.length-1];D.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const b=this.resume(),D=this.stack[this.stack.length-1];D.value=b.replace(/(\r?\n|\r)$/g,"")}function S(b){const D=this.resume(),H=this.stack[this.stack.length-1];H.label=D,H.identifier=ft(this.sliceSerialize(b)).toLowerCase()}function P(){const b=this.resume(),D=this.stack[this.stack.length-1];D.title=b}function M(){const b=this.resume(),D=this.stack[this.stack.length-1];D.url=b}function U(b){const D=this.stack[this.stack.length-1];if(!D.depth){const H=this.sliceSerialize(b).length;D.depth=H}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function V(b){const D=this.stack[this.stack.length-1];D.depth=this.sliceSerialize(b).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function $(b){const D=this.stack[this.stack.length-1].children;let H=D[D.length-1];(!H||H.type!=="text")&&(H=ko(),H.position={start:He(b.start),end:void 0},D.push(H)),this.stack.push(H)}function y(b){const D=this.stack.pop();D.value+=this.sliceSerialize(b),D.position.end=He(b.end)}function O(b){const D=this.stack[this.stack.length-1];if(this.data.atHardBreak){const H=D.children[D.children.length-1];H.position.end=He(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(D.type)&&($.call(this,b),y.call(this,b))}function F(){this.data.atHardBreak=!0}function N(){const b=this.resume(),D=this.stack[this.stack.length-1];D.value=b}function T(){const b=this.resume(),D=this.stack[this.stack.length-1];D.value=b}function j(){const b=this.resume(),D=this.stack[this.stack.length-1];D.value=b}function J(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=D,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function re(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=D,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function ge(b){const D=this.sliceSerialize(b),H=this.stack[this.stack.length-2];H.label=lc(D),H.identifier=ft(D).toLowerCase()}function Ce(){const b=this.stack[this.stack.length-1],D=this.resume(),H=this.stack[this.stack.length-1];if(this.data.inReference=!0,H.type==="link"){const G=b.children;H.children=G}else H.alt=D}function d(){const b=this.resume(),D=this.stack[this.stack.length-1];D.url=b}function me(){const b=this.resume(),D=this.stack[this.stack.length-1];D.title=b}function Se(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function ue(b){const D=this.resume(),H=this.stack[this.stack.length-1];H.label=D,H.identifier=ft(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function ie(b){this.data.characterReferenceType=b.type}function oe(b){const D=this.sliceSerialize(b),H=this.data.characterReferenceType;let G;H?(G=Ti(D,H==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):G=Qn(D);const Q=this.stack[this.stack.length-1];Q.value+=G}function w(b){const D=this.stack.pop();D.position.end=He(b.end)}function E(b){y.call(this,b);const D=this.stack[this.stack.length-1];D.url=this.sliceSerialize(b)}function _(b){y.call(this,b);const D=this.stack[this.stack.length-1];D.url="mailto:"+this.sliceSerialize(b)}function I(){return{type:"blockquote",children:[]}}function A(){return{type:"code",lang:null,meta:null,value:""}}function R(){return{type:"inlineCode",value:""}}function W(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function le(){return{type:"emphasis",children:[]}}function ce(){return{type:"heading",depth:0,children:[]}}function gt(){return{type:"break"}}function Mt(){return{type:"html",value:""}}function Lt(){return{type:"image",title:null,url:"",alt:null}}function or(){return{type:"link",title:null,url:"",children:[]}}function lr(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function vo(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function yo(){return{type:"paragraph",children:[]}}function xo(){return{type:"strong",children:[]}}function ko(){return{type:"text",value:""}}function bo(){return{type:"thematicBreak"}}}function He(e){return{line:e.line,column:e.column,offset:e.offset}}function Ui(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?Ui(e,r):cc(e,r)}}function cc(e,n){let t;for(t in n)if(Vi.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Fr(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Et({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Et({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Et({start:n.start,end:n.end})+") is still open")}function fc(e){const n=this;n.parser=t;function t(r){return sc(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function pc(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function hc(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` `}]}function dc(e,n){const t=n.value?n.value+` `:"",r={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function gc(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function mc(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function vc(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),o=dt(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+o,id:t+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(n,u),e.applyData(n,u)}function yc(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function xc(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function qi(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const o=e.all(n),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function kc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return qi(e,n);const o={src:dt(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,i),e.applyData(n,i)}function bc(e,n){const t={src:dt(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function wc(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Cc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return qi(e,n);const o={href:dt(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Sc(e,n){const t={href:dt(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Ec(e,n,t){const r=e.all(n),o=t?zc(t):$i(n),i={},l=[];if(typeof n.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(o||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:` `}),f.type==="element"&&f.tagName==="p"&&!o?l.push(...f.children):l.push(f)}const s=r[r.length-1];s&&(o||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:` `});const u={type:"element",tagName:"li",properties:i,children:l};return e.patch(n,u),e.applyData(n,u)}function zc(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=$i(t[r])}return n}function $i(e){return e.spread??e.children.length>1}function Pc(e,n){const t={},r=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++o<r.length;){const l=r[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const i={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,i),e.applyData(n,i)}function Ic(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Dc(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function _c(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ac(e,n){const t=e.all(n),r=t.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),o.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=Zn(n.children[1]),s=Ei(n.children[n.children.length-1]);a&&s&&(l.position={start:a,end:s}),o.push(l)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,i),e.applyData(n,i)}function Tc(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",i=t&&t.type==="table"?t.align:void 0,l=i?i.length:n.children.length;let a=-1;const s=[];for(;++a<l;){const f=n.children[a],c={},h=i?i[a]:void 0;h&&(c.align=h);let p={type:"element",tagName:o,properties:c,children:[]};f&&(p.children=e.all(f),e.patch(f,p),p=e.applyData(f,p)),s.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(n,u),e.applyData(n,u)}function Mc(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Nr=9,Rr=32;function Lc(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),o=0;const i=[];for(;r;)i.push(jr(n.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=t.exec(n);return i.push(jr(n.slice(o),o>0,!1)),i.join("")}function jr(e,n,t){let r=0,o=e.length;if(n){let i=e.codePointAt(r);for(;i===Nr||i===Rr;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(o-1);for(;i===Nr||i===Rr;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function Oc(e,n){const t={type:"text",value:Lc(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Fc(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Nc={blockquote:pc,break:hc,code:dc,delete:gc,emphasis:mc,footnoteReference:vc,heading:yc,html:xc,imageReference:kc,image:bc,inlineCode:wc,linkReference:Cc,link:Sc,listItem:Ec,list:Pc,paragraph:Ic,root:Dc,strong:_c,table:Ac,tableCell:Mc,tableRow:Tc,text:Oc,thematicBreak:Fc,toml:Rt,yaml:Rt,definition:Rt,footnoteDefinition:Rt};function Rt(){}function Rc(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function jc(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Bc(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Rc,r=e.options.footnoteBackLabel||jc,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[s]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),h=dt(c.toLowerCase());let p=0;const m=[],x=e.footnoteCounts.get(c);for(;x!==void 0&&++p<=x;){m.length>0&&m.push({type:"text",value:" "});let S=typeof t=="string"?t:t(s,p);typeof S=="string"&&(S={type:"text",value:S}),m.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,p),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const k=f[f.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const S=k.children[k.children.length-1];S&&S.type==="text"?S.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...m)}else f.push(...m);const v={type:"element",tagName:"li",properties:{id:n+"fn-"+h},children:e.wrap(f,!0)};e.patch(u,v),a.push(v)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Xe(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:` `}]}}const An={}.hasOwnProperty,Hc={};function Vc(e,n){const t=n||Hc,r=new Map,o=new Map,i=new Map,l={...Nc,...t.handlers},a={all:u,applyData:qc,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:l,one:s,options:t,patch:Uc,wrap:Wc};return Ge(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:o,h=String(f.identifier).toUpperCase();c.has(h)||c.set(h,f)}}),a;function s(f,c){const h=f.type,p=a.handlers[h];if(An.call(a.handlers,h)&&p)return p(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in f){const{children:m,...x}=f,k=Xe(x);return k.children=a.all(f),k}return Xe(f)}return(a.options.unknownHandler||$c)(a,f,c)}function u(f){const c=[];if("children"in f){const h=f.children;let p=-1;for(;++p<h.length;){const m=a.one(h[p],f);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Br(m.value)),!Array.isArray(m)&&m.type==="element")){const x=m.children[0];x&&x.type==="text"&&(x.value=Br(x.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function Uc(e,n){e.position&&(n.position=_a(e))}function qc(e,n){let t=n;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&i&&Object.assign(t.properties,Xe(i)),"children"in t&&t.children&&o!==null&&o!==void 0&&(t.children=o)}return t}function $c(e,n){const t=n.data||{},r="value"in n&&!(An.call(t,"hProperties")||An.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Wc(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:` `});++r<e.length;)r&&t.push({type:"text",value:` `}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:` `}),t}function Br(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Hr(e,n){const t=Vc(e,n),r=t.one(e,void 0),o=Bc(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:` `},o),i}function Zc(e,n){return e&&"run"in e?async function(t,r){const o=Hr(t,{file:r,...n});await e.run(o,r)}:function(t,r){return Hr(t,{file:r,...e||n})}}function Gc(e){Ge(e,function(n,t,r){if(t!==void 0&&r&&n.type==="paragraph"&&n.children.every(function(o){return o.type==="text"&&/^\s*$/.test(o.value)}))return r.children.splice(t,1),t})}function Yc(e={except:["http","https"]}){return function(n){const t=new Map;Ge(n,"definition",function(r,o,i){if(t.set(r.identifier,r.url),i&&typeof o=="number"){const l=r.url;if(l&&l.includes(":")&&!e.except.some(a=>l.startsWith(`${a}:`)))return i.children.splice(o,1),o}}),Ge(n,function(r,o,i){if(i&&typeof o=="number"&&(r.type==="link"||r.type==="linkReference")){const l=r.type==="link"?r.url:t.get(r.identifier);if(l&&l.includes(":")&&!e.except.some(a=>l.startsWith(`${a}:`)))return i.children.splice(o,1,...r.children),o}}),Gc(n)}}function Vr(e){if(e)throw e}var sn,Ur;function Kc(){if(Ur)return sn;Ur=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(s){return typeof Array.isArray=="function"?Array.isArray(s):n.call(s)==="[object Array]"},i=function(s){if(!s||n.call(s)!=="[object Object]")return!1;var u=e.call(s,"constructor"),f=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!u&&!f)return!1;var c;for(c in s);return typeof c>"u"||e.call(s,c)},l=function(s,u){t&&u.name==="__proto__"?t(s,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):s[u.name]=u.newValue},a=function(s,u){if(u==="__proto__")if(e.call(s,u)){if(r)return r(s,u).value}else return;return s[u]};return sn=function s(){var u,f,c,h,p,m,x=arguments[0],k=1,v=arguments.length,S=!1;for(typeof x=="boolean"&&(S=x,x=arguments[1]||{},k=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});k<v;++k)if(u=arguments[k],u!=null)for(f in u)c=a(x,f),h=a(u,f),x!==h&&(S&&h&&(i(h)||(p=o(h)))?(p?(p=!1,m=c&&o(c)?c:[]):m=c&&i(c)?c:{},l(x,{name:f,newValue:s(S,m,h)})):typeof h<"u"&&l(x,{name:f,newValue:h}));return x},sn}var Qc=Kc();const un=oi(Qc);function Tn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Xc(){const e=[],n={run:t,use:r};return n;function t(...o){let i=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...o);function a(s,...u){const f=e[++i];let c=-1;if(s){l(s);return}for(;++c<o.length;)(u[c]===null||u[c]===void 0)&&(u[c]=o[c]);o=u,f?Jc(f,a)(...u):l(null,...u)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function Jc(e,n){let t;return r;function r(...l){const a=e.length>l.length;let s;a&&l.push(o);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&t)throw f;return o(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(i,o):s instanceof Error?o(s):i(s))}function o(l,...a){t||(t=!0,n(l,...a))}function i(l){o(null,l)}}const ze={basename:ef,dirname:tf,extname:nf,join:rf,sep:"/"};function ef(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');At(e);let t=0,r=-1,o=e.length,i;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){t=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){t=o+1;break}}else l<0&&(i=!0,l=o+1),a>-1&&(e.codePointAt(o)===n.codePointAt(a--)?a<0&&(r=o):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function tf(e){if(At(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function nf(e){At(e);let n=e.length,t=-1,r=0,o=-1,i=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?o<0?o=n:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||t<0||i===0||i===1&&o===t-1&&o===r+1?"":e.slice(o,t)}function rf(...e){let n=-1,t;for(;++n<e.length;)At(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":of(t)}function of(e){At(e);const n=e.codePointAt(0)===47;let t=lf(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function lf(e,n){let t="",r=0,o=-1,i=0,l=-1,a,s;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(o===l-1||i===1))if(o!==l-1&&i===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),o=l,i=0;continue}}else if(t.length>0){t="",r=0,o=l,i=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(o+1,l):t=e.slice(o+1,l),r=l-o-1;o=l,i=0}else a===46&&i>-1?i++:i=-1}return t}function At(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const af={cwd:sf};function sf(){return"/"}function Mn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uf(e){if(typeof e=="string")e=new URL(e);else if(!Mn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return cf(e)}function cf(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const cn=["history","path","basename","stem","extname","dirname"];class ff{constructor(n){let t;n?Mn(n)?t={path:n}:typeof n=="string"||pf(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":af.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<cn.length;){const i=cn[r];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let o;for(o in t)cn.includes(o)||(this[o]=t[o])}get basename(){return typeof this.path=="string"?ze.basename(this.path):void 0}set basename(n){pn(n,"basename"),fn(n,"basename"),this.path=ze.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ze.dirname(this.path):void 0}set dirname(n){qr(this.basename,"dirname"),this.path=ze.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ze.extname(this.path):void 0}set extname(n){if(fn(n,"extname"),qr(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ze.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Mn(n)&&(n=uf(n)),pn(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ze.basename(this.path,this.extname):void 0}set stem(n){pn(n,"stem"),fn(n,"stem"),this.path=ze.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const o=this.message(n,t,r);throw o.fatal=!0,o}info(n,t,r){const o=this.message(n,t,r);return o.fatal=void 0,o}message(n,t,r){const o=new ae(n,t,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function fn(e,n){if(e&&e.includes(ze.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ze.sep+"`")}function pn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function qr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function pf(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hf=(function(e){const n=this.constructor.prototype,t=n[e],r=function(){return t.apply(r,arguments)};return Object.setPrototypeOf(r,n),r}),df={}.hasOwnProperty;class er extends hf{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=Xc()}copy(){const n=new er;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(un(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(gn("data",this.frozen),this.namespace[n]=t,this):df.call(this.namespace,n)&&this.namespace[n]||void 0:n?(gn("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=t.call(n,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=jt(n),r=this.parser||this.Parser;return hn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),hn("process",this.parser||this.Parser),dn("process",this.compiler||this.Compiler),t?o(void 0,t):new Promise(o);function o(i,l){const a=jt(n),s=r.parse(a);r.run(s,a,function(f,c,h){if(f||!c||!h)return u(f);const p=c,m=r.stringify(p,h);vf(m)?h.value=m:h.result=m,u(f,h)});function u(f,c){f||!c?l(f):i?i(c):t(void 0,c)}}}processSync(n){let t=!1,r;return this.freeze(),hn("processSync",this.parser||this.Parser),dn("processSync",this.compiler||this.Compiler),this.process(n,o),Wr("processSync","process",t),r;function o(i,l){t=!0,Vr(i),r=l}}run(n,t,r){$r(n),this.freeze();const o=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?i(void 0,r):new Promise(i);function i(l,a){const s=jt(t);o.run(n,s,u);function u(f,c,h){const p=c||n;f?a(f):l?l(p):r(void 0,p,h)}}}runSync(n,t){let r=!1,o;return this.run(n,t,i),Wr("runSync","run",r),o;function i(l,a){Vr(l),o=a,r=!0}}stringify(n,t){this.freeze();const r=jt(t),o=this.compiler||this.Compiler;return dn("stringify",o),$r(n),o(n,r)}use(n,...t){const r=this.attachers,o=this.namespace;if(gn("use",this.frozen),n!=null)if(typeof n=="function")s(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function i(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;s(f,c)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(o.settings=un(!0,o.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];i(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,f){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===u){h=c;break}if(h===-1)r.push([u,...f]);else if(f.length>0){let[p,...m]=f;const x=r[h][1];Tn(x)&&Tn(p)&&(p=un(!0,x,p)),r[h]=[u,p,...m]}}}}const gf=new er().freeze();function hn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function gn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $r(e){if(!Tn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Wr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function jt(e){return mf(e)?e:new ff(e)}function mf(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function vf(e){return typeof e=="string"||yf(e)}function yf(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xf={name:"NcReferenceList",components:{NcReferenceWidget:ql},props:{text:{type:String,default:""},referenceData:{type:Array,default:null},limit:{type:Number,default:1},displayFallback:{type:Boolean,default:!1},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},emits:["loaded"],data(){return{references:null,loading:!0}},computed:{isVisible(){return this.loading||this.displayedReferences.length!==0},values(){return this.referenceData?this.referenceData:this.displayFallback&&!this.loading&&!this.references?[this.fallbackReference]:this.references?Object.values(this.references):[]},firstReference(){return this.values[0]??null},displayedReferences(){return this.values.filter(Boolean).slice(0,this.limit)},fallbackReference(){return{accessible:!0,openGraphObject:{id:this.text,link:this.text,name:this.text},richObjectType:"open-graph"}}},watch:{text:"fetch"},mounted(){this.fetch()},methods:{fetch(){if(this.loading=!0,this.referenceData){this.references=null,this.loading=!1;return}if(!new RegExp(sr).exec(this.text)){this.references=null,this.loading=!1;return}this.resolve().then(e=>{this.references=e.data.ocs.data.references,this.loading=!1,this.$emit("loaded")}).catch(e=>{Re.error("[NcReferenceList] Failed to extract references",{error:e}),this.loading=!1,this.$emit("loaded")})},resolve(){const e=new RegExp(sr).exec(this.text.trim()),n=Eo()===null;return this.limit===1&&e?n?Ft.get(Ot("references/resolvePublic")+`?reference=${encodeURIComponent(e[0])}&sharingToken=${fr()}`):Ft.get(Ot("references/resolve")+`?reference=${encodeURIComponent(e[0])}`):n?Ft.post(Ot("references/extractPublic"),{text:this.text,resolve:!0,limit:this.limit,sharingToken:fr()}):Ft.post(Ot("references/extract"),{text:this.text,resolve:!0,limit:this.limit})}}};function kf(e,n,t,r,o,i){const l=ut("NcReferenceWidget");return i.isVisible?(ne(),we("div",{key:0,class:$e(["widgets--list",{"icon-loading":o.loading}])},[(ne(!0),we(Rn,null,Ro(i.displayedReferences,a=>(ne(),Ze(l,{key:a.openGraphObject?.id,reference:a,interactive:t.interactive,interactiveOptIn:t.interactiveOptIn},null,8,["reference","interactive","interactiveOptIn"]))),128))],2)):De("",!0)}const mn=pt(xf,[["render",kf],["__scopeId","data-v-9cde5a6a"]]);function Zr(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,o=t.indexOf(n);for(;o!==-1;)r++,o=t.indexOf(n,o+n.length);return r}const Dt=Jt(/[A-Za-z]/),tr=Jt(/[\dA-Za-z]/);function bf(e){return e!==null&&(e<32||e===127)}function lt(e){return e!==null&&e<-2}function de(e){return e!==null&&(e<0||e===32)}function Oe(e){return e===-2||e===-1||e===32}const Xt=Jt(new RegExp("\\p{P}|\\p{S}","u")),Je=Jt(/\s/);function Jt(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function wf(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const en=(function(e){if(e==null)return zf;if(typeof e=="function")return tn(e);if(typeof e=="object")return Array.isArray(e)?Cf(e):Sf(e);if(typeof e=="string")return Ef(e);throw new Error("Expected function, string, or object as test")});function Cf(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=en(e[t]);return tn(r);function r(...o){let i=-1;for(;++i<n.length;)if(n[i].apply(this,o))return!0;return!1}}function Sf(e){const n=e;return tn(t);function t(r){const o=r;let i;for(i in e)if(o[i]!==n[i])return!1;return!0}}function Ef(e){return tn(n);function n(t){return t&&t.type===e}}function tn(e){return n;function n(t,r,o){return!!(Pf(t)&&e.call(this,t,typeof r=="number"?r:void 0,o||void 0))}}function zf(){return!0}function Pf(e){return e!==null&&typeof e=="object"&&"type"in e}const Wi=[],If=!0,Gr=!1,Df="skip";function _f(e,n,t,r){let o;o=n;const i=en(o),l=1;a(e,void 0,[])();function a(s,u,f){const c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(s.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=Wi,m,x,k;if(i(s,u,f[f.length-1]||void 0)&&(p=Af(t(s,f)),p[0]===Gr))return p;if("children"in s&&s.children){const v=s;if(v.children&&p[0]!==Df)for(x=-1+l,k=f.concat(v);x>-1&&x<v.children.length;){const S=v.children[x];if(m=a(S,x,k)(),m[0]===Gr)return m;x=typeof m[1]=="number"?m[1]:x+l}}return p}}}function Af(e){return Array.isArray(e)?e:typeof e=="number"?[If,e]:e==null?Wi:[e]}function Tf(e,n,t){const r=en((t||{}).ignore||[]),o=Mf(n);let i=-1;for(;++i<o.length;)_f(e,"text",l);function l(s,u){let f=-1,c;for(;++f<u.length;){const h=u[f],p=c?c.children:void 0;if(r(h,p?p.indexOf(h):void 0,c))return;c=h}if(c)return a(s,u)}function a(s,u){const f=u[u.length-1],c=o[i][0],h=o[i][1];let p=0;const m=f.children.indexOf(s);let x=!1,k=[];c.lastIndex=0;let v=c.exec(s.value);for(;v;){const S=v.index,P={index:v.index,input:v.input,stack:[...u,s]};let M=h(...v,P);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?c.lastIndex=S+1:(p!==S&&k.push({type:"text",value:s.value.slice(p,S)}),Array.isArray(M)?k.push(...M):M&&k.push(M),p=S+v[0].length,x=!0),!c.global)break;v=c.exec(s.value)}return x?(p<s.value.length&&k.push({type:"text",value:s.value.slice(p)}),f.children.splice(m,1,...k)):k=[s],m+k.length}}function Mf(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const o=t[r];n.push([Lf(o[0]),Of(o[1])])}return n}function Lf(e){return typeof e=="string"?new RegExp(wf(e),"g"):e}function Of(e){return typeof e=="function"?e:function(){return e}}const vn="phrasing",yn=["autolink","link","image","label"];function Ff(){return{transforms:[Uf],enter:{literalAutolink:Rf,literalAutolinkEmail:xn,literalAutolinkHttp:xn,literalAutolinkWww:xn},exit:{literalAutolink:Vf,literalAutolinkEmail:Hf,literalAutolinkHttp:jf,literalAutolinkWww:Bf}}}function Nf(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vn,notInConstruct:yn},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vn,notInConstruct:yn},{character:":",before:"[ps]",after:"\\/",inConstruct:vn,notInConstruct:yn}]}}function Rf(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function xn(e){this.config.enter.autolinkProtocol.call(this,e)}function jf(e){this.config.exit.autolinkProtocol.call(this,e)}function Bf(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function Hf(e){this.config.exit.autolinkEmail.call(this,e)}function Vf(e){this.exit(e)}function Uf(e){Tf(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,qf],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,$f]],{ignore:["link","linkReference"]})}function qf(e,n,t,r,o){let i="";if(!Zi(o)||(/^w/i.test(n)&&(t=n+t,n="",i="http://"),!Wf(t)))return!1;const l=Zf(t+r);if(!l[0])return!1;const a={type:"link",title:null,url:i+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function $f(e,n,t,r){return!Zi(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Wf(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Zf(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const o=Zr(e,"(");let i=Zr(e,")");for(;r!==-1&&o>i;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),i++;return[e,t]}function Zi(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Je(t)||Xt(t))&&(!n||t!==47)}function Tt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Gi.peek=np;function Gf(){this.buffer()}function Yf(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Kf(){this.buffer()}function Qf(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Xf(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Tt(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Jf(e){this.exit(e)}function ep(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Tt(this.sliceSerialize(e)).toLowerCase(),t.label=n}function tp(e){this.exit(e)}function np(){return"["}function Gi(e,n,t,r){const o=t.createTracker(r);let i=o.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return i+=o.move(t.safe(t.associationId(e),{after:"]",before:i})),a(),l(),i+=o.move("]"),i}function rp(){return{enter:{gfmFootnoteCallString:Gf,gfmFootnoteCall:Yf,gfmFootnoteDefinitionLabelString:Kf,gfmFootnoteDefinition:Qf},exit:{gfmFootnoteCallString:Xf,gfmFootnoteCall:Jf,gfmFootnoteDefinitionLabelString:ep,gfmFootnoteDefinition:tp}}}function ip(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Gi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,o,i,l){const a=i.createTracker(l);let s=a.move("[^");const u=i.enter("footnoteDefinition"),f=i.enter("label");return s+=a.move(i.safe(i.associationId(r),{before:s,after:"]"})),f(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((n?` `:" ")+i.indentLines(i.containerFlow(r,a.current()),n?Yi:op))),u(),s}}function op(e,n,t){return n===0?e:Yi(e,n,t)}function Yi(e,n,t){return(t?"":" ")+e}const lp=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ki.peek=fp;function ap(){return{canContainEols:["delete"],enter:{strikethrough:up},exit:{strikethrough:cp}}}function sp(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lp}],handlers:{delete:Ki}}}function up(e){this.enter({type:"delete",children:[]},e)}function cp(e){this.exit(e)}function Ki(e,n,t,r){const o=t.createTracker(r),i=t.enter("strikethrough");let l=o.move("~~");return l+=t.containerPhrasing(e,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),i(),l}function fp(){return"~"}function pp(e){return e.length}function hp(e,n){const t=n||{},r=(t.align||[]).concat(),o=t.stringLength||pp,i=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const x=[],k=[];let v=-1;for(e[f].length>u&&(u=e[f].length);++v<e[f].length;){const S=dp(e[f][v]);if(t.alignDelimiters!==!1){const P=o(S);k[v]=P,(s[v]===void 0||P>s[v])&&(s[v]=P)}x.push(S)}l[f]=x,a[f]=k}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)i[c]=Yr(r[c]);else{const x=Yr(r);for(;++c<u;)i[c]=x}c=-1;const h=[],p=[];for(;++c<u;){const x=i[c];let k="",v="";x===99?(k=":",v=":"):x===108?k=":":x===114&&(v=":");let S=t.alignDelimiters===!1?1:Math.max(1,s[c]-k.length-v.length);const P=k+"-".repeat(S)+v;t.alignDelimiters!==!1&&(S=k.length+S+v.length,S>s[c]&&(s[c]=S),p[c]=S),h[c]=P}l.splice(1,0,h),a.splice(1,0,p),f=-1;const m=[];for(;++f<l.length;){const x=l[f],k=a[f];c=-1;const v=[];for(;++c<u;){const S=x[c]||"";let P="",M="";if(t.alignDelimiters!==!1){const U=s[c]-(k[c]||0),C=i[c];C===114?P=" ".repeat(U):C===99?U%2?(P=" ".repeat(U/2+.5),M=" ".repeat(U/2-.5)):(P=" ".repeat(U/2),M=P):M=" ".repeat(U)}t.delimiterStart!==!1&&!c&&v.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&S==="")&&(t.delimiterStart!==!1||c)&&v.push(" "),t.alignDelimiters!==!1&&v.push(P),v.push(S),t.alignDelimiters!==!1&&v.push(M),t.padding!==!1&&v.push(" "),(t.delimiterEnd!==!1||c!==u-1)&&v.push("|")}m.push(t.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return m.join(` `)}function dp(e){return e==null?"":String(e)}function Yr(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function gp(e,n,t,r){const o=t.enter("blockquote"),i=t.createTracker(r);i.move("> "),i.shift(2);const l=t.indentLines(t.containerFlow(e,i.current()),mp);return o(),l}function mp(e,n,t){return">"+(t?"":" ")+e}function vp(e,n){return Kr(e,n.inConstruct,!0)&&!Kr(e,n.notInConstruct,!1)}function Kr(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function Qr(e,n,t,r){let o=-1;for(;++o<t.unsafe.length;)if(t.unsafe[o].character===` `&&vp(t.stack,t.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\ `}function yp(e,n){const t=String(e);let r=t.indexOf(n),o=r,i=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>l&&(l=i):i=1,o=r+n.length,r=t.indexOf(n,o);return l}function xp(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function kp(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function bp(e,n,t,r){const o=kp(t),i=e.value||"",l=o==="`"?"GraveAccent":"Tilde";if(xp(e,t)){const c=t.enter("codeIndented"),h=t.indentLines(i,wp);return c(),h}const a=t.createTracker(r),s=o.repeat(Math.max(yp(i,o)+1,3)),u=t.enter("codeFenced");let f=a.move(s);if(e.lang){const c=t.enter(`codeFencedLang${l}`);f+=a.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=t.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(t.safe(e.meta,{before:f,after:` `,encode:["`"],...a.current()})),c()}return f+=a.move(` `),i&&(f+=a.move(i+` `)),f+=a.move(s),u(),f}function wp(e,n,t){return(t?"":" ")+e}function nr(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Cp(e,n,t,r){const o=nr(t),i=o==='"'?"Quote":"Apostrophe",l=t.enter("definition");let a=t.enter("label");const s=t.createTracker(r);let u=s.move("[");return u+=s.move(t.safe(t.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(t.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:e.title?" ":` `,...s.current()}))),a(),e.title&&(a=t.enter(`title${i}`),u+=s.move(" "+o),u+=s.move(t.safe(e.title,{before:u,after:o,...s.current()})),u+=s.move(o),a()),l(),u}function Sp(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function _t(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Wt(e){if(e===null||de(e)||Je(e))return 1;if(Xt(e))return 2}function Zt(e,n,t){const r=Wt(e),o=Wt(n);return r===void 0?o===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Qi.peek=Ep;function Qi(e,n,t,r){const o=Sp(t),i=t.enter("emphasis"),l=t.createTracker(r),a=l.move(o);let s=l.move(t.containerPhrasing(e,{after:o,before:a,...l.current()}));const u=s.charCodeAt(0),f=Zt(r.before.charCodeAt(r.before.length-1),u,o);f.inside&&(s=_t(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=Zt(r.after.charCodeAt(0),c,o);h.inside&&(s=s.slice(0,-1)+_t(c));const p=l.move(o);return i(),t.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function Ep(e,n,t){return t.options.emphasis||"*"}const zp={};function Xi(e,n){const t=zp,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,o=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Ji(e,r,o)}function Ji(e,n,t){if(Pp(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Xr(e.children,n,t)}return Array.isArray(e)?Xr(e,n,t):""}function Xr(e,n,t){const r=[];let o=-1;for(;++o<e.length;)r[o]=Ji(e[o],n,t);return r.join("")}function Pp(e){return!!(e&&typeof e=="object")}function Ip(e,n){let t=!1;return Ge(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,ll}),!!((!e.depth||e.depth<3)&&Xi(e)&&(n.options.setext||t))}function Dp(e,n,t,r){const o=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(Ip(e,t)){const f=t.enter("headingSetext"),c=t.enter("phrasing"),h=t.containerPhrasing(e,{...i.current(),before:` `,after:` `});return c(),f(),h+` `+(o===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(` `))+1))}const l="#".repeat(o),a=t.enter("headingAtx"),s=t.enter("phrasing");i.move(l+" ");let u=t.containerPhrasing(e,{before:"# ",after:` `,...i.current()});return/^[\t ]/.test(u)&&(u=_t(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),s(),a(),u}eo.peek=_p;function eo(e){return e.value||""}function _p(){return"<"}to.peek=Ap;function to(e,n,t,r){const o=nr(t),i=o==='"'?"Quote":"Apostrophe",l=t.enter("image");let a=t.enter("label");const s=t.createTracker(r);let u=s.move("![");return u+=s.move(t.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(t.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=t.enter(`title${i}`),u+=s.move(" "+o),u+=s.move(t.safe(e.title,{before:u,after:o,...s.current()})),u+=s.move(o),a()),u+=s.move(")"),l(),u}function Ap(){return"!"}no.peek=Tp;function no(e,n,t,r){const o=e.referenceType,i=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("![");const u=t.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,i(),o==="full"||!u||u!==c?s+=a.move(c+"]"):o==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Tp(){return"!"}ro.peek=Mp;function ro(e,n,t){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<t.unsafe.length;){const l=t.unsafe[i],a=t.compilePattern(l);let s;if(l.atBreak)for(;s=a.exec(r);){let u=s.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1)}}return o+r+o}function Mp(){return"`"}function io(e,n){const t=Xi(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}oo.peek=Lp;function oo(e,n,t,r){const o=nr(t),i=o==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let a,s;if(io(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let c=l.move("<");return c+=l.move(t.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),t.stack=f,c}a=t.enter("link"),s=t.enter("label");let u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=t.enter(`title${i}`),u+=l.move(" "+o),u+=l.move(t.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),u+=l.move(")"),a(),u}function Lp(e,n,t){return io(e,t)?"<":"["}lo.peek=Op;function lo(e,n,t,r){const o=e.referenceType,i=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("[");const u=t.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,i(),o==="full"||!u||u!==c?s+=a.move(c+"]"):o==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Op(){return"["}function rr(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Fp(e){const n=rr(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Np(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function ao(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Rp(e,n,t,r){const o=t.enter("list"),i=t.bulletCurrent;let l=e.ordered?Np(t):rr(t);const a=e.ordered?l==="."?")":".":Fp(t);let s=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(s=!0),ao(t)===l&&f){let c=-1;for(;++c<e.children.length;){const h=e.children[c];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=a),t.bulletCurrent=l;const u=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=i,o(),u}function jp(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Bp(e,n,t,r){const o=jp(t);let i=t.bulletCurrent||rr(t);n&&n.type==="list"&&n.ordered&&(i=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+i);let l=i.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=t.createTracker(r);a.move(i+" ".repeat(l-i.length)),a.shift(l);const s=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,a.current()),f);return s(),u;function f(c,h,p){return h?(p?"":" ".repeat(l))+c:(p?i:i+" ".repeat(l-i.length))+c}}function Hp(e,n,t,r){const o=t.enter("paragraph"),i=t.enter("phrasing"),l=t.containerPhrasing(e,r);return i(),o(),l}const Vp=en(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Up(e,n,t,r){return(e.children.some(function(o){return Vp(o)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function qp(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}so.peek=$p;function so(e,n,t,r){const o=qp(t),i=t.enter("strong"),l=t.createTracker(r),a=l.move(o+o);let s=l.move(t.containerPhrasing(e,{after:o,before:a,...l.current()}));const u=s.charCodeAt(0),f=Zt(r.before.charCodeAt(r.before.length-1),u,o);f.inside&&(s=_t(u)+s.slice(1));const c=s.charCodeAt(s.length-1),h=Zt(r.after.charCodeAt(0),c,o);h.inside&&(s=s.slice(0,-1)+_t(c));const p=l.move(o+o);return i(),t.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},a+s+p}function $p(e,n,t){return t.options.strong||"*"}function Wp(e,n,t,r){return t.safe(e.value,r)}function Zp(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function Gp(e,n,t){const r=(ao(t)+(t.options.ruleSpaces?" ":"")).repeat(Zp(t));return t.options.ruleSpaces?r.slice(0,-1):r}const uo={blockquote:gp,break:Qr,code:bp,definition:Cp,emphasis:Qi,hardBreak:Qr,heading:Dp,html:eo,image:to,imageReference:no,inlineCode:ro,link:oo,linkReference:lo,list:Rp,listItem:Bp,paragraph:Hp,root:Up,strong:so,text:Wp,thematicBreak:Gp};function Yp(){return{enter:{table:Kp,tableData:Jr,tableHeader:Jr,tableRow:Xp},exit:{codeText:Jp,table:Qp,tableData:kn,tableHeader:kn,tableRow:kn}}}function Kp(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Qp(e){this.exit(e),this.data.inTable=void 0}function Xp(e){this.enter({type:"tableRow",children:[]},e)}function kn(e){this.exit(e)}function Jr(e){this.enter({type:"tableCell",children:[]},e)}function Jp(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,eh));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function eh(e,n){return n==="|"?n:e}function th(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,o=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:l,tableCell:s,tableRow:a}};function l(p,m,x,k){return u(f(p,x,k),p.align)}function a(p,m,x,k){const v=c(p,x,k),S=u([v]);return S.slice(0,S.indexOf(` `))}function s(p,m,x,k){const v=x.enter("tableCell"),S=x.enter("phrasing"),P=x.containerPhrasing(p,{...k,before:i,after:i});return S(),v(),P}function u(p,m){return hp(p,{align:m,alignDelimiters:r,padding:t,stringLength:o})}function f(p,m,x){const k=p.children;let v=-1;const S=[],P=m.enter("table");for(;++v<k.length;)S[v]=c(k[v],m,x);return P(),S}function c(p,m,x){const k=p.children;let v=-1;const S=[],P=m.enter("tableRow");for(;++v<k.length;)S[v]=s(k[v],p,m,x);return P(),S}function h(p,m,x){let k=uo.inlineCode(p,m,x);return x.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function nh(){return{exit:{taskListCheckValueChecked:ei,taskListCheckValueUnchecked:ei,paragraph:ih}}}function rh(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:oh}}}function ei(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function ih(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const o=n.children;let i=-1,l;for(;++i<o.length;){const a=o[i];if(a.type==="paragraph"){l=a;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function oh(e,n,t,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);i&&a.move(l);let s=uo.listItem(e,n,t,{...r,...a.current()});return i&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function lh(){return[Ff(),rp(),ap(),Yp(),nh()]}function ah(e){return{extensions:[Nf(),ip(e),sp(),th(e),rh()]}}function Vt(e,n,t,r){const o=e.length;let i=0,l;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);i<r.length;)l=r.slice(i,i+1e4),l.unshift(n,0),e.splice(...l),i+=1e4,n+=1e4}const ti={}.hasOwnProperty;function sh(e){const n={};let t=-1;for(;++t<e.length;)uh(n,e[t]);return n}function uh(e,n){let t;for(t in n){const r=(ti.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let i;if(o)for(i in o){ti.call(r,i)||(r[i]=[]);const l=o[i];ch(r[i],Array.isArray(l)?l:l?[l]:[])}}}function ch(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);Vt(e,0,0,r)}const fh={tokenize:vh,partial:!0},co={tokenize:yh,partial:!0},fo={tokenize:xh,partial:!0},po={tokenize:kh,partial:!0},ph={tokenize:bh,partial:!0},ni={name:"wwwAutolink",tokenize:gh,previous:ho},ri={name:"protocolAutolink",tokenize:mh,previous:go},Le={name:"emailAutolink",tokenize:dh,previous:mo},Pe={};function hh(){return{text:Pe}}let Ke=48;for(;Ke<123;)Pe[Ke]=Le,Ke++,Ke===58?Ke=65:Ke===91&&(Ke=97);Pe[43]=Le,Pe[45]=Le,Pe[46]=Le,Pe[95]=Le,Pe[72]=[Le,ri],Pe[104]=[Le,ri],Pe[87]=[Le,ni],Pe[119]=[Le,ni];function dh(e,n,t){const r=this;let o,i;return l;function l(c){return!Ln(c)||!mo.call(r,r.previous)||ir(r.events)?t(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return Ln(c)?(e.consume(c),a):c===64?(e.consume(c),s):t(c)}function s(c){return c===46?e.check(ph,f,u)(c):c===45||c===95||tr(c)?(i=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),o=!0,s}function f(c){return i&&o&&Dt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(c)):t(c)}}function gh(e,n,t){const r=this;return o;function o(l){return l!==87&&l!==119||!ho.call(r,r.previous)||ir(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(fh,e.attempt(co,e.attempt(fo,i),t),t)(l))}function i(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function mh(e,n,t){const r=this;let o="",i=!1;return l;function l(c){return(c===72||c===104)&&go.call(r,r.previous)&&!ir(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(c),e.consume(c),a):t(c)}function a(c){if(Dt(c)&&o.length<5)return o+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const h=o.toLowerCase();if(h==="http"||h==="https")return e.consume(c),s}return t(c)}function s(c){return c===47?(e.consume(c),i?u:(i=!0,s)):t(c)}function u(c){return c===null||bf(c)||de(c)||Je(c)||Xt(c)?t(c):e.attempt(co,e.attempt(fo,f),t)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(c)}}function vh(e,n,t){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),i):t(l)}function i(l){return l===null?t(l):n(l)}}function yh(e,n,t){let r,o,i;return l;function l(u){return u===46||u===95?e.check(po,s,a)(u):u===null||de(u)||Je(u)||u!==45&&Xt(u)?s(u):(i=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(o=r,r=void 0),e.consume(u),l}function s(u){return o||r||!i?t(u):n(u)}}function xh(e,n){let t=0,r=0;return o;function o(l){return l===40?(t++,e.consume(l),o):l===41&&r<t?i(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(po,n,i)(l):l===null||de(l)||Je(l)?n(l):(e.consume(l),o)}function i(l){return l===41&&r++,e.consume(l),o}}function kh(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),i):a===93?(e.consume(a),o):a===60||a===null||de(a)||Je(a)?n(a):t(a)}function o(a){return a===null||a===40||a===91||de(a)||Je(a)?n(a):r(a)}function i(a){return Dt(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):Dt(a)?(e.consume(a),l):t(a)}}function bh(e,n,t){return r;function r(i){return e.consume(i),o}function o(i){return tr(i)?t(i):n(i)}}function ho(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||de(e)}function go(e){return!Dt(e)}function mo(e){return!(e===47||Ln(e))}function Ln(e){return e===43||e===45||e===46||e===95||tr(e)}function ir(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}function wh(e,n,t){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(n=i(n,t),r.push(i))}return n}function Fe(e,n,t,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return l;function l(s){return Oe(s)?(e.enter(t),a(s)):n(s)}function a(s){return Oe(s)&&i++<o?(e.consume(s),a):(e.exit(t),n(s))}}const Ch={partial:!0,tokenize:Sh};function Sh(e,n,t){return r;function r(i){return Oe(i)?Fe(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||lt(i)?n(i):t(i)}}const Eh={tokenize:Mh,partial:!0};function zh(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:_h,continuation:{tokenize:Ah},exit:Th}},text:{91:{name:"gfmFootnoteCall",tokenize:Dh},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ph,resolveTo:Ih}}}}function Ph(e,n,t){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const s=r.events[o][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return t(s);const u=Tt(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?t(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),n(s))}}function Ih(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",o,n],["exit",o,n],["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function Dh(e,n,t){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?t(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(i>999||c===93&&!l||c===null||c===91||de(c))return t(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return o.includes(Tt(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(c)}return de(c)||(l=!0),i++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),i++,u):u(c)}}function _h(e,n,t){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l=0,a;return s;function s(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(m)}function f(m){if(l>999||m===93&&!a||m===null||m===91||de(m))return t(m);if(m===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return i=Tt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return de(m)||(a=!0),l++,e.consume(m),m===92?c:f}function c(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o.includes(i)||o.push(i),Fe(e,p,"gfmFootnoteDefinitionWhitespace")):t(m)}function p(m){return n(m)}}function Ah(e,n,t){return e.check(Ch,n,e.attempt(Eh,n,t))}function Th(e){e.exit("gfmFootnoteDefinition")}function Mh(e,n,t){const r=this;return Fe(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(i):t(i)}}function Lh(e){let n=(e||{}).singleTilde;const t={name:"strikethrough",tokenize:o,resolveAll:r};return n==null&&(n=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}};function r(i,l){let a=-1;for(;++a<i.length;)if(i[a][0]==="enter"&&i[a][1].type==="strikethroughSequenceTemporary"&&i[a][1]._close){let s=a;for(;s--;)if(i[s][0]==="exit"&&i[s][1].type==="strikethroughSequenceTemporary"&&i[s][1]._open&&i[a][1].end.offset-i[a][1].start.offset===i[s][1].end.offset-i[s][1].start.offset){i[a][1].type="strikethroughSequence",i[s][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},i[s][1].start),end:Object.assign({},i[a][1].end)},f={type:"strikethroughText",start:Object.assign({},i[s][1].end),end:Object.assign({},i[a][1].start)},c=[["enter",u,l],["enter",i[s][1],l],["exit",i[s][1],l],["enter",f,l]],h=l.parser.constructs.insideSpan.null;h&&Vt(c,c.length,0,wh(h,i.slice(s+1,a),l)),Vt(c,c.length,0,[["exit",f,l],["enter",i[a][1],l],["exit",i[a][1],l],["exit",u,l]]),Vt(i,s-1,a-s+3,c),a=s+c.length-2;break}}for(a=-1;++a<i.length;)i[a][1].type==="strikethroughSequenceTemporary"&&(i[a][1].type="data");return i}function o(i,l,a){const s=this.previous,u=this.events;let f=0;return c;function c(p){return s===126&&u[u.length-1][1].type!=="characterEscape"?a(p):(i.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const m=Wt(s);if(p===126)return f>1?a(p):(i.consume(p),f++,h);if(f<2&&!n)return a(p);const x=i.exit("strikethroughSequenceTemporary"),k=Wt(p);return x._open=!k||k===2&&!!m,x._close=!m||m===2&&!!k,l(p)}}}class Oh{constructor(){this.map=[]}add(n,t,r){Fh(this,n,t,r)}consume(n){if(this.map.sort(function(i,l){return i[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let o=r.pop();for(;o;){for(const i of o)n.push(i);o=r.pop()}this.map.length=0}}function Fh(e,n,t,r){let o=0;if(!(t===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=t,e.map[o][2].push(...r);return}o+=1}e.map.push([n,t,r])}}function Nh(e,n){let t=!1;const r=[];for(;n<e.length;){const o=e[n];if(t){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function Rh(){return{flow:{null:{name:"table",tokenize:jh,resolveAll:Bh}}}}function jh(e,n,t){const r=this;let o=0,i=0,l;return a;function a(y){let O=r.events.length-1;for(;O>-1;){const T=r.events[O][1].type;if(T==="lineEnding"||T==="linePrefix")O--;else break}const F=O>-1?r.events[O][1].type:null,N=F==="tableHead"||F==="tableRow"?C:s;return N===C&&r.parser.lazy[r.now().line]?t(y):N(y)}function s(y){return e.enter("tableHead"),e.enter("tableRow"),u(y)}function u(y){return y===124||(l=!0,i+=1),f(y)}function f(y){return y===null?t(y):lt(y)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):t(y):Oe(y)?Fe(e,f,"whitespace")(y):(i+=1,l&&(l=!1,o+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(y)))}function c(y){return y===null||y===124||de(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?h:c)}function h(y){return y===92||y===124?(e.consume(y),c):c(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(y):(e.enter("tableDelimiterRow"),l=!1,Oe(y)?Fe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):m(y))}function m(y){return y===45||y===58?k(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),x):U(y)}function x(y){return Oe(y)?Fe(e,k,"whitespace")(y):k(y)}function k(y){return y===58?(i+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),v):y===45?(i+=1,v(y)):y===null||lt(y)?M(y):U(y)}function v(y){return y===45?(e.enter("tableDelimiterFiller"),S(y)):U(y)}function S(y){return y===45?(e.consume(y),S):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),P):(e.exit("tableDelimiterFiller"),P(y))}function P(y){return Oe(y)?Fe(e,M,"whitespace")(y):M(y)}function M(y){return y===124?m(y):y===null||lt(y)?!l||o!==i?U(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(y)):U(y)}function U(y){return t(y)}function C(y){return e.enter("tableRow"),V(y)}function V(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),V):y===null||lt(y)?(e.exit("tableRow"),n(y)):Oe(y)?Fe(e,V,"whitespace")(y):(e.enter("data"),L(y))}function L(y){return y===null||y===124||de(y)?(e.exit("data"),V(y)):(e.consume(y),y===92?$:L)}function $(y){return y===92||y===124?(e.consume(y),L):L(y)}}function Bh(e,n){let t=-1,r=!0,o=0,i=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const h=new Oh;for(;++t<e.length;){const p=e[t],m=p[1];p[0]==="enter"?m.type==="tableHead"?(a=!1,s!==0&&(ii(h,n,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(t,0,[["enter",u,n]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,i=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(t,0,[["enter",f,n]])),o=m.type==="tableDelimiterRow"?2:f?3:1):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(i[1]!==0&&(l[0]=l[1],c=Bt(h,n,i,o,void 0,c),i=[0,0,0,0]),l[2]=t)):m.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(l[0]=l[1],c=Bt(h,n,i,o,void 0,c)),i=l,l=[i[1],t,0,0])):m.type==="tableHead"?(a=!0,s=t):m.type==="tableRow"||m.type==="tableDelimiterRow"?(s=t,i[1]!==0?(l[0]=l[1],c=Bt(h,n,i,o,t,c)):l[1]!==0&&(c=Bt(h,n,l,o,t,c)),o=0):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=t)}for(s!==0&&ii(h,n,s,u,f),h.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Nh(n.events,t))}return e}function Bt(e,n,t,r,o,i){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(i.end=Object.assign({},ot(n.events,t[0])),e.add(t[0],0,[["exit",i,n]]));const s=ot(n.events,t[1]);if(i={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(t[1],0,[["enter",i,n]]),t[2]!==0){const u=ot(n.events,t[2]),f=ot(n.events,t[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",c,n]]),r!==2){const h=n.events[t[2]],p=n.events[t[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){const m=t[2]+1,x=t[3]-t[2]-1;e.add(m,x,[])}}e.add(t[3]+1,0,[["exit",c,n]])}return o!==void 0&&(i.end=Object.assign({},ot(n.events,o)),e.add(o,0,[["exit",i,n]]),i=void 0),i}function ii(e,n,t,r,o){const i=[],l=ot(n.events,t);o&&(o.end=Object.assign({},l),i.push(["exit",o,n])),r.end=Object.assign({},l),i.push(["exit",r,n]),e.add(t+1,0,i)}function ot(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Hh={name:"tasklistCheck",tokenize:Uh};function Vh(){return{text:{91:Hh}}}function Uh(e,n,t){const r=this;return o;function o(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),i)}function i(s){return de(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):t(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(s)}function a(s){return lt(s)?n(s):Oe(s)?e.check({tokenize:qh},n,t)(s):t(s)}}function qh(e,n,t){return Fe(e,r,"whitespace");function r(o){return o===null?t(o):n(o)}}function $h(e){return sh([hh(),zh(),Lh(e),Rh(),Vh()])}const Wh={};function Zh(e){const n=this,t=e||Wh,r=n.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push($h(t)),i.push(lh()),l.push(ah(t))}const Gh=Yt({__name:"NcRichTextCopyButton",props:{contentId:{}},setup(e){const{copy:n,icon:t,altText:r}=_l(()=>document.getElementById(e.contentId).textContent);return(o,i)=>(ne(),Ze(Pt,{variant:"tertiary",size:"small","aria-label":se(r),title:se(r),onClick:se(n)},{icon:Ne(()=>[We(jn,{path:se(t),inline:""},null,8,["path"])]),_:1},8,["aria-label","title","onClick"]))}});function Yh(e){return e.type==="text"}const Kh=function(e){Ge(e,Yh,n);function n(t,r,o){const i=t.value.split(/(\{[a-z\-_.0-9]+\})/ig).map(l=>{const a=l.match(/^\{([a-z\-_.0-9]+)\}$/i);if(!a)return ur("text",l);const[,s]=a;return ur("element",{tagName:`#${s}`,children:[]})});o.children.splice(r,1,...i)}},Qh=()=>Kh;function Xh(e){return["text","code","inlineCode"].includes(e.type)}const Jh=function(){return function(e){Ge(e,Xh,(n,t,r)=>(r.children.splice(t,1,{...n,value:n.value.replace(/</gmi,"<").replace(/>/gmi,">")}),[al,t+1]))}},ed=["http","https","mailto","tel"],On=xe(null);async function td(){const e=await Po(()=>import("./index-9Li44d4f.chunk.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]),import.meta.url);On.value=e.default}const nd={name:"NcRichText",components:{NcReferenceList:mn},props:{text:{type:String,default:""},arguments:{type:Object,default:()=>({})},referenceLimit:{type:Number,default:0},referenceInteractive:{type:Boolean,default:!0},referenceInteractiveOptIn:{type:Boolean,default:!1},references:{type:Array,default:null},useMarkdown:{type:Boolean,default:!1},useExtendedMarkdown:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1},autolink:{type:Boolean,default:!0}},emits:["interactTodo"],data(){return{parentId:nn()}},methods:{renderPlaintext(){const e=this.text.split(/(\{[a-z\-_.0-9]+\})/ig).map(n=>{const t=n.match(/^\{([a-z\-_.0-9]+)\}$/i);if(!t)return this.prepareTextNode(n);const r=t[1],o=this.arguments[r];if(typeof o=="object"){const{component:i,props:l}=o;return ee(typeof i=="string"?ut(i):i,{...l,class:"rich-text--component"})}return o?ee("span",{class:"rich-text--fallback"},o):n});return ee("div",{class:"rich-text--wrapper"},[ee("div",{},e.flat()),this.referenceLimit>0?ee("div",{class:"rich-text--reference-widget"},[ee(mn,{text:this.text,referenceData:this.references,interactive:this.referenceInteractive,interactiveOptIn:this.referenceInteractiveOptIn})]):null])},renderMarkdown(){const e=gf().use(fc).use(ol,{autolink:this.autolink,useMarkdown:this.useMarkdown,useExtendedMarkdown:this.useExtendedMarkdown}).use(Jh).use(this.useExtendedMarkdown?Zh:void 0).use(os).use(Yc,{except:ed}).use(Zc,{handlers:{component(n,t){return n(t,t.component,{value:t.value})}}}).use(this.useExtendedMarkdown?On.value:void 0).use(Qh).use(aa,{target:"_blank",rel:["noopener noreferrer"]}).use(Qa,{Fragment:Rn,jsx:this.createElement,jsxs:this.createElement,elementAttributeNameCase:"html",prefix:!1}).processSync(this.text.replace(/<[^>]+>/g,n=>n.replace(/</g,"<")).replace(/>/gmi,">")).result;return ee("div",{class:"rich-text--wrapper rich-text--wrapper-markdown"},[e,this.referenceLimit>0?ee("div",{class:"rich-text--reference-widget"},[ee(mn,{text:this.text,referenceData:this.references,interactive:this.referenceInteractive,interactiveOptIn:this.referenceInteractiveOptIn})]):null])},prepareTextNode(e){return this.autolink&&(e=il(e)),Array.isArray(e)?e.map(n=>{if(typeof n=="string")return n;const{component:t,props:r}=n,o=t.name==="NcLink"?void 0:"rich-text--component";return ee(t,{...r,class:o})}):e},createElement(e,n,t){t&&(n.key=t);const r=n.children??[];if(delete n.children,!String(e).startsWith("#")){["h1","h2","h3","h4","h5","h6"].includes(String(e))&&(e=`h${Math.min(+String(e)[1]+3,6)}`);let i=null;if(this.useExtendedMarkdown){if(String(e)==="code"&&!On.value&&n?.class?.includes("language")&&td(),String(e)==="pre"&&r&&String(r.type)==="code"){const l=this.parentId+"-code-block-"+nn();return ee("p",{class:"rich-text__code-block"},[ee(e,{...n,id:l},r),ee(Gh,{class:"rich-text__code-block-button",contentId:l})])}if(String(e)==="li"&&Array.isArray(r)&&r.length!==0&&r[0].type==="input"&&r[0].props.type==="checkbox"){const[l,,...a]=r,s=a.findIndex(h=>["ul","ol","li","blockquote","pre"].includes(h.type));s!==-1&&(i=a[s],a.splice(s));const u=this.parentId+"-markdown-input-"+nn(),f={...l.props};delete f.checked;const c=ee(tl,{...f,modelValue:l.props.checked,id:u,disabled:!this.interactive,"onUpdate:modelValue":()=>{this.$emit("interactTodo",u)}},{default:()=>a});return ee(e,n,[c,i])}}if(String(e)==="a"){const l=fi(this.$router,n.href);if(l)return delete n.href,delete n.target,ee(ci,{...n,to:l},{default:()=>r})}return ee(e,n,r)}const o=this.arguments[e.slice(1)];return o?o.component?ee(typeof o.component=="string"?ut(o.component):o.component,{...n,...o.props,class:"rich-text--component"},{default:()=>r}):ee("span",{...n},[o]):ee("span",{...n,class:"rich-text--fallback"},[`{${e.slice(1)}}`])}},render(){return this.useMarkdown||this.useExtendedMarkdown?this.renderMarkdown():this.renderPlaintext()}},xd=pt(nd,[["__scopeId","data-v-a47e4ba7"]]);export{vd as N,xd as a,yd as b,vi as c}; //# sourceMappingURL=NcRichText-DJlaHs_Q-tqMkpCtc.chunk.mjs.map
Save File
Cancel