@nextclaw/ui 0.5.48 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/assets/ChannelsList-CkCpHSto.js +1 -0
  3. package/dist/assets/ChatPage-DM4XNsrW.js +32 -0
  4. package/dist/assets/DocBrowser-B5Aqiz6W.js +1 -0
  5. package/dist/assets/MarketplacePage-BIi0bBdW.js +49 -0
  6. package/dist/assets/ModelConfig-BTFiEAxQ.js +1 -0
  7. package/dist/assets/{ProvidersList-BXHpjVtO.js → ProvidersList-cdk1d-G_.js} +1 -1
  8. package/dist/assets/RuntimeConfig-CFqFsXmR.js +1 -0
  9. package/dist/assets/{SecretsConfig-KkgMzdt1.js → SecretsConfig-CIKasCek.js} +2 -2
  10. package/dist/assets/SessionsConfig-mnCLFtbo.js +2 -0
  11. package/dist/assets/{card-D7NY0Szf.js → card-C1BUfR85.js} +1 -1
  12. package/dist/assets/index-Dxas8MJ9.js +2 -0
  13. package/dist/assets/index-P4YzN9iS.css +1 -0
  14. package/dist/assets/{label-Ojs7Al6B.js → label-CwWfYbuj.js} +1 -1
  15. package/dist/assets/{logos-B1qBsCSi.js → logos-DDyjHSEU.js} +1 -1
  16. package/dist/assets/{page-layout-CUMMO0nN.js → page-layout-DKTRKcHL.js} +1 -1
  17. package/dist/assets/provider-models-y4mUDcGF.js +1 -0
  18. package/dist/assets/{switch-BdhS_16-.js → switch-Bi3yeYiC.js} +1 -1
  19. package/dist/assets/{tabs-custom-D261E5EA.js → tabs-custom-HZFNZrc0.js} +1 -1
  20. package/dist/assets/useConfig-CgzVQTZl.js +6 -0
  21. package/dist/assets/{useConfirmDialog-BUKGHDL6.js → useConfirmDialog-DwD21HlD.js} +2 -2
  22. package/dist/assets/{vendor-Dh04PGww.js → vendor-Ylg6Wdt_.js} +84 -69
  23. package/dist/index.html +3 -3
  24. package/package.json +2 -1
  25. package/src/App.tsx +10 -6
  26. package/src/api/config.ts +42 -1
  27. package/src/api/types.ts +29 -0
  28. package/src/components/chat/ChatConversationPanel.tsx +109 -85
  29. package/src/components/chat/ChatInputBar.tsx +245 -0
  30. package/src/components/chat/ChatPage.tsx +365 -187
  31. package/src/components/chat/ChatSidebar.tsx +242 -0
  32. package/src/components/chat/ChatThread.tsx +92 -25
  33. package/src/components/chat/ChatWelcome.tsx +61 -0
  34. package/src/components/chat/SkillsPicker.tsx +137 -0
  35. package/src/components/chat/useChatStreamController.ts +287 -56
  36. package/src/components/config/ChannelForm.tsx +1 -1
  37. package/src/components/config/ChannelsList.tsx +3 -3
  38. package/src/components/config/ModelConfig.tsx +11 -89
  39. package/src/components/config/RuntimeConfig.tsx +29 -1
  40. package/src/components/layout/AppLayout.tsx +42 -6
  41. package/src/components/layout/Sidebar.tsx +68 -62
  42. package/src/components/marketplace/MarketplacePage.tsx +13 -3
  43. package/src/components/ui/popover.tsx +31 -0
  44. package/src/hooks/useConfig.ts +18 -0
  45. package/src/lib/i18n.ts +53 -0
  46. package/src/lib/provider-models.ts +129 -0
  47. package/dist/assets/ChannelsList-C8cguFLc.js +0 -1
  48. package/dist/assets/ChatPage-BkHWNUNR.js +0 -32
  49. package/dist/assets/CronConfig-D-ESQlvk.js +0 -1
  50. package/dist/assets/DocBrowser-B9ZD6pAk.js +0 -1
  51. package/dist/assets/MarketplacePage-Ds_l9KTF.js +0 -49
  52. package/dist/assets/ModelConfig-N1tbLv9b.js +0 -1
  53. package/dist/assets/RuntimeConfig-KsKfkjgv.js +0 -1
  54. package/dist/assets/SessionsConfig-CWBp8IPf.js +0 -2
  55. package/dist/assets/index-BRBYYgR_.js +0 -2
  56. package/dist/assets/index-C5cdRzpO.css +0 -1
  57. package/dist/assets/useConfig-txxbxXnT.js +0 -6
