tia-gpc-widget 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +387 -0
- package/dist/tia-gpc.cjs.js +15 -0
- package/dist/tia-gpc.cjs.js.map +1 -0
- package/dist/tia-gpc.css +1 -0
- package/dist/tia-gpc.es.js +7434 -0
- package/dist/tia-gpc.es.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),q=require("react"),ue=require("react-i18next"),be=require("lucide-react"),bn=require("react-hot-toast"),Or=require("@marsidev/react-turnstile"),_r=require("axios"),Je=require("i18next"),Mr=require("i18next-browser-languagedetector"),Rr=({onClick:e,unreadCount:n=0})=>{const{t}=ue.useTranslation();return S.jsxs("button",{onClick:e,className:"gpc-floating-button gpc-animate-fade-in","aria-label":t("chat.title"),title:t("chat.title"),children:[S.jsx(be.MessageCircle,{className:"gpc-floating-icon"}),n>0&&S.jsx("span",{className:"gpc-notification-badge",children:n>9?"9+":n})]})},Dr=({theme:e,onToggle:n})=>{const{t}=ue.useTranslation();return S.jsx("button",{onClick:n,className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":t("theme.toggle"),title:t("theme.toggle"),children:e==="light"?S.jsx(be.Moon,{className:"gpc-icon"}):S.jsx(be.Sun,{className:"gpc-icon"})})},on=[{code:"en",label:"English",flag:"🇬🇧"},{code:"es",label:"Español",flag:"🇪🇸"},{code:"fr",label:"Français",flag:"🇫🇷"}],jr=()=>{const{i18n:e}=ue.useTranslation(),[n,t]=q.useState(!1),r=q.useRef(null),i=on.find(o=>o.code===e.language)||on[0],l=o=>{e.changeLanguage(o),t(!1)};return q.useEffect(()=>{const o=a=>{r.current&&!r.current.contains(a.target)&&t(!1)};return n&&document.addEventListener("mousedown",o),()=>{document.removeEventListener("mousedown",o)}},[n]),S.jsxs("div",{className:"gpc-language-selector",ref:r,children:[S.jsx("button",{onClick:()=>t(!n),className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":"Cambiar idioma",title:"Cambiar idioma",children:S.jsx(be.Globe,{className:"gpc-icon"})}),n&&S.jsx("div",{className:"gpc-language-dropdown",children:on.map(o=>S.jsxs("button",{onClick:()=>l(o.code),className:`gpc-language-option ${o.code===i.code?"gpc-language-option-active":""}`,children:[S.jsx("span",{className:"gpc-language-flag",children:o.flag}),S.jsx("span",{className:"gpc-language-label",children:o.label})]},o.code))})]})},Fr=({onClose:e,theme:n,onToggleTheme:t,showBranding:r=!0})=>{const{t:i}=ue.useTranslation();return S.jsxs("div",{className:"gpc-chat-header",children:[S.jsx("div",{className:"gpc-header-content",children:S.jsx("div",{className:"gpc-header-text",children:S.jsx("h2",{className:"gpc-header-title",children:i("widget.title")})})}),S.jsxs("div",{className:"gpc-header-actions",children:[S.jsx(jr,{}),S.jsx(Dr,{theme:n,onToggle:t}),S.jsx("button",{onClick:e,className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":i("chat.close"),title:i("chat.close"),children:S.jsx(be.X,{className:"gpc-icon"})})]})]})};function Br(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Ur=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hr=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vr={};function Qn(e,n){return(Vr.jsx?Hr:Ur).test(e)}const qr=/[ \t\n\f\r]/g;function $r(e){return typeof e=="object"?e.type==="text"?Jn(e.value):!1:Jn(e)}function Jn(e){return e.replace(qr,"")===""}class $e{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}$e.prototype.normal={};$e.prototype.property={};$e.prototype.space=void 0;function Dt(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new $e(t,r,n)}function wn(e){return e.toLowerCase()}class ee{constructor(n,t){this.attribute=t,this.property=n}}ee.prototype.attribute="";ee.prototype.booleanish=!1;ee.prototype.boolean=!1;ee.prototype.commaOrSpaceSeparated=!1;ee.prototype.commaSeparated=!1;ee.prototype.defined=!1;ee.prototype.mustUseProperty=!1;ee.prototype.number=!1;ee.prototype.overloadedBoolean=!1;ee.prototype.property="";ee.prototype.spaceSeparated=!1;ee.prototype.space=void 0;let Gr=0;const _=Ce(),W=Ce(),Sn=Ce(),w=Ce(),$=Ce(),Ne=Ce(),te=Ce();function Ce(){return 2**++Gr}const En=Object.freeze(Object.defineProperty({__proto__:null,boolean:_,booleanish:W,commaOrSpaceSeparated:te,commaSeparated:Ne,number:w,overloadedBoolean:Sn,spaceSeparated:$},Symbol.toStringTag,{value:"Module"})),an=Object.keys(En);class Ln extends ee{constructor(n,t,r,i){let l=-1;if(super(n,t),Zn(this,"space",i),typeof r=="number")for(;++l<an.length;){const o=an[l];Zn(this,an[l],(r&En[o])===En[o])}}}Ln.prototype.defined=!0;function Zn(e,n,t){t&&(e[n]=t)}function ze(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const l=new Ln(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[wn(r)]=r,t[wn(l.attribute)]=r}return new $e(n,t,e.space)}const jt=ze({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:w,ariaColIndex:w,ariaColSpan:w,ariaControls:$,ariaCurrent:null,ariaDescribedBy:$,ariaDetails:null,ariaDisabled:W,ariaDropEffect:$,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:$,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$,ariaLevel:w,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:$,ariaPlaceholder:null,ariaPosInSet:w,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:$,ariaRowCount:w,ariaRowIndex:w,ariaRowSpan:w,ariaSelected:W,ariaSetSize:w,ariaSort:null,ariaValueMax:w,ariaValueMin:w,ariaValueNow:w,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Ft(e,n){return n in e?e[n]:n}function Bt(e,n){return Ft(e,n.toLowerCase())}const Wr=ze({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ne,acceptCharset:$,accessKey:$,action:null,allow:null,allowFullScreen:_,allowPaymentRequest:_,allowUserMedia:_,alt:null,as:null,async:_,autoCapitalize:null,autoComplete:$,autoFocus:_,autoPlay:_,blocking:$,capture:null,charSet:null,checked:_,cite:null,className:$,cols:w,colSpan:null,content:null,contentEditable:W,controls:_,controlsList:$,coords:w|Ne,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_,defer:_,dir:null,dirName:null,disabled:_,download:Sn,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_,formTarget:null,headers:$,height:w,hidden:Sn,high:w,href:null,hrefLang:null,htmlFor:$,httpEquiv:$,id:null,imageSizes:null,imageSrcSet:null,inert:_,inputMode:null,integrity:null,is:null,isMap:_,itemId:null,itemProp:$,itemRef:$,itemScope:_,itemType:$,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_,low:w,manifest:null,max:null,maxLength:w,media:null,method:null,min:null,minLength:w,multiple:_,muted:_,name:null,nonce:null,noModule:_,noValidate:_,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:_,optimum:w,pattern:null,ping:$,placeholder:null,playsInline:_,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_,referrerPolicy:null,rel:$,required:_,reversed:_,rows:w,rowSpan:w,sandbox:$,scope:null,scoped:_,seamless:_,selected:_,shadowRootClonable:_,shadowRootDelegatesFocus:_,shadowRootMode:null,shape:null,size:w,sizes:null,slot:null,span:w,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:w,step:null,style:null,tabIndex:w,target:null,title:null,translate:null,type:null,typeMustMatch:_,useMap:null,value:W,width:w,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$,axis:null,background:null,bgColor:null,border:w,borderColor:null,bottomMargin:w,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_,declare:_,event:null,face:null,frame:null,frameBorder:null,hSpace:w,leftMargin:w,link:null,longDesc:null,lowSrc:null,marginHeight:w,marginWidth:w,noResize:_,noHref:_,noShade:_,noWrap:_,object:null,profile:null,prompt:null,rev:null,rightMargin:w,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:w,valueType:null,version:null,vAlign:null,vLink:null,vSpace:w,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_,disableRemotePlayback:_,prefix:null,property:null,results:w,security:null,unselectable:null},space:"html",transform:Bt}),Yr=ze({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:te,accentHeight:w,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:w,amplitude:w,arabicForm:null,ascent:w,attributeName:null,attributeType:null,azimuth:w,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:w,by:null,calcMode:null,capHeight:w,className:$,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:w,diffuseConstant:w,direction:null,display:null,dur:null,divisor:w,dominantBaseline:null,download:_,dx:null,dy:null,edgeMode:null,editable:null,elevation:w,enableBackground:null,end:null,event:null,exponent:w,externalResourcesRequired:null,fill:null,fillOpacity:w,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:Ne,g2:Ne,glyphName:Ne,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:w,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:w,horizOriginX:w,horizOriginY:w,id:null,ideographic:w,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:w,k:w,k1:w,k2:w,k3:w,k4:w,kernelMatrix:te,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:w,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:w,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:w,overlineThickness:w,paintOrder:null,panose1:null,path:null,pathLength:w,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:w,pointsAtY:w,pointsAtZ:w,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:te,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:te,rev:te,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:te,requiredFeatures:te,requiredFonts:te,requiredFormats:te,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:w,specularExponent:w,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:w,strikethroughThickness:w,string:null,stroke:null,strokeDashArray:te,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:w,strokeOpacity:w,strokeWidth:null,style:null,surfaceScale:w,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:te,tabIndex:w,tableValues:null,target:null,targetX:w,targetY:w,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:te,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:w,underlineThickness:w,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:w,values:null,vAlphabetic:w,vMathematical:w,vectorEffect:null,vHanging:w,vIdeographic:w,version:null,vertAdvY:w,vertOriginX:w,vertOriginY:w,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:w,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ft}),Ut=ze({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Ht=ze({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Bt}),Vt=ze({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Xr={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"},Kr=/[A-Z]/g,et=/-[a-z]/g,Qr=/^data[-\w.:]+$/i;function Jr(e,n){const t=wn(n);let r=n,i=ee;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Qr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(et,ei);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!et.test(l)){let o=l.replace(Kr,Zr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=Ln}return new i(r,n)}function Zr(e){return"-"+e.toLowerCase()}function ei(e){return e.charAt(1).toUpperCase()}const ni=Dt([jt,Wr,Ut,Ht,Vt],"html"),zn=Dt([jt,Yr,Ut,Ht,Vt],"svg");function ti(e){return e.join(" ").trim()}function qt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pe={},sn,nt;function ri(){if(nt)return sn;nt=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
|
|
2
|
+
`,s="/",u="*",p="",m="comment",h="declaration";sn=function(k,C){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];C=C||{};var b=1,v=1;function T(A){var I=A.match(n);I&&(b+=I.length);var z=A.lastIndexOf(c);v=~z?A.length-z:v+A.length}function B(){var A={line:b,column:v};return function(I){return I.position=new U(A),D(),I}}function U(A){this.start=A,this.end={line:b,column:v},this.source=C.source}U.prototype.content=k;function y(A){var I=new Error(C.source+":"+b+":"+v+": "+A);if(I.reason=A,I.filename=C.source,I.line=b,I.column=v,I.source=k,!C.silent)throw I}function M(A){var I=A.exec(k);if(I){var z=I[0];return T(z),k=k.slice(z.length),I}}function D(){M(t)}function F(A){var I;for(A=A||[];I=H();)I!==!1&&A.push(I);return A}function H(){var A=B();if(!(s!=k.charAt(0)||u!=k.charAt(1))){for(var I=2;p!=k.charAt(I)&&(u!=k.charAt(I)||s!=k.charAt(I+1));)++I;if(I+=2,p===k.charAt(I-1))return y("End of comment missing");var z=k.slice(2,I-2);return v+=2,T(z),k=k.slice(I),v+=2,A({type:m,comment:z})}}function N(){var A=B(),I=M(r);if(I){if(H(),!M(i))return y("property missing ':'");var z=M(l),Y=A({type:h,property:x(I[0].replace(e,p)),value:z?x(z[0].replace(e,p)):p});return M(o),Y}}function P(){var A=[];F(A);for(var I;I=N();)I!==!1&&(A.push(I),F(A));return A}return D(),P()};function x(k){return k?k.replace(a,p):p}return sn}var tt;function ii(){if(tt)return Pe;tt=1;var e=Pe&&Pe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.default=t;const n=e(ri());function t(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,n.default)(r),a=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:s,value:u}=c;a?i(s,u,c):u&&(l=l||{},l[s]=u)}),l}return Pe}var De={},rt;function li(){if(rt)return De;rt=1,Object.defineProperty(De,"__esModule",{value:!0}),De.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(s){return!s||t.test(s)||e.test(s)},o=function(s,u){return u.toUpperCase()},a=function(s,u){return"".concat(u,"-")},c=function(s,u){return u===void 0&&(u={}),l(s)?s:(s=s.toLowerCase(),u.reactCompat?s=s.replace(i,a):s=s.replace(r,a),s.replace(n,o))};return De.camelCase=c,De}var je,it;function oi(){if(it)return je;it=1;var e=je&&je.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(ii()),t=li();function r(i,l){var o={};return!i||typeof i!="string"||(0,n.default)(i,function(a,c){a&&c&&(o[(0,t.camelCase)(a,l)]=c)}),o}return r.default=r,je=r,je}var ai=oi();const si=qt(ai),$t=Gt("end"),On=Gt("start");function Gt(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ui(e){const n=On(e),t=$t(e);if(n&&t)return{start:n,end:t}}function Ue(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?lt(e.position):"start"in e||"end"in e?lt(e):"line"in e||"column"in e?Cn(e):""}function Cn(e){return ot(e&&e.line)+":"+ot(e&&e.column)}function lt(e){return Cn(e&&e.start)+"-"+Cn(e&&e.end)}function ot(e){return e&&typeof e=="number"?e:1}class Q extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?l.ruleId=r:(l.source=r.slice(0,c),l.ruleId=r.slice(c+1))}if(!l.place&&l.ancestors&&l.ancestors){const c=l.ancestors[l.ancestors.length-1];c&&(l.place=c.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.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=Ue(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;const _n={}.hasOwnProperty,ci=new Map,pi=/[A-Z]/g,hi=new Set(["table","tbody","thead","tfoot","tr"]),fi=new Set(["td","th"]),Wt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function di(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Si(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=wi(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?zn:ni,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=Yt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Yt(e,n,t){if(n.type==="element")return mi(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return gi(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return xi(e,n,t);if(n.type==="mdxjsEsm")return yi(e,n);if(n.type==="root")return ki(e,n,t);if(n.type==="text")return bi(e,n)}function mi(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=zn,e.schema=i),e.ancestors.push(n);const l=Kt(e,n.tagName,!1),o=Ei(e,n);let a=Rn(e,n);return hi.has(n.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!$r(c):!0})),Xt(e,o,l,n),Mn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function gi(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}qe(e,n.position)}function yi(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);qe(e,n.position)}function xi(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=zn,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Kt(e,n.name,!0),o=Ci(e,n),a=Rn(e,n);return Xt(e,o,l,n),Mn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function ki(e,n,t){const r={};return Mn(r,Rn(e,n)),e.create(n,e.Fragment,r,t)}function bi(e,n){return n.value}function Xt(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Mn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function wi(e,n,t){return r;function r(i,l,o,a){const s=Array.isArray(o.children)?t:n;return a?s(l,o,a):s(l,o)}}function Si(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),c=On(r);return n(i,l,o,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Ei(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&_n.call(n.properties,i)){const l=Ti(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&fi.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Ci(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else qe(e,n.position);else{const i=r.name;let l;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,l=e.evaluater.evaluateExpression(a.expression)}else qe(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function Rn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:ci;for(;++r<n.children.length;){const l=n.children[r];let o;if(e.passKeys){const c=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(c){const s=i.get(c)||0;o=c+"-"+s,i.set(c,s+1)}}const a=Yt(e,l,o);a!==void 0&&t.push(a)}return t}function Ti(e,n,t){const r=Jr(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?Br(t):ti(t)),r.property==="style"){let i=typeof t=="object"?t:Ii(e,String(t));return e.stylePropertyNameCase==="css"&&(i=vi(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Xr[r.property]||r.property:r.attribute,t]}}function Ii(e,n){try{return si(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new Q("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=Wt+"#cannot-parse-style-attribute",i}}function Kt(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let l=-1,o;for(;++l<i.length;){const a=Qn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}r=o}else r=Qn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return _n.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);qe(e)}function qe(e,n){const t=new Q("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Wt+"#cannot-handle-mdx-estrees-without-createevaluater",t}function vi(e){const n={};let t;for(t in e)_n.call(e,t)&&(n[Pi(t)]=e[t]);return n}function Pi(e){let n=e.replace(pi,Ai);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Ai(e){return"-"+e.toLowerCase()}const un={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"]},Ni={};function Li(e,n){const t=Ni,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Qt(e,r,i)}function Qt(e,n,t){if(zi(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return at(e.children,n,t)}return Array.isArray(e)?at(e,n,t):""}function at(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Qt(e[i],n,t);return r.join("")}function zi(e){return!!(e&&typeof e=="object")}const st=document.createElement("i");function Dn(e){const n="&"+e+";";st.innerHTML=n;const t=st.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function he(e,n,t,r){const i=e.length;let l=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(n,0),e.splice(...o),l+=1e4,n+=1e4}function ie(e,n){return e.length>0?(he(e,e.length,0,n),e):n}const ut={}.hasOwnProperty;function Oi(e){const n={};let t=-1;for(;++t<e.length;)_i(n,e[t]);return n}function _i(e,n){let t;for(t in n){const i=(ut.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let o;if(l)for(o in l){ut.call(i,o)||(i[o]=[]);const a=l[o];Mi(i[o],Array.isArray(a)?a:a?[a]:[])}}}function Mi(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);he(e,0,0,r)}function Jt(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Le(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pe=we(/[A-Za-z]/),re=we(/[\dA-Za-z]/),Ri=we(/[#-'*+\--9=?A-Z^-~]/);function Tn(e){return e!==null&&(e<32||e===127)}const In=we(/\d/),Di=we(/[\dA-Fa-f]/),ji=we(/[!-/:-@[-`{-~]/);function L(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function j(e){return e===-2||e===-1||e===32}const Fi=we(new RegExp("\\p{P}|\\p{S}","u")),Bi=we(/\s/);function we(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Oe(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let o="";if(l===37&&re(e.charCodeAt(t+1))&&re(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function G(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(c){return j(c)?(e.enter(t),a(c)):n(c)}function a(c){return j(c)&&l++<i?(e.consume(c),a):(e.exit(t),n(c))}}const Ui={tokenize:Hi};function Hi(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),G(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),l(a)}function l(a){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return L(a)?(e.consume(a),e.exit("chunkText"),l):(e.consume(a),o)}}const Vi={tokenize:qi},ct={tokenize:$i};function qi(e){const n=this,t=[];let r=0,i,l,o;return a;function a(T){if(r<t.length){const B=t[r];return n.containerState=B[1],e.attempt(B[0].continuation,c,s)(T)}return s(T)}function c(T){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&v();const B=n.events.length;let U=B,y;for(;U--;)if(n.events[U][0]==="exit"&&n.events[U][1].type==="chunkFlow"){y=n.events[U][1].end;break}b(r);let M=B;for(;M<n.events.length;)n.events[M][1].end={...y},M++;return he(n.events,U+1,0,n.events.slice(B)),n.events.length=M,s(T)}return a(T)}function s(T){if(r===t.length){if(!i)return m(T);if(i.currentConstruct&&i.currentConstruct.concrete)return x(T);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(ct,u,p)(T)}function u(T){return i&&v(),b(r),m(T)}function p(T){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,x(T)}function m(T){return n.containerState={},e.attempt(ct,h,x)(T)}function h(T){return r++,t.push([n.currentConstruct,n.containerState]),m(T)}function x(T){if(T===null){i&&v(),b(0),e.consume(T);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),k(T)}function k(T){if(T===null){C(e.exit("chunkFlow"),!0),b(0),e.consume(T);return}return L(T)?(e.consume(T),C(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(T),k)}function C(T,B){const U=n.sliceStream(T);if(B&&U.push(null),T.previous=l,l&&(l.next=T),l=T,i.defineSkip(T.start),i.write(U),n.parser.lazy[T.start.line]){let y=i.events.length;for(;y--;)if(i.events[y][1].start.offset<o&&(!i.events[y][1].end||i.events[y][1].end.offset>o))return;const M=n.events.length;let D=M,F,H;for(;D--;)if(n.events[D][0]==="exit"&&n.events[D][1].type==="chunkFlow"){if(F){H=n.events[D][1].end;break}F=!0}for(b(r),y=M;y<n.events.length;)n.events[y][1].end={...H},y++;he(n.events,D+1,0,n.events.slice(M)),n.events.length=y}}function b(T){let B=t.length;for(;B-- >T;){const U=t[B];n.containerState=U[1],U[0].exit.call(n,e)}t.length=T}function v(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function $i(e,n,t){return G(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function pt(e){if(e===null||Z(e)||Bi(e))return 1;if(Fi(e))return 2}function jn(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}const vn={name:"attention",resolveAll:Gi,tokenize:Wi};function Gi(e,n){let t=-1,r,i,l,o,a,c,s,u;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const p={...e[r][1].end},m={...e[t][1].start};ht(p,-c),ht(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:m},l={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=ie(s,[["enter",e[r][1],n],["exit",e[r][1],n]])),s=ie(s,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),s=ie(s,jn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),s=ie(s,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(u=2,s=ie(s,[["enter",e[t][1],n],["exit",e[t][1],n]])):u=0,he(e,r-1,t-r+3,s),t=r+s.length-u-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Wi(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=pt(r);let l;return o;function o(c){return l=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===l)return e.consume(c),a;const s=e.exit("attentionSequence"),u=pt(c),p=!u||u===2&&i||t.includes(c),m=!i||i===2&&u||t.includes(r);return s._open=!!(l===42?p:p&&(i||!m)),s._close=!!(l===42?m:m&&(u||!p)),n(c)}}function ht(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Yi={name:"autolink",tokenize:Xi};function Xi(e,n,t){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(h){return pe(h)?(e.consume(h),o):h===64?t(h):s(h)}function o(h){return h===43||h===45||h===46||re(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,c):(h===43||h===45||h===46||re(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function c(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):h===null||h===32||h===60||Tn(h)?t(h):(e.consume(h),c)}function s(h){return h===64?(e.consume(h),u):Ri(h)?(e.consume(h),s):t(h)}function u(h){return re(h)?p(h):t(h)}function p(h){return h===46?(e.consume(h),r=0,u):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):m(h)}function m(h){if((h===45||re(h))&&r++<63){const x=h===45?m:p;return e.consume(h),x}return t(h)}}const tn={partial:!0,tokenize:Ki};function Ki(e,n,t){return r;function r(l){return j(l)?G(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||L(l)?n(l):t(l)}}const Zt={continuation:{tokenize:Ji},exit:Zi,name:"blockQuote",tokenize:Qi};function Qi(e,n,t){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return t(o)}function l(o){return j(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function Ji(e,n,t){const r=this;return i;function i(o){return j(o)?G(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Zt,n,t)(o)}}function Zi(e){e.exit("blockQuote")}const er={name:"characterEscape",tokenize:el};function el(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return ji(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const nr={name:"characterReference",tokenize:nl};function nl(e,n,t){const r=this;let i=0,l,o;return a;function a(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),l=31,o=re,u(p))}function s(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=Di,u):(e.enter("characterReferenceValue"),l=7,o=In,u(p))}function u(p){if(p===59&&i){const m=e.exit("characterReferenceValue");return o===re&&!Dn(r.sliceSerialize(m))?t(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(p)&&i++<l?(e.consume(p),u):t(p)}}const ft={partial:!0,tokenize:rl},dt={concrete:!0,name:"codeFenced",tokenize:tl};function tl(e,n,t){const r=this,i={partial:!0,tokenize:U};let l=0,o=0,a;return c;function c(y){return s(y)}function s(y){const M=r.events[r.events.length-1];return l=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,a=y,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(y)}function u(y){return y===a?(o++,e.consume(y),u):o<3?t(y):(e.exit("codeFencedFenceSequence"),j(y)?G(e,p,"whitespace")(y):p(y))}function p(y){return y===null||L(y)?(e.exit("codeFencedFence"),r.interrupt?n(y):e.check(ft,k,B)(y)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||L(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(y)):j(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),G(e,h,"whitespace")(y)):y===96&&y===a?t(y):(e.consume(y),m)}function h(y){return y===null||L(y)?p(y):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(y))}function x(y){return y===null||L(y)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(y)):y===96&&y===a?t(y):(e.consume(y),x)}function k(y){return e.attempt(i,B,C)(y)}function C(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),b}function b(y){return l>0&&j(y)?G(e,v,"linePrefix",l+1)(y):v(y)}function v(y){return y===null||L(y)?e.check(ft,k,B)(y):(e.enter("codeFlowValue"),T(y))}function T(y){return y===null||L(y)?(e.exit("codeFlowValue"),v(y)):(e.consume(y),T)}function B(y){return e.exit("codeFenced"),n(y)}function U(y,M,D){let F=0;return H;function H(z){return y.enter("lineEnding"),y.consume(z),y.exit("lineEnding"),N}function N(z){return y.enter("codeFencedFence"),j(z)?G(y,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):P(z)}function P(z){return z===a?(y.enter("codeFencedFenceSequence"),A(z)):D(z)}function A(z){return z===a?(F++,y.consume(z),A):F>=o?(y.exit("codeFencedFenceSequence"),j(z)?G(y,I,"whitespace")(z):I(z)):D(z)}function I(z){return z===null||L(z)?(y.exit("codeFencedFence"),M(z)):D(z)}}}function rl(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const cn={name:"codeIndented",tokenize:ll},il={partial:!0,tokenize:ol};function ll(e,n,t){const r=this;return i;function i(s){return e.enter("codeIndented"),G(e,l,"linePrefix",5)(s)}function l(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(s):t(s)}function o(s){return s===null?c(s):L(s)?e.attempt(il,o,c)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||L(s)?(e.exit("codeFlowValue"),o(s)):(e.consume(s),a)}function c(s){return e.exit("codeIndented"),n(s)}}function ol(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):L(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):G(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):L(o)?i(o):t(o)}}const al={name:"codeText",previous:ul,resolve:sl,tokenize:cl};function sl(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function ul(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function cl(e,n,t){let r=0,i,l;return o;function o(p){return e.enter("codeText"),e.enter("codeTextSequence"),a(p)}function a(p){return p===96?(e.consume(p),r++,a):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?t(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(l=e.enter("codeTextSequence"),i=0,u(p)):L(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),s(p))}function s(p){return p===null||p===32||p===96||L(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),s)}function u(p){return p===96?(e.consume(p),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(p)):(l.type="codeTextData",s(p))}}class pl{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Fe(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Fe(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Fe(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Fe(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Fe(this.left,t.reverse())}}}function Fe(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function tr(e){const n={};let t=-1,r,i,l,o,a,c,s;const u=new pl(e);for(;++t<u.length;){for(;t in n;)t=n[t];if(r=u.get(t),t&&r[1].type==="chunkFlow"&&u.get(t-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,l=0,l<c.length&&c[l][1].type==="lineEndingBlank"&&(l+=2),l<c.length&&c[l][1].type==="content"))for(;++l<c.length&&c[l][1].type!=="content";)c[l][1].type==="chunkText"&&(c[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,hl(u,t)),t=n[t],s=!0);else if(r[1]._container){for(l=t,i=void 0;l--;)if(o=u.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,t),a.unshift(r),u.splice(i,t-i+1,a))}}return he(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!s}function hl(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const l=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,c=[],s={};let u,p,m=-1,h=t,x=0,k=0;const C=[k];for(;h;){for(;e.get(++i)[1]!==h;);l.push(i),h._tokenizer||(u=r.sliceStream(h),h.next||u.push(null),p&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=h,h=h.next}for(h=t;++m<a.length;)a[m][0]==="exit"&&a[m-1][0]==="enter"&&a[m][1].type===a[m-1][1].type&&a[m][1].start.line!==a[m][1].end.line&&(k=m+1,C.push(k),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):C.pop(),m=C.length;m--;){const b=a.slice(C[m],C[m+1]),v=l.pop();c.push([v,v+b.length-1]),e.splice(v,2,b)}for(c.reverse(),m=-1;++m<c.length;)s[x+c[m][0]]=x+c[m][1],x+=c[m][1]-c[m][0]-1;return s}const fl={resolve:ml,tokenize:gl},dl={partial:!0,tokenize:yl};function ml(e){return tr(e),e}function gl(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?l(a):L(a)?e.check(dl,o,l)(a):(e.consume(a),i)}function l(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function o(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function yl(e,n,t){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),G(e,l,"linePrefix")}function l(o){if(o===null||L(o))return t(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function rr(e,n,t,r,i,l,o,a,c){const s=c||Number.POSITIVE_INFINITY;let u=0;return p;function p(b){return b===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(b),e.exit(l),m):b===null||b===32||b===41||Tn(b)?t(b):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),k(b))}function m(b){return b===62?(e.enter(l),e.consume(b),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(e.exit("chunkString"),e.exit(a),m(b)):b===null||b===60||L(b)?t(b):(e.consume(b),b===92?x:h)}function x(b){return b===60||b===62||b===92?(e.consume(b),h):h(b)}function k(b){return!u&&(b===null||b===41||Z(b))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(b)):u<s&&b===40?(e.consume(b),u++,k):b===41?(e.consume(b),u--,k):b===null||b===32||b===40||Tn(b)?t(b):(e.consume(b),b===92?C:k)}function C(b){return b===40||b===41||b===92?(e.consume(b),k):k(b)}}function ir(e,n,t,r,i,l){const o=this;let a=0,c;return s;function s(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(l),u}function u(h){return a>999||h===null||h===91||h===93&&!c||h===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(h):h===93?(e.exit(l),e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):L(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===null||h===91||h===93||L(h)||a++>999?(e.exit("chunkString"),u(h)):(e.consume(h),c||(c=!j(h)),h===92?m:p)}function m(h){return h===91||h===92||h===93?(e.consume(h),a++,p):p(h)}}function lr(e,n,t,r,i,l){let o;return a;function a(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),o=m===40?41:m,c):t(m)}function c(m){return m===o?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),n):(e.enter(l),s(m))}function s(m){return m===o?(e.exit(l),c(o)):m===null?t(m):L(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),G(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(m))}function u(m){return m===o||m===null||L(m)?(e.exit("chunkString"),s(m)):(e.consume(m),m===92?p:u)}function p(m){return m===o||m===92?(e.consume(m),u):u(m)}}function He(e,n){let t;return r;function r(i){return L(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):j(i)?G(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const xl={name:"definition",tokenize:bl},kl={partial:!0,tokenize:wl};function bl(e,n,t){const r=this;let i;return l;function l(h){return e.enter("definition"),o(h)}function o(h){return ir.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=Le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),c):t(h)}function c(h){return Z(h)?He(e,s)(h):s(h)}function s(h){return rr(e,u,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function u(h){return e.attempt(kl,p,p)(h)}function p(h){return j(h)?G(e,m,"whitespace")(h):m(h)}function m(h){return h===null||L(h)?(e.exit("definition"),r.parser.defined.push(i),n(h)):t(h)}}function wl(e,n,t){return r;function r(a){return Z(a)?He(e,i)(a):t(a)}function i(a){return lr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return j(a)?G(e,o,"whitespace")(a):o(a)}function o(a){return a===null||L(a)?n(a):t(a)}}const Sl={name:"hardBreakEscape",tokenize:El};function El(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return L(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const Cl={name:"headingAtx",resolve:Tl,tokenize:Il};function Tl(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},he(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Il(e,n,t){let r=0;return i;function i(u){return e.enter("atxHeading"),l(u)}function l(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||Z(u)?(e.exit("atxHeadingSequence"),a(u)):t(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||L(u)?(e.exit("atxHeading"),n(u)):j(u)?G(e,a,"whitespace")(u):(e.enter("atxHeadingText"),s(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),a(u))}function s(u){return u===null||u===35||Z(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),s)}}const vl=["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"],mt=["pre","script","style","textarea"],Pl={concrete:!0,name:"htmlFlow",resolveTo:Ll,tokenize:zl},Al={partial:!0,tokenize:_l},Nl={partial:!0,tokenize:Ol};function Ll(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function zl(e,n,t){const r=this;let i,l,o,a,c;return s;function s(d){return u(d)}function u(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),p}function p(d){return d===33?(e.consume(d),m):d===47?(e.consume(d),l=!0,k):d===63?(e.consume(d),i=3,r.interrupt?n:f):pe(d)?(e.consume(d),o=String.fromCharCode(d),C):t(d)}function m(d){return d===45?(e.consume(d),i=2,h):d===91?(e.consume(d),i=5,a=0,x):pe(d)?(e.consume(d),i=4,r.interrupt?n:f):t(d)}function h(d){return d===45?(e.consume(d),r.interrupt?n:f):t(d)}function x(d){const ae="CDATA[";return d===ae.charCodeAt(a++)?(e.consume(d),a===ae.length?r.interrupt?n:P:x):t(d)}function k(d){return pe(d)?(e.consume(d),o=String.fromCharCode(d),C):t(d)}function C(d){if(d===null||d===47||d===62||Z(d)){const ae=d===47,Se=o.toLowerCase();return!ae&&!l&&mt.includes(Se)?(i=1,r.interrupt?n(d):P(d)):vl.includes(o.toLowerCase())?(i=6,ae?(e.consume(d),b):r.interrupt?n(d):P(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(d):l?v(d):T(d))}return d===45||re(d)?(e.consume(d),o+=String.fromCharCode(d),C):t(d)}function b(d){return d===62?(e.consume(d),r.interrupt?n:P):t(d)}function v(d){return j(d)?(e.consume(d),v):H(d)}function T(d){return d===47?(e.consume(d),H):d===58||d===95||pe(d)?(e.consume(d),B):j(d)?(e.consume(d),T):H(d)}function B(d){return d===45||d===46||d===58||d===95||re(d)?(e.consume(d),B):U(d)}function U(d){return d===61?(e.consume(d),y):j(d)?(e.consume(d),U):T(d)}function y(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),c=d,M):j(d)?(e.consume(d),y):D(d)}function M(d){return d===c?(e.consume(d),c=null,F):d===null||L(d)?t(d):(e.consume(d),M)}function D(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||Z(d)?U(d):(e.consume(d),D)}function F(d){return d===47||d===62||j(d)?T(d):t(d)}function H(d){return d===62?(e.consume(d),N):t(d)}function N(d){return d===null||L(d)?P(d):j(d)?(e.consume(d),N):t(d)}function P(d){return d===45&&i===2?(e.consume(d),Y):d===60&&i===1?(e.consume(d),X):d===62&&i===4?(e.consume(d),oe):d===63&&i===3?(e.consume(d),f):d===93&&i===5?(e.consume(d),fe):L(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Al,de,A)(d)):d===null||L(d)?(e.exit("htmlFlowData"),A(d)):(e.consume(d),P)}function A(d){return e.check(Nl,I,de)(d)}function I(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),z}function z(d){return d===null||L(d)?A(d):(e.enter("htmlFlowData"),P(d))}function Y(d){return d===45?(e.consume(d),f):P(d)}function X(d){return d===47?(e.consume(d),o="",le):P(d)}function le(d){if(d===62){const ae=o.toLowerCase();return mt.includes(ae)?(e.consume(d),oe):P(d)}return pe(d)&&o.length<8?(e.consume(d),o+=String.fromCharCode(d),le):P(d)}function fe(d){return d===93?(e.consume(d),f):P(d)}function f(d){return d===62?(e.consume(d),oe):d===45&&i===2?(e.consume(d),f):P(d)}function oe(d){return d===null||L(d)?(e.exit("htmlFlowData"),de(d)):(e.consume(d),oe)}function de(d){return e.exit("htmlFlow"),n(d)}}function Ol(e,n,t){const r=this;return i;function i(o){return L(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function _l(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(tn,n,t)}}const Ml={name:"htmlText",tokenize:Rl};function Rl(e,n,t){const r=this;let i,l,o;return a;function a(f){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(f),c}function c(f){return f===33?(e.consume(f),s):f===47?(e.consume(f),U):f===63?(e.consume(f),T):pe(f)?(e.consume(f),D):t(f)}function s(f){return f===45?(e.consume(f),u):f===91?(e.consume(f),l=0,x):pe(f)?(e.consume(f),v):t(f)}function u(f){return f===45?(e.consume(f),h):t(f)}function p(f){return f===null?t(f):f===45?(e.consume(f),m):L(f)?(o=p,X(f)):(e.consume(f),p)}function m(f){return f===45?(e.consume(f),h):p(f)}function h(f){return f===62?Y(f):f===45?m(f):p(f)}function x(f){const oe="CDATA[";return f===oe.charCodeAt(l++)?(e.consume(f),l===oe.length?k:x):t(f)}function k(f){return f===null?t(f):f===93?(e.consume(f),C):L(f)?(o=k,X(f)):(e.consume(f),k)}function C(f){return f===93?(e.consume(f),b):k(f)}function b(f){return f===62?Y(f):f===93?(e.consume(f),b):k(f)}function v(f){return f===null||f===62?Y(f):L(f)?(o=v,X(f)):(e.consume(f),v)}function T(f){return f===null?t(f):f===63?(e.consume(f),B):L(f)?(o=T,X(f)):(e.consume(f),T)}function B(f){return f===62?Y(f):T(f)}function U(f){return pe(f)?(e.consume(f),y):t(f)}function y(f){return f===45||re(f)?(e.consume(f),y):M(f)}function M(f){return L(f)?(o=M,X(f)):j(f)?(e.consume(f),M):Y(f)}function D(f){return f===45||re(f)?(e.consume(f),D):f===47||f===62||Z(f)?F(f):t(f)}function F(f){return f===47?(e.consume(f),Y):f===58||f===95||pe(f)?(e.consume(f),H):L(f)?(o=F,X(f)):j(f)?(e.consume(f),F):Y(f)}function H(f){return f===45||f===46||f===58||f===95||re(f)?(e.consume(f),H):N(f)}function N(f){return f===61?(e.consume(f),P):L(f)?(o=N,X(f)):j(f)?(e.consume(f),N):F(f)}function P(f){return f===null||f===60||f===61||f===62||f===96?t(f):f===34||f===39?(e.consume(f),i=f,A):L(f)?(o=P,X(f)):j(f)?(e.consume(f),P):(e.consume(f),I)}function A(f){return f===i?(e.consume(f),i=void 0,z):f===null?t(f):L(f)?(o=A,X(f)):(e.consume(f),A)}function I(f){return f===null||f===34||f===39||f===60||f===61||f===96?t(f):f===47||f===62||Z(f)?F(f):(e.consume(f),I)}function z(f){return f===47||f===62||Z(f)?F(f):t(f)}function Y(f){return f===62?(e.consume(f),e.exit("htmlTextData"),e.exit("htmlText"),n):t(f)}function X(f){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),le}function le(f){return j(f)?G(e,fe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):fe(f)}function fe(f){return e.enter("htmlTextData"),o(f)}}const Fn={name:"labelEnd",resolveAll:Bl,resolveTo:Ul,tokenize:Hl},Dl={tokenize:Vl},jl={tokenize:ql},Fl={tokenize:$l};function Bl(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&he(e,0,e.length,t),e}function Ul(e,n){let t=e.length,r=0,i,l,o,a;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const c={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",c,n],["enter",s,n]],a=ie(a,e.slice(l+1,l+r+3)),a=ie(a,[["enter",u,n]]),a=ie(a,jn(n.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),n)),a=ie(a,[["exit",u,n],e[o-2],e[o-1],["exit",s,n]]),a=ie(a,e.slice(o+1)),a=ie(a,[["exit",c,n]]),he(e,l,e.length,a),e}function Hl(e,n,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return a;function a(m){return l?l._inactive?p(m):(o=r.parser.defined.includes(Le(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):t(m)}function c(m){return m===40?e.attempt(Dl,u,o?u:p)(m):m===91?e.attempt(jl,u,o?s:p)(m):o?u(m):p(m)}function s(m){return e.attempt(Fl,u,p)(m)}function u(m){return n(m)}function p(m){return l._balanced=!0,t(m)}}function Vl(e,n,t){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return Z(p)?He(e,l)(p):l(p)}function l(p){return p===41?u(p):rr(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return Z(p)?He(e,c)(p):u(p)}function a(p){return t(p)}function c(p){return p===34||p===39||p===40?lr(e,s,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):u(p)}function s(p){return Z(p)?He(e,u)(p):u(p)}function u(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),n):t(p)}}function ql(e,n,t){const r=this;return i;function i(a){return ir.call(r,e,l,o,"reference","referenceMarker","referenceString")(a)}function l(a){return r.parser.defined.includes(Le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function o(a){return t(a)}}function $l(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}const Gl={name:"labelStartImage",resolveAll:Fn.resolveAll,tokenize:Wl};function Wl(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),l}function l(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):t(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const Yl={name:"labelStartLink",resolveAll:Fn.resolveAll,tokenize:Xl};function Xl(e,n,t){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}const pn={name:"lineEnding",tokenize:Kl};function Kl(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),G(e,n,"linePrefix")}}const Ze={name:"thematicBreak",tokenize:Ql};function Ql(e,n,t){let r=0,i;return l;function l(s){return e.enter("thematicBreak"),o(s)}function o(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),c(s)):r>=3&&(s===null||L(s))?(e.exit("thematicBreak"),n(s)):t(s)}function c(s){return s===i?(e.consume(s),r++,c):(e.exit("thematicBreakSequence"),j(s)?G(e,a,"whitespace")(s):a(s))}}const J={continuation:{tokenize:no},exit:ro,name:"list",tokenize:eo},Jl={partial:!0,tokenize:io},Zl={partial:!0,tokenize:to};function eo(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(h){const x=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:In(h)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Ze,t,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(h)}return t(h)}function c(h){return In(h)&&++o<10?(e.consume(h),c):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):t(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(tn,r.interrupt?t:u,e.attempt(Jl,m,p))}function u(h){return r.containerState.initialBlankLine=!0,l++,m(h)}function p(h){return j(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),m):t(h)}function m(h){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(h)}}function no(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(tn,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,G(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!j(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Zl,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,G(e,e.attempt(J,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function to(e,n,t){const r=this;return G(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function ro(e){e.exit(this.containerState.type)}function io(e,n,t){const r=this;return G(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!j(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const gt={name:"setextUnderline",resolveTo:lo,tokenize:oo};function lo(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function oo(e,n,t){const r=this;let i;return l;function l(s){let u=r.events.length,p;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){p=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=s,o(s)):t(s)}function o(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),j(s)?G(e,c,"lineSuffix")(s):c(s))}function c(s){return s===null||L(s)?(e.exit("setextHeadingLine"),n(s)):t(s)}}const ao={tokenize:so};function so(e){const n=this,t=e.attempt(tn,r,e.attempt(this.parser.constructs.flowInitial,i,G(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fl,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const uo={resolveAll:ar()},co=or("string"),po=or("text");function or(e){return{resolveAll:ar(e==="text"?ho:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(u){return s(u)?l(u):a(u)}function a(u){if(u===null){t.consume(u);return}return t.enter("data"),t.consume(u),c}function c(u){return s(u)?(t.exit("data"),l(u)):(t.consume(u),c)}function s(u){if(u===null)return!0;const p=i[u];let m=-1;if(p)for(;++m<p.length;){const h=p[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ar(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function ho(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,o=-1,a=0,c;for(;l--;){const s=i[l];if(typeof s=="string"){for(o=s.length;s.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(s===-2)c=!0,a++;else if(s!==-1){l++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const s={type:t===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(t,0,["enter",s,n],["exit",s,n]),t+=2)}t++}return e}const fo={42:J,43:J,45:J,48:J,49:J,50:J,51:J,52:J,53:J,54:J,55:J,56:J,57:J,62:Zt},mo={91:xl},go={[-2]:cn,[-1]:cn,32:cn},yo={35:Cl,42:Ze,45:[gt,Ze],60:Pl,61:gt,95:Ze,96:dt,126:dt},xo={38:nr,92:er},ko={[-5]:pn,[-4]:pn,[-3]:pn,33:Gl,38:nr,42:vn,60:[Yi,Ml],91:Yl,92:[Sl,er],93:Fn,95:vn,96:al},bo={null:[vn,uo]},wo={null:[42,95]},So={null:[]},Eo=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:wo,contentInitial:mo,disable:So,document:fo,flow:yo,flowInitial:go,insideSpan:bo,string:xo,text:ko},Symbol.toStringTag,{value:"Module"}));function Co(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},l=[];let o=[],a=[];const c={attempt:M(U),check:M(y),consume:v,enter:T,exit:B,interrupt:M(y,{interrupt:!0})},s={code:null,containerState:{},defineSkip:k,events:[],now:x,parser:e,previous:null,sliceSerialize:m,sliceStream:h,write:p};let u=n.tokenize.call(s,c);return n.resolveAll&&l.push(n),s;function p(N){return o=ie(o,N),C(),o[o.length-1]!==null?[]:(D(n,0),s.events=jn(l,s.events,s),s.events)}function m(N,P){return Io(h(N),P)}function h(N){return To(o,N)}function x(){const{_bufferIndex:N,_index:P,line:A,column:I,offset:z}=r;return{_bufferIndex:N,_index:P,line:A,column:I,offset:z}}function k(N){i[N.line]=N.column,H()}function C(){let N;for(;r._index<o.length;){const P=o[r._index];if(typeof P=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<P.length;)b(P.charCodeAt(r._bufferIndex));else b(P)}}function b(N){u=u(N)}function v(N){L(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,H()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=N}function T(N,P){const A=P||{};return A.type=N,A.start=x(),s.events.push(["enter",A,s]),a.push(A),A}function B(N){const P=a.pop();return P.end=x(),s.events.push(["exit",P,s]),P}function U(N,P){D(N,P.from)}function y(N,P){P.restore()}function M(N,P){return A;function A(I,z,Y){let X,le,fe,f;return Array.isArray(I)?de(I):"tokenize"in I?de([I]):oe(I);function oe(K){return _e;function _e(ye){const Te=ye!==null&&K[ye],Ie=ye!==null&&K.null,We=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(Ie)?Ie:Ie?[Ie]:[]];return de(We)(ye)}}function de(K){return X=K,le=0,K.length===0?Y:d(K[le])}function d(K){return _e;function _e(ye){return f=F(),fe=K,K.partial||(s.currentConstruct=K),K.name&&s.parser.constructs.disable.null.includes(K.name)?Se():K.tokenize.call(P?Object.assign(Object.create(s),P):s,c,ae,Se)(ye)}}function ae(K){return N(fe,f),z}function Se(K){return f.restore(),++le<X.length?d(X[le]):Y}}}function D(N,P){N.resolveAll&&!l.includes(N)&&l.push(N),N.resolve&&he(s.events,P,s.events.length-P,N.resolve(s.events.slice(P),s)),N.resolveTo&&(s.events=N.resolveTo(s.events,s))}function F(){const N=x(),P=s.previous,A=s.currentConstruct,I=s.events.length,z=Array.from(a);return{from:I,restore:Y};function Y(){r=N,s.previous=P,s.currentConstruct=A,s.events.length=I,a=z,H()}}function H(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function To(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,l)];else{if(o=e.slice(t,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Io(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
3
|
+
`;break}case-3:{o=`\r
|
|
4
|
+
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function vo(e){const r={constructs:Oi([Eo,...(e||{}).extensions||[]]),content:i(Ui),defined:[],document:i(Vi),flow:i(ao),lazy:{},string:i(co),text:i(po)};return r;function i(l){return o;function o(a){return Co(r,l,a)}}}function Po(e){for(;!tr(e););return e}const yt=/[\0\t\n\r]/g;function Ao(){let e=1,n="",t=!0,r;return i;function i(l,o,a){const c=[];let s,u,p,m,h;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),p=0,n="",t&&(l.charCodeAt(0)===65279&&p++,t=void 0);p<l.length;){if(yt.lastIndex=p,s=yt.exec(l),m=s&&s.index!==void 0?s.index:l.length,h=l.charCodeAt(m),!s){n=l.slice(p);break}if(h===10&&p===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<m&&(c.push(l.slice(p,m)),e+=m-p),h){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}p=m+1}return a&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}const No=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Lo(e){return e.replace(No,zo)}function zo(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return Jt(t.slice(l?2:1),l?16:10)}return Dn(t)||e}const sr={}.hasOwnProperty;function Oo(e,n,t){return typeof n!="string"&&(t=n,n=void 0),_o(t)(Po(vo(t).document().write(Ao()(e,n,!0))))}function _o(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Xn),autolinkProtocol:F,autolinkEmail:F,atxHeading:l(Gn),blockQuote:l(Ie),characterEscape:F,characterReference:F,codeFenced:l(We),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(We,o),codeText:l(Cr,o),codeTextData:F,data:F,codeFlowValue:F,definition:l(Tr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(Ir),hardBreakEscape:l(Wn),hardBreakTrailing:l(Wn),htmlFlow:l(Yn,o),htmlFlowData:F,htmlText:l(Yn,o),htmlTextData:F,image:l(vr),label:o,link:l(Xn),listItem:l(Pr),listItemValue:m,listOrdered:l(Kn,p),listUnordered:l(Kn),paragraph:l(Ar),reference:d,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Gn),strong:l(Nr),thematicBreak:l(zr)},exit:{atxHeading:c(),atxHeadingSequence:U,autolink:c(),autolinkEmail:Te,autolinkProtocol:ye,blockQuote:c(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:K,characterReference:_e,codeFenced:c(C),codeFencedFence:k,codeFencedFenceInfo:h,codeFencedFenceMeta:x,codeFlowValue:H,codeIndented:c(b),codeText:c(z),codeTextData:H,data:H,definition:c(),definitionDestinationString:B,definitionLabelString:v,definitionTitleString:T,emphasis:c(),hardBreakEscape:c(P),hardBreakTrailing:c(P),htmlFlow:c(A),htmlFlowData:H,htmlText:c(I),htmlTextData:H,image:c(X),label:fe,labelText:le,lineEnding:N,link:c(Y),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:f,resourceTitleString:oe,resource:de,setextHeading:c(D),setextHeadingLineSequence:M,setextHeadingText:y,strong:c(),thematicBreak:c()}};ur(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(g){let E={type:"root",children:[]};const O={stack:[E],tokenStack:[],config:n,enter:a,exit:s,buffer:o,resume:u,data:t},R=[];let V=-1;for(;++V<g.length;)if(g[V][1].type==="listOrdered"||g[V][1].type==="listUnordered")if(g[V][0]==="enter")R.push(V);else{const se=R.pop();V=i(g,se,V)}for(V=-1;++V<g.length;){const se=n[g[V][0]];sr.call(se,g[V][1].type)&&se[g[V][1].type].call(Object.assign({sliceSerialize:g[V][2].sliceSerialize},O),g[V][1])}if(O.tokenStack.length>0){const se=O.tokenStack[O.tokenStack.length-1];(se[1]||xt).call(O,void 0,se[0])}for(E.position={start:xe(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:xe(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},V=-1;++V<n.transforms.length;)E=n.transforms[V](E)||E;return E}function i(g,E,O){let R=E-1,V=-1,se=!1,Ee,me,Me,Re;for(;++R<=O;){const ne=g[R];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?V++:V--,Re=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(Ee&&!Re&&!V&&!Me&&(Me=R),Re=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Re=void 0}if(!V&&ne[0]==="enter"&&ne[1].type==="listItemPrefix"||V===-1&&ne[0]==="exit"&&(ne[1].type==="listUnordered"||ne[1].type==="listOrdered")){if(Ee){let ve=R;for(me=void 0;ve--;){const ge=g[ve];if(ge[1].type==="lineEnding"||ge[1].type==="lineEndingBlank"){if(ge[0]==="exit")continue;me&&(g[me][1].type="lineEndingBlank",se=!0),ge[1].type="lineEnding",me=ve}else if(!(ge[1].type==="linePrefix"||ge[1].type==="blockQuotePrefix"||ge[1].type==="blockQuotePrefixWhitespace"||ge[1].type==="blockQuoteMarker"||ge[1].type==="listItemIndent"))break}Me&&(!me||Me<me)&&(Ee._spread=!0),Ee.end=Object.assign({},me?g[me][1].start:ne[1].end),g.splice(me||R,0,["exit",Ee,ne[2]]),R++,O++}if(ne[1].type==="listItemPrefix"){const ve={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};Ee=ve,g.splice(R,0,["enter",ve,ne[2]]),R++,O++,Me=void 0,Re=!0}}}return g[E][1]._spread=se,O}function l(g,E){return O;function O(R){a.call(this,g(R),R),E&&E.call(this,R)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(g,E,O){this.stack[this.stack.length-1].children.push(g),this.stack.push(g),this.tokenStack.push([E,O||void 0]),g.position={start:xe(E.start),end:void 0}}function c(g){return E;function E(O){g&&g.call(this,O),s.call(this,O)}}function s(g,E){const O=this.stack.pop(),R=this.tokenStack.pop();if(R)R[0].type!==g.type&&(E?E.call(this,g,R[0]):(R[1]||xt).call(this,g,R[0]));else throw new Error("Cannot close `"+g.type+"` ("+Ue({start:g.start,end:g.end})+"): it’s not open");O.position.end=xe(g.end)}function u(){return Li(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(g){if(this.data.expectingFirstListItemValue){const E=this.stack[this.stack.length-2];E.start=Number.parseInt(this.sliceSerialize(g),10),this.data.expectingFirstListItemValue=void 0}}function h(){const g=this.resume(),E=this.stack[this.stack.length-1];E.lang=g}function x(){const g=this.resume(),E=this.stack[this.stack.length-1];E.meta=g}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const g=this.resume(),E=this.stack[this.stack.length-1];E.value=g.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const g=this.resume(),E=this.stack[this.stack.length-1];E.value=g.replace(/(\r?\n|\r)$/g,"")}function v(g){const E=this.resume(),O=this.stack[this.stack.length-1];O.label=E,O.identifier=Le(this.sliceSerialize(g)).toLowerCase()}function T(){const g=this.resume(),E=this.stack[this.stack.length-1];E.title=g}function B(){const g=this.resume(),E=this.stack[this.stack.length-1];E.url=g}function U(g){const E=this.stack[this.stack.length-1];if(!E.depth){const O=this.sliceSerialize(g).length;E.depth=O}}function y(){this.data.setextHeadingSlurpLineEnding=!0}function M(g){const E=this.stack[this.stack.length-1];E.depth=this.sliceSerialize(g).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function F(g){const O=this.stack[this.stack.length-1].children;let R=O[O.length-1];(!R||R.type!=="text")&&(R=Lr(),R.position={start:xe(g.start),end:void 0},O.push(R)),this.stack.push(R)}function H(g){const E=this.stack.pop();E.value+=this.sliceSerialize(g),E.position.end=xe(g.end)}function N(g){const E=this.stack[this.stack.length-1];if(this.data.atHardBreak){const O=E.children[E.children.length-1];O.position.end=xe(g.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(E.type)&&(F.call(this,g),H.call(this,g))}function P(){this.data.atHardBreak=!0}function A(){const g=this.resume(),E=this.stack[this.stack.length-1];E.value=g}function I(){const g=this.resume(),E=this.stack[this.stack.length-1];E.value=g}function z(){const g=this.resume(),E=this.stack[this.stack.length-1];E.value=g}function Y(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const E=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=E,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function X(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const E=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=E,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function le(g){const E=this.sliceSerialize(g),O=this.stack[this.stack.length-2];O.label=Lo(E),O.identifier=Le(E).toLowerCase()}function fe(){const g=this.stack[this.stack.length-1],E=this.resume(),O=this.stack[this.stack.length-1];if(this.data.inReference=!0,O.type==="link"){const R=g.children;O.children=R}else O.alt=E}function f(){const g=this.resume(),E=this.stack[this.stack.length-1];E.url=g}function oe(){const g=this.resume(),E=this.stack[this.stack.length-1];E.title=g}function de(){this.data.inReference=void 0}function d(){this.data.referenceType="collapsed"}function ae(g){const E=this.resume(),O=this.stack[this.stack.length-1];O.label=E,O.identifier=Le(this.sliceSerialize(g)).toLowerCase(),this.data.referenceType="full"}function Se(g){this.data.characterReferenceType=g.type}function K(g){const E=this.sliceSerialize(g),O=this.data.characterReferenceType;let R;O?(R=Jt(E,O==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):R=Dn(E);const V=this.stack[this.stack.length-1];V.value+=R}function _e(g){const E=this.stack.pop();E.position.end=xe(g.end)}function ye(g){H.call(this,g);const E=this.stack[this.stack.length-1];E.url=this.sliceSerialize(g)}function Te(g){H.call(this,g);const E=this.stack[this.stack.length-1];E.url="mailto:"+this.sliceSerialize(g)}function Ie(){return{type:"blockquote",children:[]}}function We(){return{type:"code",lang:null,meta:null,value:""}}function Cr(){return{type:"inlineCode",value:""}}function Tr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ir(){return{type:"emphasis",children:[]}}function Gn(){return{type:"heading",depth:0,children:[]}}function Wn(){return{type:"break"}}function Yn(){return{type:"html",value:""}}function vr(){return{type:"image",title:null,url:"",alt:null}}function Xn(){return{type:"link",title:null,url:"",children:[]}}function Kn(g){return{type:"list",ordered:g.type==="listOrdered",start:null,spread:g._spread,children:[]}}function Pr(g){return{type:"listItem",spread:g._spread,checked:null,children:[]}}function Ar(){return{type:"paragraph",children:[]}}function Nr(){return{type:"strong",children:[]}}function Lr(){return{type:"text",value:""}}function zr(){return{type:"thematicBreak"}}}function xe(e){return{line:e.line,column:e.column,offset:e.offset}}function ur(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?ur(e,r):Mo(e,r)}}function Mo(e,n){let t;for(t in n)if(sr.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function xt(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ue({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ue({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ue({start:n.start,end:n.end})+") is still open")}function Ro(e){const n=this;n.parser=t;function t(r){return Oo(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Do(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function jo(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
5
|
+
`}]}function Fo(e,n){const t=n.value?n.value+`
|
|
6
|
+
`:"",r={};n.lang&&(r.className=["language-"+n.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function Bo(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Uo(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ho(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Oe(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,a+=1,e.footnoteCounts.set(r,a);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const s={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,s),e.applyData(n,s)}function Vo(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function qo(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function cr(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function $o(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return cr(e,n);const i={src:Oe(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function Go(e,n){const t={src:Oe(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Wo(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Yo(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return cr(e,n);const i={href:Oe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function Xo(e,n){const t={href:Oe(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Ko(e,n,t){const r=e.all(n),i=t?Qo(t):pr(n),l={},o=[];if(typeof n.checked=="boolean"){const u=r[0];let p;u&&u.type==="element"&&u.tagName==="p"?p=u:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
|
|
7
|
+
`}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
8
|
+
`});const s={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,s),e.applyData(n,s)}function Qo(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=pr(t[r])}return n}function pr(e){const n=e.spread;return n??e.children.length>1}function Jo(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function Zo(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ea(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function na(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ta(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=On(n.children[1]),c=$t(n.children[n.children.length-1]);a&&c&&(o.position={start:a,end:c}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function ra(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,a=o?o.length:n.children.length;let c=-1;const s=[];for(;++c<a;){const p=n.children[c],m={},h=o?o[c]:void 0;h&&(m.align=h);let x={type:"element",tagName:l,properties:m,children:[]};p&&(x.children=e.all(p),e.patch(p,x),x=e.applyData(p,x)),s.push(x)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(n,u),e.applyData(n,u)}function ia(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const kt=9,bt=32;function la(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const l=[];for(;r;)l.push(wt(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(wt(n.slice(i),i>0,!1)),l.join("")}function wt(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===kt||l===bt;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===kt||l===bt;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function oa(e,n){const t={type:"text",value:la(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function aa(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const sa={blockquote:Do,break:jo,code:Fo,delete:Bo,emphasis:Uo,footnoteReference:Ho,heading:Vo,html:qo,imageReference:$o,image:Go,inlineCode:Wo,linkReference:Yo,link:Xo,listItem:Ko,list:Jo,paragraph:Zo,root:ea,strong:na,table:ta,tableCell:ia,tableRow:ra,text:oa,thematicBreak:aa,toml:Ye,yaml:Ye,definition:Ye,footnoteDefinition:Ye};function Ye(){}const hr=-1,rn=0,Ve=1,en=2,Bn=3,Un=4,Hn=5,Vn=6,fr=7,dr=8,St=typeof self=="object"?self:globalThis,ua=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case rn:case hr:return t(o,i);case Ve:{const a=t([],i);for(const c of o)a.push(r(c));return a}case en:{const a=t({},i);for(const[c,s]of o)a[r(c)]=r(s);return a}case Bn:return t(new Date(o),i);case Un:{const{source:a,flags:c}=o;return t(new RegExp(a,c),i)}case Hn:{const a=t(new Map,i);for(const[c,s]of o)a.set(r(c),r(s));return a}case Vn:{const a=t(new Set,i);for(const c of o)a.add(r(c));return a}case fr:{const{name:a,message:c}=o;return t(new St[a](c),i)}case dr:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return t(new DataView(a),o)}}return t(new St[l](o),i)};return r},Et=e=>ua(new Map,e)(0),Ae="",{toString:ca}={},{keys:pa}=Object,Be=e=>{const n=typeof e;if(n!=="object"||!e)return[rn,n];const t=ca.call(e).slice(8,-1);switch(t){case"Array":return[Ve,Ae];case"Object":return[en,Ae];case"Date":return[Bn,Ae];case"RegExp":return[Un,Ae];case"Map":return[Hn,Ae];case"Set":return[Vn,Ae];case"DataView":return[Ve,t]}return t.includes("Array")?[Ve,t]:t.includes("Error")?[fr,t]:[en,t]},Xe=([e,n])=>e===rn&&(n==="function"||n==="symbol"),ha=(e,n,t,r)=>{const i=(o,a)=>{const c=r.push(o)-1;return t.set(a,c),c},l=o=>{if(t.has(o))return t.get(o);let[a,c]=Be(o);switch(a){case rn:{let u=o;switch(c){case"bigint":a=dr,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);u=null;break;case"undefined":return i([hr],o)}return i([a,u],o)}case Ve:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),i([c,[...m]],o)}const u=[],p=i([a,u],o);for(const m of o)u.push(l(m));return p}case en:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(n&&"toJSON"in o)return l(o.toJSON());const u=[],p=i([a,u],o);for(const m of pa(o))(e||!Xe(Be(o[m])))&&u.push([l(m),l(o[m])]);return p}case Bn:return i([a,o.toISOString()],o);case Un:{const{source:u,flags:p}=o;return i([a,{source:u,flags:p}],o)}case Hn:{const u=[],p=i([a,u],o);for(const[m,h]of o)(e||!(Xe(Be(m))||Xe(Be(h))))&&u.push([l(m),l(h)]);return p}case Vn:{const u=[],p=i([a,u],o);for(const m of o)(e||!Xe(Be(m)))&&u.push(l(m));return p}}const{message:s}=o;return i([a,{name:c,message:s}],o)};return l},Ct=(e,{json:n,lossy:t}={})=>{const r=[];return ha(!(n||t),!!n,new Map,r)(e),r},nn=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Et(Ct(e,n)):structuredClone(e):(e,n)=>Et(Ct(e,n));function fa(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function da(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function ma(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||fa,r=e.options.footnoteBackLabel||da,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<e.footnoteOrder.length;){const s=e.footnoteById.get(e.footnoteOrder[c]);if(!s)continue;const u=e.all(s),p=String(s.identifier).toUpperCase(),m=Oe(p.toLowerCase());let h=0;const x=[],k=e.footnoteCounts.get(p);for(;k!==void 0&&++h<=k;){x.length>0&&x.push({type:"text",value:" "});let v=typeof t=="string"?t:t(c,h);typeof v=="string"&&(v={type:"text",value:v}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+m+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,h),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const C=u[u.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const v=C.children[C.children.length-1];v&&v.type==="text"?v.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...x)}else u.push(...x);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+m},children:e.wrap(u,!0)};e.patch(s,b),a.push(b)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...nn(o),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 mr=(function(e){if(e==null)return ka;if(typeof e=="function")return ln(e);if(typeof e=="object")return Array.isArray(e)?ga(e):ya(e);if(typeof e=="string")return xa(e);throw new Error("Expected function, string, or object as test")});function ga(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=mr(e[t]);return ln(r);function r(...i){let l=-1;for(;++l<n.length;)if(n[l].apply(this,i))return!0;return!1}}function ya(e){const n=e;return ln(t);function t(r){const i=r;let l;for(l in e)if(i[l]!==n[l])return!1;return!0}}function xa(e){return ln(n);function n(t){return t&&t.type===e}}function ln(e){return n;function n(t,r,i){return!!(ba(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function ka(){return!0}function ba(e){return e!==null&&typeof e=="object"&&"type"in e}const gr=[],wa=!0,Tt=!1,Sa="skip";function Ea(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const l=mr(i),o=r?-1:1;a(e,void 0,[])();function a(c,s,u){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const h=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(h?"<"+h+">":""))+")"})}return m;function m(){let h=gr,x,k,C;if((!n||l(c,s,u[u.length-1]||void 0))&&(h=Ca(t(c,u)),h[0]===Tt))return h;if("children"in c&&c.children){const b=c;if(b.children&&h[0]!==Sa)for(k=(r?b.children.length:-1)+o,C=u.concat(b);k>-1&&k<b.children.length;){const v=b.children[k];if(x=a(v,k,C)(),x[0]===Tt)return x;k=typeof x[1]=="number"?x[1]:k+o}}return h}}}function Ca(e){return Array.isArray(e)?e:typeof e=="number"?[wa,e]:e==null?gr:[e]}function yr(e,n,t,r){let i,l,o;typeof n=="function"&&typeof t!="function"?(l=void 0,o=n,i=t):(l=n,o=t,i=r),Ea(e,l,a,i);function a(c,s){const u=s[s.length-1],p=u?u.children.indexOf(c):void 0;return o(c,p,u)}}const Pn={}.hasOwnProperty,Ta={};function Ia(e,n){const t=n||Ta,r=new Map,i=new Map,l=new Map,o={...sa,...t.handlers},a={all:s,applyData:Pa,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:c,options:t,patch:va,wrap:Na};return yr(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const p=u.type==="definition"?r:i,m=String(u.identifier).toUpperCase();p.has(m)||p.set(m,u)}}),a;function c(u,p){const m=u.type,h=a.handlers[m];if(Pn.call(a.handlers,m)&&h)return h(a,u,p);if(a.options.passThrough&&a.options.passThrough.includes(m)){if("children"in u){const{children:k,...C}=u,b=nn(C);return b.children=a.all(u),b}return nn(u)}return(a.options.unknownHandler||Aa)(a,u,p)}function s(u){const p=[];if("children"in u){const m=u.children;let h=-1;for(;++h<m.length;){const x=a.one(m[h],u);if(x){if(h&&m[h-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=It(x.value)),!Array.isArray(x)&&x.type==="element")){const k=x.children[0];k&&k.type==="text"&&(k.value=It(k.value))}Array.isArray(x)?p.push(...x):p.push(x)}}}return p}}function va(e,n){e.position&&(n.position=ui(e))}function Pa(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const o="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:o}}t.type==="element"&&l&&Object.assign(t.properties,nn(l)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Aa(e,n){const t=n.data||{},r="value"in n&&!(Pn.call(t,"hProperties")||Pn.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Na(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
11
|
+
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
12
|
+
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
13
|
+
`}),t}function It(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function vt(e,n){const t=Ia(e,n),r=t.one(e,void 0),i=ma(t),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
14
|
+
`},i),l}function La(e,n){return e&&"run"in e?async function(t,r){const i=vt(t,{file:r,...n});await e.run(i,r)}:function(t,r){return vt(t,{file:r,...e||n})}}function Pt(e){if(e)throw e}var hn,At;function za(){if(At)return hn;At=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(s){return typeof Array.isArray=="function"?Array.isArray(s):n.call(s)==="[object Array]"},l=function(s){if(!s||n.call(s)!=="[object Object]")return!1;var u=e.call(s,"constructor"),p=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!u&&!p)return!1;var m;for(m in s);return typeof m>"u"||e.call(s,m)},o=function(s,u){t&&u.name==="__proto__"?t(s,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):s[u.name]=u.newValue},a=function(s,u){if(u==="__proto__")if(e.call(s,u)){if(r)return r(s,u).value}else return;return s[u]};return hn=function c(){var s,u,p,m,h,x,k=arguments[0],C=1,b=arguments.length,v=!1;for(typeof k=="boolean"&&(v=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<b;++C)if(s=arguments[C],s!=null)for(u in s)p=a(k,u),m=a(s,u),k!==m&&(v&&m&&(l(m)||(h=i(m)))?(h?(h=!1,x=p&&i(p)?p:[]):x=p&&l(p)?p:{},o(k,{name:u,newValue:c(v,x,m)})):typeof m<"u"&&o(k,{name:u,newValue:m}));return k},hn}var Oa=za();const fn=qt(Oa);function An(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function _a(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(c,...s){const u=e[++l];let p=-1;if(c){o(c);return}for(;++p<i.length;)(s[p]===null||s[p]===void 0)&&(s[p]=i[p]);i=s,u?Ma(u,a)(...s):o(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Ma(e,n){let t;return r;function r(...o){const a=e.length>o.length;let c;a&&o.push(i);try{c=e.apply(this,o)}catch(s){const u=s;if(a&&t)throw u;return i(u)}a||(c&&c.then&&typeof c.then=="function"?c.then(l,i):c instanceof Error?i(c):l(c))}function i(o,...a){t||(t=!0,n(o,...a))}function l(o){i(null,o)}}const ce={basename:Ra,dirname:Da,extname:ja,join:Fa,sep:"/"};function Ra(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ge(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function Da(e){if(Ge(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function ja(e){Ge(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const a=e.codePointAt(n);if(a===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),a===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Fa(...e){let n=-1,t;for(;++n<e.length;)Ge(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Ba(t)}function Ba(e){Ge(e);const n=e.codePointAt(0)===47;let t=Ua(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Ua(e,n){let t="",r=0,i=-1,l=0,o=-1,a,c;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else a===46&&l>-1?l++:l=-1}return t}function Ge(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ha={cwd:Va};function Va(){return"/"}function Nn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qa(e){if(typeof e=="string")e=new URL(e);else if(!Nn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return $a(e)}function $a(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}const dn=["history","path","basename","stem","extname","dirname"];class xr{constructor(n){let t;n?Nn(n)?t={path:n}:typeof n=="string"||Ga(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Ha.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<dn.length;){const l=dn[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let i;for(i in t)dn.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ce.basename(this.path):void 0}set basename(n){gn(n,"basename"),mn(n,"basename"),this.path=ce.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ce.dirname(this.path):void 0}set dirname(n){Nt(this.basename,"dirname"),this.path=ce.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ce.extname(this.path):void 0}set extname(n){if(mn(n,"extname"),Nt(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ce.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Nn(n)&&(n=qa(n)),gn(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ce.basename(this.path,this.extname):void 0}set stem(n){gn(n,"stem"),mn(n,"stem"),this.path=ce.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new Q(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function mn(e,n){if(e&&e.includes(ce.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ce.sep+"`")}function gn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Nt(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Ga(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Wa=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),Ya={}.hasOwnProperty;class qn extends Wa{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=_a()}copy(){const n=new qn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(fn(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(kn("data",this.frozen),this.namespace[n]=t,this):Ya.call(this.namespace,n)&&this.namespace[n]||void 0:n?(kn("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=Ke(n),r=this.parser||this.Parser;return yn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),yn("process",this.parser||this.Parser),xn("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(l,o){const a=Ke(n),c=r.parse(a);r.run(c,a,function(u,p,m){if(u||!p||!m)return s(u);const h=p,x=r.stringify(h,m);Qa(x)?m.value=x:m.result=x,s(u,m)});function s(u,p){u||!p?o(u):l?l(p):t(void 0,p)}}}processSync(n){let t=!1,r;return this.freeze(),yn("processSync",this.parser||this.Parser),xn("processSync",this.compiler||this.Compiler),this.process(n,i),zt("processSync","process",t),r;function i(l,o){t=!0,Pt(l),r=o}}run(n,t,r){Lt(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?l(void 0,r):new Promise(l);function l(o,a){const c=Ke(t);i.run(n,c,s);function s(u,p,m){const h=p||n;u?a(u):o?o(h):r(void 0,h,m)}}}runSync(n,t){let r=!1,i;return this.run(n,t,l),zt("runSync","run",r),i;function l(o,a){Pt(o),i=a,r=!0}}stringify(n,t){this.freeze();const r=Ke(t),i=this.compiler||this.Compiler;return xn("stringify",i),Lt(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(kn("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):o(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(s){if(typeof s=="function")c(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[u,...p]=s;c(u,p)}else o(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function o(s){if(!("plugins"in s)&&!("settings"in s))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(s.plugins),s.settings&&(i.settings=fn(!0,i.settings,s.settings))}function a(s){let u=-1;if(s!=null)if(Array.isArray(s))for(;++u<s.length;){const p=s[u];l(p)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function c(s,u){let p=-1,m=-1;for(;++p<r.length;)if(r[p][0]===s){m=p;break}if(m===-1)r.push([s,...u]);else if(u.length>0){let[h,...x]=u;const k=r[m][1];An(k)&&An(h)&&(h=fn(!0,k,h)),r[m]=[s,h,...x]}}}}const Xa=new qn().freeze();function yn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function xn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function kn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Lt(e){if(!An(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zt(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ke(e){return Ka(e)?e:new xr(e)}function Ka(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Qa(e){return typeof e=="string"||Ja(e)}function Ja(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Za="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ot=[],_t={allowDangerousHtml:!0},es=/^(https?|ircs?|mailto|xmpp)$/i,ns=[{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 ts(e){const n=rs(e),t=is(e);return ls(n.runSync(n.parse(t),t),e)}function rs(e){const n=e.rehypePlugins||Ot,t=e.remarkPlugins||Ot,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._t}:_t;return Xa().use(Ro).use(t).use(La,r).use(n)}function is(e){const n=e.children||"",t=new xr;return typeof n=="string"&&(t.value=n),t}function ls(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,a=n.unwrapDisallowed,c=n.urlTransform||os;for(const u of ns)Object.hasOwn(n,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+Za+u.id,void 0);return yr(e,s),di(e,{Fragment:S.Fragment,components:i,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function s(u,p,m){if(u.type==="raw"&&m&&typeof p=="number")return o?m.children.splice(p,1):m.children[p]={type:"text",value:u.value},p;if(u.type==="element"){let h;for(h in un)if(Object.hasOwn(un,h)&&Object.hasOwn(u.properties,h)){const x=u.properties[h],k=un[h];(k===null||k.includes(u.tagName))&&(u.properties[h]=c(String(x||""),h,u))}}if(u.type==="element"){let h=t?!t.includes(u.tagName):l?l.includes(u.tagName):!1;if(!h&&r&&typeof p=="number"&&(h=!r(u,p,m)),h&&m&&typeof p=="number")return a&&u.children?m.children.splice(p,1,...u.children):m.children.splice(p,1),p}}}function os(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||es.test(e.slice(0,n))?e:""}const kr="https://www.tiagpctest.softiabot.com",as="0x4AAAAAAB-BKyDZcYYqCbid",br={BOTTOM_RIGHT:"bottom-right",BOTTOM_LEFT:"bottom-left",TOP_RIGHT:"top-right",TOP_LEFT:"top-left"},wr={LIGHT:"light",DARK:"dark",AUTO:"auto"},Sr={SPANISH:"es",ENGLISH:"en",FRANCES:"fr"},ss={MOBILE:640},ke={theme:wr.AUTO,position:br.BOTTOM_RIGHT,language:Sr.ENGLISH,width:"400px",height:"600px",autoOpen:!1,showBranding:!0,mobileFullscreen:!0},us={API_REQUEST:3e4},Mt={MAX_LENGTH:2e3},cs=()=>window.innerWidth<ss.MOBILE,ps=e=>{try{return new Date(e).toLocaleTimeString("es-ES",{hour:"2-digit",minute:"2-digit"})}catch{return""}},hs=e=>e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`,Rt=()=>crypto.randomUUID(),fs=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",ds=e=>e.trim().slice(0,2e3),ms=({message:e,showMetadata:n=!1})=>{const{t}=ue.useTranslation(),r=e.role==="user";return S.jsxs("div",{className:`gpc-message ${r?"gpc-message-user":"gpc-message-assistant"}`,role:"article","aria-label":r?"Mensaje del usuario":"Mensaje del asistente",children:[S.jsx("div",{className:"gpc-message-content",children:r?e.content.trim():S.jsx(ts,{children:e.content})}),S.jsx("div",{className:`gpc-message-timestamp ${r?"gpc-message-timestamp-user":""}`,children:ps(e.timestamp)}),!r&&n&&e.metadata&&S.jsxs("div",{className:"gpc-message-metadata",children:[e.metadata.tokensUsed&&S.jsxs("div",{className:"gpc-metadata-item",children:[S.jsxs("strong",{children:[t("metadata.tokensUsed"),":"]})," ",e.metadata.tokensUsed]}),e.metadata.responseTimeMs&&S.jsxs("div",{className:"gpc-metadata-item",children:[S.jsxs("strong",{children:[t("metadata.responseTime"),":"]})," ",hs(e.metadata.responseTimeMs)]}),e.metadata.model&&S.jsxs("div",{className:"gpc-metadata-item",children:[S.jsxs("strong",{children:[t("metadata.model"),":"]})," ",e.metadata.model]})]})]})},gs=({size:e="md",className:n=""})=>{const t={sm:"w-4 h-4 border-2",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-3"};return S.jsx("div",{className:`gpc-spinner ${t[e]} ${n}`,role:"status","aria-label":"Cargando",children:S.jsx("span",{className:"sr-only",children:"Cargando..."})})},ys=()=>S.jsxs("div",{className:"gpc-typing-indicator",role:"status","aria-label":"Escribiendo",children:[S.jsx("span",{className:"gpc-typing-dot"}),S.jsx("span",{className:"gpc-typing-dot"}),S.jsx("span",{className:"gpc-typing-dot"})]}),xs=({messages:e,isLoading:n,showMetadata:t=!1})=>{const{t:r}=ue.useTranslation(),i=q.useRef(null);return q.useEffect(()=>{i.current?.scrollIntoView({behavior:"smooth"})},[e,n]),e.length===0&&!n?S.jsx("div",{className:"gpc-messages-container",children:S.jsxs("div",{className:"gpc-empty-state",children:[S.jsx(be.MessageSquare,{className:"gpc-empty-icon"}),S.jsx("h3",{className:"gpc-empty-title",children:r("chat.welcome")}),S.jsx("p",{className:"gpc-empty-text",children:r("chat.emptyState")})]})}):S.jsxs("div",{className:"gpc-messages-container gpc-scrollbar gpc-smooth-scroll",children:[e.map(l=>S.jsx(ms,{message:l,showMetadata:t},l.id)),n&&S.jsx(ys,{}),S.jsx("div",{ref:i})]})},ks=({onSendMessage:e,isLoading:n,disabled:t})=>{const{t:r}=ue.useTranslation(),[i,l]=q.useState(""),o=q.useRef(null);q.useEffect(()=>{!t&&!n&&o.current?.focus()},[t,n]);const a=async u=>{u.preventDefault();const p=ds(i);if(!(!p||n||t))try{await e(p),l("")}catch(m){console.error("Error sending message:",m)}},c=u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),a(u))},s=i.trim().length>0&&!n&&!t;return S.jsxs("form",{onSubmit:a,className:"gpc-input-container",children:[S.jsx("input",{ref:o,type:"text",value:i,onChange:u=>l(u.target.value),onKeyDown:c,placeholder:r("chat.placeholder"),disabled:n||t,maxLength:Mt.MAX_LENGTH,className:"gpc-input","aria-label":r("chat.placeholder"),"aria-describedby":"chat-input-help"}),S.jsx("button",{type:"submit",disabled:!s,className:"gpc-send-button","aria-label":r("chat.send"),title:r("chat.send"),children:n?S.jsx("span",{className:"gpc-spinner"}):S.jsx(be.Send,{className:"gpc-icon"})}),S.jsxs("span",{id:"chat-input-help",className:"gpc-sr-only",children:[r("chat.placeholder"),". Máximo ",Mt.MAX_LENGTH," caracteres."]})]})},bs=({siteKey:e,onSuccess:n,onError:t})=>{const{t:r}=ue.useTranslation(),[i,l]=q.useState(!1),[o,a]=q.useState(null),c=async u=>{l(!0),a(null);try{await n(u)}catch(p){console.error("Turnstile validation error:",p),a(r("turnstile.error")),t?.(p)}finally{l(!1)}},s=u=>{console.error("Turnstile widget error:",u),a(r("turnstile.error")),t?.(new Error(r("turnstile.error")))};return S.jsxs("div",{className:"gpc-validator-container",children:[S.jsxs("div",{className:"gpc-validator-header",children:[S.jsx("h3",{className:"gpc-validator-title",children:r("chat.validation")}),S.jsx("p",{className:"gpc-validator-subtitle",children:r("turnstile.verifying")})]}),!o&&S.jsx("div",{className:"gpc-animate-fade-in",children:S.jsx(Or.Turnstile,{siteKey:e,onSuccess:c,onError:s,options:{theme:"light",size:"normal"}})}),i&&S.jsxs("div",{className:"gpc-validator-loading",children:[S.jsx(gs,{size:"md"}),S.jsx("p",{className:"gpc-validator-text",children:r("chat.validation")})]}),o&&S.jsxs("div",{className:"gpc-validator-error",children:[S.jsx(be.AlertCircle,{className:"gpc-error-icon"}),S.jsxs("div",{className:"gpc-error-content",children:[S.jsx("p",{className:"gpc-error-title",children:r("errors.validation")}),S.jsx("p",{className:"gpc-error-message",children:o}),S.jsx("button",{onClick:()=>window.location.reload(),className:"gpc-error-button",children:r("chat.retry")})]})]})]})},ws=(e,n)=>{const{t}=ue.useTranslation(),[r,i]=q.useState([]),[l,o]=q.useState(!1),[a,c]=q.useState(null),s=q.useCallback(async m=>{if(!m.trim()||l)return;if(!n){bn.error("Validación anti-bot pendiente");return}const h={id:Rt(),role:"user",content:m.trim(),timestamp:new Date().toISOString()};i(x=>[...x,h]),o(!0),c(null);try{const x=await e.sendMessage(m,n),k={id:x.data.message_id,role:"assistant",content:x.data.response,timestamp:x.data.created_at,metadata:{tokensConsumed:x.data.tokens_consumed,tokensRemaining:x.data.tokens_remaining,responseTimeMs:x.data.response_time_ms,modelUsed:x.data.model_used}};i(C=>[...C,k])}catch(x){let k;try{k=JSON.parse(x.message)}catch{k={statusCode:500,message:x.message}}let C;switch(k.statusCode||500){case 402:C=t("errors.insufficientTokens");break;case 429:C=t("errors.rateLimit");break;case 403:C=t("errors.validation");break;case 401:C=t("errors.session");break;case 503:case 502:case 504:C=t("errors.aiServiceUnavailable");break;case 500:C=t("errors.serverError");break;default:C=t("errors.generic")}c(C),bn.error(C,{duration:4e3,position:"top-center"});const v={id:Rt(),role:"assistant",content:C,timestamp:new Date().toISOString()};i(T=>[...T,v])}finally{o(!1)}},[e,n,l,t]),u=q.useCallback(()=>{i([]),c(null)},[]),p=q.useCallback(()=>{c(null)},[]);return{messages:r,isLoading:l,error:a,sendMessage:s,clearMessages:u,clearError:p}},Ss=(e="auto")=>{const[n,t]=q.useState(e),[r,i]=q.useState("light");return q.useEffect(()=>{if(i(n==="auto"?fs():n),n==="auto"){const a=window.matchMedia("(prefers-color-scheme: dark)"),c=s=>{i(s.matches?"dark":"light")};return a.addEventListener("change",c),()=>{a.removeEventListener("change",c)}}},[n]),{theme:r,themeMode:n,setThemeMode:t,toggleTheme:()=>{t(o=>o==="auto"?r==="light"?"dark":"light":o==="light"?"dark":"light")}}},Es=({gpcService:e,licenseToken:n,turnstileSiteKey:t,onClose:r,themeMode:i,showBranding:l=!0,showMetadata:o=!1,onError:a})=>{const[c,s]=q.useState(null),{theme:u,toggleTheme:p}=Ss(i),{messages:m,isLoading:h,sendMessage:x}=ws(e,c),k=C=>{s(C)};return q.useEffect(()=>()=>{e&&e.releaseSession().catch(C=>{console.error("Failed to release session:",C)})},[e]),S.jsxs("div",{className:`gpc-chat-window gpc-animate-fade-in ${u==="dark"?"gpc-dark":""}`,children:[S.jsx(Fr,{onClose:r,theme:u,onToggleTheme:p,showBranding:l}),c?S.jsxs(S.Fragment,{children:[S.jsx(xs,{messages:m,isLoading:h,showMetadata:o}),S.jsx(ks,{onSendMessage:x,isLoading:h,disabled:!1})]}):S.jsx(bs,{siteKey:t,onSuccess:k,onError:a}),S.jsx(bn.Toaster,{position:"top-center"})]})};class $n{constructor(n,t){this.licenseToken=t,this.sessionToken=this._generateSessionToken(),this.api=_r.create({baseURL:n||kr,timeout:us.API_REQUEST,headers:{"Content-Type":"application/json"}}),this.api.interceptors.request.use(r=>(this.licenseToken&&(r.headers.Authorization=`Bearer ${this.licenseToken}`),r))}_generateSessionToken(){return"session_"+Array.from(crypto.getRandomValues(new Uint8Array(28))).map(n=>n.toString(16).padStart(2,"0")).join("")}async sendMessage(n,t){if(!this.licenseToken)throw new Error("License token is required.");if(!t)throw new Error("Turnstile token is required for anti-bot validation.");try{return(await this.api.post("/ask",{message:n,turnstile_token:t,session_token:this.sessionToken})).data}catch(r){this._handleError(r)}}async releaseSession(){if(!this.licenseToken){console.warn("No license token available to release session");return}try{return(await this.api.post("/release-session",{session_token:this.sessionToken})).data}catch(n){console.error("Failed to release session:",n.message)}}async checkHealth(){try{return(await this.api.get("/health")).data}catch(n){return{status:"unhealthy",error:n.message}}}getSessionToken(){return this.sessionToken}renewSessionToken(){this.sessionToken=this._generateSessionToken()}_handleError(n){if(n.response){const t=n.response.data,i={statusCode:n.response.status,errorCode:t.error_code||"UNKNOWN_ERROR",message:t.message||"Request failed",retryAfter:t.retry_after_seconds||null};throw new Error(JSON.stringify(i))}else throw n.request?new Error(JSON.stringify({statusCode:503,errorCode:"NETWORK_ERROR",message:"No response from server",retryAfter:null})):new Error(JSON.stringify({statusCode:500,errorCode:"INTERNAL_ERROR",message:n.message,retryAfter:null}))}}let Qe=null;const Cs=(e,n)=>((!Qe||n&&Qe.licenseToken!==n)&&(Qe=new $n(e,n)),Qe),Ts={title:"TIA GPC",subtitle:""},Is={title:"TIA GPC",placeholder:"Escribe tu pregunta...",send:"Enviar",close:"Cerrar",minimize:"Minimizar",typing:"Escribiendo...",thinking:"Pensando...",error:"Error al enviar mensaje",validation:"Verificando seguridad...",welcome:"¡Hola! Bienvenido a TIA GPC. ¿En qué puedo ayudarte hoy?",emptyState:"Inicia una conversación escribiendo tu pregunta",retry:"Reintentar",newChat:"Nueva conversación"},vs={light:"Claro",dark:"Oscuro",toggle:"Cambiar tema"},Ps={validation:"No se pudo verificar tu identidad. Por favor, recarga la página e intenta nuevamente.",network:"No se pudo conectar al servidor. Verifica tu conexión a internet.",rateLimit:"Has realizado demasiadas consultas. Por favor, espera un momento antes de continuar.",session:"Tu sesión ha expirado por inactividad. Por favor, recarga la página para continuar.",insufficientTokens:"Sin tokens suficientes. Por favor, recarga tokens desde tu panel de administración para continuar usando TIA GPC.",generic:"Ha ocurrido un error inesperado. Por favor, intenta nuevamente.",aiServiceUnavailable:"El asistente está temporalmente no disponible. Por favor, intenta de nuevo en unos momentos.",serverError:"El servidor encontró un problema. Por favor, intenta de nuevo más tarde."},As={verifying:"Verificando que eres humano...",error:"No se pudo completar la verificación de seguridad. Por favor, recarga la página e intenta nuevamente."},Ns={tokensUsed:"Tokens usados",responseTime:"Tiempo de respuesta",model:"Modelo"},Ls={widget:Ts,chat:Is,theme:vs,errors:Ps,turnstile:As,metadata:Ns},zs={title:"TIA GPC",subtitle:""},Os={title:"TIA GPC",placeholder:"Type your question...",send:"Send",close:"Close",minimize:"Minimize",typing:"Typing...",thinking:"Thinking...",error:"Error sending message",validation:"Verifying security...",welcome:"Hello! Welcome to TIA GPC. How can I help you today?",emptyState:"Start a conversation by typing your question",retry:"Retry",newChat:"New conversation"},_s={light:"Light",dark:"Dark",toggle:"Toggle theme"},Ms={validation:"We couldn't verify your identity. Please reload the page and try again.",network:"Unable to connect to the server. Please check your internet connection.",rateLimit:"You've made too many requests. Please wait a moment before continuing.",session:"Your session has expired due to inactivity. Please reload the page to continue.",insufficientTokens:"Insufficient tokens. Please reload tokens from your admin panel to continue using TIA GPC.",generic:"An unexpected error has occurred. Please try again.",aiServiceUnavailable:"The assistant is temporarily unavailable. Please try again in a few moments.",serverError:"The server encountered a problem. Please try again later."},Rs={verifying:"Verifying you're human...",error:"Security verification could not be completed. Please reload the page and try again."},Ds={tokensUsed:"Tokens used",responseTime:"Response time",model:"Model"},js={widget:zs,chat:Os,theme:_s,errors:Ms,turnstile:Rs,metadata:Ds},Fs={title:"TIA GPC",subtitle:""},Bs={title:"TIA GPC",placeholder:"Tapez votre question...",send:"Envoyer",close:"Fermer",minimize:"Réduire",typing:"En train d'écrire...",thinking:"Réflexion...",error:"Erreur lors de l'envoi du message",validation:"Vérification de sécurité...",welcome:"Bonjour ! Bienvenue à TIA GPC. Comment puis-je vous aider aujourd'hui ?",emptyState:"Commencez une conversation en tapant votre question",retry:"Réessayer",newChat:"Nouvelle conversation"},Us={light:"Clair",dark:"Sombre",toggle:"Changer de thème"},Hs={validation:"Nous n'avons pas pu vérifier votre identité. Veuillez recharger la page et réessayer.",network:"Impossible de se connecter au serveur. Veuillez vérifier votre connexion internet.",rateLimit:"Vous avez fait trop de demandes. Veuillez patienter un moment avant de continuer.",session:"Votre session a expiré en raison d'inactivité. Veuillez recharger la page pour continuer.",insufficientTokens:"Tokens insuffisants. Veuillez recharger des tokens depuis votre panneau d'administration pour continuer à utiliser TIA GPC.",generic:"Une erreur inattendue s'est produite. Veuillez réessayer.",aiServiceUnavailable:"L'assistant est temporairement indisponible. Veuillez réessayer dans quelques instants.",serverError:"Le serveur a rencontré un problème. Veuillez réessayer plus tard."},Vs={verifying:"Vérification que vous êtes humain...",error:"La vérification de sécurité n'a pas pu être complétée. Veuillez recharger la page et réessayer."},qs={tokensUsed:"Tokens utilisés",responseTime:"Temps de réponse",model:"Modèle"},$s={widget:Fs,chat:Bs,theme:Us,errors:Hs,turnstile:Vs,metadata:qs};Je.use(Mr).use(ue.initReactI18next).init({resources:{en:{translation:js},es:{translation:Ls},fr:{translation:$s}},fallbackLng:"en",supportedLngs:["en","es","fr"],interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"]}});const Er=({token:e,turnstileSiteKey:n=as,theme:t=ke.theme,position:r=ke.position,language:i=ke.language,primaryColor:l,width:o=ke.width,height:a=ke.height,apiUrl:c=kr,onReady:s,onError:u,onClose:p,autoOpen:m=ke.autoOpen,showBranding:h=ke.showBranding,mobileFullscreen:x=ke.mobileFullscreen,...k})=>{const[C,b]=q.useState(m),[v,T]=q.useState(!1),B=q.useMemo(()=>new $n(c,e),[c,e]);if(q.useEffect(()=>{const D=()=>{T(cs())};return D(),window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]),q.useEffect(()=>{i&&Je.changeLanguage&&Je.changeLanguage(i)},[i]),q.useEffect(()=>{e&&s&&s()},[e,s]),!e)return console.error('[TIA GPC Widget] Error: "token" prop is required'),null;const U=()=>{b(!1),p?.()},y=()=>v&&x?"gpc-position-bottom-right":`gpc-position-${r}`,M=()=>{const D={};return(!v||!x)&&(o&&(D.width=o),a&&(D.height=a)),l&&(D["--gpc-color-primary"]=l),D};return S.jsx(ue.I18nextProvider,{i18n:Je,children:S.jsxs("div",{className:`gpc-widget gpc-widget-container ${y()} ${t==="dark"?"gpc-dark":""}`,style:M(),children:[!C&&S.jsx(Rr,{onClick:()=>b(!0)}),C&&S.jsx(Es,{gpcService:B,licenseToken:e,turnstileSiteKey:n,onClose:U,themeMode:t,showBranding:h,showMetadata:k.showMetadata||!1,onError:u})]})})};Er.defaultProps={theme:"auto",position:"bottom-right",language:"en",width:"400px",height:"600px",autoOpen:!1,showBranding:!0,mobileFullscreen:!0};exports.GPCService=$n;exports.LANGUAGES=Sr;exports.THEMES=wr;exports.TiaGPCWidget=Er;exports.WIDGET_POSITIONS=br;exports.getGPCService=Cs;
|
|
15
|
+
//# sourceMappingURL=tia-gpc.cjs.js.map
|