tia-gpc-widget 1.1.3 → 1.1.5

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),O=require("react"),oe=require("react-i18next"),me=require("lucide-react"),Ft=require("react-hot-toast"),Pi=require("@marsidev/react-turnstile"),Di=require("axios"),at=require("i18next"),Li=require("i18next-browser-languagedetector"),_i=({onClick:e,unreadCount:n=0,widgetConfig:t})=>{const{t:r}=oe.useTranslation(),i=t?.company_name||r("widget.title");return T.jsxs("button",{onClick:e,className:"gpc-floating-button gpc-floating-button-with-text gpc-animate-fade-in","aria-label":r("chat.title"),title:r("chat.title"),children:[T.jsxs("div",{className:"gpc-floating-content",children:[T.jsx(me.MessageCircle,{className:"gpc-floating-icon"}),T.jsxs("span",{className:"gpc-floating-text",children:[r("widget.questionsTo")," ",i]})]}),n>0&&T.jsx("span",{className:"gpc-notification-badge",children:n>9?"9+":n})]})},Ri=({theme:e,onToggle:n})=>{const{t}=oe.useTranslation();return T.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"?T.jsx(me.Moon,{className:"gpc-icon"}):T.jsx(me.Sun,{className:"gpc-icon"})})},kt=[{code:"en",label:"English",flag:"🇬🇧"},{code:"es",label:"Español",flag:"🇪🇸"},{code:"fr",label:"Français",flag:"🇫🇷"}],zi=()=>{const{i18n:e}=oe.useTranslation(),[n,t]=O.useState(!1),r=O.useRef(null),i=kt.find(l=>l.code===e.language)||kt[0],o=l=>{e.changeLanguage(l),t(!1)};return O.useEffect(()=>{const l=a=>{r.current&&!r.current.contains(a.target)&&t(!1)};return n&&document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[n]),T.jsxs("div",{className:"gpc-language-selector",ref:r,children:[T.jsx("button",{onClick:()=>t(!n),className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":"Cambiar idioma",title:"Cambiar idioma",children:T.jsx(me.Globe,{className:"gpc-icon"})}),n&&T.jsx("div",{className:"gpc-language-dropdown",children:kt.map(l=>T.jsxs("button",{onClick:()=>o(l.code),className:`gpc-language-option ${l.code===i.code?"gpc-language-option-active":""}`,children:[T.jsx("span",{className:"gpc-language-flag",children:l.flag}),T.jsx("span",{className:"gpc-language-label",children:l.label})]},l.code))})]})},Ni=({onClose:e,theme:n,onToggleTheme:t,showBranding:r=!0,widgetConfig:i=null})=>{const{t:o}=oe.useTranslation(),l=i?.company_name||o("widget.title"),a=i?.company_logo_base64,u=a?.startsWith("data:")?a:a?`data:image/png;base64,${a}`:null;return T.jsxs("div",{className:"gpc-chat-header",children:[T.jsxs("div",{className:"gpc-header-content",children:[u&&T.jsx("div",{className:"gpc-header-logo",children:T.jsx("img",{src:u,alt:l,className:"gpc-company-logo"})}),T.jsx("div",{className:"gpc-header-text",children:T.jsx("h2",{className:"gpc-header-title",children:l})})]}),T.jsxs("div",{className:"gpc-header-actions",children:[T.jsx(zi,{}),T.jsx(Ri,{theme:n,onToggle:t}),T.jsx("button",{onClick:e,className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":o("chat.close"),title:o("chat.close"),children:T.jsx(me.ChevronDown,{className:"gpc-icon"})})]})]})};function Oi(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Fi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Mi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ji={};function bn(e,n){return(ji.jsx?Mi:Fi).test(e)}const Bi=/[ \t\n\f\r]/g;function Ui(e){return typeof e=="object"?e.type==="text"?wn(e.value):!1:wn(e)}function wn(e){return e.replace(Bi,"")===""}class Je{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Je.prototype.normal={};Je.prototype.property={};Je.prototype.space=void 0;function cr(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Je(t,r,n)}function Mt(e){return e.toLowerCase()}class ne{constructor(n,t){this.attribute=t,this.property=n}}ne.prototype.attribute="";ne.prototype.booleanish=!1;ne.prototype.boolean=!1;ne.prototype.commaOrSpaceSeparated=!1;ne.prototype.commaSeparated=!1;ne.prototype.defined=!1;ne.prototype.mustUseProperty=!1;ne.prototype.number=!1;ne.prototype.overloadedBoolean=!1;ne.prototype.property="";ne.prototype.spaceSeparated=!1;ne.prototype.space=void 0;let Hi=0;const B=Pe(),K=Pe(),jt=Pe(),v=Pe(),W=Pe(),Oe=Pe(),ie=Pe();function Pe(){return 2**++Hi}const Bt=Object.freeze(Object.defineProperty({__proto__:null,boolean:B,booleanish:K,commaOrSpaceSeparated:ie,commaSeparated:Oe,number:v,overloadedBoolean:jt,spaceSeparated:W},Symbol.toStringTag,{value:"Module"})),xt=Object.keys(Bt);class Yt extends ne{constructor(n,t,r,i){let o=-1;if(super(n,t),Sn(this,"space",i),typeof r=="number")for(;++o<xt.length;){const l=xt[o];Sn(this,xt[o],(r&Bt[l])===Bt[l])}}}Yt.prototype.defined=!0;function Sn(e,n,t){t&&(e[n]=t)}function Me(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new Yt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[Mt(r)]=r,t[Mt(o.attribute)]=r}return new Je(n,t,e.space)}const fr=Me({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:W,ariaCurrent:null,ariaDescribedBy:W,ariaDetails:null,ariaDisabled:K,ariaDropEffect:W,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:W,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:W,ariaLevel:v,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:W,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:W,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:K,ariaSetSize:v,ariaSort:null,ariaValueMax:v,ariaValueMin:v,ariaValueNow:v,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function hr(e,n){return n in e?e[n]:n}function pr(e,n){return hr(e,n.toLowerCase())}const qi=Me({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Oe,acceptCharset:W,accessKey:W,action:null,allow:null,allowFullScreen:B,allowPaymentRequest:B,allowUserMedia:B,alt:null,as:null,async:B,autoCapitalize:null,autoComplete:W,autoFocus:B,autoPlay:B,blocking:W,capture:null,charSet:null,checked:B,cite:null,className:W,cols:v,colSpan:null,content:null,contentEditable:K,controls:B,controlsList:W,coords:v|Oe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:B,defer:B,dir:null,dirName:null,disabled:B,download:jt,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:B,formTarget:null,headers:W,height:v,hidden:jt,high:v,href:null,hrefLang:null,htmlFor:W,httpEquiv:W,id:null,imageSizes:null,imageSrcSet:null,inert:B,inputMode:null,integrity:null,is:null,isMap:B,itemId:null,itemProp:W,itemRef:W,itemScope:B,itemType:W,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:B,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,multiple:B,muted:B,name:null,nonce:null,noModule:B,noValidate:B,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:B,optimum:v,pattern:null,ping:W,placeholder:null,playsInline:B,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:B,referrerPolicy:null,rel:W,required:B,reversed:B,rows:v,rowSpan:v,sandbox:W,scope:null,scoped:B,seamless:B,selected:B,shadowRootClonable:B,shadowRootDelegatesFocus:B,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v,step:null,style:null,tabIndex:v,target:null,title:null,translate:null,type:null,typeMustMatch:B,useMap:null,value:K,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:W,axis:null,background:null,bgColor:null,border:v,borderColor:null,bottomMargin:v,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:B,declare:B,event:null,face:null,frame:null,frameBorder:null,hSpace:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:B,noHref:B,noShade:B,noWrap:B,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:v,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:B,disableRemotePlayback:B,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:pr}),Vi=Me({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ie,accentHeight:v,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v,amplitude:v,arabicForm:null,ascent:v,attributeName:null,attributeType:null,azimuth:v,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v,by:null,calcMode:null,capHeight:v,className:W,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:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:B,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,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:Oe,g2:Oe,glyphName:Oe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:ie,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v,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:v,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:v,overlineThickness:v,paintOrder:null,panose1:null,path:null,pathLength:v,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:W,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ie,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ie,rev:ie,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ie,requiredFeatures:ie,requiredFonts:ie,requiredFormats:ie,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:v,specularExponent:v,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v,strikethroughThickness:v,string:null,stroke:null,strokeDashArray:ie,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v,strokeOpacity:v,strokeWidth:null,style:null,surfaceScale:v,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ie,tabIndex:v,tableValues:null,target:null,targetX:v,targetY:v,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ie,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:v,underlineThickness:v,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v,values:null,vAlphabetic:v,vMathematical:v,vectorEffect:null,vHanging:v,vIdeographic:v,version:null,vertAdvY:v,vertOriginX:v,vertOriginY:v,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hr}),mr=Me({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),dr=Me({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pr}),gr=Me({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),$i={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"},Gi=/[A-Z]/g,Cn=/-[a-z]/g,Wi=/^data[-\w.:]+$/i;function Ki(e,n){const t=Mt(n);let r=n,i=ne;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Wi.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(Cn,Qi);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!Cn.test(o)){let l=o.replace(Gi,Yi);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=Yt}return new i(r,n)}function Yi(e){return"-"+e.toLowerCase()}function Qi(e){return e.charAt(1).toUpperCase()}const Xi=cr([fr,qi,mr,dr,gr],"html"),Qt=cr([fr,Vi,mr,dr,gr],"svg");function Ji(e){return e.join(" ").trim()}function yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Re={},bt,En;function Zi(){if(En)return bt;En=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),O=require("react"),oe=require("react-i18next"),me=require("lucide-react"),Ft=require("react-hot-toast"),Pi=require("@marsidev/react-turnstile"),Di=require("axios"),at=require("i18next"),Li=require("i18next-browser-languagedetector"),_i=({onClick:e,unreadCount:n=0,widgetConfig:t})=>{const{t:r}=oe.useTranslation(),i=t?.company_name||r("widget.title");return T.jsxs("button",{onClick:e,className:"gpc-floating-button gpc-floating-button-with-text gpc-animate-fade-in gpc-pulse-animation","aria-label":r("chat.title"),title:r("chat.title"),style:{boxShadow:"0 4px 20px rgba(59, 130, 246, 0.5)"},children:[T.jsxs("div",{className:"gpc-floating-content",children:[T.jsx(me.MessageCircle,{className:"gpc-floating-icon"}),T.jsxs("span",{className:"gpc-floating-text",children:["💬 ",r("widget.questionsTo")," ",i]})]}),n>0&&T.jsx("span",{className:"gpc-notification-badge",children:n>9?"9+":n})]})},Ri=({theme:e,onToggle:n})=>{const{t}=oe.useTranslation();return T.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"?T.jsx(me.Moon,{className:"gpc-icon"}):T.jsx(me.Sun,{className:"gpc-icon"})})},kt=[{code:"en",label:"English",flag:"🇬🇧"},{code:"es",label:"Español",flag:"🇪🇸"},{code:"fr",label:"Français",flag:"🇫🇷"}],zi=()=>{const{i18n:e}=oe.useTranslation(),[n,t]=O.useState(!1),r=O.useRef(null),i=kt.find(l=>l.code===e.language)||kt[0],o=l=>{e.changeLanguage(l),t(!1)};return O.useEffect(()=>{const l=a=>{r.current&&!r.current.contains(a.target)&&t(!1)};return n&&document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[n]),T.jsxs("div",{className:"gpc-language-selector",ref:r,children:[T.jsx("button",{onClick:()=>t(!n),className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":"Cambiar idioma",title:"Cambiar idioma",children:T.jsx(me.Globe,{className:"gpc-icon"})}),n&&T.jsx("div",{className:"gpc-language-dropdown",children:kt.map(l=>T.jsxs("button",{onClick:()=>o(l.code),className:`gpc-language-option ${l.code===i.code?"gpc-language-option-active":""}`,children:[T.jsx("span",{className:"gpc-language-flag",children:l.flag}),T.jsx("span",{className:"gpc-language-label",children:l.label})]},l.code))})]})},Ni=({onClose:e,theme:n,onToggleTheme:t,showBranding:r=!0,widgetConfig:i=null})=>{const{t:o}=oe.useTranslation(),l=i?.company_name||o("widget.title"),a=i?.company_logo_base64,u=a?.startsWith("data:")?a:a?`data:image/png;base64,${a}`:null;return T.jsxs("div",{className:"gpc-chat-header",children:[T.jsxs("div",{className:"gpc-header-content",children:[u&&T.jsx("div",{className:"gpc-header-logo",children:T.jsx("img",{src:u,alt:l,className:"gpc-company-logo"})}),T.jsx("div",{className:"gpc-header-text",children:T.jsx("h2",{className:"gpc-header-title",children:l})})]}),T.jsxs("div",{className:"gpc-header-actions",children:[T.jsx(zi,{}),T.jsx(Ri,{theme:n,onToggle:t}),T.jsx("button",{onClick:e,className:"gpc-header-button gpc-focus-visible gpc-transition","aria-label":o("chat.close"),title:o("chat.close"),children:T.jsx(me.ChevronDown,{className:"gpc-icon"})})]})]})};function Oi(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Fi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Mi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ji={};function bn(e,n){return(ji.jsx?Mi:Fi).test(e)}const Bi=/[ \t\n\f\r]/g;function Ui(e){return typeof e=="object"?e.type==="text"?wn(e.value):!1:wn(e)}function wn(e){return e.replace(Bi,"")===""}class Je{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Je.prototype.normal={};Je.prototype.property={};Je.prototype.space=void 0;function cr(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Je(t,r,n)}function Mt(e){return e.toLowerCase()}class ne{constructor(n,t){this.attribute=t,this.property=n}}ne.prototype.attribute="";ne.prototype.booleanish=!1;ne.prototype.boolean=!1;ne.prototype.commaOrSpaceSeparated=!1;ne.prototype.commaSeparated=!1;ne.prototype.defined=!1;ne.prototype.mustUseProperty=!1;ne.prototype.number=!1;ne.prototype.overloadedBoolean=!1;ne.prototype.property="";ne.prototype.spaceSeparated=!1;ne.prototype.space=void 0;let Hi=0;const B=Pe(),K=Pe(),jt=Pe(),v=Pe(),W=Pe(),Oe=Pe(),ie=Pe();function Pe(){return 2**++Hi}const Bt=Object.freeze(Object.defineProperty({__proto__:null,boolean:B,booleanish:K,commaOrSpaceSeparated:ie,commaSeparated:Oe,number:v,overloadedBoolean:jt,spaceSeparated:W},Symbol.toStringTag,{value:"Module"})),xt=Object.keys(Bt);class Yt extends ne{constructor(n,t,r,i){let o=-1;if(super(n,t),Sn(this,"space",i),typeof r=="number")for(;++o<xt.length;){const l=xt[o];Sn(this,xt[o],(r&Bt[l])===Bt[l])}}}Yt.prototype.defined=!0;function Sn(e,n,t){t&&(e[n]=t)}function Me(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new Yt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[Mt(r)]=r,t[Mt(o.attribute)]=r}return new Je(n,t,e.space)}const fr=Me({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:W,ariaCurrent:null,ariaDescribedBy:W,ariaDetails:null,ariaDisabled:K,ariaDropEffect:W,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:W,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:W,ariaLevel:v,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:W,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:W,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:K,ariaSetSize:v,ariaSort:null,ariaValueMax:v,ariaValueMin:v,ariaValueNow:v,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function hr(e,n){return n in e?e[n]:n}function pr(e,n){return hr(e,n.toLowerCase())}const qi=Me({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Oe,acceptCharset:W,accessKey:W,action:null,allow:null,allowFullScreen:B,allowPaymentRequest:B,allowUserMedia:B,alt:null,as:null,async:B,autoCapitalize:null,autoComplete:W,autoFocus:B,autoPlay:B,blocking:W,capture:null,charSet:null,checked:B,cite:null,className:W,cols:v,colSpan:null,content:null,contentEditable:K,controls:B,controlsList:W,coords:v|Oe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:B,defer:B,dir:null,dirName:null,disabled:B,download:jt,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:B,formTarget:null,headers:W,height:v,hidden:jt,high:v,href:null,hrefLang:null,htmlFor:W,httpEquiv:W,id:null,imageSizes:null,imageSrcSet:null,inert:B,inputMode:null,integrity:null,is:null,isMap:B,itemId:null,itemProp:W,itemRef:W,itemScope:B,itemType:W,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:B,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,multiple:B,muted:B,name:null,nonce:null,noModule:B,noValidate:B,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:B,optimum:v,pattern:null,ping:W,placeholder:null,playsInline:B,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:B,referrerPolicy:null,rel:W,required:B,reversed:B,rows:v,rowSpan:v,sandbox:W,scope:null,scoped:B,seamless:B,selected:B,shadowRootClonable:B,shadowRootDelegatesFocus:B,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v,step:null,style:null,tabIndex:v,target:null,title:null,translate:null,type:null,typeMustMatch:B,useMap:null,value:K,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:W,axis:null,background:null,bgColor:null,border:v,borderColor:null,bottomMargin:v,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:B,declare:B,event:null,face:null,frame:null,frameBorder:null,hSpace:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:B,noHref:B,noShade:B,noWrap:B,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:v,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:B,disableRemotePlayback:B,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:pr}),Vi=Me({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ie,accentHeight:v,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v,amplitude:v,arabicForm:null,ascent:v,attributeName:null,attributeType:null,azimuth:v,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v,by:null,calcMode:null,capHeight:v,className:W,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:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:B,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,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:Oe,g2:Oe,glyphName:Oe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:ie,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v,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:v,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:v,overlineThickness:v,paintOrder:null,panose1:null,path:null,pathLength:v,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:W,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ie,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ie,rev:ie,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ie,requiredFeatures:ie,requiredFonts:ie,requiredFormats:ie,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:v,specularExponent:v,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v,strikethroughThickness:v,string:null,stroke:null,strokeDashArray:ie,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v,strokeOpacity:v,strokeWidth:null,style:null,surfaceScale:v,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ie,tabIndex:v,tableValues:null,target:null,targetX:v,targetY:v,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ie,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:v,underlineThickness:v,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v,values:null,vAlphabetic:v,vMathematical:v,vectorEffect:null,vHanging:v,vIdeographic:v,version:null,vertAdvY:v,vertOriginX:v,vertOriginY:v,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hr}),mr=Me({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),dr=Me({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pr}),gr=Me({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),$i={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"},Gi=/[A-Z]/g,Cn=/-[a-z]/g,Wi=/^data[-\w.:]+$/i;function Ki(e,n){const t=Mt(n);let r=n,i=ne;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Wi.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(Cn,Qi);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!Cn.test(o)){let l=o.replace(Gi,Yi);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=Yt}return new i(r,n)}function Yi(e){return"-"+e.toLowerCase()}function Qi(e){return e.charAt(1).toUpperCase()}const Xi=cr([fr,qi,mr,dr,gr],"html"),Qt=cr([fr,Vi,mr,dr,gr],"svg");function Ji(e){return e.join(" ").trim()}function yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Re={},bt,En;function Zi(){if(En)return bt;En=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
2
2
  `,s="/",f="*",c="",p="comment",h="declaration";bt=function(k,C){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];C=C||{};var y=1,E=1;function w(P){var L=P.match(n);L&&(y+=L.length);var F=P.lastIndexOf(u);E=~F?P.length-F:E+P.length}function _(){var P={line:y,column:E};return function(L){return L.position=new R(P),U(),L}}function R(P){this.start=P,this.end={line:y,column:E},this.source=C.source}R.prototype.content=k;function b(P){var L=new Error(C.source+":"+y+":"+E+": "+P);if(L.reason=P,L.filename=C.source,L.line=y,L.column=E,L.source=k,!C.silent)throw L}function N(P){var L=P.exec(k);if(L){var F=L[0];return w(F),k=k.slice(F.length),L}}function U(){N(t)}function M(P){var L;for(P=P||[];L=x();)L!==!1&&P.push(L);return P}function x(){var P=_();if(!(s!=k.charAt(0)||f!=k.charAt(1))){for(var L=2;c!=k.charAt(L)&&(f!=k.charAt(L)||s!=k.charAt(L+1));)++L;if(L+=2,c===k.charAt(L-1))return b("End of comment missing");var F=k.slice(2,L-2);return E+=2,w(F),k=k.slice(L),E+=2,P({type:p,comment:F})}}function D(){var P=_(),L=N(r);if(L){if(x(),!N(i))return b("property missing ':'");var F=N(o),Y=P({type:h,property:g(L[0].replace(e,c)),value:F?g(F[0].replace(e,c)):c});return N(l),Y}}function A(){var P=[];M(P);for(var L;L=D();)L!==!1&&(P.push(L),M(P));return P}return U(),A()};function g(k){return k?k.replace(a,c):c}return bt}var Tn;function el(){if(Tn)return Re;Tn=1;var e=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.default=t;const n=e(Zi());function t(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,n.default)(r),a=typeof i=="function";return l.forEach(u=>{if(u.type!=="declaration")return;const{property:s,value:f}=u;a?i(s,f,u):f&&(o=o||{},o[s]=f)}),o}return Re}var qe={},vn;function tl(){if(vn)return qe;vn=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(s){return!s||t.test(s)||e.test(s)},l=function(s,f){return f.toUpperCase()},a=function(s,f){return"".concat(f,"-")},u=function(s,f){return f===void 0&&(f={}),o(s)?s:(s=s.toLowerCase(),f.reactCompat?s=s.replace(i,a):s=s.replace(r,a),s.replace(n,l))};return qe.camelCase=u,qe}var Ve,In;function nl(){if(In)return Ve;In=1;var e=Ve&&Ve.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(el()),t=tl();function r(i,o){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(a,u){a&&u&&(l[(0,t.camelCase)(a,o)]=u)}),l}return r.default=r,Ve=r,Ve}var rl=nl();const il=yr(rl),kr=xr("end"),Xt=xr("start");function xr(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 ll(e){const n=Xt(e),t=kr(e);if(n&&t)return{start:n,end:t}}function We(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?An(e.position):"start"in e||"end"in e?An(e):"line"in e||"column"in e?Ut(e):""}function Ut(e){return Pn(e&&e.line)+":"+Pn(e&&e.column)}function An(e){return Ut(e&&e.start)+"-"+Ut(e&&e.end)}function Pn(e){return e&&typeof e=="number"?e:1}class Z extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=We(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Z.prototype.file="";Z.prototype.name="";Z.prototype.reason="";Z.prototype.message="";Z.prototype.stack="";Z.prototype.column=void 0;Z.prototype.line=void 0;Z.prototype.ancestors=void 0;Z.prototype.cause=void 0;Z.prototype.fatal=void 0;Z.prototype.place=void 0;Z.prototype.ruleId=void 0;Z.prototype.source=void 0;const Jt={}.hasOwnProperty,ol=new Map,al=/[A-Z]/g,sl=new Set(["table","tbody","thead","tfoot","tr"]),ul=new Set(["td","th"]),br="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function cl(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=kl(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=yl(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"?Qt:Xi,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=wr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function wr(e,n,t){if(n.type==="element")return fl(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return hl(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return ml(e,n,t);if(n.type==="mdxjsEsm")return pl(e,n);if(n.type==="root")return dl(e,n,t);if(n.type==="text")return gl(e,n)}function fl(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Qt,e.schema=i),e.ancestors.push(n);const o=Cr(e,n.tagName,!1),l=xl(e,n);let a=en(e,n);return sl.has(n.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Ui(u):!0})),Sr(e,l,o,n),Zt(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function hl(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 pl(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Qe(e,n.position)}function ml(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Qt,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:Cr(e,n.name,!0),l=bl(e,n),a=en(e,n);return Sr(e,l,o,n),Zt(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function dl(e,n,t){const r={};return Zt(r,en(e,n)),e.create(n,e.Fragment,r,t)}function gl(e,n){return n.value}function Sr(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Zt(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function yl(e,n,t){return r;function r(i,o,l,a){const s=Array.isArray(l.children)?t:n;return a?s(o,l,a):s(o,l)}}function kl(e,n){return t;function t(r,i,o,l){const a=Array.isArray(o.children),u=Xt(r);return n(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function xl(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Jt.call(n.properties,i)){const o=wl(e,i,n.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&ul.has(n.tagName)?r=a:t[l]=a}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function bl(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Qe(e,n.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else Qe(e,n.position);else o=r.value===null?!0:r.value;t[i]=o}return t}function en(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:ol;for(;++r<n.children.length;){const o=n.children[r];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const s=i.get(u)||0;l=u+"-"+s,i.set(u,s+1)}}const a=wr(e,o,l);a!==void 0&&t.push(a)}return t}function wl(e,n,t){const r=Ki(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?Oi(t):Ji(t)),r.property==="style"){let i=typeof t=="object"?t:Sl(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Cl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?$i[r.property]||r.property:r.attribute,t]}}function Sl(e,n){try{return il(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new Z("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=br+"#cannot-parse-style-attribute",i}}function Cr(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let o=-1,l;for(;++o<i.length;){const a=bn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=bn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return Jt.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 Z("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=br+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Cl(e){const n={};let t;for(t in e)Jt.call(e,t)&&(n[El(t)]=e[t]);return n}function El(e){let n=e.replace(al,Tl);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Tl(e){return"-"+e.toLowerCase()}const wt={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"]},vl={};function tn(e,n){const t=vl,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Er(e,r,i)}function Er(e,n,t){if(Il(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 Dn(e.children,n,t)}return Array.isArray(e)?Dn(e,n,t):""}function Dn(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Er(e[i],n,t);return r.join("")}function Il(e){return!!(e&&typeof e=="object")}const Ln=document.createElement("i");function nn(e){const n="&"+e+";";Ln.innerHTML=n;const t=Ln.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function le(e,n,t,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function ae(e,n){return e.length>0?(le(e,e.length,0,n),e):n}const _n={}.hasOwnProperty;function Tr(e){const n={};let t=-1;for(;++t<e.length;)Al(n,e[t]);return n}function Al(e,n){let t;for(t in n){const i=(_n.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let l;if(o)for(l in o){_n.call(i,l)||(i[l]=[]);const a=o[l];Pl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Pl(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);le(e,0,0,r)}function vr(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 he(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ee=Ee(/[A-Za-z]/),J=Ee(/[\dA-Za-z]/),Dl=Ee(/[#-'*+\--9=?A-Z^-~]/);function ut(e){return e!==null&&(e<32||e===127)}const Ht=Ee(/\d/),Ll=Ee(/[\dA-Fa-f]/),_l=Ee(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function G(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}const pt=Ee(new RegExp("\\p{P}|\\p{S}","u")),Ae=Ee(/\s/);function Ee(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function je(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let l="";if(o===37&&J(e.charCodeAt(t+1))&&J(e.charCodeAt(t+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function V(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return H(u)?(e.enter(t),a(u)):n(u)}function a(u){return H(u)&&o++<i?(e.consume(u),a):(e.exit(t),n(u))}}const Rl={tokenize:zl};function zl(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"),V(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return z(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Nl={tokenize:Ol},Rn={tokenize:Fl};function Ol(e){const n=this,t=[];let r=0,i,o,l;return a;function a(w){if(r<t.length){const _=t[r];return n.containerState=_[1],e.attempt(_[0].continuation,u,s)(w)}return s(w)}function u(w){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&E();const _=n.events.length;let R=_,b;for(;R--;)if(n.events[R][0]==="exit"&&n.events[R][1].type==="chunkFlow"){b=n.events[R][1].end;break}y(r);let N=_;for(;N<n.events.length;)n.events[N][1].end={...b},N++;return le(n.events,R+1,0,n.events.slice(_)),n.events.length=N,s(w)}return a(w)}function s(w){if(r===t.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return g(w);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Rn,f,c)(w)}function f(w){return i&&E(),y(r),p(w)}function c(w){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,g(w)}function p(w){return n.containerState={},e.attempt(Rn,h,g)(w)}function h(w){return r++,t.push([n.currentConstruct,n.containerState]),p(w)}function g(w){if(w===null){i&&E(),y(0),e.consume(w);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),k(w)}function k(w){if(w===null){C(e.exit("chunkFlow"),!0),y(0),e.consume(w);return}return z(w)?(e.consume(w),C(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(w),k)}function C(w,_){const R=n.sliceStream(w);if(_&&R.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(R),n.parser.lazy[w.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const N=n.events.length;let U=N,M,x;for(;U--;)if(n.events[U][0]==="exit"&&n.events[U][1].type==="chunkFlow"){if(M){x=n.events[U][1].end;break}M=!0}for(y(r),b=N;b<n.events.length;)n.events[b][1].end={...x},b++;le(n.events,U+1,0,n.events.slice(N)),n.events.length=b}}function y(w){let _=t.length;for(;_-- >w;){const R=t[_];n.containerState=R[1],R[0].exit.call(n,e)}t.length=w}function E(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Fl(e,n,t){return V(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fe(e){if(e===null||G(e)||Ae(e))return 1;if(pt(e))return 2}function mt(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const qt={name:"attention",resolveAll:Ml,tokenize:jl};function Ml(e,n){let t=-1,r,i,o,l,a,u,s,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[t][1].start};zn(c,-u),zn(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=ae(s,[["enter",e[r][1],n],["exit",e[r][1],n]])),s=ae(s,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",o,n]]),s=ae(s,mt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),s=ae(s,[["exit",o,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,s=ae(s,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,le(e,r-1,t-r+3,s),t=r+s.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function jl(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fe(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const s=e.exit("attentionSequence"),f=Fe(u),c=!f||f===2&&i||t.includes(u),p=!i||i===2&&f||t.includes(r);return s._open=!!(o===42?c:c&&(i||!p)),s._close=!!(o===42?p:p&&(f||!c)),n(u)}}function zn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Bl={name:"autolink",tokenize:Ul};function Ul(e,n,t){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return ee(h)?(e.consume(h),l):h===64?t(h):s(h)}function l(h){return h===43||h===45||h===46||J(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||J(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):h===null||h===32||h===60||ut(h)?t(h):(e.consume(h),u)}function s(h){return h===64?(e.consume(h),f):Dl(h)?(e.consume(h),s):t(h)}function f(h){return J(h)?c(h):t(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):p(h)}function p(h){if((h===45||J(h))&&r++<63){const g=h===45?p:c;return e.consume(h),g}return t(h)}}const Ze={partial:!0,tokenize:Hl};function Hl(e,n,t){return r;function r(o){return H(o)?V(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||z(o)?n(o):t(o)}}const Ir={continuation:{tokenize:Vl},exit:$l,name:"blockQuote",tokenize:ql};function ql(e,n,t){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return t(l)}function o(l){return H(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function Vl(e,n,t){const r=this;return i;function i(l){return H(l)?V(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Ir,n,t)(l)}}function $l(e){e.exit("blockQuote")}const Ar={name:"characterEscape",tokenize:Gl};function Gl(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return _l(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}const Pr={name:"characterReference",tokenize:Wl};function Wl(e,n,t){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,l=J,f(c))}function s(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Ll,f):(e.enter("characterReferenceValue"),o=7,l=Ht,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===J&&!nn(r.sliceSerialize(p))?t(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(c)&&i++<o?(e.consume(c),f):t(c)}}const Nn={partial:!0,tokenize:Yl},On={concrete:!0,name:"codeFenced",tokenize:Kl};function Kl(e,n,t){const r=this,i={partial:!0,tokenize:R};let o=0,l=0,a;return u;function u(b){return s(b)}function s(b){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===a?(l++,e.consume(b),f):l<3?t(b):(e.exit("codeFencedFenceSequence"),H(b)?V(e,c,"whitespace")(b):c(b))}function c(b){return b===null||z(b)?(e.exit("codeFencedFence"),r.interrupt?n(b):e.check(Nn,k,_)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||z(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(b)):H(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),V(e,h,"whitespace")(b)):b===96&&b===a?t(b):(e.consume(b),p)}function h(b){return b===null||z(b)?c(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||z(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===a?t(b):(e.consume(b),g)}function k(b){return e.attempt(i,_,C)(b)}function C(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y}function y(b){return o>0&&H(b)?V(e,E,"linePrefix",o+1)(b):E(b)}function E(b){return b===null||z(b)?e.check(Nn,k,_)(b):(e.enter("codeFlowValue"),w(b))}function w(b){return b===null||z(b)?(e.exit("codeFlowValue"),E(b)):(e.consume(b),w)}function _(b){return e.exit("codeFenced"),n(b)}function R(b,N,U){let M=0;return x;function x(F){return b.enter("lineEnding"),b.consume(F),b.exit("lineEnding"),D}function D(F){return b.enter("codeFencedFence"),H(F)?V(b,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):A(F)}function A(F){return F===a?(b.enter("codeFencedFenceSequence"),P(F)):U(F)}function P(F){return F===a?(M++,b.consume(F),P):M>=l?(b.exit("codeFencedFenceSequence"),H(F)?V(b,L,"whitespace")(F):L(F)):U(F)}function L(F){return F===null||z(F)?(b.exit("codeFencedFence"),N(F)):U(F)}}}function Yl(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const St={name:"codeIndented",tokenize:Xl},Ql={partial:!0,tokenize:Jl};function Xl(e,n,t){const r=this;return i;function i(s){return e.enter("codeIndented"),V(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(s):t(s)}function l(s){return s===null?u(s):z(s)?e.attempt(Ql,l,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||z(s)?(e.exit("codeFlowValue"),l(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),n(s)}}function Jl(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):z(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):V(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):z(l)?i(l):t(l)}}const Zl={name:"codeText",previous:to,resolve:eo,tokenize:no};function eo(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 to(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function no(e,n,t){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?t(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):z(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),s(c))}function s(c){return c===null||c===32||c===96||z(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),s)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(c)):(o.type="codeTextData",s(c))}}class ro{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&$e(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),$e(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),$e(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);$e(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);$e(this.left,t.reverse())}}}function $e(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Dr(e){const n={};let t=-1,r,i,o,l,a,u,s;const f=new ro(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,io(f,t)),t=n[t],s=!0);else if(r[1]._container){for(o=t,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,t),a.unshift(r),f.splice(i,t-i+1,a))}}return le(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!s}function io(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],s={};let f,c,p=-1,h=t,g=0,k=0;const C=[k];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=t;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(k=p+1,C.push(k),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):C.pop(),p=C.length;p--;){const y=a.slice(C[p],C[p+1]),E=o.pop();u.push([E,E+y.length-1]),e.splice(E,2,y)}for(u.reverse(),p=-1;++p<u.length;)s[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return s}const lo={resolve:ao,tokenize:so},oo={partial:!0,tokenize:uo};function ao(e){return Dr(e),e}function so(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):z(a)?e.check(oo,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function uo(e,n,t){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),V(e,o,"linePrefix")}function o(l){if(l===null||z(l))return t(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function Lr(e,n,t,r,i,o,l,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),p):y===null||y===32||y===41||ut(y)?t(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),k(y))}function p(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(a),p(y)):y===null||y===60||z(y)?t(y):(e.consume(y),y===92?g:h)}function g(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function k(y){return!f&&(y===null||y===41||G(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(y)):f<s&&y===40?(e.consume(y),f++,k):y===41?(e.consume(y),f--,k):y===null||y===32||y===40||ut(y)?t(y):(e.consume(y),y===92?C:k)}function C(y){return y===40||y===41||y===92?(e.consume(y),k):k(y)}}function _r(e,n,t,r,i,o){const l=this;let a=0,u;return s;function s(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||z(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!H(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function Rr(e,n,t,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):t(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),u(l)):p===null?t(p):z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),V(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||z(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function Ke(e,n){let t;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):H(i)?V(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const co={name:"definition",tokenize:ho},fo={partial:!0,tokenize:po};function ho(e,n,t){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return _r.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=he(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):t(h)}function u(h){return G(h)?Ke(e,s)(h):s(h)}function s(h){return Lr(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(fo,c,c)(h)}function c(h){return H(h)?V(e,p,"whitespace")(h):p(h)}function p(h){return h===null||z(h)?(e.exit("definition"),r.parser.defined.push(i),n(h)):t(h)}}function po(e,n,t){return r;function r(a){return G(a)?Ke(e,i)(a):t(a)}function i(a){return Rr(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return H(a)?V(e,l,"whitespace")(a):l(a)}function l(a){return a===null||z(a)?n(a):t(a)}}const mo={name:"hardBreakEscape",tokenize:go};function go(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return z(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const yo={name:"headingAtx",resolve:ko,tokenize:xo};function ko(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},le(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function xo(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||G(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||z(f)?(e.exit("atxHeading"),n(f)):H(f)?V(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||G(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const bo=["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"],Fn=["pre","script","style","textarea"],wo={concrete:!0,name:"htmlFlow",resolveTo:Eo,tokenize:To},So={partial:!0,tokenize:Io},Co={partial:!0,tokenize:vo};function Eo(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 To(e,n,t){const r=this;let i,o,l,a,u;return s;function s(d){return f(d)}function f(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),c}function c(d){return d===33?(e.consume(d),p):d===47?(e.consume(d),o=!0,k):d===63?(e.consume(d),i=3,r.interrupt?n:m):ee(d)?(e.consume(d),l=String.fromCharCode(d),C):t(d)}function p(d){return d===45?(e.consume(d),i=2,h):d===91?(e.consume(d),i=5,a=0,g):ee(d)?(e.consume(d),i=4,r.interrupt?n:m):t(d)}function h(d){return d===45?(e.consume(d),r.interrupt?n:m):t(d)}function g(d){const ce="CDATA[";return d===ce.charCodeAt(a++)?(e.consume(d),a===ce.length?r.interrupt?n:A:g):t(d)}function k(d){return ee(d)?(e.consume(d),l=String.fromCharCode(d),C):t(d)}function C(d){if(d===null||d===47||d===62||G(d)){const ce=d===47,Te=l.toLowerCase();return!ce&&!o&&Fn.includes(Te)?(i=1,r.interrupt?n(d):A(d)):bo.includes(l.toLowerCase())?(i=6,ce?(e.consume(d),y):r.interrupt?n(d):A(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(d):o?E(d):w(d))}return d===45||J(d)?(e.consume(d),l+=String.fromCharCode(d),C):t(d)}function y(d){return d===62?(e.consume(d),r.interrupt?n:A):t(d)}function E(d){return H(d)?(e.consume(d),E):x(d)}function w(d){return d===47?(e.consume(d),x):d===58||d===95||ee(d)?(e.consume(d),_):H(d)?(e.consume(d),w):x(d)}function _(d){return d===45||d===46||d===58||d===95||J(d)?(e.consume(d),_):R(d)}function R(d){return d===61?(e.consume(d),b):H(d)?(e.consume(d),R):w(d)}function b(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),u=d,N):H(d)?(e.consume(d),b):U(d)}function N(d){return d===u?(e.consume(d),u=null,M):d===null||z(d)?t(d):(e.consume(d),N)}function U(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||G(d)?R(d):(e.consume(d),U)}function M(d){return d===47||d===62||H(d)?w(d):t(d)}function x(d){return d===62?(e.consume(d),D):t(d)}function D(d){return d===null||z(d)?A(d):H(d)?(e.consume(d),D):t(d)}function A(d){return d===45&&i===2?(e.consume(d),Y):d===60&&i===1?(e.consume(d),Q):d===62&&i===4?(e.consume(d),ue):d===63&&i===3?(e.consume(d),m):d===93&&i===5?(e.consume(d),ge):z(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(So,ye,P)(d)):d===null||z(d)?(e.exit("htmlFlowData"),P(d)):(e.consume(d),A)}function P(d){return e.check(Co,L,ye)(d)}function L(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),F}function F(d){return d===null||z(d)?P(d):(e.enter("htmlFlowData"),A(d))}function Y(d){return d===45?(e.consume(d),m):A(d)}function Q(d){return d===47?(e.consume(d),l="",se):A(d)}function se(d){if(d===62){const ce=l.toLowerCase();return Fn.includes(ce)?(e.consume(d),ue):A(d)}return ee(d)&&l.length<8?(e.consume(d),l+=String.fromCharCode(d),se):A(d)}function ge(d){return d===93?(e.consume(d),m):A(d)}function m(d){return d===62?(e.consume(d),ue):d===45&&i===2?(e.consume(d),m):A(d)}function ue(d){return d===null||z(d)?(e.exit("htmlFlowData"),ye(d)):(e.consume(d),ue)}function ye(d){return e.exit("htmlFlow"),n(d)}}function vo(e,n,t){const r=this;return i;function i(l){return z(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):t(l)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function Io(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ze,n,t)}}const Ao={name:"htmlText",tokenize:Po};function Po(e,n,t){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),s):m===47?(e.consume(m),R):m===63?(e.consume(m),w):ee(m)?(e.consume(m),U):t(m)}function s(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,g):ee(m)?(e.consume(m),E):t(m)}function f(m){return m===45?(e.consume(m),h):t(m)}function c(m){return m===null?t(m):m===45?(e.consume(m),p):z(m)?(l=c,Q(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?Y(m):m===45?p(m):c(m)}function g(m){const ue="CDATA[";return m===ue.charCodeAt(o++)?(e.consume(m),o===ue.length?k:g):t(m)}function k(m){return m===null?t(m):m===93?(e.consume(m),C):z(m)?(l=k,Q(m)):(e.consume(m),k)}function C(m){return m===93?(e.consume(m),y):k(m)}function y(m){return m===62?Y(m):m===93?(e.consume(m),y):k(m)}function E(m){return m===null||m===62?Y(m):z(m)?(l=E,Q(m)):(e.consume(m),E)}function w(m){return m===null?t(m):m===63?(e.consume(m),_):z(m)?(l=w,Q(m)):(e.consume(m),w)}function _(m){return m===62?Y(m):w(m)}function R(m){return ee(m)?(e.consume(m),b):t(m)}function b(m){return m===45||J(m)?(e.consume(m),b):N(m)}function N(m){return z(m)?(l=N,Q(m)):H(m)?(e.consume(m),N):Y(m)}function U(m){return m===45||J(m)?(e.consume(m),U):m===47||m===62||G(m)?M(m):t(m)}function M(m){return m===47?(e.consume(m),Y):m===58||m===95||ee(m)?(e.consume(m),x):z(m)?(l=M,Q(m)):H(m)?(e.consume(m),M):Y(m)}function x(m){return m===45||m===46||m===58||m===95||J(m)?(e.consume(m),x):D(m)}function D(m){return m===61?(e.consume(m),A):z(m)?(l=D,Q(m)):H(m)?(e.consume(m),D):M(m)}function A(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),i=m,P):z(m)?(l=A,Q(m)):H(m)?(e.consume(m),A):(e.consume(m),L)}function P(m){return m===i?(e.consume(m),i=void 0,F):m===null?t(m):z(m)?(l=P,Q(m)):(e.consume(m),P)}function L(m){return m===null||m===34||m===39||m===60||m===61||m===96?t(m):m===47||m===62||G(m)?M(m):(e.consume(m),L)}function F(m){return m===47||m===62||G(m)?M(m):t(m)}function Y(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),n):t(m)}function Q(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),se}function se(m){return H(m)?V(e,ge,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):ge(m)}function ge(m){return e.enter("htmlTextData"),l(m)}}const rn={name:"labelEnd",resolveAll:Ro,resolveTo:zo,tokenize:No},Do={tokenize:Oo},Lo={tokenize:Fo},_o={tokenize:Mo};function Ro(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&le(e,0,e.length,t),e}function zo(e,n){let t=e.length,r=0,i,o,l,a;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,n],["enter",s,n]],a=ae(a,e.slice(o+1,o+r+3)),a=ae(a,[["enter",f,n]]),a=ae(a,mt(n.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),n)),a=ae(a,[["exit",f,n],e[l-2],e[l-1],["exit",s,n]]),a=ae(a,e.slice(l+1)),a=ae(a,[["exit",u,n]]),le(e,o,e.length,a),e}function No(e,n,t){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(he(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):t(p)}function u(p){return p===40?e.attempt(Do,f,l?f:c)(p):p===91?e.attempt(Lo,f,l?s:c)(p):l?f(p):c(p)}function s(p){return e.attempt(_o,f,c)(p)}function f(p){return n(p)}function c(p){return o._balanced=!0,t(p)}}function Oo(e,n,t){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return G(c)?Ke(e,o)(c):o(c)}function o(c){return c===41?f(c):Lr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return G(c)?Ke(e,u)(c):f(c)}function a(c){return t(c)}function u(c){return c===34||c===39||c===40?Rr(e,s,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function s(c){return G(c)?Ke(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),n):t(c)}}function Fo(e,n,t){const r=this;return i;function i(a){return _r.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(he(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function Mo(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}const jo={name:"labelStartImage",resolveAll:rn.resolveAll,tokenize:Bo};function Bo(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const Uo={name:"labelStartLink",resolveAll:rn.resolveAll,tokenize:Ho};function Ho(e,n,t){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const Ct={name:"lineEnding",tokenize:qo};function qo(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),V(e,n,"linePrefix")}}const st={name:"thematicBreak",tokenize:Vo};function Vo(e,n,t){let r=0,i;return o;function o(s){return e.enter("thematicBreak"),l(s)}function l(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),u(s)):r>=3&&(s===null||z(s))?(e.exit("thematicBreak"),n(s)):t(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),H(s)?V(e,a,"whitespace")(s):a(s))}}const te={continuation:{tokenize:Ko},exit:Qo,name:"list",tokenize:Wo},$o={partial:!0,tokenize:Xo},Go={partial:!0,tokenize:Yo};function Wo(e,n,t){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Ht(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(st,t,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return t(h)}function u(h){return Ht(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):t(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Ze,r.interrupt?t:f,e.attempt($o,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return H(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):t(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(h)}}function Ko(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ze,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,V(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!H(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Go,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,V(e,e.attempt(te,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Yo(e,n,t){const r=this;return V(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(o):t(o)}}function Qo(e){e.exit(this.containerState.type)}function Xo(e,n,t){const r=this;return V(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!H(o)&&l&&l[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const Mn={name:"setextUnderline",resolveTo:Jo,tokenize:Zo};function Jo(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function Zo(e,n,t){const r=this;let i;return o;function o(s){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=s,l(s)):t(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),H(s)?V(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||z(s)?(e.exit("setextHeadingLine"),n(s)):t(s)}}const ea={tokenize:ta};function ta(e){const n=this,t=e.attempt(Ze,r,e.attempt(this.parser.constructs.flowInitial,i,V(e,e.attempt(this.parser.constructs.flow,i,e.attempt(lo,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const na={resolveAll:Nr()},ra=zr("string"),ia=zr("text");function zr(e){return{resolveAll:Nr(e==="text"?la:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),u}function u(f){return s(f)?(t.exit("data"),o(f)):(t.consume(f),u)}function s(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Nr(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function la(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const s=i[o];if(typeof s=="string"){for(l=s.length;s.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(s===-2)u=!0,a++;else if(s!==-1){o++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const s={type:t===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(t,0,["enter",s,n],["exit",s,n]),t+=2)}t++}return e}const oa={42:te,43:te,45:te,48:te,49:te,50:te,51:te,52:te,53:te,54:te,55:te,56:te,57:te,62:Ir},aa={91:co},sa={[-2]:St,[-1]:St,32:St},ua={35:yo,42:st,45:[Mn,st],60:wo,61:Mn,95:st,96:On,126:On},ca={38:Pr,92:Ar},fa={[-5]:Ct,[-4]:Ct,[-3]:Ct,33:jo,38:Pr,42:qt,60:[Bl,Ao],91:Uo,92:[mo,Ar],93:rn,95:qt,96:Zl},ha={null:[qt,na]},pa={null:[42,95]},ma={null:[]},da=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:pa,contentInitial:aa,disable:ma,document:oa,flow:ua,flowInitial:sa,insideSpan:ha,string:ca,text:fa},Symbol.toStringTag,{value:"Module"}));function ga(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:N(R),check:N(b),consume:E,enter:w,exit:_,interrupt:N(b,{interrupt:!0})},s={code:null,containerState:{},defineSkip:k,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=n.tokenize.call(s,u);return n.resolveAll&&o.push(n),s;function c(D){return l=ae(l,D),C(),l[l.length-1]!==null?[]:(U(n,0),s.events=mt(o,s.events,s),s.events)}function p(D,A){return ka(h(D),A)}function h(D){return ya(l,D)}function g(){const{_bufferIndex:D,_index:A,line:P,column:L,offset:F}=r;return{_bufferIndex:D,_index:A,line:P,column:L,offset:F}}function k(D){i[D.line]=D.column,x()}function C(){let D;for(;r._index<l.length;){const A=l[r._index];if(typeof A=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<A.length;)y(A.charCodeAt(r._bufferIndex));else y(A)}}function y(D){f=f(D)}function E(D){z(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,x()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=D}function w(D,A){const P=A||{};return P.type=D,P.start=g(),s.events.push(["enter",P,s]),a.push(P),P}function _(D){const A=a.pop();return A.end=g(),s.events.push(["exit",A,s]),A}function R(D,A){U(D,A.from)}function b(D,A){A.restore()}function N(D,A){return P;function P(L,F,Y){let Q,se,ge,m;return Array.isArray(L)?ye(L):"tokenize"in L?ye([L]):ue(L);function ue(X){return Be;function Be(we){const De=we!==null&&X[we],Le=we!==null&&X.null,tt=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(Le)?Le:Le?[Le]:[]];return ye(tt)(we)}}function ye(X){return Q=X,se=0,X.length===0?Y:d(X[se])}function d(X){return Be;function Be(we){return m=M(),ge=X,X.partial||(s.currentConstruct=X),X.name&&s.parser.constructs.disable.null.includes(X.name)?Te():X.tokenize.call(A?Object.assign(Object.create(s),A):s,u,ce,Te)(we)}}function ce(X){return D(ge,m),F}function Te(X){return m.restore(),++se<Q.length?d(Q[se]):Y}}}function U(D,A){D.resolveAll&&!o.includes(D)&&o.push(D),D.resolve&&le(s.events,A,s.events.length-A,D.resolve(s.events.slice(A),s)),D.resolveTo&&(s.events=D.resolveTo(s.events,s))}function M(){const D=g(),A=s.previous,P=s.currentConstruct,L=s.events.length,F=Array.from(a);return{from:L,restore:Y};function Y(){r=D,s.previous=A,s.currentConstruct=P,s.events.length=L,a=F,x()}}function x(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ya(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,o)];else{if(l=e.slice(t,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function ka(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
3
3
  `;break}case-3:{l=`\r
4
4
  `;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function xa(e){const r={constructs:Tr([da,...(e||{}).extensions||[]]),content:i(Rl),defined:[],document:i(Nl),flow:i(ea),lazy:{},string:i(ra),text:i(ia)};return r;function i(o){return l;function l(a){return ga(r,o,a)}}}function ba(e){for(;!Dr(e););return e}const jn=/[\0\t\n\r]/g;function wa(){let e=1,n="",t=!0,r;return i;function i(o,l,a){const u=[];let s,f,c,p,h;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,n="",t&&(o.charCodeAt(0)===65279&&c++,t=void 0);c<o.length;){if(jn.lastIndex=c,s=jn.exec(o),p=s&&s.index!==void 0?s.index:o.length,h=o.charCodeAt(p),!s){n=o.slice(c);break}if(h===10&&c===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<p&&(u.push(o.slice(c,p)),e+=p-c),h){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}const Sa=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ca(e){return e.replace(Sa,Ea)}function Ea(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return vr(t.slice(o?2:1),o?16:10)}return nn(t)||e}const Or={}.hasOwnProperty;function Ta(e,n,t){return typeof n!="string"&&(t=n,n=void 0),va(t)(ba(xa(t).document().write(wa()(e,n,!0))))}function va(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(kn),autolinkProtocol:M,autolinkEmail:M,atxHeading:o(dn),blockQuote:o(Le),characterEscape:M,characterReference:M,codeFenced:o(tt),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(tt,l),codeText:o(bi,l),codeTextData:M,data:M,codeFlowValue:M,definition:o(wi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Si),hardBreakEscape:o(gn),hardBreakTrailing:o(gn),htmlFlow:o(yn,l),htmlFlowData:M,htmlText:o(yn,l),htmlTextData:M,image:o(Ci),label:l,link:o(kn),listItem:o(Ei),listItemValue:p,listOrdered:o(xn,c),listUnordered:o(xn),paragraph:o(Ti),reference:d,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(dn),strong:o(vi),thematicBreak:o(Ai)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:De,autolinkProtocol:we,blockQuote:u(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:X,characterReference:Be,codeFenced:u(C),codeFencedFence:k,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:x,codeIndented:u(y),codeText:u(F),codeTextData:x,data:x,definition:u(),definitionDestinationString:_,definitionLabelString:E,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(A),hardBreakTrailing:u(A),htmlFlow:u(P),htmlFlowData:x,htmlText:u(L),htmlTextData:x,image:u(Q),label:ge,labelText:se,lineEnding:D,link:u(Y),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ce,resourceDestinationString:m,resourceTitleString:ue,resource:ye,setextHeading:u(U),setextHeadingLineSequence:N,setextHeadingText:b,strong:u(),thematicBreak:u()}};Fr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(S){let I={type:"root",children:[]};const j={stack:[I],tokenStack:[],config:n,enter:a,exit:s,buffer:l,resume:f,data:t},q=[];let $=-1;for(;++$<S.length;)if(S[$][1].type==="listOrdered"||S[$][1].type==="listUnordered")if(S[$][0]==="enter")q.push($);else{const fe=q.pop();$=i(S,fe,$)}for($=-1;++$<S.length;){const fe=n[S[$][0]];Or.call(fe,S[$][1].type)&&fe[S[$][1].type].call(Object.assign({sliceSerialize:S[$][2].sliceSerialize},j),S[$][1])}if(j.tokenStack.length>0){const fe=j.tokenStack[j.tokenStack.length-1];(fe[1]||Bn).call(j,void 0,fe[0])}for(I.position={start:Se(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:Se(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},$=-1;++$<n.transforms.length;)I=n.transforms[$](I)||I;return I}function i(S,I,j){let q=I-1,$=-1,fe=!1,ve,ke,Ue,He;for(;++q<=j;){const re=S[q];switch(re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{re[0]==="enter"?$++:$--,He=void 0;break}case"lineEndingBlank":{re[0]==="enter"&&(ve&&!He&&!$&&!Ue&&(Ue=q),He=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:He=void 0}if(!$&&re[0]==="enter"&&re[1].type==="listItemPrefix"||$===-1&&re[0]==="exit"&&(re[1].type==="listUnordered"||re[1].type==="listOrdered")){if(ve){let _e=q;for(ke=void 0;_e--;){const xe=S[_e];if(xe[1].type==="lineEnding"||xe[1].type==="lineEndingBlank"){if(xe[0]==="exit")continue;ke&&(S[ke][1].type="lineEndingBlank",fe=!0),xe[1].type="lineEnding",ke=_e}else if(!(xe[1].type==="linePrefix"||xe[1].type==="blockQuotePrefix"||xe[1].type==="blockQuotePrefixWhitespace"||xe[1].type==="blockQuoteMarker"||xe[1].type==="listItemIndent"))break}Ue&&(!ke||Ue<ke)&&(ve._spread=!0),ve.end=Object.assign({},ke?S[ke][1].start:re[1].end),S.splice(ke||q,0,["exit",ve,re[2]]),q++,j++}if(re[1].type==="listItemPrefix"){const _e={type:"listItem",_spread:!1,start:Object.assign({},re[1].start),end:void 0};ve=_e,S.splice(q,0,["enter",_e,re[2]]),q++,j++,Ue=void 0,He=!0}}}return S[I][1]._spread=fe,j}function o(S,I){return j;function j(q){a.call(this,S(q),q),I&&I.call(this,q)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(S,I,j){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([I,j||void 0]),S.position={start:Se(I.start),end:void 0}}function u(S){return I;function I(j){S&&S.call(this,j),s.call(this,j)}}function s(S,I){const j=this.stack.pop(),q=this.tokenStack.pop();if(q)q[0].type!==S.type&&(I?I.call(this,S,q[0]):(q[1]||Bn).call(this,S,q[0]));else throw new Error("Cannot close `"+S.type+"` ("+We({start:S.start,end:S.end})+"): it’s not open");j.position.end=Se(S.end)}function f(){return tn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(S){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0}}function h(){const S=this.resume(),I=this.stack[this.stack.length-1];I.lang=S}function g(){const S=this.resume(),I=this.stack[this.stack.length-1];I.meta=S}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S.replace(/(\r?\n|\r)$/g,"")}function E(S){const I=this.resume(),j=this.stack[this.stack.length-1];j.label=I,j.identifier=he(this.sliceSerialize(S)).toLowerCase()}function w(){const S=this.resume(),I=this.stack[this.stack.length-1];I.title=S}function _(){const S=this.resume(),I=this.stack[this.stack.length-1];I.url=S}function R(S){const I=this.stack[this.stack.length-1];if(!I.depth){const j=this.sliceSerialize(S).length;I.depth=j}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function N(S){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function M(S){const j=this.stack[this.stack.length-1].children;let q=j[j.length-1];(!q||q.type!=="text")&&(q=Ii(),q.position={start:Se(S.start),end:void 0},j.push(q)),this.stack.push(q)}function x(S){const I=this.stack.pop();I.value+=this.sliceSerialize(S),I.position.end=Se(S.end)}function D(S){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const j=I.children[I.children.length-1];j.position.end=Se(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(I.type)&&(M.call(this,S),x.call(this,S))}function A(){this.data.atHardBreak=!0}function P(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S}function L(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S}function F(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S}function Y(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=I,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function Q(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=I,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function se(S){const I=this.sliceSerialize(S),j=this.stack[this.stack.length-2];j.label=Ca(I),j.identifier=he(I).toLowerCase()}function ge(){const S=this.stack[this.stack.length-1],I=this.resume(),j=this.stack[this.stack.length-1];if(this.data.inReference=!0,j.type==="link"){const q=S.children;j.children=q}else j.alt=I}function m(){const S=this.resume(),I=this.stack[this.stack.length-1];I.url=S}function ue(){const S=this.resume(),I=this.stack[this.stack.length-1];I.title=S}function ye(){this.data.inReference=void 0}function d(){this.data.referenceType="collapsed"}function ce(S){const I=this.resume(),j=this.stack[this.stack.length-1];j.label=I,j.identifier=he(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function Te(S){this.data.characterReferenceType=S.type}function X(S){const I=this.sliceSerialize(S),j=this.data.characterReferenceType;let q;j?(q=vr(I,j==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):q=nn(I);const $=this.stack[this.stack.length-1];$.value+=q}function Be(S){const I=this.stack.pop();I.position.end=Se(S.end)}function we(S){x.call(this,S);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(S)}function De(S){x.call(this,S);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(S)}function Le(){return{type:"blockquote",children:[]}}function tt(){return{type:"code",lang:null,meta:null,value:""}}function bi(){return{type:"inlineCode",value:""}}function wi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Si(){return{type:"emphasis",children:[]}}function dn(){return{type:"heading",depth:0,children:[]}}function gn(){return{type:"break"}}function yn(){return{type:"html",value:""}}function Ci(){return{type:"image",title:null,url:"",alt:null}}function kn(){return{type:"link",title:null,url:"",children:[]}}function xn(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function Ei(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function Ti(){return{type:"paragraph",children:[]}}function vi(){return{type:"strong",children:[]}}function Ii(){return{type:"text",value:""}}function Ai(){return{type:"thematicBreak"}}}function Se(e){return{line:e.line,column:e.column,offset:e.offset}}function Fr(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?Fr(e,r):Ia(e,r)}}function Ia(e,n){let t;for(t in n)if(Or.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Bn(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+We({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+We({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+We({start:n.start,end:n.end})+") is still open")}function Aa(e){const n=this;n.parser=t;function t(r){return Ta(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Pa(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 Da(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`