@@ -1,32 +0,0 @@
1
- import{j as w,U as kr,W as br,X as wr,Y as Sr,Z as Cr,r as M,_ as Yi,a0 as Xi,a1 as Er,a2 as Gi,a3 as Ji,a4 as Zi,a5 as el,a6 as tl,a7 as nl,a8 as rl}from"./vendor-Dh04PGww.js";import{I as il,s as ll,u as ol,d as al,e as sl,f as ul}from"./useConfig-txxbxXnT.js";import{u as cl}from"./useConfirmDialog-BUKGHDL6.js";import{B as He,P as fl,a as hl}from"./page-layout-CUMMO0nN.js";import{t as B,S as Ir,a as Ar,b as vr,d as Tr,e as Bt,c as ge,f as Pr}from"./index-BRBYYgR_.js";import{b as pl,n as ml,e as dl,a as gl,c as xl}from"./chat-message-pw9oafI4.js";function yl(e){return w.jsxs("aside",{className:"w-[320px] max-lg:w-full shrink-0 rounded-2xl border border-gray-200 bg-white shadow-card flex flex-col min-h-0",children:[w.jsxs("div",{className:"p-4 border-b border-gray-100 space-y-3",children:[w.jsxs("div",{className:"relative",children:[w.jsx(kr,{className:"h-3.5 w-3.5 absolute left-3 top-2.5 text-gray-400"}),w.jsx(il,{value:e.query,onChange:t=>e.onQueryChange(t.target.value),placeholder:B("chatSearchSessionPlaceholder"),className:"pl-8 h-9 rounded-lg text-xs"})]}),w.jsxs(Ir,{value:e.selectedChannel,onValueChange:e.onSelectedChannelChange,children:[w.jsx(Ar,{className:"h-9 rounded-lg text-xs",children:w.jsx(vr,{placeholder:B("sessionsAllChannels")})}),w.jsxs(Tr,{children:[w.jsx(Bt,{value:"all",children:B("sessionsAllChannels")}),e.channelOptions.map(t=>w.jsx(Bt,{value:t,children:e.channelLabel(t)},t))]})]}),w.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[w.jsxs(He,{variant:"outline",size:"sm",className:"rounded-lg",onClick:e.onRefresh,children:[w.jsx(br,{className:ge("h-3.5 w-3.5 mr-1.5",e.isRefreshing&&"animate-spin")}),B("chatRefresh")]}),w.jsxs(He,{variant:"subtle",size:"sm",className:"rounded-lg",onClick:e.onCreateSession,children:[w.jsx(wr,{className:"h-3.5 w-3.5 mr-1.5"}),B("chatNewSession")]})]})]}),w.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto custom-scrollbar p-2",children:e.isLoading?w.jsx("div",{className:"text-sm text-gray-500 p-4",children:B("sessionsLoading")}):e.sessions.length===0?w.jsxs("div",{className:"p-5 m-2 rounded-xl border border-dashed border-gray-200 text-center text-sm text-gray-500",children:[w.jsx(Sr,{className:"h-7 w-7 mx-auto mb-2 text-gray-300"}),B("sessionsEmpty")]}):w.jsx("div",{className:"space-y-1",children:e.sessions.map(t=>{const n=e.selectedSessionKey===t.key;return w.jsxs("button",{onClick:()=>e.onSelectSession(t.key),className:ge("w-full rounded-xl border px-3 py-2.5 text-left transition-all",n?"border-primary/30 bg-primary/5":"border-transparent hover:border-gray-200 hover:bg-gray-50"),children:[w.jsx("div",{className:"text-sm font-semibold text-gray-900 truncate",children:e.sessionTitle(t)}),w.jsx("div",{className:"mt-1 text-[11px] text-gray-500 truncate",children:t.key}),w.jsxs("div",{className:"mt-1 text-[11px] text-gray-400",children:[t.messageCount," · ",Pr(t.updatedAt)]})]},t.key)})})})]})}function kl(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const bl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sl={};function Cn(e,t){return(Sl.jsx?wl:bl).test(e)}const Cl=/[ \t\n\f\r]/g;function El(e){return typeof e=="object"?e.type==="text"?En(e.value):!1:En(e)}function En(e){return e.replace(Cl,"")===""}class it{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}it.prototype.normal={};it.prototype.property={};it.prototype.space=void 0;function Dr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new it(n,r,t)}function Ht(e){return e.toLowerCase()}class ae{constructor(t,n){this.attribute=n,this.property=t}}ae.prototype.attribute="";ae.prototype.booleanish=!1;ae.prototype.boolean=!1;ae.prototype.commaOrSpaceSeparated=!1;ae.prototype.commaSeparated=!1;ae.prototype.defined=!1;ae.prototype.mustUseProperty=!1;ae.prototype.number=!1;ae.prototype.overloadedBoolean=!1;ae.prototype.property="";ae.prototype.spaceSeparated=!1;ae.prototype.space=void 0;let Il=0;const j=Fe(),Z=Fe(),qt=Fe(),A=Fe(),X=Fe(),Be=Fe(),fe=Fe();function Fe(){return 2**++Il}const Ut=Object.freeze(Object.defineProperty({__proto__:null,boolean:j,booleanish:Z,commaOrSpaceSeparated:fe,commaSeparated:Be,number:A,overloadedBoolean:qt,spaceSeparated:X},Symbol.toStringTag,{value:"Module"})),St=Object.keys(Ut);class Zt extends ae{constructor(t,n,r,i){let o=-1;if(super(t,n),In(this,"space",i),typeof r=="number")for(;++o<St.length;){const l=St[o];In(this,St[o],(r&Ut[l])===Ut[l])}}}Zt.prototype.defined=!0;function In(e,t,n){n&&(e[t]=n)}function Ue(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Zt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Ht(r)]=r,n[Ht(o.attribute)]=r}return new it(t,n,e.space)}const Lr=Ue({properties:{ariaActiveDescendant:null,ariaAtomic:Z,ariaAutoComplete:null,ariaBusy:Z,ariaChecked:Z,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:X,ariaCurrent:null,ariaDescribedBy:X,ariaDetails:null,ariaDisabled:Z,ariaDropEffect:X,ariaErrorMessage:null,ariaExpanded:Z,ariaFlowTo:X,ariaGrabbed:Z,ariaHasPopup:null,ariaHidden:Z,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:X,ariaLevel:A,ariaLive:null,ariaModal:Z,ariaMultiLine:Z,ariaMultiSelectable:Z,ariaOrientation:null,ariaOwns:X,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:Z,ariaReadOnly:Z,ariaRelevant:null,ariaRequired:Z,ariaRoleDescription:X,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:Z,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Nr(e,t){return t in e?e[t]:t}function zr(e,t){return Nr(e,t.toLowerCase())}const Al=Ue({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Be,acceptCharset:X,accessKey:X,action:null,allow:null,allowFullScreen:j,allowPaymentRequest:j,allowUserMedia:j,alt:null,as:null,async:j,autoCapitalize:null,autoComplete:X,autoFocus:j,autoPlay:j,blocking:X,capture:null,charSet:null,checked:j,cite:null,className:X,cols:A,colSpan:null,content:null,contentEditable:Z,controls:j,controlsList:X,coords:A|Be,crossOrigin:null,data:null,dateTime:null,decoding:null,default:j,defer:j,dir:null,dirName:null,disabled:j,download:qt,draggable:Z,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:j,formTarget:null,headers:X,height:A,hidden:qt,high:A,href:null,hrefLang:null,htmlFor:X,httpEquiv:X,id:null,imageSizes:null,imageSrcSet:null,inert:j,inputMode:null,integrity:null,is:null,isMap:j,itemId:null,itemProp:X,itemRef:X,itemScope:j,itemType:X,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:j,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:j,muted:j,name:null,nonce:null,noModule:j,noValidate:j,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:j,optimum:A,pattern:null,ping:X,placeholder:null,playsInline:j,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:j,referrerPolicy:null,rel:X,required:j,reversed:j,rows:A,rowSpan:A,sandbox:X,scope:null,scoped:j,seamless:j,selected:j,shadowRootClonable:j,shadowRootDelegatesFocus:j,shadowRootMode:null,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:Z,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:j,useMap:null,value:Z,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:X,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:j,declare:j,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:j,noHref:j,noShade:j,noWrap:j,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:Z,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:j,disableRemotePlayback:j,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:zr}),vl=Ue({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:fe,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:X,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:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:j,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,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:Be,g2:Be,glyphName:Be,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:fe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,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:A,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:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:X,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fe,rev:fe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fe,requiredFeatures:fe,requiredFonts:fe,requiredFormats:fe,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:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:fe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fe,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Nr}),Rr=Ue({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Fr=Ue({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:zr}),Or=Ue({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Tl={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"},Pl=/[A-Z]/g,An=/-[a-z]/g,Dl=/^data[-\w.:]+$/i;function Ll(e,t){const n=Ht(t);let r=t,i=ae;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Dl.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(An,zl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!An.test(o)){let l=o.replace(Pl,Nl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Zt}return new i(r,t)}function Nl(e){return"-"+e.toLowerCase()}function zl(e){return e.charAt(1).toUpperCase()}const Rl=Dr([Lr,Al,Rr,Fr,Or],"html"),en=Dr([Lr,vl,Rr,Fr,Or],"svg");function Fl(e){return e.join(" ").trim()}var je={},Ct,vn;function Ol(){if(vn)return Ct;vn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
2
- `,u="/",f="*",c="",p="comment",h="declaration";function g(k,x){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];x=x||{};var I=1,E=1;function P(N){var T=N.match(t);T&&(I+=T.length);var W=N.lastIndexOf(s);E=~W?N.length-W:E+N.length}function z(){var N={line:I,column:E};return function(T){return T.position=new b(N),$(),T}}function b(N){this.start=N,this.end={line:I,column:E},this.source=x.source}b.prototype.content=k;function H(N){var T=new Error(x.source+":"+I+":"+E+": "+N);if(T.reason=N,T.filename=x.source,T.line=I,T.column=E,T.source=k,!x.silent)throw T}function _(N){var T=N.exec(k);if(T){var W=T[0];return P(W),k=k.slice(W.length),T}}function $(){_(n)}function y(N){var T;for(N=N||[];T=D();)T!==!1&&N.push(T);return N}function D(){var N=z();if(!(u!=k.charAt(0)||f!=k.charAt(1))){for(var T=2;c!=k.charAt(T)&&(f!=k.charAt(T)||u!=k.charAt(T+1));)++T;if(T+=2,c===k.charAt(T-1))return H("End of comment missing");var W=k.slice(2,T-2);return E+=2,P(W),k=k.slice(T),E+=2,N({type:p,comment:W})}}function L(){var N=z(),T=_(r);if(T){if(D(),!_(i))return H("property missing ':'");var W=_(o),J=N({type:h,property:S(T[0].replace(e,c)),value:W?S(W[0].replace(e,c)):c});return _(l),J}}function K(){var N=[];y(N);for(var T;T=L();)T!==!1&&(N.push(T),y(N));return N}return $(),K()}function S(k){return k?k.replace(a,c):c}return Ct=g,Ct}var Tn;function jl(){if(Tn)return je;Tn=1;var e=je&&je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(je,"__esModule",{value:!0}),je.default=n;const t=e(Ol());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return je}var We={},Pn;function _l(){if(Pn)return We;Pn=1,Object.defineProperty(We,"__esModule",{value:!0}),We.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.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={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return We.camelCase=s,We}var Qe,Dn;function Ml(){if(Dn)return Qe;Dn=1;var e=Qe&&Qe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(jl()),n=_l();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,s){a&&s&&(l[(0,n.camelCase)(a,o)]=s)}),l}return r.default=r,Qe=r,Qe}var Bl=Ml();const Hl=Cr(Bl),jr=_r("end"),tn=_r("start");function _r(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Mr(e){const t=tn(e),n=jr(e);if(t&&n)return{start:t,end:n}}function Ge(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ln(e.position):"start"in e||"end"in e?Ln(e):"line"in e||"column"in e?$t(e):""}function $t(e){return Nn(e&&e.line)+":"+Nn(e&&e.column)}function Ln(e){return $t(e&&e.start)+"-"+$t(e&&e.end)}function Nn(e){return e&&typeof e=="number"?e:1}class ne extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Ge(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ne.prototype.file="";ne.prototype.name="";ne.prototype.reason="";ne.prototype.message="";ne.prototype.stack="";ne.prototype.column=void 0;ne.prototype.line=void 0;ne.prototype.ancestors=void 0;ne.prototype.cause=void 0;ne.prototype.fatal=void 0;ne.prototype.place=void 0;ne.prototype.ruleId=void 0;ne.prototype.source=void 0;const nn={}.hasOwnProperty,ql=new Map,Ul=/[A-Z]/g,$l=new Set(["table","tbody","thead","tfoot","tr"]),Vl=new Set(["td","th"]),Br="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Kl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=eo(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Zl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?en:Rl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Hr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Hr(e,t,n){if(t.type==="element")return Wl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ql(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Xl(e,t,n);if(t.type==="mdxjsEsm")return Yl(e,t);if(t.type==="root")return Gl(e,t,n);if(t.type==="text")return Jl(e,t)}function Wl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=en,e.schema=i),e.ancestors.push(t);const o=Ur(e,t.tagName,!1),l=to(e,t);let a=ln(e,t);return $l.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!El(s):!0})),qr(e,l,o,t),rn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Ql(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}et(e,t.position)}function Yl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);et(e,t.position)}function Xl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=en,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Ur(e,t.name,!0),l=no(e,t),a=ln(e,t);return qr(e,l,o,t),rn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Gl(e,t,n){const r={};return rn(r,ln(e,t)),e.create(t,e.Fragment,r,n)}function Jl(e,t){return t.value}function qr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function rn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Zl(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function eo(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),s=tn(r);return t(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function to(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&nn.call(t.properties,i)){const o=ro(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Vl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function no(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else et(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else et(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function ln(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ql;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=Hr(e,o,l);a!==void 0&&n.push(a)}return n}function ro(e,t,n){const r=Ll(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?kl(n):Fl(n)),r.property==="style"){let i=typeof n=="object"?n:io(e,String(n));return e.stylePropertyNameCase==="css"&&(i=lo(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Tl[r.property]||r.property:r.attribute,n]}}function io(e,t){try{return Hl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ne("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Br+"#cannot-parse-style-attribute",i}}function Ur(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=Cn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=Cn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return nn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);et(e)}function et(e,t){const n=new ne("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Br+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lo(e){const t={};let n;for(n in e)nn.call(e,n)&&(t[oo(n)]=e[n]);return t}function oo(e){let t=e.replace(Ul,ao);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ao(e){return"-"+e.toLowerCase()}const Et={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},so={};function on(e,t){const n=so,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return $r(e,r,i)}function $r(e,t,n){if(uo(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return zn(e.children,t,n)}return Array.isArray(e)?zn(e,t,n):""}function zn(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=$r(e[i],t,n);return r.join("")}function uo(e){return!!(e&&typeof e=="object")}const Rn=document.createElement("i");function an(e){const t="&"+e+";";Rn.innerHTML=t;const n=Rn.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function he(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function de(e,t){return e.length>0?(he(e,e.length,0,t),e):t}const Fn={}.hasOwnProperty;function Vr(e){const t={};let n=-1;for(;++n<e.length;)co(t,e[n]);return t}function co(e,t){let n;for(n in t){const i=(Fn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Fn.call(i,l)||(i[l]=[]);const a=o[l];fo(i[l],Array.isArray(a)?a:a?[a]:[])}}}function fo(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);he(e,0,0,r)}function Kr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ke(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const re=De(/[A-Za-z]/),te=De(/[\dA-Za-z]/),ho=De(/[#-'*+\--9=?A-Z^-~]/);function mt(e){return e!==null&&(e<32||e===127)}const Vt=De(/\d/),po=De(/[\dA-Fa-f]/),mo=De(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function Y(e){return e!==null&&(e<0||e===32)}function q(e){return e===-2||e===-1||e===32}const xt=De(new RegExp("\\p{P}|\\p{S}","u")),Re=De(/\s/);function De(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $e(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&te(e.charCodeAt(n+1))&&te(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function V(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return q(s)?(e.enter(n),a(s)):t(s)}function a(s){return q(s)&&o++<i?(e.consume(s),a):(e.exit(n),t(s))}}const go={tokenize:xo};function xo(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),V(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return R(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const yo={tokenize:ko},On={tokenize:bo};function ko(e){const t=this,n=[];let r=0,i,o,l;return a;function a(E){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,s,u)(E)}return u(E)}function s(E){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();const P=t.events.length;let z=P,b;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){b=t.events[z][1].end;break}x(r);let H=P;for(;H<t.events.length;)t.events[H][1].end={...b},H++;return he(t.events,z+1,0,t.events.slice(P)),t.events.length=H,u(E)}return a(E)}function u(E){if(r===n.length){if(!i)return p(E);if(i.currentConstruct&&i.currentConstruct.concrete)return g(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(On,f,c)(E)}function f(E){return i&&I(),x(r),p(E)}function c(E){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,g(E)}function p(E){return t.containerState={},e.attempt(On,h,g)(E)}function h(E){return r++,n.push([t.currentConstruct,t.containerState]),p(E)}function g(E){if(E===null){i&&I(),x(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),S(E)}function S(E){if(E===null){k(e.exit("chunkFlow"),!0),x(0),e.consume(E);return}return R(E)?(e.consume(E),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(E),S)}function k(E,P){const z=t.sliceStream(E);if(P&&z.push(null),E.previous=o,o&&(o.next=E),o=E,i.defineSkip(E.start),i.write(z),t.parser.lazy[E.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const H=t.events.length;let _=H,$,y;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if($){y=t.events[_][1].end;break}$=!0}for(x(r),b=H;b<t.events.length;)t.events[b][1].end={...y},b++;he(t.events,_+1,0,t.events.slice(H)),t.events.length=b}}function x(E){let P=n.length;for(;P-- >E;){const z=n[P];t.containerState=z[1],z[0].exit.call(t,e)}n.length=E}function I(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function bo(e,t,n){return V(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qe(e){if(e===null||Y(e)||Re(e))return 1;if(xt(e))return 2}function yt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Kt={name:"attention",resolveAll:wo,tokenize:So};function wo(e,t){let n=-1,r,i,o,l,a,s,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};jn(c,-s),jn(p,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=de(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=de(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=de(u,yt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=de(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=de(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,he(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function So(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=qe(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=qe(s),c=!f||f===2&&i||n.includes(s),p=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!p)),u._close=!!(o===42?p:p&&(f||!c)),t(s)}}function jn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Co={name:"autolink",tokenize:Eo};function Eo(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return re(h)?(e.consume(h),l):h===64?n(h):u(h)}function l(h){return h===43||h===45||h===46||te(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,s):(h===43||h===45||h===46||te(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function s(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||mt(h)?n(h):(e.consume(h),s)}function u(h){return h===64?(e.consume(h),f):ho(h)?(e.consume(h),u):n(h)}function f(h){return te(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||te(h))&&r++<63){const g=h===45?p:c;return e.consume(h),g}return n(h)}}const lt={partial:!0,tokenize:Io};function Io(e,t,n){return r;function r(o){return q(o)?V(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||R(o)?t(o):n(o)}}const Wr={continuation:{tokenize:vo},exit:To,name:"blockQuote",tokenize:Ao};function Ao(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return q(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function vo(e,t,n){const r=this;return i;function i(l){return q(l)?V(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Wr,t,n)(l)}}function To(e){e.exit("blockQuote")}const Qr={name:"characterEscape",tokenize:Po};function Po(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return mo(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Yr={name:"characterReference",tokenize:Do};function Do(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=te,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=po,f):(e.enter("characterReferenceValue"),o=7,l=Vt,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===te&&!an(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const _n={partial:!0,tokenize:No},Mn={concrete:!0,name:"codeFenced",tokenize:Lo};function Lo(e,t,n){const r=this,i={partial:!0,tokenize:z};let o=0,l=0,a;return s;function s(b){return u(b)}function u(b){const H=r.events[r.events.length-1];return o=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===a?(l++,e.consume(b),f):l<3?n(b):(e.exit("codeFencedFenceSequence"),q(b)?V(e,c,"whitespace")(b):c(b))}function c(b){return b===null||R(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(_n,S,P)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||R(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(b)):q(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),V(e,h,"whitespace")(b)):b===96&&b===a?n(b):(e.consume(b),p)}function h(b){return b===null||R(b)?c(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||R(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===a?n(b):(e.consume(b),g)}function S(b){return e.attempt(i,P,k)(b)}function k(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),x}function x(b){return o>0&&q(b)?V(e,I,"linePrefix",o+1)(b):I(b)}function I(b){return b===null||R(b)?e.check(_n,S,P)(b):(e.enter("codeFlowValue"),E(b))}function E(b){return b===null||R(b)?(e.exit("codeFlowValue"),I(b)):(e.consume(b),E)}function P(b){return e.exit("codeFenced"),t(b)}function z(b,H,_){let $=0;return y;function y(T){return b.enter("lineEnding"),b.consume(T),b.exit("lineEnding"),D}function D(T){return b.enter("codeFencedFence"),q(T)?V(b,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):L(T)}function L(T){return T===a?(b.enter("codeFencedFenceSequence"),K(T)):_(T)}function K(T){return T===a?($++,b.consume(T),K):$>=l?(b.exit("codeFencedFenceSequence"),q(T)?V(b,N,"whitespace")(T):N(T)):_(T)}function N(T){return T===null||R(T)?(b.exit("codeFencedFence"),H(T)):_(T)}}}function No(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const It={name:"codeIndented",tokenize:Ro},zo={partial:!0,tokenize:Fo};function Ro(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),V(e,o,"linePrefix",5)(u)}function o(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):n(u)}function l(u){return u===null?s(u):R(u)?e.attempt(zo,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||R(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function Fo(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):V(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):R(l)?i(l):n(l)}}const Oo={name:"codeText",previous:_o,resolve:jo,tokenize:Mo};function jo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function _o(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Mo(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):R(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||R(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class Bo{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ye(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ye(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ye(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ye(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ye(this.left,n.reverse())}}}function Ye(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Xr(e){const t={};let n=-1,r,i,o,l,a,s,u;const f=new Bo(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ho(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return he(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Ho(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,p=-1,h=n,g=0,S=0;const k=[S];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(S=p+1,k.push(S),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):k.pop(),p=k.length;p--;){const x=a.slice(k[p],k[p+1]),I=o.pop();s.push([I,I+x.length-1]),e.splice(I,2,x)}for(s.reverse(),p=-1;++p<s.length;)u[g+s[p][0]]=g+s[p][1],g+=s[p][1]-s[p][0]-1;return u}const qo={resolve:$o,tokenize:Vo},Uo={partial:!0,tokenize:Ko};function $o(e){return Xr(e),e}function Vo(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):R(a)?e.check(Uo,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Ko(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),V(e,o,"linePrefix")}function o(l){if(l===null||R(l))return n(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?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Gr(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||mt(x)?n(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),S(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(a),p(x)):x===null||x===60||R(x)?n(x):(e.consume(x),x===92?g:h)}function g(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function S(x){return!f&&(x===null||x===41||Y(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(x)):f<u&&x===40?(e.consume(x),f++,S):x===41?(e.consume(x),f--,S):x===null||x===32||x===40||mt(x)?n(x):(e.consume(x),x===92?k:S)}function k(x){return x===40||x===41||x===92?(e.consume(x),S):S(x)}}function Jr(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!s||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):R(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||R(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),s||(s=!q(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function Zr(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,s):n(p)}function s(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===l?(e.exit(o),s(l)):p===null?n(p):R(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),V(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||R(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function Je(e,t){let n;return r;function r(i){return R(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):q(i)?V(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Wo={name:"definition",tokenize:Yo},Qo={partial:!0,tokenize:Xo};function Yo(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Jr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=ke(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),s):n(h)}function s(h){return Y(h)?Je(e,u)(h):u(h)}function u(h){return Gr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Qo,c,c)(h)}function c(h){return q(h)?V(e,p,"whitespace")(h):p(h)}function p(h){return h===null||R(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Xo(e,t,n){return r;function r(a){return Y(a)?Je(e,i)(a):n(a)}function i(a){return Zr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return q(a)?V(e,l,"whitespace")(a):l(a)}function l(a){return a===null||R(a)?t(a):n(a)}}const Go={name:"hardBreakEscape",tokenize:Jo};function Jo(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return R(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Zo={name:"headingAtx",resolve:ea,tokenize:ta};function ea(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},he(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function ta(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||Y(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||R(f)?(e.exit("atxHeading"),t(f)):q(f)?V(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||Y(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const na=["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"],Bn=["pre","script","style","textarea"],ra={concrete:!0,name:"htmlFlow",resolveTo:oa,tokenize:aa},ia={partial:!0,tokenize:ua},la={partial:!0,tokenize:sa};function oa(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function aa(e,t,n){const r=this;let i,o,l,a,s;return u;function u(d){return f(d)}function f(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),c}function c(d){return d===33?(e.consume(d),p):d===47?(e.consume(d),o=!0,S):d===63?(e.consume(d),i=3,r.interrupt?t:m):re(d)?(e.consume(d),l=String.fromCharCode(d),k):n(d)}function p(d){return d===45?(e.consume(d),i=2,h):d===91?(e.consume(d),i=5,a=0,g):re(d)?(e.consume(d),i=4,r.interrupt?t:m):n(d)}function h(d){return d===45?(e.consume(d),r.interrupt?t:m):n(d)}function g(d){const le="CDATA[";return d===le.charCodeAt(a++)?(e.consume(d),a===le.length?r.interrupt?t:L:g):n(d)}function S(d){return re(d)?(e.consume(d),l=String.fromCharCode(d),k):n(d)}function k(d){if(d===null||d===47||d===62||Y(d)){const le=d===47,Se=l.toLowerCase();return!le&&!o&&Bn.includes(Se)?(i=1,r.interrupt?t(d):L(d)):na.includes(l.toLowerCase())?(i=6,le?(e.consume(d),x):r.interrupt?t(d):L(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(d):o?I(d):E(d))}return d===45||te(d)?(e.consume(d),l+=String.fromCharCode(d),k):n(d)}function x(d){return d===62?(e.consume(d),r.interrupt?t:L):n(d)}function I(d){return q(d)?(e.consume(d),I):y(d)}function E(d){return d===47?(e.consume(d),y):d===58||d===95||re(d)?(e.consume(d),P):q(d)?(e.consume(d),E):y(d)}function P(d){return d===45||d===46||d===58||d===95||te(d)?(e.consume(d),P):z(d)}function z(d){return d===61?(e.consume(d),b):q(d)?(e.consume(d),z):E(d)}function b(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),s=d,H):q(d)?(e.consume(d),b):_(d)}function H(d){return d===s?(e.consume(d),s=null,$):d===null||R(d)?n(d):(e.consume(d),H)}function _(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||Y(d)?z(d):(e.consume(d),_)}function $(d){return d===47||d===62||q(d)?E(d):n(d)}function y(d){return d===62?(e.consume(d),D):n(d)}function D(d){return d===null||R(d)?L(d):q(d)?(e.consume(d),D):n(d)}function L(d){return d===45&&i===2?(e.consume(d),W):d===60&&i===1?(e.consume(d),J):d===62&&i===4?(e.consume(d),ie):d===63&&i===3?(e.consume(d),m):d===93&&i===5?(e.consume(d),pe):R(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ia,me,K)(d)):d===null||R(d)?(e.exit("htmlFlowData"),K(d)):(e.consume(d),L)}function K(d){return e.check(la,N,me)(d)}function N(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),T}function T(d){return d===null||R(d)?K(d):(e.enter("htmlFlowData"),L(d))}function W(d){return d===45?(e.consume(d),m):L(d)}function J(d){return d===47?(e.consume(d),l="",se):L(d)}function se(d){if(d===62){const le=l.toLowerCase();return Bn.includes(le)?(e.consume(d),ie):L(d)}return re(d)&&l.length<8?(e.consume(d),l+=String.fromCharCode(d),se):L(d)}function pe(d){return d===93?(e.consume(d),m):L(d)}function m(d){return d===62?(e.consume(d),ie):d===45&&i===2?(e.consume(d),m):L(d)}function ie(d){return d===null||R(d)?(e.exit("htmlFlowData"),me(d)):(e.consume(d),ie)}function me(d){return e.exit("htmlFlow"),t(d)}}function sa(e,t,n){const r=this;return i;function i(l){return R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function ua(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(lt,t,n)}}const ca={name:"htmlText",tokenize:fa};function fa(e,t,n){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),s}function s(m){return m===33?(e.consume(m),u):m===47?(e.consume(m),z):m===63?(e.consume(m),E):re(m)?(e.consume(m),_):n(m)}function u(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,g):re(m)?(e.consume(m),I):n(m)}function f(m){return m===45?(e.consume(m),h):n(m)}function c(m){return m===null?n(m):m===45?(e.consume(m),p):R(m)?(l=c,J(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?W(m):m===45?p(m):c(m)}function g(m){const ie="CDATA[";return m===ie.charCodeAt(o++)?(e.consume(m),o===ie.length?S:g):n(m)}function S(m){return m===null?n(m):m===93?(e.consume(m),k):R(m)?(l=S,J(m)):(e.consume(m),S)}function k(m){return m===93?(e.consume(m),x):S(m)}function x(m){return m===62?W(m):m===93?(e.consume(m),x):S(m)}function I(m){return m===null||m===62?W(m):R(m)?(l=I,J(m)):(e.consume(m),I)}function E(m){return m===null?n(m):m===63?(e.consume(m),P):R(m)?(l=E,J(m)):(e.consume(m),E)}function P(m){return m===62?W(m):E(m)}function z(m){return re(m)?(e.consume(m),b):n(m)}function b(m){return m===45||te(m)?(e.consume(m),b):H(m)}function H(m){return R(m)?(l=H,J(m)):q(m)?(e.consume(m),H):W(m)}function _(m){return m===45||te(m)?(e.consume(m),_):m===47||m===62||Y(m)?$(m):n(m)}function $(m){return m===47?(e.consume(m),W):m===58||m===95||re(m)?(e.consume(m),y):R(m)?(l=$,J(m)):q(m)?(e.consume(m),$):W(m)}function y(m){return m===45||m===46||m===58||m===95||te(m)?(e.consume(m),y):D(m)}function D(m){return m===61?(e.consume(m),L):R(m)?(l=D,J(m)):q(m)?(e.consume(m),D):$(m)}function L(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,K):R(m)?(l=L,J(m)):q(m)?(e.consume(m),L):(e.consume(m),N)}function K(m){return m===i?(e.consume(m),i=void 0,T):m===null?n(m):R(m)?(l=K,J(m)):(e.consume(m),K)}function N(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||Y(m)?$(m):(e.consume(m),N)}function T(m){return m===47||m===62||Y(m)?$(m):n(m)}function W(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function J(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),se}function se(m){return q(m)?V(e,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):pe(m)}function pe(m){return e.enter("htmlTextData"),l(m)}}const sn={name:"labelEnd",resolveAll:da,resolveTo:ga,tokenize:xa},ha={tokenize:ya},pa={tokenize:ka},ma={tokenize:ba};function da(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&he(e,0,e.length,n),e}function ga(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,t],["enter",u,t]],a=de(a,e.slice(o+1,o+r+3)),a=de(a,[["enter",f,t]]),a=de(a,yt(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=de(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=de(a,e.slice(l+1)),a=de(a,[["exit",s,t]]),he(e,o,e.length,a),e}function xa(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(ke(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),s):n(p)}function s(p){return p===40?e.attempt(ha,f,l?f:c)(p):p===91?e.attempt(pa,f,l?u:c)(p):l?f(p):c(p)}function u(p){return e.attempt(ma,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function ya(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Y(c)?Je(e,o)(c):o(c)}function o(c){return c===41?f(c):Gr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return Y(c)?Je(e,s)(c):f(c)}function a(c){return n(c)}function s(c){return c===34||c===39||c===40?Zr(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return Y(c)?Je(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function ka(e,t,n){const r=this;return i;function i(a){return Jr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ke(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function ba(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const wa={name:"labelStartImage",resolveAll:sn.resolveAll,tokenize:Sa};function Sa(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Ca={name:"labelStartLink",resolveAll:sn.resolveAll,tokenize:Ea};function Ea(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const At={name:"lineEnding",tokenize:Ia};function Ia(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),V(e,t,"linePrefix")}}const pt={name:"thematicBreak",tokenize:Aa};function Aa(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||R(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),q(u)?V(e,a,"whitespace")(u):a(u))}}const oe={continuation:{tokenize:Da},exit:Na,name:"list",tokenize:Pa},va={partial:!0,tokenize:za},Ta={partial:!0,tokenize:La};function Pa(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Vt(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(pt,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(h)}return n(h)}function s(h){return Vt(h)&&++l<10?(e.consume(h),s):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(lt,r.interrupt?n:f,e.attempt(va,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return q(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Da(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(lt,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,V(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!q(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(Ta,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,V(e,e.attempt(oe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function La(e,t,n){const r=this;return V(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function Na(e){e.exit(this.containerState.type)}function za(e,t,n){const r=this;return V(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!q(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Hn={name:"setextUnderline",resolveTo:Ra,tokenize:Fa};function Ra(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Fa(e,t,n){const r=this;let i;return o;function o(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"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),q(u)?V(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||R(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Oa={tokenize:ja};function ja(e){const t=this,n=e.attempt(lt,r,e.attempt(this.parser.constructs.flowInitial,i,V(e,e.attempt(this.parser.constructs.flow,i,e.attempt(qo,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const _a={resolveAll:ti()},Ma=ei("string"),Ba=ei("text");function ei(e){return{resolveAll:ti(e==="text"?Ha:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ti(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Ha(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];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){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const qa={42:oe,43:oe,45:oe,48:oe,49:oe,50:oe,51:oe,52:oe,53:oe,54:oe,55:oe,56:oe,57:oe,62:Wr},Ua={91:Wo},$a={[-2]:It,[-1]:It,32:It},Va={35:Zo,42:pt,45:[Hn,pt],60:ra,61:Hn,95:pt,96:Mn,126:Mn},Ka={38:Yr,92:Qr},Wa={[-5]:At,[-4]:At,[-3]:At,33:wa,38:Yr,42:Kt,60:[Co,ca],91:Ca,92:[Go,Qr],93:sn,95:Kt,96:Oo},Qa={null:[Kt,_a]},Ya={null:[42,95]},Xa={null:[]},Ga=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ya,contentInitial:Ua,disable:Xa,document:qa,flow:Va,flowInitial:$a,insideSpan:Qa,string:Ka,text:Wa},Symbol.toStringTag,{value:"Module"}));function Ja(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:H(z),check:H(b),consume:I,enter:E,exit:P,interrupt:H(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:S,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function c(D){return l=de(l,D),k(),l[l.length-1]!==null?[]:(_(t,0),u.events=yt(o,u.events,u),u.events)}function p(D,L){return es(h(D),L)}function h(D){return Za(l,D)}function g(){const{_bufferIndex:D,_index:L,line:K,column:N,offset:T}=r;return{_bufferIndex:D,_index:L,line:K,column:N,offset:T}}function S(D){i[D.line]=D.column,y()}function k(){let D;for(;r._index<l.length;){const L=l[r._index];if(typeof L=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<L.length;)x(L.charCodeAt(r._bufferIndex));else x(L)}}function x(D){f=f(D)}function I(D){R(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,y()):D!==-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=D}function E(D,L){const K=L||{};return K.type=D,K.start=g(),u.events.push(["enter",K,u]),a.push(K),K}function P(D){const L=a.pop();return L.end=g(),u.events.push(["exit",L,u]),L}function z(D,L){_(D,L.from)}function b(D,L){L.restore()}function H(D,L){return K;function K(N,T,W){let J,se,pe,m;return Array.isArray(N)?me(N):"tokenize"in N?me([N]):ie(N);function ie(ee){return Ae;function Ae(xe){const F=xe!==null&&ee[xe],G=xe!==null&&ee.null,ue=[...Array.isArray(F)?F:F?[F]:[],...Array.isArray(G)?G:G?[G]:[]];return me(ue)(xe)}}function me(ee){return J=ee,se=0,ee.length===0?W:d(ee[se])}function d(ee){return Ae;function Ae(xe){return m=$(),pe=ee,ee.partial||(u.currentConstruct=ee),ee.name&&u.parser.constructs.disable.null.includes(ee.name)?Se():ee.tokenize.call(L?Object.assign(Object.create(u),L):u,s,le,Se)(xe)}}function le(ee){return D(pe,m),T}function Se(ee){return m.restore(),++se<J.length?d(J[se]):W}}}function _(D,L){D.resolveAll&&!o.includes(D)&&o.push(D),D.resolve&&he(u.events,L,u.events.length-L,D.resolve(u.events.slice(L),u)),D.resolveTo&&(u.events=D.resolveTo(u.events,u))}function $(){const D=g(),L=u.previous,K=u.currentConstruct,N=u.events.length,T=Array.from(a);return{from:N,restore:W};function W(){r=D,u.previous=L,u.currentConstruct=K,u.events.length=N,a=T,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Za(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function es(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
3
- `;break}case-3:{l=`\r
4
- `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function ts(e){const r={constructs:Vr([Ga,...(e||{}).extensions||[]]),content:i(go),defined:[],document:i(yo),flow:i(Oa),lazy:{},string:i(Ma),text:i(Ba)};return r;function i(o){return l;function l(a){return Ja(r,o,a)}}}function ns(e){for(;!Xr(e););return e}const qn=/[\0\t\n\r]/g;function rs(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(qn.lastIndex=c,u=qn.exec(o),p=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(p),!u){t=o.slice(c);break}if(h===10&&c===p&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<p&&(s.push(o.slice(c,p)),e+=p-c),h){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=p+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const is=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ls(e){return e.replace(is,os)}function os(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Kr(n.slice(o?2:1),o?16:10)}return an(n)||e}const ni={}.hasOwnProperty;function as(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),ss(n)(ns(ts(n).document().write(rs()(e,t,!0))))}function ss(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(wn),autolinkProtocol:$,autolinkEmail:$,atxHeading:o(yn),blockQuote:o(G),characterEscape:$,characterReference:$,codeFenced:o(ue),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(ue,l),codeText:o(ve,l),codeTextData:$,data:$,codeFlowValue:$,definition:o(st),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(qi),hardBreakEscape:o(kn),hardBreakTrailing:o(kn),htmlFlow:o(bn,l),htmlFlowData:$,htmlText:o(bn,l),htmlTextData:$,image:o(Ui),label:l,link:o(wn),listItem:o($i),listItemValue:p,listOrdered:o(Sn,c),listUnordered:o(Sn),paragraph:o(Vi),reference:d,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(yn),strong:o(Ki),thematicBreak:o(Qi)},exit:{atxHeading:s(),atxHeadingSequence:z,autolink:s(),autolinkEmail:F,autolinkProtocol:xe,blockQuote:s(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:ee,characterReference:Ae,codeFenced:s(k),codeFencedFence:S,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:y,codeIndented:s(x),codeText:s(T),codeTextData:y,data:y,definition:s(),definitionDestinationString:P,definitionLabelString:I,definitionTitleString:E,emphasis:s(),hardBreakEscape:s(L),hardBreakTrailing:s(L),htmlFlow:s(K),htmlFlowData:y,htmlText:s(N),htmlTextData:y,image:s(J),label:pe,labelText:se,lineEnding:D,link:s(W),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:le,resourceDestinationString:m,resourceTitleString:ie,resource:me,setextHeading:s(_),setextHeadingLineSequence:H,setextHeadingText:b,strong:s(),thematicBreak:s()}};ri(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(C){let v={type:"root",children:[]};const O={stack:[v],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},U=[];let Q=-1;for(;++Q<C.length;)if(C[Q][1].type==="listOrdered"||C[Q][1].type==="listUnordered")if(C[Q][0]==="enter")U.push(Q);else{const ye=U.pop();Q=i(C,ye,Q)}for(Q=-1;++Q<C.length;){const ye=t[C[Q][0]];ni.call(ye,C[Q][1].type)&&ye[C[Q][1].type].call(Object.assign({sliceSerialize:C[Q][2].sliceSerialize},O),C[Q][1])}if(O.tokenStack.length>0){const ye=O.tokenStack[O.tokenStack.length-1];(ye[1]||Un).call(O,void 0,ye[0])}for(v.position={start:Te(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:Te(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},Q=-1;++Q<t.transforms.length;)v=t.transforms[Q](v)||v;return v}function i(C,v,O){let U=v-1,Q=-1,ye=!1,Le,Ce,Ve,Ke;for(;++U<=O;){const ce=C[U];switch(ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ce[0]==="enter"?Q++:Q--,Ke=void 0;break}case"lineEndingBlank":{ce[0]==="enter"&&(Le&&!Ke&&!Q&&!Ve&&(Ve=U),Ke=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ke=void 0}if(!Q&&ce[0]==="enter"&&ce[1].type==="listItemPrefix"||Q===-1&&ce[0]==="exit"&&(ce[1].type==="listUnordered"||ce[1].type==="listOrdered")){if(Le){let Oe=U;for(Ce=void 0;Oe--;){const Ee=C[Oe];if(Ee[1].type==="lineEnding"||Ee[1].type==="lineEndingBlank"){if(Ee[0]==="exit")continue;Ce&&(C[Ce][1].type="lineEndingBlank",ye=!0),Ee[1].type="lineEnding",Ce=Oe}else if(!(Ee[1].type==="linePrefix"||Ee[1].type==="blockQuotePrefix"||Ee[1].type==="blockQuotePrefixWhitespace"||Ee[1].type==="blockQuoteMarker"||Ee[1].type==="listItemIndent"))break}Ve&&(!Ce||Ve<Ce)&&(Le._spread=!0),Le.end=Object.assign({},Ce?C[Ce][1].start:ce[1].end),C.splice(Ce||U,0,["exit",Le,ce[2]]),U++,O++}if(ce[1].type==="listItemPrefix"){const Oe={type:"listItem",_spread:!1,start:Object.assign({},ce[1].start),end:void 0};Le=Oe,C.splice(U,0,["enter",Oe,ce[2]]),U++,O++,Ve=void 0,Ke=!0}}}return C[v][1]._spread=ye,O}function o(C,v){return O;function O(U){a.call(this,C(U),U),v&&v.call(this,U)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(C,v,O){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([v,O||void 0]),C.position={start:Te(v.start),end:void 0}}function s(C){return v;function v(O){C&&C.call(this,O),u.call(this,O)}}function u(C,v){const O=this.stack.pop(),U=this.tokenStack.pop();if(U)U[0].type!==C.type&&(v?v.call(this,C,U[0]):(U[1]||Un).call(this,C,U[0]));else throw new Error("Cannot close `"+C.type+"` ("+Ge({start:C.start,end:C.end})+"): it’s not open");O.position.end=Te(C.end)}function f(){return on(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(C){if(this.data.expectingFirstListItemValue){const v=this.stack[this.stack.length-2];v.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function h(){const C=this.resume(),v=this.stack[this.stack.length-1];v.lang=C}function g(){const C=this.resume(),v=this.stack[this.stack.length-1];v.meta=C}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const C=this.resume(),v=this.stack[this.stack.length-1];v.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const C=this.resume(),v=this.stack[this.stack.length-1];v.value=C.replace(/(\r?\n|\r)$/g,"")}function I(C){const v=this.resume(),O=this.stack[this.stack.length-1];O.label=v,O.identifier=ke(this.sliceSerialize(C)).toLowerCase()}function E(){const C=this.resume(),v=this.stack[this.stack.length-1];v.title=C}function P(){const C=this.resume(),v=this.stack[this.stack.length-1];v.url=C}function z(C){const v=this.stack[this.stack.length-1];if(!v.depth){const O=this.sliceSerialize(C).length;v.depth=O}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function H(C){const v=this.stack[this.stack.length-1];v.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function $(C){const O=this.stack[this.stack.length-1].children;let U=O[O.length-1];(!U||U.type!=="text")&&(U=Wi(),U.position={start:Te(C.start),end:void 0},O.push(U)),this.stack.push(U)}function y(C){const v=this.stack.pop();v.value+=this.sliceSerialize(C),v.position.end=Te(C.end)}function D(C){const v=this.stack[this.stack.length-1];if(this.data.atHardBreak){const O=v.children[v.children.length-1];O.position.end=Te(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(v.type)&&($.call(this,C),y.call(this,C))}function L(){this.data.atHardBreak=!0}function K(){const C=this.resume(),v=this.stack[this.stack.length-1];v.value=C}function N(){const C=this.resume(),v=this.stack[this.stack.length-1];v.value=C}function T(){const C=this.resume(),v=this.stack[this.stack.length-1];v.value=C}function W(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=v,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function J(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=v,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function se(C){const v=this.sliceSerialize(C),O=this.stack[this.stack.length-2];O.label=ls(v),O.identifier=ke(v).toLowerCase()}function pe(){const C=this.stack[this.stack.length-1],v=this.resume(),O=this.stack[this.stack.length-1];if(this.data.inReference=!0,O.type==="link"){const U=C.children;O.children=U}else O.alt=v}function m(){const C=this.resume(),v=this.stack[this.stack.length-1];v.url=C}function ie(){const C=this.resume(),v=this.stack[this.stack.length-1];v.title=C}function me(){this.data.inReference=void 0}function d(){this.data.referenceType="collapsed"}function le(C){const v=this.resume(),O=this.stack[this.stack.length-1];O.label=v,O.identifier=ke(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function Se(C){this.data.characterReferenceType=C.type}function ee(C){const v=this.sliceSerialize(C),O=this.data.characterReferenceType;let U;O?(U=Kr(v,O==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):U=an(v);const Q=this.stack[this.stack.length-1];Q.value+=U}function Ae(C){const v=this.stack.pop();v.position.end=Te(C.end)}function xe(C){y.call(this,C);const v=this.stack[this.stack.length-1];v.url=this.sliceSerialize(C)}function F(C){y.call(this,C);const v=this.stack[this.stack.length-1];v.url="mailto:"+this.sliceSerialize(C)}function G(){return{type:"blockquote",children:[]}}function ue(){return{type:"code",lang:null,meta:null,value:""}}function ve(){return{type:"inlineCode",value:""}}function st(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function qi(){return{type:"emphasis",children:[]}}function yn(){return{type:"heading",depth:0,children:[]}}function kn(){return{type:"break"}}function bn(){return{type:"html",value:""}}function Ui(){return{type:"image",title:null,url:"",alt:null}}function wn(){return{type:"link",title:null,url:"",children:[]}}function Sn(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function $i(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function Vi(){return{type:"paragraph",children:[]}}function Ki(){return{type:"strong",children:[]}}function Wi(){return{type:"text",value:""}}function Qi(){return{type:"thematicBreak"}}}function Te(e){return{line:e.line,column:e.column,offset:e.offset}}function ri(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ri(e,r):us(e,r)}}function us(e,t){let n;for(n in t)if(ni.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Un(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ge({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ge({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ge({start:t.start,end:t.end})+") is still open")}function cs(e){const t=this;t.parser=n;function n(r){return as(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function fs(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function hs(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
- `}]}function ps(e,t){const n=t.value?t.value+`
6
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function ms(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ds(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gs(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=$e(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}function xs(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ys(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ii(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function ks(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ii(e,t);const i={src:$e(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function bs(e,t){const n={src:$e(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ws(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Ss(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ii(e,t);const i={href:$e(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Cs(e,t){const n={href:$e(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Es(e,t,n){const r=e.all(t),i=n?Is(n):li(t),o={},l=[];if(typeof t.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:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
7
- `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
8
- `});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function Is(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=li(n[r])}return t}function li(e){const t=e.spread;return t??e.children.length>1}function As(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function vs(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ts(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ps(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ds(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=tn(t.children[1]),s=jr(t.children[t.children.length-1]);a&&s&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Ls(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s<a;){const c=t.children[s],p={},h=l?l[s]:void 0;h&&(p.align=h);let g={type:"element",tagName:o,properties:p,children:[]};c&&(g.children=e.all(c),e.patch(c,g),g=e.applyData(c,g)),u.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function Ns(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const $n=9,Vn=32;function zs(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Kn(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Kn(t.slice(i),i>0,!1)),o.join("")}function Kn(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===$n||o===Vn;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===$n||o===Vn;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Rs(e,t){const n={type:"text",value:zs(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Fs(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Os={blockquote:fs,break:hs,code:ps,delete:ms,emphasis:ds,footnoteReference:gs,heading:xs,html:ys,imageReference:ks,image:bs,inlineCode:ws,linkReference:Ss,link:Cs,listItem:Es,list:As,paragraph:vs,root:Ts,strong:Ps,table:Ds,tableCell:Ns,tableRow:Ls,text:Rs,thematicBreak:Fs,toml:ut,yaml:ut,definition:ut,footnoteDefinition:ut};function ut(){}const oi=-1,kt=0,Ze=1,dt=2,un=3,cn=4,fn=5,hn=6,ai=7,si=8,Wn=typeof self=="object"?self:globalThis,js=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case kt:case oi:return n(l,i);case Ze:{const a=n([],i);for(const s of l)a.push(r(s));return a}case dt:{const a=n({},i);for(const[s,u]of l)a[r(s)]=r(u);return a}case un:return n(new Date(l),i);case cn:{const{source:a,flags:s}=l;return n(new RegExp(a,s),i)}case fn:{const a=n(new Map,i);for(const[s,u]of l)a.set(r(s),r(u));return a}case hn:{const a=n(new Set,i);for(const s of l)a.add(r(s));return a}case ai:{const{name:a,message:s}=l;return n(new Wn[a](s),i)}case si:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new Wn[o](l),i)};return r},Qn=e=>js(new Map,e)(0),_e="",{toString:_s}={},{keys:Ms}=Object,Xe=e=>{const t=typeof e;if(t!=="object"||!e)return[kt,t];const n=_s.call(e).slice(8,-1);switch(n){case"Array":return[Ze,_e];case"Object":return[dt,_e];case"Date":return[un,_e];case"RegExp":return[cn,_e];case"Map":return[fn,_e];case"Set":return[hn,_e];case"DataView":return[Ze,n]}return n.includes("Array")?[Ze,n]:n.includes("Error")?[ai,n]:[dt,n]},ct=([e,t])=>e===kt&&(t==="function"||t==="symbol"),Bs=(e,t,n,r)=>{const i=(l,a)=>{const s=r.push(l)-1;return n.set(a,s),s},o=l=>{if(n.has(l))return n.get(l);let[a,s]=Xe(l);switch(a){case kt:{let f=l;switch(s){case"bigint":a=si,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([oi],l)}return i([a,f],l)}case Ze:{if(s){let p=l;return s==="DataView"?p=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(p=new Uint8Array(l)),i([s,[...p]],l)}const f=[],c=i([a,f],l);for(const p of l)f.push(o(p));return c}case dt:{if(s)switch(s){case"BigInt":return i([s,l.toString()],l);case"Boolean":case"Number":case"String":return i([s,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const p of Ms(l))(e||!ct(Xe(l[p])))&&f.push([o(p),o(l[p])]);return c}case un:return i([a,l.toISOString()],l);case cn:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case fn:{const f=[],c=i([a,f],l);for(const[p,h]of l)(e||!(ct(Xe(p))||ct(Xe(h))))&&f.push([o(p),o(h)]);return c}case hn:{const f=[],c=i([a,f],l);for(const p of l)(e||!ct(Xe(p)))&&f.push(o(p));return c}}const{message:u}=l;return i([a,{name:s,message:u}],l)};return o},Yn=(e,{json:t,lossy:n}={})=>{const r=[];return Bs(!(t||n),!!t,new Map,r)(e),r},tt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Qn(Yn(e,t)):structuredClone(e):(e,t)=>Qn(Yn(e,t));function Hs(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function qs(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Us(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Hs,r=e.options.footnoteBackLabel||qs,i=e.options.footnoteLabel||"Footnotes",o=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(),p=$e(c.toLowerCase());let h=0;const g=[],S=e.footnoteCounts.get(c);for(;S!==void 0&&++h<=S;){g.length>0&&g.push({type:"text",value:" "});let I=typeof n=="string"?n:n(s,h);typeof I=="string"&&(I={type:"text",value:I}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,h),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const k=f[f.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const I=k.children[k.children.length-1];I&&I.type==="text"?I.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...g)}else f.push(...g);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(u,x),a.push(x)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...tt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
10
- `}]}}const bt=(function(e){if(e==null)return Ws;if(typeof e=="function")return wt(e);if(typeof e=="object")return Array.isArray(e)?$s(e):Vs(e);if(typeof e=="string")return Ks(e);throw new Error("Expected function, string, or object as test")});function $s(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=bt(e[n]);return wt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Vs(e){const t=e;return wt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Ks(e){return wt(t);function t(n){return n&&n.type===e}}function wt(e){return t;function t(n,r,i){return!!(Qs(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ws(){return!0}function Qs(e){return e!==null&&typeof e=="object"&&"type"in e}const ui=[],Ys=!0,Wt=!1,Xs="skip";function ci(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=bt(i),l=r?-1:1;a(e,void 0,[])();function a(s,u,f){const c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(s.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=ui,g,S,k;if((!t||o(s,u,f[f.length-1]||void 0))&&(h=Gs(n(s,f)),h[0]===Wt))return h;if("children"in s&&s.children){const x=s;if(x.children&&h[0]!==Xs)for(S=(r?x.children.length:-1)+l,k=f.concat(x);S>-1&&S<x.children.length;){const I=x.children[S];if(g=a(I,S,k)(),g[0]===Wt)return g;S=typeof g[1]=="number"?g[1]:S+l}}return h}}}function Gs(e){return Array.isArray(e)?e:typeof e=="number"?[Ys,e]:e==null?ui:[e]}function pn(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),ci(e,o,a,i);function a(s,u){const f=u[u.length-1],c=f?f.children.indexOf(s):void 0;return l(s,c,f)}}const Qt={}.hasOwnProperty,Js={};function Zs(e,t){const n=t||Js,r=new Map,i=new Map,o=new Map,l={...Os,...n.handlers},a={all:u,applyData:tu,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:s,options:n,patch:eu,wrap:ru};return pn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),a;function s(f,c){const p=f.type,h=a.handlers[p];if(Qt.call(a.handlers,p)&&h)return h(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in f){const{children:S,...k}=f,x=tt(k);return x.children=a.all(f),x}return tt(f)}return(a.options.unknownHandler||nu)(a,f,c)}function u(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const g=a.one(p[h],f);if(g){if(h&&p[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Xn(g.value)),!Array.isArray(g)&&g.type==="element")){const S=g.children[0];S&&S.type==="text"&&(S.value=Xn(S.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function eu(e,t){e.position&&(t.position=Mr(e))}function tu(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,tt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function nu(e,t){const n=t.data||{},r="value"in t&&!(Qt.call(n,"hProperties")||Qt.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ru(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
- `});++r<e.length;)r&&n.push({type:"text",value:`
12
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
- `}),n}function Xn(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Gn(e,t){const n=Zs(e,t),r=n.one(e,void 0),i=Us(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
14
- `},i),o}function iu(e,t){return e&&"run"in e?async function(n,r){const i=Gn(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Gn(n,{file:r,...e||t})}}function Jn(e){if(e)throw e}var vt,Zn;function lu(){if(Zn)return vt;Zn=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},l=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return vt=function s(){var u,f,c,p,h,g,S=arguments[0],k=1,x=arguments.length,I=!1;for(typeof S=="boolean"&&(I=S,S=arguments[1]||{},k=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});k<x;++k)if(u=arguments[k],u!=null)for(f in u)c=a(S,f),p=a(u,f),S!==p&&(I&&p&&(o(p)||(h=i(p)))?(h?(h=!1,g=c&&i(c)?c:[]):g=c&&o(c)?c:{},l(S,{name:f,newValue:s(I,g,p)})):typeof p<"u"&&l(S,{name:f,newValue:p}));return S},vt}var ou=lu();const Tt=Cr(ou);function Yt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function au(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(s,...u){const f=e[++o];let c=-1;if(s){l(s);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?su(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function su(e,t){let n;return r;function r(...l){const a=e.length>l.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&n)throw f;return i(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const be={basename:uu,dirname:cu,extname:fu,join:hu,sep:"/"};function uu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ot(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function cu(e){if(ot(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function fu(e){ot(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function hu(...e){let t=-1,n;for(;++t<e.length;)ot(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":pu(n)}function pu(e){ot(e);const t=e.codePointAt(0)===47;let n=mu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function mu(e,t){let n="",r=0,i=-1,o=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(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function ot(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const du={cwd:gu};function gu(){return"/"}function Xt(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function xu(e){if(typeof e=="string")e=new URL(e);else if(!Xt(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return yu(e)}function yu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Pt=["history","path","basename","stem","extname","dirname"];class fi{constructor(t){let n;t?Xt(t)?n={path:t}:typeof t=="string"||ku(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":du.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pt.length;){const o=Pt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Pt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?be.basename(this.path):void 0}set basename(t){Lt(t,"basename"),Dt(t,"basename"),this.path=be.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?be.dirname(this.path):void 0}set dirname(t){er(this.basename,"dirname"),this.path=be.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?be.extname(this.path):void 0}set extname(t){if(Dt(t,"extname"),er(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=be.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Xt(t)&&(t=xu(t)),Lt(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?be.basename(this.path,this.extname):void 0}set stem(t){Lt(t,"stem"),Dt(t,"stem"),this.path=be.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ne(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Dt(e,t){if(e&&e.includes(be.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+be.sep+"`")}function Lt(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function er(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ku(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bu=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),wu={}.hasOwnProperty;class mn extends bu{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=au()}copy(){const t=new mn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Tt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Rt("data",this.frozen),this.namespace[t]=n,this):wu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Rt("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ft(t),r=this.parser||this.Parser;return Nt("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Nt("process",this.parser||this.Parser),zt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=ft(t),s=r.parse(a);r.run(s,a,function(f,c,p){if(f||!c||!p)return u(f);const h=c,g=r.stringify(h,p);Eu(g)?p.value=g:p.result=g,u(f,p)});function u(f,c){f||!c?l(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Nt("processSync",this.parser||this.Parser),zt("processSync",this.compiler||this.Compiler),this.process(t,i),nr("processSync","process",n),r;function i(o,l){n=!0,Jn(o),r=l}}run(t,n,r){tr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const s=ft(n);i.run(t,s,u);function u(f,c,p){const h=c||t;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),nr("runSync","run",r),i;function o(l,a){Jn(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=ft(n),i=this.compiler||this.Compiler;return zt("stringify",i),tr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Rt("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(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&&(i.settings=Tt(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===u){p=c;break}if(p===-1)r.push([u,...f]);else if(f.length>0){let[h,...g]=f;const S=r[p][1];Yt(S)&&Yt(h)&&(h=Tt(!0,S,h)),r[p]=[u,h,...g]}}}}const Su=new mn().freeze();function Nt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function zt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Rt(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function tr(e){if(!Yt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function nr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ft(e){return Cu(e)?e:new fi(e)}function Cu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Eu(e){return typeof e=="string"||Iu(e)}function Iu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Au="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",rr=[],ir={allowDangerousHtml:!0},vu=/^(https?|ircs?|mailto|xmpp)$/i,Tu=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Pu(e){const t=Du(e),n=Lu(e);return Nu(t.runSync(t.parse(n),n),e)}function Du(e){const t=e.rehypePlugins||rr,n=e.remarkPlugins||rr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ir}:ir;return Su().use(cs).use(n).use(iu,r).use(t)}function Lu(e){const t=e.children||"",n=new fi;return typeof t=="string"&&(n.value=t),n}function Nu(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||zu;for(const f of Tu)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Au+f.id,void 0);return pn(e,u),Kl(e,{Fragment:w.Fragment,components:i,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function u(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return l?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in Et)if(Object.hasOwn(Et,h)&&Object.hasOwn(f.properties,h)){const g=f.properties[h],S=Et[h];(S===null||S.includes(f.tagName))&&(f.properties[h]=s(String(g||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return a&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function zu(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||vu.test(e.slice(0,t))?e:""}const Ne=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],lr={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ne,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ne],h2:[["className","sr-only"]],img:[...Ne,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ne,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ne],table:[...Ne],ul:[...Ne,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Pe={}.hasOwnProperty;function Ru(e,t){let n={type:"root",children:[]};const r={schema:t?{...lr,...t}:lr,stack:[]},i=hi(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function hi(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Fu(e,n);case"doctype":return Ou(e,n);case"element":return ju(e,n);case"root":return _u(e,n);case"text":return Mu(e,n)}}}function Fu(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),o={type:"comment",value:r<0?n:n.slice(0,r)};return at(o,t),o}}function Ou(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return at(n,t),n}}function ju(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=pi(e,t.children),i=Bu(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&Pe.call(e.schema.ancestors,n))){const a=e.schema.ancestors[n];let s=-1;for(o=!1;++s<a.length;)e.stack.includes(a[s])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const l={type:"element",tagName:n,properties:i,children:r};return at(l,t),l}function _u(e,t){const r={type:"root",children:pi(e,t.children)};return at(r,t),r}function Mu(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return at(r,t),r}function pi(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const o=hi(e,r[i]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function Bu(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,o=r&&Pe.call(r,n)?r[n]:void 0,l=r&&Pe.call(r,"*")?r["*"]:void 0,a=t&&typeof t=="object"?t:{},s={};let u;for(u in a)if(Pe.call(a,u)){const f=a[u];let c=or(e,ar(o,u),u,f);c==null&&(c=or(e,ar(l,u),u,f)),c!=null&&(s[u]=c)}if(i&&Pe.call(i,n)){const f=i[n];for(u in f)Pe.call(f,u)&&!Pe.call(s,u)&&(s[u]=f[u])}return s}function or(e,t,n,r){return t?Array.isArray(r)?Hu(e,t,n,r):mi(e,t,n,r):void 0}function Hu(e,t,n,r){let i=-1;const o=[];for(;++i<r.length;){const l=mi(e,t,n,r[i]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function mi(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&qu(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(r))){i=!0;break}}else if(l===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function qu(e,t,n){const r=e.schema.protocols&&Pe.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),o=i.indexOf(":"),l=i.indexOf("?"),a=i.indexOf("#"),s=i.indexOf("/");if(o<0||s>-1&&o>s||l>-1&&o>l||a>-1&&o>a)return!0;let u=-1;for(;++u<r.length;){const f=r[u];if(o===f.length&&i.slice(0,f.length)===f)return!0}return!1}function at(e,t){const n=Mr(t);t.data&&(e.data=tt(t.data)),n&&(e.position=n)}function ar(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],o=typeof i=="string"?i:i[0];if(o===t)return i;o==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Uu(e){return function(t){return Ru(t,e)}}function sr(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function $u(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Vu(e,t,n){const i=bt((n||{}).ignore||[]),o=Ku(t);let l=-1;for(;++l<o.length;)ci(e,"text",a);function a(u,f){let c=-1,p;for(;++c<f.length;){const h=f[c],g=p?p.children:void 0;if(i(h,g?g.indexOf(h):void 0,p))return;p=h}if(p)return s(u,f)}function s(u,f){const c=f[f.length-1],p=o[l][0],h=o[l][1];let g=0;const k=c.children.indexOf(u);let x=!1,I=[];p.lastIndex=0;let E=p.exec(u.value);for(;E;){const P=E.index,z={index:E.index,input:E.input,stack:[...f,u]};let b=h(...E,z);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?p.lastIndex=P+1:(g!==P&&I.push({type:"text",value:u.value.slice(g,P)}),Array.isArray(b)?I.push(...b):b&&I.push(b),g=P+E[0].length,x=!0),!p.global)break;E=p.exec(u.value)}return x?(g<u.value.length&&I.push({type:"text",value:u.value.slice(g)}),c.children.splice(k,1,...I)):I=[u],k+I.length}}function Ku(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Wu(i[0]),Qu(i[1])])}return t}function Wu(e){return typeof e=="string"?new RegExp($u(e),"g"):e}function Qu(e){return typeof e=="function"?e:function(){return e}}const Ft="phrasing",Ot=["autolink","link","image","label"];function Yu(){return{transforms:[nc],enter:{literalAutolink:Gu,literalAutolinkEmail:jt,literalAutolinkHttp:jt,literalAutolinkWww:jt},exit:{literalAutolink:tc,literalAutolinkEmail:ec,literalAutolinkHttp:Ju,literalAutolinkWww:Zu}}}function Xu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ft,notInConstruct:Ot},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ft,notInConstruct:Ot},{character:":",before:"[ps]",after:"\\/",inConstruct:Ft,notInConstruct:Ot}]}}function Gu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function jt(e){this.config.enter.autolinkProtocol.call(this,e)}function Ju(e){this.config.exit.autolinkProtocol.call(this,e)}function Zu(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function ec(e){this.config.exit.autolinkEmail.call(this,e)}function tc(e){this.exit(e)}function nc(e){Vu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rc],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ic]],{ignore:["link","linkReference"]})}function rc(e,t,n,r,i){let o="";if(!di(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!lc(n)))return!1;const l=oc(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function ic(e,t,n,r){return!di(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function lc(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function oc(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=sr(e,"(");let o=sr(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function di(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Re(n)||xt(n))&&(!t||n!==47)}gi.peek=dc;function ac(){this.buffer()}function sc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function uc(){this.buffer()}function cc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ke(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hc(e){this.exit(e)}function pc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ke(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mc(e){this.exit(e)}function dc(){return"["}function gi(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function gc(){return{enter:{gfmFootnoteCallString:ac,gfmFootnoteCall:sc,gfmFootnoteDefinitionLabelString:uc,gfmFootnoteDefinition:cc},exit:{gfmFootnoteCallString:fc,gfmFootnoteCall:hc,gfmFootnoteDefinitionLabelString:pc,gfmFootnoteDefinition:mc}}}function xc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:gi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let s=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return s+=a.move(o.safe(o.associationId(r),{before:s,after:"]"})),f(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((t?`
15
- `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?xi:yc))),u(),s}}function yc(e,t,n){return t===0?e:xi(e,t,n)}function xi(e,t,n){return(n?"":" ")+e}const kc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yi.peek=Ec;function bc(){return{canContainEols:["delete"],enter:{strikethrough:Sc},exit:{strikethrough:Cc}}}function wc(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:kc}],handlers:{delete:yi}}}function Sc(e){this.enter({type:"delete",children:[]},e)}function Cc(e){this.exit(e)}function yi(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function Ec(){return"~"}function Ic(e){return e.length}function Ac(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ic,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const S=[],k=[];let x=-1;for(e[f].length>u&&(u=e[f].length);++x<e[f].length;){const I=vc(e[f][x]);if(n.alignDelimiters!==!1){const E=i(I);k[x]=E,(s[x]===void 0||E>s[x])&&(s[x]=E)}S.push(I)}l[f]=S,a[f]=k}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=ur(r[c]);else{const S=ur(r);for(;++c<u;)o[c]=S}c=-1;const p=[],h=[];for(;++c<u;){const S=o[c];let k="",x="";S===99?(k=":",x=":"):S===108?k=":":S===114&&(x=":");let I=n.alignDelimiters===!1?1:Math.max(1,s[c]-k.length-x.length);const E=k+"-".repeat(I)+x;n.alignDelimiters!==!1&&(I=k.length+I+x.length,I>s[c]&&(s[c]=I),h[c]=I),p[c]=E}l.splice(1,0,p),a.splice(1,0,h),f=-1;const g=[];for(;++f<l.length;){const S=l[f],k=a[f];c=-1;const x=[];for(;++c<u;){const I=S[c]||"";let E="",P="";if(n.alignDelimiters!==!1){const z=s[c]-(k[c]||0),b=o[c];b===114?E=" ".repeat(z):b===99?z%2?(E=" ".repeat(z/2+.5),P=" ".repeat(z/2-.5)):(E=" ".repeat(z/2),P=E):P=" ".repeat(z)}n.delimiterStart!==!1&&!c&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||c)&&x.push(" "),n.alignDelimiters!==!1&&x.push(E),x.push(I),n.alignDelimiters!==!1&&x.push(P),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&x.push("|")}g.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return g.join(`
16
- `)}function vc(e){return e==null?"":String(e)}function ur(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Tc(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),Pc);return i(),l}function Pc(e,t,n){return">"+(n?"":" ")+e}function Dc(e,t){return cr(e,t.inConstruct,!0)&&!cr(e,t.notInConstruct,!1)}function cr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function fr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
- `&&Dc(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
- `}function Lc(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function Nc(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function zc(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Rc(e,t,n,r){const i=zc(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(Nc(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(o,Fc);return c(),p}const a=n.createTracker(r),s=i.repeat(Math.max(Lc(o,i)+1,3)),u=n.enter("codeFenced");let f=a.move(s);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
19
- `,encode:["`"],...a.current()})),c()}return f+=a.move(`
20
- `),o&&(f+=a.move(o+`
21
- `)),f+=a.move(s),u(),f}function Fc(e,t,n){return(n?"":" ")+e}function dn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Oc(e,t,n,r){const i=dn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("[");return u+=s.move(n.safe(n.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":`
22
- `,...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),l(),u}function jc(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function nt(e){return"&#x"+e.toString(16).toUpperCase()+";"}function gt(e,t,n){const r=qe(e),i=qe(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ki.peek=_c;function ki(e,t,n,r){const i=jc(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=gt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=nt(u)+s.slice(1));const c=s.charCodeAt(s.length-1),p=gt(r.after.charCodeAt(0),c,i);p.inside&&(s=s.slice(0,-1)+nt(c));const h=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+s+h}function _c(e,t,n){return n.options.emphasis||"*"}function Mc(e,t){let n=!1;return pn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Wt}),!!((!e.depth||e.depth<3)&&on(e)&&(t.options.setext||n))}function Bc(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Mc(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
23
- `,after:`
24
- `});return c(),f(),p+`
25
- `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
26
- `))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),s=n.enter("phrasing");o.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
27
- `,...o.current()});return/^[\t ]/.test(u)&&(u=nt(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),s(),a(),u}bi.peek=Hc;function bi(e){return e.value||""}function Hc(){return"<"}wi.peek=qc;function wi(e,t,n,r){const i=dn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("![");return u+=s.move(n.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function qc(){return"!"}Si.peek=Uc;function Si(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("![");const u=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Uc(){return"!"}Ci.peek=$c;function Ci(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.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 i+r+i}function $c(){return"`"}function Ei(e,t){const n=on(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ii.peek=Vc;function Ii(e,t,n,r){const i=dn(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,s;if(Ei(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),s=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function Vc(e,t,n){return Ei(e,n)?"<":"["}Ai.peek=Kc;function Ai(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("[");const u=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Kc(){return"["}function gn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Wc(e){const t=gn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Qc(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function vi(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Yc(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?Qc(n):gn(n);const a=e.ordered?l==="."?")":".":Wc(n);let s=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),vi(n)===l&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),u}function Xc(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Gc(e,t,n,r){const i=Xc(n);let o=n.bulletCurrent||gn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),f);return s(),u;function f(c,p,h){return p?(h?"":" ".repeat(l))+c:(h?o:o+" ".repeat(l-o.length))+c}}function Jc(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const Zc=bt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ef(e,t,n,r){return(e.children.some(function(l){return Zc(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function tf(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ti.peek=nf;function Ti(e,t,n,r){const i=tf(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=gt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=nt(u)+s.slice(1));const c=s.charCodeAt(s.length-1),p=gt(r.after.charCodeAt(0),c,i);p.inside&&(s=s.slice(0,-1)+nt(c));const h=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+s+h}function nf(e,t,n){return n.options.strong||"*"}function rf(e,t,n,r){return n.safe(e.value,r)}function lf(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function of(e,t,n){const r=(vi(n)+(n.options.ruleSpaces?" ":"")).repeat(lf(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Pi={blockquote:Tc,break:fr,code:Rc,definition:Oc,emphasis:ki,hardBreak:fr,heading:Bc,html:bi,image:wi,imageReference:Si,inlineCode:Ci,link:Ii,linkReference:Ai,list:Yc,listItem:Gc,paragraph:Jc,root:ef,strong:Ti,text:rf,thematicBreak:of};function af(){return{enter:{table:sf,tableData:hr,tableHeader:hr,tableRow:cf},exit:{codeText:ff,table:uf,tableData:_t,tableHeader:_t,tableRow:_t}}}function sf(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function uf(e){this.exit(e),this.data.inTable=void 0}function cf(e){this.enter({type:"tableRow",children:[]},e)}function _t(e){this.exit(e)}function hr(e){this.enter({type:"tableCell",children:[]},e)}function ff(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,hf));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function hf(e,t){return t==="|"?t:e}function pf(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:s,tableRow:a}};function l(h,g,S,k){return u(f(h,S,k),h.align)}function a(h,g,S,k){const x=c(h,S,k),I=u([x]);return I.slice(0,I.indexOf(`
29
- `))}function s(h,g,S,k){const x=S.enter("tableCell"),I=S.enter("phrasing"),E=S.containerPhrasing(h,{...k,before:o,after:o});return I(),x(),E}function u(h,g){return Ac(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(h,g,S){const k=h.children;let x=-1;const I=[],E=g.enter("table");for(;++x<k.length;)I[x]=c(k[x],g,S);return E(),I}function c(h,g,S){const k=h.children;let x=-1;const I=[],E=g.enter("tableRow");for(;++x<k.length;)I[x]=s(k[x],h,g,S);return E(),I}function p(h,g,S){let k=Pi.inlineCode(h,g,S);return S.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function mf(){return{exit:{taskListCheckValueChecked:pr,taskListCheckValueUnchecked:pr,paragraph:gf}}}function df(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:xf}}}function pr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function gf(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function xf(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=Pi.listItem(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function yf(){return[Yu(),gc(),bc(),af(),mf()]}function kf(e){return{extensions:[Xu(),xc(e),wc(),pf(e),df()]}}const bf={tokenize:Af,partial:!0},Di={tokenize:vf,partial:!0},Li={tokenize:Tf,partial:!0},Ni={tokenize:Pf,partial:!0},wf={tokenize:Df,partial:!0},zi={name:"wwwAutolink",tokenize:Ef,previous:Fi},Ri={name:"protocolAutolink",tokenize:If,previous:Oi},Ie={name:"emailAutolink",tokenize:Cf,previous:ji},we={};function Sf(){return{text:we}}let ze=48;for(;ze<123;)we[ze]=Ie,ze++,ze===58?ze=65:ze===91&&(ze=97);we[43]=Ie;we[45]=Ie;we[46]=Ie;we[95]=Ie;we[72]=[Ie,Ri];we[104]=[Ie,Ri];we[87]=[Ie,zi];we[119]=[Ie,zi];function Cf(e,t,n){const r=this;let i,o;return l;function l(c){return!Gt(c)||!ji.call(r,r.previous)||xn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return Gt(c)?(e.consume(c),a):c===64?(e.consume(c),s):n(c)}function s(c){return c===46?e.check(wf,f,u)(c):c===45||c===95||te(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&re(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function Ef(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Fi.call(r,r.previous)||xn(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(bf,e.attempt(Di,e.attempt(Li,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function If(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Oi.call(r,r.previous)&&!xn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(re(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),s}return n(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):n(c)}function u(c){return c===null||mt(c)||Y(c)||Re(c)||xt(c)?n(c):e.attempt(Di,e.attempt(Li,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Af(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function vf(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(Ni,s,a)(u):u===null||Y(u)||Re(u)||u!==45&&xt(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?n(u):t(u)}}function Tf(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Ni,t,o)(l):l===null||Y(l)||Re(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function Pf(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||Y(a)||Re(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||Y(a)||Re(a)?t(a):r(a)}function o(a){return re(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):re(a)?(e.consume(a),l):n(a)}}function Df(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return te(o)?n(o):t(o)}}function Fi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Y(e)}function Oi(e){return!re(e)}function ji(e){return!(e===47||Gt(e))}function Gt(e){return e===43||e===45||e===46||e===95||te(e)}function xn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Lf={tokenize:Mf,partial:!0};function Nf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Of,continuation:{tokenize:jf},exit:_f}},text:{91:{name:"gfmFootnoteCall",tokenize:Ff},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:zf,resolveTo:Rf}}}}function zf(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][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 n(s);const u=ke(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Rf(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Ff(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||Y(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ke(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Y(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function Of(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||Y(g))return n(g);if(g===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return o=ke(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Y(g)||(a=!0),l++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),V(e,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return t(g)}}function jf(e,t,n){return e.check(lt,t,e.attempt(Lf,t,n))}function _f(e){e.exit("gfmFootnoteDefinition")}function Mf(e,t,n){const r=this;return V(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function Bf(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},p=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&he(p,p.length,0,yt(h,l.slice(u+1,s),a)),he(p,p.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),he(l,u-1,s-u+3,p),s=u+p.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return p;function p(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(l.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const S=qe(u);if(g===126)return c>1?s(g):(l.consume(g),c++,h);if(c<2&&!n)return s(g);const k=l.exit("strikethroughSequenceTemporary"),x=qe(g);return k._open=!x||x===2&&!!S,k._close=!S||S===2&&!!x,a(g)}}}class Hf{constructor(){this.map=[]}add(t,n,r){qf(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function qf(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Uf(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function $f(){return{flow:{null:{name:"table",tokenize:Vf,resolveAll:Kf}}}}function Vf(e,t,n){const r=this;let i=0,o=0,l;return a;function a(y){let D=r.events.length-1;for(;D>-1;){const N=r.events[D][1].type;if(N==="lineEnding"||N==="linePrefix")D--;else break}const L=D>-1?r.events[D][1].type:null,K=L==="tableHead"||L==="tableRow"?b:s;return K===b&&r.parser.lazy[r.now().line]?n(y):K(y)}function s(y){return e.enter("tableHead"),e.enter("tableRow"),u(y)}function u(y){return y===124||(l=!0,o+=1),f(y)}function f(y){return y===null?n(y):R(y)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):n(y):q(y)?V(e,f,"whitespace")(y):(o+=1,l&&(l=!1,i+=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||Y(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?p:c)}function p(y){return y===92||y===124?(e.consume(y),c):c(y)}function h(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(y):(e.enter("tableDelimiterRow"),l=!1,q(y)?V(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):g(y))}function g(y){return y===45||y===58?k(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),S):z(y)}function S(y){return q(y)?V(e,k,"whitespace")(y):k(y)}function k(y){return y===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),x):y===45?(o+=1,x(y)):y===null||R(y)?P(y):z(y)}function x(y){return y===45?(e.enter("tableDelimiterFiller"),I(y)):z(y)}function I(y){return y===45?(e.consume(y),I):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(y))}function E(y){return q(y)?V(e,P,"whitespace")(y):P(y)}function P(y){return y===124?g(y):y===null||R(y)?!l||i!==o?z(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(y)):z(y)}function z(y){return n(y)}function b(y){return e.enter("tableRow"),H(y)}function H(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),H):y===null||R(y)?(e.exit("tableRow"),t(y)):q(y)?V(e,H,"whitespace")(y):(e.enter("data"),_(y))}function _(y){return y===null||y===124||Y(y)?(e.exit("data"),H(y)):(e.consume(y),y===92?$:_)}function $(y){return y===92||y===124?(e.consume(y),_):_(y)}}function Kf(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const p=new Hf;for(;++n<e.length;){const h=e[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(mr(p,t,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=ht(p,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=ht(p,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):g.type==="tableHead"?(a=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,o[1]!==0?(l[0]=l[1],c=ht(p,t,o,i,n,c)):l[1]!==0&&(c=ht(p,t,l,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=n)}for(s!==0&&mr(p,t,s,u,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Uf(t.events,n))}return e}function ht(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Me(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Me(t.events,n[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Me(t.events,n[2]),f=Me(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,S=n[3]-n[2]-1;e.add(g,S,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Me(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function mr(e,t,n,r,i){const o=[],l=Me(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Me(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Wf={name:"tasklistCheck",tokenize:Yf};function Qf(){return{text:{91:Wf}}}function Yf(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return Y(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):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return R(s)?t(s):q(s)?e.check({tokenize:Xf},t,n)(s):n(s)}}function Xf(e,t,n){return V(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Gf(e){return Vr([Sf(),Nf(),Bf(e),$f(),Qf()])}const Jf={};function Zf(e){const t=this,n=e||Jf,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Gf(n)),o.push(yf()),l.push(kf(n))}const dr=14e4,gr=220;function eh(e){return e.length<=dr?e:`${e.slice(0,dr)}
30
-
31
- …`}function th(e){return e==="user"?B("chatRoleUser"):e==="assistant"?B("chatRoleAssistant"):e==="tool"?B("chatRoleTool"):e==="system"?B("chatRoleSystem"):B("chatRoleMessage")}function nh(e){const t=e.toLowerCase();return t.includes("exec")||t.includes("shell")||t.includes("command")?w.jsx(Gi,{className:"h-3.5 w-3.5"}):t.includes("search")?w.jsx(kr,{className:"h-3.5 w-3.5"}):t.includes("fetch")||t.includes("http")||t.includes("web")?w.jsx(Ji,{className:"h-3.5 w-3.5"}):t.includes("read")||t.includes("file")?w.jsx(Zi,{className:"h-3.5 w-3.5"}):t.includes("message")||t.includes("send")?w.jsx(el,{className:"h-3.5 w-3.5"}):t.includes("cron")||t.includes("schedule")?w.jsx(tl,{className:"h-3.5 w-3.5"}):w.jsx(Er,{className:"h-3.5 w-3.5"})}function Mt({role:e}){return e==="user"?w.jsx("div",{className:"h-8 w-8 rounded-full bg-primary text-white flex items-center justify-center shadow-sm",children:w.jsx(Yi,{className:"h-4 w-4"})}):e==="assistant"?w.jsx("div",{className:"h-8 w-8 rounded-full bg-slate-900 text-white flex items-center justify-center shadow-sm",children:w.jsx(Xi,{className:"h-4 w-4"})}):w.jsx("div",{className:"h-8 w-8 rounded-full bg-amber-100 text-amber-700 flex items-center justify-center shadow-sm",children:w.jsx(Er,{className:"h-4 w-4"})})}function _i({text:e,role:t}){const n=t==="user";return w.jsx("div",{className:ge("chat-markdown",n?"chat-markdown-user":"chat-markdown-assistant"),children:w.jsx(Pu,{remarkPlugins:[Zf],rehypePlugins:[Uu],components:{a:({...r})=>w.jsx("a",{...r,target:"_blank",rel:"noreferrer noopener"})},children:eh(e)})})}function Mi({card:e}){var l;const t=e.kind==="call"?B("chatToolCall"):B("chatToolResult"),n=((l=e.text)==null?void 0:l.trim())??"",r=n.length>gr||n.includes(`
32
- `),i=r?`${n.slice(0,gr)}…`:n,o=e.kind==="result"||e.hasResult;return w.jsxs("div",{className:"rounded-xl border border-amber-200/80 bg-amber-50/60 px-3 py-2.5",children:[w.jsxs("div",{className:"flex items-center gap-2 text-xs text-amber-800 font-semibold",children:[nh(e.name),w.jsx("span",{children:t}),w.jsx("span",{className:"font-mono text-[11px] text-amber-900/80",children:e.name})]}),e.detail&&w.jsx("div",{className:"mt-1 text-[11px] text-amber-800/90 font-mono break-words",children:e.detail}),o&&w.jsx("div",{className:"mt-2",children:n?r?w.jsxs("details",{className:"group",children:[w.jsx("summary",{className:"cursor-pointer text-[11px] text-amber-700",children:B("chatToolOutput")}),w.jsx("pre",{className:"mt-2 rounded-lg border border-amber-200 bg-amber-100/40 p-2 text-[11px] whitespace-pre-wrap break-words text-amber-900",children:n})]}):w.jsx("pre",{className:"rounded-lg border border-amber-200 bg-amber-100/40 p-2 text-[11px] whitespace-pre-wrap break-words text-amber-900",children:i}):w.jsx("div",{className:"text-[11px] text-amber-700/80",children:B("chatToolNoOutput")})})]})}function Bi({reasoning:e,isUser:t}){return w.jsxs("details",{className:"mt-3",children:[w.jsx("summary",{className:ge("cursor-pointer text-xs",t?"text-primary-100":"text-gray-500"),children:B("chatReasoning")}),w.jsx("pre",{className:ge("mt-2 text-[11px] whitespace-pre-wrap break-words rounded-lg p-2",t?"bg-primary-700/60":"bg-gray-100"),children:e})]})}function rh({message:e}){const t=ml(e),n=dl(e.content).trim(),r=typeof e.reasoning_content=="string"?e.reasoning_content.trim():"",i=gl(e),o=t==="user",l=!!n&&!(t==="tool"&&i.length>0);return w.jsxs("div",{className:ge("rounded-2xl border px-4 py-3 shadow-sm",o?"bg-primary text-white border-primary":t==="assistant"?"bg-white text-gray-900 border-gray-200":"bg-orange-50/70 text-gray-900 border-orange-200/80"),children:[l&&w.jsx(_i,{text:n,role:t}),r&&w.jsx(Bi,{reasoning:r,isUser:o}),i.length>0&&w.jsx("div",{className:ge("space-y-2",(l||r)&&"mt-3"),children:i.map((a,s)=>w.jsx(Mi,{card:a},`${a.kind}-${a.name}-${a.callId??s}`))})]})}function ih({item:e}){return w.jsx("div",{className:"rounded-2xl border px-4 py-3 shadow-sm bg-white text-gray-900 border-gray-200",children:w.jsx("div",{className:"space-y-3",children:e.segments.map((t,n)=>{if(t.kind==="assistant_message"){const r=!!t.text,i=!!t.reasoning;return!r&&!i?null:w.jsxs("div",{children:[r&&w.jsx(_i,{text:t.text,role:"assistant"}),i&&w.jsx(Bi,{reasoning:t.reasoning,isUser:!1})]},`${t.key}-${n}`)}return w.jsx(Mi,{card:t.card},`${t.key}-${n}`)})})})}function lh({events:e,isSending:t,className:n}){const r=M.useMemo(()=>pl(e),[e]);return w.jsxs("div",{className:ge("space-y-5",n),children:[r.map(i=>{const o=i.kind==="assistant_turn"?"assistant":i.role,l=o==="user";return w.jsxs("div",{className:ge("flex gap-3",l?"justify-end":"justify-start"),children:[!l&&w.jsx(Mt,{role:o}),w.jsxs("div",{className:ge("max-w-[88%] min-w-[280px] space-y-2",l&&"flex flex-col items-end"),children:[i.kind==="assistant_turn"?w.jsx(ih,{item:i}):w.jsx(rh,{message:i.message}),w.jsxs("div",{className:ge("text-[11px] px-1",l?"text-primary-300":"text-gray-400"),children:[th(o)," · ",Pr(i.timestamp)]})]}),l&&w.jsx(Mt,{role:o})]},i.key)}),t&&w.jsxs("div",{className:"flex gap-3 justify-start",children:[w.jsx(Mt,{role:"assistant"}),w.jsx("div",{className:"rounded-2xl border border-gray-200 bg-white px-4 py-3 text-sm text-gray-500 shadow-sm",children:B("chatTyping")})]})]})}function oh({agentOptions:e,selectedAgentId:t,onSelectedAgentIdChange:n,selectedSessionKey:r,canDeleteSession:i,isDeletePending:o,onDeleteSession:l,threadRef:a,onThreadScroll:s,isHistoryLoading:u,mergedEvents:f,isSending:c,isAwaitingAssistantOutput:p,streamingAssistantText:h,draft:g,onDraftChange:S,onSend:k,queuedCount:x}){const I=u&&f.length===0&&!c&&!p&&!h.trim();return w.jsxs("section",{className:"flex-1 min-h-0 rounded-2xl border border-gray-200 bg-gradient-to-b from-gray-50/60 to-white shadow-card flex flex-col overflow-hidden",children:[w.jsx("div",{className:"px-5 py-4 border-b border-gray-200/80 bg-white/80 backdrop-blur-sm",children:w.jsxs("div",{className:"grid gap-3 lg:grid-cols-[minmax(220px,300px)_minmax(0,1fr)_auto] items-end",children:[w.jsxs("div",{className:"min-w-0",children:[w.jsx("div",{className:"text-[11px] text-gray-500 mb-1",children:B("chatAgentLabel")}),w.jsxs(Ir,{value:t,onValueChange:n,children:[w.jsx(Ar,{className:"h-9 rounded-lg",children:w.jsx(vr,{placeholder:B("chatSelectAgent")})}),w.jsx(Tr,{children:e.map(E=>w.jsx(Bt,{value:E,children:E},E))})]})]}),w.jsxs("div",{className:"min-w-0",children:[w.jsx("div",{className:"text-[11px] text-gray-500 mb-1",children:B("chatSessionLabel")}),w.jsx("div",{className:"h-9 rounded-lg border border-gray-200 bg-white px-3 text-xs text-gray-600 flex items-center truncate",children:r??B("chatNoSession")})]}),w.jsxs(He,{variant:"outline",className:"rounded-lg",onClick:l,disabled:!i||o,children:[w.jsx(nl,{className:"h-3.5 w-3.5 mr-1.5"}),B("chatDeleteSession")]})]})}),w.jsx("div",{ref:a,onScroll:s,className:"flex-1 min-h-0 overflow-y-auto custom-scrollbar px-5 py-5",children:r?I?w.jsx("div",{className:"text-sm text-gray-500",children:B("chatHistoryLoading")}):f.length===0?w.jsx("div",{className:"text-sm text-gray-500",children:B("chatNoMessages")}):w.jsx(lh,{events:f,isSending:c&&p}):w.jsx("div",{className:"h-full flex items-center justify-center",children:w.jsxs("div",{className:"text-center text-gray-500",children:[w.jsx(Sr,{className:"h-8 w-8 mx-auto mb-2 text-gray-300"}),w.jsx("div",{className:"text-sm font-medium",children:B("chatNoSession")}),w.jsx("div",{className:"text-xs mt-1",children:B("chatNoSessionHint")})]})})}),w.jsx("div",{className:"border-t border-gray-200 bg-white p-4",children:w.jsxs("div",{className:"rounded-xl border border-gray-200 bg-white p-2",children:[w.jsx("textarea",{value:g,onChange:E=>S(E.target.value),onKeyDown:E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),k())},placeholder:B("chatInputPlaceholder"),className:"w-full min-h-[68px] max-h-[220px] resize-y bg-transparent outline-none text-sm px-2 py-1.5 text-gray-800 placeholder:text-gray-400"}),w.jsxs("div",{className:"flex items-center justify-between px-2 pb-1",children:[w.jsx("div",{className:"text-[11px] text-gray-400",children:c&&x>0?`${B("chatQueuedHintPrefix")} ${x} ${B("chatQueuedHintSuffix")}`:B("chatInputHint")}),w.jsxs(He,{size:"sm",className:"rounded-lg",onClick:()=>void k(),disabled:g.trim().length===0,children:[w.jsx(rl,{className:"h-3.5 w-3.5 mr-1.5"}),c?B("chatQueueSend"):B("chatSend")]})]})]})})]})}function Hi(e){e.setIsSending(!1),e.setOptimisticUserEvent(null),e.setStreamingSessionEvents([]),e.setStreamingAssistantText(""),e.setStreamingAssistantTimestamp(null),e.setIsAwaitingAssistantOutput(!1)}async function ah(e){const{item:t,runId:n,runIdRef:r,nextOptimisticUserSeq:i,selectedSessionKeyRef:o,setSelectedSessionKey:l,setDraft:a,refetchSessions:s,refetchHistory:u,restoreDraftOnError:f,setters:c}=e;c.setStreamingSessionEvents([]),c.setStreamingAssistantText(""),c.setStreamingAssistantTimestamp(null),c.setOptimisticUserEvent({seq:i,type:"message.user.optimistic",timestamp:new Date().toISOString(),message:{role:"user",content:t.message,timestamp:new Date().toISOString()}}),c.setIsSending(!0),c.setIsAwaitingAssistantOutput(!0);try{let p="";const h=new Date().toISOString();c.setStreamingAssistantTimestamp(h);const g=await ll({message:t.message,sessionKey:t.sessionKey,agentId:t.agentId,channel:"ui",chatId:"web-ui"},{onReady:k=>{n===r.current&&k.sessionKey&&l(x=>x===k.sessionKey?x:k.sessionKey)},onDelta:k=>{n===r.current&&(p+=k.delta,c.setStreamingAssistantText(p),c.setIsAwaitingAssistantOutput(!1))},onSessionEvent:k=>{var x,I;n===r.current&&(((x=k.data.message)==null?void 0:x.role)==="user"&&c.setOptimisticUserEvent(null),c.setStreamingSessionEvents(E=>{const P=[...E],z=P.findIndex(b=>b.seq===k.data.seq);return z>=0?P[z]=k.data:P.push(k.data),P}),((I=k.data.message)==null?void 0:I.role)==="assistant"&&(p="",c.setStreamingAssistantText(""),c.setIsAwaitingAssistantOutput(!1)))}});if(n!==r.current)return;c.setOptimisticUserEvent(null),g.sessionKey!==t.sessionKey&&l(g.sessionKey),await s();const S=o.current;(!S||S===t.sessionKey||S===g.sessionKey)&&await u(),c.setStreamingSessionEvents([]),c.setStreamingAssistantText(""),c.setStreamingAssistantTimestamp(null),c.setIsAwaitingAssistantOutput(!1),c.setIsSending(!1)}catch{if(n!==r.current)return;r.current+=1,Hi(c),f&&a(p=>p.trim().length===0?t.message:p)}}function sh(e){const[t,n]=M.useState(null),[r,i]=M.useState([]),[o,l]=M.useState(""),[a,s]=M.useState(null),[u,f]=M.useState(!1),[c,p]=M.useState(!1),[h,g]=M.useState([]),S=M.useRef(0),k=M.useRef(0),x=M.useCallback(()=>{S.current+=1,g([]),Hi({setOptimisticUserEvent:n,setStreamingSessionEvents:i,setStreamingAssistantText:l,setStreamingAssistantTimestamp:s,setIsSending:f,setIsAwaitingAssistantOutput:p})},[]);M.useEffect(()=>()=>{S.current+=1},[]);const I=M.useCallback(async(P,z)=>{S.current+=1,await ah({item:P,runId:S.current,runIdRef:S,nextOptimisticUserSeq:e.nextOptimisticUserSeq,selectedSessionKeyRef:e.selectedSessionKeyRef,setSelectedSessionKey:e.setSelectedSessionKey,setDraft:e.setDraft,refetchSessions:e.refetchSessions,refetchHistory:e.refetchHistory,restoreDraftOnError:z==null?void 0:z.restoreDraftOnError,setters:{setOptimisticUserEvent:n,setStreamingSessionEvents:i,setStreamingAssistantText:l,setStreamingAssistantTimestamp:s,setIsSending:f,setIsAwaitingAssistantOutput:p}})},[e]);M.useEffect(()=>{if(u||h.length===0)return;const[P,...z]=h;g(z),I(P,{restoreDraftOnError:!0})},[u,h,I]);const E=M.useCallback(async P=>{k.current+=1;const z={id:k.current,message:P.message,sessionKey:P.sessionKey,agentId:P.agentId};if(u){g(b=>[...b,z]);return}await I(z,{restoreDraftOnError:P.restoreDraftOnError})},[u,I]);return{optimisticUserEvent:t,streamingSessionEvents:r,streamingAssistantText:o,streamingAssistantTimestamp:a,isSending:u,isAwaitingAssistantOutput:c,queuedCount:h.length,sendMessage:E,resetStreamState:x}}const Jt="nextclaw.ui.chat.activeSession",rt="__unknown_channel__";function uh(){if(typeof window>"u")return null;try{const e=window.localStorage.getItem(Jt);return e&&e.trim().length>0?e:null}catch{return null}}function ch(e){if(!(typeof window>"u"))try{if(!e){window.localStorage.removeItem(Jt);return}window.localStorage.setItem(Jt,e)}catch{}}function fh(e){var r;const t=/^agent:([^:]+):/i.exec(e.trim());if(!t)return null;const n=(r=t[1])==null?void 0:r.trim();return n||null}function xr(e){const t=Math.random().toString(36).slice(2,8);return`agent:${e}:ui:direct:web-${Date.now().toString(36)}${t}`}function hh(e){if(e.label&&e.label.trim())return e.label.trim();const t=e.key.split(":");return t[t.length-1]||e.key}function yr(e){const t=e.indexOf(":");return t<=0?rt:e.slice(0,t).trim()||rt}function ph(e){return e===rt?B("sessionsUnknownChannel"):e}function bh(){var Ae,xe;const[e,t]=M.useState(""),[n,r]=M.useState("all"),[i,o]=M.useState(""),[l,a]=M.useState(()=>uh()),[s,u]=M.useState("main"),{confirm:f,ConfirmDialog:c}=cl(),p=M.useRef(null),h=M.useRef(!1),g=M.useRef(l),S=ol(),k=al({q:e.trim()||void 0,limit:120,activeMinutes:0}),x=sl(l,300),I=ul(),E=M.useMemo(()=>{var ue;const F=((ue=S.data)==null?void 0:ue.agents.list)??[],G=new Set(["main"]);for(const ve of F)typeof ve.id=="string"&&ve.id.trim().length>0&&G.add(ve.id.trim().toLowerCase());return Array.from(G)},[(Ae=S.data)==null?void 0:Ae.agents.list]),P=M.useMemo(()=>{var F;return((F=k.data)==null?void 0:F.sessions)??[]},[(xe=k.data)==null?void 0:xe.sessions]),z=M.useMemo(()=>{const F=new Set;for(const G of P)F.add(yr(G.key));return Array.from(F).sort((G,ue)=>G===rt?1:ue===rt?-1:G.localeCompare(ue))},[P]),b=M.useMemo(()=>n==="all"?P:P.filter(F=>yr(F.key)===n),[n,P]),H=M.useMemo(()=>P.find(F=>F.key===l)??null,[l,P]),_=x.data,$=(_==null?void 0:_.messages)??[],y=_!=null&&_.events&&_.events.length>0?_.events:xl($),D=M.useMemo(()=>y.reduce((F,G)=>Number.isFinite(G.seq)?Math.max(F,G.seq):F,0)+1,[y]),{optimisticUserEvent:L,streamingSessionEvents:K,streamingAssistantText:N,streamingAssistantTimestamp:T,isSending:W,isAwaitingAssistantOutput:J,queuedCount:se,sendMessage:pe,resetStreamState:m}=sh({nextOptimisticUserSeq:D,selectedSessionKeyRef:g,setSelectedSessionKey:a,setDraft:o,refetchSessions:k.refetch,refetchHistory:x.refetch}),ie=M.useMemo(()=>{const F=[...y];if(L&&F.push(L),F.push(...K),N.trim()){const G=F.reduce((ue,ve)=>{const st=Number.isFinite(ve.seq)?ve.seq:0;return st>ue?st:ue},0);F.push({seq:G+1,type:"stream.assistant_delta",timestamp:T??new Date().toISOString(),message:{role:"assistant",content:N,timestamp:T??new Date().toISOString()}})}return F},[y,L,N,T,K]);M.useEffect(()=>{!l&&b.length>0&&a(b[0].key)},[b,l]),M.useEffect(()=>{ch(l)},[l]),M.useEffect(()=>{const F=l?fh(l):null;F&&s!==F&&u(F)},[s,l]),M.useEffect(()=>{g.current=l,h.current=!1},[l]);const me=M.useCallback(()=>{const F=p.current;return F?F.scrollHeight-F.scrollTop-F.clientHeight<50:!0},[]),d=M.useCallback(()=>{me()?h.current=!1:h.current=!0},[me]);M.useEffect(()=>{const F=p.current;!F||h.current||(F.scrollTop=F.scrollHeight)},[ie,W]);const le=M.useCallback(()=>{m();const F=xr(s);a(F)},[m,s]),Se=M.useCallback(async()=>{!l||!await f({title:B("chatDeleteSessionConfirm"),variant:"destructive",confirmLabel:B("delete")})||I.mutate({key:l},{onSuccess:async()=>{m(),a(null),await k.refetch()}})},[f,I,m,l,k]),ee=M.useCallback(async()=>{const F=i.trim();if(!F)return;const G=l??xr(s);l||a(G),o(""),await pe({message:F,sessionKey:G,agentId:s,restoreDraftOnError:!0})},[i,l,s,pe]);return w.jsxs(fl,{fullHeight:!0,children:[w.jsx(hl,{title:B("chatPageTitle"),description:B("chatPageDescription"),actions:w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsxs(He,{variant:"outline",size:"sm",onClick:()=>x.refetch(),className:"rounded-lg",children:[w.jsx(br,{className:ge("h-3.5 w-3.5 mr-1.5",x.isFetching&&"animate-spin")}),B("chatRefresh")]}),w.jsxs(He,{variant:"primary",size:"sm",onClick:le,className:"rounded-lg",children:[w.jsx(wr,{className:"h-3.5 w-3.5 mr-1.5"}),B("chatNewSession")]})]})}),w.jsxs("div",{className:"flex-1 min-h-0 flex gap-4 max-lg:flex-col",children:[w.jsx(yl,{query:e,onQueryChange:t,selectedChannel:n,onSelectedChannelChange:r,channelOptions:z,channelLabel:ph,isLoading:k.isLoading,isRefreshing:k.isFetching,sessions:b,selectedSessionKey:l,onSelectSession:a,sessionTitle:hh,onRefresh:()=>{k.refetch()},onCreateSession:le}),w.jsx(oh,{agentOptions:E,selectedAgentId:s,onSelectedAgentIdChange:u,selectedSessionKey:l,canDeleteSession:!!H,isDeletePending:I.isPending,onDeleteSession:()=>{Se()},threadRef:p,onThreadScroll:d,isHistoryLoading:x.isLoading,mergedEvents:ie,isSending:W,isAwaitingAssistantOutput:J,streamingAssistantText:N,draft:i,onDraftChange:o,onSend:ee,queuedCount:se})]}),w.jsx(c,{})]})}export{bh as ChatPage};
@@ -1 +0,0 @@
1
- import{r as x,j as e,W as j,A as D,an as L,ao as R,a7 as k}from"./vendor-Dh04PGww.js";import{u as E}from"./useConfirmDialog-BUKGHDL6.js";import{o as M,p as P,q as T,r as J,I as A}from"./useConfig-txxbxXnT.js";import{P as F,a as z,B as o}from"./page-layout-CUMMO0nN.js";import{c as p,t,S as q,a as B,b as I,d as Q,e as f,f as y}from"./index-BRBYYgR_.js";import{C as H,d as V}from"./card-D7NY0Szf.js";function g(s){return y(s??void 0)}function O(s){return typeof s!="number"||!Number.isFinite(s)?"-":y(new Date(s))}function W(s){if(typeof s!="number"||!Number.isFinite(s))return"-";const r=Math.round(s/1e3);if(r<60)return`${r}s`;const n=Math.round(r/60);if(n<60)return`${n}m`;const c=Math.round(n/60);return c<24?`${c}h`:`${Math.round(c/24)}d`}function G(s){const r=s.schedule;return r.kind==="cron"?r.expr?`cron ${r.expr}`:"cron":r.kind==="every"?`every ${W(r.everyMs)}`:r.kind==="at"?`at ${O(r.atMs)}`:"-"}function K(s){if(!s.payload.deliver)return"-";const r=s.payload.channel??"-",n=s.payload.to??"-";return`${r}:${n}`}function U(s,r){const n=r.trim().toLowerCase();return n?[s.id,s.name,s.payload.message,s.payload.channel??"",s.payload.to??""].join(" ").toLowerCase().includes(n):!0}function X(s,r){return r==="all"?!0:r==="enabled"?s.enabled:!s.enabled}function se(){var h;const[s,r]=x.useState(""),[n,c]=x.useState("all"),i=M({all:!0}),v=P(),N=T(),w=J(),{confirm:m,ConfirmDialog:C}=E(),u=x.useMemo(()=>{var l;return(((l=i.data)==null?void 0:l.jobs)??[]).filter(d=>U(d,s)).filter(d=>X(d,n))},[i.data,s,n]),b=async a=>{await m({title:`${t("cronDeleteConfirm")}?`,description:a.name?`${a.name} (${a.id})`:a.id,variant:"destructive",confirmLabel:t("delete")})&&v.mutate({id:a.id})},S=async a=>{const l=!a.enabled;await m({title:l?`${t("cronEnableConfirm")}?`:`${t("cronDisableConfirm")}?`,description:a.name?`${a.name} (${a.id})`:a.id,variant:l?"default":"destructive",confirmLabel:l?t("cronEnable"):t("cronDisable")})&&N.mutate({id:a.id,enabled:l})},$=async a=>{const l=!a.enabled;await m({title:l?`${t("cronRunForceConfirm")}?`:`${t("cronRunConfirm")}?`,description:a.name?`${a.name} (${a.id})`:a.id,confirmLabel:t("cronRunNow")})&&w.mutate({id:a.id,force:l})};return e.jsxs(F,{fullHeight:!0,children:[e.jsx(z,{title:t("cronPageTitle"),description:t("cronPageDescription"),actions:e.jsx(o,{variant:"ghost",size:"icon",className:"h-9 w-9 rounded-lg text-gray-400 hover:text-gray-700 hover:bg-gray-100",onClick:()=>i.refetch(),children:e.jsx(j,{className:p("h-4 w-4",i.isFetching&&"animate-spin")})})}),e.jsx("div",{className:"mb-6",children:e.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[e.jsxs("div",{className:"relative flex-1 min-w-[240px]",children:[e.jsx(A,{value:s,onChange:a=>r(a.target.value),placeholder:t("cronSearchPlaceholder"),className:"pl-9"}),e.jsx(D,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"})]}),e.jsx("div",{className:"min-w-[180px]",children:e.jsxs(q,{value:n,onValueChange:a=>c(a),children:[e.jsx(B,{className:"w-full",children:e.jsx(I,{placeholder:t("cronStatusLabel")})}),e.jsxs(Q,{children:[e.jsx(f,{value:"all",children:t("cronStatusAll")}),e.jsx(f,{value:"enabled",children:t("cronStatusEnabled")}),e.jsx(f,{value:"disabled",children:t("cronStatusDisabled")})]})]})}),e.jsxs("div",{className:"text-xs text-gray-500 ml-auto",children:[t("cronTotalLabel"),": ",((h=i.data)==null?void 0:h.total)??0," / ",u.length]})]})}),e.jsx("div",{className:"flex-1 overflow-auto custom-scrollbar",children:i.isLoading?e.jsx("div",{className:"text-sm text-gray-400 p-4 text-center",children:t("cronLoading")}):u.length===0?e.jsx("div",{className:"text-sm text-gray-400 p-4 text-center",children:t("cronEmpty")}):e.jsx("div",{className:"space-y-4",children:u.map(a=>e.jsx(H,{className:"border border-gray-200",children:e.jsx(V,{className:"pt-5 pb-5",children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-[220px] flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm font-semibold text-gray-900",children:a.name||a.id}),e.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full bg-gray-100 text-gray-500",children:a.id}),e.jsx("span",{className:p("text-[10px] font-semibold px-2 py-0.5 rounded-full",a.enabled?"bg-emerald-50 text-emerald-700":"bg-gray-100 text-gray-500"),children:a.enabled?t("enabled"):t("disabled")}),a.deleteAfterRun&&e.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full bg-amber-50 text-amber-700",children:t("cronOneShot")})]}),e.jsxs("div",{className:"mt-2 text-xs text-gray-500",children:[t("cronScheduleLabel"),": ",G(a)]}),e.jsx("div",{className:"mt-2 text-sm text-gray-700 whitespace-pre-wrap break-words",children:a.payload.message}),e.jsxs("div",{className:"mt-2 text-xs text-gray-500",children:[t("cronDeliverTo"),": ",K(a)]})]}),e.jsxs("div",{className:"min-w-[220px] text-xs text-gray-500 space-y-2",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"font-medium text-gray-700",children:[t("cronNextRun"),":"]})," ",g(a.state.nextRunAt)]}),e.jsxs("div",{children:[e.jsxs("span",{className:"font-medium text-gray-700",children:[t("cronLastRun"),":"]})," ",g(a.state.lastRunAt)]}),e.jsxs("div",{children:[e.jsxs("span",{className:"font-medium text-gray-700",children:[t("cronLastStatus"),":"]})," ",a.state.lastStatus??"-"]}),a.state.lastError&&e.jsx("div",{className:"text-[11px] text-red-500 break-words",children:a.state.lastError})]}),e.jsxs("div",{className:"flex items-start gap-2 flex-wrap justify-end",children:[e.jsxs(o,{variant:"subtle",size:"sm",onClick:()=>$(a),className:"gap-1",children:[e.jsx(L,{className:"h-3.5 w-3.5"}),t("cronRunNow")]}),e.jsxs(o,{variant:a.enabled?"outline":"primary",size:"sm",onClick:()=>S(a),className:"gap-1",children:[e.jsx(R,{className:"h-3.5 w-3.5"}),a.enabled?t("cronDisable"):t("cronEnable")]}),e.jsxs(o,{variant:"destructive",size:"sm",onClick:()=>b(a),className:"gap-1",children:[e.jsx(k,{className:"h-3.5 w-3.5"}),t("delete")]})]})]})})},a.id))})}),e.jsx(C,{})]})}export{se as CronConfig};
@@ -1 +0,0 @@
1
- import{r as s,j as t,s as oe,aR as ae,aS as ne,ab as W,X as ie,aT as le,aU as ce,U as de,aj as ue,aV as me}from"./vendor-Dh04PGww.js";import{j as we,D as Y,t as i,c as X,l as xe}from"./index-BRBYYgR_.js";function pe(){const{isOpen:T,mode:g,tabs:F,activeTabId:N,currentTab:x,currentUrl:l,navVersion:p,close:A,toggleMode:I,goBack:$,goForward:O,canGoBack:V,canGoForward:_,navigate:y,syncUrl:S,setActiveTab:G,closeTab:H,openNewTab:q}=we(),[k,j]=s.useState(""),[E,C]=s.useState(!1),[J,h]=s.useState(!1),[d,D]=s.useState(()=>({x:Math.max(40,window.innerWidth-520),y:80})),[n,U]=s.useState({w:480,h:600}),[L,K]=s.useState(420),u=s.useRef(null),m=s.useRef(null),b=s.useRef(null),R=s.useRef(null),B=s.useRef(p),a=(x==null?void 0:x.kind)==="docs";s.useEffect(()=>{if(!a){j("");return}try{const e=new URL(l);j(e.pathname)}catch{j(l)}},[l,N,a]),s.useEffect(()=>{var e;if(a){if(p!==B.current){B.current=p;return}if((e=R.current)!=null&&e.contentWindow)try{const r=new URL(l).pathname;R.current.contentWindow.postMessage({type:"docs-navigate",path:r},"*")}catch{}}},[l,p,a]),s.useEffect(()=>{g==="floating"&&D(e=>({x:Math.max(40,window.innerWidth-n.w-40),y:e.y}))},[g,n.w]),s.useEffect(()=>{const e=r=>{var o;a&&((o=r.data)==null?void 0:o.type)==="docs-route-change"&&typeof r.data.url=="string"&&S(r.data.url)};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[S,a]);const Q=s.useCallback(e=>{if(e.preventDefault(),!a)return;const r=k.trim();r&&(r.startsWith("/")?y(`${Y}${r}`):r.startsWith("http")?y(r):y(`${Y}/${r}`))},[k,y,a]),Z=s.useCallback(e=>{g==="floating"&&(C(!0),u.current={startX:e.clientX,startY:e.clientY,startPosX:d.x,startPosY:d.y})},[g,d]);s.useEffect(()=>{if(!E)return;const e=o=>{u.current&&D({x:u.current.startPosX+(o.clientX-u.current.startX),y:u.current.startPosY+(o.clientY-u.current.startY)})},r=()=>{C(!1),u.current=null};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",r),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",r)}},[E]);const z=s.useCallback(e=>{e.preventDefault(),e.stopPropagation(),h(!0);const r=e.currentTarget.dataset.axis;m.current={startX:e.clientX,startY:e.clientY,startW:n.w,startH:n.h};const o=w=>{m.current&&U(v=>({w:r==="y"?v.w:Math.max(360,m.current.startW+(w.clientX-m.current.startX)),h:r==="x"?v.h:Math.max(400,m.current.startH+(w.clientY-m.current.startY))}))},f=()=>{h(!1),m.current=null,window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",f)};window.addEventListener("mousemove",o),window.addEventListener("mouseup",f)},[n]),ee=s.useCallback(e=>{e.preventDefault(),e.stopPropagation(),h(!0),b.current={startX:e.clientX,startW:L};const r=f=>{if(!b.current)return;const w=b.current.startX-f.clientX;K(Math.max(320,Math.min(860,b.current.startW+w)))},o=()=>{h(!1),b.current=null,window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",o)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",o)},[L]),te=s.useCallback(e=>{e.preventDefault(),e.stopPropagation(),h(!0);const r=e.clientX,o=n.w,f=d.x,w=re=>{const se=r-re.clientX,P=Math.max(360,o+se);U(M=>({...M,w:P})),D(M=>({...M,x:f-(P-o)}))},v=()=>{h(!1),window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",v)};window.addEventListener("mousemove",w),window.addEventListener("mouseup",v)},[n.w,d.x]);if(!T)return null;const c=g==="docked";return t.jsxs("div",{className:X("flex flex-col bg-white overflow-hidden relative",c?"h-full border-l border-gray-200 shrink-0":"rounded-2xl shadow-2xl border border-gray-200"),style:c?{width:L}:{position:"fixed",left:d.x,top:d.y,width:n.w,height:n.h,zIndex:9999},children:[c&&t.jsx("div",{className:"absolute top-0 left-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:ee}),t.jsxs("div",{className:X("flex items-center justify-between px-4 py-2.5 bg-gray-50 border-b border-gray-200 shrink-0 select-none",!c&&"cursor-grab active:cursor-grabbing"),onMouseDown:c?void 0:Z,children:[t.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[t.jsx(oe,{className:"w-4 h-4 text-primary shrink-0"}),t.jsx("span",{className:"text-sm font-semibold text-gray-900 truncate",children:i("docBrowserTitle")})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("button",{onClick:I,className:"hover:bg-gray-200 rounded-md p-1.5 text-gray-500 hover:text-gray-700 transition-colors",title:c?i("docBrowserFloatMode"):i("docBrowserDockMode"),children:c?t.jsx(ae,{className:"w-3.5 h-3.5"}):t.jsx(ne,{className:"w-3.5 h-3.5"})}),t.jsx("button",{onClick:A,className:"hover:bg-gray-200 rounded-md p-1.5 text-gray-500 hover:text-gray-700 transition-colors",title:i("docBrowserClose"),children:t.jsx(W,{className:"w-3.5 h-3.5"})})]})]}),t.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-2 bg-white border-b border-gray-100 overflow-x-auto custom-scrollbar",children:[F.map(e=>{const r=e.id===N;return t.jsxs("div",{className:X("inline-flex items-center gap-1 h-7 px-1.5 rounded-lg text-xs border max-w-[220px] shrink-0 transition-colors",r?"bg-blue-50 border-blue-300 text-blue-700":"bg-gray-50 border-gray-200 text-gray-600 hover:bg-gray-100"),children:[t.jsx("button",{type:"button",onClick:()=>G(e.id),className:"truncate text-left px-1",title:e.title,children:e.title||i("docBrowserTabUntitled")}),t.jsx("button",{type:"button",onClick:o=>{o.stopPropagation(),H(e.id)},className:"rounded p-0.5 hover:bg-black/10","aria-label":i("docBrowserCloseTab"),children:t.jsx(W,{className:"w-3 h-3"})})]},e.id)}),t.jsx("button",{onClick:()=>q(void 0,{kind:"docs",title:"Docs"}),className:"inline-flex items-center justify-center w-7 h-7 rounded-lg border border-gray-200 bg-white text-gray-600 hover:bg-gray-100 shrink-0",title:i("docBrowserNewTab"),children:t.jsx(ie,{className:"w-3.5 h-3.5"})})]}),a&&t.jsxs("div",{className:"flex items-center gap-2 px-3.5 py-2 bg-white border-b border-gray-100 shrink-0",children:[t.jsx("button",{onClick:$,disabled:!V,className:"p-1.5 rounded-md hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-600 transition-colors",children:t.jsx(le,{className:"w-4 h-4"})}),t.jsx("button",{onClick:O,disabled:!_,className:"p-1.5 rounded-md hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-600 transition-colors",children:t.jsx(ce,{className:"w-4 h-4"})}),t.jsxs("form",{onSubmit:Q,className:"flex-1 relative",children:[t.jsx(de,{className:"w-3.5 h-3.5 absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),t.jsx("input",{type:"text",value:k,onChange:e=>j(e.target.value),placeholder:i("docBrowserSearchPlaceholder"),className:"w-full h-8 pl-8 pr-3 rounded-lg bg-gray-50 border border-gray-200 text-xs text-gray-700 focus:outline-none focus:ring-1 focus:ring-primary/30 focus:border-primary/40 transition-colors placeholder:text-gray-400"})]})]}),t.jsxs("div",{className:"flex-1 relative overflow-hidden",children:[t.jsx("iframe",{ref:R,src:l,className:"absolute inset-0 w-full h-full border-0",title:(x==null?void 0:x.title)||"NextClaw Docs",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms",allow:"clipboard-read; clipboard-write"},`${N}:${p}`),(J||E)&&t.jsx("div",{className:"absolute inset-0 z-10"})]}),a&&xe(l)&&t.jsx("div",{className:"flex items-center justify-between px-4 py-2 bg-gray-50 border-t border-gray-200 shrink-0",children:t.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer","data-doc-external":!0,className:"flex items-center gap-1.5 text-xs text-primary hover:text-primary-hover font-medium transition-colors",children:[i("docBrowserOpenExternal"),t.jsx(ue,{className:"w-3 h-3"})]})}),!c&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"absolute top-0 left-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:te}),t.jsx("div",{className:"absolute top-0 right-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:z,"data-axis":"x"}),t.jsx("div",{className:"absolute bottom-0 left-0 h-1.5 w-full cursor-ns-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:z,"data-axis":"y"}),t.jsx("div",{className:"absolute bottom-0 right-0 w-4 h-4 cursor-se-resize z-30 flex items-center justify-center text-gray-300 hover:text-gray-500 transition-colors",onMouseDown:z,children:t.jsx(me,{className:"w-3 h-3 rotate-[-45deg]"})})]})]})}export{pe as DocBrowser};