nnews-react 0.3.7 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,223 +1,223 @@
1
- "use strict";var qm=Object.defineProperty;var Um=(e,t,n)=>t in e?qm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>Um(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),q=require("react");require("react-dom");function $m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const pe=$m(q);var ze=(e=>(e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Scheduled=3]="Scheduled",e[e.Review=4]="Review",e))(ze||{});function zm({articles:e,loading:t=!1,error:n=null,onArticleClick:r,onEditClick:i,onAIClick:s,showActions:o=!1,emptyMessage:a="No articles found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading articles..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading articles: ",n.message]})}):!e||e.items.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:a})}):E.jsxs("div",{className:"space-y-6",children:[E.jsx("div",{className:"grid grid-cols-3 gap-6",children:e.items.map(l=>E.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 shadow-sm hover:shadow-md transition-shadow overflow-hidden flex flex-col",children:[l.imageName&&E.jsx("div",{className:`w-full h-48 bg-gray-200 dark:bg-gray-700 overflow-hidden ${r?"cursor-pointer":""}`,onClick:()=>r==null?void 0:r(l),children:E.jsx("img",{src:l.imageName,alt:l.title,className:"w-full h-[250px] object-cover hover:scale-105 transition-transform duration-300",style:{height:"250px"}})}),E.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[E.jsxs("div",{className:"flex-1",children:[E.jsx("h3",{className:`text-xl font-semibold text-gray-900 dark:text-gray-100 line-clamp-2 ${r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":""}`,onClick:()=>r==null?void 0:r(l),children:l.title}),E.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-sm text-gray-500 dark:text-gray-400",children:[l.dateAt&&E.jsxs("span",{className:"flex items-center gap-1",children:[E.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(l.dateAt).toLocaleDateString()]}),l.category&&E.jsx("span",{className:"rounded-full bg-blue-100 dark:bg-blue-900 px-3 py-1 text-xs font-medium text-blue-800 dark:text-blue-200",children:l.category.title})]}),E.jsx("div",{className:"mt-3",children:E.jsx("span",{className:`inline-block rounded-full px-3 py-1 text-xs font-medium ${l.status===ze.Published?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":l.status===ze.Draft?"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200":l.status===ze.Review?"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200":l.status===ze.Scheduled?"bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200":"bg-orange-100 dark:bg-orange-900 text-orange-800 dark:text-orange-200"}`,children:ze[l.status]})}),l.tags&&l.tags.length>0&&E.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[l.tags.slice(0,3).map(c=>E.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["#",c.title]},c.tagId)),l.tags.length>3&&E.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["+",l.tags.length-3]})]}),l.roles&&l.roles.length>0&&E.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[l.roles.slice(0,2).map(c=>E.jsx("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:c.name},c.slug)),l.roles.length>2&&E.jsxs("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:["+",l.roles.length-2]})]})]}),o&&(i||s)&&E.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700 flex gap-2 justify-end",children:[s&&E.jsx("button",{onClick:()=>s(l),className:"rounded p-2 text-purple-600 dark:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/20",title:"AI Edit",children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),i&&E.jsx("button",{onClick:()=>i(l),className:"rounded p-2 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20",title:"Edit",children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})})]})]})]},l.articleId))}),e.totalPages>1&&E.jsx("div",{className:"mt-6 flex items-center justify-between border-t border-gray-200 dark:border-gray-700 pt-4",children:E.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Showing ",e.items.length," of ",e.totalCount," articles (Page ",e.page," of ",e.totalPages,")"]})})]})}function jm(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hm=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gm=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Km={};function Mc(e,t){return(Km.jsx?Gm:Hm).test(e)}const Wm=/[ \t\n\f\r]/g;function Vm(e){return typeof e=="object"?e.type==="text"?Dc(e.value):!1:Dc(e)}function Dc(e){return e.replace(Wm,"")===""}class Li{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Li.prototype.normal={};Li.prototype.property={};Li.prototype.space=void 0;function Nf(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Li(n,r,t)}function ja(e){return e.toLowerCase()}class mt{constructor(t,n){this.attribute=n,this.property=t}}mt.prototype.attribute="";mt.prototype.booleanish=!1;mt.prototype.boolean=!1;mt.prototype.commaOrSpaceSeparated=!1;mt.prototype.commaSeparated=!1;mt.prototype.defined=!1;mt.prototype.mustUseProperty=!1;mt.prototype.number=!1;mt.prototype.overloadedBoolean=!1;mt.prototype.property="";mt.prototype.spaceSeparated=!1;mt.prototype.space=void 0;let Ym=0;const he=er(),Pe=er(),Ha=er(),z=er(),Oe=er(),Sr=er(),xt=er();function er(){return 2**++Ym}const Ga=Object.freeze(Object.defineProperty({__proto__:null,boolean:he,booleanish:Pe,commaOrSpaceSeparated:xt,commaSeparated:Sr,number:z,overloadedBoolean:Ha,spaceSeparated:Oe},Symbol.toStringTag,{value:"Module"})),oa=Object.keys(Ga);class Ml extends mt{constructor(t,n,r,i){let s=-1;if(super(t,n),Pc(this,"space",i),typeof r=="number")for(;++s<oa.length;){const o=oa[s];Pc(this,oa[s],(r&Ga[o])===Ga[o])}}}Ml.prototype.defined=!0;function Pc(e,t,n){n&&(e[t]=n)}function Ur(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Ml(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[ja(r)]=r,n[ja(s.attribute)]=r}return new Li(t,n,e.space)}const Af=Ur({properties:{ariaActiveDescendant:null,ariaAtomic:Pe,ariaAutoComplete:null,ariaBusy:Pe,ariaChecked:Pe,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:Oe,ariaCurrent:null,ariaDescribedBy:Oe,ariaDetails:null,ariaDisabled:Pe,ariaDropEffect:Oe,ariaErrorMessage:null,ariaExpanded:Pe,ariaFlowTo:Oe,ariaGrabbed:Pe,ariaHasPopup:null,ariaHidden:Pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oe,ariaLevel:z,ariaLive:null,ariaModal:Pe,ariaMultiLine:Pe,ariaMultiSelectable:Pe,ariaOrientation:null,ariaOwns:Oe,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:Pe,ariaReadOnly:Pe,ariaRelevant:null,ariaRequired:Pe,ariaRoleDescription:Oe,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:Pe,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sf(e,t){return t in e?e[t]:t}function Tf(e,t){return Sf(e,t.toLowerCase())}const Zm=Ur({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Sr,acceptCharset:Oe,accessKey:Oe,action:null,allow:null,allowFullScreen:he,allowPaymentRequest:he,allowUserMedia:he,alt:null,as:null,async:he,autoCapitalize:null,autoComplete:Oe,autoFocus:he,autoPlay:he,blocking:Oe,capture:null,charSet:null,checked:he,cite:null,className:Oe,cols:z,colSpan:null,content:null,contentEditable:Pe,controls:he,controlsList:Oe,coords:z|Sr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:he,defer:he,dir:null,dirName:null,disabled:he,download:Ha,draggable:Pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:he,formTarget:null,headers:Oe,height:z,hidden:Ha,high:z,href:null,hrefLang:null,htmlFor:Oe,httpEquiv:Oe,id:null,imageSizes:null,imageSrcSet:null,inert:he,inputMode:null,integrity:null,is:null,isMap:he,itemId:null,itemProp:Oe,itemRef:Oe,itemScope:he,itemType:Oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:he,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:he,muted:he,name:null,nonce:null,noModule:he,noValidate:he,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:he,optimum:z,pattern:null,ping:Oe,placeholder:null,playsInline:he,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:he,referrerPolicy:null,rel:Oe,required:he,reversed:he,rows:z,rowSpan:z,sandbox:Oe,scope:null,scoped:he,seamless:he,selected:he,shadowRootClonable:he,shadowRootDelegatesFocus:he,shadowRootMode:null,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:Pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:he,useMap:null,value:Pe,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Oe,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:he,declare:he,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:he,noHref:he,noShade:he,noWrap:he,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:Pe,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:he,disableRemotePlayback:he,prefix:null,property:null,results:z,security:null,unselectable:null},space:"html",transform:Tf}),Xm=Ur({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:xt,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:Oe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:he,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Sr,g2:Sr,glyphName:Sr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:xt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xt,rev:xt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xt,requiredFeatures:xt,requiredFonts:xt,requiredFormats:xt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:xt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xt,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sf}),Cf=Ur({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Of=Ur({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tf}),If=Ur({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Qm={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"},Jm=/[A-Z]/g,Bc=/-[a-z]/g,eb=/^data[-\w.:]+$/i;function tb(e,t){const n=ja(t);let r=t,i=mt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&eb.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Bc,rb);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Bc.test(s)){let o=s.replace(Jm,nb);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Ml}return new i(r,t)}function nb(e){return"-"+e.toLowerCase()}function rb(e){return e.charAt(1).toUpperCase()}const ib=Nf([Af,Zm,Cf,Of,If],"html"),Dl=Nf([Af,Xm,Cf,Of,If],"svg");function sb(e){return e.join(" ").trim()}var It=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pl={},Fc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ob=/\n/g,ab=/^\s*/,lb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,cb=/^:\s*/,ub=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,db=/^[;\s]*/,fb=/^\s+|\s+$/g,hb=`
2
- `,qc="/",Uc="*",Gn="",pb="comment",gb="declaration";function mb(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var m=p.match(ob);m&&(n+=m.length);var b=p.lastIndexOf(hb);r=~b?p.length-b:r+p.length}function s(){var p={line:n,column:r};return function(m){return m.position=new o(p),c(),m}}function o(p){this.start=p,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(p){var m=new Error(t.source+":"+n+":"+r+": "+p);if(m.reason=p,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(p){var m=p.exec(e);if(m){var b=m[0];return i(b),e=e.slice(b.length),m}}function c(){l(ab)}function u(p){var m;for(p=p||[];m=d();)m!==!1&&p.push(m);return p}function d(){var p=s();if(!(qc!=e.charAt(0)||Uc!=e.charAt(1))){for(var m=2;Gn!=e.charAt(m)&&(Uc!=e.charAt(m)||qc!=e.charAt(m+1));)++m;if(m+=2,Gn===e.charAt(m-1))return a("End of comment missing");var b=e.slice(2,m-2);return r+=2,i(b),e=e.slice(m),r+=2,p({type:pb,comment:b})}}function h(){var p=s(),m=l(lb);if(m){if(d(),!l(cb))return a("property missing ':'");var b=l(ub),y=p({type:gb,property:$c(m[0].replace(Fc,Gn)),value:b?$c(b[0].replace(Fc,Gn)):Gn});return l(db),y}}function f(){var p=[];u(p);for(var m;m=h();)m!==!1&&(p.push(m),u(p));return p}return c(),f()}function $c(e){return e?e.replace(fb,Gn):Gn}var bb=mb,yb=It&&It.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.default=Eb;const xb=yb(bb);function Eb(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,xb.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(n=n||{},n[o]=a)}),n}var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.camelCase=void 0;var wb=/^--[a-zA-Z0-9_-]+$/,_b=/-([a-z])/g,vb=/^[^-]+$/,kb=/^-(webkit|moz|ms|o|khtml)-/,Nb=/^-(ms)-/,Ab=function(e){return!e||vb.test(e)||wb.test(e)},Sb=function(e,t){return t.toUpperCase()},zc=function(e,t){return"".concat(t,"-")},Tb=function(e,t){return t===void 0&&(t={}),Ab(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Nb,zc):e=e.replace(kb,zc),e.replace(_b,Sb))};Ks.camelCase=Tb;var Cb=It&&It.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ob=Cb(Pl),Ib=Ks;function Ka(e,t){var n={};return!e||typeof e!="string"||(0,Ob.default)(e,function(r,i){r&&i&&(n[(0,Ib.camelCase)(r,t)]=i)}),n}Ka.default=Ka;var Rb=Ka;const Lb=Mi(Rb),Rf=Lf("end"),Bl=Lf("start");function Lf(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Mb(e){const t=Bl(e),n=Rf(e);if(t&&n)return{start:t,end:n}}function pi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jc(e.position):"start"in e||"end"in e?jc(e):"line"in e||"column"in e?Wa(e):""}function Wa(e){return Hc(e&&e.line)+":"+Hc(e&&e.column)}function jc(e){return Wa(e&&e.start)+"-"+Wa(e&&e.end)}function Hc(e){return e&&typeof e=="number"?e:1}class nt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.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=pi(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}nt.prototype.file="";nt.prototype.name="";nt.prototype.reason="";nt.prototype.message="";nt.prototype.stack="";nt.prototype.column=void 0;nt.prototype.line=void 0;nt.prototype.ancestors=void 0;nt.prototype.cause=void 0;nt.prototype.fatal=void 0;nt.prototype.place=void 0;nt.prototype.ruleId=void 0;nt.prototype.source=void 0;const Fl={}.hasOwnProperty,Db=new Map,Pb=/[A-Z]/g,Bb=new Set(["table","tbody","thead","tfoot","tr"]),Fb=new Set(["td","th"]),Mf="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Wb(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Kb(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Dl:ib,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Df(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Df(e,t,n){if(t.type==="element")return Ub(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return $b(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return jb(e,t,n);if(t.type==="mdxjsEsm")return zb(e,t);if(t.type==="root")return Hb(e,t,n);if(t.type==="text")return Gb(e,t)}function Ub(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Dl,e.schema=i),e.ancestors.push(t);const s=Bf(e,t.tagName,!1),o=Vb(e,t);let a=Ul(e,t);return Bb.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Vm(l):!0})),Pf(e,o,s,t),ql(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function $b(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}wi(e,t.position)}function zb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wi(e,t.position)}function jb(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Dl,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Bf(e,t.name,!0),o=Yb(e,t),a=Ul(e,t);return Pf(e,o,s,t),ql(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function Hb(e,t,n){const r={};return ql(r,Ul(e,t)),e.create(t,e.Fragment,r,n)}function Gb(e,t){return t.value}function Pf(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ql(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kb(e,t,n){return r;function r(i,s,o,a){const c=Array.isArray(o.children)?n:t;return a?c(s,o,a):c(s,o)}}function Wb(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=Bl(r);return t(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Vb(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Fl.call(t.properties,i)){const s=Zb(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Fb.has(t.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Yb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else wi(e,t.position);else{const i=r.name;let s;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,s=e.evaluater.evaluateExpression(a.expression)}else wi(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Ul(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Db;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const a=Df(e,s,o);a!==void 0&&n.push(a)}return n}function Zb(e,t,n){const r=tb(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?jm(n):sb(n)),r.property==="style"){let i=typeof n=="object"?n:Xb(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Qb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Qm[r.property]||r.property:r.attribute,n]}}function Xb(e,t){try{return Lb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new nt("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=Mf+"#cannot-parse-style-attribute",i}}function Bf(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,o;for(;++s<i.length;){const a=Mc(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=Mc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Fl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);wi(e)}function wi(e,t){const n=new nt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Mf+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Qb(e){const t={};let n;for(n in e)Fl.call(e,n)&&(t[Jb(n)]=e[n]);return t}function Jb(e){let t=e.replace(Pb,ey);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ey(e){return"-"+e.toLowerCase()}const aa={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"]},ty={};function ny(e,t){const n=ty,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ff(e,r,i)}function Ff(e,t,n){if(ry(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Gc(e.children,t,n)}return Array.isArray(e)?Gc(e,t,n):""}function Gc(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ff(e[i],t,n);return r.join("")}function ry(e){return!!(e&&typeof e=="object")}const Kc=document.createElement("i");function $l(e){const t="&"+e+";";Kc.innerHTML=t;const n=Kc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wt(e,t,n,r){const i=e.length;let s=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function St(e,t){return e.length>0?(wt(e,e.length,0,t),e):t}const Wc={}.hasOwnProperty;function qf(e){const t={};let n=-1;for(;++n<e.length;)iy(t,e[n]);return t}function iy(e,t){let n;for(n in t){const i=(Wc.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){Wc.call(i,o)||(i[o]=[]);const a=s[o];sy(i[o],Array.isArray(a)?a:a?[a]:[])}}}function sy(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wt(e,0,0,r)}function Uf(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ht(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const at=Pn(/[A-Za-z]/),et=Pn(/[\dA-Za-z]/),oy=Pn(/[#-'*+\--9=?A-Z^-~]/);function Is(e){return e!==null&&(e<32||e===127)}const Va=Pn(/\d/),ay=Pn(/[\dA-Fa-f]/),ly=Pn(/[!-/:-@[-`{-~]/);function ae(e){return e!==null&&e<-2}function Se(e){return e!==null&&(e<0||e===32)}function be(e){return e===-2||e===-1||e===32}const Ws=Pn(new RegExp("\\p{P}|\\p{S}","u")),Yn=Pn(/\s/);function Pn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $r(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&et(e.charCodeAt(n+1))&&et(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function xe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return be(l)?(e.enter(n),a(l)):t(l)}function a(l){return be(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const cy={tokenize:uy};function uy(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),xe(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return ae(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const dy={tokenize:fy},Vc={tokenize:hy};function fy(e){const t=this,n=[];let r=0,i,s,o;return a;function a(v){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const T=t.events.length;let C=T,N;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){N=t.events[C][1].end;break}y(r);let B=T;for(;B<t.events.length;)t.events[B][1].end={...N},B++;return wt(t.events,C+1,0,t.events.slice(T)),t.events.length=B,c(v)}return a(v)}function c(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return p(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vc,u,d)(v)}function u(v){return i&&_(),y(r),h(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,p(v)}function h(v){return t.containerState={},e.attempt(Vc,f,p)(v)}function f(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function p(v){if(v===null){i&&_(),y(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),m(v)}function m(v){if(v===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(v);return}return ae(v)?(e.consume(v),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),m)}function b(v,T){const C=t.sliceStream(v);if(T&&C.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(C),t.parser.lazy[v.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<o&&(!i.events[N][1].end||i.events[N][1].end.offset>o))return;const B=t.events.length;let U=B,G,O;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(G){O=t.events[U][1].end;break}G=!0}for(y(r),N=B;N<t.events.length;)t.events[N][1].end={...O},N++;wt(t.events,U+1,0,t.events.slice(B)),t.events.length=N}}function y(v){let T=n.length;for(;T-- >v;){const C=n[T];t.containerState=C[1],C[0].exit.call(t,e)}n.length=v}function _(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function hy(e,t,n){return xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rr(e){if(e===null||Se(e)||Yn(e))return 1;if(Ws(e))return 2}function Vs(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Ya={name:"attention",resolveAll:py,tokenize:gy};function py(e,t){let n=-1,r,i,s,o,a,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};Yc(d,-l),Yc(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=St(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=St(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=St(c,Vs(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=St(c,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=St(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,wt(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function gy(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Rr(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const c=e.exit("attentionSequence"),u=Rr(l),d=!u||u===2&&i||n.includes(l),h=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?d:d&&(i||!h)),c._close=!!(s===42?h:h&&(u||!d)),t(l)}}function Yc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const my={name:"autolink",tokenize:by};function by(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(f){return at(f)?(e.consume(f),o):f===64?n(f):c(f)}function o(f){return f===43||f===45||f===46||et(f)?(r=1,a(f)):c(f)}function a(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||et(f))&&r++<32?(e.consume(f),a):(r=0,c(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Is(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):oy(f)?(e.consume(f),c):n(f)}function u(f){return et(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||et(f))&&r++<63){const p=f===45?h:d;return e.consume(f),p}return n(f)}}const Di={partial:!0,tokenize:yy};function yy(e,t,n){return r;function r(s){return be(s)?xe(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||ae(s)?t(s):n(s)}}const $f={continuation:{tokenize:Ey},exit:wy,name:"blockQuote",tokenize:xy};function xy(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return be(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Ey(e,t,n){const r=this;return i;function i(o){return be(o)?xe(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt($f,t,n)(o)}}function wy(e){e.exit("blockQuote")}const zf={name:"characterEscape",tokenize:_y};function _y(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return ly(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const jf={name:"characterReference",tokenize:vy};function vy(e,t,n){const r=this;let i=0,s,o;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,o=et,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=ay,u):(e.enter("characterReferenceValue"),s=7,o=Va,u(d))}function u(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===et&&!$l(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<s?(e.consume(d),u):n(d)}}const Zc={partial:!0,tokenize:Ny},Xc={concrete:!0,name:"codeFenced",tokenize:ky};function ky(e,t,n){const r=this,i={partial:!0,tokenize:C};let s=0,o=0,a;return l;function l(N){return c(N)}function c(N){const B=r.events[r.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,a=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(N)}function u(N){return N===a?(o++,e.consume(N),u):o<3?n(N):(e.exit("codeFencedFenceSequence"),be(N)?xe(e,d,"whitespace")(N):d(N))}function d(N){return N===null||ae(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(Zc,m,T)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(N))}function h(N){return N===null||ae(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(N)):be(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,f,"whitespace")(N)):N===96&&N===a?n(N):(e.consume(N),h)}function f(N){return N===null||ae(N)?d(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||ae(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(N)):N===96&&N===a?n(N):(e.consume(N),p)}function m(N){return e.attempt(i,T,b)(N)}function b(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),y}function y(N){return s>0&&be(N)?xe(e,_,"linePrefix",s+1)(N):_(N)}function _(N){return N===null||ae(N)?e.check(Zc,m,T)(N):(e.enter("codeFlowValue"),v(N))}function v(N){return N===null||ae(N)?(e.exit("codeFlowValue"),_(N)):(e.consume(N),v)}function T(N){return e.exit("codeFenced"),t(N)}function C(N,B,U){let G=0;return O;function O(Y){return N.enter("lineEnding"),N.consume(Y),N.exit("lineEnding"),H}function H(Y){return N.enter("codeFencedFence"),be(Y)?xe(N,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):P(Y)}function P(Y){return Y===a?(N.enter("codeFencedFenceSequence"),ne(Y)):U(Y)}function ne(Y){return Y===a?(G++,N.consume(Y),ne):G>=o?(N.exit("codeFencedFenceSequence"),be(Y)?xe(N,X,"whitespace")(Y):X(Y)):U(Y)}function X(Y){return Y===null||ae(Y)?(N.exit("codeFencedFence"),B(Y)):U(Y)}}}function Ny(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const la={name:"codeIndented",tokenize:Sy},Ay={partial:!0,tokenize:Ty};function Sy(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),xe(e,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):ae(c)?e.attempt(Ay,o,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||ae(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function Ty(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):ae(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):xe(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):ae(o)?i(o):n(o)}}const Cy={name:"codeText",previous:Iy,resolve:Oy,tokenize:Ry};function Oy(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Iy(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ry(e,t,n){let r=0,i,s;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,u(d)):ae(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||ae(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",c(d))}}class Ly{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&si(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),si(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),si(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);si(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);si(this.left,n.reverse())}}}function si(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Hf(e){const t={};let n=-1,r,i,s,o,a,l,c;const u=new Ly(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,My(u,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=u.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return wt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function My(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],c={};let u,d,h=-1,f=n,p=0,m=0;const b=[m];for(;f;){for(;e.get(++i)[1]!==f;);s.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(m=h+1,b.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):b.pop(),h=b.length;h--;){const y=a.slice(b[h],b[h+1]),_=s.pop();l.push([_,_+y.length-1]),e.splice(_,2,y)}for(l.reverse(),h=-1;++h<l.length;)c[p+l[h][0]]=p+l[h][1],p+=l[h][1]-l[h][0]-1;return c}const Dy={resolve:By,tokenize:Fy},Py={partial:!0,tokenize:qy};function By(e){return Hf(e),e}function Fy(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):ae(a)?e.check(Py,o,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function qy(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),xe(e,s,"linePrefix")}function s(o){if(o===null||ae(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Gf(e,t,n,r,i,s,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(y),e.exit(s),h):y===null||y===32||y===41||Is(y)?n(y):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(y))}function h(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(a),h(y)):y===null||y===60||ae(y)?n(y):(e.consume(y),y===92?p:f)}function p(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function m(y){return!u&&(y===null||y===41||Se(y))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(y)):u<c&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||Is(y)?n(y):(e.consume(y),y===92?b:m)}function b(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Kf(e,t,n,r,i,s){const o=this;let a=0,l;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(s),u}function u(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):ae(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||ae(f)||a++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!be(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function Wf(e,t,n,r,i,s){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),c(h))}function c(h){return h===o?(e.exit(s),l(o)):h===null?n(h):ae(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),xe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===o||h===null||ae(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:u)}function d(h){return h===o||h===92?(e.consume(h),u):u(h)}}function gi(e,t){let n;return r;function r(i){return ae(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):be(i)?xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Uy={name:"definition",tokenize:zy},$y={partial:!0,tokenize:jy};function zy(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),o(f)}function o(f){return Kf.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return Se(f)?gi(e,c)(f):c(f)}function c(f){return Gf(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt($y,d,d)(f)}function d(f){return be(f)?xe(e,h,"whitespace")(f):h(f)}function h(f){return f===null||ae(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function jy(e,t,n){return r;function r(a){return Se(a)?gi(e,i)(a):n(a)}function i(a){return Wf(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return be(a)?xe(e,o,"whitespace")(a):o(a)}function o(a){return a===null||ae(a)?t(a):n(a)}}const Hy={name:"hardBreakEscape",tokenize:Gy};function Gy(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return ae(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Ky={name:"headingAtx",resolve:Wy,tokenize:Vy};function Wy(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function Vy(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||Se(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||ae(u)?(e.exit("atxHeading"),t(u)):be(u)?xe(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||Se(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const Yy=["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"],Qc=["pre","script","style","textarea"],Zy={concrete:!0,name:"htmlFlow",resolveTo:Jy,tokenize:e0},Xy={partial:!0,tokenize:n0},Qy={partial:!0,tokenize:t0};function Jy(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function e0(e,t,n){const r=this;let i,s,o,a,l;return c;function c(k){return u(k)}function u(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),s=!0,m):k===63?(e.consume(k),i=3,r.interrupt?t:w):at(k)?(e.consume(k),o=String.fromCharCode(k),b):n(k)}function h(k){return k===45?(e.consume(k),i=2,f):k===91?(e.consume(k),i=5,a=0,p):at(k)?(e.consume(k),i=4,r.interrupt?t:w):n(k)}function f(k){return k===45?(e.consume(k),r.interrupt?t:w):n(k)}function p(k){const ge="CDATA[";return k===ge.charCodeAt(a++)?(e.consume(k),a===ge.length?r.interrupt?t:P:p):n(k)}function m(k){return at(k)?(e.consume(k),o=String.fromCharCode(k),b):n(k)}function b(k){if(k===null||k===47||k===62||Se(k)){const ge=k===47,se=o.toLowerCase();return!ge&&!s&&Qc.includes(se)?(i=1,r.interrupt?t(k):P(k)):Yy.includes(o.toLowerCase())?(i=6,ge?(e.consume(k),y):r.interrupt?t(k):P(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):s?_(k):v(k))}return k===45||et(k)?(e.consume(k),o+=String.fromCharCode(k),b):n(k)}function y(k){return k===62?(e.consume(k),r.interrupt?t:P):n(k)}function _(k){return be(k)?(e.consume(k),_):O(k)}function v(k){return k===47?(e.consume(k),O):k===58||k===95||at(k)?(e.consume(k),T):be(k)?(e.consume(k),v):O(k)}function T(k){return k===45||k===46||k===58||k===95||et(k)?(e.consume(k),T):C(k)}function C(k){return k===61?(e.consume(k),N):be(k)?(e.consume(k),C):v(k)}function N(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),l=k,B):be(k)?(e.consume(k),N):U(k)}function B(k){return k===l?(e.consume(k),l=null,G):k===null||ae(k)?n(k):(e.consume(k),B)}function U(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Se(k)?C(k):(e.consume(k),U)}function G(k){return k===47||k===62||be(k)?v(k):n(k)}function O(k){return k===62?(e.consume(k),H):n(k)}function H(k){return k===null||ae(k)?P(k):be(k)?(e.consume(k),H):n(k)}function P(k){return k===45&&i===2?(e.consume(k),L):k===60&&i===1?(e.consume(k),$):k===62&&i===4?(e.consume(k),Q):k===63&&i===3?(e.consume(k),w):k===93&&i===5?(e.consume(k),K):ae(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Xy,le,ne)(k)):k===null||ae(k)?(e.exit("htmlFlowData"),ne(k)):(e.consume(k),P)}function ne(k){return e.check(Qy,X,le)(k)}function X(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Y}function Y(k){return k===null||ae(k)?ne(k):(e.enter("htmlFlowData"),P(k))}function L(k){return k===45?(e.consume(k),w):P(k)}function $(k){return k===47?(e.consume(k),o="",F):P(k)}function F(k){if(k===62){const ge=o.toLowerCase();return Qc.includes(ge)?(e.consume(k),Q):P(k)}return at(k)&&o.length<8?(e.consume(k),o+=String.fromCharCode(k),F):P(k)}function K(k){return k===93?(e.consume(k),w):P(k)}function w(k){return k===62?(e.consume(k),Q):k===45&&i===2?(e.consume(k),w):P(k)}function Q(k){return k===null||ae(k)?(e.exit("htmlFlowData"),le(k)):(e.consume(k),Q)}function le(k){return e.exit("htmlFlow"),t(k)}}function t0(e,t,n){const r=this;return i;function i(o){return ae(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function n0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Di,t,n)}}const r0={name:"htmlText",tokenize:i0};function i0(e,t,n){const r=this;let i,s,o;return a;function a(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),l}function l(w){return w===33?(e.consume(w),c):w===47?(e.consume(w),C):w===63?(e.consume(w),v):at(w)?(e.consume(w),U):n(w)}function c(w){return w===45?(e.consume(w),u):w===91?(e.consume(w),s=0,p):at(w)?(e.consume(w),_):n(w)}function u(w){return w===45?(e.consume(w),f):n(w)}function d(w){return w===null?n(w):w===45?(e.consume(w),h):ae(w)?(o=d,$(w)):(e.consume(w),d)}function h(w){return w===45?(e.consume(w),f):d(w)}function f(w){return w===62?L(w):w===45?h(w):d(w)}function p(w){const Q="CDATA[";return w===Q.charCodeAt(s++)?(e.consume(w),s===Q.length?m:p):n(w)}function m(w){return w===null?n(w):w===93?(e.consume(w),b):ae(w)?(o=m,$(w)):(e.consume(w),m)}function b(w){return w===93?(e.consume(w),y):m(w)}function y(w){return w===62?L(w):w===93?(e.consume(w),y):m(w)}function _(w){return w===null||w===62?L(w):ae(w)?(o=_,$(w)):(e.consume(w),_)}function v(w){return w===null?n(w):w===63?(e.consume(w),T):ae(w)?(o=v,$(w)):(e.consume(w),v)}function T(w){return w===62?L(w):v(w)}function C(w){return at(w)?(e.consume(w),N):n(w)}function N(w){return w===45||et(w)?(e.consume(w),N):B(w)}function B(w){return ae(w)?(o=B,$(w)):be(w)?(e.consume(w),B):L(w)}function U(w){return w===45||et(w)?(e.consume(w),U):w===47||w===62||Se(w)?G(w):n(w)}function G(w){return w===47?(e.consume(w),L):w===58||w===95||at(w)?(e.consume(w),O):ae(w)?(o=G,$(w)):be(w)?(e.consume(w),G):L(w)}function O(w){return w===45||w===46||w===58||w===95||et(w)?(e.consume(w),O):H(w)}function H(w){return w===61?(e.consume(w),P):ae(w)?(o=H,$(w)):be(w)?(e.consume(w),H):G(w)}function P(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),i=w,ne):ae(w)?(o=P,$(w)):be(w)?(e.consume(w),P):(e.consume(w),X)}function ne(w){return w===i?(e.consume(w),i=void 0,Y):w===null?n(w):ae(w)?(o=ne,$(w)):(e.consume(w),ne)}function X(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||Se(w)?G(w):(e.consume(w),X)}function Y(w){return w===47||w===62||Se(w)?G(w):n(w)}function L(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function $(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),F}function F(w){return be(w)?xe(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):K(w)}function K(w){return e.enter("htmlTextData"),o(w)}}const zl={name:"labelEnd",resolveAll:l0,resolveTo:c0,tokenize:u0},s0={tokenize:d0},o0={tokenize:f0},a0={tokenize:h0};function l0(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&wt(e,0,e.length,n),e}function c0(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=St(a,e.slice(s+1,s+r+3)),a=St(a,[["enter",u,t]]),a=St(a,Vs(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=St(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=St(a,e.slice(o+1)),a=St(a,[["exit",l,t]]),wt(e,s,e.length,a),e}function u0(e,t,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(h){return s?s._inactive?d(h):(o=r.parser.defined.includes(Ht(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(s0,u,o?u:d)(h):h===91?e.attempt(o0,u,o?c:d)(h):o?u(h):d(h)}function c(h){return e.attempt(a0,u,d)(h)}function u(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function d0(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Se(d)?gi(e,s)(d):s(d)}function s(d){return d===41?u(d):Gf(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Se(d)?gi(e,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Wf(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Se(d)?gi(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function f0(e,t,n){const r=this;return i;function i(a){return Kf.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function h0(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const p0={name:"labelStartImage",resolveAll:zl.resolveAll,tokenize:g0};function g0(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const m0={name:"labelStartLink",resolveAll:zl.resolveAll,tokenize:b0};function b0(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const ca={name:"lineEnding",tokenize:y0};function y0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const vs={name:"thematicBreak",tokenize:x0};function x0(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||ae(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),be(c)?xe(e,a,"whitespace")(c):a(c))}}const ht={continuation:{tokenize:v0},exit:N0,name:"list",tokenize:_0},E0={partial:!0,tokenize:A0},w0={partial:!0,tokenize:k0};function _0(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(f){const p=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Va(f)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(vs,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return Va(f)&&++o<10?(e.consume(f),l):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Di,r.interrupt?n:u,e.attempt(E0,h,d))}function u(f){return r.containerState.initialBlankLine=!0,s++,h(f)}function d(f){return be(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function v0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Di,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xe(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!be(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(w0,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt(ht,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function k0(e,t,n){const r=this;return xe(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function N0(e){e.exit(this.containerState.type)}function A0(e,t,n){const r=this;return xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!be(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Jc={name:"setextUnderline",resolveTo:S0,tokenize:T0};function S0(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function T0(e,t,n){const r=this;let i;return s;function s(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),be(c)?xe(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||ae(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const C0={tokenize:O0};function O0(e){const t=this,n=e.attempt(Di,r,e.attempt(this.parser.constructs.flowInitial,i,xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Dy,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const I0={resolveAll:Yf()},R0=Vf("string"),L0=Vf("text");function Vf(e){return{resolveAll:Yf(e==="text"?M0:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(u){return c(u)?s(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Yf(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function M0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)l=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const D0={42:ht,43:ht,45:ht,48:ht,49:ht,50:ht,51:ht,52:ht,53:ht,54:ht,55:ht,56:ht,57:ht,62:$f},P0={91:Uy},B0={[-2]:la,[-1]:la,32:la},F0={35:Ky,42:vs,45:[Jc,vs],60:Zy,61:Jc,95:vs,96:Xc,126:Xc},q0={38:jf,92:zf},U0={[-5]:ca,[-4]:ca,[-3]:ca,33:p0,38:jf,42:Ya,60:[my,r0],91:m0,92:[Hy,zf],93:zl,95:Ya,96:Cy},$0={null:[Ya,I0]},z0={null:[42,95]},j0={null:[]},H0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:z0,contentInitial:P0,disable:j0,document:D0,flow:F0,flowInitial:B0,insideSpan:$0,string:q0,text:U0},Symbol.toStringTag,{value:"Module"}));function G0(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],a=[];const l={attempt:B(C),check:B(N),consume:_,enter:v,exit:T,interrupt:B(N,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:p,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function d(H){return o=St(o,H),b(),o[o.length-1]!==null?[]:(U(t,0),c.events=Vs(s,c.events,c),c.events)}function h(H,P){return W0(f(H),P)}function f(H){return K0(o,H)}function p(){const{_bufferIndex:H,_index:P,line:ne,column:X,offset:Y}=r;return{_bufferIndex:H,_index:P,line:ne,column:X,offset:Y}}function m(H){i[H.line]=H.column,O()}function b(){let H;for(;r._index<o.length;){const P=o[r._index];if(typeof P=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<P.length;)y(P.charCodeAt(r._bufferIndex));else y(P)}}function y(H){u=u(H)}function _(H){ae(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,O()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=H}function v(H,P){const ne=P||{};return ne.type=H,ne.start=p(),c.events.push(["enter",ne,c]),a.push(ne),ne}function T(H){const P=a.pop();return P.end=p(),c.events.push(["exit",P,c]),P}function C(H,P){U(H,P.from)}function N(H,P){P.restore()}function B(H,P){return ne;function ne(X,Y,L){let $,F,K,w;return Array.isArray(X)?le(X):"tokenize"in X?le([X]):Q(X);function Q(_e){return te;function te(ce){const Ne=ce!==null&&_e[ce],qe=ce!==null&&_e.null,Ue=[...Array.isArray(Ne)?Ne:Ne?[Ne]:[],...Array.isArray(qe)?qe:qe?[qe]:[]];return le(Ue)(ce)}}function le(_e){return $=_e,F=0,_e.length===0?L:k(_e[F])}function k(_e){return te;function te(ce){return w=G(),K=_e,_e.partial||(c.currentConstruct=_e),_e.name&&c.parser.constructs.disable.null.includes(_e.name)?se():_e.tokenize.call(P?Object.assign(Object.create(c),P):c,l,ge,se)(ce)}}function ge(_e){return H(K,w),Y}function se(_e){return w.restore(),++F<$.length?k($[F]):L}}}function U(H,P){H.resolveAll&&!s.includes(H)&&s.push(H),H.resolve&&wt(c.events,P,c.events.length-P,H.resolve(c.events.slice(P),c)),H.resolveTo&&(c.events=H.resolveTo(c.events,c))}function G(){const H=p(),P=c.previous,ne=c.currentConstruct,X=c.events.length,Y=Array.from(a);return{from:X,restore:L};function L(){r=H,c.previous=P,c.currentConstruct=ne,c.events.length=X,a=Y,O()}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function K0(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function W0(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
3
- `;break}case-3:{o=`\r
4
- `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function V0(e){const r={constructs:qf([H0,...(e||{}).extensions||[]]),content:i(cy),defined:[],document:i(dy),flow:i(C0),lazy:{},string:i(R0),text:i(L0)};return r;function i(s){return o;function o(a){return G0(r,s,a)}}}function Y0(e){for(;!Hf(e););return e}const eu=/[\0\t\n\r]/g;function Z0(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let c,u,d,h,f;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(eu.lastIndex=d,c=eu.exec(s),h=c&&c.index!==void 0?c.index:s.length,f=s.charCodeAt(h),!c){t=s.slice(d);break}if(f===10&&d===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<h&&(l.push(s.slice(d,h)),e+=h-d),f){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const X0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Q0(e){return e.replace(X0,J0)}function J0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Uf(n.slice(s?2:1),s?16:10)}return $l(n)||e}const Zf={}.hasOwnProperty;function ex(e,t,n){return typeof t!="string"&&(n=t,t=void 0),tx(n)(Y0(V0(n).document().write(Z0()(e,t,!0))))}function tx(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Mt),autolinkProtocol:G,autolinkEmail:G,atxHeading:s(Me),blockQuote:s(qe),characterEscape:G,characterReference:G,codeFenced:s(Ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Ue,o),codeText:s(Lt,o),codeTextData:G,data:G,codeFlowValue:G,definition:s(bt),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(vt),hardBreakEscape:s(me),hardBreakTrailing:s(me),htmlFlow:s(We,o),htmlFlowData:G,htmlText:s(We,o),htmlTextData:G,image:s(oe),label:o,link:s(Mt),listItem:s(ye),listItemValue:h,listOrdered:s(Ae,d),listUnordered:s(Ae),paragraph:s(Dt),reference:k,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Me),strong:s(ct),thematicBreak:s(kt)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:Ne,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:_e,characterReference:te,codeFenced:l(b),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:O,codeIndented:l(y),codeText:l(Y),codeTextData:O,data:O,definition:l(),definitionDestinationString:T,definitionLabelString:_,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(P),hardBreakTrailing:l(P),htmlFlow:l(ne),htmlFlowData:O,htmlText:l(X),htmlTextData:O,image:l($),label:K,labelText:F,lineEnding:H,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ge,resourceDestinationString:w,resourceTitleString:Q,resource:le,setextHeading:l(U),setextHeadingLineSequence:B,setextHeadingText:N,strong:l(),thematicBreak:l()}};Xf(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(S){let I={type:"root",children:[]};const j={stack:[I],tokenStack:[],config:t,enter:a,exit:c,buffer:o,resume:u,data:n},W=[];let re=-1;for(;++re<S.length;)if(S[re][1].type==="listOrdered"||S[re][1].type==="listUnordered")if(S[re][0]==="enter")W.push(re);else{const Te=W.pop();re=i(S,Te,re)}for(re=-1;++re<S.length;){const Te=t[S[re][0]];Zf.call(Te,S[re][1].type)&&Te[S[re][1].type].call(Object.assign({sliceSerialize:S[re][2].sliceSerialize},j),S[re][1])}if(j.tokenStack.length>0){const Te=j.tokenStack[j.tokenStack.length-1];(Te[1]||tu).call(j,void 0,Te[0])}for(I.position={start:An(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:An(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},re=-1;++re<t.transforms.length;)I=t.transforms[re](I)||I;return I}function i(S,I,j){let W=I-1,re=-1,Te=!1,ut,rt,Pt,Nt;for(;++W<=j;){const $e=S[W];switch($e[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$e[0]==="enter"?re++:re--,Nt=void 0;break}case"lineEndingBlank":{$e[0]==="enter"&&(ut&&!Nt&&!re&&!Pt&&(Pt=W),Nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nt=void 0}if(!re&&$e[0]==="enter"&&$e[1].type==="listItemPrefix"||re===-1&&$e[0]==="exit"&&($e[1].type==="listUnordered"||$e[1].type==="listOrdered")){if(ut){let yt=W;for(rt=void 0;yt--;){const je=S[yt];if(je[1].type==="lineEnding"||je[1].type==="lineEndingBlank"){if(je[0]==="exit")continue;rt&&(S[rt][1].type="lineEndingBlank",Te=!0),je[1].type="lineEnding",rt=yt}else if(!(je[1].type==="linePrefix"||je[1].type==="blockQuotePrefix"||je[1].type==="blockQuotePrefixWhitespace"||je[1].type==="blockQuoteMarker"||je[1].type==="listItemIndent"))break}Pt&&(!rt||Pt<rt)&&(ut._spread=!0),ut.end=Object.assign({},rt?S[rt][1].start:$e[1].end),S.splice(rt||W,0,["exit",ut,$e[2]]),W++,j++}if($e[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},$e[1].start),end:void 0};ut=yt,S.splice(W,0,["enter",yt,$e[2]]),W++,j++,Pt=void 0,Nt=!0}}}return S[I][1]._spread=Te,j}function s(S,I){return j;function j(W){a.call(this,S(W),W),I&&I.call(this,W)}}function o(){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:An(I.start),end:void 0}}function l(S){return I;function I(j){S&&S.call(this,j),c.call(this,j)}}function c(S,I){const j=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==S.type&&(I?I.call(this,S,W[0]):(W[1]||tu).call(this,S,W[0]));else throw new Error("Cannot close `"+S.type+"` ("+pi({start:S.start,end:S.end})+"): it’s not open");j.position.end=An(S.end)}function u(){return ny(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(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 f(){const S=this.resume(),I=this.stack[this.stack.length-1];I.lang=S}function p(){const S=this.resume(),I=this.stack[this.stack.length-1];I.meta=S}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){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 _(S){const I=this.resume(),j=this.stack[this.stack.length-1];j.label=I,j.identifier=Ht(this.sliceSerialize(S)).toLowerCase()}function v(){const S=this.resume(),I=this.stack[this.stack.length-1];I.title=S}function T(){const S=this.resume(),I=this.stack[this.stack.length-1];I.url=S}function C(S){const I=this.stack[this.stack.length-1];if(!I.depth){const j=this.sliceSerialize(S).length;I.depth=j}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function B(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 G(S){const j=this.stack[this.stack.length-1].children;let W=j[j.length-1];(!W||W.type!=="text")&&(W=Ve(),W.position={start:An(S.start),end:void 0},j.push(W)),this.stack.push(W)}function O(S){const I=this.stack.pop();I.value+=this.sliceSerialize(S),I.position.end=An(S.end)}function H(S){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const j=I.children[I.children.length-1];j.position.end=An(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(G.call(this,S),O.call(this,S))}function P(){this.data.atHardBreak=!0}function ne(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S}function X(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S}function Y(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S}function L(){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 $(){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 F(S){const I=this.sliceSerialize(S),j=this.stack[this.stack.length-2];j.label=Q0(I),j.identifier=Ht(I).toLowerCase()}function K(){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 W=S.children;j.children=W}else j.alt=I}function w(){const S=this.resume(),I=this.stack[this.stack.length-1];I.url=S}function Q(){const S=this.resume(),I=this.stack[this.stack.length-1];I.title=S}function le(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function ge(S){const I=this.resume(),j=this.stack[this.stack.length-1];j.label=I,j.identifier=Ht(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function se(S){this.data.characterReferenceType=S.type}function _e(S){const I=this.sliceSerialize(S),j=this.data.characterReferenceType;let W;j?(W=Uf(I,j==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=$l(I);const re=this.stack[this.stack.length-1];re.value+=W}function te(S){const I=this.stack.pop();I.position.end=An(S.end)}function ce(S){O.call(this,S);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(S)}function Ne(S){O.call(this,S);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(S)}function qe(){return{type:"blockquote",children:[]}}function Ue(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function vt(){return{type:"emphasis",children:[]}}function Me(){return{type:"heading",depth:0,children:[]}}function me(){return{type:"break"}}function We(){return{type:"html",value:""}}function oe(){return{type:"image",title:null,url:"",alt:null}}function Mt(){return{type:"link",title:null,url:"",children:[]}}function Ae(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function ye(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function Dt(){return{type:"paragraph",children:[]}}function ct(){return{type:"strong",children:[]}}function Ve(){return{type:"text",value:""}}function kt(){return{type:"thematicBreak"}}}function An(e){return{line:e.line,column:e.column,offset:e.offset}}function Xf(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xf(e,r):nx(e,r)}}function nx(e,t){let n;for(n in t)if(Zf.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function tu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pi({start:t.start,end:t.end})+") is still open")}function rx(e){const t=this;t.parser=n;function n(r){return ex(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ix(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function sx(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
- `}]}function ox(e,t){const n=t.value?t.value+`
6
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function ax(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lx(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cx(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=$r(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function ux(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dx(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Qf(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function fx(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qf(e,t);const i={src:$r(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function hx(e,t){const n={src:$r(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function px(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function gx(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qf(e,t);const i={href:$r(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function mx(e,t){const n={href:$r(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bx(e,t,n){const r=e.all(t),i=n?yx(n):Jf(t),s={},o=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
7
- `}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
8
- `});const c={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,c),e.applyData(t,c)}function yx(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Jf(n[r])}return t}function Jf(e){const t=e.spread;return t??e.children.length>1}function xx(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Ex(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wx(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function _x(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vx(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Bl(t.children[1]),l=Rf(t.children[t.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function kx(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const c=[];for(;++l<a;){const d=t.children[l],h={},f=o?o[l]:void 0;f&&(h.align=f);let p={type:"element",tagName:s,properties:h,children:[]};d&&(p.children=e.all(d),e.patch(d,p),p=e.applyData(d,p)),c.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function Nx(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const nu=9,ru=32;function Ax(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(iu(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(iu(t.slice(i),i>0,!1)),s.join("")}function iu(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===nu||s===ru;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===nu||s===ru;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Sx(e,t){const n={type:"text",value:Ax(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Tx(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Cx={blockquote:ix,break:sx,code:ox,delete:ax,emphasis:lx,footnoteReference:cx,heading:ux,html:dx,imageReference:fx,image:hx,inlineCode:px,linkReference:gx,link:mx,listItem:bx,list:xx,paragraph:Ex,root:wx,strong:_x,table:vx,tableCell:Nx,tableRow:kx,text:Sx,thematicBreak:Tx,toml:ss,yaml:ss,definition:ss,footnoteDefinition:ss};function ss(){}const eh=-1,Ys=0,mi=1,Rs=2,jl=3,Hl=4,Gl=5,Kl=6,th=7,nh=8,su=typeof self=="object"?self:globalThis,Ox=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case Ys:case eh:return n(o,i);case mi:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Rs:{const a=n({},i);for(const[l,c]of o)a[r(l)]=r(c);return a}case jl:return n(new Date(o),i);case Hl:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case Gl:{const a=n(new Map,i);for(const[l,c]of o)a.set(r(l),r(c));return a}case Kl:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case th:{const{name:a,message:l}=o;return n(new su[a](l),i)}case nh:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(new su[s](o),i)};return r},ou=e=>Ox(new Map,e)(0),mr="",{toString:Ix}={},{keys:Rx}=Object,oi=e=>{const t=typeof e;if(t!=="object"||!e)return[Ys,t];const n=Ix.call(e).slice(8,-1);switch(n){case"Array":return[mi,mr];case"Object":return[Rs,mr];case"Date":return[jl,mr];case"RegExp":return[Hl,mr];case"Map":return[Gl,mr];case"Set":return[Kl,mr];case"DataView":return[mi,n]}return n.includes("Array")?[mi,n]:n.includes("Error")?[th,n]:[Rs,n]},os=([e,t])=>e===Ys&&(t==="function"||t==="symbol"),Lx=(e,t,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=oi(o);switch(a){case Ys:{let u=o;switch(l){case"bigint":a=nh,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([eh],o)}return i([a,u],o)}case mi:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),i([l,[...h]],o)}const u=[],d=i([a,u],o);for(const h of o)u.push(s(h));return d}case Rs:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const u=[],d=i([a,u],o);for(const h of Rx(o))(e||!os(oi(o[h])))&&u.push([s(h),s(o[h])]);return d}case jl:return i([a,o.toISOString()],o);case Hl:{const{source:u,flags:d}=o;return i([a,{source:u,flags:d}],o)}case Gl:{const u=[],d=i([a,u],o);for(const[h,f]of o)(e||!(os(oi(h))||os(oi(f))))&&u.push([s(h),s(f)]);return d}case Kl:{const u=[],d=i([a,u],o);for(const h of o)(e||!os(oi(h)))&&u.push(s(h));return d}}const{message:c}=o;return i([a,{name:l,message:c}],o)};return s},au=(e,{json:t,lossy:n}={})=>{const r=[];return Lx(!(t||n),!!t,new Map,r)(e),r},Ls=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ou(au(e,t)):structuredClone(e):(e,t)=>ou(au(e,t));function Mx(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Dx(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Px(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Mx,r=e.options.footnoteBackLabel||Dx,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),h=$r(d.toLowerCase());let f=0;const p=[],m=e.footnoteCounts.get(d);for(;m!==void 0&&++f<=m;){p.length>0&&p.push({type:"text",value:" "});let _=typeof n=="string"?n:n(l,f);typeof _=="string"&&(_={type:"text",value:_}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const b=u[u.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const _=b.children[b.children.length-1];_&&_.type==="text"?_.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...p)}else u.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(u,!0)};e.patch(c,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ls(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
10
- `}]}}const rh=function(e){if(e==null)return Ux;if(typeof e=="function")return Zs(e);if(typeof e=="object")return Array.isArray(e)?Bx(e):Fx(e);if(typeof e=="string")return qx(e);throw new Error("Expected function, string, or object as test")};function Bx(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rh(e[n]);return Zs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Fx(e){const t=e;return Zs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function qx(e){return Zs(t);function t(n){return n&&n.type===e}}function Zs(e){return t;function t(n,r,i){return!!($x(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ux(){return!0}function $x(e){return e!==null&&typeof e=="object"&&"type"in e}const ih=[],zx=!0,lu=!1,jx="skip";function Hx(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=rh(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=ih,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=Gx(n(l,u)),f[0]===lu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==jx)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===lu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function Gx(e){return Array.isArray(e)?e:typeof e=="number"?[zx,e]:e==null?ih:[e]}function Kx(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),Hx(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const Za={}.hasOwnProperty,Wx={};function Vx(e,t){const n=t||Wx,r=new Map,i=new Map,s=new Map,o={...Cx,...n.handlers},a={all:c,applyData:Zx,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:Yx,wrap:Qx};return Kx(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:i,h=String(u.identifier).toUpperCase();d.has(h)||d.set(h,u)}}),a;function l(u,d){const h=u.type,f=a.handlers[h];if(Za.call(a.handlers,h)&&f)return f(a,u,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in u){const{children:m,...b}=u,y=Ls(b);return y.children=a.all(u),y}return Ls(u)}return(a.options.unknownHandler||Xx)(a,u,d)}function c(u){const d=[];if("children"in u){const h=u.children;let f=-1;for(;++f<h.length;){const p=a.one(h[f],u);if(p){if(f&&h[f-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=cu(p.value)),!Array.isArray(p)&&p.type==="element")){const m=p.children[0];m&&m.type==="text"&&(m.value=cu(m.value))}Array.isArray(p)?d.push(...p):d.push(p)}}}return d}}function Yx(e,t){e.position&&(t.position=Mb(e))}function Zx(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,Ls(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Xx(e,t){const n=t.data||{},r="value"in t&&!(Za.call(n,"hProperties")||Za.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Qx(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
1
+ "use strict";var Db=Object.defineProperty;var Pb=(e,t,n)=>t in e?Db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Q=(e,t,n)=>Pb(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),$=require("react");require("react-dom");function Bb(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ge=Bb($);var qe=(e=>(e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Scheduled=3]="Scheduled",e[e.Review=4]="Review",e))(qe||{});const ce=e=>typeof e=="string",fi=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},su=e=>e==null?"":""+e,Fb=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},$b=/###/g,au=e=>e&&e.indexOf("###")>-1?e.replace($b,"."):e,ou=e=>!e||ce(e),vi=(e,t,n)=>{const r=ce(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(ou(e))return{};const s=au(r[i]);!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++i}return ou(e)?{}:{obj:e,k:au(r[i])}},lu=(e,t,n)=>{const{obj:r,k:i}=vi(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let s=t[t.length-1],a=t.slice(0,t.length-1),o=vi(e,a,Object);for(;o.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),o=vi(e,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${s}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${s}`]=n},Ub=(e,t,n,r)=>{const{obj:i,k:s}=vi(e,t,Object);i[s]=i[s]||[],i[s].push(n)},zs=(e,t)=>{const{obj:n,k:r}=vi(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},qb=(e,t,n)=>{const r=zs(e,n);return r!==void 0?r:zs(t,n)},fh=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?ce(e[r])||e[r]instanceof String||ce(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):fh(e[r],t[r],n):e[r]=t[r]);return e},Yn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var jb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const zb=e=>ce(e)?e.replace(/[&<>"'\/]/g,t=>jb[t]):e;class Hb{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Gb=[" ",",","?","!",";"],Kb=new Hb(20),Vb=(e,t,n)=>{t=t||"",n=n||"";const r=Gb.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=Kb.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!i.test(e);if(!s){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(s=!0)}return s},ll=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let s=0;s<r.length;){if(!i||typeof i!="object")return;let a,o="";for(let l=s;l<r.length;++l)if(l!==s&&(o+=n),o+=r[l],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<r.length-1)continue;s+=l-s+1;break}i=a}return i},Ii=e=>e==null?void 0:e.replace("_","-"),Wb={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class Hs{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Wb,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(ce(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Hs(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Hs(this.logger,t)}}var cn=new Hs;let oa=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,s])=>{for(let a=0;a<s;a++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,s])=>{for(let a=0;a<s;a++)i.apply(i,[t,...n])})}};class cu extends oa{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,i={}){var c,u;const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;t.indexOf(".")>-1?o=t.split("."):(o=[t,n],r&&(Array.isArray(r)?o.push(...r):ce(r)&&s?o.push(...r.split(s)):o.push(r)));const l=zs(this.data,o);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=o[0],n=o[1],r=o.slice(2).join(".")),l||!a||!ce(r)?l:ll((u=(c=this.data)==null?void 0:c[t])==null?void 0:u[n],r,s)}addResource(t,n,r,i,s={silent:!1}){const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let o=[t,n];r&&(o=o.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(o=t.split("."),i=n,n=o[1]),this.addNamespaces(n),lu(this.data,o,i),s.silent||this.emit("added",t,n,r,i)}addResources(t,n,r,i={silent:!1}){for(const s in r)(ce(r[s])||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,s,a={silent:!1,skipCopy:!1}){let o=[t,n];t.indexOf(".")>-1&&(o=t.split("."),i=r,r=n,n=o[1]),this.addNamespaces(n);let l=zs(this.data,o)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?fh(l,r,s):l={...l,...r},lu(this.data,o,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var hh={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(s=>{var a;t=((a=this.processors[s])==null?void 0:a.process(t,n,r,i))??t}),t}};const ph=Symbol("i18next/PATH_KEY");function Yb(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>{var s;return(s=n==null?void 0:n.revoke)==null||s.call(n),i===ph?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function cl(e,t){const{[ph]:n}=e(Yb());return n.join((t==null?void 0:t.keySeparator)??".")}const uu={},vo=e=>!ce(e)&&typeof e!="boolean"&&typeof e!="number";class Gs extends oa{constructor(t,n={}){super(),Fb(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=cn.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const i=this.resolve(t,r);if((i==null?void 0:i.res)===void 0)return!1;const s=vo(i.res);return!(r.returnObjects===!1&&s)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Vb(t,r,i);if(a&&!o){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:ce(s)?[s]:s};const c=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),t=c.join(i)}return{key:t,namespaces:ce(s)?[s]:s}}translate(t,n,r){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=cl(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]);const s=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(t[t.length-1],i),c=l[l.length-1];let u=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const d=i.lng||this.language,h=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return h?s?{res:`${c}${u}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(i)}:`${c}${u}${o}`:s?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(i)}:o;const f=this.resolve(t,i);let p=f==null?void 0:f.res;const g=(f==null?void 0:f.usedKey)||o,b=(f==null?void 0:f.exactUsedKey)||o,y=["[object Number]","[object Function]","[object RegExp]"],w=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,A=i.count!==void 0&&!ce(i.count),O=Gs.hasDefaultValue(i),N=A?this.pluralResolver.getSuffix(d,i.count,i):"",D=i.ordinal&&A?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):"",q=A&&!i.ordinal&&i.count===0,H=q&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${N}`]||i[`defaultValue${D}`]||i.defaultValue;let C=p;_&&!p&&O&&(C=H);const F=vo(C),M=Object.prototype.toString.apply(C);if(_&&C&&F&&y.indexOf(M)<0&&!(ce(w)&&Array.isArray(C))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const V=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,C,{...i,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(f.res=V,f.usedParams=this.getUsedParamsDetails(i),f):V}if(a){const V=Array.isArray(C),z=V?[]:{},Z=V?b:g;for(const I in C)if(Object.prototype.hasOwnProperty.call(C,I)){const U=`${Z}${a}${I}`;O&&!p?z[I]=this.translate(U,{...i,defaultValue:vo(H)?H[I]:void 0,joinArrays:!1,ns:l}):z[I]=this.translate(U,{...i,joinArrays:!1,ns:l}),z[I]===U&&(z[I]=C[I])}p=z}}else if(_&&ce(w)&&Array.isArray(p))p=p.join(w),p&&(p=this.extendTranslation(p,t,i,r));else{let V=!1,z=!1;!this.isValidLookup(p)&&O&&(V=!0,p=H),this.isValidLookup(p)||(z=!0,p=o);const I=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&z?void 0:p,U=O&&H!==p&&this.options.updateMissing;if(z||V||U){if(this.logger.log(U?"updateKey":"missingKey",d,c,o,U?H:p),a){const Y=this.resolve(o,{...i,keySeparator:!1});Y&&Y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let j=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let Y=0;Y<W.length;Y++)j.push(W[Y]);else this.options.saveMissingTo==="all"?j=this.languageUtils.toResolveHierarchy(i.lng||this.language):j.push(i.lng||this.language);const v=(Y,ae,k)=>{var re;const de=O&&k!==p?k:I;this.options.missingKeyHandler?this.options.missingKeyHandler(Y,c,ae,de,U,i):(re=this.backendConnector)!=null&&re.saveMissing&&this.backendConnector.saveMissing(Y,c,ae,de,U,i),this.emit("missingKey",Y,c,ae,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?j.forEach(Y=>{const ae=this.pluralResolver.getSuffixes(Y,i);q&&i[`defaultValue${this.options.pluralSeparator}zero`]&&ae.indexOf(`${this.options.pluralSeparator}zero`)<0&&ae.push(`${this.options.pluralSeparator}zero`),ae.forEach(k=>{v([Y],o+k,i[`defaultValue${k}`]||H)})}):v(j,o,H))}p=this.extendTranslation(p,t,i,f,r),z&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${c}${u}${o}`),(z||V)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${o}`:o,V?p:void 0,i))}return s?(f.res=p,f.usedParams=this.getUsedParamsDetails(i),f):p}extendTranslation(t,n,r,i,s){var l,c;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=ce(t)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const f=t.match(this.interpolator.nestingRegexp);d=f&&f.length}let h=r.replace&&!ce(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||i.usedLng,r),u){const f=t.match(this.interpolator.nestingRegexp),p=f&&f.length;d<p&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...f)=>(s==null?void 0:s[0])===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,o=ce(a)?[a]:a;return t!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(t=hh.handle(o,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,i,s,a,o;return ce(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;i=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=n.count!==void 0&&!ce(n.count),f=h&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(ce(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(b=>{var y,w;this.isValidLookup(r)||(o=b,!uu[`${g[0]}-${b}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((w=this.utils)!=null&&w.hasLoadedNamespace(o))&&(uu[`${g[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(_=>{var N;if(this.isValidLookup(r))return;a=_;const A=[u];if((N=this.i18nFormat)!=null&&N.addLookupKeys)this.i18nFormat.addLookupKeys(A,u,_,b,n);else{let D;h&&(D=this.pluralResolver.getSuffix(_,n.count,n));const q=`${this.options.pluralSeparator}zero`,H=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&D.indexOf(H)===0&&A.push(u+D.replace(H,this.options.pluralSeparator)),A.push(u+D),f&&A.push(u+q)),p){const C=`${u}${this.options.contextSeparator||"_"}${n.context}`;A.push(C),h&&(n.ordinal&&D.indexOf(H)===0&&A.push(C+D.replace(H,this.options.pluralSeparator)),A.push(C+D),f&&A.push(C+q))}}let O;for(;O=A.pop();)this.isValidLookup(r)||(s=O,r=this.getResource(_,b,O,n))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:a,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,i={}){var s;return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!ce(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const s of n)delete i[s]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class du{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=cn.create("languageUtils")}getScriptPartFromCode(t){if(t=Ii(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ii(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(ce(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return n=i;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(a=>{if(a===s)return a;if(!(a.indexOf("-")<0&&s.indexOf("-")<0)&&(a.indexOf("-")>0&&s.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===s||a.indexOf(s)===0&&s.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),ce(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),i=[],s=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return ce(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):ce(t)&&s(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&s(this.formatLanguageCode(a))}),i}}const fu={zero:0,one:1,two:2,few:3,many:4,other:5},hu={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Zb{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=cn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Ii(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),hu;if(!t.match(/-|_/))return hu;const l=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(l,n)}return this.pluralRulesCache[s]=a,a}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,s)=>fu[i]-fu[s]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n,r={}){const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const pu=(e,t,n,r=".",i=!0)=>{let s=qb(e,t,n);return!s&&i&&ce(n)&&(s=ll(e,n,r),s===void 0&&(s=ll(t,n,r))),s},_o=e=>e.replace(/\$/g,"$$$$");class gu{constructor(t={}){var n;this.logger=cn.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:h,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:b,maxReplaces:y,alwaysFormat:w}=t.interpolation;this.escape=n!==void 0?n:zb,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Yn(s):a||"{{",this.suffix=o?Yn(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?Yn(h):f||Yn("$t("),this.nestingSuffix=p?Yn(p):g||Yn(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=y||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,i){var f;let s,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){const w=pu(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...i,...n,interpolationkey:p}):w}const g=p.split(this.formatSeparator),b=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(pu(n,l,b,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...i,...n,interpolationkey:b})};this.resetRegExp();const u=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((f=i==null?void 0:i.interpolation)==null?void 0:f.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>_o(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?_o(this.escape(p)):_o(p)}].forEach(p=>{for(o=0;s=p.regex.exec(t);){const g=s[1].trim();if(a=c(g),a===void 0)if(typeof u=="function"){const y=u(t,s,i);a=ce(y)?y:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))a="";else if(d){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),a="";else!ce(a)&&!this.useRawValueToEscape&&(a=su(a));const b=p.safeValue(a);if(t=t.replace(s[0],b),d?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=s[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,n,r={}){let i,s,a;const o=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${Yn(u)}[ ]*{`));let h=`{${d[1]}`;l=d[0],h=this.interpolate(h,a);const f=h.match(/'/g),p=h.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!p||((p==null?void 0:p.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),c&&(a={...c,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${h}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&!ce(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const c=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(c!==-1&&(l=i[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),i[1]=i[1].slice(0,c)),s=n(o.call(this,i[1].trim(),a),a),s&&i[0]===t&&!ce(s))return s;ce(s)||(s=su(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),l.length&&(s=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}const Xb=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[o,...l]=a.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=o.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},mu=e=>{const t={};return(n,r,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const a=r+JSON.stringify(s);let o=t[a];return o||(o=e(Ii(r),i),t[a]=o),o(n)}},Jb=e=>(t,n,r)=>e(Ii(n),r)(t);class Qb{constructor(t={}){this.logger=cn.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?mu:Jb;this.formats={number:r((i,s)=>{const a=new Intl.NumberFormat(i,{...s});return o=>a.format(o)}),currency:r((i,s)=>{const a=new Intl.NumberFormat(i,{...s,style:"currency"});return o=>a.format(o)}),datetime:r((i,s)=>{const a=new Intl.DateTimeFormat(i,{...s});return o=>a.format(o)}),relativetime:r((i,s)=>{const a=new Intl.RelativeTimeFormat(i,{...s});return o=>a.format(o,s.range||"day")}),list:r((i,s)=>{const a=new Intl.ListFormat(i,{...s});return o=>a.format(o)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=mu(n)}format(t,n,r,i={}){const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(o=>o.indexOf(")")>-1)){const o=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,o)].join(this.formatSeparator)}return s.reduce((o,l)=>{var d;const{formatName:c,formatOptions:u}=Xb(l);if(this.formats[c]){let h=o;try{const f=((d=i==null?void 0:i.formatParams)==null?void 0:d[i.interpolationkey])||{},p=f.locale||f.lng||i.locale||i.lng||r;h=this.formats[c](o,p,{...u,...i,...f})}catch(f){this.logger.warn(f)}return h}else this.logger.warn(`there was no format function for ${c}`);return o},t)}}const ey=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class ty extends oa{constructor(t,n,r,i={}){var s,a;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=cn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,r,i.backend,i)}queueLoad(t,n,r,i){const s={},a={},o={},l={};return t.forEach(c=>{let u=!0;n.forEach(d=>{const h=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,u=!1,a[h]===void 0&&(a[h]=!0),s[h]===void 0&&(s[h]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(o[c]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),s=i[0],a=i[1];n&&this.emit("failedLoading",s,a,n),!n&&r&&this.store.addResourceBundle(s,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const o={};this.queue.forEach(l=>{Ub(l.loaded,[s],a),ey(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{o[c][d]===void 0&&(o[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r,i=0,s=this.retryTimeout,a){if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:s,callback:a});return}this.readingCalls++;const o=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,s*2,a)},s);return}a(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>o(null,u)).catch(o):o(null,c)}catch(c){o(c)}return}return l(t,n,o)}prepareLoading(t,n,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();ce(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ce(n)&&(n=[n]);const s=this.queueLoad(t,n,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`,a),!a&&o&&this.logger.log(`${n}loaded namespace ${s} for language ${i}`,o),this.loaded(t,a,o)})}saveMissing(t,n,r,i,s,a={},o=()=>{}){var l,c,u,d,h;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((d=(u=this.services)==null?void 0:u.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const f={...a,isUpdate:s},p=this.backend.create.bind(this.backend);if(p.length<6)try{let g;p.length===5?g=p(t,n,r,i,f):g=p(t,n,r,i),g&&typeof g.then=="function"?g.then(b=>o(null,b)).catch(o):o(null,g)}catch(g){o(g)}else p(t,n,r,i,o,f)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const ko=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),ce(e[1])&&(t.defaultValue=e[1]),ce(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),bu=e=>{var t,n;return ce(e.ns)&&(e.ns=[e.ns]),ce(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ce(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},ms=()=>{},ny=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};let yu=!1;const ry=e=>{var t,n,r,i,s,a,o,l,c;return!!(((r=(n=(t=e==null?void 0:e.modules)==null?void 0:t.backend)==null?void 0:n.name)==null?void 0:r.indexOf("Locize"))>0||((o=(a=(s=(i=e==null?void 0:e.modules)==null?void 0:i.backend)==null?void 0:s.constructor)==null?void 0:a.name)==null?void 0:o.indexOf("Locize"))>0||(c=(l=e==null?void 0:e.options)==null?void 0:l.backend)!=null&&c.backends&&e.options.backend.backends.some(u=>{var d,h,f;return((d=u==null?void 0:u.name)==null?void 0:d.indexOf("Locize"))>0||((f=(h=u==null?void 0:u.constructor)==null?void 0:h.name)==null?void 0:f.indexOf("Locize"))>0}))};class _i extends oa{constructor(t={},n){if(super(),this.options=bu(t),this.services={},this.logger=cn,this.modules={external:[]},ny(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(ce(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=ko();this.options={...r,...this.options,...bu(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!ry(this)&&!yu&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),yu=!0);const i=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?cn.init(i(this.modules.logger),this.options):cn.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Qb;const u=new du(this.options);this.store=new cu(this.options.resources,this.options);const d=this.services;d.logger=cn,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new Zb(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(d.formatter=i(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new gu(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new ty(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.languageDetector&&(d.languageDetector=i(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=i(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Gs(this.services,this.options),this.translator.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ms),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const o=fi(),l=()=>{const c=(u,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(d),n(u,d)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(t,n=ms){var s,a;let r=n;const i=ce(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(d=>{d!=="cimode"&&o.indexOf(d)<0&&o.push(d)})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>l(u)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,c=>l(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const i=fi();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ms),this.services.backendConnector.reload(t,n,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&hh.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=fi();this.emit("languageChanging",t);const i=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},s=(o,l)=>{l?this.isLanguageChangingTo===t&&(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(o,(...c)=>this.t(...c))},a=o=>{var u,d;!t&&!o&&this.services.languageDetector&&(o=[]);const l=ce(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(ce(o)?[o]:o);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),(d=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||d.call(u,c)),this.loadResources(c,h=>{s(h,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),r}getFixedT(t,n,r){const i=(s,a,...o)=>{let l;typeof a!="object"?l=this.options.overloadTranslationOptionHandler([s,a].concat(o)):l={...a},l.lng=l.lng||i.lng,l.lngs=l.lngs||i.lngs,l.ns=l.ns||i.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||i.keyPrefix);const c=this.options.keySeparator||".";let u;return l.keyPrefix&&Array.isArray(s)?u=s.map(d=>(typeof d=="function"&&(d=cl(d,{...this.options,...a})),`${l.keyPrefix}${c}${d}`)):(typeof s=="function"&&(s=cl(s,{...this.options,...a})),u=l.keyPrefix?`${l.keyPrefix}${c}${s}`:s),this.t(u,l)};return ce(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const o=n.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(s,t)))}loadNamespaces(t,n){const r=fi();return this.options.ns?(ce(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=fi();ce(t)&&(t=[t]);const i=this.options.preload||[],s=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=i.concat(s),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){var i,s;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const a=new Intl.Locale(t);if(a&&a.getTextInfo){const o=a.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((s=this.services)==null?void 0:s.languageUtils)||new du(ko());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new _i(t,n);return r.createInstance=_i.createInstance,r}cloneInstance(t={},n=ms){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new _i(i);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(o=>{s[o]=this[o]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,d)=>(u[d]={...l[c][d]},u),l[c]),l),{});s.store=new cu(o,i),s.services.resourceStore=s.store}if(t.interpolation){const l={...ko().interpolation,...this.options.interpolation,...t.interpolation},c={...i,interpolation:l};s.services.interpolator=new gu(c)}return s.translator=new Gs(s.services,i),s.translator.on("*",(o,...l)=>{s.emit(o,...l)}),s.init(i,n),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const dt=_i.createInstance();dt.createInstance;dt.dir;dt.init;dt.loadResources;dt.reloadResources;dt.use;dt.changeLanguage;dt.getFixedT;dt.t;dt.exists;dt.setDefaultNamespace;dt.hasLoadedNamespace;dt.loadNamespaces;dt.loadLanguages;var Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const iy=(e,t,n,r)=>{var s,a,o,l;const i=[n,{code:t,...r||{}}];if((a=(s=e==null?void 0:e.services)==null?void 0:s.logger)!=null&&a.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);tr(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(l=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&l.warn?e.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},xu={},gh=(e,t,n,r)=>{tr(n)&&xu[n]||(tr(n)&&(xu[n]=new Date),iy(e,t,n,r))},mh=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},ul=(e,t,n)=>{e.loadNamespaces(t,mh(e,n))},Eu=(e,t,n,r)=>{if(tr(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return ul(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,mh(e,r))},sy=(e,t,n={})=>!t.languages||!t.languages.length?(gh(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),tr=e=>typeof e=="string",ay=e=>typeof e=="object"&&e!==null,oy=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ly={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},cy=e=>ly[e],uy=e=>e.replace(oy,cy);let dl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:uy,transDefaultProps:void 0};const dy=(e={})=>{dl={...dl,...e}},fy=()=>dl;let bh;const hy=e=>{bh=e},py=()=>bh,gy={type:"3rdParty",init(e){dy(e.options.react),hy(e)}},yh=$.createContext();class my{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var fl={exports:{}},No={};/**
2
+ * @license React
3
+ * use-sync-external-store-shim.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var wu;function by(){if(wu)return No;wu=1;var e=$;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function o(d,h){var f=h(),p=r({inst:{value:f,getSnapshot:h}}),g=p[0].inst,b=p[1];return s(function(){g.value=f,g.getSnapshot=h,l(g)&&b({inst:g})},[d,f,h]),i(function(){return l(g)&&b({inst:g}),d(function(){l(g)&&b({inst:g})})},[d]),a(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:o;return No.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,No}var So={};/**
10
+ * @license React
11
+ * use-sync-external-store-shim.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var vu;function yy(){return vu||(vu=1,process.env.NODE_ENV!=="production"&&function(){function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){u||i.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=p();if(!d){var b=p();s(g,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=a({inst:{value:g,getSnapshot:p}});var y=b[0].inst,w=b[1];return l(function(){y.value=g,y.getSnapshot=p,n(y)&&w({inst:y})},[f,g,p]),o(function(){return n(y)&&w({inst:y}),f(function(){n(y)&&w({inst:y})})},[f]),c(g),g}function n(f){var p=f.getSnapshot;f=f.value;try{var g=p();return!s(f,g)}catch{return!0}}function r(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=$,s=typeof Object.is=="function"?Object.is:e,a=i.useState,o=i.useEffect,l=i.useLayoutEffect,c=i.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;So.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),So}process.env.NODE_ENV==="production"?fl.exports=by():fl.exports=yy();var xh=fl.exports;const xy=(e,t)=>tr(t)?t:ay(t)&&tr(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,Ey={t:xy,ready:!1},wy=()=>()=>{},vy=(e,t={})=>{var H,C;const{i18n:n}=t,{i18n:r,defaultNS:i}=$.useContext(yh)||{},s=n||r||py();s&&!s.reportNamespaces&&(s.reportNamespaces=new my),s||gh(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const a=$.useMemo(()=>{var F;return{...fy(),...(F=s==null?void 0:s.options)==null?void 0:F.react,...t}},[s,t]),{useSuspense:o,keyPrefix:l}=a,c=e,u=tr(c)?[c]:c,d=$.useMemo(()=>u,u);(C=(H=s==null?void 0:s.reportNamespaces)==null?void 0:H.addUsedNamespaces)==null||C.call(H,d);const h=$.useRef(0),f=$.useCallback(F=>{if(!s)return wy;const{bindI18n:M,bindI18nStore:V}=a,z=()=>{h.current+=1,F()};return M&&s.on(M,z),V&&s.store.on(V,z),()=>{M&&M.split(" ").forEach(Z=>s.off(Z,z)),V&&V.split(" ").forEach(Z=>s.store.off(Z,z))}},[s,a]),p=$.useRef(),g=$.useCallback(()=>{if(!s)return Ey;const F=!!(s.isInitialized||s.initializedStoreOnce)&&d.every(U=>sy(U,s,a)),M=t.lng||s.language,V=h.current,z=p.current;if(z&&z.ready===F&&z.lng===M&&z.keyPrefix===l&&z.revision===V)return z;const I={t:s.getFixedT(M,a.nsMode==="fallback"?d:d[0],l),ready:F,lng:M,keyPrefix:l,revision:V};return p.current=I,I},[s,d,l,a,t.lng]),[b,y]=$.useState(0),{t:w,ready:_}=xh.useSyncExternalStore(f,g,g);$.useEffect(()=>{if(s&&!_&&!o){const F=()=>y(M=>M+1);t.lng?Eu(s,t.lng,d,F):ul(s,d,F)}},[s,t.lng,d,_,o,b]);const A=s||{},O=$.useRef(null),N=$.useRef(),D=F=>{const M=Object.getOwnPropertyDescriptors(F);M.__original&&delete M.__original;const V=Object.create(Object.getPrototypeOf(F),M);if(!Object.prototype.hasOwnProperty.call(V,"__original"))try{Object.defineProperty(V,"__original",{value:F,writable:!1,enumerable:!1,configurable:!1})}catch{}return V},q=$.useMemo(()=>{const F=A,M=F==null?void 0:F.language;let V=F;F&&(O.current&&O.current.__original===F?N.current!==M?(V=D(F),O.current=V,N.current=M):V=O.current:(V=D(F),O.current=V,N.current=M));const z=[w,V,_];return z.t=w,z.i18n=V,z.ready=_,z},[w,A,_,A.resolvedLanguage,A.language,A.languages]);if(s&&o&&!_)throw new Promise(F=>{const M=()=>F();t.lng?Eu(s,t.lng,d,M):ul(s,d,M)});return q};function _y({i18n:e,defaultNS:t,children:n}){const r=$.useMemo(()=>({i18n:e,defaultNS:t}),[e,t]);return $.createElement(yh.Provider,{value:r},n)}const rc={common:{cancel:"Cancel",save:"Save",saving:"Saving...",create:"Create",update:"Update",delete:"Delete",edit:"Edit",back:"Back",close:"Close",loading:"Loading...",title:"Title",titleRequired:"Title *",slug:"Slug",actions:"Actions",noCategory:"No Category",pleaseWait:"Please wait..."},validation:{titleRequired:"Title is required",contentRequired:"Content is required",imageFileType:"Please select an image file",imageSizeLimit:"Image size must be less than 5MB",imageUploadFailed:"Failed to upload image. Please try again.",promptRequired:"Prompt is required",promptMinLength:"Prompt must be at least 10 characters long",promptMaxLength:"Prompt must be less than 2000 characters",articleIdRequired:"Article ID is required for update mode",targetTagRequired:"Please select a target tag",tagFormatInvalid:"Invalid tag format. Use comma-separated values.",tagEmpty:"Tags cannot be empty. Remove extra commas.",tagTooLong:"Individual tags must be less than 50 characters",passwordMinLength:"Password must be at least {{minLength}} characters long",passwordUppercase:"Password must contain at least one uppercase letter",passwordLowercase:"Password must contain at least one lowercase letter",passwordNumber:"Password must contain at least one number",passwordSpecialChar:"Password must contain at least one special character"},articleEditor:{enterTitle:"Enter article title",publicationDate:"Publication Date",category:"Category",status:"Status",statusDraft:"Draft",statusPublished:"Published",statusArchived:"Archived",statusScheduled:"Scheduled",statusReview:"Review",featuredImage:"Featured Image",uploading:"Uploading...",imageHint:"JPG, PNG, GIF. Max 5MB",contentLabel:"Content *",contentPlaceholder:"Write your article content...",tags:"Tags",tagsPlaceholder:"Enter tags separated by commas (e.g., AI, Technology, Innovation)",tagsHint:"Comma-separated list of tags. Tags will be created automatically if they don't exist.",visibility:"Visibility",visibleToAll:"Visible to all",loadingRoles:"Loading roles...",selectRolesHint:"Select the roles that can view this article:",noRolesAvailable:"No roles available.",updateArticle:"Update Article",createArticle:"Create Article",preview:"Preview"},articleList:{loadingArticles:"Loading articles...",errorLoading:"Error loading articles: {{message}}",noArticles:"No articles found",showingArticles:"Showing {{count}} of {{total}} articles (Page {{page}} of {{totalPages}})",aiEdit:"AI Edit"},aiGenerator:{createTitle:"Create Article with AI",updateTitle:"Update Article with AI",createDescription:"Use AI to generate a complete article with title, content, and tags based on your description.",updateDescription:"Use AI to modify the existing article content based on your instructions.",descriptionLabel:"Description / Instructions *",createPlaceholder:'Describe the article you want to create (e.g., "Write a comprehensive article about AI trends in 2024, including ChatGPT-4, Gemini, and practical applications in different industries")',updatePlaceholder:'Describe the changes you want to make (e.g., "Add a new section about the latest ChatGPT-4 updates launched in January 2024 and improve the introduction to make it more engaging")',characterCount:"{{count}} / 2000 characters (minimum 10)",generateImage:"Generate image with DALL-E 3",generateImageHint:"AI will create an illustrative image for the article. This may take a few extra seconds.",creatingWithAI:"Creating article with AI...",updatingWithAI:"Updating article with AI...",generatingContentImage:"Generating content and image with AI... This may take a few moments.",generating:"Generating...",createWithAI:"Create with AI",updateWithAI:"Update with AI",generationFailed:"Failed to generate article with AI. Please try again."},categoryList:{loadingCategories:"Loading categories...",errorLoading:"Error loading categories: {{message}}",noCategories:"No categories found",articles:"Articles",parent:"Parent",parentId:"Parent ID: {{id}}"},categoryModal:{editCategory:"Edit Category",createCategory:"Create Category",enterTitle:"Enter category title",parentCategory:"Parent Category",noneTopLevel:"None (Top Level)"},tagList:{loadingTags:"Loading tags...",errorLoading:"Error loading tags: {{message}}",noTags:"No tags found",merge:"Merge"},tagModal:{editTag:"Edit Tag",createTag:"Create Tag",enterTitle:"Enter tag title",slugPlaceholder:"tag-slug (optional)",slugHint:"URL-friendly version of the title. Leave empty to auto-generate."},tagMerge:{title:"Merge Tags",description:"All articles tagged with <strong>{{tag}}</strong> will be moved to the selected target tag, and the source tag will be deleted.",sourceTag:"Source Tag",targetTag:"Target Tag *",selectTarget:"Select target tag",targetHint:"Select the tag that will receive all articles from the source tag",noTagsAvailable:"No other tags available. You need at least 2 tags to perform a merge.",merging:"Merging...",mergeTags:"Merge Tags"},markdownEditor:{editTab:"Edit",previewTab:"Preview",placeholder:"Write your content in Markdown...",nothingToPreview:"Nothing to preview",syntaxHelp:"Markdown Syntax Help:",heading1:"Main heading",heading2:"Subheading",bold:"Bold",italic:"Italic",link:"Link",image:"Image",bulletList:"Bullet list",numberedList:"Numbered list",inlineCode:"Inline code",codeBlock:"Code block"},richTextEditor:{placeholder:"Write your content..."}},ic={common:{cancel:"Cancelar",save:"Salvar",saving:"Salvando...",create:"Criar",update:"Atualizar",delete:"Excluir",edit:"Editar",back:"Voltar",close:"Fechar",loading:"Carregando...",title:"Título",titleRequired:"Título *",slug:"Slug",actions:"Ações",noCategory:"Sem Categoria",pleaseWait:"Por favor aguarde..."},validation:{titleRequired:"Título é obrigatório",contentRequired:"Conteúdo é obrigatório",imageFileType:"Por favor selecione um arquivo de imagem",imageSizeLimit:"O tamanho da imagem deve ser menor que 5MB",imageUploadFailed:"Falha ao enviar imagem. Por favor tente novamente.",promptRequired:"Prompt é obrigatório",promptMinLength:"O prompt deve ter pelo menos 10 caracteres",promptMaxLength:"O prompt deve ter no máximo 2000 caracteres",articleIdRequired:"ID do artigo é obrigatório para modo de atualização",targetTagRequired:"Por favor selecione uma tag de destino",tagFormatInvalid:"Formato de tag inválido. Use valores separados por vírgula.",tagEmpty:"Tags não podem ser vazias. Remova as vírgulas extras.",tagTooLong:"Tags individuais devem ter menos de 50 caracteres",passwordMinLength:"A senha deve ter pelo menos {{minLength}} caracteres",passwordUppercase:"A senha deve conter pelo menos uma letra maiúscula",passwordLowercase:"A senha deve conter pelo menos uma letra minúscula",passwordNumber:"A senha deve conter pelo menos um número",passwordSpecialChar:"A senha deve conter pelo menos um caractere especial"},articleEditor:{enterTitle:"Digite o título do artigo",publicationDate:"Data de Publicação",category:"Categoria",status:"Status",statusDraft:"Rascunho",statusPublished:"Publicado",statusArchived:"Arquivado",statusScheduled:"Agendado",statusReview:"Em Revisão",featuredImage:"Imagem Destacada",uploading:"Enviando...",imageHint:"JPG, PNG, GIF. Máx 5MB",contentLabel:"Conteúdo *",contentPlaceholder:"Escreva o conteúdo do seu artigo...",tags:"Tags",tagsPlaceholder:"Digite tags separadas por vírgulas (ex: IA, Tecnologia, Inovação)",tagsHint:"Lista de tags separadas por vírgula. Tags serão criadas automaticamente se não existirem.",visibility:"Visibilidade",visibleToAll:"Visível para todos",loadingRoles:"Carregando perfis...",selectRolesHint:"Selecione os perfis que podem visualizar este artigo:",noRolesAvailable:"Nenhum perfil disponível.",updateArticle:"Atualizar Artigo",createArticle:"Criar Artigo",preview:"Visualizar"},articleList:{loadingArticles:"Carregando artigos...",errorLoading:"Erro ao carregar artigos: {{message}}",noArticles:"Nenhum artigo encontrado",showingArticles:"Mostrando {{count}} de {{total}} artigos (Página {{page}} de {{totalPages}})",aiEdit:"Editar com IA"},aiGenerator:{createTitle:"Criar Artigo com IA",updateTitle:"Atualizar Artigo com IA",createDescription:"Use IA para gerar um artigo completo com título, conteúdo e tags baseado na sua descrição.",updateDescription:"Use IA para modificar o conteúdo do artigo existente baseado nas suas instruções.",descriptionLabel:"Descrição / Instruções *",createPlaceholder:'Descreva o artigo que você quer criar (ex: "Escreva um artigo abrangente sobre tendências de IA em 2024, incluindo ChatGPT-4, Gemini e aplicações práticas em diferentes indústrias")',updatePlaceholder:'Descreva as alterações que você quer fazer (ex: "Adicione uma nova seção sobre as últimas atualizações do ChatGPT-4 lançadas em janeiro de 2024 e melhore a introdução para torná-la mais envolvente")',characterCount:"{{count}} / 2000 caracteres (mínimo 10)",generateImage:"Gerar imagem com DALL-E 3",generateImageHint:"A IA criará uma imagem ilustrativa para o artigo. Isso pode levar alguns segundos extras.",creatingWithAI:"Criando artigo com IA...",updatingWithAI:"Atualizando artigo com IA...",generatingContentImage:"Gerando conteúdo e imagem com IA... Isso pode levar alguns momentos.",generating:"Gerando...",createWithAI:"Criar com IA",updateWithAI:"Atualizar com IA",generationFailed:"Falha ao gerar artigo com IA. Por favor tente novamente."},categoryList:{loadingCategories:"Carregando categorias...",errorLoading:"Erro ao carregar categorias: {{message}}",noCategories:"Nenhuma categoria encontrada",articles:"Artigos",parent:"Pai",parentId:"ID do Pai: {{id}}"},categoryModal:{editCategory:"Editar Categoria",createCategory:"Criar Categoria",enterTitle:"Digite o título da categoria",parentCategory:"Categoria Pai",noneTopLevel:"Nenhuma (Nível Superior)"},tagList:{loadingTags:"Carregando tags...",errorLoading:"Erro ao carregar tags: {{message}}",noTags:"Nenhuma tag encontrada",merge:"Mesclar"},tagModal:{editTag:"Editar Tag",createTag:"Criar Tag",enterTitle:"Digite o título da tag",slugPlaceholder:"slug-da-tag (opcional)",slugHint:"Versão amigável para URL do título. Deixe vazio para gerar automaticamente."},tagMerge:{title:"Mesclar Tags",description:"Todos os artigos marcados com <strong>{{tag}}</strong> serão movidos para a tag de destino selecionada, e a tag de origem será excluída.",sourceTag:"Tag de Origem",targetTag:"Tag de Destino *",selectTarget:"Selecione a tag de destino",targetHint:"Selecione a tag que receberá todos os artigos da tag de origem",noTagsAvailable:"Nenhuma outra tag disponível. Você precisa de pelo menos 2 tags para realizar uma mesclagem.",merging:"Mesclando...",mergeTags:"Mesclar Tags"},markdownEditor:{editTab:"Editar",previewTab:"Visualizar",placeholder:"Escreva seu conteúdo em Markdown...",nothingToPreview:"Nada para visualizar",syntaxHelp:"Ajuda de Sintaxe Markdown:",heading1:"Título principal",heading2:"Subtítulo",bold:"Negrito",italic:"Itálico",link:"Link",image:"Imagem",bulletList:"Lista com marcadores",numberedList:"Lista numerada",inlineCode:"Código inline",codeBlock:"Bloco de código"},richTextEditor:{placeholder:"Escreva seu conteúdo..."}},vn="nnews",ky={en:rc,pt:ic};function Eh(e="en",t){const n=dt.createInstance(),r={en:{[vn]:{...rc}},pt:{[vn]:{...ic}}};if(t)for(const[i,s]of Object.entries(t))r[i]?r[i][vn]={...r[i][vn],...s}:r[i]={[vn]:{...s}};return n.use(gy).init({resources:r,lng:e,fallbackLng:"en",defaultNS:vn,ns:[vn],interpolation:{escapeValue:!1},initImmediate:!1}),n}function Pt(){return vy(vn)}function Ny({articles:e,loading:t=!1,error:n=null,onArticleClick:r,onEditClick:i,onAIClick:s,showActions:a=!1,emptyMessage:o}){const{t:l}=Pt(),c=o||l("articleList.noArticles");return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:l("articleList.loadingArticles")})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsx("div",{className:"text-sm text-red-800",children:l("articleList.errorLoading",{message:n.message})})}):!e||e.items.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:c})}):E.jsxs("div",{className:"space-y-6",children:[E.jsx("div",{className:"grid grid-cols-3 gap-6",children:e.items.map(u=>E.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 shadow-sm hover:shadow-md transition-shadow overflow-hidden flex flex-col",children:[u.imageName&&E.jsx("div",{className:`w-full h-48 bg-gray-200 dark:bg-gray-700 overflow-hidden ${r?"cursor-pointer":""}`,onClick:()=>r==null?void 0:r(u),children:E.jsx("img",{src:u.imageName,alt:u.title,className:"w-full h-[250px] object-cover hover:scale-105 transition-transform duration-300",style:{height:"250px"}})}),E.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[E.jsxs("div",{className:"flex-1",children:[E.jsx("h3",{className:`text-xl font-semibold text-gray-900 dark:text-gray-100 line-clamp-2 ${r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":""}`,onClick:()=>r==null?void 0:r(u),children:u.title}),E.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-sm text-gray-500 dark:text-gray-400",children:[u.dateAt&&E.jsxs("span",{className:"flex items-center gap-1",children:[E.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(u.dateAt).toLocaleDateString()]}),u.category&&E.jsx("span",{className:"rounded-full bg-blue-100 dark:bg-blue-900 px-3 py-1 text-xs font-medium text-blue-800 dark:text-blue-200",children:u.category.title})]}),E.jsx("div",{className:"mt-3",children:E.jsx("span",{className:`inline-block rounded-full px-3 py-1 text-xs font-medium ${u.status===qe.Published?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":u.status===qe.Draft?"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200":u.status===qe.Review?"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200":u.status===qe.Scheduled?"bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200":"bg-orange-100 dark:bg-orange-900 text-orange-800 dark:text-orange-200"}`,children:qe[u.status]})}),u.tags&&u.tags.length>0&&E.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[u.tags.slice(0,3).map(d=>E.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["#",d.title]},d.tagId)),u.tags.length>3&&E.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["+",u.tags.length-3]})]}),u.roles&&u.roles.length>0&&E.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[u.roles.slice(0,2).map(d=>E.jsx("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:d.name},d.slug)),u.roles.length>2&&E.jsxs("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:["+",u.roles.length-2]})]})]}),a&&(i||s)&&E.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700 flex gap-2 justify-end",children:[s&&E.jsx("button",{onClick:()=>s(u),className:"rounded p-2 text-purple-600 dark:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/20",title:l("articleList.aiEdit"),children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),i&&E.jsx("button",{onClick:()=>i(u),className:"rounded p-2 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20",title:l("common.edit"),children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})})]})]})]},u.articleId))}),e.totalPages>1&&E.jsx("div",{className:"mt-6 flex items-center justify-between border-t border-gray-200 dark:border-gray-700 pt-4",children:E.jsx("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:l("articleList.showingArticles",{count:e.items.length,total:e.totalCount,page:e.page,totalPages:e.totalPages})})})]})}function Sy(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ay=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ty=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cy={};function _u(e,t){return(Cy.jsx?Ty:Ay).test(e)}const Oy=/[ \t\n\f\r]/g;function Iy(e){return typeof e=="object"?e.type==="text"?ku(e.value):!1:ku(e)}function ku(e){return e.replace(Oy,"")===""}class Gi{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Gi.prototype.normal={};Gi.prototype.property={};Gi.prototype.space=void 0;function wh(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Gi(n,r,t)}function hl(e){return e.toLowerCase()}class xt{constructor(t,n){this.attribute=n,this.property=t}}xt.prototype.attribute="";xt.prototype.booleanish=!1;xt.prototype.boolean=!1;xt.prototype.commaOrSpaceSeparated=!1;xt.prototype.commaSeparated=!1;xt.prototype.defined=!1;xt.prototype.mustUseProperty=!1;xt.prototype.number=!1;xt.prototype.overloadedBoolean=!1;xt.prototype.property="";xt.prototype.spaceSeparated=!1;xt.prototype.space=void 0;let Ry=0;const pe=or(),Be=or(),pl=or(),G=or(),Ie=or(),Mr=or(),vt=or();function or(){return 2**++Ry}const gl=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Be,commaOrSpaceSeparated:vt,commaSeparated:Mr,number:G,overloadedBoolean:pl,spaceSeparated:Ie},Symbol.toStringTag,{value:"Module"})),Ao=Object.keys(gl);class sc extends xt{constructor(t,n,r,i){let s=-1;if(super(t,n),Nu(this,"space",i),typeof r=="number")for(;++s<Ao.length;){const a=Ao[s];Nu(this,Ao[s],(r&gl[a])===gl[a])}}}sc.prototype.defined=!0;function Nu(e,t,n){n&&(e[t]=n)}function Vr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new sc(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[hl(r)]=r,n[hl(s.attribute)]=r}return new Gi(t,n,e.space)}const vh=Vr({properties:{ariaActiveDescendant:null,ariaAtomic:Be,ariaAutoComplete:null,ariaBusy:Be,ariaChecked:Be,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:Ie,ariaCurrent:null,ariaDescribedBy:Ie,ariaDetails:null,ariaDisabled:Be,ariaDropEffect:Ie,ariaErrorMessage:null,ariaExpanded:Be,ariaFlowTo:Ie,ariaGrabbed:Be,ariaHasPopup:null,ariaHidden:Be,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ie,ariaLevel:G,ariaLive:null,ariaModal:Be,ariaMultiLine:Be,ariaMultiSelectable:Be,ariaOrientation:null,ariaOwns:Ie,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:Be,ariaReadOnly:Be,ariaRelevant:null,ariaRequired:Be,ariaRoleDescription:Ie,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:Be,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function _h(e,t){return t in e?e[t]:t}function kh(e,t){return _h(e,t.toLowerCase())}const Ly=Vr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Mr,acceptCharset:Ie,accessKey:Ie,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:Ie,autoFocus:pe,autoPlay:pe,blocking:Ie,capture:null,charSet:null,checked:pe,cite:null,className:Ie,cols:G,colSpan:null,content:null,contentEditable:Be,controls:pe,controlsList:Ie,coords:G|Mr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:pl,draggable:Be,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:Ie,height:G,hidden:pl,high:G,href:null,hrefLang:null,htmlFor:Ie,httpEquiv:Ie,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:Ie,itemRef:Ie,itemScope:pe,itemType:Ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,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:pe,optimum:G,pattern:null,ping:Ie,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:Ie,required:pe,reversed:pe,rows:G,rowSpan:G,sandbox:Ie,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:Be,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:Be,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ie,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:Be,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:G,security:null,unselectable:null},space:"html",transform:kh}),My=Vr({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:vt,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:Ie,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:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,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:Mr,g2:Mr,glyphName:Mr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:vt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,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:G,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:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vt,rev:vt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vt,requiredFeatures:vt,requiredFonts:vt,requiredFormats:vt,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:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:vt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vt,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:_h}),Nh=Vr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Sh=Vr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:kh}),Ah=Vr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Dy={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"},Py=/[A-Z]/g,Su=/-[a-z]/g,By=/^data[-\w.:]+$/i;function Fy(e,t){const n=hl(t);let r=t,i=xt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&By.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Su,Uy);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Su.test(s)){let a=s.replace(Py,$y);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=sc}return new i(r,t)}function $y(e){return"-"+e.toLowerCase()}function Uy(e){return e.charAt(1).toUpperCase()}const qy=wh([vh,Ly,Nh,Sh,Ah],"html"),ac=wh([vh,My,Nh,Sh,Ah],"svg");function jy(e){return e.join(" ").trim()}var oc={},Au=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zy=/\n/g,Hy=/^\s*/,Gy=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ky=/^:\s*/,Vy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Wy=/^[;\s]*/,Yy=/^\s+|\s+$/g,Zy=`
18
+ `,Tu="/",Cu="*",Xn="",Xy="comment",Jy="declaration";function Qy(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var g=p.match(zy);g&&(n+=g.length);var b=p.lastIndexOf(Zy);r=~b?p.length-b:r+p.length}function s(){var p={line:n,column:r};return function(g){return g.position=new a(p),c(),g}}function a(p){this.start=p,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function o(p){var g=new Error(t.source+":"+n+":"+r+": "+p);if(g.reason=p,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function l(p){var g=p.exec(e);if(g){var b=g[0];return i(b),e=e.slice(b.length),g}}function c(){l(Hy)}function u(p){var g;for(p=p||[];g=d();)g!==!1&&p.push(g);return p}function d(){var p=s();if(!(Tu!=e.charAt(0)||Cu!=e.charAt(1))){for(var g=2;Xn!=e.charAt(g)&&(Cu!=e.charAt(g)||Tu!=e.charAt(g+1));)++g;if(g+=2,Xn===e.charAt(g-1))return o("End of comment missing");var b=e.slice(2,g-2);return r+=2,i(b),e=e.slice(g),r+=2,p({type:Xy,comment:b})}}function h(){var p=s(),g=l(Gy);if(g){if(d(),!l(Ky))return o("property missing ':'");var b=l(Vy),y=p({type:Jy,property:Ou(g[0].replace(Au,Xn)),value:b?Ou(b[0].replace(Au,Xn)):Xn});return l(Wy),y}}function f(){var p=[];u(p);for(var g;g=h();)g!==!1&&(p.push(g),u(p));return p}return c(),f()}function Ou(e){return e?e.replace(Yy,Xn):Xn}var e0=Qy,t0=Mt&&Mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oc,"__esModule",{value:!0});oc.default=r0;const n0=t0(e0);function r0(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,n0.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(n=n||{},n[a]=o)}),n}var la={};Object.defineProperty(la,"__esModule",{value:!0});la.camelCase=void 0;var i0=/^--[a-zA-Z0-9_-]+$/,s0=/-([a-z])/g,a0=/^[^-]+$/,o0=/^-(webkit|moz|ms|o|khtml)-/,l0=/^-(ms)-/,c0=function(e){return!e||a0.test(e)||i0.test(e)},u0=function(e,t){return t.toUpperCase()},Iu=function(e,t){return"".concat(t,"-")},d0=function(e,t){return t===void 0&&(t={}),c0(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(l0,Iu):e=e.replace(o0,Iu),e.replace(s0,u0))};la.camelCase=d0;var f0=Mt&&Mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},h0=f0(oc),p0=la;function ml(e,t){var n={};return!e||typeof e!="string"||(0,h0.default)(e,function(r,i){r&&i&&(n[(0,p0.camelCase)(r,t)]=i)}),n}ml.default=ml;var g0=ml;const m0=Hi(g0),Th=Ch("end"),lc=Ch("start");function Ch(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function b0(e){const t=lc(e),n=Th(e);if(t&&n)return{start:t,end:n}}function ki(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ru(e.position):"start"in e||"end"in e?Ru(e):"line"in e||"column"in e?bl(e):""}function bl(e){return Lu(e&&e.line)+":"+Lu(e&&e.column)}function Ru(e){return bl(e&&e.start)+"-"+bl(e&&e.end)}function Lu(e){return e&&typeof e=="number"?e:1}class rt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=ki(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}rt.prototype.file="";rt.prototype.name="";rt.prototype.reason="";rt.prototype.message="";rt.prototype.stack="";rt.prototype.column=void 0;rt.prototype.line=void 0;rt.prototype.ancestors=void 0;rt.prototype.cause=void 0;rt.prototype.fatal=void 0;rt.prototype.place=void 0;rt.prototype.ruleId=void 0;rt.prototype.source=void 0;const cc={}.hasOwnProperty,y0=new Map,x0=/[A-Z]/g,E0=new Set(["table","tbody","thead","tfoot","tr"]),w0=new Set(["td","th"]),Oh="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function v0(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=O0(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=C0(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ac:qy,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Ih(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Ih(e,t,n){if(t.type==="element")return _0(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return k0(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return S0(e,t,n);if(t.type==="mdxjsEsm")return N0(e,t);if(t.type==="root")return A0(e,t,n);if(t.type==="text")return T0(e,t)}function _0(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ac,e.schema=i),e.ancestors.push(t);const s=Lh(e,t.tagName,!1),a=I0(e,t);let o=dc(e,t);return E0.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!Iy(l):!0})),Rh(e,a,s,t),uc(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function k0(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ri(e,t.position)}function N0(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ri(e,t.position)}function S0(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ac,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Lh(e,t.name,!0),a=R0(e,t),o=dc(e,t);return Rh(e,a,s,t),uc(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function A0(e,t,n){const r={};return uc(r,dc(e,t)),e.create(t,e.Fragment,r,n)}function T0(e,t){return t.value}function Rh(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function uc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function C0(e,t,n){return r;function r(i,s,a,o){const c=Array.isArray(a.children)?n:t;return o?c(s,a,o):c(s,a)}}function O0(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=lc(r);return t(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function I0(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&cc.call(t.properties,i)){const s=L0(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&w0.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function R0(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Ri(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else Ri(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function dc(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:y0;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}const o=Ih(e,s,a);o!==void 0&&n.push(o)}return n}function L0(e,t,n){const r=Fy(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Sy(n):jy(n)),r.property==="style"){let i=typeof n=="object"?n:M0(e,String(n));return e.stylePropertyNameCase==="css"&&(i=D0(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Dy[r.property]||r.property:r.attribute,n]}}function M0(e,t){try{return m0(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new rt("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=Oh+"#cannot-parse-style-attribute",i}}function Lh(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=_u(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=_u(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return cc.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ri(e)}function Ri(e,t){const n=new rt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Oh+"#cannot-handle-mdx-estrees-without-createevaluater",n}function D0(e){const t={};let n;for(n in e)cc.call(e,n)&&(t[P0(n)]=e[n]);return t}function P0(e){let t=e.replace(x0,B0);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function B0(e){return"-"+e.toLowerCase()}const To={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"]},F0={};function $0(e,t){const n=F0,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Mh(e,r,i)}function Mh(e,t,n){if(U0(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Mu(e.children,t,n)}return Array.isArray(e)?Mu(e,t,n):""}function Mu(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Mh(e[i],t,n);return r.join("")}function U0(e){return!!(e&&typeof e=="object")}const Du=document.createElement("i");function fc(e){const t="&"+e+";";Du.innerHTML=t;const n=Du.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kt(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Ot(e,t){return e.length>0?(kt(e,e.length,0,t),e):t}const Pu={}.hasOwnProperty;function Dh(e){const t={};let n=-1;for(;++n<e.length;)q0(t,e[n]);return t}function q0(e,t){let n;for(n in t){const i=(Pu.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){Pu.call(i,a)||(i[a]=[]);const o=s[a];j0(i[a],Array.isArray(o)?o:o?[o]:[])}}}function j0(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kt(e,0,0,r)}function Ph(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Vt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ct=qn(/[A-Za-z]/),tt=qn(/[\dA-Za-z]/),z0=qn(/[#-'*+\--9=?A-Z^-~]/);function Ks(e){return e!==null&&(e<32||e===127)}const yl=qn(/\d/),H0=qn(/[\dA-Fa-f]/),G0=qn(/[!-/:-@[-`{-~]/);function le(e){return e!==null&&e<-2}function Te(e){return e!==null&&(e<0||e===32)}function be(e){return e===-2||e===-1||e===32}const ca=qn(new RegExp("\\p{P}|\\p{S}","u")),nr=qn(/\s/);function qn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Wr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&tt(e.charCodeAt(n+1))&&tt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ee(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return be(l)?(e.enter(n),o(l)):t(l)}function o(l){return be(l)&&s++<i?(e.consume(l),o):(e.exit(n),t(l))}}const K0={tokenize:V0};function V0(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ee(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return le(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const W0={tokenize:Y0},Bu={tokenize:Z0};function Y0(e){const t=this,n=[];let r=0,i,s,a;return o;function o(_){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,l,c)(_)}return c(_)}function l(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&w();const A=t.events.length;let O=A,N;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){N=t.events[O][1].end;break}y(r);let D=A;for(;D<t.events.length;)t.events[D][1].end={...N},D++;return kt(t.events,O+1,0,t.events.slice(A)),t.events.length=D,c(_)}return o(_)}function c(_){if(r===n.length){if(!i)return h(_);if(i.currentConstruct&&i.currentConstruct.concrete)return p(_);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bu,u,d)(_)}function u(_){return i&&w(),y(r),h(_)}function d(_){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,p(_)}function h(_){return t.containerState={},e.attempt(Bu,f,p)(_)}function f(_){return r++,n.push([t.currentConstruct,t.containerState]),h(_)}function p(_){if(_===null){i&&w(),y(0),e.consume(_);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),g(_)}function g(_){if(_===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(_);return}return le(_)?(e.consume(_),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(_),g)}function b(_,A){const O=t.sliceStream(_);if(A&&O.push(null),_.previous=s,s&&(s.next=_),s=_,i.defineSkip(_.start),i.write(O),t.parser.lazy[_.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<a&&(!i.events[N][1].end||i.events[N][1].end.offset>a))return;const D=t.events.length;let q=D,H,C;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(H){C=t.events[q][1].end;break}H=!0}for(y(r),N=D;N<t.events.length;)t.events[N][1].end={...C},N++;kt(t.events,q+1,0,t.events.slice(D)),t.events.length=N}}function y(_){let A=n.length;for(;A-- >_;){const O=n[A];t.containerState=O[1],O[0].exit.call(t,e)}n.length=_}function w(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Z0(e,t,n){return Ee(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $r(e){if(e===null||Te(e)||nr(e))return 1;if(ca(e))return 2}function ua(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const xl={name:"attention",resolveAll:X0,tokenize:J0};function X0(e,t){let n=-1,r,i,s,a,o,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};Fu(d,-l),Fu(h,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Ot(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Ot(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=Ot(c,ua(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Ot(c,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Ot(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,kt(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function J0(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=$r(r);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const c=e.exit("attentionSequence"),u=$r(l),d=!u||u===2&&i||n.includes(l),h=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?d:d&&(i||!h)),c._close=!!(s===42?h:h&&(u||!d)),t(l)}}function Fu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Q0={name:"autolink",tokenize:ex};function ex(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(f){return ct(f)?(e.consume(f),a):f===64?n(f):c(f)}function a(f){return f===43||f===45||f===46||tt(f)?(r=1,o(f)):c(f)}function o(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||tt(f))&&r++<32?(e.consume(f),o):(r=0,c(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Ks(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):z0(f)?(e.consume(f),c):n(f)}function u(f){return tt(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||tt(f))&&r++<63){const p=f===45?h:d;return e.consume(f),p}return n(f)}}const Ki={partial:!0,tokenize:tx};function tx(e,t,n){return r;function r(s){return be(s)?Ee(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||le(s)?t(s):n(s)}}const Bh={continuation:{tokenize:rx},exit:ix,name:"blockQuote",tokenize:nx};function nx(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return be(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function rx(e,t,n){const r=this;return i;function i(a){return be(a)?Ee(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Bh,t,n)(a)}}function ix(e){e.exit("blockQuote")}const Fh={name:"characterEscape",tokenize:sx};function sx(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return G0(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const $h={name:"characterReference",tokenize:ax};function ax(e,t,n){const r=this;let i=0,s,a;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,a=tt,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=H0,u):(e.enter("characterReferenceValue"),s=7,a=yl,u(d))}function u(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return a===tt&&!fc(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<s?(e.consume(d),u):n(d)}}const $u={partial:!0,tokenize:lx},Uu={concrete:!0,name:"codeFenced",tokenize:ox};function ox(e,t,n){const r=this,i={partial:!0,tokenize:O};let s=0,a=0,o;return l;function l(N){return c(N)}function c(N){const D=r.events[r.events.length-1];return s=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,o=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(N)}function u(N){return N===o?(a++,e.consume(N),u):a<3?n(N):(e.exit("codeFencedFenceSequence"),be(N)?Ee(e,d,"whitespace")(N):d(N))}function d(N){return N===null||le(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check($u,g,A)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(N))}function h(N){return N===null||le(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(N)):be(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ee(e,f,"whitespace")(N)):N===96&&N===o?n(N):(e.consume(N),h)}function f(N){return N===null||le(N)?d(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||le(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(N)):N===96&&N===o?n(N):(e.consume(N),p)}function g(N){return e.attempt(i,A,b)(N)}function b(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),y}function y(N){return s>0&&be(N)?Ee(e,w,"linePrefix",s+1)(N):w(N)}function w(N){return N===null||le(N)?e.check($u,g,A)(N):(e.enter("codeFlowValue"),_(N))}function _(N){return N===null||le(N)?(e.exit("codeFlowValue"),w(N)):(e.consume(N),_)}function A(N){return e.exit("codeFenced"),t(N)}function O(N,D,q){let H=0;return C;function C(Z){return N.enter("lineEnding"),N.consume(Z),N.exit("lineEnding"),F}function F(Z){return N.enter("codeFencedFence"),be(Z)?Ee(N,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):M(Z)}function M(Z){return Z===o?(N.enter("codeFencedFenceSequence"),V(Z)):q(Z)}function V(Z){return Z===o?(H++,N.consume(Z),V):H>=a?(N.exit("codeFencedFenceSequence"),be(Z)?Ee(N,z,"whitespace")(Z):z(Z)):q(Z)}function z(Z){return Z===null||le(Z)?(N.exit("codeFencedFence"),D(Z)):q(Z)}}}function lx(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Co={name:"codeIndented",tokenize:ux},cx={partial:!0,tokenize:dx};function ux(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ee(e,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):le(c)?e.attempt(cx,a,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||le(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function dx(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):le(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ee(e,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):le(a)?i(a):n(a)}}const fx={name:"codeText",previous:px,resolve:hx,tokenize:gx};function hx(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function px(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function gx(e,t,n){let r=0,i,s;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,u(d)):le(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||le(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",c(d))}}class mx{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&hi(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),hi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),hi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);hi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);hi(this.left,n.reverse())}}}function hi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Uh(e){const t={};let n=-1,r,i,s,a,o,l,c;const u=new mx(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,bx(u,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=u.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},o=u.slice(i,n),o.unshift(r),u.splice(i,n-i+1,o))}}return kt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function bx(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],c={};let u,d,h=-1,f=n,p=0,g=0;const b=[g];for(;f;){for(;e.get(++i)[1]!==f;);s.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<o.length;)o[h][0]==="exit"&&o[h-1][0]==="enter"&&o[h][1].type===o[h-1][1].type&&o[h][1].start.line!==o[h][1].end.line&&(g=h+1,b.push(g),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):b.pop(),h=b.length;h--;){const y=o.slice(b[h],b[h+1]),w=s.pop();l.push([w,w+y.length-1]),e.splice(w,2,y)}for(l.reverse(),h=-1;++h<l.length;)c[p+l[h][0]]=p+l[h][1],p+=l[h][1]-l[h][0]-1;return c}const yx={resolve:Ex,tokenize:wx},xx={partial:!0,tokenize:vx};function Ex(e){return Uh(e),e}function wx(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):le(o)?e.check(xx,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function vx(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ee(e,s,"linePrefix")}function s(a){if(a===null||le(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function qh(e,t,n,r,i,s,a,o,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(y),e.exit(s),h):y===null||y===32||y===41||Ks(y)?n(y):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),g(y))}function h(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(o),h(y)):y===null||y===60||le(y)?n(y):(e.consume(y),y===92?p:f)}function p(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function g(y){return!u&&(y===null||y===41||Te(y))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(y)):u<c&&y===40?(e.consume(y),u++,g):y===41?(e.consume(y),u--,g):y===null||y===32||y===40||Ks(y)?n(y):(e.consume(y),y===92?b:g)}function b(y){return y===40||y===41||y===92?(e.consume(y),g):g(y)}}function jh(e,t,n,r,i,s){const a=this;let o=0,l;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(s),u}function u(f){return o>999||f===null||f===91||f===93&&!l||f===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):le(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||le(f)||o++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!be(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),o++,d):d(f)}}function zh(e,t,n,r,i,s){let a;return o;function o(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),a=h===40?41:h,l):n(h)}function l(h){return h===a?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),c(h))}function c(h){return h===a?(e.exit(s),l(a)):h===null?n(h):le(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ee(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===a||h===null||le(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:u)}function d(h){return h===a||h===92?(e.consume(h),u):u(h)}}function Ni(e,t){let n;return r;function r(i){return le(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):be(i)?Ee(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const _x={name:"definition",tokenize:Nx},kx={partial:!0,tokenize:Sx};function Nx(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),a(f)}function a(f){return jh.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return i=Vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return Te(f)?Ni(e,c)(f):c(f)}function c(f){return qh(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(kx,d,d)(f)}function d(f){return be(f)?Ee(e,h,"whitespace")(f):h(f)}function h(f){return f===null||le(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function Sx(e,t,n){return r;function r(o){return Te(o)?Ni(e,i)(o):n(o)}function i(o){return zh(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return be(o)?Ee(e,a,"whitespace")(o):a(o)}function a(o){return o===null||le(o)?t(o):n(o)}}const Ax={name:"hardBreakEscape",tokenize:Tx};function Tx(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return le(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Cx={name:"headingAtx",resolve:Ox,tokenize:Ix};function Ox(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},kt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function Ix(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||Te(u)?(e.exit("atxHeadingSequence"),o(u)):n(u)}function o(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||le(u)?(e.exit("atxHeading"),t(u)):be(u)?Ee(e,o,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),o(u))}function c(u){return u===null||u===35||Te(u)?(e.exit("atxHeadingText"),o(u)):(e.consume(u),c)}}const Rx=["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"],qu=["pre","script","style","textarea"],Lx={concrete:!0,name:"htmlFlow",resolveTo:Px,tokenize:Bx},Mx={partial:!0,tokenize:$x},Dx={partial:!0,tokenize:Fx};function Px(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Bx(e,t,n){const r=this;let i,s,a,o,l;return c;function c(k){return u(k)}function u(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),s=!0,g):k===63?(e.consume(k),i=3,r.interrupt?t:v):ct(k)?(e.consume(k),a=String.fromCharCode(k),b):n(k)}function h(k){return k===45?(e.consume(k),i=2,f):k===91?(e.consume(k),i=5,o=0,p):ct(k)?(e.consume(k),i=4,r.interrupt?t:v):n(k)}function f(k){return k===45?(e.consume(k),r.interrupt?t:v):n(k)}function p(k){const de="CDATA[";return k===de.charCodeAt(o++)?(e.consume(k),o===de.length?r.interrupt?t:M:p):n(k)}function g(k){return ct(k)?(e.consume(k),a=String.fromCharCode(k),b):n(k)}function b(k){if(k===null||k===47||k===62||Te(k)){const de=k===47,re=a.toLowerCase();return!de&&!s&&qu.includes(re)?(i=1,r.interrupt?t(k):M(k)):Rx.includes(a.toLowerCase())?(i=6,de?(e.consume(k),y):r.interrupt?t(k):M(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):s?w(k):_(k))}return k===45||tt(k)?(e.consume(k),a+=String.fromCharCode(k),b):n(k)}function y(k){return k===62?(e.consume(k),r.interrupt?t:M):n(k)}function w(k){return be(k)?(e.consume(k),w):C(k)}function _(k){return k===47?(e.consume(k),C):k===58||k===95||ct(k)?(e.consume(k),A):be(k)?(e.consume(k),_):C(k)}function A(k){return k===45||k===46||k===58||k===95||tt(k)?(e.consume(k),A):O(k)}function O(k){return k===61?(e.consume(k),N):be(k)?(e.consume(k),O):_(k)}function N(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),l=k,D):be(k)?(e.consume(k),N):q(k)}function D(k){return k===l?(e.consume(k),l=null,H):k===null||le(k)?n(k):(e.consume(k),D)}function q(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Te(k)?O(k):(e.consume(k),q)}function H(k){return k===47||k===62||be(k)?_(k):n(k)}function C(k){return k===62?(e.consume(k),F):n(k)}function F(k){return k===null||le(k)?M(k):be(k)?(e.consume(k),F):n(k)}function M(k){return k===45&&i===2?(e.consume(k),I):k===60&&i===1?(e.consume(k),U):k===62&&i===4?(e.consume(k),Y):k===63&&i===3?(e.consume(k),v):k===93&&i===5?(e.consume(k),W):le(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Mx,ae,V)(k)):k===null||le(k)?(e.exit("htmlFlowData"),V(k)):(e.consume(k),M)}function V(k){return e.check(Dx,z,ae)(k)}function z(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Z}function Z(k){return k===null||le(k)?V(k):(e.enter("htmlFlowData"),M(k))}function I(k){return k===45?(e.consume(k),v):M(k)}function U(k){return k===47?(e.consume(k),a="",j):M(k)}function j(k){if(k===62){const de=a.toLowerCase();return qu.includes(de)?(e.consume(k),Y):M(k)}return ct(k)&&a.length<8?(e.consume(k),a+=String.fromCharCode(k),j):M(k)}function W(k){return k===93?(e.consume(k),v):M(k)}function v(k){return k===62?(e.consume(k),Y):k===45&&i===2?(e.consume(k),v):M(k)}function Y(k){return k===null||le(k)?(e.exit("htmlFlowData"),ae(k)):(e.consume(k),Y)}function ae(k){return e.exit("htmlFlow"),t(k)}}function Fx(e,t,n){const r=this;return i;function i(a){return le(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function $x(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ki,t,n)}}const Ux={name:"htmlText",tokenize:qx};function qx(e,t,n){const r=this;let i,s,a;return o;function o(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),l}function l(v){return v===33?(e.consume(v),c):v===47?(e.consume(v),O):v===63?(e.consume(v),_):ct(v)?(e.consume(v),q):n(v)}function c(v){return v===45?(e.consume(v),u):v===91?(e.consume(v),s=0,p):ct(v)?(e.consume(v),w):n(v)}function u(v){return v===45?(e.consume(v),f):n(v)}function d(v){return v===null?n(v):v===45?(e.consume(v),h):le(v)?(a=d,U(v)):(e.consume(v),d)}function h(v){return v===45?(e.consume(v),f):d(v)}function f(v){return v===62?I(v):v===45?h(v):d(v)}function p(v){const Y="CDATA[";return v===Y.charCodeAt(s++)?(e.consume(v),s===Y.length?g:p):n(v)}function g(v){return v===null?n(v):v===93?(e.consume(v),b):le(v)?(a=g,U(v)):(e.consume(v),g)}function b(v){return v===93?(e.consume(v),y):g(v)}function y(v){return v===62?I(v):v===93?(e.consume(v),y):g(v)}function w(v){return v===null||v===62?I(v):le(v)?(a=w,U(v)):(e.consume(v),w)}function _(v){return v===null?n(v):v===63?(e.consume(v),A):le(v)?(a=_,U(v)):(e.consume(v),_)}function A(v){return v===62?I(v):_(v)}function O(v){return ct(v)?(e.consume(v),N):n(v)}function N(v){return v===45||tt(v)?(e.consume(v),N):D(v)}function D(v){return le(v)?(a=D,U(v)):be(v)?(e.consume(v),D):I(v)}function q(v){return v===45||tt(v)?(e.consume(v),q):v===47||v===62||Te(v)?H(v):n(v)}function H(v){return v===47?(e.consume(v),I):v===58||v===95||ct(v)?(e.consume(v),C):le(v)?(a=H,U(v)):be(v)?(e.consume(v),H):I(v)}function C(v){return v===45||v===46||v===58||v===95||tt(v)?(e.consume(v),C):F(v)}function F(v){return v===61?(e.consume(v),M):le(v)?(a=F,U(v)):be(v)?(e.consume(v),F):H(v)}function M(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),i=v,V):le(v)?(a=M,U(v)):be(v)?(e.consume(v),M):(e.consume(v),z)}function V(v){return v===i?(e.consume(v),i=void 0,Z):v===null?n(v):le(v)?(a=V,U(v)):(e.consume(v),V)}function z(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||Te(v)?H(v):(e.consume(v),z)}function Z(v){return v===47||v===62||Te(v)?H(v):n(v)}function I(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function U(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),j}function j(v){return be(v)?Ee(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):W(v)}function W(v){return e.enter("htmlTextData"),a(v)}}const hc={name:"labelEnd",resolveAll:Gx,resolveTo:Kx,tokenize:Vx},jx={tokenize:Wx},zx={tokenize:Yx},Hx={tokenize:Zx};function Gx(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&kt(e,0,e.length,n),e}function Kx(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Ot(o,e.slice(s+1,s+r+3)),o=Ot(o,[["enter",u,t]]),o=Ot(o,ua(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=Ot(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=Ot(o,e.slice(a+1)),o=Ot(o,[["exit",l,t]]),kt(e,s,e.length,o),e}function Vx(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(h){return s?s._inactive?d(h):(a=r.parser.defined.includes(Vt(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(jx,u,a?u:d)(h):h===91?e.attempt(zx,u,a?c:d)(h):a?u(h):d(h)}function c(h){return e.attempt(Hx,u,d)(h)}function u(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function Wx(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Te(d)?Ni(e,s)(d):s(d)}function s(d){return d===41?u(d):qh(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return Te(d)?Ni(e,l)(d):u(d)}function o(d){return n(d)}function l(d){return d===34||d===39||d===40?zh(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Te(d)?Ni(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function Yx(e,t,n){const r=this;return i;function i(o){return jh.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function Zx(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const Xx={name:"labelStartImage",resolveAll:hc.resolveAll,tokenize:Jx};function Jx(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Qx={name:"labelStartLink",resolveAll:hc.resolveAll,tokenize:eE};function eE(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Oo={name:"lineEnding",tokenize:tE};function tE(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ee(e,t,"linePrefix")}}const Ds={name:"thematicBreak",tokenize:nE};function nE(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||le(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),be(c)?Ee(e,o,"whitespace")(c):o(c))}}const mt={continuation:{tokenize:aE},exit:lE,name:"list",tokenize:sE},rE={partial:!0,tokenize:cE},iE={partial:!0,tokenize:oE};function sE(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(f){const p=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:yl(f)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Ds,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return yl(f)&&++a<10?(e.consume(f),l):(!r.interrupt||a<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Ki,r.interrupt?n:u,e.attempt(rE,h,d))}function u(f){return r.containerState.initialBlankLine=!0,s++,h(f)}function d(f){return be(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function aE(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ki,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ee(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!be(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(iE,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ee(e,e.attempt(mt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function oE(e,t,n){const r=this;return Ee(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function lE(e){e.exit(this.containerState.type)}function cE(e,t,n){const r=this;return Ee(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!be(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const ju={name:"setextUnderline",resolveTo:uE,tokenize:dE};function uE(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function dE(e,t,n){const r=this;let i;return s;function s(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),be(c)?Ee(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||le(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const fE={tokenize:hE};function hE(e){const t=this,n=e.attempt(Ki,r,e.attempt(this.parser.constructs.flowInitial,i,Ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt(yx,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const pE={resolveAll:Gh()},gE=Hh("string"),mE=Hh("text");function Hh(e){return{resolveAll:Gh(e==="text"?bE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(u){return c(u)?s(u):o(u)}function o(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Gh(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function bE(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,o=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(c===-2)l=!0,o++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const c={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const yE={42:mt,43:mt,45:mt,48:mt,49:mt,50:mt,51:mt,52:mt,53:mt,54:mt,55:mt,56:mt,57:mt,62:Bh},xE={91:_x},EE={[-2]:Co,[-1]:Co,32:Co},wE={35:Cx,42:Ds,45:[ju,Ds],60:Lx,61:ju,95:Ds,96:Uu,126:Uu},vE={38:$h,92:Fh},_E={[-5]:Oo,[-4]:Oo,[-3]:Oo,33:Xx,38:$h,42:xl,60:[Q0,Ux],91:Qx,92:[Ax,Fh],93:hc,95:xl,96:fx},kE={null:[xl,pE]},NE={null:[42,95]},SE={null:[]},AE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:NE,contentInitial:xE,disable:SE,document:yE,flow:wE,flowInitial:EE,insideSpan:kE,string:vE,text:_E},Symbol.toStringTag,{value:"Module"}));function TE(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],o=[];const l={attempt:D(O),check:D(N),consume:w,enter:_,exit:A,interrupt:D(N,{interrupt:!0})},c={code:null,containerState:{},defineSkip:g,events:[],now:p,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function d(F){return a=Ot(a,F),b(),a[a.length-1]!==null?[]:(q(t,0),c.events=ua(s,c.events,c),c.events)}function h(F,M){return OE(f(F),M)}function f(F){return CE(a,F)}function p(){const{_bufferIndex:F,_index:M,line:V,column:z,offset:Z}=r;return{_bufferIndex:F,_index:M,line:V,column:z,offset:Z}}function g(F){i[F.line]=F.column,C()}function b(){let F;for(;r._index<a.length;){const M=a[r._index];if(typeof M=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<M.length;)y(M.charCodeAt(r._bufferIndex));else y(M)}}function y(F){u=u(F)}function w(F){le(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,C()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=F}function _(F,M){const V=M||{};return V.type=F,V.start=p(),c.events.push(["enter",V,c]),o.push(V),V}function A(F){const M=o.pop();return M.end=p(),c.events.push(["exit",M,c]),M}function O(F,M){q(F,M.from)}function N(F,M){M.restore()}function D(F,M){return V;function V(z,Z,I){let U,j,W,v;return Array.isArray(z)?ae(z):"tokenize"in z?ae([z]):Y(z);function Y(_e){return Ve;function Ve(X){const ye=X!==null&&_e[X],Se=X!==null&&_e.null,je=[...Array.isArray(ye)?ye:ye?[ye]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return ae(je)(X)}}function ae(_e){return U=_e,j=0,_e.length===0?I:k(_e[j])}function k(_e){return Ve;function Ve(X){return v=H(),W=_e,_e.partial||(c.currentConstruct=_e),_e.name&&c.parser.constructs.disable.null.includes(_e.name)?re():_e.tokenize.call(M?Object.assign(Object.create(c),M):c,l,de,re)(X)}}function de(_e){return F(W,v),Z}function re(_e){return v.restore(),++j<U.length?k(U[j]):I}}}function q(F,M){F.resolveAll&&!s.includes(F)&&s.push(F),F.resolve&&kt(c.events,M,c.events.length-M,F.resolve(c.events.slice(M),c)),F.resolveTo&&(c.events=F.resolveTo(c.events,c))}function H(){const F=p(),M=c.previous,V=c.currentConstruct,z=c.events.length,Z=Array.from(o);return{from:z,restore:I};function I(){r=F,c.previous=M,c.currentConstruct=V,c.events.length=z,o=Z,C()}}function C(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function CE(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function OE(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
19
+ `;break}case-3:{a=`\r
20
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function IE(e){const r={constructs:Dh([AE,...(e||{}).extensions||[]]),content:i(K0),defined:[],document:i(W0),flow:i(fE),lazy:{},string:i(gE),text:i(mE)};return r;function i(s){return a;function a(o){return TE(r,s,o)}}}function RE(e){for(;!Uh(e););return e}const zu=/[\0\t\n\r]/g;function LE(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const l=[];let c,u,d,h,f;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(zu.lastIndex=d,c=zu.exec(s),h=c&&c.index!==void 0?c.index:s.length,f=s.charCodeAt(h),!c){t=s.slice(d);break}if(f===10&&d===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<h&&(l.push(s.slice(d,h)),e+=h-d),f){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const ME=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function DE(e){return e.replace(ME,PE)}function PE(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Ph(n.slice(s?2:1),s?16:10)}return fc(n)||e}const Kh={}.hasOwnProperty;function BE(e,t,n){return typeof t!="string"&&(n=t,t=void 0),FE(n)(RE(IE(n).document().write(LE()(e,t,!0))))}function FE(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Bt),autolinkProtocol:H,autolinkEmail:H,atxHeading:s(De),blockQuote:s(Se),characterEscape:H,characterReference:H,codeFenced:s(je),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(je,a),codeText:s(it,a),codeTextData:H,data:H,codeFlowValue:H,definition:s(Et),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(St),hardBreakEscape:s(me),hardBreakTrailing:s(me),htmlFlow:s(We,a),htmlFlowData:H,htmlText:s(We,a),htmlTextData:H,image:s(oe),label:a,link:s(Bt),listItem:s(xe),listItemValue:h,listOrdered:s(Ae,d),listUnordered:s(Ae),paragraph:s(Ft),reference:k,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(De),strong:s(ft),thematicBreak:s(At)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:ye,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:_e,characterReference:Ve,codeFenced:l(b),codeFencedFence:g,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:l(y),codeText:l(Z),codeTextData:C,data:C,definition:l(),definitionDestinationString:A,definitionLabelString:w,definitionTitleString:_,emphasis:l(),hardBreakEscape:l(M),hardBreakTrailing:l(M),htmlFlow:l(V),htmlFlowData:C,htmlText:l(z),htmlTextData:C,image:l(U),label:W,labelText:j,lineEnding:F,link:l(I),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:de,resourceDestinationString:v,resourceTitleString:Y,resource:ae,setextHeading:l(q),setextHeadingLineSequence:D,setextHeadingText:N,strong:l(),thematicBreak:l()}};Vh(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(T){let R={type:"root",children:[]};const K={stack:[R],tokenStack:[],config:t,enter:o,exit:c,buffer:a,resume:u,data:n},J=[];let ie=-1;for(;++ie<T.length;)if(T[ie][1].type==="listOrdered"||T[ie][1].type==="listUnordered")if(T[ie][0]==="enter")J.push(ie);else{const Ce=J.pop();ie=i(T,Ce,ie)}for(ie=-1;++ie<T.length;){const Ce=t[T[ie][0]];Kh.call(Ce,T[ie][1].type)&&Ce[T[ie][1].type].call(Object.assign({sliceSerialize:T[ie][2].sliceSerialize},K),T[ie][1])}if(K.tokenStack.length>0){const Ce=K.tokenStack[K.tokenStack.length-1];(Ce[1]||Hu).call(K,void 0,Ce[0])}for(R.position={start:In(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:In(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},ie=-1;++ie<t.transforms.length;)R=t.transforms[ie](R)||R;return R}function i(T,R,K){let J=R-1,ie=-1,Ce=!1,ht,st,$t,Tt;for(;++J<=K;){const Ue=T[J];switch(Ue[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ue[0]==="enter"?ie++:ie--,Tt=void 0;break}case"lineEndingBlank":{Ue[0]==="enter"&&(ht&&!Tt&&!ie&&!$t&&($t=J),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!ie&&Ue[0]==="enter"&&Ue[1].type==="listItemPrefix"||ie===-1&&Ue[0]==="exit"&&(Ue[1].type==="listUnordered"||Ue[1].type==="listOrdered")){if(ht){let wt=J;for(st=void 0;wt--;){const ze=T[wt];if(ze[1].type==="lineEnding"||ze[1].type==="lineEndingBlank"){if(ze[0]==="exit")continue;st&&(T[st][1].type="lineEndingBlank",Ce=!0),ze[1].type="lineEnding",st=wt}else if(!(ze[1].type==="linePrefix"||ze[1].type==="blockQuotePrefix"||ze[1].type==="blockQuotePrefixWhitespace"||ze[1].type==="blockQuoteMarker"||ze[1].type==="listItemIndent"))break}$t&&(!st||$t<st)&&(ht._spread=!0),ht.end=Object.assign({},st?T[st][1].start:Ue[1].end),T.splice(st||J,0,["exit",ht,Ue[2]]),J++,K++}if(Ue[1].type==="listItemPrefix"){const wt={type:"listItem",_spread:!1,start:Object.assign({},Ue[1].start),end:void 0};ht=wt,T.splice(J,0,["enter",wt,Ue[2]]),J++,K++,$t=void 0,Tt=!0}}}return T[R][1]._spread=Ce,K}function s(T,R){return K;function K(J){o.call(this,T(J),J),R&&R.call(this,J)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(T,R,K){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([R,K||void 0]),T.position={start:In(R.start),end:void 0}}function l(T){return R;function R(K){T&&T.call(this,K),c.call(this,K)}}function c(T,R){const K=this.stack.pop(),J=this.tokenStack.pop();if(J)J[0].type!==T.type&&(R?R.call(this,T,J[0]):(J[1]||Hu).call(this,T,J[0]));else throw new Error("Cannot close `"+T.type+"` ("+ki({start:T.start,end:T.end})+"): it’s not open");K.position.end=In(T.end)}function u(){return $0(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(T){if(this.data.expectingFirstListItemValue){const R=this.stack[this.stack.length-2];R.start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0}}function f(){const T=this.resume(),R=this.stack[this.stack.length-1];R.lang=T}function p(){const T=this.resume(),R=this.stack[this.stack.length-1];R.meta=T}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const T=this.resume(),R=this.stack[this.stack.length-1];R.value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const T=this.resume(),R=this.stack[this.stack.length-1];R.value=T.replace(/(\r?\n|\r)$/g,"")}function w(T){const R=this.resume(),K=this.stack[this.stack.length-1];K.label=R,K.identifier=Vt(this.sliceSerialize(T)).toLowerCase()}function _(){const T=this.resume(),R=this.stack[this.stack.length-1];R.title=T}function A(){const T=this.resume(),R=this.stack[this.stack.length-1];R.url=T}function O(T){const R=this.stack[this.stack.length-1];if(!R.depth){const K=this.sliceSerialize(T).length;R.depth=K}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function D(T){const R=this.stack[this.stack.length-1];R.depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function H(T){const K=this.stack[this.stack.length-1].children;let J=K[K.length-1];(!J||J.type!=="text")&&(J=Ye(),J.position={start:In(T.start),end:void 0},K.push(J)),this.stack.push(J)}function C(T){const R=this.stack.pop();R.value+=this.sliceSerialize(T),R.position.end=In(T.end)}function F(T){const R=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=R.children[R.children.length-1];K.position.end=In(T.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(R.type)&&(H.call(this,T),C.call(this,T))}function M(){this.data.atHardBreak=!0}function V(){const T=this.resume(),R=this.stack[this.stack.length-1];R.value=T}function z(){const T=this.resume(),R=this.stack[this.stack.length-1];R.value=T}function Z(){const T=this.resume(),R=this.stack[this.stack.length-1];R.value=T}function I(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=R,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function U(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=R,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function j(T){const R=this.sliceSerialize(T),K=this.stack[this.stack.length-2];K.label=DE(R),K.identifier=Vt(R).toLowerCase()}function W(){const T=this.stack[this.stack.length-1],R=this.resume(),K=this.stack[this.stack.length-1];if(this.data.inReference=!0,K.type==="link"){const J=T.children;K.children=J}else K.alt=R}function v(){const T=this.resume(),R=this.stack[this.stack.length-1];R.url=T}function Y(){const T=this.resume(),R=this.stack[this.stack.length-1];R.title=T}function ae(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function de(T){const R=this.resume(),K=this.stack[this.stack.length-1];K.label=R,K.identifier=Vt(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function re(T){this.data.characterReferenceType=T.type}function _e(T){const R=this.sliceSerialize(T),K=this.data.characterReferenceType;let J;K?(J=Ph(R,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):J=fc(R);const ie=this.stack[this.stack.length-1];ie.value+=J}function Ve(T){const R=this.stack.pop();R.position.end=In(T.end)}function X(T){C.call(this,T);const R=this.stack[this.stack.length-1];R.url=this.sliceSerialize(T)}function ye(T){C.call(this,T);const R=this.stack[this.stack.length-1];R.url="mailto:"+this.sliceSerialize(T)}function Se(){return{type:"blockquote",children:[]}}function je(){return{type:"code",lang:null,meta:null,value:""}}function it(){return{type:"inlineCode",value:""}}function Et(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function St(){return{type:"emphasis",children:[]}}function De(){return{type:"heading",depth:0,children:[]}}function me(){return{type:"break"}}function We(){return{type:"html",value:""}}function oe(){return{type:"image",title:null,url:"",alt:null}}function Bt(){return{type:"link",title:null,url:"",children:[]}}function Ae(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function xe(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function Ft(){return{type:"paragraph",children:[]}}function ft(){return{type:"strong",children:[]}}function Ye(){return{type:"text",value:""}}function At(){return{type:"thematicBreak"}}}function In(e){return{line:e.line,column:e.column,offset:e.offset}}function Vh(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Vh(e,r):$E(e,r)}}function $E(e,t){let n;for(n in t)if(Kh.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Hu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ki({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ki({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ki({start:t.start,end:t.end})+") is still open")}function UE(e){const t=this;t.parser=n;function n(r){return BE(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function qE(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function jE(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
21
+ `}]}function zE(e,t){const n=t.value?t.value+`
22
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function HE(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GE(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KE(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Wr(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function VE(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WE(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Wh(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function YE(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Wh(e,t);const i={src:Wr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function ZE(e,t){const n={src:Wr(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function XE(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function JE(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Wh(e,t);const i={href:Wr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function QE(e,t){const n={href:Wr(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function e1(e,t,n){const r=e.all(t),i=n?t1(n):Yh(t),s={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const u=r[o];(i||o!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
23
+ `}),u.type==="element"&&u.tagName==="p"&&!i?a.push(...u.children):a.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
24
+ `});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function t1(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Yh(n[r])}return t}function Yh(e){const t=e.spread;return t??e.children.length>1}function n1(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function r1(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function i1(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function s1(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function a1(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=lc(t.children[1]),l=Th(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function o1(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<o;){const d=t.children[l],h={},f=a?a[l]:void 0;f&&(h.align=f);let p={type:"element",tagName:s,properties:h,children:[]};d&&(p.children=e.all(d),e.patch(d,p),p=e.applyData(d,p)),c.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function l1(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Gu=9,Ku=32;function c1(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Vu(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Vu(t.slice(i),i>0,!1)),s.join("")}function Vu(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Gu||s===Ku;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Gu||s===Ku;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function u1(e,t){const n={type:"text",value:c1(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function d1(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const f1={blockquote:qE,break:jE,code:zE,delete:HE,emphasis:GE,footnoteReference:KE,heading:VE,html:WE,imageReference:YE,image:ZE,inlineCode:XE,linkReference:JE,link:QE,listItem:e1,list:n1,paragraph:r1,root:i1,strong:s1,table:a1,tableCell:l1,tableRow:o1,text:u1,thematicBreak:d1,toml:bs,yaml:bs,definition:bs,footnoteDefinition:bs};function bs(){}const Zh=-1,da=0,Si=1,Vs=2,pc=3,gc=4,mc=5,bc=6,Xh=7,Jh=8,Wu=typeof self=="object"?self:globalThis,h1=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case da:case Zh:return n(a,i);case Si:{const o=n([],i);for(const l of a)o.push(r(l));return o}case Vs:{const o=n({},i);for(const[l,c]of a)o[r(l)]=r(c);return o}case pc:return n(new Date(a),i);case gc:{const{source:o,flags:l}=a;return n(new RegExp(o,l),i)}case mc:{const o=n(new Map,i);for(const[l,c]of a)o.set(r(l),r(c));return o}case bc:{const o=n(new Set,i);for(const l of a)o.add(r(l));return o}case Xh:{const{name:o,message:l}=a;return n(new Wu[o](l),i)}case Jh:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new Wu[s](a),i)};return r},Yu=e=>h1(new Map,e)(0),_r="",{toString:p1}={},{keys:g1}=Object,pi=e=>{const t=typeof e;if(t!=="object"||!e)return[da,t];const n=p1.call(e).slice(8,-1);switch(n){case"Array":return[Si,_r];case"Object":return[Vs,_r];case"Date":return[pc,_r];case"RegExp":return[gc,_r];case"Map":return[mc,_r];case"Set":return[bc,_r];case"DataView":return[Si,n]}return n.includes("Array")?[Si,n]:n.includes("Error")?[Xh,n]:[Vs,n]},ys=([e,t])=>e===da&&(t==="function"||t==="symbol"),m1=(e,t,n,r)=>{const i=(a,o)=>{const l=r.push(a)-1;return n.set(o,l),l},s=a=>{if(n.has(a))return n.get(a);let[o,l]=pi(a);switch(o){case da:{let u=a;switch(l){case"bigint":o=Jh,u=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([Zh],a)}return i([o,u],a)}case Si:{if(l){let h=a;return l==="DataView"?h=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(a)),i([l,[...h]],a)}const u=[],d=i([o,u],a);for(const h of a)u.push(s(h));return d}case Vs:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const u=[],d=i([o,u],a);for(const h of g1(a))(e||!ys(pi(a[h])))&&u.push([s(h),s(a[h])]);return d}case pc:return i([o,a.toISOString()],a);case gc:{const{source:u,flags:d}=a;return i([o,{source:u,flags:d}],a)}case mc:{const u=[],d=i([o,u],a);for(const[h,f]of a)(e||!(ys(pi(h))||ys(pi(f))))&&u.push([s(h),s(f)]);return d}case bc:{const u=[],d=i([o,u],a);for(const h of a)(e||!ys(pi(h)))&&u.push(s(h));return d}}const{message:c}=a;return i([o,{name:l,message:c}],a)};return s},Zu=(e,{json:t,lossy:n}={})=>{const r=[];return m1(!(t||n),!!t,new Map,r)(e),r},Ws=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Yu(Zu(e,t)):structuredClone(e):(e,t)=>Yu(Zu(e,t));function b1(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function y1(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function x1(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||b1,r=e.options.footnoteBackLabel||y1,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),h=Wr(d.toLowerCase());let f=0;const p=[],g=e.footnoteCounts.get(d);for(;g!==void 0&&++f<=g;){p.length>0&&p.push({type:"text",value:" "});let w=typeof n=="string"?n:n(l,f);typeof w=="string"&&(w={type:"text",value:w}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const b=u[u.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const w=b.children[b.children.length-1];w&&w.type==="text"?w.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...p)}else u.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(u,!0)};e.patch(c,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ws(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
25
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
26
+ `}]}}const Qh=function(e){if(e==null)return _1;if(typeof e=="function")return fa(e);if(typeof e=="object")return Array.isArray(e)?E1(e):w1(e);if(typeof e=="string")return v1(e);throw new Error("Expected function, string, or object as test")};function E1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Qh(e[n]);return fa(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function w1(e){const t=e;return fa(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function v1(e){return fa(t);function t(n){return n&&n.type===e}}function fa(e){return t;function t(n,r,i){return!!(k1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function _1(){return!0}function k1(e){return e!==null&&typeof e=="object"&&"type"in e}const ep=[],N1=!0,Xu=!1,S1="skip";function A1(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Qh(i),a=r?-1:1;o(e,void 0,[])();function o(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=ep,p,g,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=T1(n(l,u)),f[0]===Xu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==S1)for(g=(r?y.children.length:-1)+a,b=u.concat(y);g>-1&&g<y.children.length;){const w=y.children[g];if(p=o(w,g,b)(),p[0]===Xu)return p;g=typeof p[1]=="number"?p[1]:g+a}}return f}}}function T1(e){return Array.isArray(e)?e:typeof e=="number"?[N1,e]:e==null?ep:[e]}function C1(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),A1(e,s,o,i);function o(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return a(l,d,u)}}const El={}.hasOwnProperty,O1={};function I1(e,t){const n=t||O1,r=new Map,i=new Map,s=new Map,a={...f1,...n.handlers},o={all:c,applyData:L1,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:n,patch:R1,wrap:D1};return C1(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:i,h=String(u.identifier).toUpperCase();d.has(h)||d.set(h,u)}}),o;function l(u,d){const h=u.type,f=o.handlers[h];if(El.call(o.handlers,h)&&f)return f(o,u,d);if(o.options.passThrough&&o.options.passThrough.includes(h)){if("children"in u){const{children:g,...b}=u,y=Ws(b);return y.children=o.all(u),y}return Ws(u)}return(o.options.unknownHandler||M1)(o,u,d)}function c(u){const d=[];if("children"in u){const h=u.children;let f=-1;for(;++f<h.length;){const p=o.one(h[f],u);if(p){if(f&&h[f-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=Ju(p.value)),!Array.isArray(p)&&p.type==="element")){const g=p.children[0];g&&g.type==="text"&&(g.value=Ju(g.value))}Array.isArray(p)?d.push(...p):d.push(p)}}}return d}}function R1(e,t){e.position&&(t.position=b0(e))}function L1(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,Ws(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function M1(e,t){const n=t.data||{},r="value"in t&&!(El.call(n,"hProperties")||El.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function D1(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
27
  `});++r<e.length;)r&&n.push({type:"text",value:`
12
28
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
- `}),n}function cu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function uu(e,t){const n=Vx(e,t),r=n.one(e,void 0),i=Px(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
14
- `},i),s}function Jx(e,t){return e&&"run"in e?async function(n,r){const i=uu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return uu(n,{file:r,...e||t})}}function du(e){if(e)throw e}var ks=Object.prototype.hasOwnProperty,sh=Object.prototype.toString,fu=Object.defineProperty,hu=Object.getOwnPropertyDescriptor,pu=function(t){return typeof Array.isArray=="function"?Array.isArray(t):sh.call(t)==="[object Array]"},gu=function(t){if(!t||sh.call(t)!=="[object Object]")return!1;var n=ks.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ks.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ks.call(t,i)},mu=function(t,n){fu&&n.name==="__proto__"?fu(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},bu=function(t,n){if(n==="__proto__")if(ks.call(t,n)){if(hu)return hu(t,n).value}else return;return t[n]},eE=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=bu(a,n),i=bu(t,n),a!==i&&(u&&i&&(gu(i)||(s=pu(i)))?(s?(s=!1,o=r&&pu(r)?r:[]):o=r&&gu(r)?r:{},mu(a,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&mu(a,{name:n,newValue:i}));return a};const ua=Mi(eE);function Xa(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function tE(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?nE(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function nE(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const rn={basename:rE,dirname:iE,extname:sE,join:oE,sep:"/"};function rE(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pi(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function iE(e){if(Pi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function sE(e){Pi(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function oE(...e){let t=-1,n;for(;++t<e.length;)Pi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":aE(n)}function aE(e){Pi(e);const t=e.codePointAt(0)===47;let n=lE(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function lE(e,t){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function Pi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const cE={cwd:uE};function uE(){return"/"}function Qa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function dE(e){if(typeof e=="string")e=new URL(e);else if(!Qa(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return fE(e)}function fE(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const da=["history","path","basename","stem","extname","dirname"];class oh{constructor(t){let n;t?Qa(t)?n={path:t}:typeof t=="string"||hE(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":cE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<da.length;){const s=da[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)da.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?rn.basename(this.path):void 0}set basename(t){ha(t,"basename"),fa(t,"basename"),this.path=rn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?rn.dirname(this.path):void 0}set dirname(t){yu(this.basename,"dirname"),this.path=rn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?rn.extname(this.path):void 0}set extname(t){if(fa(t,"extname"),yu(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=rn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qa(t)&&(t=dE(t)),ha(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?rn.basename(this.path,this.extname):void 0}set stem(t){ha(t,"stem"),fa(t,"stem"),this.path=rn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new nt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function fa(e,t){if(e&&e.includes(rn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+rn.sep+"`")}function ha(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yu(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function hE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pE=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},gE={}.hasOwnProperty;class Wl extends pE{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=tE()}copy(){const t=new Wl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ua(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ma("data",this.frozen),this.namespace[t]=n,this):gE.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ma("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=as(t),r=this.parser||this.Parser;return pa("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),pa("process",this.parser||this.Parser),ga("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=as(t),l=r.parse(a);r.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const f=d,p=r.stringify(f,h);yE(p)?h.value=p:h.result=p,c(u,h)});function c(u,d){u||!d?o(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),pa("processSync",this.parser||this.Parser),ga("processSync",this.compiler||this.Compiler),this.process(t,i),Eu("processSync","process",n),r;function i(s,o){n=!0,du(s),r=o}}run(t,n,r){xu(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=as(n);i.run(t,l,c);function c(u,d,h){const f=d||t;u?a(u):o?o(f):r(void 0,f,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Eu("runSync","run",r),i;function s(o,a){du(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=as(n),i=this.compiler||this.Compiler;return ga("stringify",i),xu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ma("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=ua(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=r[h][1];Xa(m)&&Xa(f)&&(f=ua(!0,m,f)),r[h]=[c,f,...p]}}}}const mE=new Wl().freeze();function pa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ga(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ma(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xu(e){if(!Xa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Eu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function as(e){return bE(e)?e:new oh(e)}function bE(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function yE(e){return typeof e=="string"||xE(e)}function xE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ah=function(e){if(e==null)return vE;if(typeof e=="function")return Xs(e);if(typeof e=="object")return Array.isArray(e)?EE(e):wE(e);if(typeof e=="string")return _E(e);throw new Error("Expected function, string, or object as test")};function EE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ah(e[n]);return Xs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function wE(e){const t=e;return Xs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function _E(e){return Xs(t);function t(n){return n&&n.type===e}}function Xs(e){return t;function t(n,r,i){return!!(kE(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function vE(){return!0}function kE(e){return e!==null&&typeof e=="object"&&"type"in e}const lh=[],NE=!0,wu=!1,AE="skip";function SE(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ah(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=lh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=TE(n(l,u)),f[0]===wu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==AE)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===wu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function TE(e){return Array.isArray(e)?e:typeof e=="number"?[NE,e]:e==null?lh:[e]}function CE(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),SE(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const OE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_u=[],vu={allowDangerousHtml:!0},IE=/^(https?|ircs?|mailto|xmpp)$/i,RE=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ch(e){const t=LE(e),n=ME(e);return DE(t.runSync(t.parse(n),n),e)}function LE(e){const t=e.rehypePlugins||_u,n=e.remarkPlugins||_u,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vu}:vu;return mE().use(rx).use(n).use(Jx,r).use(t)}function ME(e){const t=e.children||"",n=new oh;return typeof t=="string"&&(n.value=t),n}function DE(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||PE;for(const u of RE)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+OE+u.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),CE(e,c),qb(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function c(u,d,h){if(u.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let f;for(f in aa)if(Object.hasOwn(aa,f)&&Object.hasOwn(u.properties,f)){const p=u.properties[f],m=aa[f];(m===null||m.includes(u.tagName))&&(u.properties[f]=l(String(p||""),f,u))}}if(u.type==="element"){let f=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(u,d,h)),f&&h&&typeof d=="number")return a&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d}}}function PE(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||IE.test(e.slice(0,t))?e:""}function ku(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function BE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Vl=function(e){if(e==null)return $E;if(typeof e=="function")return Qs(e);if(typeof e=="object")return Array.isArray(e)?FE(e):qE(e);if(typeof e=="string")return UE(e);throw new Error("Expected function, string, or object as test")};function FE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Vl(e[n]);return Qs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function qE(e){const t=e;return Qs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function UE(e){return Qs(t);function t(n){return n&&n.type===e}}function Qs(e){return t;function t(n,r,i){return!!(zE(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $E(){return!0}function zE(e){return e!==null&&typeof e=="object"&&"type"in e}const uh=[],jE=!0,Nu=!1,HE="skip";function GE(e,t,n,r){let i;i=t;const s=Vl(i),o=1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=uh,p,m,b;if(s(l,c,u[u.length-1]||void 0)&&(f=KE(n(l,u)),f[0]===Nu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==HE)for(m=-1+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Nu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function KE(e){return Array.isArray(e)?e:typeof e=="number"?[jE,e]:e==null?uh:[e]}function WE(e,t,n){const i=Vl((n||{}).ignore||[]),s=VE(t);let o=-1;for(;++o<s.length;)GE(e,"text",a);function a(c,u){let d=-1,h;for(;++d<u.length;){const f=u[d],p=h?h.children:void 0;if(i(f,p?p.indexOf(f):void 0,h))return;h=f}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=s[o][0],f=s[o][1];let p=0;const b=d.children.indexOf(c);let y=!1,_=[];h.lastIndex=0;let v=h.exec(c.value);for(;v;){const T=v.index,C={index:v.index,input:v.input,stack:[...u,c]};let N=f(...v,C);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?h.lastIndex=T+1:(p!==T&&_.push({type:"text",value:c.value.slice(p,T)}),Array.isArray(N)?_.push(...N):N&&_.push(N),p=T+v[0].length,y=!0),!h.global)break;v=h.exec(c.value)}return y?(p<c.value.length&&_.push({type:"text",value:c.value.slice(p)}),d.children.splice(b,1,..._)):_=[c],b+_.length}}function VE(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([YE(i[0]),ZE(i[1])])}return t}function YE(e){return typeof e=="string"?new RegExp(BE(e),"g"):e}function ZE(e){return typeof e=="function"?e:function(){return e}}const ba="phrasing",ya=["autolink","link","image","label"];function XE(){return{transforms:[i1],enter:{literalAutolink:JE,literalAutolinkEmail:xa,literalAutolinkHttp:xa,literalAutolinkWww:xa},exit:{literalAutolink:r1,literalAutolinkEmail:n1,literalAutolinkHttp:e1,literalAutolinkWww:t1}}}function QE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:":",before:"[ps]",after:"\\/",inConstruct:ba,notInConstruct:ya}]}}function JE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function xa(e){this.config.enter.autolinkProtocol.call(this,e)}function e1(e){this.config.exit.autolinkProtocol.call(this,e)}function t1(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function n1(e){this.config.exit.autolinkEmail.call(this,e)}function r1(e){this.exit(e)}function i1(e){WE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,s1],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),o1]],{ignore:["link","linkReference"]})}function s1(e,t,n,r,i){let s="";if(!dh(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!a1(n)))return!1;const o=l1(n+r);if(!o[0])return!1;const a={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function o1(e,t,n,r){return!dh(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function a1(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function l1(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=ku(e,"(");let s=ku(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function dh(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yn(n)||Ws(n))&&(!t||n!==47)}fh.peek=b1;function c1(){this.buffer()}function u1(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function d1(){this.buffer()}function f1(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function h1(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function p1(e){this.exit(e)}function g1(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function m1(e){this.exit(e)}function b1(){return"["}function fh(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),a=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),a(),o(),s+=i.move("]"),s}function y1(){return{enter:{gfmFootnoteCallString:c1,gfmFootnoteCall:u1,gfmFootnoteDefinitionLabelString:d1,gfmFootnoteDefinition:f1},exit:{gfmFootnoteCallString:h1,gfmFootnoteCall:p1,gfmFootnoteDefinitionLabelString:g1,gfmFootnoteDefinition:m1}}}function x1(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fh},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const a=s.createTracker(o);let l=a.move("[^");const c=s.enter("footnoteDefinition"),u=s.enter("label");return l+=a.move(s.safe(s.associationId(r),{before:l,after:"]"})),u(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((t?`
15
- `:" ")+s.indentLines(s.containerFlow(r,a.current()),t?hh:E1))),c(),l}}function E1(e,t,n){return t===0?e:hh(e,t,n)}function hh(e,t,n){return(n?"":" ")+e}const w1=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ph.peek=A1;function _1(){return{canContainEols:["delete"],enter:{strikethrough:k1},exit:{strikethrough:N1}}}function v1(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:w1}],handlers:{delete:ph}}}function k1(e){this.enter({type:"delete",children:[]},e)}function N1(e){this.exit(e)}function ph(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function A1(){return"~"}function S1(e){return e.length}function T1(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||S1,s=[],o=[],a=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],b=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const _=C1(e[u][y]);if(n.alignDelimiters!==!1){const v=i(_);b[y]=v,(l[y]===void 0||v>l[y])&&(l[y]=v)}m.push(_)}o[u]=m,a[u]=b}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)s[d]=Au(r[d]);else{const m=Au(r);for(;++d<c;)s[d]=m}d=-1;const h=[],f=[];for(;++d<c;){const m=s[d];let b="",y="";m===99?(b=":",y=":"):m===108?b=":":m===114&&(y=":");let _=n.alignDelimiters===!1?1:Math.max(1,l[d]-b.length-y.length);const v=b+"-".repeat(_)+y;n.alignDelimiters!==!1&&(_=b.length+_+y.length,_>l[d]&&(l[d]=_),f[d]=_),h[d]=v}o.splice(1,0,h),a.splice(1,0,f),u=-1;const p=[];for(;++u<o.length;){const m=o[u],b=a[u];d=-1;const y=[];for(;++d<c;){const _=m[d]||"";let v="",T="";if(n.alignDelimiters!==!1){const C=l[d]-(b[d]||0),N=s[d];N===114?v=" ".repeat(C):N===99?C%2?(v=" ".repeat(C/2+.5),T=" ".repeat(C/2-.5)):(v=" ".repeat(C/2),T=v):T=" ".repeat(C)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(_),n.alignDelimiters!==!1&&y.push(T),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}p.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(`
16
- `)}function C1(e){return e==null?"":String(e)}function Au(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function O1(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),I1);return i(),o}function I1(e,t,n){return">"+(n?"":" ")+e}function R1(e,t){return Su(e,t.inConstruct,!0)&&!Su(e,t.notInConstruct,!1)}function Su(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Tu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
- `&&R1(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
- `}function L1(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}function M1(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function D1(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function P1(e,t,n,r){const i=D1(n),s=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(M1(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(s,B1);return d(),h}const a=n.createTracker(r),l=i.repeat(Math.max(L1(s,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(e.lang){const d=n.enter(`codeFencedLang${o}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:`
19
- `,encode:["`"],...a.current()})),d()}return u+=a.move(`
20
- `),s&&(u+=a.move(s+`
21
- `)),u+=a.move(l),c(),u}function B1(e,t,n){return(n?"":" ")+e}function Yl(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function F1(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
22
- `,...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),o(),c}function q1(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function _i(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ms(e,t,n){const r=Rr(e),i=Rr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gh.peek=U1;function gh(e,t,n,r){const i=q1(n),s=n.enter("emphasis"),o=n.createTracker(r),a=o.move(i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ms(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=_i(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+_i(d));const f=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function U1(e,t,n){return n.options.emphasis||"*"}const mh=function(e){if(e==null)return H1;if(typeof e=="function")return Js(e);if(typeof e=="object")return Array.isArray(e)?$1(e):z1(e);if(typeof e=="string")return j1(e);throw new Error("Expected function, string, or object as test")};function $1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mh(e[n]);return Js(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function z1(e){const t=e;return Js(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function j1(e){return Js(t);function t(n){return n&&n.type===e}}function Js(e){return t;function t(n,r,i){return!!(G1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function H1(){return!0}function G1(e){return e!==null&&typeof e=="object"&&"type"in e}const bh=[],K1=!0,Ja=!1,W1="skip";function V1(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=mh(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=bh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=Y1(n(l,u)),f[0]===Ja))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==W1)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Ja)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function Y1(e){return Array.isArray(e)?e:typeof e=="number"?[K1,e]:e==null?bh:[e]}function Z1(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),V1(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const X1={};function yh(e,t){const n=X1,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return xh(e,r,i)}function xh(e,t,n){if(Q1(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cu(e.children,t,n)}return Array.isArray(e)?Cu(e,t,n):""}function Cu(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=xh(e[i],t,n);return r.join("")}function Q1(e){return!!(e&&typeof e=="object")}function J1(e,t){let n=!1;return Z1(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ja}),!!((!e.depth||e.depth<3)&&yh(e)&&(t.options.setext||n))}function ew(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(J1(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:`
29
+ `}),n}function Ju(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Qu(e,t){const n=I1(e,t),r=n.one(e,void 0),i=x1(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
30
+ `},i),s}function P1(e,t){return e&&"run"in e?async function(n,r){const i=Qu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Qu(n,{file:r,...e||t})}}function ed(e){if(e)throw e}var Ps=Object.prototype.hasOwnProperty,tp=Object.prototype.toString,td=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,rd=function(t){return typeof Array.isArray=="function"?Array.isArray(t):tp.call(t)==="[object Array]"},id=function(t){if(!t||tp.call(t)!=="[object Object]")return!1;var n=Ps.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ps.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ps.call(t,i)},sd=function(t,n){td&&n.name==="__proto__"?td(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},ad=function(t,n){if(n==="__proto__")if(Ps.call(t,n)){if(nd)return nd(t,n).value}else return;return t[n]},B1=function e(){var t,n,r,i,s,a,o=arguments[0],l=1,c=arguments.length,u=!1;for(typeof o=="boolean"&&(u=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=ad(o,n),i=ad(t,n),o!==i&&(u&&i&&(id(i)||(s=rd(i)))?(s?(s=!1,a=r&&rd(r)?r:[]):a=r&&id(r)?r:{},sd(o,{name:n,newValue:e(u,a,i)})):typeof i<"u"&&sd(o,{name:n,newValue:i}));return o};const Io=Hi(B1);function wl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function F1(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(l,...c){const u=e[++s];let d=-1;if(l){a(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?$1(u,o)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function $1(e,t){let n;return r;function r(...a){const o=e.length>a.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(c){const u=c;if(o&&n)throw u;return i(u)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const on={basename:U1,dirname:q1,extname:j1,join:z1,sep:"/"};function U1(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Vi(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function q1(e){if(Vi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function j1(e){Vi(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function z1(...e){let t=-1,n;for(;++t<e.length;)Vi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":H1(n)}function H1(e){Vi(e);const t=e.codePointAt(0)===47;let n=G1(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function G1(e,t){let n="",r=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function Vi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const K1={cwd:V1};function V1(){return"/"}function vl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function W1(e){if(typeof e=="string")e=new URL(e);else if(!vl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Y1(e)}function Y1(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Ro=["history","path","basename","stem","extname","dirname"];class np{constructor(t){let n;t?vl(t)?n={path:t}:typeof t=="string"||Z1(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":K1.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ro.length;){const s=Ro[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)Ro.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?on.basename(this.path):void 0}set basename(t){Mo(t,"basename"),Lo(t,"basename"),this.path=on.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?on.dirname(this.path):void 0}set dirname(t){od(this.basename,"dirname"),this.path=on.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?on.extname(this.path):void 0}set extname(t){if(Lo(t,"extname"),od(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=on.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vl(t)&&(t=W1(t)),Mo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?on.basename(this.path,this.extname):void 0}set stem(t){Mo(t,"stem"),Lo(t,"stem"),this.path=on.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new rt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Lo(e,t){if(e&&e.includes(on.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+on.sep+"`")}function Mo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function od(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Z1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const X1=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},J1={}.hasOwnProperty;class yc extends X1{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=F1()}copy(){const t=new yc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Io(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Bo("data",this.frozen),this.namespace[t]=n,this):J1.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Bo("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=xs(t),r=this.parser||this.Parser;return Do("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Do("process",this.parser||this.Parser),Po("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=xs(t),l=r.parse(o);r.run(l,o,function(u,d,h){if(u||!d||!h)return c(u);const f=d,p=r.stringify(f,h);tw(p)?h.value=p:h.result=p,c(u,h)});function c(u,d){u||!d?a(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Do("processSync",this.parser||this.Parser),Po("processSync",this.compiler||this.Compiler),this.process(t,i),cd("processSync","process",n),r;function i(s,a){n=!0,ed(s),r=a}}run(t,n,r){ld(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const l=xs(n);i.run(t,l,c);function c(u,d,h){const f=d||t;u?o(u):a?a(f):r(void 0,f,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),cd("runSync","run",r),i;function s(a,o){ed(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=xs(n),i=this.compiler||this.Compiler;return Po("stringify",i),ld(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Bo("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(c.plugins),c.settings&&(i.settings=Io(!0,i.settings,c.settings))}function o(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[f,...p]=u;const g=r[h][1];wl(g)&&wl(f)&&(f=Io(!0,g,f)),r[h]=[c,f,...p]}}}}const Q1=new yc().freeze();function Do(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Po(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Bo(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ld(e){if(!wl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cd(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function xs(e){return ew(e)?e:new np(e)}function ew(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tw(e){return typeof e=="string"||nw(e)}function nw(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rp=function(e){if(e==null)return aw;if(typeof e=="function")return ha(e);if(typeof e=="object")return Array.isArray(e)?rw(e):iw(e);if(typeof e=="string")return sw(e);throw new Error("Expected function, string, or object as test")};function rw(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rp(e[n]);return ha(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function iw(e){const t=e;return ha(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function sw(e){return ha(t);function t(n){return n&&n.type===e}}function ha(e){return t;function t(n,r,i){return!!(ow(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function aw(){return!0}function ow(e){return e!==null&&typeof e=="object"&&"type"in e}const ip=[],lw=!0,ud=!1,cw="skip";function uw(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=rp(i),a=r?-1:1;o(e,void 0,[])();function o(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=ip,p,g,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=dw(n(l,u)),f[0]===ud))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==cw)for(g=(r?y.children.length:-1)+a,b=u.concat(y);g>-1&&g<y.children.length;){const w=y.children[g];if(p=o(w,g,b)(),p[0]===ud)return p;g=typeof p[1]=="number"?p[1]:g+a}}return f}}}function dw(e){return Array.isArray(e)?e:typeof e=="number"?[lw,e]:e==null?ip:[e]}function fw(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),uw(e,s,o,i);function o(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return a(l,d,u)}}const hw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",dd=[],fd={allowDangerousHtml:!0},pw=/^(https?|ircs?|mailto|xmpp)$/i,gw=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function sp(e){const t=mw(e),n=bw(e);return yw(t.runSync(t.parse(n),n),e)}function mw(e){const t=e.rehypePlugins||dd,n=e.remarkPlugins||dd,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...fd}:fd;return Q1().use(UE).use(n).use(P1,r).use(t)}function bw(e){const t=e.children||"",n=new np;return typeof t=="string"&&(n.value=t),n}function yw(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||xw;for(const u of gw)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+hw+u.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),fw(e,c),v0(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function c(u,d,h){if(u.type==="raw"&&h&&typeof d=="number")return a?h.children.splice(d,1):h.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let f;for(f in To)if(Object.hasOwn(To,f)&&Object.hasOwn(u.properties,f)){const p=u.properties[f],g=To[f];(g===null||g.includes(u.tagName))&&(u.properties[f]=l(String(p||""),f,u))}}if(u.type==="element"){let f=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(u,d,h)),f&&h&&typeof d=="number")return o&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d}}}function xw(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||pw.test(e.slice(0,t))?e:""}function hd(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ew(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const xc=function(e){if(e==null)return kw;if(typeof e=="function")return pa(e);if(typeof e=="object")return Array.isArray(e)?ww(e):vw(e);if(typeof e=="string")return _w(e);throw new Error("Expected function, string, or object as test")};function ww(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xc(e[n]);return pa(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function vw(e){const t=e;return pa(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function _w(e){return pa(t);function t(n){return n&&n.type===e}}function pa(e){return t;function t(n,r,i){return!!(Nw(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function kw(){return!0}function Nw(e){return e!==null&&typeof e=="object"&&"type"in e}const ap=[],Sw=!0,pd=!1,Aw="skip";function Tw(e,t,n,r){let i;i=t;const s=xc(i),a=1;o(e,void 0,[])();function o(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=ap,p,g,b;if(s(l,c,u[u.length-1]||void 0)&&(f=Cw(n(l,u)),f[0]===pd))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==Aw)for(g=-1+a,b=u.concat(y);g>-1&&g<y.children.length;){const w=y.children[g];if(p=o(w,g,b)(),p[0]===pd)return p;g=typeof p[1]=="number"?p[1]:g+a}}return f}}}function Cw(e){return Array.isArray(e)?e:typeof e=="number"?[Sw,e]:e==null?ap:[e]}function Ow(e,t,n){const i=xc((n||{}).ignore||[]),s=Iw(t);let a=-1;for(;++a<s.length;)Tw(e,"text",o);function o(c,u){let d=-1,h;for(;++d<u.length;){const f=u[d],p=h?h.children:void 0;if(i(f,p?p.indexOf(f):void 0,h))return;h=f}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=s[a][0],f=s[a][1];let p=0;const b=d.children.indexOf(c);let y=!1,w=[];h.lastIndex=0;let _=h.exec(c.value);for(;_;){const A=_.index,O={index:_.index,input:_.input,stack:[...u,c]};let N=f(..._,O);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?h.lastIndex=A+1:(p!==A&&w.push({type:"text",value:c.value.slice(p,A)}),Array.isArray(N)?w.push(...N):N&&w.push(N),p=A+_[0].length,y=!0),!h.global)break;_=h.exec(c.value)}return y?(p<c.value.length&&w.push({type:"text",value:c.value.slice(p)}),d.children.splice(b,1,...w)):w=[c],b+w.length}}function Iw(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Rw(i[0]),Lw(i[1])])}return t}function Rw(e){return typeof e=="string"?new RegExp(Ew(e),"g"):e}function Lw(e){return typeof e=="function"?e:function(){return e}}const Fo="phrasing",$o=["autolink","link","image","label"];function Mw(){return{transforms:[qw],enter:{literalAutolink:Pw,literalAutolinkEmail:Uo,literalAutolinkHttp:Uo,literalAutolinkWww:Uo},exit:{literalAutolink:Uw,literalAutolinkEmail:$w,literalAutolinkHttp:Bw,literalAutolinkWww:Fw}}}function Dw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Fo,notInConstruct:$o},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Fo,notInConstruct:$o},{character:":",before:"[ps]",after:"\\/",inConstruct:Fo,notInConstruct:$o}]}}function Pw(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Uo(e){this.config.enter.autolinkProtocol.call(this,e)}function Bw(e){this.config.exit.autolinkProtocol.call(this,e)}function Fw(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function $w(e){this.config.exit.autolinkEmail.call(this,e)}function Uw(e){this.exit(e)}function qw(e){Ow(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,jw],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),zw]],{ignore:["link","linkReference"]})}function jw(e,t,n,r,i){let s="";if(!op(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!Hw(n)))return!1;const a=Gw(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function zw(e,t,n,r){return!op(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Hw(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Gw(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=hd(e,"(");let s=hd(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function op(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||nr(n)||ca(n))&&(!t||n!==47)}lp.peek=ev;function Kw(){this.buffer()}function Vw(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ww(){this.buffer()}function Yw(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Zw(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Xw(e){this.exit(e)}function Jw(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Qw(e){this.exit(e)}function ev(){return"["}function lp(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function tv(){return{enter:{gfmFootnoteCallString:Kw,gfmFootnoteCall:Vw,gfmFootnoteDefinitionLabelString:Ww,gfmFootnoteDefinition:Yw},exit:{gfmFootnoteCallString:Zw,gfmFootnoteCall:Xw,gfmFootnoteDefinitionLabelString:Jw,gfmFootnoteDefinition:Qw}}}function nv(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:lp},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const c=s.enter("footnoteDefinition"),u=s.enter("label");return l+=o.move(s.safe(s.associationId(r),{before:l,after:"]"})),u(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?`
31
+ `:" ")+s.indentLines(s.containerFlow(r,o.current()),t?cp:rv))),c(),l}}function rv(e,t,n){return t===0?e:cp(e,t,n)}function cp(e,t,n){return(n?"":" ")+e}const iv=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];up.peek=cv;function sv(){return{canContainEols:["delete"],enter:{strikethrough:ov},exit:{strikethrough:lv}}}function av(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:iv}],handlers:{delete:up}}}function ov(e){this.enter({type:"delete",children:[]},e)}function lv(e){this.exit(e)}function up(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function cv(){return"~"}function uv(e){return e.length}function dv(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||uv,s=[],a=[],o=[],l=[];let c=0,u=-1;for(;++u<e.length;){const g=[],b=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const w=fv(e[u][y]);if(n.alignDelimiters!==!1){const _=i(w);b[y]=_,(l[y]===void 0||_>l[y])&&(l[y]=_)}g.push(w)}a[u]=g,o[u]=b}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)s[d]=gd(r[d]);else{const g=gd(r);for(;++d<c;)s[d]=g}d=-1;const h=[],f=[];for(;++d<c;){const g=s[d];let b="",y="";g===99?(b=":",y=":"):g===108?b=":":g===114&&(y=":");let w=n.alignDelimiters===!1?1:Math.max(1,l[d]-b.length-y.length);const _=b+"-".repeat(w)+y;n.alignDelimiters!==!1&&(w=b.length+w+y.length,w>l[d]&&(l[d]=w),f[d]=w),h[d]=_}a.splice(1,0,h),o.splice(1,0,f),u=-1;const p=[];for(;++u<a.length;){const g=a[u],b=o[u];d=-1;const y=[];for(;++d<c;){const w=g[d]||"";let _="",A="";if(n.alignDelimiters!==!1){const O=l[d]-(b[d]||0),N=s[d];N===114?_=" ".repeat(O):N===99?O%2?(_=" ".repeat(O/2+.5),A=" ".repeat(O/2-.5)):(_=" ".repeat(O/2),A=_):A=" ".repeat(O)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&w==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(_),y.push(w),n.alignDelimiters!==!1&&y.push(A),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}p.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(`
32
+ `)}function fv(e){return e==null?"":String(e)}function gd(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function hv(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),pv);return i(),a}function pv(e,t,n){return">"+(n?"":" ")+e}function gv(e,t){return md(e,t.inConstruct,!0)&&!md(e,t.notInConstruct,!1)}function md(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function bd(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
33
+ `&&gv(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
34
+ `}function mv(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function bv(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function yv(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function xv(e,t,n,r){const i=yv(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(bv(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(s,Ev);return d(),h}const o=n.createTracker(r),l=i.repeat(Math.max(mv(s,i)+1,3)),c=n.enter("codeFenced");let u=o.move(l);if(e.lang){const d=n.enter(`codeFencedLang${a}`);u+=o.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);u+=o.move(" "),u+=o.move(n.safe(e.meta,{before:u,after:`
35
+ `,encode:["`"],...o.current()})),d()}return u+=o.move(`
36
+ `),s&&(u+=o.move(s+`
37
+ `)),u+=o.move(l),c(),u}function Ev(e,t,n){return(n?"":" ")+e}function Ec(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wv(e,t,n,r){const i=Ec(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
38
+ `,...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),a(),c}function vv(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Li(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ys(e,t,n){const r=$r(e),i=$r(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}dp.peek=_v;function dp(e,t,n,r){const i=vv(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const c=l.charCodeAt(0),u=Ys(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=Li(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ys(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+Li(d));const f=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},o+l+f}function _v(e,t,n){return n.options.emphasis||"*"}const fp=function(e){if(e==null)return Av;if(typeof e=="function")return ga(e);if(typeof e=="object")return Array.isArray(e)?kv(e):Nv(e);if(typeof e=="string")return Sv(e);throw new Error("Expected function, string, or object as test")};function kv(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=fp(e[n]);return ga(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Nv(e){const t=e;return ga(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function Sv(e){return ga(t);function t(n){return n&&n.type===e}}function ga(e){return t;function t(n,r,i){return!!(Tv(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Av(){return!0}function Tv(e){return e!==null&&typeof e=="object"&&"type"in e}const hp=[],Cv=!0,_l=!1,Ov="skip";function Iv(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=fp(i),a=r?-1:1;o(e,void 0,[])();function o(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=hp,p,g,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=Rv(n(l,u)),f[0]===_l))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==Ov)for(g=(r?y.children.length:-1)+a,b=u.concat(y);g>-1&&g<y.children.length;){const w=y.children[g];if(p=o(w,g,b)(),p[0]===_l)return p;g=typeof p[1]=="number"?p[1]:g+a}}return f}}}function Rv(e){return Array.isArray(e)?e:typeof e=="number"?[Cv,e]:e==null?hp:[e]}function Lv(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),Iv(e,s,o,i);function o(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return a(l,d,u)}}const Mv={};function pp(e,t){const n=Mv,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return gp(e,r,i)}function gp(e,t,n){if(Dv(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return yd(e.children,t,n)}return Array.isArray(e)?yd(e,t,n):""}function yd(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=gp(e[i],t,n);return r.join("")}function Dv(e){return!!(e&&typeof e=="object")}function Pv(e,t){let n=!1;return Lv(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,_l}),!!((!e.depth||e.depth<3)&&pp(e)&&(t.options.setext||n))}function Bv(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(Pv(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:`
23
39
  `,after:`
24
40
  `});return d(),u(),h+`
25
41
  `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
26
- `))+1))}const o="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");s.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
27
- `,...s.current()});return/^[\t ]/.test(c)&&(c=_i(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),a(),c}Eh.peek=tw;function Eh(e){return e.value||""}function tw(){return"<"}wh.peek=nw;function wh(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),o(),c}function nw(){return"!"}_h.peek=rw;function _h(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function rw(){return"!"}vh.peek=iw;function vh(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],a=n.compilePattern(o);let l;if(o.atBreak)for(;l=a.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function iw(){return"`"}function kh(e,t){const n=yh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Nh.peek=sw;function Nh(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let a,l;if(kh(e,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),a(),n.stack=u,d}a=n.enter("link"),l=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),a(),c}function sw(e,t,n){return kh(e,n)?"<":"["}Ah.peek=ow;function Ah(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function ow(){return"["}function Zl(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function aw(e){const t=Zl(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function lw(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Sh(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function cw(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?lw(n):Zl(n);const a=e.ordered?o==="."?")":".":aw(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Sh(n)===o&&u){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=a),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),c}function uw(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function dw(e,t,n,r){const i=uw(n);let s=n.bulletCurrent||Zl(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const a=n.createTracker(r);a.move(s+" ".repeat(o-s.length)),a.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),u);return l(),c;function u(d,h,f){return h?(f?"":" ".repeat(o))+d:(f?s:s+" ".repeat(o-s.length))+d}}function fw(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),i(),o}const Th=function(e){if(e==null)return mw;if(typeof e=="function")return eo(e);if(typeof e=="object")return Array.isArray(e)?hw(e):pw(e);if(typeof e=="string")return gw(e);throw new Error("Expected function, string, or object as test")};function hw(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Th(e[n]);return eo(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function pw(e){const t=e;return eo(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function gw(e){return eo(t);function t(n){return n&&n.type===e}}function eo(e){return t;function t(n,r,i){return!!(bw(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function mw(){return!0}function bw(e){return e!==null&&typeof e=="object"&&"type"in e}const yw=Th(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xw(e,t,n,r){return(e.children.some(function(o){return yw(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ew(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ch.peek=ww;function Ch(e,t,n,r){const i=Ew(n),s=n.enter("strong"),o=n.createTracker(r),a=o.move(i+i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ms(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=_i(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+_i(d));const f=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function ww(e,t,n){return n.options.strong||"*"}function _w(e,t,n,r){return n.safe(e.value,r)}function vw(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function kw(e,t,n){const r=(Sh(n)+(n.options.ruleSpaces?" ":"")).repeat(vw(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Oh={blockquote:O1,break:Tu,code:P1,definition:F1,emphasis:gh,hardBreak:Tu,heading:ew,html:Eh,image:wh,imageReference:_h,inlineCode:vh,link:Nh,linkReference:Ah,list:cw,listItem:dw,paragraph:fw,root:xw,strong:Ch,text:_w,thematicBreak:kw};function Nw(){return{enter:{table:Aw,tableData:Ou,tableHeader:Ou,tableRow:Tw},exit:{codeText:Cw,table:Sw,tableData:Ea,tableHeader:Ea,tableRow:Ea}}}function Aw(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Sw(e){this.exit(e),this.data.inTable=void 0}function Tw(e){this.enter({type:"tableRow",children:[]},e)}function Ea(e){this.exit(e)}function Ou(e){this.enter({type:"tableCell",children:[]},e)}function Cw(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ow));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ow(e,t){return t==="|"?t:e}function Iw(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:l,tableRow:a}};function o(f,p,m,b){return c(u(f,m,b),f.align)}function a(f,p,m,b){const y=d(f,m,b),_=c([y]);return _.slice(0,_.indexOf(`
29
- `))}function l(f,p,m,b){const y=m.enter("tableCell"),_=m.enter("phrasing"),v=m.containerPhrasing(f,{...b,before:s,after:s});return _(),y(),v}function c(f,p){return T1(f,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function u(f,p,m){const b=f.children;let y=-1;const _=[],v=p.enter("table");for(;++y<b.length;)_[y]=d(b[y],p,m);return v(),_}function d(f,p,m){const b=f.children;let y=-1;const _=[],v=p.enter("tableRow");for(;++y<b.length;)_[y]=l(b[y],f,p,m);return v(),_}function h(f,p,m){let b=Oh.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function Rw(){return{exit:{taskListCheckValueChecked:Iu,taskListCheckValueUnchecked:Iu,paragraph:Mw}}}function Lw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Dw}}}function Iu(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Mw(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,o;for(;++s<i.length;){const a=i[s];if(a.type==="paragraph"){o=a;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Dw(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);s&&a.move(o);let l=Oh.listItem(e,t,n,{...r,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function Pw(){return[XE(),y1(),_1(),Nw(),Rw()]}function Bw(e){return{extensions:[QE(),x1(e),v1(),Iw(e),Lw()]}}const Fw={tokenize:Hw,partial:!0},Ih={tokenize:Gw,partial:!0},Rh={tokenize:Kw,partial:!0},Lh={tokenize:Ww,partial:!0},qw={tokenize:Vw,partial:!0},Mh={name:"wwwAutolink",tokenize:zw,previous:Ph},Dh={name:"protocolAutolink",tokenize:jw,previous:Bh},wn={name:"emailAutolink",tokenize:$w,previous:Fh},un={};function Uw(){return{text:un}}let Hn=48;for(;Hn<123;)un[Hn]=wn,Hn++,Hn===58?Hn=65:Hn===91&&(Hn=97);un[43]=wn;un[45]=wn;un[46]=wn;un[95]=wn;un[72]=[wn,Dh];un[104]=[wn,Dh];un[87]=[wn,Mh];un[119]=[wn,Mh];function $w(e,t,n){const r=this;let i,s;return o;function o(d){return!el(d)||!Fh.call(r,r.previous)||Xl(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return el(d)?(e.consume(d),a):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(qw,u,c)(d):d===45||d===95||et(d)?(s=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return s&&i&&at(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function zw(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Ph.call(r,r.previous)||Xl(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Fw,e.attempt(Ih,e.attempt(Rh,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function jw(e,t,n){const r=this;let i="",s=!1;return o;function o(d){return(d===72||d===104)&&Bh.call(r,r.previous)&&!Xl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(at(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),s?c:(s=!0,l)):n(d)}function c(d){return d===null||Is(d)||Se(d)||Yn(d)||Ws(d)?n(d):e.attempt(Ih,e.attempt(Rh,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Hw(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),s):n(o)}function s(o){return o===null?n(o):t(o)}}function Gw(e,t,n){let r,i,s;return o;function o(c){return c===46||c===95?e.check(Lh,l,a)(c):c===null||Se(c)||Yn(c)||c!==45&&Ws(c)?l(c):(s=!0,e.consume(c),o)}function a(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function l(c){return i||r||!s?n(c):t(c)}}function Kw(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Lh,t,s)(o):o===null||Se(o)||Yn(o)?t(o):(e.consume(o),i)}function s(o){return o===41&&r++,e.consume(o),i}}function Ww(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),s):a===93?(e.consume(a),i):a===60||a===null||Se(a)||Yn(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||Se(a)||Yn(a)?t(a):r(a)}function s(a){return at(a)?o(a):n(a)}function o(a){return a===59?(e.consume(a),r):at(a)?(e.consume(a),o):n(a)}}function Vw(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return et(s)?n(s):t(s)}}function Ph(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Se(e)}function Bh(e){return!at(e)}function Fh(e){return!(e===47||el(e))}function el(e){return e===43||e===45||e===46||e===95||et(e)}function Xl(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Yw={tokenize:r_,partial:!0};function Zw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:e_,continuation:{tokenize:t_},exit:n_}},text:{91:{name:"gfmFootnoteCall",tokenize:Jw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xw,resolveTo:Qw}}}}function Xw(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return n(l);const c=Ht(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Qw(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Jw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(s>999||d===93&&!o||d===null||d===91||Se(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(Ht(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Se(d)||(o=!0),s++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function e_(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(p)}function u(p){if(o>999||p===93&&!a||p===null||p===91||Se(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return s=Ht(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Se(p)||(a=!0),o++,e.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(e.consume(p),o++,u):u(p)}function h(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(s)||i.push(s),xe(e,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return t(p)}}function t_(e,t,n){return e.check(Di,t,e.attempt(Yw,t,n))}function n_(e){e.exit("gfmFootnoteDefinition")}function r_(e,t,n){const r=this;return xe(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function i_(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,a){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},h=[["enter",u,a],["enter",o[c][1],a],["exit",o[c][1],a],["enter",d,a]],f=a.parser.constructs.insideSpan.null;f&&wt(h,h.length,0,Vs(f,o.slice(c+1,l),a)),wt(h,h.length,0,[["exit",d,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",u,a]]),wt(o,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function s(o,a,l){const c=this.previous,u=this.events;let d=0;return h;function h(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(o.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const m=Rr(c);if(p===126)return d>1?l(p):(o.consume(p),d++,f);if(d<2&&!n)return l(p);const b=o.exit("strikethroughSequenceTemporary"),y=Rr(p);return b._open=!y||y===2&&!!m,b._close=!m||m===2&&!!y,a(p)}}}class s_{constructor(){this.map=[]}add(t,n,r){o_(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function o_(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function a_(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function l_(){return{flow:{null:{name:"table",tokenize:c_,resolveAll:u_}}}}function c_(e,t,n){const r=this;let i=0,s=0,o;return a;function a(O){let H=r.events.length-1;for(;H>-1;){const X=r.events[H][1].type;if(X==="lineEnding"||X==="linePrefix")H--;else break}const P=H>-1?r.events[H][1].type:null,ne=P==="tableHead"||P==="tableRow"?N:l;return ne===N&&r.parser.lazy[r.now().line]?n(O):ne(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),c(O)}function c(O){return O===124||(o=!0,s+=1),u(O)}function u(O){return O===null?n(O):ae(O)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),f):n(O):be(O)?xe(e,u,"whitespace")(O):(s+=1,o&&(o=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(O)))}function d(O){return O===null||O===124||Se(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?h:d)}function h(O){return O===92||O===124?(e.consume(O),d):d(O)}function f(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),o=!1,be(O)?xe(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):p(O))}function p(O){return O===45||O===58?b(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),m):C(O)}function m(O){return be(O)?xe(e,b,"whitespace")(O):b(O)}function b(O){return O===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),y):O===45?(s+=1,y(O)):O===null||ae(O)?T(O):C(O)}function y(O){return O===45?(e.enter("tableDelimiterFiller"),_(O)):C(O)}function _(O){return O===45?(e.consume(O),_):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(O))}function v(O){return be(O)?xe(e,T,"whitespace")(O):T(O)}function T(O){return O===124?p(O):O===null||ae(O)?!o||i!==s?C(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):C(O)}function C(O){return n(O)}function N(O){return e.enter("tableRow"),B(O)}function B(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),B):O===null||ae(O)?(e.exit("tableRow"),t(O)):be(O)?xe(e,B,"whitespace")(O):(e.enter("data"),U(O))}function U(O){return O===null||O===124||Se(O)?(e.exit("data"),B(O)):(e.consume(O),O===92?G:U)}function G(O){return O===92||O===124?(e.consume(O),U):U(O)}}function u_(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,u,d;const h=new s_;for(;++n<e.length;){const f=e[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(Ru(h,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],o=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",u,t]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],d=ls(h,t,s,i,void 0,d),s=[0,0,0,0]),o[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],d=ls(h,t,s,i,void 0,d)),s=o,o=[s[1],n,0,0])):p.type==="tableHead"?(a=!0,l=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=n,s[1]!==0?(o[0]=o[1],d=ls(h,t,s,i,n,d)):o[1]!==0&&(d=ls(h,t,o,i,n,d)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&Ru(h,t,l,c,u),h.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=a_(t.events,n))}return e}function ls(e,t,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(s.end=Object.assign({},yr(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=yr(t.events,n[1]);if(s={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=yr(t.events,n[2]),u=yr(t.events,n[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],f=t.events[n[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,m=n[3]-n[2]-1;e.add(p,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},yr(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Ru(e,t,n,r,i){const s=[],o=yr(t.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,t])),r.end=Object.assign({},o),s.push(["exit",r,t]),e.add(n+1,0,s)}function yr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const d_={name:"tasklistCheck",tokenize:h_};function f_(){return{text:{91:d_}}}function h_(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return Se(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(l)}function a(l){return ae(l)?t(l):be(l)?e.check({tokenize:p_},t,n)(l):n(l)}}function p_(e,t,n){return xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function g_(e){return qf([Uw(),Zw(),i_(e),l_(),f_()])}const m_={};function qh(e){const t=this,n=e||m_,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(g_(n)),s.push(Pw()),o.push(Bw(n))}const Uh=function(e){if(e==null)return E_;if(typeof e=="function")return to(e);if(typeof e=="object")return Array.isArray(e)?b_(e):y_(e);if(typeof e=="string")return x_(e);throw new Error("Expected function, string, or object as test")};function b_(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Uh(e[n]);return to(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function y_(e){const t=e;return to(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function x_(e){return to(t);function t(n){return n&&n.type===e}}function to(e){return t;function t(n,r,i){return!!(w_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function E_(){return!0}function w_(e){return e!==null&&typeof e=="object"&&"type"in e}const Lu=function(e,t,n){const r=Uh(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},tr=function(e){if(e==null)return k_;if(typeof e=="string")return v_(e);if(typeof e=="object")return __(e);if(typeof e=="function")return Ql(e);throw new Error("Expected function, string, or array as `test`")};function __(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=tr(e[n]);return Ql(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function v_(e){return Ql(t);function t(n){return n.tagName===e}}function Ql(e){return t;function t(n,r,i){return!!(N_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function k_(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function N_(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Mu=/\n/g,Du=/[\t ]+/g,tl=tr("br"),Pu=tr(L_),A_=tr("p"),Bu=tr("tr"),S_=tr(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",R_,M_]),$h=tr(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function T_(e,t){const n=t||{},r="children"in e?e.children:[],i=$h(e),s=Hh(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...jh(e,{breakBefore:!0,breakAfter:!0}));let a=-1;for(;++a<r.length;)o.push(...zh(r[a],e,{whitespace:s,breakBefore:a?void 0:i,breakAfter:a<r.length-1?tl(r[a+1]):i}));const l=[];let c;for(a=-1;++a<o.length;){const u=o[a];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
30
- `.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function zh(e,t,n){return e.type==="element"?C_(e,t,n):e.type==="text"?n.whitespace==="normal"?jh(e,n):O_(e):[]}function C_(e,t,n){const r=Hh(e,n),i=e.children||[];let s=-1,o=[];if(S_(e))return o;let a,l;for(tl(e)||Bu(e)&&Lu(t,e,Bu)?l=`
31
- `:A_(e)?(a=2,l=2):$h(e)&&(a=1,l=1);++s<i.length;)o=o.concat(zh(i[s],e,{whitespace:r,breakBefore:s?void 0:a,breakAfter:s<i.length-1?tl(i[s+1]):l}));return Pu(e)&&Lu(t,e,Pu)&&o.push(" "),a&&o.unshift(a),l&&o.push(l),o}function jh(e,t){const n=String(e.value),r=[],i=[];let s=0;for(;s<=n.length;){Mu.lastIndex=s;const l=Mu.exec(n),c=l&&"index"in l?l.index:n.length;r.push(I_(n.slice(s,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,c===n.length?t.breakAfter:!0)),s=c+1}let o=-1,a;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),a=void 0):r[o]?(typeof a=="number"&&i.push(a),i.push(r[o]),a=0):(o===0||o===r.length-1)&&i.push(0);return i}function O_(e){return[String(e.value)]}function I_(e,t,n){const r=[];let i=0,s;for(;i<e.length;){Du.lastIndex=i;const o=Du.exec(e);s=o?o.index:e.length,!i&&!s&&o&&!t&&r.push(""),i!==s&&r.push(e.slice(i,s)),i=o?s+o[0].length:s}return i!==s&&!n&&r.push(""),r.join(" ")}function Hh(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function R_(e){return!!(e.properties||{}).hidden}function L_(e){return e.tagName==="td"||e.tagName==="th"}function M_(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function D_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],T={type:m,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},C={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[C,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],B={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:N.concat([{begin:/\(/,end:/\)/,keywords:T,contains:N.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:T,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:T,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(B,U,C,N,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:T,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:T},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function P_(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=D_(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function B_(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(a);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],f=e.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],y={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],v=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],T=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],C=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[..._,...v,"set","shopt",...T,...C]},contains:[f,e.SHEBANG(),p,d,s,o,y,a,l,c,u,n]}}function F_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:y.concat([{begin:/\(/,end:/\)/,keywords:b,contains:y.concat(["self"]),relevance:0}]),relevance:0},v={begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:f,returnBegin:!0,contains:[e.inherit(h,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"</",contains:[].concat(_,v,y,[d,{begin:e.IDENT_RE+"::",keywords:b},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:c,keywords:b}}}function q_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],T={type:m,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},C={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[C,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],B={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:N.concat([{begin:/\(/,end:/\)/,keywords:T,contains:N.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:T,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:T,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(B,U,C,N,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:T,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:T},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function U_(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:i.concat(s),built_in:t,literal:r},a=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},u={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(u,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:o},f=e.inherit(h,{illegal:/\n/}),p={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});h.contains=[m,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],f.contains=[b,p,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[c,m,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},_={begin:"<",end:">",contains:[{beginKeywords:"in out"},a]},v=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",T={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},a,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+v+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,_],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[y,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},T]}}const $_=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),z_=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],j_=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],H_=[...z_,...j_],G_=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),K_=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),W_=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),V_=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Y_(e){const t=e.regex,n=$_(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+K_.join("|")+")"},{begin:":(:)?("+W_.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+V_.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:G_.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+H_.join("|")+")\\b"}]}}function Z_(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function X_(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}function Q_(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function J_(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},o={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[r,s,i,o,n,"self"],relevance:0},l=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,u=/'[^']*'/,d=t.either(l,c,u),h=t.concat(d,"(\\s*\\.\\s*",d,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:h,className:"attr",starts:{end:/$/,contains:[r,a,s,i,o,n]}}]}}var xr="[0-9](_*[0-9])*",cs=`\\.(${xr})`,us="[0-9a-fA-F](_*[0-9a-fA-F])*",Fu={className:"number",variants:[{begin:`(\\b(${xr})((${cs})|\\.)?|(${cs}))[eE][+-]?(${xr})[fFdD]?\\b`},{begin:`\\b(${xr})((${cs})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${cs})[fFdD]?\\b`},{begin:`\\b(${xr})[fFdD]\\b`},{begin:`\\b0[xX]((${us})\\.?|(${us})?\\.(${us}))[pP][+-]?(${xr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${us})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Gh(e,t,n){return n===-1?"":e.replace(t,r=>Gh(e,t,n-1))}function ev(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Gh("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},u={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Fu,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Fu,c]}}const qu="[A-Za-z$_][0-9A-Za-z$_]*",tv=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],nv=["true","false","null","undefined","NaN","Infinity"],Kh=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Wh=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Vh=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],rv=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],iv=[].concat(Vh,Kh,Wh);function sv(e){const t=e.regex,n=(F,{after:K})=>{const w="</"+F[0].slice(1);return F.input.indexOf(w,K)!==-1},r=qu,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(F,K)=>{const w=F[0].length+F.index,Q=F.input[w];if(Q==="<"||Q===","){K.ignoreMatch();return}Q===">"&&(n(F,{after:w})||K.ignoreMatch());let le;const k=F.input.substring(w);if(le=k.match(/^\s*=/)){K.ignoreMatch();return}if((le=k.match(/^\s+extends\s+/))&&le.index===0){K.ignoreMatch();return}}},a={$pattern:qu,keyword:tv,literal:nv,built_in:iv,"variable.language":rv},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},_={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,{match:/\$\d+/},d];h.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});const T=[].concat(_,h.contains),C=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(T)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C},B={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Kh,...Wh]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function P(F){return t.concat("(?!",F.join("|"),")")}const ne={match:t.concat(/\b/,P([...Vh,"super","import"].map(F=>`${F}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},X={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",$={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,_,{match:/\$\d+/},d,U,{scope:"attr",match:r+t.lookahead(":"),relevance:0},$,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:L,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},X,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},ne,H,B,Y,{match:/\$[(.]/}]}}function ov(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Er="[0-9](_*[0-9])*",ds=`\\.(${Er})`,fs="[0-9a-fA-F](_*[0-9a-fA-F])*",av={className:"number",variants:[{begin:`(\\b(${Er})((${ds})|\\.)?|(${ds}))[eE][+-]?(${Er})[fFdD]?\\b`},{begin:`\\b(${Er})((${ds})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ds})[fFdD]?\\b`},{begin:`\\b(${Er})[fFdD]\\b`},{begin:`\\b0[xX]((${fs})\\.?|(${fs})?\\.(${fs}))[pP][+-]?(${Er})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${fs})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function lv(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(o);const a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},c=av,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},h=d;return h.variants[1].contains=[d],d.variants[1].contains=[h],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,u,n,r,a,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,a,l,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,l]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
32
- `},c]}}const cv=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),uv=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],dv=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],fv=[...uv,...dv],hv=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Yh=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Zh=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),pv=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),gv=Yh.concat(Zh).sort().reverse();function mv(e){const t=cv(e),n=gv,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",o=[],a=[],l=function(v){return{className:"string",begin:"~?"+v+".*?"+v}},c=function(v,T,C){return{className:v,begin:T,relevance:C}},u={$pattern:/[a-z-]+/,keyword:r,attribute:hv.join(" ")},d={begin:"\\(",end:"\\)",contains:a,keywords:u,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const h=a.concat({begin:/\{/,end:/\}/,contains:o}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},p={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+pv.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:a,relevance:0}},b={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:h}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+fv.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",s,0),c("selector-id","#"+s),c("selector-class","\\."+s,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Yh.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Zh.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:h},{begin:"!important"},t.FUNCTION_DISPATCH]},_={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,_,p,y,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function bv(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function yv(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,i,s,o]}}function xv(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(c,{contains:[]}),h=e.inherit(u,{contains:[]});c.contains.push(h),u.contains.push(d);let f=[n,l];return[c,u,d,h].forEach(y=>{y.contains=y.contains.concat(f)}),f=f.concat(c,u),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:f},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:f}]}]},n,s,c,u,{className:"quote",begin:"^>\\s+",contains:f,end:"$"},i,r,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Ev(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,a={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:a,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function wv(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},a={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[a]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,s,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],h=(m,b,y="\\1")=>{const _=y==="\\1"?y:t.concat(y,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,_,/(?:\\.|[^\\\/])*?/,y,r)},f=(m,b,y)=>t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,y,r),p=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:u,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:h("s|tr|y",t.either(...d,{capture:!0}))},{begin:h("s|tr|y","\\(","\\)")},{begin:h("s|tr|y","\\[","\\]")},{begin:h("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:f("(?:m|qr)?",/\//,/\//)},{begin:f("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:f("m|qr",/\(/,/\)/)},{begin:f("m|qr",/\[/,/\]/)},{begin:f("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:p}}function _v(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),o={scope:"variable",match:"\\$+"+r},a={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(X,Y)=>{Y.data._beginMatch=X[1]||X[2]},"on:end":(X,Y)=>{Y.data._beginMatch!==X[1]&&Y.ignoreMatch()}},h=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[
33
- ]`,p={scope:"string",variants:[u,c,d,h]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],_=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],T={keyword:y,literal:(X=>{const Y=[];return X.forEach(L=>{Y.push(L),L.toLowerCase()===L?Y.push(L.toUpperCase()):Y.push(L.toLowerCase())}),Y})(b),built_in:_},C=X=>X.map(Y=>Y.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",C(_).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},B=t.concat(r,"\\b(?!\\()"),U={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),B],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),B],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},G={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},O={relevance:0,begin:/\(/,end:/\)/,keywords:T,contains:[G,o,U,e.C_BLOCK_COMMENT_MODE,p,m,N]},H={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",C(y).join("\\b|"),"|",C(_).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[O]};O.contains.push(H);const P=[G,U,e.C_BLOCK_COMMENT_MODE,p,m,N],ne={begin:t.concat(/#\[\s*\\?/,t.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...P]},...P,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:T,contains:[ne,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},a,{scope:"variable.language",match:/\$this\b/},o,H,U,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:T,contains:["self",ne,o,U,e.C_BLOCK_COMMENT_MODE,p,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},p,m]}}function vv(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function kv(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Nv(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},u={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,u,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h="[0-9](_?[0-9])*",f=`(\\b(${h}))?\\.(${h})|\\b(${h})\\.`,p=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${h})|(${f}))[eE][+-]?(${h})[jJ]?(?=${p})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${h})[jJ](?=${p})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,m,d,e.HASH_COMMENT_MODE]}]};return c.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,y,d]}]}}function Av(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Sv(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Tv(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],u={className:"subst",begin:/#\{/,end:/\}/,keywords:o},d={className:"string",contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},h="[1-9](_?[0-9])*|0",f="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:`\\b(${h})(\\.(${f}))?([eE][+-]?(${f})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},N=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:o},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);u.contains=N,m.contains=N;const O=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:N}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(O).concat(c).concat(N)}}function Cv(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",a=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],u=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:u,keyword:a,literal:l,built_in:c},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+o},{begin:"\\b0o([0-7_]+)"+o},{begin:"\\b0x([A-Fa-f0-9_]+)"+o},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:c,type:u}},{className:"punctuation",begin:"->"},s]}}const Ov=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Iv=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Rv=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Lv=[...Iv,...Rv],Mv=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Dv=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Pv=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Bv=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Fv(e){const t=Ov(e),n=Pv,r=Dv,i="@[a-z-]+",s="and or not only",a={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+Lv.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Bv.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:Mv.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function qv(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Uv(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],u=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],f=u,p=[...c,...l].filter(C=>!u.includes(C)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:t.concat(/\b/,t.either(...f),/\s*\(/),relevance:0,keywords:{built_in:f}};function _(C){return t.concat(/\b/,t.either(...C.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const v={scope:"keyword",match:_(h),relevance:0};function T(C,{exceptions:N,when:B}={}){const U=B;return N=N||[],C.map(G=>G.match(/\|\d+$/)||N.includes(G)?G:U(G)?`${G}|0`:G)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:T(p,{when:C=>C.length<3}),literal:s,type:a,built_in:d},contains:[{scope:"type",match:_(o)},v,y,m,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function Xh(e){return e?typeof e=="string"?e:e.source:null}function ai(e){return ke("(?=",e,")")}function ke(...e){return e.map(n=>Xh(n)).join("")}function $v(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function ot(...e){return"("+($v(e).capture?"":"?:")+e.map(r=>Xh(r)).join("|")+")"}const Jl=e=>ke(/\b/,e,/\w$/.test(e)?/\b/:/\B/),zv=["Protocol","Type"].map(Jl),Uu=["init","self"].map(Jl),jv=["Any","Self"],wa=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],$u=["false","nil","true"],Hv=["assignment","associativity","higherThan","left","lowerThan","none","right"],Gv=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],zu=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Qh=ot(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Jh=ot(Qh,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),_a=ke(Qh,Jh,"*"),ep=ot(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Ds=ot(ep,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),nn=ke(ep,Ds,"*"),hs=ke(/[A-Z]/,Ds,"*"),Kv=["attached","autoclosure",ke(/convention\(/,ot("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",ke(/objc\(/,nn,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Wv=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Vv(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,ot(...zv,...Uu)],className:{2:"keyword"}},s={match:ke(/\./,ot(...wa)),relevance:0},o=wa.filter(me=>typeof me=="string").concat(["_|0"]),a=wa.filter(me=>typeof me!="string").concat(jv).map(Jl),l={variants:[{className:"keyword",match:ot(...a,...Uu)}]},c={$pattern:ot(/\b\w+/,/#\w+/),keyword:o.concat(Gv),literal:$u},u=[i,s,l],d={match:ke(/\./,ot(...zu)),relevance:0},h={className:"built_in",match:ke(/\b/,ot(...zu),/(?=\()/)},f=[d,h],p={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:_a},{match:`\\.(\\.|${Jh})+`}]},b=[p,m],y="([0-9]_*)+",_="([0-9a-fA-F]_*)+",v={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${_})(\\.(${_}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},T=(me="")=>({className:"subst",variants:[{match:ke(/\\/,me,/[0\\tnr"']/)},{match:ke(/\\/,me,/u\{[0-9a-fA-F]{1,8}\}/)}]}),C=(me="")=>({className:"subst",match:ke(/\\/,me,/[\t ]*(?:[\r\n]|\r\n)/)}),N=(me="")=>({className:"subst",label:"interpol",begin:ke(/\\/,me,/\(/),end:/\)/}),B=(me="")=>({begin:ke(me,/"""/),end:ke(/"""/,me),contains:[T(me),C(me),N(me)]}),U=(me="")=>({begin:ke(me,/"/),end:ke(/"/,me),contains:[T(me),N(me)]}),G={className:"string",variants:[B(),B("#"),B("##"),B("###"),U(),U("#"),U("##"),U("###")]},O=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],H={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:O},P=me=>{const We=ke(me,/\//),oe=ke(/\//,me);return{begin:We,end:oe,contains:[...O,{scope:"comment",begin:`#(?!.*${oe})`,end:/$/}]}},ne={scope:"regexp",variants:[P("###"),P("##"),P("#"),H]},X={match:ke(/`/,nn,/`/)},Y={className:"variable",match:/\$\d+/},L={className:"variable",match:`\\$${Ds}+`},$=[X,Y,L],F={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Wv,contains:[...b,v,G]}]}},K={scope:"keyword",match:ke(/@/,ot(...Kv),ai(ot(/\(/,/\s+/)))},w={scope:"meta",match:ke(/@/,nn)},Q=[F,K,w],le={match:ai(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:ke(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ds,"+")},{className:"type",match:hs,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:ke(/\s+&\s+/,ai(hs)),relevance:0}]},k={begin:/</,end:/>/,keywords:c,contains:[...r,...u,...Q,p,le]};le.contains.push(k);const ge={match:ke(nn,/\s*:/),keywords:"_|0",relevance:0},se={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",ge,...r,ne,...u,...f,...b,v,G,...$,...Q,le]},_e={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,le]},te={begin:ot(ai(ke(nn,/\s*:/)),ai(ke(nn,/\s+/,nn,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:nn}]},ce={begin:/\(/,end:/\)/,keywords:c,contains:[te,...r,...u,...b,v,G,...Q,le,se],endsParent:!0,illegal:/["']/},Ne={match:[/(func|macro)/,/\s+/,ot(X.match,nn,_a)],className:{1:"keyword",3:"title.function"},contains:[_e,ce,t],illegal:[/\[/,/%/]},qe={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[_e,ce,t],illegal:/\[|%/},Ue={match:[/operator/,/\s+/,_a],className:{1:"keyword",3:"title"}},Lt={begin:[/precedencegroup/,/\s+/,hs],className:{1:"keyword",3:"title"},contains:[le],keywords:[...Hv,...$u],end:/}/},bt={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},vt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Me={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,nn,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[_e,...u,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:hs},...u],relevance:0}]};for(const me of G.variants){const We=me.contains.find(Mt=>Mt.label==="interpol");We.keywords=c;const oe=[...u,...f,...b,v,G,...$];We.contains=[...oe,{begin:/\(/,end:/\)/,contains:["self",...oe]}]}return{name:"Swift",keywords:c,contains:[...r,Ne,qe,bt,vt,Me,Ue,Lt,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},ne,...u,...f,...b,v,G,...$,...Q,le,se]}}const Ps="[A-Za-z$_][0-9A-Za-z$_]*",tp=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],np=["true","false","null","undefined","NaN","Infinity"],rp=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ip=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],sp=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],op=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ap=[].concat(sp,rp,ip);function Yv(e){const t=e.regex,n=(F,{after:K})=>{const w="</"+F[0].slice(1);return F.input.indexOf(w,K)!==-1},r=Ps,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(F,K)=>{const w=F[0].length+F.index,Q=F.input[w];if(Q==="<"||Q===","){K.ignoreMatch();return}Q===">"&&(n(F,{after:w})||K.ignoreMatch());let le;const k=F.input.substring(w);if(le=k.match(/^\s*=/)){K.ignoreMatch();return}if((le=k.match(/^\s+extends\s+/))&&le.index===0){K.ignoreMatch();return}}},a={$pattern:Ps,keyword:tp,literal:np,built_in:ap,"variable.language":op},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},_={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,{match:/\$\d+/},d];h.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});const T=[].concat(_,h.contains),C=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(T)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C},B={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...rp,...ip]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},H={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function P(F){return t.concat("(?!",F.join("|"),")")}const ne={match:t.concat(/\b/,P([...sp,"super","import"].map(F=>`${F}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},X={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",$={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,_,{match:/\$\d+/},d,U,{scope:"attr",match:r+t.lookahead(":"),relevance:0},$,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:L,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},X,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},ne,H,B,Y,{match:/\$[(.]/}]}}function Zv(e){const t=e.regex,n=Yv(e),r=Ps,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:Ps,keyword:tp.concat(l),literal:np,built_in:ap.concat(i),"variable.language":op},u={className:"meta",begin:"@"+r},d=(m,b,y)=>{const _=m.contains.findIndex(v=>v.label===b);if(_===-1)throw new Error("can not find mode to replace");m.contains.splice(_,1,y)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(u);const h=n.contains.find(m=>m.scope==="attr"),f=Object.assign({},h,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,h,f]),n.contains=n.contains.concat([u,s,o,f]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",a);const p=n.contains.find(m=>m.label==="func.def");return p.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Xv(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,a=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,i),/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(s,i),/ +/,t.either(o,a),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),h=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,c,u,d,h,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[h]}]}}function Qv(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},a={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,o,i,e.QUOTE_STRING_MODE,l,c,a]}}function Jv(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(s,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,l,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,o,l,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function ek(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},a=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),h={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},p={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},h,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},p,m,s,o],y=[...b];return y.pop(),y.push(a),f.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}const tk={arduino:P_,bash:B_,c:F_,cpp:q_,csharp:U_,css:Y_,diff:Z_,go:X_,graphql:Q_,ini:J_,java:ev,javascript:sv,json:ov,kotlin:lv,less:mv,lua:bv,makefile:yv,markdown:xv,objectivec:Ev,perl:wv,php:_v,"php-template":vv,plaintext:kv,python:Nv,"python-repl":Av,r:Sv,ruby:Tv,rust:Cv,scss:Fv,shell:qv,sql:Uv,swift:Vv,typescript:Zv,vbnet:Xv,wasm:Qv,xml:Jv,yaml:ek};function lp(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&lp(n)}),e}class ju{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function cp(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function In(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const nk="</span>",Hu=e=>!!e.scope,rk=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class ik{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=cp(t)}openNode(t){if(!Hu(t))return;const n=rk(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){Hu(t)&&(this.buffer+=nk)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const Gu=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class ec{constructor(){this.rootNode=Gu(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=Gu({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{ec._collapse(n)}))}}class sk extends ec{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new ik(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function vi(e){return e?typeof e=="string"?e:e.source:null}function up(e){return nr("(?=",e,")")}function ok(e){return nr("(?:",e,")*")}function ak(e){return nr("(?:",e,")?")}function nr(...e){return e.map(n=>vi(n)).join("")}function lk(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function tc(...e){return"("+(lk(e).capture?"":"?:")+e.map(r=>vi(r)).join("|")+")"}function dp(e){return new RegExp(e.toString()+"|").exec("").length-1}function ck(e,t){const n=e&&e.exec(t);return n&&n.index===0}const uk=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function nc(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let s=vi(r),o="";for(;s.length>0;){const a=uk.exec(s);if(!a){o+=s;break}o+=s.substring(0,a.index),s=s.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+i):(o+=a[0],a[0]==="("&&n++)}return o}).map(r=>`(${r})`).join(t)}const dk=/\b\B/,fp="[a-zA-Z]\\w*",rc="[a-zA-Z_]\\w*",hp="\\b\\d+(\\.\\d+)?",pp="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",gp="\\b(0b[01]+)",fk="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",hk=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=nr(t,/.*\b/,e.binary,/\b.*/)),In({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},ki={begin:"\\\\[\\s\\S]",relevance:0},pk={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ki]},gk={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ki]},mk={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},no=function(e,t,n={}){const r=In({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=tc("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:nr(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},bk=no("//","$"),yk=no("/\\*","\\*/"),xk=no("#","$"),Ek={scope:"number",begin:hp,relevance:0},wk={scope:"number",begin:pp,relevance:0},_k={scope:"number",begin:gp,relevance:0},vk={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ki,{begin:/\[/,end:/\]/,relevance:0,contains:[ki]}]},kk={scope:"title",begin:fp,relevance:0},Nk={scope:"title",begin:rc,relevance:0},Ak={begin:"\\.\\s*"+rc,relevance:0},Sk=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var ps=Object.freeze({__proto__:null,APOS_STRING_MODE:pk,BACKSLASH_ESCAPE:ki,BINARY_NUMBER_MODE:_k,BINARY_NUMBER_RE:gp,COMMENT:no,C_BLOCK_COMMENT_MODE:yk,C_LINE_COMMENT_MODE:bk,C_NUMBER_MODE:wk,C_NUMBER_RE:pp,END_SAME_AS_BEGIN:Sk,HASH_COMMENT_MODE:xk,IDENT_RE:fp,MATCH_NOTHING_RE:dk,METHOD_GUARD:Ak,NUMBER_MODE:Ek,NUMBER_RE:hp,PHRASAL_WORDS_MODE:mk,QUOTE_STRING_MODE:gk,REGEXP_MODE:vk,RE_STARTERS_RE:fk,SHEBANG:hk,TITLE_MODE:kk,UNDERSCORE_IDENT_RE:rc,UNDERSCORE_TITLE_MODE:Nk});function Tk(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Ck(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Ok(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Tk,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Ik(e,t){Array.isArray(e.illegal)&&(e.illegal=tc(...e.illegal))}function Rk(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Lk(e,t){e.relevance===void 0&&(e.relevance=1)}const Mk=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=nr(n.beforeMatch,up(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Dk=["of","and","for","in","not","or","if","then","parent","list","value"],Pk="keyword";function mp(e,t,n=Pk){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(s){Object.assign(r,mp(e[s],t,s))}),r;function i(s,o){t&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");r[l[0]]=[s,Bk(l[0],l[1])]})}}function Bk(e,t){return t?Number(t):Fk(e)?0:1}function Fk(e){return Dk.includes(e.toLowerCase())}const Ku={},Wn=e=>{console.error(e)},Wu=(e,...t)=>{console.log(`WARN: ${e}`,...t)},br=(e,t)=>{Ku[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ku[`${e}/${t}`]=!0)},Bs=new Error;function bp(e,t,{key:n}){let r=0;const i=e[n],s={},o={};for(let a=1;a<=t.length;a++)o[a+r]=i[a],s[a+r]=!0,r+=dp(t[a-1]);e[n]=o,e[n]._emit=s,e[n]._multi=!0}function qk(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Wn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Bs;if(typeof e.beginScope!="object"||e.beginScope===null)throw Wn("beginScope must be object"),Bs;bp(e,e.begin,{key:"beginScope"}),e.begin=nc(e.begin,{joinWith:""})}}function Uk(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Wn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Bs;if(typeof e.endScope!="object"||e.endScope===null)throw Wn("endScope must be object"),Bs;bp(e,e.end,{key:"endScope"}),e.end=nc(e.end,{joinWith:""})}}function $k(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function zk(e){$k(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),qk(e),Uk(e)}function jk(e){function t(o,a){return new RegExp(vi(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=dp(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(nc(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const c=l.findIndex((d,h)=>h>0&&d!==void 0),u=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new n;return this.rules.slice(a).forEach(([c,u])=>l.addRule(c,u)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(a);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,c=u.exec(a)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(o){const a=new r;return o.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function s(o,a){const l=o;if(o.isCompiled)return l;[Ck,Rk,zk,Mk].forEach(u=>u(o,a)),e.compilerExtensions.forEach(u=>u(o,a)),o.__beforeBegin=null,[Ok,Ik,Lk].forEach(u=>u(o,a)),o.isCompiled=!0;let c=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),c=o.keywords.$pattern,delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=mp(o.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),a&&(o.begin||(o.begin=/\B|\b/),l.beginRe=t(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=t(l.end)),l.terminatorEnd=vi(l.end)||"",o.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(l.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(u){return Hk(u==="self"?o:u)})),o.contains.forEach(function(u){s(u,l)}),o.starts&&s(o.starts,a),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=In(e.classNameAliases||{}),s(e)}function yp(e){return e?e.endsWithParent||yp(e.starts):!1}function Hk(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return In(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:yp(e)?In(e,{starts:e.starts?In(e.starts):null}):Object.isFrozen(e)?In(e):e}var Gk="11.11.1";class Kk extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const va=cp,Vu=In,Yu=Symbol("nomatch"),Wk=7,xp=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:sk};function l(L){return a.noHighlightRe.test(L)}function c(L){let $=L.className+" ";$+=L.parentNode?L.parentNode.className:"";const F=a.languageDetectRe.exec($);if(F){const K=U(F[1]);return K||(Wu(s.replace("{}",F[1])),Wu("Falling back to no-highlight mode for this block.",L)),K?F[1]:"no-highlight"}return $.split(/\s+/).find(K=>l(K)||U(K))}function u(L,$,F){let K="",w="";typeof $=="object"?(K=L,F=$.ignoreIllegals,w=$.language):(br("10.7.0","highlight(lang, code, ...args) has been deprecated."),br("10.7.0",`Please use highlight(code, options) instead.
34
- https://github.com/highlightjs/highlight.js/issues/2277`),w=L,K=$),F===void 0&&(F=!0);const Q={code:K,language:w};X("before:highlight",Q);const le=Q.result?Q.result:d(Q.language,Q.code,F);return le.code=Q.code,X("after:highlight",le),le}function d(L,$,F,K){const w=Object.create(null);function Q(S,I){return S.keywords[I]}function le(){if(!oe.keywords){Ae.addText(ye);return}let S=0;oe.keywordPatternRe.lastIndex=0;let I=oe.keywordPatternRe.exec(ye),j="";for(;I;){j+=ye.substring(S,I.index);const W=Me.case_insensitive?I[0].toLowerCase():I[0],re=Q(oe,W);if(re){const[Te,ut]=re;if(Ae.addText(j),j="",w[W]=(w[W]||0)+1,w[W]<=Wk&&(Dt+=ut),Te.startsWith("_"))j+=I[0];else{const rt=Me.classNameAliases[Te]||Te;se(I[0],rt)}}else j+=I[0];S=oe.keywordPatternRe.lastIndex,I=oe.keywordPatternRe.exec(ye)}j+=ye.substring(S),Ae.addText(j)}function k(){if(ye==="")return;let S=null;if(typeof oe.subLanguage=="string"){if(!t[oe.subLanguage]){Ae.addText(ye);return}S=d(oe.subLanguage,ye,!0,Mt[oe.subLanguage]),Mt[oe.subLanguage]=S._top}else S=f(ye,oe.subLanguage.length?oe.subLanguage:null);oe.relevance>0&&(Dt+=S.relevance),Ae.__addSublanguage(S._emitter,S.language)}function ge(){oe.subLanguage!=null?k():le(),ye=""}function se(S,I){S!==""&&(Ae.startScope(I),Ae.addText(S),Ae.endScope())}function _e(S,I){let j=1;const W=I.length-1;for(;j<=W;){if(!S._emit[j]){j++;continue}const re=Me.classNameAliases[S[j]]||S[j],Te=I[j];re?se(Te,re):(ye=Te,le(),ye=""),j++}}function te(S,I){return S.scope&&typeof S.scope=="string"&&Ae.openNode(Me.classNameAliases[S.scope]||S.scope),S.beginScope&&(S.beginScope._wrap?(se(ye,Me.classNameAliases[S.beginScope._wrap]||S.beginScope._wrap),ye=""):S.beginScope._multi&&(_e(S.beginScope,I),ye="")),oe=Object.create(S,{parent:{value:oe}}),oe}function ce(S,I,j){let W=ck(S.endRe,j);if(W){if(S["on:end"]){const re=new ju(S);S["on:end"](I,re),re.isMatchIgnored&&(W=!1)}if(W){for(;S.endsParent&&S.parent;)S=S.parent;return S}}if(S.endsWithParent)return ce(S.parent,I,j)}function Ne(S){return oe.matcher.regexIndex===0?(ye+=S[0],1):(kt=!0,0)}function qe(S){const I=S[0],j=S.rule,W=new ju(j),re=[j.__beforeBegin,j["on:begin"]];for(const Te of re)if(Te&&(Te(S,W),W.isMatchIgnored))return Ne(I);return j.skip?ye+=I:(j.excludeBegin&&(ye+=I),ge(),!j.returnBegin&&!j.excludeBegin&&(ye=I)),te(j,S),j.returnBegin?0:I.length}function Ue(S){const I=S[0],j=$.substring(S.index),W=ce(oe,S,j);if(!W)return Yu;const re=oe;oe.endScope&&oe.endScope._wrap?(ge(),se(I,oe.endScope._wrap)):oe.endScope&&oe.endScope._multi?(ge(),_e(oe.endScope,S)):re.skip?ye+=I:(re.returnEnd||re.excludeEnd||(ye+=I),ge(),re.excludeEnd&&(ye=I));do oe.scope&&Ae.closeNode(),!oe.skip&&!oe.subLanguage&&(Dt+=oe.relevance),oe=oe.parent;while(oe!==W.parent);return W.starts&&te(W.starts,S),re.returnEnd?0:I.length}function Lt(){const S=[];for(let I=oe;I!==Me;I=I.parent)I.scope&&S.unshift(I.scope);S.forEach(I=>Ae.openNode(I))}let bt={};function vt(S,I){const j=I&&I[0];if(ye+=S,j==null)return ge(),0;if(bt.type==="begin"&&I.type==="end"&&bt.index===I.index&&j===""){if(ye+=$.slice(I.index,I.index+1),!i){const W=new Error(`0 width match regex (${L})`);throw W.languageName=L,W.badRule=bt.rule,W}return 1}if(bt=I,I.type==="begin")return qe(I);if(I.type==="illegal"&&!F){const W=new Error('Illegal lexeme "'+j+'" for mode "'+(oe.scope||"<unnamed>")+'"');throw W.mode=oe,W}else if(I.type==="end"){const W=Ue(I);if(W!==Yu)return W}if(I.type==="illegal"&&j==="")return ye+=`
35
- `,1;if(Ve>1e5&&Ve>I.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ye+=j,j.length}const Me=U(L);if(!Me)throw Wn(s.replace("{}",L)),new Error('Unknown language: "'+L+'"');const me=jk(Me);let We="",oe=K||me;const Mt={},Ae=new a.__emitter(a);Lt();let ye="",Dt=0,ct=0,Ve=0,kt=!1;try{if(Me.__emitTokens)Me.__emitTokens($,Ae);else{for(oe.matcher.considerAll();;){Ve++,kt?kt=!1:oe.matcher.considerAll(),oe.matcher.lastIndex=ct;const S=oe.matcher.exec($);if(!S)break;const I=$.substring(ct,S.index),j=vt(I,S);ct=S.index+j}vt($.substring(ct))}return Ae.finalize(),We=Ae.toHTML(),{language:L,value:We,relevance:Dt,illegal:!1,_emitter:Ae,_top:oe}}catch(S){if(S.message&&S.message.includes("Illegal"))return{language:L,value:va($),illegal:!0,relevance:0,_illegalBy:{message:S.message,index:ct,context:$.slice(ct-100,ct+100),mode:S.mode,resultSoFar:We},_emitter:Ae};if(i)return{language:L,value:va($),illegal:!1,relevance:0,errorRaised:S,_emitter:Ae,_top:oe};throw S}}function h(L){const $={value:va(L),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return $._emitter.addText(L),$}function f(L,$){$=$||a.languages||Object.keys(t);const F=h(L),K=$.filter(U).filter(O).map(ge=>d(ge,L,!1));K.unshift(F);const w=K.sort((ge,se)=>{if(ge.relevance!==se.relevance)return se.relevance-ge.relevance;if(ge.language&&se.language){if(U(ge.language).supersetOf===se.language)return 1;if(U(se.language).supersetOf===ge.language)return-1}return 0}),[Q,le]=w,k=Q;return k.secondBest=le,k}function p(L,$,F){const K=$&&n[$]||F;L.classList.add("hljs"),L.classList.add(`language-${K}`)}function m(L){let $=null;const F=c(L);if(l(F))return;if(X("before:highlightElement",{el:L,language:F}),L.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",L);return}if(L.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(L)),a.throwUnescapedHTML))throw new Kk("One of your code blocks includes unescaped HTML.",L.innerHTML);$=L;const K=$.textContent,w=F?u(K,{language:F,ignoreIllegals:!0}):f(K);L.innerHTML=w.value,L.dataset.highlighted="yes",p(L,F,w.language),L.result={language:w.language,re:w.relevance,relevance:w.relevance},w.secondBest&&(L.secondBest={language:w.secondBest.language,relevance:w.secondBest.relevance}),X("after:highlightElement",{el:L,result:w,text:K})}function b(L){a=Vu(a,L)}const y=()=>{T(),br("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _(){T(),br("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let v=!1;function T(){function L(){T()}if(document.readyState==="loading"){v||window.addEventListener("DOMContentLoaded",L,!1),v=!0;return}document.querySelectorAll(a.cssSelector).forEach(m)}function C(L,$){let F=null;try{F=$(e)}catch(K){if(Wn("Language definition for '{}' could not be registered.".replace("{}",L)),i)Wn(K);else throw K;F=o}F.name||(F.name=L),t[L]=F,F.rawDefinition=$.bind(null,e),F.aliases&&G(F.aliases,{languageName:L})}function N(L){delete t[L];for(const $ of Object.keys(n))n[$]===L&&delete n[$]}function B(){return Object.keys(t)}function U(L){return L=(L||"").toLowerCase(),t[L]||t[n[L]]}function G(L,{languageName:$}){typeof L=="string"&&(L=[L]),L.forEach(F=>{n[F.toLowerCase()]=$})}function O(L){const $=U(L);return $&&!$.disableAutodetect}function H(L){L["before:highlightBlock"]&&!L["before:highlightElement"]&&(L["before:highlightElement"]=$=>{L["before:highlightBlock"](Object.assign({block:$.el},$))}),L["after:highlightBlock"]&&!L["after:highlightElement"]&&(L["after:highlightElement"]=$=>{L["after:highlightBlock"](Object.assign({block:$.el},$))})}function P(L){H(L),r.push(L)}function ne(L){const $=r.indexOf(L);$!==-1&&r.splice($,1)}function X(L,$){const F=L;r.forEach(function(K){K[F]&&K[F]($)})}function Y(L){return br("10.7.0","highlightBlock will be removed entirely in v12.0"),br("10.7.0","Please use highlightElement now."),m(L)}Object.assign(e,{highlight:u,highlightAuto:f,highlightAll:T,highlightElement:m,highlightBlock:Y,configure:b,initHighlighting:y,initHighlightingOnLoad:_,registerLanguage:C,unregisterLanguage:N,listLanguages:B,getLanguage:U,registerAliases:G,autoDetection:O,inherit:Vu,addPlugin:P,removePlugin:ne}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=Gk,e.regex={concat:nr,lookahead:up,either:tc,optional:ak,anyNumberOfTimes:ok};for(const L in ps)typeof ps[L]=="object"&&lp(ps[L]);return Object.assign(e,ps),e},Lr=xp({});Lr.newInstance=()=>xp({});var Vk=Lr;Lr.HighlightJS=Lr;Lr.default=Lr;const Yk=Mi(Vk),Zu={},Zk="hljs-";function Xk(e){const t=Yk.newInstance();return e&&s(e),{highlight:n,highlightAuto:r,listLanguages:i,register:s,registerAlias:o,registered:a};function n(l,c,u){const d=u||Zu,h=typeof d.prefix=="string"?d.prefix:Zk;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:Qk,classPrefix:h});const f=t.highlight(c,{ignoreIllegals:!0,language:l});if(f.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:f.errorRaised});const p=f._emitter.root,m=p.data;return m.language=f.language,m.relevance=f.relevance,p}function r(l,c){const d=(c||Zu).subset||i();let h=-1,f=0,p;for(;++h<d.length;){const m=d[h];if(!t.getLanguage(m))continue;const b=n(m,l,c);b.data&&b.data.relevance!==void 0&&b.data.relevance>f&&(f=b.data.relevance,p=b)}return p||{type:"root",children:[],data:{language:void 0,relevance:f}}}function i(){return t.listLanguages()}function s(l,c){if(typeof l=="string")t.registerLanguage(l,c);else{let u;for(u in l)Object.hasOwn(l,u)&&t.registerLanguage(u,l[u])}}function o(l,c){if(typeof l=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:l});else{let u;for(u in l)if(Object.hasOwn(l,u)){const d=l[u];t.registerAliases(typeof d=="string"?d:[...d],{languageName:u})}}}function a(l){return!!t.getLanguage(l)}}class Qk{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=this,r=t.split(".").map(function(o,a){return a?o+"_".repeat(a):n.options.classPrefix+o}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const Ep=function(e){if(e==null)return nN;if(typeof e=="function")return ro(e);if(typeof e=="object")return Array.isArray(e)?Jk(e):eN(e);if(typeof e=="string")return tN(e);throw new Error("Expected function, string, or object as test")};function Jk(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ep(e[n]);return ro(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function eN(e){const t=e;return ro(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function tN(e){return ro(t);function t(n){return n&&n.type===e}}function ro(e){return t;function t(n,r,i){return!!(rN(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function nN(){return!0}function rN(e){return e!==null&&typeof e=="object"&&"type"in e}const wp=[],iN=!0,Xu=!1,sN="skip";function oN(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Ep(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=wp,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=aN(n(l,u)),f[0]===Xu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==sN)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Xu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function aN(e){return Array.isArray(e)?e:typeof e=="number"?[iN,e]:e==null?wp:[e]}function lN(e,t,n,r){let i,s,o;s=t,o=n,i=r,oN(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const cN={};function _p(e){const t=e||cN,n=t.aliases,r=t.detect||!1,i=t.languages||tk,s=t.plainText,o=t.prefix,a=t.subset;let l="hljs";const c=Xk(i);if(n&&c.registerAlias(n),o){const u=o.indexOf("-");l=u===-1?o:o.slice(0,u)}return function(u,d){lN(u,"element",function(h,f,p){if(h.tagName!=="code"||!p||p.type!=="element"||p.tagName!=="pre")return;const m=uN(h);if(m===!1||!m&&!r||m&&s&&s.includes(m))return;Array.isArray(h.properties.className)||(h.properties.className=[]),h.properties.className.includes(l)||h.properties.className.unshift(l);const b=T_(h,{whitespace:"pre"});let y;try{y=m?c.highlight(m,b,{prefix:o}):c.highlightAuto(b,{prefix:o,subset:a})}catch(_){const v=_;if(m&&/Unknown language/.test(v.message)){d.message("Cannot highlight as `"+m+"`, it’s not registered",{ancestors:[p,h],cause:v,place:h.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw v}!m&&y.data&&y.data.language&&h.properties.className.push("language-"+y.data.language),y.children.length>0&&(h.children=y.children)})}}function uN(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const i=String(t[n]);if(i==="no-highlight"||i==="nohighlight")return!1;!r&&i.slice(0,5)==="lang-"&&(r=i.slice(5)),!r&&i.slice(0,9)==="language-"&&(r=i.slice(9))}return r}function dN({article:e,onBack:t,onEdit:n,showActions:r=!1}){return E.jsxs("div",{className:"mx-auto max-w-4xl",children:[(t||r&&n)&&E.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[t&&E.jsxs("button",{onClick:t,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Back"]}),r&&n&&E.jsxs("button",{onClick:()=>n(e),className:"flex items-center gap-2 rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Edit"]})]}),E.jsxs("article",{className:"rounded-lg bg-white p-8 shadow-md",children:[E.jsxs("header",{className:"border-b border-gray-200 pb-6",children:[E.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:e.title}),E.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[e.dateAt&&E.jsxs("span",{className:"flex items-center gap-2",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(e.dateAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]}),e.category&&E.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:e.category.title}),E.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${e.status===ze.Published?"bg-green-100 text-green-800":e.status===ze.Draft?"bg-gray-100 text-gray-800":e.status===ze.Review?"bg-yellow-100 text-yellow-800":e.status===ze.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:ze[e.status]})]}),e.tags&&e.tags.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.tags.map(i=>E.jsxs("span",{className:"rounded-md bg-gray-100 px-3 py-1 text-sm text-gray-700",children:["#",i.title]},i.tagId))}),e.roles&&e.roles.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.roles.map(i=>E.jsx("span",{className:"rounded-md bg-purple-100 px-3 py-1 text-sm text-purple-700",children:i.name},i.slug))})]}),E.jsx("div",{className:"prose prose-lg mt-8 max-w-none",children:E.jsx(ch,{remarkPlugins:[qh],rehypePlugins:[_p],children:e.content})})]})]})}var vp=typeof global=="object"&&global&&global.Object===Object&&global,fN=typeof self=="object"&&self&&self.Object===Object&&self,dn=vp||fN||Function("return this")(),Dn=dn.Symbol,kp=Object.prototype,hN=kp.hasOwnProperty,pN=kp.toString,li=Dn?Dn.toStringTag:void 0;function gN(e){var t=hN.call(e,li),n=e[li];try{e[li]=void 0;var r=!0}catch{}var i=pN.call(e);return r&&(t?e[li]=n:delete e[li]),i}var mN=Object.prototype,bN=mN.toString;function yN(e){return bN.call(e)}var xN="[object Null]",EN="[object Undefined]",Qu=Dn?Dn.toStringTag:void 0;function zr(e){return e==null?e===void 0?EN:xN:Qu&&Qu in Object(e)?gN(e):yN(e)}function yn(e){return e!=null&&typeof e=="object"}var Zn=Array.isArray;function Bn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Np(e){return e}var wN="[object AsyncFunction]",_N="[object Function]",vN="[object GeneratorFunction]",kN="[object Proxy]";function ic(e){if(!Bn(e))return!1;var t=zr(e);return t==_N||t==vN||t==wN||t==kN}var ka=dn["__core-js_shared__"],Ju=function(){var e=/[^.]+$/.exec(ka&&ka.keys&&ka.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function NN(e){return!!Ju&&Ju in e}var AN=Function.prototype,SN=AN.toString;function rr(e){if(e!=null){try{return SN.call(e)}catch{}try{return e+""}catch{}}return""}var TN=/[\\^$.*+?()[\]{}|]/g,CN=/^\[object .+?Constructor\]$/,ON=Function.prototype,IN=Object.prototype,RN=ON.toString,LN=IN.hasOwnProperty,MN=RegExp("^"+RN.call(LN).replace(TN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function DN(e){if(!Bn(e)||NN(e))return!1;var t=ic(e)?MN:CN;return t.test(rr(e))}function PN(e,t){return e==null?void 0:e[t]}function ir(e,t){var n=PN(e,t);return DN(n)?n:void 0}var nl=ir(dn,"WeakMap"),ed=Object.create,BN=function(){function e(){}return function(t){if(!Bn(t))return{};if(ed)return ed(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function FN(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function qN(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var UN=800,$N=16,zN=Date.now;function jN(e){var t=0,n=0;return function(){var r=zN(),i=$N-(r-n);if(n=r,i>0){if(++t>=UN)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function HN(e){return function(){return e}}var Fs=function(){try{var e=ir(Object,"defineProperty");return e({},"",{}),e}catch{}}(),GN=Fs?function(e,t){return Fs(e,"toString",{configurable:!0,enumerable:!1,value:HN(t),writable:!0})}:Np,KN=jN(GN);function WN(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var VN=9007199254740991,YN=/^(?:0|[1-9]\d*)$/;function Ap(e,t){var n=typeof e;return t=t??VN,!!t&&(n=="number"||n!="symbol"&&YN.test(e))&&e>-1&&e%1==0&&e<t}function sc(e,t,n){t=="__proto__"&&Fs?Fs(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Bi(e,t){return e===t||e!==e&&t!==t}var ZN=Object.prototype,XN=ZN.hasOwnProperty;function Sp(e,t,n){var r=e[t];(!(XN.call(e,t)&&Bi(r,n))||n===void 0&&!(t in e))&&sc(e,t,n)}function QN(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?sc(n,a,l):Sp(n,a,l)}return n}var td=Math.max;function JN(e,t,n){return t=td(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=td(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),FN(e,this,a)}}function eA(e,t){return KN(JN(e,t,Np),e+"")}var tA=9007199254740991;function Tp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tA}function io(e){return e!=null&&Tp(e.length)&&!ic(e)}function nA(e,t,n){if(!Bn(n))return!1;var r=typeof t;return(r=="number"?io(n)&&Ap(t,n.length):r=="string"&&t in n)?Bi(n[t],e):!1}function rA(e){return eA(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&nA(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t})}var iA=Object.prototype;function oc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||iA;return e===n}function sA(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var oA="[object Arguments]";function nd(e){return yn(e)&&zr(e)==oA}var Cp=Object.prototype,aA=Cp.hasOwnProperty,lA=Cp.propertyIsEnumerable,rl=nd(function(){return arguments}())?nd:function(e){return yn(e)&&aA.call(e,"callee")&&!lA.call(e,"callee")};function cA(){return!1}var Op=typeof exports=="object"&&exports&&!exports.nodeType&&exports,rd=Op&&typeof module=="object"&&module&&!module.nodeType&&module,uA=rd&&rd.exports===Op,id=uA?dn.Buffer:void 0,dA=id?id.isBuffer:void 0,Ni=dA||cA,fA="[object Arguments]",hA="[object Array]",pA="[object Boolean]",gA="[object Date]",mA="[object Error]",bA="[object Function]",yA="[object Map]",xA="[object Number]",EA="[object Object]",wA="[object RegExp]",_A="[object Set]",vA="[object String]",kA="[object WeakMap]",NA="[object ArrayBuffer]",AA="[object DataView]",SA="[object Float32Array]",TA="[object Float64Array]",CA="[object Int8Array]",OA="[object Int16Array]",IA="[object Int32Array]",RA="[object Uint8Array]",LA="[object Uint8ClampedArray]",MA="[object Uint16Array]",DA="[object Uint32Array]",Re={};Re[SA]=Re[TA]=Re[CA]=Re[OA]=Re[IA]=Re[RA]=Re[LA]=Re[MA]=Re[DA]=!0;Re[fA]=Re[hA]=Re[NA]=Re[pA]=Re[AA]=Re[gA]=Re[mA]=Re[bA]=Re[yA]=Re[xA]=Re[EA]=Re[wA]=Re[_A]=Re[vA]=Re[kA]=!1;function PA(e){return yn(e)&&Tp(e.length)&&!!Re[zr(e)]}function ac(e){return function(t){return e(t)}}var Ip=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bi=Ip&&typeof module=="object"&&module&&!module.nodeType&&module,BA=bi&&bi.exports===Ip,Na=BA&&vp.process,Mr=function(){try{var e=bi&&bi.require&&bi.require("util").types;return e||Na&&Na.binding&&Na.binding("util")}catch{}}(),sd=Mr&&Mr.isTypedArray,lc=sd?ac(sd):PA,FA=Object.prototype,qA=FA.hasOwnProperty;function Rp(e,t){var n=Zn(e),r=!n&&rl(e),i=!n&&!r&&Ni(e),s=!n&&!r&&!i&&lc(e),o=n||r||i||s,a=o?sA(e.length,String):[],l=a.length;for(var c in e)(t||qA.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ap(c,l)))&&a.push(c);return a}function Lp(e,t){return function(n){return e(t(n))}}var UA=Lp(Object.keys,Object),$A=Object.prototype,zA=$A.hasOwnProperty;function jA(e){if(!oc(e))return UA(e);var t=[];for(var n in Object(e))zA.call(e,n)&&n!="constructor"&&t.push(n);return t}function HA(e){return io(e)?Rp(e):jA(e)}function GA(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var KA=Object.prototype,WA=KA.hasOwnProperty;function VA(e){if(!Bn(e))return GA(e);var t=oc(e),n=[];for(var r in e)r=="constructor"&&(t||!WA.call(e,r))||n.push(r);return n}function Mp(e){return io(e)?Rp(e,!0):VA(e)}var Ai=ir(Object,"create");function YA(){this.__data__=Ai?Ai(null):{},this.size=0}function ZA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var XA="__lodash_hash_undefined__",QA=Object.prototype,JA=QA.hasOwnProperty;function eS(e){var t=this.__data__;if(Ai){var n=t[e];return n===XA?void 0:n}return JA.call(t,e)?t[e]:void 0}var tS=Object.prototype,nS=tS.hasOwnProperty;function rS(e){var t=this.__data__;return Ai?t[e]!==void 0:nS.call(t,e)}var iS="__lodash_hash_undefined__";function sS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ai&&t===void 0?iS:t,this}function Xn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Xn.prototype.clear=YA;Xn.prototype.delete=ZA;Xn.prototype.get=eS;Xn.prototype.has=rS;Xn.prototype.set=sS;function oS(){this.__data__=[],this.size=0}function so(e,t){for(var n=e.length;n--;)if(Bi(e[n][0],t))return n;return-1}var aS=Array.prototype,lS=aS.splice;function cS(e){var t=this.__data__,n=so(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():lS.call(t,n,1),--this.size,!0}function uS(e){var t=this.__data__,n=so(t,e);return n<0?void 0:t[n][1]}function dS(e){return so(this.__data__,e)>-1}function fS(e,t){var n=this.__data__,r=so(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function _n(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_n.prototype.clear=oS;_n.prototype.delete=cS;_n.prototype.get=uS;_n.prototype.has=dS;_n.prototype.set=fS;var Si=ir(dn,"Map");function hS(){this.size=0,this.__data__={hash:new Xn,map:new(Si||_n),string:new Xn}}function pS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function oo(e,t){var n=e.__data__;return pS(t)?n[typeof t=="string"?"string":"hash"]:n.map}function gS(e){var t=oo(this,e).delete(e);return this.size-=t?1:0,t}function mS(e){return oo(this,e).get(e)}function bS(e){return oo(this,e).has(e)}function yS(e,t){var n=oo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function sr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sr.prototype.clear=hS;sr.prototype.delete=gS;sr.prototype.get=mS;sr.prototype.has=bS;sr.prototype.set=yS;function xS(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Dp=Lp(Object.getPrototypeOf,Object),ES="[object Object]",wS=Function.prototype,_S=Object.prototype,Pp=wS.toString,vS=_S.hasOwnProperty,kS=Pp.call(Object);function NS(e){if(!yn(e)||zr(e)!=ES)return!1;var t=Dp(e);if(t===null)return!0;var n=vS.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Pp.call(n)==kS}function AS(){this.__data__=new _n,this.size=0}function SS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function TS(e){return this.__data__.get(e)}function CS(e){return this.__data__.has(e)}var OS=200;function IS(e,t){var n=this.__data__;if(n instanceof _n){var r=n.__data__;if(!Si||r.length<OS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new sr(r)}return n.set(e,t),this.size=n.size,this}function on(e){var t=this.__data__=new _n(e);this.size=t.size}on.prototype.clear=AS;on.prototype.delete=SS;on.prototype.get=TS;on.prototype.has=CS;on.prototype.set=IS;var Bp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,od=Bp&&typeof module=="object"&&module&&!module.nodeType&&module,RS=od&&od.exports===Bp,ad=RS?dn.Buffer:void 0,ld=ad?ad.allocUnsafe:void 0;function Fp(e,t){if(t)return e.slice();var n=e.length,r=ld?ld(n):new e.constructor(n);return e.copy(r),r}function LS(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function MS(){return[]}var DS=Object.prototype,PS=DS.propertyIsEnumerable,cd=Object.getOwnPropertySymbols,BS=cd?function(e){return e==null?[]:(e=Object(e),LS(cd(e),function(t){return PS.call(e,t)}))}:MS;function FS(e,t,n){var r=t(e);return Zn(e)?r:xS(r,n(e))}function il(e){return FS(e,HA,BS)}var sl=ir(dn,"DataView"),ol=ir(dn,"Promise"),al=ir(dn,"Set"),ud="[object Map]",qS="[object Object]",dd="[object Promise]",fd="[object Set]",hd="[object WeakMap]",pd="[object DataView]",US=rr(sl),$S=rr(Si),zS=rr(ol),jS=rr(al),HS=rr(nl),zt=zr;(sl&&zt(new sl(new ArrayBuffer(1)))!=pd||Si&&zt(new Si)!=ud||ol&&zt(ol.resolve())!=dd||al&&zt(new al)!=fd||nl&&zt(new nl)!=hd)&&(zt=function(e){var t=zr(e),n=t==qS?e.constructor:void 0,r=n?rr(n):"";if(r)switch(r){case US:return pd;case $S:return ud;case zS:return dd;case jS:return fd;case HS:return hd}return t});var GS=Object.prototype,KS=GS.hasOwnProperty;function WS(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&KS.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var qs=dn.Uint8Array;function cc(e){var t=new e.constructor(e.byteLength);return new qs(t).set(new qs(e)),t}function VS(e,t){var n=cc(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var YS=/\w*$/;function ZS(e){var t=new e.constructor(e.source,YS.exec(e));return t.lastIndex=e.lastIndex,t}var gd=Dn?Dn.prototype:void 0,md=gd?gd.valueOf:void 0;function XS(e){return md?Object(md.call(e)):{}}function qp(e,t){var n=t?cc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var QS="[object Boolean]",JS="[object Date]",eT="[object Map]",tT="[object Number]",nT="[object RegExp]",rT="[object Set]",iT="[object String]",sT="[object Symbol]",oT="[object ArrayBuffer]",aT="[object DataView]",lT="[object Float32Array]",cT="[object Float64Array]",uT="[object Int8Array]",dT="[object Int16Array]",fT="[object Int32Array]",hT="[object Uint8Array]",pT="[object Uint8ClampedArray]",gT="[object Uint16Array]",mT="[object Uint32Array]";function bT(e,t,n){var r=e.constructor;switch(t){case oT:return cc(e);case QS:case JS:return new r(+e);case aT:return VS(e);case lT:case cT:case uT:case dT:case fT:case hT:case pT:case gT:case mT:return qp(e,n);case eT:return new r;case tT:case iT:return new r(e);case nT:return ZS(e);case rT:return new r;case sT:return XS(e)}}function Up(e){return typeof e.constructor=="function"&&!oc(e)?BN(Dp(e)):{}}var yT="[object Map]";function xT(e){return yn(e)&&zt(e)==yT}var bd=Mr&&Mr.isMap,ET=bd?ac(bd):xT,wT="[object Set]";function _T(e){return yn(e)&&zt(e)==wT}var yd=Mr&&Mr.isSet,vT=yd?ac(yd):_T,kT=1,$p="[object Arguments]",NT="[object Array]",AT="[object Boolean]",ST="[object Date]",TT="[object Error]",zp="[object Function]",CT="[object GeneratorFunction]",OT="[object Map]",IT="[object Number]",jp="[object Object]",RT="[object RegExp]",LT="[object Set]",MT="[object String]",DT="[object Symbol]",PT="[object WeakMap]",BT="[object ArrayBuffer]",FT="[object DataView]",qT="[object Float32Array]",UT="[object Float64Array]",$T="[object Int8Array]",zT="[object Int16Array]",jT="[object Int32Array]",HT="[object Uint8Array]",GT="[object Uint8ClampedArray]",KT="[object Uint16Array]",WT="[object Uint32Array]",Ce={};Ce[$p]=Ce[NT]=Ce[BT]=Ce[FT]=Ce[AT]=Ce[ST]=Ce[qT]=Ce[UT]=Ce[$T]=Ce[zT]=Ce[jT]=Ce[OT]=Ce[IT]=Ce[jp]=Ce[RT]=Ce[LT]=Ce[MT]=Ce[DT]=Ce[HT]=Ce[GT]=Ce[KT]=Ce[WT]=!0;Ce[TT]=Ce[zp]=Ce[PT]=!1;function Ns(e,t,n,r,i,s){var o,a=t&kT;if(o!==void 0)return o;if(!Bn(e))return e;var l=Zn(e);if(l)o=WS(e);else{var c=zt(e),u=c==zp||c==CT;if(Ni(e))return Fp(e,a);if(c==jp||c==$p||u&&!i)o=u?{}:Up(e);else{if(!Ce[c])return i?e:{};o=bT(e,c,a)}}s||(s=new on);var d=s.get(e);if(d)return d;s.set(e,o),vT(e)?e.forEach(function(p){o.add(Ns(p,t,n,p,e,s))}):ET(e)&&e.forEach(function(p,m){o.set(m,Ns(p,t,n,m,e,s))});var h=il,f=l?void 0:h(e);return WN(f||e,function(p,m){f&&(m=p,p=e[m]),Sp(o,m,Ns(p,t,n,m,e,s))}),o}var VT=1,YT=4;function Tr(e){return Ns(e,VT|YT)}var ZT="__lodash_hash_undefined__";function XT(e){return this.__data__.set(e,ZT),this}function QT(e){return this.__data__.has(e)}function Us(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new sr;++t<n;)this.add(e[t])}Us.prototype.add=Us.prototype.push=XT;Us.prototype.has=QT;function JT(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function eC(e,t){return e.has(t)}var tC=1,nC=2;function Hp(e,t,n,r,i,s){var o=n&tC,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&nC?new Us:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var p=e[d],m=t[d];if(r)var b=o?r(m,p,d,t,e,s):r(p,m,d,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!JT(t,function(y,_){if(!eC(f,_)&&(p===y||i(p,y,n,r,s)))return f.push(_)})){h=!1;break}}else if(!(p===m||i(p,m,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function rC(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function iC(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var sC=1,oC=2,aC="[object Boolean]",lC="[object Date]",cC="[object Error]",uC="[object Map]",dC="[object Number]",fC="[object RegExp]",hC="[object Set]",pC="[object String]",gC="[object Symbol]",mC="[object ArrayBuffer]",bC="[object DataView]",xd=Dn?Dn.prototype:void 0,Aa=xd?xd.valueOf:void 0;function yC(e,t,n,r,i,s,o){switch(n){case bC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case mC:return!(e.byteLength!=t.byteLength||!s(new qs(e),new qs(t)));case aC:case lC:case dC:return Bi(+e,+t);case cC:return e.name==t.name&&e.message==t.message;case fC:case pC:return e==t+"";case uC:var a=rC;case hC:var l=r&sC;if(a||(a=iC),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=oC,o.set(e,t);var u=Hp(a(e),a(t),r,i,s,o);return o.delete(e),u;case gC:if(Aa)return Aa.call(e)==Aa.call(t)}return!1}var xC=1,EC=Object.prototype,wC=EC.hasOwnProperty;function _C(e,t,n,r,i,s){var o=n&xC,a=il(e),l=a.length,c=il(t),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in t:wC.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var b=o;++d<l;){h=a[d];var y=e[h],_=t[h];if(r)var v=o?r(_,y,h,t,e,s):r(y,_,h,e,t,s);if(!(v===void 0?y===_||i(y,_,n,r,s):v)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var T=e.constructor,C=t.constructor;T!=C&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof C=="function"&&C instanceof C)&&(m=!1)}return s.delete(e),s.delete(t),m}var vC=1,Ed="[object Arguments]",wd="[object Array]",gs="[object Object]",kC=Object.prototype,_d=kC.hasOwnProperty;function NC(e,t,n,r,i,s){var o=Zn(e),a=Zn(t),l=o?wd:zt(e),c=a?wd:zt(t);l=l==Ed?gs:l,c=c==Ed?gs:c;var u=l==gs,d=c==gs,h=l==c;if(h&&Ni(e)){if(!Ni(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new on),o||lc(e)?Hp(e,t,n,r,i,s):yC(e,t,l,n,r,i,s);if(!(n&vC)){var f=u&&_d.call(e,"__wrapped__"),p=d&&_d.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,b=p?t.value():t;return s||(s=new on),i(m,b,n,r,s)}}return h?(s||(s=new on),_C(e,t,n,r,i,s)):!1}function Gp(e,t,n,r,i){return e===t?!0:e==null||t==null||!yn(e)&&!yn(t)?e!==e&&t!==t:NC(e,t,n,r,Gp,i)}function AC(e){return function(t,n,r){for(var i=-1,s=Object(t),o=r(t),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return t}}var SC=AC();function ll(e,t,n){(n!==void 0&&!Bi(e[t],n)||n===void 0&&!(t in e))&&sc(e,t,n)}function TC(e){return yn(e)&&io(e)}function cl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function CC(e){return QN(e,Mp(e))}function OC(e,t,n,r,i,s,o){var a=cl(e,n),l=cl(t,n),c=o.get(l);if(c){ll(e,n,c);return}var u=s?s(a,l,n+"",e,t,o):void 0,d=u===void 0;if(d){var h=Zn(l),f=!h&&Ni(l),p=!h&&!f&&lc(l);u=l,h||f||p?Zn(a)?u=a:TC(a)?u=qN(a):f?(d=!1,u=Fp(l,!0)):p?(d=!1,u=qp(l,!0)):u=[]:NS(l)||rl(l)?(u=a,rl(a)?u=CC(a):(!Bn(a)||ic(a))&&(u=Up(l))):d=!1}d&&(o.set(l,u),i(u,l,r,s,o),o.delete(l)),ll(e,n,u)}function Kp(e,t,n,r,i){e!==t&&SC(t,function(s,o){if(i||(i=new on),Bn(s))OC(e,t,o,n,Kp,r,i);else{var a=r?r(cl(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),ll(e,o,a)}},Mp)}function On(e,t){return Gp(e,t)}var Mn=rA(function(e,t,n){Kp(e,t,n)}),ee=(e=>(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(ee||{});class ln{constructor(t,n,r={}){this.attrName=t,this.keyName=n;const i=ee.TYPE&ee.ATTRIBUTE;this.scope=r.scope!=null?r.scope&ee.LEVEL|i:ee.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(t){return Array.from(t.attributes).map(n=>n.name)}add(t,n){return this.canAdd(t,n)?(t.setAttribute(this.keyName,n),!0):!1}canAdd(t,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const n=t.getAttribute(this.keyName);return this.canAdd(t,n)&&n?n:""}}class Cr extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const Wp=class ul{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,n=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(n){let r=null;try{r=t.parentNode}catch{return null}return this.find(r,n)}return null}create(t,n,r){const i=this.query(n);if(i==null)throw new Cr(`Unable to create ${n} blot`);const s=i,o=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:s.create(r),a=new s(t,o,r);return ul.blots.set(a.domNode,a),a}find(t,n=!1){return ul.find(t,n)}query(t,n=ee.ANY){let r;return typeof t=="string"?r=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?r=this.types.text:typeof t=="number"?t&ee.LEVEL&ee.BLOCK?r=this.types.block:t&ee.LEVEL&ee.INLINE&&(r=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[t.tagName]),r==null?null:"scope"in r&&n&ee.LEVEL&r.scope&&n&ee.TYPE&r.scope?r:null}register(...t){return t.map(n=>{const r="blotName"in n,i="attrName"in n;if(!r&&!i)throw new Cr("Invalid definition");if(r&&n.blotName==="abstract")throw new Cr("Cannot register abstract class");const s=r?n.blotName:i?n.attrName:void 0;return this.types[s]=n,i?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(o=>o.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(o=>{(this.tags[o]==null||n.className==null)&&(this.tags[o]=n)}))),n})}};Wp.blots=new WeakMap;let Dr=Wp;function vd(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${t}-`)===0)}class IC extends ln{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(t,n){return this.canAdd(t,n)?(this.remove(t),t.classList.add(`${this.keyName}-${n}`),!0):!1}remove(t){vd(t,this.keyName).forEach(n=>{t.classList.remove(n)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const n=(vd(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,n)?n:""}}const Wt=IC;function Sa(e){const t=e.split("-"),n=t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return t[0]+n}class RC extends ln{static keys(t){return(t.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(t,n){return this.canAdd(t,n)?(t.style[Sa(this.keyName)]=n,!0):!1}remove(t){t.style[Sa(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const n=t.style[Sa(this.keyName)];return this.canAdd(t,n)?n:""}}const Fn=RC;class LC{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,n){n?t.add(this.domNode,n)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=Dr.find(this.domNode);if(t==null)return;const n=ln.keys(this.domNode),r=Wt.keys(this.domNode),i=Fn.keys(this.domNode);n.concat(r).concat(i).forEach(s=>{const o=t.scroll.query(s,ee.ATTRIBUTE);o instanceof ln&&(this.attributes[o.attrName]=o)})}copy(t){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);t.format(n,r)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,n)=>(t[n]=this.attributes[n].value(this.domNode),t),{})}}const ao=LC,Vp=class{constructor(t,n){this.scroll=t,this.domNode=n,Dr.blots.set(n,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new Cr("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof t=="string"?(r=t.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof t=="number"&&(r=t),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),Dr.blots.delete(this.domNode)}deleteAt(t,n){this.isolate(t,n).remove()}formatAt(t,n,r,i){const s=this.isolate(t,n);if(this.scroll.query(r,ee.BLOT)!=null&&i)s.wrap(r,i);else if(this.scroll.query(r,ee.ATTRIBUTE)!=null){const o=this.scroll.create(this.statics.scope);s.wrap(o),o.format(r,i)}}insertAt(t,n,r){const i=r==null?this.scroll.create("text",n):this.scroll.create(n,r),s=this.split(t);this.parent.insertBefore(i,s||void 0)}isolate(t,n){const r=this.split(t);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(t,n){return t===0?this:this.next}update(t,n){}wrap(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Cr(`Cannot wrap ${t}`);return r.appendChild(this),r}};Vp.blotName="abstract";let Yp=Vp;const Zp=class extends Yp{static value(t){return!0}index(t,n){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(t,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Zp.scope=ee.INLINE_BLOT;let MC=Zp;const Qe=MC;class DC{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const n=t.slice(1);this.append(...n)}}at(t){const n=this.iterator();let r=n();for(;r&&t>0;)t-=1,r=n();return r}contains(t){const n=this.iterator();let r=n();for(;r;){if(r===t)return!0;r=n()}return!1}indexOf(t){const n=this.iterator();let r=n(),i=0;for(;r;){if(r===t)return i;i+=1,r=n()}return-1}insertBefore(t,n){t!=null&&(this.remove(t),t.next=n,n!=null?(t.prev=n.prev,n.prev!=null&&(n.prev.next=t),n.prev=t,n===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let n=0,r=this.head;for(;r!=null;){if(r===t)return n;n+=r.length(),r=r.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const n=t;return t!=null&&(t=t.next),n}}find(t,n=!1){const r=this.iterator();let i=r();for(;i;){const s=i.length();if(t<s||n&&t===s&&(i.next==null||i.next.length()!==0))return[i,t];t-=s,i=r()}return[null,0]}forEach(t){const n=this.iterator();let r=n();for(;r;)t(r),r=n()}forEachAt(t,n,r){if(n<=0)return;const[i,s]=this.find(t);let o=t-s;const a=this.iterator(i);let l=a();for(;l&&o<t+n;){const c=l.length();t>o?r(l,t-o,Math.min(n,o+c-t)):r(l,0,Math.min(c,t+n-o)),o+=c,l=a()}}map(t){return this.reduce((n,r)=>(n.push(t(r)),n),[])}reduce(t,n){const r=this.iterator();let i=r();for(;i;)n=t(n,i),i=r();return n}}function kd(e,t){const n=t.find(e);if(n)return n;try{return t.create(e)}catch{const r=t.create(ee.INLINE);return Array.from(e.childNodes).forEach(i=>{r.domNode.appendChild(i)}),e.parentNode&&e.parentNode.replaceChild(r.domNode,e),r.attach(),r}}const Xp=class Cn extends Yp{constructor(t,n){super(t,n),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,Cn.uiClass&&this.uiNode.classList.add(Cn.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new DC,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const n=kd(t,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Cr)return;throw n}})}deleteAt(t,n){if(t===0&&n===this.length())return this.remove();this.children.forEachAt(t,n,(r,i,s)=>{r.deleteAt(i,s)})}descendant(t,n=0){const[r,i]=this.children.find(n);return t.blotName==null&&t(r)||t.blotName!=null&&r instanceof t?[r,i]:r instanceof Cn?r.descendant(t,i):[null,-1]}descendants(t,n=0,r=Number.MAX_VALUE){let i=[],s=r;return this.children.forEachAt(n,r,(o,a,l)=>{(t.blotName==null&&t(o)||t.blotName!=null&&o instanceof t)&&i.push(o),o instanceof Cn&&(i=i.concat(o.descendants(t,a,s))),s-=l}),i}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(n=>{t||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===ee.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),t=!0):n instanceof Cn?n.unwrap():n.remove())})}formatAt(t,n,r,i){this.children.forEachAt(t,n,(s,o,a)=>{s.formatAt(o,a,r,i)})}insertAt(t,n,r){const[i,s]=this.children.find(t);if(i)i.insertAt(s,n,r);else{const o=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(o)}}insertBefore(t,n){t.parent!=null&&t.parent.children.remove(t);let r=null;this.children.insertBefore(t,n||null),t.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(t.domNode,r),t.attach()}length(){return this.children.reduce((t,n)=>t+n.length(),0)}moveChildren(t,n){this.children.forEach(r=>{t.insertBefore(r,n)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(t,n=!1){const[r,i]=this.children.find(t,n),s=[[this,t]];return r instanceof Cn?s.concat(r.path(i,n)):(r!=null&&s.push([r,i]),s)}removeChild(t){this.children.remove(t)}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return r instanceof Cn&&this.moveChildren(r),super.replaceWith(r)}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(t,this.length(),(i,s,o)=>{const a=i.split(s,n);a!=null&&r.appendChild(a)}),r}splitAfter(t){const n=this.clone();for(;t.next!=null;)n.appendChild(t.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,n){const r=[],i=[];t.forEach(s=>{s.target===this.domNode&&s.type==="childList"&&(r.push(...s.addedNodes),i.push(...s.removedNodes))}),i.forEach(s=>{if(s.parentNode!=null&&s.tagName!=="IFRAME"&&document.body.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const o=this.scroll.find(s);o!=null&&(o.domNode.parentNode==null||o.domNode.parentNode===this.domNode)&&o.detach()}),r.filter(s=>s.parentNode===this.domNode&&s!==this.uiNode).sort((s,o)=>s===o?0:s.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(s=>{let o=null;s.nextSibling!=null&&(o=this.scroll.find(s.nextSibling));const a=kd(s,this.scroll);(a.next!==o||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,o||void 0))}),this.enforceAllowedChildren()}};Xp.uiClass="";let PC=Xp;const Gt=PC;function BC(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}const wr=class _r extends Gt{static create(t){return super.create(t)}static formats(t,n){const r=n.query(_r.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new ao(this.domNode)}format(t,n){if(t===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof _r||(r=r.wrap(_r.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(t,ee.INLINE);if(r==null)return;r instanceof ln?this.attributes.attribute(r,n):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n)}}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,i){this.formats()[r]!=null||this.scroll.query(r,ee.ATTRIBUTE)?this.isolate(t,n).format(r,i):super.formatAt(t,n,r,i)}optimize(t){super.optimize(t);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof _r&&r.prev===this&&BC(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(t,n){const r=super.wrap(t,n);return r instanceof _r&&this.attributes.move(r),r}};wr.allowedChildren=[wr,Qe],wr.blotName="inline",wr.scope=ee.INLINE_BLOT,wr.tagName="SPAN";let FC=wr;const uc=FC,vr=class dl extends Gt{static create(t){return super.create(t)}static formats(t,n){const r=n.query(dl.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new ao(this.domNode)}format(t,n){const r=this.scroll.query(t,ee.BLOCK);r!=null&&(r instanceof ln?this.attributes.attribute(r,n):t===this.statics.blotName&&!n?this.replaceWith(dl.blotName):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n))}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,i){this.scroll.query(r,ee.BLOCK)!=null?this.format(r,i):super.formatAt(t,n,r,i)}insertAt(t,n,r){if(r==null||this.scroll.query(n,ee.INLINE)!=null)super.insertAt(t,n,r);else{const i=this.split(t);if(i!=null){const s=this.scroll.create(n,r);i.parent.insertBefore(s,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};vr.blotName="block",vr.scope=ee.BLOCK_BLOT,vr.tagName="P",vr.allowedChildren=[uc,vr,Qe];let qC=vr;const Ti=qC,fl=class extends Gt{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,n){super.deleteAt(t,n),this.enforceAllowedChildren()}formatAt(t,n,r,i){super.formatAt(t,n,r,i),this.enforceAllowedChildren()}insertAt(t,n,r){super.insertAt(t,n,r),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};fl.blotName="container",fl.scope=ee.BLOCK_BLOT;let UC=fl;const lo=UC;class $C extends Qe{static formats(t,n){}format(t,n){super.formatAt(0,this.length(),t,n)}formatAt(t,n,r,i){t===0&&n===this.length()?this.format(r,i):super.formatAt(t,n,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const _t=$C,zC={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},jC=100,kr=class extends Gt{constructor(t,n){super(null,n),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,zC),this.attach()}create(t,n){return this.registry.create(this,t,n)}find(t,n=!1){const r=this.registry.find(t,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(t,n=ee.ANY){return this.registry.query(t,n)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,n){this.update(),t===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(t,n)}formatAt(t,n,r,i){this.update(),super.formatAt(t,n,r,i)}insertAt(t,n,r){this.update(),super.insertAt(t,n,r)}optimize(t=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)t.push(i.pop());const s=(l,c=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(r.has(l.domNode)||r.set(l.domNode,[]),c&&s(l.parent))},o=l=>{r.has(l.domNode)&&(l instanceof Gt&&l.children.forEach(o),r.delete(l.domNode),l.optimize(n))};let a=t;for(let l=0;a.length>0;l+=1){if(l>=jC)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(c=>{const u=this.find(c.target,!0);u!=null&&(u.domNode===c.target&&(c.type==="childList"?(s(this.find(c.previousSibling,!1)),Array.from(c.addedNodes).forEach(d=>{const h=this.find(d,!1);s(h,!1),h instanceof Gt&&h.children.forEach(f=>{s(f,!1)})})):c.type==="attributes"&&s(u.prev)),s(u))}),this.children.forEach(o),a=Array.from(this.observer.takeRecords()),i=a.slice();i.length>0;)t.push(i.pop())}}update(t,n={}){t=t||this.observer.takeRecords();const r=new WeakMap;t.map(i=>{const s=this.find(i.target,!0);return s==null?null:r.has(s.domNode)?(r.get(s.domNode).push(i),null):(r.set(s.domNode,[i]),s)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(t,n)}};kr.blotName="scroll",kr.defaultChild=Ti,kr.allowedChildren=[Ti,lo],kr.scope=ee.BLOCK_BLOT,kr.tagName="DIV";let HC=kr;const dc=HC,hl=class Qp extends Qe{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,n){super(t,n),this.text=this.statics.value(this.domNode)}deleteAt(t,n){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+n)}index(t,n){return this.domNode===t?n:-1}insertAt(t,n,r){r==null?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,n,r)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Qp&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,n=!1){return[this.domNode,t]}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(t,n){t.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};hl.blotName="text",hl.scope=ee.INLINE_BLOT;let GC=hl;const $s=GC,KC=Object.freeze(Object.defineProperty({__proto__:null,Attributor:ln,AttributorStore:ao,BlockBlot:Ti,ClassAttributor:Wt,ContainerBlot:lo,EmbedBlot:_t,InlineBlot:uc,LeafBlot:Qe,ParentBlot:Gt,Registry:Dr,Scope:ee,ScrollBlot:dc,StyleAttributor:Fn,TextBlot:$s},Symbol.toStringTag,{value:"Module"}));var pl={exports:{}},Et=-1,lt=1,Fe=0;function Ci(e,t,n,r,i){if(e===t)return e?[[Fe,e]]:[];if(n!=null){var s=tO(e,t,n);if(s)return s}var o=fc(e,t),a=e.substring(0,o);e=e.substring(o),t=t.substring(o),o=co(e,t);var l=e.substring(e.length-o);e=e.substring(0,e.length-o),t=t.substring(0,t.length-o);var c=WC(e,t);return a&&c.unshift([Fe,a]),l&&c.push([Fe,l]),hc(c,i),r&&ZC(c),c}function WC(e,t){var n;if(!e)return[[lt,t]];if(!t)return[[Et,e]];var r=e.length>t.length?e:t,i=e.length>t.length?t:e,s=r.indexOf(i);if(s!==-1)return n=[[lt,r.substring(0,s)],[Fe,i],[lt,r.substring(s+i.length)]],e.length>t.length&&(n[0][0]=n[2][0]=Et),n;if(i.length===1)return[[Et,e],[lt,t]];var o=YC(e,t);if(o){var a=o[0],l=o[1],c=o[2],u=o[3],d=o[4],h=Ci(a,c),f=Ci(l,u);return h.concat([[Fe,d]],f)}return VC(e,t)}function VC(e,t){for(var n=e.length,r=t.length,i=Math.ceil((n+r)/2),s=i,o=2*i,a=new Array(o),l=new Array(o),c=0;c<o;c++)a[c]=-1,l[c]=-1;a[s+1]=0,l[s+1]=0;for(var u=n-r,d=u%2!==0,h=0,f=0,p=0,m=0,b=0;b<i;b++){for(var y=-b+h;y<=b-f;y+=2){var _=s+y,v;y===-b||y!==b&&a[_-1]<a[_+1]?v=a[_+1]:v=a[_-1]+1;for(var T=v-y;v<n&&T<r&&e.charAt(v)===t.charAt(T);)v++,T++;if(a[_]=v,v>n)f+=2;else if(T>r)h+=2;else if(d){var C=s+u-y;if(C>=0&&C<o&&l[C]!==-1){var N=n-l[C];if(v>=N)return Nd(e,t,v,T)}}}for(var B=-b+p;B<=b-m;B+=2){var C=s+B,N;B===-b||B!==b&&l[C-1]<l[C+1]?N=l[C+1]:N=l[C-1]+1;for(var U=N-B;N<n&&U<r&&e.charAt(n-N-1)===t.charAt(r-U-1);)N++,U++;if(l[C]=N,N>n)m+=2;else if(U>r)p+=2;else if(!d){var _=s+u-B;if(_>=0&&_<o&&a[_]!==-1){var v=a[_],T=s+v-_;if(N=n-N,v>=N)return Nd(e,t,v,T)}}}}return[[Et,e],[lt,t]]}function Nd(e,t,n,r){var i=e.substring(0,n),s=t.substring(0,r),o=e.substring(n),a=t.substring(r),l=Ci(i,s),c=Ci(o,a);return l.concat(c)}function fc(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,s=0;n<i;)e.substring(s,i)==t.substring(s,i)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return Jp(e.charCodeAt(i-1))&&i--,i}function Ad(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var s=0,o=1;;){var a=e.substring(i-o),l=t.indexOf(a);if(l==-1)return s;o+=l,(l==0||e.substring(i-o)==t.substring(0,o))&&(s=o,o++)}}function co(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,s=0;n<i;)e.substring(e.length-i,e.length-s)==t.substring(t.length-i,t.length-s)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return eg(e.charCodeAt(e.length-i))&&i--,i}function YC(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;function i(f,p,m){for(var b=f.substring(m,m+Math.floor(f.length/4)),y=-1,_="",v,T,C,N;(y=p.indexOf(b,y+1))!==-1;){var B=fc(f.substring(m),p.substring(y)),U=co(f.substring(0,m),p.substring(0,y));_.length<U+B&&(_=p.substring(y-U,y)+p.substring(y,y+B),v=f.substring(0,m-U),T=f.substring(m+B),C=p.substring(0,y-U),N=p.substring(y+B))}return _.length*2>=f.length?[v,T,C,N,_]:null}var s=i(n,r,Math.ceil(n.length/4)),o=i(n,r,Math.ceil(n.length/2)),a;if(!s&&!o)return null;o?s?a=s[4].length>o[4].length?s:o:a=o:a=s;var l,c,u,d;e.length>t.length?(l=a[0],c=a[1],u=a[2],d=a[3]):(u=a[0],d=a[1],l=a[2],c=a[3]);var h=a[4];return[l,c,u,d,h]}function ZC(e){for(var t=!1,n=[],r=0,i=null,s=0,o=0,a=0,l=0,c=0;s<e.length;)e[s][0]==Fe?(n[r++]=s,o=l,a=c,l=0,c=0,i=e[s][1]):(e[s][0]==lt?l+=e[s][1].length:c+=e[s][1].length,i&&i.length<=Math.max(o,a)&&i.length<=Math.max(l,c)&&(e.splice(n[r-1],0,[Et,i]),e[n[r-1]+1][0]=lt,r--,r--,s=r>0?n[r-1]:-1,o=0,a=0,l=0,c=0,i=null,t=!0)),s++;for(t&&hc(e),JC(e),s=1;s<e.length;){if(e[s-1][0]==Et&&e[s][0]==lt){var u=e[s-1][1],d=e[s][1],h=Ad(u,d),f=Ad(d,u);h>=f?(h>=u.length/2||h>=d.length/2)&&(e.splice(s,0,[Fe,d.substring(0,h)]),e[s-1][1]=u.substring(0,u.length-h),e[s+1][1]=d.substring(h),s++):(f>=u.length/2||f>=d.length/2)&&(e.splice(s,0,[Fe,u.substring(0,f)]),e[s-1][0]=lt,e[s-1][1]=d.substring(0,d.length-f),e[s+1][0]=Et,e[s+1][1]=u.substring(f),s++),s++}s++}}var Sd=/[^a-zA-Z0-9]/,Td=/\s/,Cd=/[\r\n]/,XC=/\n\r?\n$/,QC=/^\r?\n\r?\n/;function JC(e){function t(f,p){if(!f||!p)return 6;var m=f.charAt(f.length-1),b=p.charAt(0),y=m.match(Sd),_=b.match(Sd),v=y&&m.match(Td),T=_&&b.match(Td),C=v&&m.match(Cd),N=T&&b.match(Cd),B=C&&f.match(XC),U=N&&p.match(QC);return B||U?5:C||N?4:y&&!v&&T?3:v||T?2:y||_?1:0}for(var n=1;n<e.length-1;){if(e[n-1][0]==Fe&&e[n+1][0]==Fe){var r=e[n-1][1],i=e[n][1],s=e[n+1][1],o=co(r,i);if(o){var a=i.substring(i.length-o);r=r.substring(0,r.length-o),i=a+i.substring(0,i.length-o),s=a+s}for(var l=r,c=i,u=s,d=t(r,i)+t(i,s);i.charAt(0)===s.charAt(0);){r+=i.charAt(0),i=i.substring(1)+s.charAt(0),s=s.substring(1);var h=t(r,i)+t(i,s);h>=d&&(d=h,l=r,c=i,u=s)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=c,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}}function hc(e,t){e.push([Fe,""]);for(var n=0,r=0,i=0,s="",o="",a;n<e.length;){if(n<e.length-1&&!e[n][1]){e.splice(n,1);continue}switch(e[n][0]){case lt:i++,o+=e[n][1],n++;break;case Et:r++,s+=e[n][1],n++;break;case Fe:var l=n-i-r-1;if(t){if(l>=0&&ng(e[l][1])){var c=e[l][1].slice(-1);if(e[l][1]=e[l][1].slice(0,-1),s=c+s,o=c+o,!e[l][1]){e.splice(l,1),n--;var u=l-1;e[u]&&e[u][0]===lt&&(i++,o=e[u][1]+o,u--),e[u]&&e[u][0]===Et&&(r++,s=e[u][1]+s,u--),l=u}}if(tg(e[n][1])){var c=e[n][1].charAt(0);e[n][1]=e[n][1].slice(1),s+=c,o+=c}}if(n<e.length-1&&!e[n][1]){e.splice(n,1);break}if(s.length>0||o.length>0){s.length>0&&o.length>0&&(a=fc(o,s),a!==0&&(l>=0?e[l][1]+=o.substring(0,a):(e.splice(0,0,[Fe,o.substring(0,a)]),n++),o=o.substring(a),s=s.substring(a)),a=co(o,s),a!==0&&(e[n][1]=o.substring(o.length-a)+e[n][1],o=o.substring(0,o.length-a),s=s.substring(0,s.length-a)));var d=i+r;s.length===0&&o.length===0?(e.splice(n-d,d),n=n-d):s.length===0?(e.splice(n-d,d,[lt,o]),n=n-d+1):o.length===0?(e.splice(n-d,d,[Et,s]),n=n-d+1):(e.splice(n-d,d,[Et,s],[lt,o]),n=n-d+2)}n!==0&&e[n-1][0]===Fe?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,i=0,r=0,s="",o="";break}}e[e.length-1][1]===""&&e.pop();var h=!1;for(n=1;n<e.length-1;)e[n-1][0]===Fe&&e[n+1][0]===Fe&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)===e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),h=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),h=!0)),n++;h&&hc(e,t)}function Jp(e){return e>=55296&&e<=56319}function eg(e){return e>=56320&&e<=57343}function tg(e){return eg(e.charCodeAt(0))}function ng(e){return Jp(e.charCodeAt(e.length-1))}function eO(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}function Ta(e,t,n,r){return ng(e)||tg(r)?null:eO([[Fe,e],[Et,t],[lt,n],[Fe,r]])}function tO(e,t,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,i=typeof n=="number"?null:n.newRange,s=e.length,o=t.length;if(r.length===0&&(i===null||i.length===0)){var a=r.index,l=e.slice(0,a),c=e.slice(a),u=i?i.index:null;e:{var d=a+o-s;if(u!==null&&u!==d||d<0||d>o)break e;var h=t.slice(0,d),f=t.slice(d);if(f!==c)break e;var p=Math.min(a,d),m=l.slice(0,p),b=h.slice(0,p);if(m!==b)break e;var y=l.slice(p),_=h.slice(p);return Ta(m,y,_,c)}e:{if(u!==null&&u!==a)break e;var v=a,h=t.slice(0,v),f=t.slice(v);if(h!==l)break e;var T=Math.min(s-v,o-v),C=c.slice(c.length-T),N=f.slice(f.length-T);if(C!==N)break e;var y=c.slice(0,c.length-T),_=f.slice(0,f.length-T);return Ta(l,y,_,C)}}if(r.length>0&&i&&i.length===0)e:{var m=e.slice(0,r.index),C=e.slice(r.index+r.length),p=m.length,T=C.length;if(o<p+T)break e;var b=t.slice(0,p),N=t.slice(o-T);if(m!==b||C!==N)break e;var y=e.slice(p,s-T),_=t.slice(p,o-T);return Ta(m,y,_,C)}return null}function uo(e,t,n,r){return Ci(e,t,n,r,!0)}uo.INSERT=lt;uo.DELETE=Et;uo.EQUAL=Fe;var nO=uo,zs={exports:{}};zs.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",h="[object Map]",f="[object Number]",p="[object Object]",m="[object Promise]",b="[object RegExp]",y="[object Set]",_="[object String]",v="[object Symbol]",T="[object WeakMap]",C="[object ArrayBuffer]",N="[object DataView]",B="[object Float32Array]",U="[object Float64Array]",G="[object Int8Array]",O="[object Int16Array]",H="[object Int32Array]",P="[object Uint8Array]",ne="[object Uint8ClampedArray]",X="[object Uint16Array]",Y="[object Uint32Array]",L=/[\\^$.*+?()[\]{}|]/g,$=/\w*$/,F=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,w={};w[s]=w[o]=w[C]=w[N]=w[a]=w[l]=w[B]=w[U]=w[G]=w[O]=w[H]=w[h]=w[f]=w[p]=w[b]=w[y]=w[_]=w[v]=w[P]=w[ne]=w[X]=w[Y]=!0,w[c]=w[u]=w[T]=!1;var Q=typeof It=="object"&&It&&It.Object===Object&&It,le=typeof self=="object"&&self&&self.Object===Object&&self,k=Q||le||Function("return this")(),ge=t&&!t.nodeType&&t,se=ge&&!0&&e&&!e.nodeType&&e,_e=se&&se.exports===ge;function te(g,x){return g.set(x[0],x[1]),g}function ce(g,x){return g.add(x),g}function Ne(g,x){for(var A=-1,M=g?g.length:0;++A<M&&x(g[A],A,g)!==!1;);return g}function qe(g,x){for(var A=-1,M=x.length,ue=g.length;++A<M;)g[ue+A]=x[A];return g}function Ue(g,x,A,M){for(var ue=-1,ie=g?g.length:0;++ue<ie;)A=x(A,g[ue],ue,g);return A}function Lt(g,x){for(var A=-1,M=Array(g);++A<g;)M[A]=x(A);return M}function bt(g,x){return g==null?void 0:g[x]}function vt(g){var x=!1;if(g!=null&&typeof g.toString!="function")try{x=!!(g+"")}catch{}return x}function Me(g){var x=-1,A=Array(g.size);return g.forEach(function(M,ue){A[++x]=[ue,M]}),A}function me(g,x){return function(A){return g(x(A))}}function We(g){var x=-1,A=Array(g.size);return g.forEach(function(M){A[++x]=M}),A}var oe=Array.prototype,Mt=Function.prototype,Ae=Object.prototype,ye=k["__core-js_shared__"],Dt=function(){var g=/[^.]+$/.exec(ye&&ye.keys&&ye.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""}(),ct=Mt.toString,Ve=Ae.hasOwnProperty,kt=Ae.toString,S=RegExp("^"+ct.call(Ve).replace(L,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=_e?k.Buffer:void 0,j=k.Symbol,W=k.Uint8Array,re=me(Object.getPrototypeOf,Object),Te=Object.create,ut=Ae.propertyIsEnumerable,rt=oe.splice,Pt=Object.getOwnPropertySymbols,Nt=I?I.isBuffer:void 0,$e=me(Object.keys,Object),yt=Ft(k,"DataView"),je=Ft(k,"Map"),Bt=Ft(k,"Promise"),ur=Ft(k,"Set"),Wr=Ft(k,"WeakMap"),qn=Ft(Object,"create"),Vr=it(yt),Un=it(je),Yr=it(Bt),Zr=it(ur),Xr=it(Wr),kn=j?j.prototype:void 0,Ki=kn?kn.valueOf:void 0;function fn(g){var x=-1,A=g?g.length:0;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function vo(){this.__data__=qn?qn(null):{}}function ko(g){return this.has(g)&&delete this.__data__[g]}function No(g){var x=this.__data__;if(qn){var A=x[g];return A===r?void 0:A}return Ve.call(x,g)?x[g]:void 0}function Wi(g){var x=this.__data__;return qn?x[g]!==void 0:Ve.call(x,g)}function Qr(g,x){var A=this.__data__;return A[g]=qn&&x===void 0?r:x,this}fn.prototype.clear=vo,fn.prototype.delete=ko,fn.prototype.get=No,fn.prototype.has=Wi,fn.prototype.set=Qr;function He(g){var x=-1,A=g?g.length:0;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function Ao(){this.__data__=[]}function So(g){var x=this.__data__,A=fr(x,g);if(A<0)return!1;var M=x.length-1;return A==M?x.pop():rt.call(x,A,1),!0}function To(g){var x=this.__data__,A=fr(x,g);return A<0?void 0:x[A][1]}function Co(g){return fr(this.__data__,g)>-1}function Oo(g,x){var A=this.__data__,M=fr(A,g);return M<0?A.push([g,x]):A[M][1]=x,this}He.prototype.clear=Ao,He.prototype.delete=So,He.prototype.get=To,He.prototype.has=Co,He.prototype.set=Oo;function Ye(g){var x=-1,A=g?g.length:0;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function Io(){this.__data__={hash:new fn,map:new(je||He),string:new fn}}function Ro(g){return zn(this,g).delete(g)}function Lo(g){return zn(this,g).get(g)}function Mo(g){return zn(this,g).has(g)}function Do(g,x){return zn(this,g).set(g,x),this}Ye.prototype.clear=Io,Ye.prototype.delete=Ro,Ye.prototype.get=Lo,Ye.prototype.has=Mo,Ye.prototype.set=Do;function dt(g){this.__data__=new He(g)}function Po(){this.__data__=new He}function Bo(g){return this.__data__.delete(g)}function Fo(g){return this.__data__.get(g)}function qo(g){return this.__data__.has(g)}function Uo(g,x){var A=this.__data__;if(A instanceof He){var M=A.__data__;if(!je||M.length<n-1)return M.push([g,x]),this;A=this.__data__=new Ye(M)}return A.set(g,x),this}dt.prototype.clear=Po,dt.prototype.delete=Bo,dt.prototype.get=Fo,dt.prototype.has=qo,dt.prototype.set=Uo;function dr(g,x){var A=ni(g)||pr(g)?Lt(g.length,String):[],M=A.length,ue=!!M;for(var ie in g)Ve.call(g,ie)&&!(ue&&(ie=="length"||ea(ie,M)))&&A.push(ie);return A}function Vi(g,x,A){var M=g[x];(!(Ve.call(g,x)&&Ji(M,A))||A===void 0&&!(x in g))&&(g[x]=A)}function fr(g,x){for(var A=g.length;A--;)if(Ji(g[A][0],x))return A;return-1}function Xt(g,x){return g&&ti(x,ii(x),g)}function Jr(g,x,A,M,ue,ie,we){var Ee;if(M&&(Ee=ie?M(g,ue,ie,we):M(g)),Ee!==void 0)return Ee;if(!Jt(g))return g;var De=ni(g);if(De){if(Ee=Qo(g),!x)return Yo(g,Ee)}else{var ve=pn(g),Ze=ve==u||ve==d;if(es(g))return hr(g,x);if(ve==p||ve==s||Ze&&!ie){if(vt(g))return ie?g:{};if(Ee=Qt(Ze?{}:g),!x)return Zo(g,Xt(Ee,g))}else{if(!w[ve])return ie?g:{};Ee=Jo(g,ve,Jr,x)}}we||(we=new dt);var ft=we.get(g);if(ft)return ft;if(we.set(g,Ee),!De)var Be=A?Xo(g):ii(g);return Ne(Be||g,function(Xe,Ge){Be&&(Ge=Xe,Xe=g[Ge]),Vi(Ee,Ge,Jr(Xe,x,A,M,Ge,g,we))}),Ee}function $o(g){return Jt(g)?Te(g):{}}function zo(g,x,A){var M=x(g);return ni(g)?M:qe(M,A(g))}function jo(g){return kt.call(g)}function Ho(g){if(!Jt(g)||na(g))return!1;var x=ri(g)||vt(g)?S:F;return x.test(it(g))}function Go(g){if(!Xi(g))return $e(g);var x=[];for(var A in Object(g))Ve.call(g,A)&&A!="constructor"&&x.push(A);return x}function hr(g,x){if(x)return g.slice();var A=new g.constructor(g.length);return g.copy(A),A}function ei(g){var x=new g.constructor(g.byteLength);return new W(x).set(new W(g)),x}function $n(g,x){var A=x?ei(g.buffer):g.buffer;return new g.constructor(A,g.byteOffset,g.byteLength)}function Yi(g,x,A){var M=x?A(Me(g),!0):Me(g);return Ue(M,te,new g.constructor)}function Zi(g){var x=new g.constructor(g.source,$.exec(g));return x.lastIndex=g.lastIndex,x}function Ko(g,x,A){var M=x?A(We(g),!0):We(g);return Ue(M,ce,new g.constructor)}function Wo(g){return Ki?Object(Ki.call(g)):{}}function Vo(g,x){var A=x?ei(g.buffer):g.buffer;return new g.constructor(A,g.byteOffset,g.length)}function Yo(g,x){var A=-1,M=g.length;for(x||(x=Array(M));++A<M;)x[A]=g[A];return x}function ti(g,x,A,M){A||(A={});for(var ue=-1,ie=x.length;++ue<ie;){var we=x[ue],Ee=void 0;Vi(A,we,Ee===void 0?g[we]:Ee)}return A}function Zo(g,x){return ti(g,hn(g),x)}function Xo(g){return zo(g,ii,hn)}function zn(g,x){var A=g.__data__;return ta(x)?A[typeof x=="string"?"string":"hash"]:A.map}function Ft(g,x){var A=bt(g,x);return Ho(A)?A:void 0}var hn=Pt?me(Pt,Object):ia,pn=jo;(yt&&pn(new yt(new ArrayBuffer(1)))!=N||je&&pn(new je)!=h||Bt&&pn(Bt.resolve())!=m||ur&&pn(new ur)!=y||Wr&&pn(new Wr)!=T)&&(pn=function(g){var x=kt.call(g),A=x==p?g.constructor:void 0,M=A?it(A):void 0;if(M)switch(M){case Vr:return N;case Un:return h;case Yr:return m;case Zr:return y;case Xr:return T}return x});function Qo(g){var x=g.length,A=g.constructor(x);return x&&typeof g[0]=="string"&&Ve.call(g,"index")&&(A.index=g.index,A.input=g.input),A}function Qt(g){return typeof g.constructor=="function"&&!Xi(g)?$o(re(g)):{}}function Jo(g,x,A,M){var ue=g.constructor;switch(x){case C:return ei(g);case a:case l:return new ue(+g);case N:return $n(g,M);case B:case U:case G:case O:case H:case P:case ne:case X:case Y:return Vo(g,M);case h:return Yi(g,M,A);case f:case _:return new ue(g);case b:return Zi(g);case y:return Ko(g,M,A);case v:return Wo(g)}}function ea(g,x){return x=x??i,!!x&&(typeof g=="number"||K.test(g))&&g>-1&&g%1==0&&g<x}function ta(g){var x=typeof g;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?g!=="__proto__":g===null}function na(g){return!!Dt&&Dt in g}function Xi(g){var x=g&&g.constructor,A=typeof x=="function"&&x.prototype||Ae;return g===A}function it(g){if(g!=null){try{return ct.call(g)}catch{}try{return g+""}catch{}}return""}function Qi(g){return Jr(g,!0,!0)}function Ji(g,x){return g===x||g!==g&&x!==x}function pr(g){return ra(g)&&Ve.call(g,"callee")&&(!ut.call(g,"callee")||kt.call(g)==s)}var ni=Array.isArray;function gr(g){return g!=null&&ts(g.length)&&!ri(g)}function ra(g){return ns(g)&&gr(g)}var es=Nt||sa;function ri(g){var x=Jt(g)?kt.call(g):"";return x==u||x==d}function ts(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=i}function Jt(g){var x=typeof g;return!!g&&(x=="object"||x=="function")}function ns(g){return!!g&&typeof g=="object"}function ii(g){return gr(g)?dr(g):Go(g)}function ia(){return[]}function sa(){return!1}e.exports=Qi})(zs,zs.exports);var rg=zs.exports,js={exports:{}};js.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,s=2,o=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",b="[object Number]",y="[object Null]",_="[object Object]",v="[object Promise]",T="[object Proxy]",C="[object RegExp]",N="[object Set]",B="[object String]",U="[object Symbol]",G="[object Undefined]",O="[object WeakMap]",H="[object ArrayBuffer]",P="[object DataView]",ne="[object Float32Array]",X="[object Float64Array]",Y="[object Int8Array]",L="[object Int16Array]",$="[object Int32Array]",F="[object Uint8Array]",K="[object Uint8ClampedArray]",w="[object Uint16Array]",Q="[object Uint32Array]",le=/[\\^$.*+?()[\]{}|]/g,k=/^\[object .+?Constructor\]$/,ge=/^(?:0|[1-9]\d*)$/,se={};se[ne]=se[X]=se[Y]=se[L]=se[$]=se[F]=se[K]=se[w]=se[Q]=!0,se[a]=se[l]=se[H]=se[u]=se[P]=se[d]=se[h]=se[f]=se[m]=se[b]=se[_]=se[C]=se[N]=se[B]=se[O]=!1;var _e=typeof It=="object"&&It&&It.Object===Object&&It,te=typeof self=="object"&&self&&self.Object===Object&&self,ce=_e||te||Function("return this")(),Ne=t&&!t.nodeType&&t,qe=Ne&&!0&&e&&!e.nodeType&&e,Ue=qe&&qe.exports===Ne,Lt=Ue&&_e.process,bt=function(){try{return Lt&&Lt.binding&&Lt.binding("util")}catch{}}(),vt=bt&&bt.isTypedArray;function Me(g,x){for(var A=-1,M=g==null?0:g.length,ue=0,ie=[];++A<M;){var we=g[A];x(we,A,g)&&(ie[ue++]=we)}return ie}function me(g,x){for(var A=-1,M=x.length,ue=g.length;++A<M;)g[ue+A]=x[A];return g}function We(g,x){for(var A=-1,M=g==null?0:g.length;++A<M;)if(x(g[A],A,g))return!0;return!1}function oe(g,x){for(var A=-1,M=Array(g);++A<g;)M[A]=x(A);return M}function Mt(g){return function(x){return g(x)}}function Ae(g,x){return g.has(x)}function ye(g,x){return g==null?void 0:g[x]}function Dt(g){var x=-1,A=Array(g.size);return g.forEach(function(M,ue){A[++x]=[ue,M]}),A}function ct(g,x){return function(A){return g(x(A))}}function Ve(g){var x=-1,A=Array(g.size);return g.forEach(function(M){A[++x]=M}),A}var kt=Array.prototype,S=Function.prototype,I=Object.prototype,j=ce["__core-js_shared__"],W=S.toString,re=I.hasOwnProperty,Te=function(){var g=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""}(),ut=I.toString,rt=RegExp("^"+W.call(re).replace(le,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pt=Ue?ce.Buffer:void 0,Nt=ce.Symbol,$e=ce.Uint8Array,yt=I.propertyIsEnumerable,je=kt.splice,Bt=Nt?Nt.toStringTag:void 0,ur=Object.getOwnPropertySymbols,Wr=Pt?Pt.isBuffer:void 0,qn=ct(Object.keys,Object),Vr=hn(ce,"DataView"),Un=hn(ce,"Map"),Yr=hn(ce,"Promise"),Zr=hn(ce,"Set"),Xr=hn(ce,"WeakMap"),kn=hn(Object,"create"),Ki=it(Vr),fn=it(Un),vo=it(Yr),ko=it(Zr),No=it(Xr),Wi=Nt?Nt.prototype:void 0,Qr=Wi?Wi.valueOf:void 0;function He(g){var x=-1,A=g==null?0:g.length;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function Ao(){this.__data__=kn?kn(null):{},this.size=0}function So(g){var x=this.has(g)&&delete this.__data__[g];return this.size-=x?1:0,x}function To(g){var x=this.__data__;if(kn){var A=x[g];return A===r?void 0:A}return re.call(x,g)?x[g]:void 0}function Co(g){var x=this.__data__;return kn?x[g]!==void 0:re.call(x,g)}function Oo(g,x){var A=this.__data__;return this.size+=this.has(g)?0:1,A[g]=kn&&x===void 0?r:x,this}He.prototype.clear=Ao,He.prototype.delete=So,He.prototype.get=To,He.prototype.has=Co,He.prototype.set=Oo;function Ye(g){var x=-1,A=g==null?0:g.length;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function Io(){this.__data__=[],this.size=0}function Ro(g){var x=this.__data__,A=hr(x,g);if(A<0)return!1;var M=x.length-1;return A==M?x.pop():je.call(x,A,1),--this.size,!0}function Lo(g){var x=this.__data__,A=hr(x,g);return A<0?void 0:x[A][1]}function Mo(g){return hr(this.__data__,g)>-1}function Do(g,x){var A=this.__data__,M=hr(A,g);return M<0?(++this.size,A.push([g,x])):A[M][1]=x,this}Ye.prototype.clear=Io,Ye.prototype.delete=Ro,Ye.prototype.get=Lo,Ye.prototype.has=Mo,Ye.prototype.set=Do;function dt(g){var x=-1,A=g==null?0:g.length;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function Po(){this.size=0,this.__data__={hash:new He,map:new(Un||Ye),string:new He}}function Bo(g){var x=Ft(this,g).delete(g);return this.size-=x?1:0,x}function Fo(g){return Ft(this,g).get(g)}function qo(g){return Ft(this,g).has(g)}function Uo(g,x){var A=Ft(this,g),M=A.size;return A.set(g,x),this.size+=A.size==M?0:1,this}dt.prototype.clear=Po,dt.prototype.delete=Bo,dt.prototype.get=Fo,dt.prototype.has=qo,dt.prototype.set=Uo;function dr(g){var x=-1,A=g==null?0:g.length;for(this.__data__=new dt;++x<A;)this.add(g[x])}function Vi(g){return this.__data__.set(g,r),this}function fr(g){return this.__data__.has(g)}dr.prototype.add=dr.prototype.push=Vi,dr.prototype.has=fr;function Xt(g){var x=this.__data__=new Ye(g);this.size=x.size}function Jr(){this.__data__=new Ye,this.size=0}function $o(g){var x=this.__data__,A=x.delete(g);return this.size=x.size,A}function zo(g){return this.__data__.get(g)}function jo(g){return this.__data__.has(g)}function Ho(g,x){var A=this.__data__;if(A instanceof Ye){var M=A.__data__;if(!Un||M.length<n-1)return M.push([g,x]),this.size=++A.size,this;A=this.__data__=new dt(M)}return A.set(g,x),this.size=A.size,this}Xt.prototype.clear=Jr,Xt.prototype.delete=$o,Xt.prototype.get=zo,Xt.prototype.has=jo,Xt.prototype.set=Ho;function Go(g,x){var A=pr(g),M=!A&&Ji(g),ue=!A&&!M&&gr(g),ie=!A&&!M&&!ue&&ns(g),we=A||M||ue||ie,Ee=we?oe(g.length,String):[],De=Ee.length;for(var ve in g)re.call(g,ve)&&!(we&&(ve=="length"||ue&&(ve=="offset"||ve=="parent")||ie&&(ve=="buffer"||ve=="byteLength"||ve=="byteOffset")||Jo(ve,De)))&&Ee.push(ve);return Ee}function hr(g,x){for(var A=g.length;A--;)if(Qi(g[A][0],x))return A;return-1}function ei(g,x,A){var M=x(g);return pr(g)?M:me(M,A(g))}function $n(g){return g==null?g===void 0?G:y:Bt&&Bt in Object(g)?pn(g):Xi(g)}function Yi(g){return Jt(g)&&$n(g)==a}function Zi(g,x,A,M,ue){return g===x?!0:g==null||x==null||!Jt(g)&&!Jt(x)?g!==g&&x!==x:Ko(g,x,A,M,Zi,ue)}function Ko(g,x,A,M,ue,ie){var we=pr(g),Ee=pr(x),De=we?l:Qt(g),ve=Ee?l:Qt(x);De=De==a?_:De,ve=ve==a?_:ve;var Ze=De==_,ft=ve==_,Be=De==ve;if(Be&&gr(g)){if(!gr(x))return!1;we=!0,Ze=!1}if(Be&&!Ze)return ie||(ie=new Xt),we||ns(g)?ti(g,x,A,M,ue,ie):Zo(g,x,De,A,M,ue,ie);if(!(A&i)){var Xe=Ze&&re.call(g,"__wrapped__"),Ge=ft&&re.call(x,"__wrapped__");if(Xe||Ge){var Nn=Xe?g.value():g,gn=Ge?x.value():x;return ie||(ie=new Xt),ue(Nn,gn,A,M,ie)}}return Be?(ie||(ie=new Xt),Xo(g,x,A,M,ue,ie)):!1}function Wo(g){if(!ts(g)||ta(g))return!1;var x=es(g)?rt:k;return x.test(it(g))}function Vo(g){return Jt(g)&&ri(g.length)&&!!se[$n(g)]}function Yo(g){if(!na(g))return qn(g);var x=[];for(var A in Object(g))re.call(g,A)&&A!="constructor"&&x.push(A);return x}function ti(g,x,A,M,ue,ie){var we=A&i,Ee=g.length,De=x.length;if(Ee!=De&&!(we&&De>Ee))return!1;var ve=ie.get(g);if(ve&&ie.get(x))return ve==x;var Ze=-1,ft=!0,Be=A&s?new dr:void 0;for(ie.set(g,x),ie.set(x,g);++Ze<Ee;){var Xe=g[Ze],Ge=x[Ze];if(M)var Nn=we?M(Ge,Xe,Ze,x,g,ie):M(Xe,Ge,Ze,g,x,ie);if(Nn!==void 0){if(Nn)continue;ft=!1;break}if(Be){if(!We(x,function(gn,jn){if(!Ae(Be,jn)&&(Xe===gn||ue(Xe,gn,A,M,ie)))return Be.push(jn)})){ft=!1;break}}else if(!(Xe===Ge||ue(Xe,Ge,A,M,ie))){ft=!1;break}}return ie.delete(g),ie.delete(x),ft}function Zo(g,x,A,M,ue,ie,we){switch(A){case P:if(g.byteLength!=x.byteLength||g.byteOffset!=x.byteOffset)return!1;g=g.buffer,x=x.buffer;case H:return!(g.byteLength!=x.byteLength||!ie(new $e(g),new $e(x)));case u:case d:case b:return Qi(+g,+x);case h:return g.name==x.name&&g.message==x.message;case C:case B:return g==x+"";case m:var Ee=Dt;case N:var De=M&i;if(Ee||(Ee=Ve),g.size!=x.size&&!De)return!1;var ve=we.get(g);if(ve)return ve==x;M|=s,we.set(g,x);var Ze=ti(Ee(g),Ee(x),M,ue,ie,we);return we.delete(g),Ze;case U:if(Qr)return Qr.call(g)==Qr.call(x)}return!1}function Xo(g,x,A,M,ue,ie){var we=A&i,Ee=zn(g),De=Ee.length,ve=zn(x),Ze=ve.length;if(De!=Ze&&!we)return!1;for(var ft=De;ft--;){var Be=Ee[ft];if(!(we?Be in x:re.call(x,Be)))return!1}var Xe=ie.get(g);if(Xe&&ie.get(x))return Xe==x;var Ge=!0;ie.set(g,x),ie.set(x,g);for(var Nn=we;++ft<De;){Be=Ee[ft];var gn=g[Be],jn=x[Be];if(M)var Lc=we?M(jn,gn,Be,x,g,ie):M(gn,jn,Be,g,x,ie);if(!(Lc===void 0?gn===jn||ue(gn,jn,A,M,ie):Lc)){Ge=!1;break}Nn||(Nn=Be=="constructor")}if(Ge&&!Nn){var rs=g.constructor,is=x.constructor;rs!=is&&"constructor"in g&&"constructor"in x&&!(typeof rs=="function"&&rs instanceof rs&&typeof is=="function"&&is instanceof is)&&(Ge=!1)}return ie.delete(g),ie.delete(x),Ge}function zn(g){return ei(g,ii,Qo)}function Ft(g,x){var A=g.__data__;return ea(x)?A[typeof x=="string"?"string":"hash"]:A.map}function hn(g,x){var A=ye(g,x);return Wo(A)?A:void 0}function pn(g){var x=re.call(g,Bt),A=g[Bt];try{g[Bt]=void 0;var M=!0}catch{}var ue=ut.call(g);return M&&(x?g[Bt]=A:delete g[Bt]),ue}var Qo=ur?function(g){return g==null?[]:(g=Object(g),Me(ur(g),function(x){return yt.call(g,x)}))}:ia,Qt=$n;(Vr&&Qt(new Vr(new ArrayBuffer(1)))!=P||Un&&Qt(new Un)!=m||Yr&&Qt(Yr.resolve())!=v||Zr&&Qt(new Zr)!=N||Xr&&Qt(new Xr)!=O)&&(Qt=function(g){var x=$n(g),A=x==_?g.constructor:void 0,M=A?it(A):"";if(M)switch(M){case Ki:return P;case fn:return m;case vo:return v;case ko:return N;case No:return O}return x});function Jo(g,x){return x=x??o,!!x&&(typeof g=="number"||ge.test(g))&&g>-1&&g%1==0&&g<x}function ea(g){var x=typeof g;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?g!=="__proto__":g===null}function ta(g){return!!Te&&Te in g}function na(g){var x=g&&g.constructor,A=typeof x=="function"&&x.prototype||I;return g===A}function Xi(g){return ut.call(g)}function it(g){if(g!=null){try{return W.call(g)}catch{}try{return g+""}catch{}}return""}function Qi(g,x){return g===x||g!==g&&x!==x}var Ji=Yi(function(){return arguments}())?Yi:function(g){return Jt(g)&&re.call(g,"callee")&&!yt.call(g,"callee")},pr=Array.isArray;function ni(g){return g!=null&&ri(g.length)&&!es(g)}var gr=Wr||sa;function ra(g,x){return Zi(g,x)}function es(g){if(!ts(g))return!1;var x=$n(g);return x==f||x==p||x==c||x==T}function ri(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=o}function ts(g){var x=typeof g;return g!=null&&(x=="object"||x=="function")}function Jt(g){return g!=null&&typeof g=="object"}var ns=vt?Mt(vt):Vo;function ii(g){return ni(g)?Go(g):Yo(g)}function ia(){return[]}function sa(){return!1}e.exports=ra})(js,js.exports);var ig=js.exports,pc={};Object.defineProperty(pc,"__esModule",{value:!0});const rO=rg,iO=ig;var gl;(function(e){function t(s={},o={},a=!1){typeof s!="object"&&(s={}),typeof o!="object"&&(o={});let l=rO(o);a||(l=Object.keys(l).reduce((c,u)=>(l[u]!=null&&(c[u]=l[u]),c),{}));for(const c in s)s[c]!==void 0&&o[c]===void 0&&(l[c]=s[c]);return Object.keys(l).length>0?l:void 0}e.compose=t;function n(s={},o={}){typeof s!="object"&&(s={}),typeof o!="object"&&(o={});const a=Object.keys(s).concat(Object.keys(o)).reduce((l,c)=>(iO(s[c],o[c])||(l[c]=o[c]===void 0?null:o[c]),l),{});return Object.keys(a).length>0?a:void 0}e.diff=n;function r(s={},o={}){s=s||{};const a=Object.keys(o).reduce((l,c)=>(o[c]!==s[c]&&s[c]!==void 0&&(l[c]=o[c]),l),{});return Object.keys(s).reduce((l,c)=>(s[c]!==o[c]&&o[c]===void 0&&(l[c]=null),l),a)}e.invert=r;function i(s,o,a=!1){if(typeof s!="object")return o;if(typeof o!="object")return;if(!a)return o;const l=Object.keys(o).reduce((c,u)=>(s[u]===void 0&&(c[u]=o[u]),c),{});return Object.keys(l).length>0?l:void 0}e.transform=i})(gl||(gl={}));pc.default=gl;var fo={};Object.defineProperty(fo,"__esModule",{value:!0});var ml;(function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t})(ml||(ml={}));fo.default=ml;var gc={};Object.defineProperty(gc,"__esModule",{value:!0});const Od=fo;class sO{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);const n=this.ops[this.index];if(n){const r=this.offset,i=Od.default.length(n);if(t>=i-r?(t=i-r,this.index+=1,this.offset=0):this.offset+=t,typeof n.delete=="number")return{delete:t};{const s={};return n.attributes&&(s.attributes=n.attributes),typeof n.retain=="number"?s.retain=t:typeof n.retain=="object"&&n.retain!==null?s.retain=n.retain:typeof n.insert=="string"?s.insert=n.insert.substr(r,t):s.insert=n.insert,s}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?Od.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const t=this.ops[this.index];return t?typeof t.delete=="number"?"delete":typeof t.retain=="number"||typeof t.retain=="object"&&t.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const t=this.offset,n=this.index,r=this.next(),i=this.ops.slice(this.index);return this.offset=t,this.index=n,[r].concat(i)}}else return[]}}gc.default=sO;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=nO,r=rg,i=ig,s=pc;t.AttributeMap=s.default;const o=fo;t.Op=o.default;const a=gc;t.OpIterator=a.default;const l="\0",c=(d,h)=>{if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const f=Object.keys(d)[0];if(!f||f!==Object.keys(h)[0])throw new Error(`embed types not matched: ${f} != ${Object.keys(h)[0]}`);return[f,d[f],h[f]]};class u{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,f){this.handlers[h]=f}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const f=this.handlers[h];if(!f)throw new Error(`no handlers for embed type "${h}"`);return f}insert(h,f){const p={};return typeof h=="string"&&h.length===0?this:(p.insert=h,f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,f){if(typeof h=="number"&&h<=0)return this;const p={retain:h};return f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p)}push(h){let f=this.ops.length,p=this.ops[f-1];if(h=r(h),typeof p=="object"){if(typeof h.delete=="number"&&typeof p.delete=="number")return this.ops[f-1]={delete:p.delete+h.delete},this;if(typeof p.delete=="number"&&h.insert!=null&&(f-=1,p=this.ops[f-1],typeof p!="object"))return this.ops.unshift(h),this;if(i(h.attributes,p.attributes)){if(typeof h.insert=="string"&&typeof p.insert=="string")return this.ops[f-1]={insert:p.insert+h.insert},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof p.retain=="number")return this.ops[f-1]={retain:p.retain+h.retain},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this}}return f===this.ops.length?this.ops.push(h):this.ops.splice(f,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const f=[],p=[];return this.forEach(m=>{(h(m)?f:p).push(m)}),[f,p]}reduce(h,f){return this.ops.reduce(h,f)}changeLength(){return this.reduce((h,f)=>f.insert?h+o.default.length(f):f.delete?h-f.delete:h,0)}length(){return this.reduce((h,f)=>h+o.default.length(f),0)}slice(h=0,f=1/0){const p=[],m=new a.default(this.ops);let b=0;for(;b<f&&m.hasNext();){let y;b<h?y=m.next(h-b):(y=m.next(f-b),p.push(y)),b+=o.default.length(y)}return new u(p)}compose(h){const f=new a.default(this.ops),p=new a.default(h.ops),m=[],b=p.peek();if(b!=null&&typeof b.retain=="number"&&b.attributes==null){let _=b.retain;for(;f.peekType()==="insert"&&f.peekLength()<=_;)_-=f.peekLength(),m.push(f.next());b.retain-_>0&&p.next(b.retain-_)}const y=new u(m);for(;f.hasNext()||p.hasNext();)if(p.peekType()==="insert")y.push(p.next());else if(f.peekType()==="delete")y.push(f.next());else{const _=Math.min(f.peekLength(),p.peekLength()),v=f.next(_),T=p.next(_);if(T.retain){const C={};if(typeof v.retain=="number")C.retain=typeof T.retain=="number"?_:T.retain;else if(typeof T.retain=="number")v.retain==null?C.insert=v.insert:C.retain=v.retain;else{const B=v.retain==null?"insert":"retain",[U,G,O]=c(v[B],T.retain),H=u.getHandler(U);C[B]={[U]:H.compose(G,O,B==="retain")}}const N=s.default.compose(v.attributes,T.attributes,typeof v.retain=="number");if(N&&(C.attributes=N),y.push(C),!p.hasNext()&&i(y.ops[y.ops.length-1],C)){const B=new u(f.rest());return y.concat(B).chop()}}else typeof T.delete=="number"&&(typeof v.retain=="number"||typeof v.retain=="object"&&v.retain!==null)&&y.push(T)}return y.chop()}concat(h){const f=new u(this.ops.slice());return h.ops.length>0&&(f.push(h.ops[0]),f.ops=f.ops.concat(h.ops.slice(1))),f}diff(h,f){if(this.ops===h.ops)return new u;const p=[this,h].map(v=>v.map(T=>{if(T.insert!=null)return typeof T.insert=="string"?T.insert:l;const C=v===h?"on":"with";throw new Error("diff() called "+C+" non-document")}).join("")),m=new u,b=n(p[0],p[1],f,!0),y=new a.default(this.ops),_=new a.default(h.ops);return b.forEach(v=>{let T=v[1].length;for(;T>0;){let C=0;switch(v[0]){case n.INSERT:C=Math.min(_.peekLength(),T),m.push(_.next(C));break;case n.DELETE:C=Math.min(T,y.peekLength()),y.next(C),m.delete(C);break;case n.EQUAL:C=Math.min(y.peekLength(),_.peekLength(),T);const N=y.next(C),B=_.next(C);i(N.insert,B.insert)?m.retain(C,s.default.diff(N.attributes,B.attributes)):m.push(B).delete(C);break}T-=C}}),m.chop()}eachLine(h,f=`
36
- `){const p=new a.default(this.ops);let m=new u,b=0;for(;p.hasNext();){if(p.peekType()!=="insert")return;const y=p.peek(),_=o.default.length(y)-p.peekLength(),v=typeof y.insert=="string"?y.insert.indexOf(f,_)-_:-1;if(v<0)m.push(p.next());else if(v>0)m.push(p.next(v));else{if(h(m,p.next(1).attributes||{},b)===!1)return;b+=1,m=new u}}m.length()>0&&h(m,{},b)}invert(h){const f=new u;return this.reduce((p,m)=>{if(m.insert)f.delete(o.default.length(m));else{if(typeof m.retain=="number"&&m.attributes==null)return f.retain(m.retain),p+m.retain;if(m.delete||typeof m.retain=="number"){const b=m.delete||m.retain;return h.slice(p,p+b).forEach(_=>{m.delete?f.push(_):m.retain&&m.attributes&&f.retain(o.default.length(_),s.default.invert(m.attributes,_.attributes))}),p+b}else if(typeof m.retain=="object"&&m.retain!==null){const b=h.slice(p,p+1),y=new a.default(b.ops).next(),[_,v,T]=c(m.retain,y.insert),C=u.getHandler(_);return f.retain({[_]:C.invert(v,T)},s.default.invert(m.attributes,y.attributes)),p+1}}return p},0),f.chop()}transform(h,f=!1){if(f=!!f,typeof h=="number")return this.transformPosition(h,f);const p=h,m=new a.default(this.ops),b=new a.default(p.ops),y=new u;for(;m.hasNext()||b.hasNext();)if(m.peekType()==="insert"&&(f||b.peekType()!=="insert"))y.retain(o.default.length(m.next()));else if(b.peekType()==="insert")y.push(b.next());else{const _=Math.min(m.peekLength(),b.peekLength()),v=m.next(_),T=b.next(_);if(v.delete)continue;if(T.delete)y.push(T);else{const C=v.retain,N=T.retain;let B=typeof N=="object"&&N!==null?N:_;if(typeof C=="object"&&C!==null&&typeof N=="object"&&N!==null){const U=Object.keys(C)[0];if(U===Object.keys(N)[0]){const G=u.getHandler(U);G&&(B={[U]:G.transform(C[U],N[U],f)})}}y.retain(B,s.default.transform(v.attributes,T.attributes,f))}}return y.chop()}transformPosition(h,f=!1){f=!!f;const p=new a.default(this.ops);let m=0;for(;p.hasNext()&&m<=h;){const b=p.peekLength(),y=p.peekType();if(p.next(),y==="delete"){h-=Math.min(b,h-m);continue}else y==="insert"&&(m<h||!f)&&(h+=b);m+=b}return h}}u.Op=o.default,u.OpIterator=a.default,u.AttributeMap=s.default,u.handlers={},t.default=u,e.exports=u,e.exports.default=u})(pl,pl.exports);var Rt=pl.exports;const J=Mi(Rt);class Vt extends _t{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Vt.blotName="break";Vt.tagName="BR";let Kt=class extends $s{};const oO={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ho(e){return e.replace(/[&<>"']/g,t=>oO[t])}const sn=class sn extends uc{static compare(t,n){const r=sn.order.indexOf(t),i=sn.order.indexOf(n);return r>=0||i>=0?r-i:t===n?0:t<n?-1:1}formatAt(t,n,r,i){if(sn.compare(this.statics.blotName,r)<0&&this.scroll.query(r,ee.BLOT)){const s=this.isolate(t,n);i&&s.wrap(r,i)}else super.formatAt(t,n,r,i)}optimize(t){if(super.optimize(t),this.parent instanceof sn&&sn.compare(this.statics.blotName,this.parent.statics.blotName)>0){const n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}};V(sn,"allowedChildren",[sn,Vt,_t,Kt]),V(sn,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let cn=sn;const Id=1;class Ke extends Ti{constructor(){super(...arguments);V(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=sg(this)),this.cache.delta}deleteAt(n,r){super.deleteAt(n,r),this.cache={}}formatAt(n,r,i,s){r<=0||(this.scroll.query(i,ee.BLOCK)?n+r===this.length()&&this.format(i,s):super.formatAt(n,Math.min(r,this.length()-n-1),i,s),this.cache={})}insertAt(n,r,i){if(i!=null){super.insertAt(n,r,i),this.cache={};return}if(r.length===0)return;const s=r.split(`
37
- `),o=s.shift();o.length>0&&(n<this.length()-1||this.children.tail==null?super.insertAt(Math.min(n,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});let a=this;s.reduce((l,c)=>(a=a.split(l,!0),a.insertAt(0,c),c.length),n+o.length)}insertBefore(n,r){const{head:i}=this.children;super.insertBefore(n,r),i instanceof Vt&&i.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Id),this.cache.length}moveChildren(n,r){super.moveChildren(n,r),this.cache={}}optimize(n){super.optimize(n),this.cache={}}path(n){return super.path(n,!0)}removeChild(n){super.removeChild(n),this.cache={}}split(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(n===0||n>=this.length()-Id)){const s=this.clone();return n===0?(this.parent.insertBefore(s,this),this):(this.parent.insertBefore(s,this.next),s)}const i=super.split(n,r);return this.cache={},i}}Ke.blotName="block";Ke.tagName="P";Ke.defaultChild=Vt;Ke.allowedChildren=[Vt,cn,_t,Kt];class Ot extends _t{attach(){super.attach(),this.attributes=new ao(this.domNode)}delta(){return new J().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,n){const r=this.scroll.query(t,ee.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,n)}formatAt(t,n,r,i){this.format(r,i)}insertAt(t,n,r){if(r!=null){super.insertAt(t,n,r);return}const i=n.split(`
38
- `),s=i.pop(),o=i.map(l=>{const c=this.scroll.create(Ke.blotName);return c.insertAt(0,l),c}),a=this.split(t);o.forEach(l=>{this.parent.insertBefore(l,a)}),s&&this.parent.insertBefore(this.scroll.create("text",s),a)}}Ot.scope=ee.BLOCK_BLOT;function sg(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.descendants(Qe).reduce((n,r)=>r.length()===0?n:n.insert(r.value(),Tt(r,{},t)),new J).insert(`
39
- `,Tt(e))}function Tt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e==null||("formats"in e&&typeof e.formats=="function"&&(t={...t,...e.formats()},n&&delete t["code-token"]),e.parent==null||e.parent.statics.blotName==="scroll"||e.parent.statics.scope!==e.statics.scope)?t:Tt(e.parent,t,n)}const At=class At extends _t{static value(){}constructor(t,n,r){super(t,n),this.selection=r,this.textNode=document.createTextNode(At.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,n){if(this.savedLength!==0){super.format(t,n);return}let r=this,i=0;for(;r!=null&&r.statics.scope!==ee.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=At.CONTENTS.length,r.optimize(),r.formatAt(i,At.CONTENTS.length,t,n),this.savedLength=0)}index(t,n){return t===this.textNode?0:super.index(t,n)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const n=this.prev instanceof Kt?this.prev:null,r=n?n.length():0,i=this.next instanceof Kt?this.next:null,s=i?i.text:"",{textNode:o}=this,a=o.data.split(At.CONTENTS).join("");o.data=At.CONTENTS;let l;if(n)l=n,(a||i)&&(n.insertAt(n.length(),a+s),i&&i.remove());else if(i)l=i,i.insertAt(0,a);else{const c=document.createTextNode(a);l=this.scroll.create(c),this.parent.insertBefore(l,this)}if(this.remove(),t){const c=(h,f)=>n&&h===n.domNode?f:h===o?r+f-1:i&&h===i.domNode?r+a.length+f:null,u=c(t.start.node,t.start.offset),d=c(t.end.node,t.end.offset);if(u!==null&&d!==null)return{startNode:l.domNode,startOffset:u,endNode:l.domNode,endOffset:d}}return null}update(t,n){if(t.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore();r&&(n.range=r)}}optimize(t){super.optimize(t);let{parent:n}=this;for(;n;){if(n.domNode.tagName==="A"){this.savedLength=At.CONTENTS.length,n.isolate(this.offset(n),this.length()).unwrap(),this.savedLength=0;break}n=n.parent}}value(){return""}};V(At,"blotName","cursor"),V(At,"className","ql-cursor"),V(At,"tagName","span"),V(At,"CONTENTS","\uFEFF");let Pr=At;var og={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function s(l,c,u,d,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var f=new i(u,d||l,h),p=n?n+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],f]:l._events[p].push(f):(l._events[p]=f,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},a.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,f=d.length,p=new Array(f);h<f;h++)p[h]=d[h].fn;return p},a.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},a.prototype.emit=function(c,u,d,h,f,p){var m=n?n+c:c;if(!this._events[m])return!1;var b=this._events[m],y=arguments.length,_,v;if(b.fn){switch(b.once&&this.removeListener(c,b.fn,void 0,!0),y){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,u),!0;case 3:return b.fn.call(b.context,u,d),!0;case 4:return b.fn.call(b.context,u,d,h),!0;case 5:return b.fn.call(b.context,u,d,h,f),!0;case 6:return b.fn.call(b.context,u,d,h,f,p),!0}for(v=1,_=new Array(y-1);v<y;v++)_[v-1]=arguments[v];b.fn.apply(b.context,_)}else{var T=b.length,C;for(v=0;v<T;v++)switch(b[v].once&&this.removeListener(c,b[v].fn,void 0,!0),y){case 1:b[v].fn.call(b[v].context);break;case 2:b[v].fn.call(b[v].context,u);break;case 3:b[v].fn.call(b[v].context,u,d);break;case 4:b[v].fn.call(b[v].context,u,d,h);break;default:if(!_)for(C=1,_=new Array(y-1);C<y;C++)_[C-1]=arguments[C];b[v].fn.apply(b[v].context,_)}}return!0},a.prototype.on=function(c,u,d){return s(this,c,u,d,!1)},a.prototype.once=function(c,u,d){return s(this,c,u,d,!0)},a.prototype.removeListener=function(c,u,d,h){var f=n?n+c:c;if(!this._events[f])return this;if(!u)return o(this,f),this;var p=this._events[f];if(p.fn)p.fn===u&&(!h||p.once)&&(!d||p.context===d)&&o(this,f);else{for(var m=0,b=[],y=p.length;m<y;m++)(p[m].fn!==u||h&&!p[m].once||d&&p[m].context!==d)&&b.push(p[m]);b.length?this._events[f]=b.length===1?b[0]:b:o(this,f)}return this},a.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a})(og);var aO=og.exports;const lO=Mi(aO),bl=new WeakMap,yl=["error","warn","log","info"];let xl="warn";function ag(e){if(xl&&yl.indexOf(e)<=yl.indexOf(xl)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console[e](...n)}}function vn(e){return yl.reduce((t,n)=>(t[n]=ag.bind(console,n,e),t),{})}vn.level=e=>{xl=e};ag.level=vn.level;const Ca=vn("quill:events"),cO=["selectionchange","mousedown","mouseup","click"];cO.forEach(e=>{document.addEventListener(e,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(i=>{const s=bl.get(i);s&&s.emitter&&s.emitter.handleDOM(...n)})})});class Z extends lO{constructor(){super(),this.domListeners={},this.on("error",Ca.error)}emit(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ca.log.call(Ca,...n),super.emit(...n)}handleDOM(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(this.domListeners[t.type]||[]).forEach(s=>{let{node:o,handler:a}=s;(t.target===o||o.contains(t.target))&&a(t,...r)})}listenDOM(t,n,r){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:n,handler:r})}}V(Z,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),V(Z,"sources",{API:"api",SILENT:"silent",USER:"user"});const Oa=vn("quill:selection");class Qn{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=n}}class uO{constructor(t,n){this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Qn(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,Z.sources.USER),1)}),this.emitter.on(Z.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(Z.events.SCROLL_UPDATE,(i,s)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);const o=s.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(o?Z.sources.SILENT:i)}catch{}})}),this.emitter.on(Z.events.SCROLL_OPTIMIZE,(r,i)=>{if(i.range){const{startNode:s,startOffset:o,endNode:a,endOffset:l}=i.range;this.setNativeRange(s,o,a,l),this.update(Z.sources.SILENT)}}),this.update(Z.sources.SILENT)}handleComposition(){this.emitter.on(Z.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(Z.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout(()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(Z.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,n){this.scroll.update();const r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(t,ee.BLOCK))){if(r.start.node!==this.cursor.textNode){const i=this.scroll.find(r.start.node,!1);if(i==null)return;if(i instanceof Qe){const s=i.split(r.start.offset);i.parent.insertBefore(this.cursor,s)}else i.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(t,n),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const r=this.scroll.length();t=Math.min(t,r-1),n=Math.min(t+n,r-1)-t;let i,[s,o]=this.scroll.leaf(t);if(s==null)return null;if(n>0&&o===s.length()){const[u]=this.scroll.leaf(t+1);if(u){const[d]=this.scroll.line(t),[h]=this.scroll.line(t+1);d===h&&(s=u,o=0)}}[i,o]=s.position(o,!0);const a=document.createRange();if(n>0)return a.setStart(i,o),[s,o]=this.scroll.leaf(t+n),s==null?null:([i,o]=s.position(o,!0),a.setEnd(i,o),a.getBoundingClientRect());let l="left",c;if(i instanceof Text){if(!i.data.length)return null;o<i.data.length?(a.setStart(i,o),a.setEnd(i,o+1)):(a.setStart(i,o-1),a.setEnd(i,o),l="right"),c=a.getBoundingClientRect()}else{if(!(s.domNode instanceof Element))return null;c=s.domNode.getBoundingClientRect(),o>0&&(l="right")}return{bottom:c.top+c.height,height:c.height,left:c[l],right:c[l],top:c.top,width:0}}getNativeRange(){const t=document.getSelection();if(t==null||t.rangeCount<=0)return null;const n=t.getRangeAt(0);if(n==null)return null;const r=this.normalizeNative(n);return Oa.info("getNativeRange",r),r}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const n=this.getNativeRange();return n==null?[null,null]:[this.normalizedToRange(n),n]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Ia(this.root,document.activeElement)}normalizedToRange(t){const n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);const r=n.map(o=>{const[a,l]=o,c=this.scroll.find(a,!0),u=c.offset(this.scroll);return l===0?u:c instanceof Qe?u+c.index(a,l):u+c.length()}),i=Math.min(Math.max(...r),this.scroll.length()-1),s=Math.min(i,...r);return new Qn(s,i-s)}normalizeNative(t){if(!Ia(this.root,t.startContainer)||!t.collapsed&&!Ia(this.root,t.endContainer))return null;const n={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[n.start,n.end].forEach(r=>{let{node:i,offset:s}=r;for(;!(i instanceof Text)&&i.childNodes.length>0;)if(i.childNodes.length>s)i=i.childNodes[s],s=0;else if(i.childNodes.length===s)i=i.lastChild,i instanceof Text?s=i.data.length:i.childNodes.length>0?s=i.childNodes.length:s=i.childNodes.length+1;else break;r.node=i,r.offset=s}),n}rangeToNative(t){const n=this.scroll.length(),r=(i,s)=>{i=Math.min(n-1,i);const[o,a]=this.scroll.leaf(i);return o?o.position(a,s):[null,-1]};return[...r(t.index,!1),...r(t.index+t.length,!0)]}setNativeRange(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Oa.info("setNativeRange",t,n,r,i),t!=null&&(this.root.parentNode==null||t.parentNode==null||r.parentNode==null))return;const o=document.getSelection();if(o!=null)if(t!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:a}=this.getNativeRange()||{};if(a==null||s||t!==a.startContainer||n!==a.startOffset||r!==a.endContainer||i!==a.endOffset){t instanceof Element&&t.tagName==="BR"&&(n=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),r instanceof Element&&r.tagName==="BR"&&(i=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const l=document.createRange();l.setStart(t,n),l.setEnd(r,i),o.removeAllRanges(),o.addRange(l)}}else o.removeAllRanges(),this.root.blur()}setRange(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Z.sources.API;if(typeof n=="string"&&(r=n,n=!1),Oa.info("setRange",t),t!=null){const i=this.rangeToNative(t);this.setNativeRange(...i,n)}else this.setNativeRange(null);this.update(r)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z.sources.USER;const n=this.lastRange,[r,i]=this.getRange();if(this.lastRange=r,this.lastNative=i,this.lastRange!=null&&(this.savedRange=this.lastRange),!On(n,this.lastRange)){if(!this.composing&&i!=null&&i.native.collapsed&&i.start.node!==this.cursor.textNode){const o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}const s=[Z.events.SELECTION_CHANGE,Tr(this.lastRange),Tr(n),t];this.emitter.emit(Z.events.EDITOR_CHANGE,...s),t!==Z.sources.SILENT&&this.emitter.emit(...s)}}}function Ia(e,t){try{t.parentNode}catch{return!1}return e.contains(t)}const dO=/^[ -~]*$/;class fO{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let n=this.scroll.length();this.scroll.batchStart();const r=Rd(t),i=new J;return pO(r.ops.slice()).reduce((o,a)=>{const l=Rt.Op.length(a);let c=a.attributes||{},u=!1,d=!1;if(a.insert!=null){if(i.retain(l),typeof a.insert=="string"){const p=a.insert;d=!p.endsWith(`
40
- `)&&(n<=o||!!this.scroll.descendant(Ot,o)[0]),this.scroll.insertAt(o,p);const[m,b]=this.scroll.line(o);let y=Mn({},Tt(m));if(m instanceof Ke){const[_]=m.descendant(Qe,b);_&&(y=Mn(y,Tt(_)))}c=Rt.AttributeMap.diff(y,c)||{}}else if(typeof a.insert=="object"){const p=Object.keys(a.insert)[0];if(p==null)return o;const m=this.scroll.query(p,ee.INLINE)!=null;if(m)(n<=o||this.scroll.descendant(Ot,o)[0])&&(d=!0);else if(o>0){const[b,y]=this.scroll.descendant(Qe,o-1);b instanceof Kt?b.value()[y]!==`
41
- `&&(u=!0):b instanceof _t&&b.statics.scope===ee.INLINE_BLOT&&(u=!0)}if(this.scroll.insertAt(o,p,a.insert[p]),m){const[b]=this.scroll.descendant(Qe,o);if(b){const y=Mn({},Tt(b));c=Rt.AttributeMap.diff(y,c)||{}}}}n+=l}else if(i.push(a),a.retain!==null&&typeof a.retain=="object"){const p=Object.keys(a.retain)[0];if(p==null)return o;this.scroll.updateEmbedAt(o,p,a.retain[p])}Object.keys(c).forEach(p=>{this.scroll.formatAt(o,l,p,c[p])});const h=u?1:0,f=d?1:0;return n+=h+f,i.retain(h),i.delete(f),o+l+h+f},0),i.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+Rt.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(t,n){return this.scroll.deleteAt(t,n),this.update(new J().retain(t).delete(n))}formatLine(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(s=>{this.scroll.lines(t,Math.max(n,1)).forEach(o=>{o.format(s,r[s])})}),this.scroll.optimize();const i=new J().retain(t).retain(n,Tr(r));return this.update(i)}formatText(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(s=>{this.scroll.formatAt(t,n,s,r[s])});const i=new J().retain(t).retain(n,Tr(r));return this.update(i)}getContents(t,n){return this.delta.slice(t,t+n)}getDelta(){return this.scroll.lines().reduce((t,n)=>t.concat(n.delta()),new J)}getFormat(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],i=[];n===0?this.scroll.path(t).forEach(a=>{const[l]=a;l instanceof Ke?r.push(l):l instanceof Qe&&i.push(l)}):(r=this.scroll.lines(t,n),i=this.scroll.descendants(Qe,t,n));const[s,o]=[r,i].map(a=>{const l=a.shift();if(l==null)return{};let c=Tt(l);for(;Object.keys(c).length>0;){const u=a.shift();if(u==null)return c;c=hO(Tt(u),c)}return c});return{...s,...o}}getHTML(t,n){const[r,i]=this.scroll.line(t);if(r){const s=r.length();return r.length()>=i+n&&!(i===0&&n===s)?Oi(r,i,n,!0):Oi(this.scroll,t,n,!0)}return""}getText(t,n){return this.getContents(t,n).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(t,n){const r=Rd(n),i=new J().retain(t).concat(r);return this.scroll.insertContents(t,r),this.update(i)}insertEmbed(t,n,r){return this.scroll.insertAt(t,n,r),this.update(new J().retain(t).insert({[n]:r}))}insertText(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return n=n.replace(/\r\n/g,`
42
+ `))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),l=n.enter("phrasing");s.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
43
+ `,...s.current()});return/^[\t ]/.test(c)&&(c=Li(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),o(),c}mp.peek=Fv;function mp(e){return e.value||""}function Fv(){return"<"}bp.peek=$v;function bp(e,t,n,r){const i=Ec(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),c+=l.move(")"),a(),c}function $v(){return"!"}yp.peek=Uv;function yp(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");const c=n.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=u,s(),i==="full"||!c||c!==d?l+=o.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function Uv(){return"!"}xp.peek=qv;function xp(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let l;if(a.atBreak)for(;l=o.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function qv(){return"`"}function Ep(e,t){const n=pp(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}wp.peek=jv;function wp(e,t,n,r){const i=Ec(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,l;if(Ep(e,n)){const u=n.stack;n.stack=[],o=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),o(),n.stack=u,d}o=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),o(),c}function jv(e,t,n){return Ep(e,n)?"<":"["}vp.peek=zv;function vp(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=u,s(),i==="full"||!c||c!==d?l+=o.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function zv(){return"["}function wc(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Hv(e){const t=wc(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Gv(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function _p(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Kv(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?Gv(n):wc(n);const o=e.ordered?a==="."?")":".":Hv(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),_p(n)===a&&u){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),c}function Vv(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Wv(e,t,n,r){const i=Vv(n);let s=n.bulletCurrent||wc(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),u);return l(),c;function u(d,h,f){return h?(f?"":" ".repeat(a))+d:(f?s:s+" ".repeat(a-s.length))+d}}function Yv(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const kp=function(e){if(e==null)return Qv;if(typeof e=="function")return ma(e);if(typeof e=="object")return Array.isArray(e)?Zv(e):Xv(e);if(typeof e=="string")return Jv(e);throw new Error("Expected function, string, or object as test")};function Zv(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kp(e[n]);return ma(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Xv(e){const t=e;return ma(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function Jv(e){return ma(t);function t(n){return n&&n.type===e}}function ma(e){return t;function t(n,r,i){return!!(e_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Qv(){return!0}function e_(e){return e!==null&&typeof e=="object"&&"type"in e}const t_=kp(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function n_(e,t,n,r){return(e.children.some(function(a){return t_(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function r_(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Np.peek=i_;function Np(e,t,n,r){const i=r_(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const c=l.charCodeAt(0),u=Ys(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=Li(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ys(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+Li(d));const f=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},o+l+f}function i_(e,t,n){return n.options.strong||"*"}function s_(e,t,n,r){return n.safe(e.value,r)}function a_(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function o_(e,t,n){const r=(_p(n)+(n.options.ruleSpaces?" ":"")).repeat(a_(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Sp={blockquote:hv,break:bd,code:xv,definition:wv,emphasis:dp,hardBreak:bd,heading:Bv,html:mp,image:bp,imageReference:yp,inlineCode:xp,link:wp,linkReference:vp,list:Kv,listItem:Wv,paragraph:Yv,root:n_,strong:Np,text:s_,thematicBreak:o_};function l_(){return{enter:{table:c_,tableData:xd,tableHeader:xd,tableRow:d_},exit:{codeText:f_,table:u_,tableData:qo,tableHeader:qo,tableRow:qo}}}function c_(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function u_(e){this.exit(e),this.data.inTable=void 0}function d_(e){this.enter({type:"tableRow",children:[]},e)}function qo(e){this.exit(e)}function xd(e){this.enter({type:"tableCell",children:[]},e)}function f_(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,h_));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function h_(e,t){return t==="|"?t:e}function p_(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
44
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:a,tableCell:l,tableRow:o}};function a(f,p,g,b){return c(u(f,g,b),f.align)}function o(f,p,g,b){const y=d(f,g,b),w=c([y]);return w.slice(0,w.indexOf(`
45
+ `))}function l(f,p,g,b){const y=g.enter("tableCell"),w=g.enter("phrasing"),_=g.containerPhrasing(f,{...b,before:s,after:s});return w(),y(),_}function c(f,p){return dv(f,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function u(f,p,g){const b=f.children;let y=-1;const w=[],_=p.enter("table");for(;++y<b.length;)w[y]=d(b[y],p,g);return _(),w}function d(f,p,g){const b=f.children;let y=-1;const w=[],_=p.enter("tableRow");for(;++y<b.length;)w[y]=l(b[y],f,p,g);return _(),w}function h(f,p,g){let b=Sp.inlineCode(f,p,g);return g.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function g_(){return{exit:{taskListCheckValueChecked:Ed,taskListCheckValueUnchecked:Ed,paragraph:b_}}}function m_(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:y_}}}function Ed(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function b_(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function y_(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let l=Sp.listItem(e,t,n,{...r,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function x_(){return[Mw(),tv(),sv(),l_(),g_()]}function E_(e){return{extensions:[Dw(),nv(e),av(),p_(e),m_()]}}const w_={tokenize:A_,partial:!0},Ap={tokenize:T_,partial:!0},Tp={tokenize:C_,partial:!0},Cp={tokenize:O_,partial:!0},v_={tokenize:I_,partial:!0},Op={name:"wwwAutolink",tokenize:N_,previous:Rp},Ip={name:"protocolAutolink",tokenize:S_,previous:Lp},Sn={name:"emailAutolink",tokenize:k_,previous:Mp},pn={};function __(){return{text:pn}}let Zn=48;for(;Zn<123;)pn[Zn]=Sn,Zn++,Zn===58?Zn=65:Zn===91&&(Zn=97);pn[43]=Sn;pn[45]=Sn;pn[46]=Sn;pn[95]=Sn;pn[72]=[Sn,Ip];pn[104]=[Sn,Ip];pn[87]=[Sn,Op];pn[119]=[Sn,Op];function k_(e,t,n){const r=this;let i,s;return a;function a(d){return!kl(d)||!Mp.call(r,r.previous)||vc(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return kl(d)?(e.consume(d),o):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(v_,u,c)(d):d===45||d===95||tt(d)?(s=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return s&&i&&ct(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function N_(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Rp.call(r,r.previous)||vc(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(w_,e.attempt(Ap,e.attempt(Tp,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function S_(e,t,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&Lp.call(r,r.previous)&&!vc(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),o):n(d)}function o(d){if(ct(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),s?c:(s=!0,l)):n(d)}function c(d){return d===null||Ks(d)||Te(d)||nr(d)||ca(d)?n(d):e.attempt(Ap,e.attempt(Tp,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function A_(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function T_(e,t,n){let r,i,s;return a;function a(c){return c===46||c===95?e.check(Cp,l,o)(c):c===null||Te(c)||nr(c)||c!==45&&ca(c)?l(c):(s=!0,e.consume(c),a)}function o(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),a}function l(c){return i||r||!s?n(c):t(c)}}function C_(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Cp,t,s)(a):a===null||Te(a)||nr(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function O_(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||Te(o)||nr(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Te(o)||nr(o)?t(o):r(o)}function s(o){return ct(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):ct(o)?(e.consume(o),a):n(o)}}function I_(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return tt(s)?n(s):t(s)}}function Rp(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Te(e)}function Lp(e){return!ct(e)}function Mp(e){return!(e===47||kl(e))}function kl(e){return e===43||e===45||e===46||e===95||tt(e)}function vc(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const R_={tokenize:U_,partial:!0};function L_(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:B_,continuation:{tokenize:F_},exit:$_}},text:{91:{name:"gfmFootnoteCall",tokenize:P_},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:M_,resolveTo:D_}}}}function M_(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const c=Vt(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function D_(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function P_(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(s>999||d===93&&!a||d===null||d===91||Te(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(Vt(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Te(d)||(a=!0),s++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function B_(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(p)}function u(p){if(a>999||p===93&&!o||p===null||p===91||Te(p))return n(p);if(p===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return s=Vt(r.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Te(p)||(o=!0),a++,e.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,u):u(p)}function h(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ee(e,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return t(p)}}function F_(e,t,n){return e.check(Ki,t,e.attempt(R_,t,n))}function $_(e){e.exit("gfmFootnoteDefinition")}function U_(e,t,n){const r=this;return Ee(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function q_(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",u,o],["enter",a[c][1],o],["exit",a[c][1],o],["enter",d,o]],f=o.parser.constructs.insideSpan.null;f&&kt(h,h.length,0,ua(f,a.slice(c+1,l),o)),kt(h,h.length,0,[["exit",d,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",u,o]]),kt(a,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,o,l){const c=this.previous,u=this.events;let d=0;return h;function h(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(a.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const g=$r(c);if(p===126)return d>1?l(p):(a.consume(p),d++,f);if(d<2&&!n)return l(p);const b=a.exit("strikethroughSequenceTemporary"),y=$r(p);return b._open=!y||y===2&&!!g,b._close=!g||g===2&&!!y,o(p)}}}class j_{constructor(){this.map=[]}add(t,n,r){z_(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function z_(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function H_(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function G_(){return{flow:{null:{name:"table",tokenize:K_,resolveAll:V_}}}}function K_(e,t,n){const r=this;let i=0,s=0,a;return o;function o(C){let F=r.events.length-1;for(;F>-1;){const z=r.events[F][1].type;if(z==="lineEnding"||z==="linePrefix")F--;else break}const M=F>-1?r.events[F][1].type:null,V=M==="tableHead"||M==="tableRow"?N:l;return V===N&&r.parser.lazy[r.now().line]?n(C):V(C)}function l(C){return e.enter("tableHead"),e.enter("tableRow"),c(C)}function c(C){return C===124||(a=!0,s+=1),u(C)}function u(C){return C===null?n(C):le(C)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),f):n(C):be(C)?Ee(e,u,"whitespace")(C):(s+=1,a&&(a=!1,i+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),d(C)))}function d(C){return C===null||C===124||Te(C)?(e.exit("data"),u(C)):(e.consume(C),C===92?h:d)}function h(C){return C===92||C===124?(e.consume(C),d):d(C)}function f(C){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(C):(e.enter("tableDelimiterRow"),a=!1,be(C)?Ee(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):p(C))}function p(C){return C===45||C===58?b(C):C===124?(a=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),g):O(C)}function g(C){return be(C)?Ee(e,b,"whitespace")(C):b(C)}function b(C){return C===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),y):C===45?(s+=1,y(C)):C===null||le(C)?A(C):O(C)}function y(C){return C===45?(e.enter("tableDelimiterFiller"),w(C)):O(C)}function w(C){return C===45?(e.consume(C),w):C===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(C))}function _(C){return be(C)?Ee(e,A,"whitespace")(C):A(C)}function A(C){return C===124?p(C):C===null||le(C)?!a||i!==s?O(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):O(C)}function O(C){return n(C)}function N(C){return e.enter("tableRow"),D(C)}function D(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),D):C===null||le(C)?(e.exit("tableRow"),t(C)):be(C)?Ee(e,D,"whitespace")(C):(e.enter("data"),q(C))}function q(C){return C===null||C===124||Te(C)?(e.exit("data"),D(C)):(e.consume(C),C===92?H:q)}function H(C){return C===92||C===124?(e.consume(C),q):q(C)}}function V_(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,u,d;const h=new j_;for(;++n<e.length;){const f=e[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(o=!1,l!==0&&(wd(h,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",u,t]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=Es(h,t,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=Es(h,t,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):p.type==="tableHead"?(o=!0,l=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],d=Es(h,t,s,i,n,d)):a[1]!==0&&(d=Es(h,t,a,i,n,d)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&wd(h,t,l,c,u),h.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=H_(t.events,n))}return e}function Es(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},Nr(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=Nr(t.events,n[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=Nr(t.events,n[2]),u=Nr(t.events,n[3]),d={type:o,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],f=t.events[n[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,g=n[3]-n[2]-1;e.add(p,g,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},Nr(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function wd(e,t,n,r,i){const s=[],a=Nr(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Nr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const W_={name:"tasklistCheck",tokenize:Z_};function Y_(){return{text:{91:W_}}}function Z_(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return Te(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return le(l)?t(l):be(l)?e.check({tokenize:X_},t,n)(l):n(l)}}function X_(e,t,n){return Ee(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function J_(e){return Dh([__(),L_(),q_(e),G_(),Y_()])}const Q_={};function Dp(e){const t=this,n=e||Q_,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(J_(n)),s.push(x_()),a.push(E_(n))}const Pp=function(e){if(e==null)return rk;if(typeof e=="function")return ba(e);if(typeof e=="object")return Array.isArray(e)?ek(e):tk(e);if(typeof e=="string")return nk(e);throw new Error("Expected function, string, or object as test")};function ek(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Pp(e[n]);return ba(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function tk(e){const t=e;return ba(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function nk(e){return ba(t);function t(n){return n&&n.type===e}}function ba(e){return t;function t(n,r,i){return!!(ik(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function rk(){return!0}function ik(e){return e!==null&&typeof e=="object"&&"type"in e}const vd=function(e,t,n){const r=Pp(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},lr=function(e){if(e==null)return ok;if(typeof e=="string")return ak(e);if(typeof e=="object")return sk(e);if(typeof e=="function")return _c(e);throw new Error("Expected function, string, or array as `test`")};function sk(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=lr(e[n]);return _c(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function ak(e){return _c(t);function t(n){return n.tagName===e}}function _c(e){return t;function t(n,r,i){return!!(lk(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function ok(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function lk(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const _d=/\n/g,kd=/[\t ]+/g,Nl=lr("br"),Nd=lr(mk),ck=lr("p"),Sd=lr("tr"),uk=lr(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",gk,bk]),Bp=lr(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function dk(e,t){const n=t||{},r="children"in e?e.children:[],i=Bp(e),s=Up(e,{whitespace:n.whitespace||"normal"}),a=[];(e.type==="text"||e.type==="comment")&&a.push(...$p(e,{breakBefore:!0,breakAfter:!0}));let o=-1;for(;++o<r.length;)a.push(...Fp(r[o],e,{whitespace:s,breakBefore:o?void 0:i,breakAfter:o<r.length-1?Nl(r[o+1]):i}));const l=[];let c;for(o=-1;++o<a.length;){const u=a[o];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
46
+ `.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function Fp(e,t,n){return e.type==="element"?fk(e,t,n):e.type==="text"?n.whitespace==="normal"?$p(e,n):hk(e):[]}function fk(e,t,n){const r=Up(e,n),i=e.children||[];let s=-1,a=[];if(uk(e))return a;let o,l;for(Nl(e)||Sd(e)&&vd(t,e,Sd)?l=`
47
+ `:ck(e)?(o=2,l=2):Bp(e)&&(o=1,l=1);++s<i.length;)a=a.concat(Fp(i[s],e,{whitespace:r,breakBefore:s?void 0:o,breakAfter:s<i.length-1?Nl(i[s+1]):l}));return Nd(e)&&vd(t,e,Nd)&&a.push(" "),o&&a.unshift(o),l&&a.push(l),a}function $p(e,t){const n=String(e.value),r=[],i=[];let s=0;for(;s<=n.length;){_d.lastIndex=s;const l=_d.exec(n),c=l&&"index"in l?l.index:n.length;r.push(pk(n.slice(s,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,c===n.length?t.breakAfter:!0)),s=c+1}let a=-1,o;for(;++a<r.length;)r[a].charCodeAt(r[a].length-1)===8203||a<r.length-1&&r[a+1].charCodeAt(0)===8203?(i.push(r[a]),o=void 0):r[a]?(typeof o=="number"&&i.push(o),i.push(r[a]),o=0):(a===0||a===r.length-1)&&i.push(0);return i}function hk(e){return[String(e.value)]}function pk(e,t,n){const r=[];let i=0,s;for(;i<e.length;){kd.lastIndex=i;const a=kd.exec(e);s=a?a.index:e.length,!i&&!s&&a&&!t&&r.push(""),i!==s&&r.push(e.slice(i,s)),i=a?s+a[0].length:s}return i!==s&&!n&&r.push(""),r.join(" ")}function Up(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function gk(e){return!!(e.properties||{}).hidden}function mk(e){return e.tagName==="td"||e.tagName==="th"}function bk(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function yk(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],A={type:g,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},O={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[O,d,o,n,e.C_BLOCK_COMMENT_MODE,u,c],D={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:A,contains:N.concat([{begin:/\(/,end:/\)/,keywords:A,contains:N.concat(["self"]),relevance:0}]),relevance:0},q={className:"function",begin:"("+a+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:A,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:A,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,o,{begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:A,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(D,q,O,N,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:A,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:A},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function xk(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=yk(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function Ek(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},o={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(o);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],f=e.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},g=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],y={match:/(\/[a-z._-]+)+/},w=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],_=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],A=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],O=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:g,literal:b,built_in:[...w,..._,"set","shopt",...A,...O]},contains:[f,e.SHEBANG(),p,d,s,a,y,o,l,c,u,n]}}function wk(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[d,o,n,e.C_BLOCK_COMMENT_MODE,u,c],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:y.concat([{begin:/\(/,end:/\)/,keywords:b,contains:y.concat(["self"]),relevance:0}]),relevance:0},_={begin:"("+a+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:f,returnBegin:!0,contains:[e.inherit(h,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,o,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"</",contains:[].concat(w,_,y,[d,{begin:e.IDENT_RE+"::",keywords:b},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:c,keywords:b}}}function vk(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],A={type:g,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},O={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[O,d,o,n,e.C_BLOCK_COMMENT_MODE,u,c],D={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:A,contains:N.concat([{begin:/\(/,end:/\)/,keywords:A,contains:N.concat(["self"]),relevance:0}]),relevance:0},q={className:"function",begin:"("+a+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:A,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:A,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,o,{begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:A,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(D,q,O,N,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:A,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:A},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function _k(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:i.concat(s),built_in:t,literal:r},o=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},u={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(u,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:a},f=e.inherit(h,{illegal:/\n/}),p={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},g={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},b=e.inherit(g,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});h.contains=[g,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],f.contains=[b,p,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[c,g,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},w={begin:"<",end:">",contains:[{beginKeywords:"in out"},o]},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",A={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},o,w,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,w,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,w],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[y,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},A]}}const kk=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Nk=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Sk=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Ak=[...Nk,...Sk],Tk=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Ck=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Ok=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Ik=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Rk(e){const t=e.regex,n=kk(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,a="[a-zA-Z-][a-zA-Z0-9_-]*",o=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+a,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Ck.join("|")+")"},{begin:":(:)?("+Ok.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Ik.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...o,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...o,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:Tk.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...o,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Ak.join("|")+")\\b"}]}}function Lk(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function Mk(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}function Dk(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function Pk(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},a={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},o={begin:/\[/,end:/\]/,contains:[r,s,i,a,n,"self"],relevance:0},l=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,u=/'[^']*'/,d=t.either(l,c,u),h=t.concat(d,"(\\s*\\.\\s*",d,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:h,className:"attr",starts:{end:/$/,contains:[r,o,s,i,a,n]}}]}}var Sr="[0-9](_*[0-9])*",ws=`\\.(${Sr})`,vs="[0-9a-fA-F](_*[0-9a-fA-F])*",Ad={className:"number",variants:[{begin:`(\\b(${Sr})((${ws})|\\.)?|(${ws}))[eE][+-]?(${Sr})[fFdD]?\\b`},{begin:`\\b(${Sr})((${ws})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ws})[fFdD]?\\b`},{begin:`\\b(${Sr})[fFdD]\\b`},{begin:`\\b0[xX]((${vs})\\.?|(${vs})?\\.(${vs}))[pP][+-]?(${Sr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${vs})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function qp(e,t,n){return n===-1?"":e.replace(t,r=>qp(e,t,n-1))}function Bk(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+qp("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},u={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Ad,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Ad,c]}}const Td="[A-Za-z$_][0-9A-Za-z$_]*",Fk=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],$k=["true","false","null","undefined","NaN","Infinity"],jp=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],zp=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Hp=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Uk=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],qk=[].concat(Hp,jp,zp);function jk(e){const t=e.regex,n=(j,{after:W})=>{const v="</"+j[0].slice(1);return j.input.indexOf(v,W)!==-1},r=Td,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(j,W)=>{const v=j[0].length+j.index,Y=j.input[v];if(Y==="<"||Y===","){W.ignoreMatch();return}Y===">"&&(n(j,{after:v})||W.ignoreMatch());let ae;const k=j.input.substring(v);if(ae=k.match(/^\s*=/)){W.ignoreMatch();return}if((ae=k.match(/^\s+extends\s+/))&&ae.index===0){W.ignoreMatch();return}}},o={$pattern:Td,keyword:Fk,literal:$k,built_in:qk,"variable.language":Uk},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},w={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,g,b,{match:/\$\d+/},d];h.contains=_.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(_)});const A=[].concat(w,h.contains),O=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(A)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:O},D={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},q={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...jp,...zp]}},H={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function M(j){return t.concat("(?!",j.join("|"),")")}const V={match:t.concat(/\b/,M([...Hp,"super","import"].map(j=>`${j}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",U={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:q},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),H,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,g,b,w,{match:/\$\d+/},d,q,{scope:"attr",match:r+t.lookahead(":"),relevance:0},U,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[w,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},V,F,D,Z,{match:/\$[(.]/}]}}function zk(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Ar="[0-9](_*[0-9])*",_s=`\\.(${Ar})`,ks="[0-9a-fA-F](_*[0-9a-fA-F])*",Hk={className:"number",variants:[{begin:`(\\b(${Ar})((${_s})|\\.)?|(${_s}))[eE][+-]?(${Ar})[fFdD]?\\b`},{begin:`\\b(${Ar})((${_s})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${_s})[fFdD]?\\b`},{begin:`\\b(${Ar})[fFdD]\\b`},{begin:`\\b0[xX]((${ks})\\.?|(${ks})?\\.(${ks}))[pP][+-]?(${Ar})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ks})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Gk(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},a={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(a);const o={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(a,{className:"string"}),"self"]}]},c=Hk,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},h=d;return h.variants[1].contains=[d],d.variants[1].contains=[h],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,u,n,r,o,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,o,l,a,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},o,l]},a,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
48
+ `},c]}}const Kk=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Vk=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Wk=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Yk=[...Vk,...Wk],Zk=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Gp=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Kp=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Xk=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),Jk=Gp.concat(Kp).sort().reverse();function Qk(e){const t=Kk(e),n=Jk,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",a=[],o=[],l=function(_){return{className:"string",begin:"~?"+_+".*?"+_}},c=function(_,A,O){return{className:_,begin:A,relevance:O}},u={$pattern:/[a-z-]+/,keyword:r,attribute:Zk.join(" ")},d={begin:"\\(",end:"\\)",contains:o,keywords:u,relevance:0};o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const h=o.concat({begin:/\{/,end:/\}/,contains:a}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(o)},p={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Xk.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:o}}]},g={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:o,relevance:0}},b={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:h}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+Yk.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",s,0),c("selector-id","#"+s),c("selector-class","\\."+s,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Gp.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Kp.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:h},{begin:"!important"},t.FUNCTION_DISPATCH]},w={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,b,w,p,y,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:a}}function eN(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function tN(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},a={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,i,s,a]}}function nN(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},o=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,o,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(c,{contains:[]}),h=e.inherit(u,{contains:[]});c.contains.push(h),u.contains.push(d);let f=[n,l];return[c,u,d,h].forEach(y=>{y.contains=y.contains.concat(f)}),f=f.concat(c,u),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:f},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:f}]}]},n,s,c,u,{className:"quote",begin:"^>\\s+",contains:f,end:"$"},i,r,l,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function rN(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,o={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:o,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function iN(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},a={begin:/->\{/,end:/\}/},o={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[o]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,s,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],h=(g,b,y="\\1")=>{const w=y==="\\1"?y:t.concat(y,b);return t.concat(t.concat("(?:",g,")"),b,/(?:\\.|[^\\\/])*?/,w,/(?:\\.|[^\\\/])*?/,y,r)},f=(g,b,y)=>t.concat(t.concat("(?:",g,")"),b,/(?:\\.|[^\\\/])*?/,y,r),p=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:u,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:h("s|tr|y",t.either(...d,{capture:!0}))},{begin:h("s|tr|y","\\(","\\)")},{begin:h("s|tr|y","\\[","\\]")},{begin:h("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:f("(?:m|qr)?",/\//,/\//)},{begin:f("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:f("m|qr",/\(/,/\)/)},{begin:f("m|qr",/\[/,/\]/)},{begin:f("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,o]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,o,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=p,a.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:p}}function sN(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),a={scope:"variable",match:"\\$+"+r},o={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(z,Z)=>{Z.data._beginMatch=z[1]||z[2]},"on:end":(z,Z)=>{Z.data._beginMatch!==z[1]&&Z.ignoreMatch()}},h=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[
49
+ ]`,p={scope:"string",variants:[u,c,d,h]},g={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],w=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],A={keyword:y,literal:(z=>{const Z=[];return z.forEach(I=>{Z.push(I),I.toLowerCase()===I?Z.push(I.toUpperCase()):Z.push(I.toLowerCase())}),Z})(b),built_in:w},O=z=>z.map(Z=>Z.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",O(w).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},D=t.concat(r,"\\b(?!\\()"),q={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),D],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),D],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},H={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},C={relevance:0,begin:/\(/,end:/\)/,keywords:A,contains:[H,a,q,e.C_BLOCK_COMMENT_MODE,p,g,N]},F={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",O(y).join("\\b|"),"|",O(w).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[C]};C.contains.push(F);const M=[H,q,e.C_BLOCK_COMMENT_MODE,p,g,N],V={begin:t.concat(/#\[\s*\\?/,t.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...M]},...M,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:A,contains:[V,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},o,{scope:"variable.language",match:/\$this\b/},a,F,q,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:A,contains:["self",V,a,q,e.C_BLOCK_COMMENT_MODE,p,g]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},p,g]}}function aN(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function oN(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function lN(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},u={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,u,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h="[0-9](_?[0-9])*",f=`(\\b(${h}))?\\.(${h})|\\b(${h})\\.`,p=`\\b|${r.join("|")}`,g={className:"number",relevance:0,variants:[{begin:`(\\b(${h})|(${f}))[eE][+-]?(${h})[jJ]?(?=${p})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${h})[jJ](?=${p})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,g,d,e.HASH_COMMENT_MODE]}]};return c.contains=[d,g,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[l,g,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,y,d]}]}}function cN(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function uN(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function dN(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},o={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],u={className:"subst",begin:/#\{/,end:/\}/,keywords:a},d={className:"string",contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},h="[1-9](_?[0-9])*|0",f="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:`\\b(${h})(\\.(${f}))?([eE][+-]?(${f})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},g={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},N=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);u.contains=N,g.contains=N;const C=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:N}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(C).concat(c).concat(N)}}function fN(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",o=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],u=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:u,keyword:o,literal:l,built_in:c},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{begin:"\\b0x([A-Fa-f0-9_]+)"+a},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:c,type:u}},{className:"punctuation",begin:"->"},s]}}const hN=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),pN=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],gN=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],mN=[...pN,...gN],bN=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),yN=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),xN=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),EN=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function wN(e){const t=hN(e),n=xN,r=yN,i="@[a-z-]+",s="and or not only",o={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+mN.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+EN.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:bN.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function vN(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function _N(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],u=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],f=u,p=[...c,...l].filter(O=>!u.includes(O)),g={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:t.concat(/\b/,t.either(...f),/\s*\(/),relevance:0,keywords:{built_in:f}};function w(O){return t.concat(/\b/,t.either(...O.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const _={scope:"keyword",match:w(h),relevance:0};function A(O,{exceptions:N,when:D}={}){const q=D;return N=N||[],O.map(H=>H.match(/\|\d+$/)||N.includes(H)?H:q(H)?`${H}|0`:H)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:A(p,{when:O=>O.length<3}),literal:s,type:o,built_in:d},contains:[{scope:"type",match:w(a)},_,y,g,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function Vp(e){return e?typeof e=="string"?e:e.source:null}function gi(e){return Ne("(?=",e,")")}function Ne(...e){return e.map(n=>Vp(n)).join("")}function kN(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function lt(...e){return"("+(kN(e).capture?"":"?:")+e.map(r=>Vp(r)).join("|")+")"}const kc=e=>Ne(/\b/,e,/\w$/.test(e)?/\b/:/\B/),NN=["Protocol","Type"].map(kc),Cd=["init","self"].map(kc),SN=["Any","Self"],jo=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Od=["false","nil","true"],AN=["assignment","associativity","higherThan","left","lowerThan","none","right"],TN=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Id=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Wp=lt(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Yp=lt(Wp,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),zo=Ne(Wp,Yp,"*"),Zp=lt(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Zs=lt(Zp,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),an=Ne(Zp,Zs,"*"),Ns=Ne(/[A-Z]/,Zs,"*"),CN=["attached","autoclosure",Ne(/convention\(/,lt("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ne(/objc\(/,an,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],ON=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function IN(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,lt(...NN,...Cd)],className:{2:"keyword"}},s={match:Ne(/\./,lt(...jo)),relevance:0},a=jo.filter(me=>typeof me=="string").concat(["_|0"]),o=jo.filter(me=>typeof me!="string").concat(SN).map(kc),l={variants:[{className:"keyword",match:lt(...o,...Cd)}]},c={$pattern:lt(/\b\w+/,/#\w+/),keyword:a.concat(TN),literal:Od},u=[i,s,l],d={match:Ne(/\./,lt(...Id)),relevance:0},h={className:"built_in",match:Ne(/\b/,lt(...Id),/(?=\()/)},f=[d,h],p={match:/->/,relevance:0},g={className:"operator",relevance:0,variants:[{match:zo},{match:`\\.(\\.|${Yp})+`}]},b=[p,g],y="([0-9]_*)+",w="([0-9a-fA-F]_*)+",_={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${w})(\\.(${w}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},A=(me="")=>({className:"subst",variants:[{match:Ne(/\\/,me,/[0\\tnr"']/)},{match:Ne(/\\/,me,/u\{[0-9a-fA-F]{1,8}\}/)}]}),O=(me="")=>({className:"subst",match:Ne(/\\/,me,/[\t ]*(?:[\r\n]|\r\n)/)}),N=(me="")=>({className:"subst",label:"interpol",begin:Ne(/\\/,me,/\(/),end:/\)/}),D=(me="")=>({begin:Ne(me,/"""/),end:Ne(/"""/,me),contains:[A(me),O(me),N(me)]}),q=(me="")=>({begin:Ne(me,/"/),end:Ne(/"/,me),contains:[A(me),N(me)]}),H={className:"string",variants:[D(),D("#"),D("##"),D("###"),q(),q("#"),q("##"),q("###")]},C=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],F={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:C},M=me=>{const We=Ne(me,/\//),oe=Ne(/\//,me);return{begin:We,end:oe,contains:[...C,{scope:"comment",begin:`#(?!.*${oe})`,end:/$/}]}},V={scope:"regexp",variants:[M("###"),M("##"),M("#"),F]},z={match:Ne(/`/,an,/`/)},Z={className:"variable",match:/\$\d+/},I={className:"variable",match:`\\$${Zs}+`},U=[z,Z,I],j={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:ON,contains:[...b,_,H]}]}},W={scope:"keyword",match:Ne(/@/,lt(...CN),gi(lt(/\(/,/\s+/)))},v={scope:"meta",match:Ne(/@/,an)},Y=[j,W,v],ae={match:gi(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ne(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Zs,"+")},{className:"type",match:Ns,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ne(/\s+&\s+/,gi(Ns)),relevance:0}]},k={begin:/</,end:/>/,keywords:c,contains:[...r,...u,...Y,p,ae]};ae.contains.push(k);const de={match:Ne(an,/\s*:/),keywords:"_|0",relevance:0},re={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",de,...r,V,...u,...f,...b,_,H,...U,...Y,ae]},_e={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,ae]},Ve={begin:lt(gi(Ne(an,/\s*:/)),gi(Ne(an,/\s+/,an,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:an}]},X={begin:/\(/,end:/\)/,keywords:c,contains:[Ve,...r,...u,...b,_,H,...Y,ae,re],endsParent:!0,illegal:/["']/},ye={match:[/(func|macro)/,/\s+/,lt(z.match,an,zo)],className:{1:"keyword",3:"title.function"},contains:[_e,X,t],illegal:[/\[/,/%/]},Se={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[_e,X,t],illegal:/\[|%/},je={match:[/operator/,/\s+/,zo],className:{1:"keyword",3:"title"}},it={begin:[/precedencegroup/,/\s+/,Ns],className:{1:"keyword",3:"title"},contains:[ae],keywords:[...AN,...Od],end:/}/},Et={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},St={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},De={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,an,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[_e,...u,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:Ns},...u],relevance:0}]};for(const me of H.variants){const We=me.contains.find(Bt=>Bt.label==="interpol");We.keywords=c;const oe=[...u,...f,...b,_,H,...U];We.contains=[...oe,{begin:/\(/,end:/\)/,contains:["self",...oe]}]}return{name:"Swift",keywords:c,contains:[...r,ye,Se,Et,St,De,je,it,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},V,...u,...f,...b,_,H,...U,...Y,ae,re]}}const Xs="[A-Za-z$_][0-9A-Za-z$_]*",Xp=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Jp=["true","false","null","undefined","NaN","Infinity"],Qp=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],eg=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],tg=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ng=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],rg=[].concat(tg,Qp,eg);function RN(e){const t=e.regex,n=(j,{after:W})=>{const v="</"+j[0].slice(1);return j.input.indexOf(v,W)!==-1},r=Xs,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(j,W)=>{const v=j[0].length+j.index,Y=j.input[v];if(Y==="<"||Y===","){W.ignoreMatch();return}Y===">"&&(n(j,{after:v})||W.ignoreMatch());let ae;const k=j.input.substring(v);if(ae=k.match(/^\s*=/)){W.ignoreMatch();return}if((ae=k.match(/^\s+extends\s+/))&&ae.index===0){W.ignoreMatch();return}}},o={$pattern:Xs,keyword:Xp,literal:Jp,built_in:rg,"variable.language":ng},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},w={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,g,b,{match:/\$\d+/},d];h.contains=_.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(_)});const A=[].concat(w,h.contains),O=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(A)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:O},D={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},q={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Qp,...eg]}},H={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function M(j){return t.concat("(?!",j.join("|"),")")}const V={match:t.concat(/\b/,M([...tg,"super","import"].map(j=>`${j}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",U={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:q},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),H,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,g,b,w,{match:/\$\d+/},d,q,{scope:"attr",match:r+t.lookahead(":"),relevance:0},U,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[w,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},V,F,D,Z,{match:/\$[(.]/}]}}function LN(e){const t=e.regex,n=RN(e),r=Xs,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},a={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[n.exports.CLASS_REFERENCE]},o={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:Xs,keyword:Xp.concat(l),literal:Jp,built_in:rg.concat(i),"variable.language":ng},u={className:"meta",begin:"@"+r},d=(g,b,y)=>{const w=g.contains.findIndex(_=>_.label===b);if(w===-1)throw new Error("can not find mode to replace");g.contains.splice(w,1,y)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(u);const h=n.contains.find(g=>g.scope==="attr"),f=Object.assign({},h,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,h,f]),n.contains=n.contains.concat([u,s,a,f]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",o);const p=n.contains.find(g=>g.label==="func.def");return p.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function MN(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,i),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,t.either(s,i),/ +/,t.either(a,o),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),h=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,c,u,d,h,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[h]}]}}function DN(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},o={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,i,e.QUOTE_STRING_MODE,l,c,o]}}function PN(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(s,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,l,o,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,a,l,o]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function BN(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},o=e.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),h={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},p={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},h,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},p,g,s,a],y=[...b];return y.pop(),y.push(o),f.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}const FN={arduino:xk,bash:Ek,c:wk,cpp:vk,csharp:_k,css:Rk,diff:Lk,go:Mk,graphql:Dk,ini:Pk,java:Bk,javascript:jk,json:zk,kotlin:Gk,less:Qk,lua:eN,makefile:tN,markdown:nN,objectivec:rN,perl:iN,php:sN,"php-template":aN,plaintext:oN,python:lN,"python-repl":cN,r:uN,ruby:dN,rust:fN,scss:wN,shell:vN,sql:_N,swift:IN,typescript:LN,vbnet:MN,wasm:DN,xml:PN,yaml:BN};function ig(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&ig(n)}),e}class Rd{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function sg(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Pn(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const $N="</span>",Ld=e=>!!e.scope,UN=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class qN{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=sg(t)}openNode(t){if(!Ld(t))return;const n=UN(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){Ld(t)&&(this.buffer+=$N)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const Md=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Nc{constructor(){this.rootNode=Md(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=Md({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Nc._collapse(n)}))}}class jN extends Nc{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new qN(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Mi(e){return e?typeof e=="string"?e:e.source:null}function ag(e){return cr("(?=",e,")")}function zN(e){return cr("(?:",e,")*")}function HN(e){return cr("(?:",e,")?")}function cr(...e){return e.map(n=>Mi(n)).join("")}function GN(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Sc(...e){return"("+(GN(e).capture?"":"?:")+e.map(r=>Mi(r)).join("|")+")"}function og(e){return new RegExp(e.toString()+"|").exec("").length-1}function KN(e,t){const n=e&&e.exec(t);return n&&n.index===0}const VN=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Ac(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let s=Mi(r),a="";for(;s.length>0;){const o=VN.exec(s);if(!o){a+=s;break}a+=s.substring(0,o.index),s=s.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?a+="\\"+String(Number(o[1])+i):(a+=o[0],o[0]==="("&&n++)}return a}).map(r=>`(${r})`).join(t)}const WN=/\b\B/,lg="[a-zA-Z]\\w*",Tc="[a-zA-Z_]\\w*",cg="\\b\\d+(\\.\\d+)?",ug="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",dg="\\b(0b[01]+)",YN="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ZN=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=cr(t,/.*\b/,e.binary,/\b.*/)),Pn({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Di={begin:"\\\\[\\s\\S]",relevance:0},XN={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Di]},JN={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Di]},QN={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ya=function(e,t,n={}){const r=Pn({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=Sc("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:cr(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},eS=ya("//","$"),tS=ya("/\\*","\\*/"),nS=ya("#","$"),rS={scope:"number",begin:cg,relevance:0},iS={scope:"number",begin:ug,relevance:0},sS={scope:"number",begin:dg,relevance:0},aS={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Di,{begin:/\[/,end:/\]/,relevance:0,contains:[Di]}]},oS={scope:"title",begin:lg,relevance:0},lS={scope:"title",begin:Tc,relevance:0},cS={begin:"\\.\\s*"+Tc,relevance:0},uS=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var Ss=Object.freeze({__proto__:null,APOS_STRING_MODE:XN,BACKSLASH_ESCAPE:Di,BINARY_NUMBER_MODE:sS,BINARY_NUMBER_RE:dg,COMMENT:ya,C_BLOCK_COMMENT_MODE:tS,C_LINE_COMMENT_MODE:eS,C_NUMBER_MODE:iS,C_NUMBER_RE:ug,END_SAME_AS_BEGIN:uS,HASH_COMMENT_MODE:nS,IDENT_RE:lg,MATCH_NOTHING_RE:WN,METHOD_GUARD:cS,NUMBER_MODE:rS,NUMBER_RE:cg,PHRASAL_WORDS_MODE:QN,QUOTE_STRING_MODE:JN,REGEXP_MODE:aS,RE_STARTERS_RE:YN,SHEBANG:ZN,TITLE_MODE:oS,UNDERSCORE_IDENT_RE:Tc,UNDERSCORE_TITLE_MODE:lS});function dS(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function fS(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function hS(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=dS,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function pS(e,t){Array.isArray(e.illegal)&&(e.illegal=Sc(...e.illegal))}function gS(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function mS(e,t){e.relevance===void 0&&(e.relevance=1)}const bS=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=cr(n.beforeMatch,ag(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},yS=["of","and","for","in","not","or","if","then","parent","list","value"],xS="keyword";function fg(e,t,n=xS){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(s){Object.assign(r,fg(e[s],t,s))}),r;function i(s,a){t&&(a=a.map(o=>o.toLowerCase())),a.forEach(function(o){const l=o.split("|");r[l[0]]=[s,ES(l[0],l[1])]})}}function ES(e,t){return t?Number(t):wS(e)?0:1}function wS(e){return yS.includes(e.toLowerCase())}const Dd={},Qn=e=>{console.error(e)},Pd=(e,...t)=>{console.log(`WARN: ${e}`,...t)},kr=(e,t)=>{Dd[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Dd[`${e}/${t}`]=!0)},Js=new Error;function hg(e,t,{key:n}){let r=0;const i=e[n],s={},a={};for(let o=1;o<=t.length;o++)a[o+r]=i[o],s[o+r]=!0,r+=og(t[o-1]);e[n]=a,e[n]._emit=s,e[n]._multi=!0}function vS(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Qn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Js;if(typeof e.beginScope!="object"||e.beginScope===null)throw Qn("beginScope must be object"),Js;hg(e,e.begin,{key:"beginScope"}),e.begin=Ac(e.begin,{joinWith:""})}}function _S(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Qn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Js;if(typeof e.endScope!="object"||e.endScope===null)throw Qn("endScope must be object"),Js;hg(e,e.end,{key:"endScope"}),e.end=Ac(e.end,{joinWith:""})}}function kS(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function NS(e){kS(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),vS(e),_S(e)}function SS(e){function t(a,o){return new RegExp(Mi(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(o?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=og(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(l=>l[1]);this.matcherRe=t(Ac(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(o);if(!l)return null;const c=l.findIndex((d,h)=>h>0&&d!==void 0),u=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const l=new n;return this.rules.slice(o).forEach(([c,u])=>l.addRule(c,u)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(o);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,c=u.exec(o)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(a){const o=new r;return a.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),a.terminatorEnd&&o.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&o.addRule(a.illegal,{type:"illegal"}),o}function s(a,o){const l=a;if(a.isCompiled)return l;[fS,gS,NS,bS].forEach(u=>u(a,o)),e.compilerExtensions.forEach(u=>u(a,o)),a.__beforeBegin=null,[hS,pS,mS].forEach(u=>u(a,o)),a.isCompiled=!0;let c=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),c=a.keywords.$pattern,delete a.keywords.$pattern),c=c||/\w+/,a.keywords&&(a.keywords=fg(a.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),o&&(a.begin||(a.begin=/\B|\b/),l.beginRe=t(l.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(l.endRe=t(l.end)),l.terminatorEnd=Mi(l.end)||"",a.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd)),a.illegal&&(l.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(u){return AS(u==="self"?a:u)})),a.contains.forEach(function(u){s(u,l)}),a.starts&&s(a.starts,o),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Pn(e.classNameAliases||{}),s(e)}function pg(e){return e?e.endsWithParent||pg(e.starts):!1}function AS(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Pn(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:pg(e)?Pn(e,{starts:e.starts?Pn(e.starts):null}):Object.isFrozen(e)?Pn(e):e}var TS="11.11.1";class CS extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Ho=sg,Bd=Pn,Fd=Symbol("nomatch"),OS=7,gg=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:jN};function l(I){return o.noHighlightRe.test(I)}function c(I){let U=I.className+" ";U+=I.parentNode?I.parentNode.className:"";const j=o.languageDetectRe.exec(U);if(j){const W=q(j[1]);return W||(Pd(s.replace("{}",j[1])),Pd("Falling back to no-highlight mode for this block.",I)),W?j[1]:"no-highlight"}return U.split(/\s+/).find(W=>l(W)||q(W))}function u(I,U,j){let W="",v="";typeof U=="object"?(W=I,j=U.ignoreIllegals,v=U.language):(kr("10.7.0","highlight(lang, code, ...args) has been deprecated."),kr("10.7.0",`Please use highlight(code, options) instead.
50
+ https://github.com/highlightjs/highlight.js/issues/2277`),v=I,W=U),j===void 0&&(j=!0);const Y={code:W,language:v};z("before:highlight",Y);const ae=Y.result?Y.result:d(Y.language,Y.code,j);return ae.code=Y.code,z("after:highlight",ae),ae}function d(I,U,j,W){const v=Object.create(null);function Y(T,R){return T.keywords[R]}function ae(){if(!oe.keywords){Ae.addText(xe);return}let T=0;oe.keywordPatternRe.lastIndex=0;let R=oe.keywordPatternRe.exec(xe),K="";for(;R;){K+=xe.substring(T,R.index);const J=De.case_insensitive?R[0].toLowerCase():R[0],ie=Y(oe,J);if(ie){const[Ce,ht]=ie;if(Ae.addText(K),K="",v[J]=(v[J]||0)+1,v[J]<=OS&&(Ft+=ht),Ce.startsWith("_"))K+=R[0];else{const st=De.classNameAliases[Ce]||Ce;re(R[0],st)}}else K+=R[0];T=oe.keywordPatternRe.lastIndex,R=oe.keywordPatternRe.exec(xe)}K+=xe.substring(T),Ae.addText(K)}function k(){if(xe==="")return;let T=null;if(typeof oe.subLanguage=="string"){if(!t[oe.subLanguage]){Ae.addText(xe);return}T=d(oe.subLanguage,xe,!0,Bt[oe.subLanguage]),Bt[oe.subLanguage]=T._top}else T=f(xe,oe.subLanguage.length?oe.subLanguage:null);oe.relevance>0&&(Ft+=T.relevance),Ae.__addSublanguage(T._emitter,T.language)}function de(){oe.subLanguage!=null?k():ae(),xe=""}function re(T,R){T!==""&&(Ae.startScope(R),Ae.addText(T),Ae.endScope())}function _e(T,R){let K=1;const J=R.length-1;for(;K<=J;){if(!T._emit[K]){K++;continue}const ie=De.classNameAliases[T[K]]||T[K],Ce=R[K];ie?re(Ce,ie):(xe=Ce,ae(),xe=""),K++}}function Ve(T,R){return T.scope&&typeof T.scope=="string"&&Ae.openNode(De.classNameAliases[T.scope]||T.scope),T.beginScope&&(T.beginScope._wrap?(re(xe,De.classNameAliases[T.beginScope._wrap]||T.beginScope._wrap),xe=""):T.beginScope._multi&&(_e(T.beginScope,R),xe="")),oe=Object.create(T,{parent:{value:oe}}),oe}function X(T,R,K){let J=KN(T.endRe,K);if(J){if(T["on:end"]){const ie=new Rd(T);T["on:end"](R,ie),ie.isMatchIgnored&&(J=!1)}if(J){for(;T.endsParent&&T.parent;)T=T.parent;return T}}if(T.endsWithParent)return X(T.parent,R,K)}function ye(T){return oe.matcher.regexIndex===0?(xe+=T[0],1):(At=!0,0)}function Se(T){const R=T[0],K=T.rule,J=new Rd(K),ie=[K.__beforeBegin,K["on:begin"]];for(const Ce of ie)if(Ce&&(Ce(T,J),J.isMatchIgnored))return ye(R);return K.skip?xe+=R:(K.excludeBegin&&(xe+=R),de(),!K.returnBegin&&!K.excludeBegin&&(xe=R)),Ve(K,T),K.returnBegin?0:R.length}function je(T){const R=T[0],K=U.substring(T.index),J=X(oe,T,K);if(!J)return Fd;const ie=oe;oe.endScope&&oe.endScope._wrap?(de(),re(R,oe.endScope._wrap)):oe.endScope&&oe.endScope._multi?(de(),_e(oe.endScope,T)):ie.skip?xe+=R:(ie.returnEnd||ie.excludeEnd||(xe+=R),de(),ie.excludeEnd&&(xe=R));do oe.scope&&Ae.closeNode(),!oe.skip&&!oe.subLanguage&&(Ft+=oe.relevance),oe=oe.parent;while(oe!==J.parent);return J.starts&&Ve(J.starts,T),ie.returnEnd?0:R.length}function it(){const T=[];for(let R=oe;R!==De;R=R.parent)R.scope&&T.unshift(R.scope);T.forEach(R=>Ae.openNode(R))}let Et={};function St(T,R){const K=R&&R[0];if(xe+=T,K==null)return de(),0;if(Et.type==="begin"&&R.type==="end"&&Et.index===R.index&&K===""){if(xe+=U.slice(R.index,R.index+1),!i){const J=new Error(`0 width match regex (${I})`);throw J.languageName=I,J.badRule=Et.rule,J}return 1}if(Et=R,R.type==="begin")return Se(R);if(R.type==="illegal"&&!j){const J=new Error('Illegal lexeme "'+K+'" for mode "'+(oe.scope||"<unnamed>")+'"');throw J.mode=oe,J}else if(R.type==="end"){const J=je(R);if(J!==Fd)return J}if(R.type==="illegal"&&K==="")return xe+=`
51
+ `,1;if(Ye>1e5&&Ye>R.index*3)throw new Error("potential infinite loop, way more iterations than matches");return xe+=K,K.length}const De=q(I);if(!De)throw Qn(s.replace("{}",I)),new Error('Unknown language: "'+I+'"');const me=SS(De);let We="",oe=W||me;const Bt={},Ae=new o.__emitter(o);it();let xe="",Ft=0,ft=0,Ye=0,At=!1;try{if(De.__emitTokens)De.__emitTokens(U,Ae);else{for(oe.matcher.considerAll();;){Ye++,At?At=!1:oe.matcher.considerAll(),oe.matcher.lastIndex=ft;const T=oe.matcher.exec(U);if(!T)break;const R=U.substring(ft,T.index),K=St(R,T);ft=T.index+K}St(U.substring(ft))}return Ae.finalize(),We=Ae.toHTML(),{language:I,value:We,relevance:Ft,illegal:!1,_emitter:Ae,_top:oe}}catch(T){if(T.message&&T.message.includes("Illegal"))return{language:I,value:Ho(U),illegal:!0,relevance:0,_illegalBy:{message:T.message,index:ft,context:U.slice(ft-100,ft+100),mode:T.mode,resultSoFar:We},_emitter:Ae};if(i)return{language:I,value:Ho(U),illegal:!1,relevance:0,errorRaised:T,_emitter:Ae,_top:oe};throw T}}function h(I){const U={value:Ho(I),illegal:!1,relevance:0,_top:a,_emitter:new o.__emitter(o)};return U._emitter.addText(I),U}function f(I,U){U=U||o.languages||Object.keys(t);const j=h(I),W=U.filter(q).filter(C).map(de=>d(de,I,!1));W.unshift(j);const v=W.sort((de,re)=>{if(de.relevance!==re.relevance)return re.relevance-de.relevance;if(de.language&&re.language){if(q(de.language).supersetOf===re.language)return 1;if(q(re.language).supersetOf===de.language)return-1}return 0}),[Y,ae]=v,k=Y;return k.secondBest=ae,k}function p(I,U,j){const W=U&&n[U]||j;I.classList.add("hljs"),I.classList.add(`language-${W}`)}function g(I){let U=null;const j=c(I);if(l(j))return;if(z("before:highlightElement",{el:I,language:j}),I.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",I);return}if(I.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(I)),o.throwUnescapedHTML))throw new CS("One of your code blocks includes unescaped HTML.",I.innerHTML);U=I;const W=U.textContent,v=j?u(W,{language:j,ignoreIllegals:!0}):f(W);I.innerHTML=v.value,I.dataset.highlighted="yes",p(I,j,v.language),I.result={language:v.language,re:v.relevance,relevance:v.relevance},v.secondBest&&(I.secondBest={language:v.secondBest.language,relevance:v.secondBest.relevance}),z("after:highlightElement",{el:I,result:v,text:W})}function b(I){o=Bd(o,I)}const y=()=>{A(),kr("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function w(){A(),kr("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let _=!1;function A(){function I(){A()}if(document.readyState==="loading"){_||window.addEventListener("DOMContentLoaded",I,!1),_=!0;return}document.querySelectorAll(o.cssSelector).forEach(g)}function O(I,U){let j=null;try{j=U(e)}catch(W){if(Qn("Language definition for '{}' could not be registered.".replace("{}",I)),i)Qn(W);else throw W;j=a}j.name||(j.name=I),t[I]=j,j.rawDefinition=U.bind(null,e),j.aliases&&H(j.aliases,{languageName:I})}function N(I){delete t[I];for(const U of Object.keys(n))n[U]===I&&delete n[U]}function D(){return Object.keys(t)}function q(I){return I=(I||"").toLowerCase(),t[I]||t[n[I]]}function H(I,{languageName:U}){typeof I=="string"&&(I=[I]),I.forEach(j=>{n[j.toLowerCase()]=U})}function C(I){const U=q(I);return U&&!U.disableAutodetect}function F(I){I["before:highlightBlock"]&&!I["before:highlightElement"]&&(I["before:highlightElement"]=U=>{I["before:highlightBlock"](Object.assign({block:U.el},U))}),I["after:highlightBlock"]&&!I["after:highlightElement"]&&(I["after:highlightElement"]=U=>{I["after:highlightBlock"](Object.assign({block:U.el},U))})}function M(I){F(I),r.push(I)}function V(I){const U=r.indexOf(I);U!==-1&&r.splice(U,1)}function z(I,U){const j=I;r.forEach(function(W){W[j]&&W[j](U)})}function Z(I){return kr("10.7.0","highlightBlock will be removed entirely in v12.0"),kr("10.7.0","Please use highlightElement now."),g(I)}Object.assign(e,{highlight:u,highlightAuto:f,highlightAll:A,highlightElement:g,highlightBlock:Z,configure:b,initHighlighting:y,initHighlightingOnLoad:w,registerLanguage:O,unregisterLanguage:N,listLanguages:D,getLanguage:q,registerAliases:H,autoDetection:C,inherit:Bd,addPlugin:M,removePlugin:V}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=TS,e.regex={concat:cr,lookahead:ag,either:Sc,optional:HN,anyNumberOfTimes:zN};for(const I in Ss)typeof Ss[I]=="object"&&ig(Ss[I]);return Object.assign(e,Ss),e},Ur=gg({});Ur.newInstance=()=>gg({});var IS=Ur;Ur.HighlightJS=Ur;Ur.default=Ur;const RS=Hi(IS),$d={},LS="hljs-";function MS(e){const t=RS.newInstance();return e&&s(e),{highlight:n,highlightAuto:r,listLanguages:i,register:s,registerAlias:a,registered:o};function n(l,c,u){const d=u||$d,h=typeof d.prefix=="string"?d.prefix:LS;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:DS,classPrefix:h});const f=t.highlight(c,{ignoreIllegals:!0,language:l});if(f.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:f.errorRaised});const p=f._emitter.root,g=p.data;return g.language=f.language,g.relevance=f.relevance,p}function r(l,c){const d=(c||$d).subset||i();let h=-1,f=0,p;for(;++h<d.length;){const g=d[h];if(!t.getLanguage(g))continue;const b=n(g,l,c);b.data&&b.data.relevance!==void 0&&b.data.relevance>f&&(f=b.data.relevance,p=b)}return p||{type:"root",children:[],data:{language:void 0,relevance:f}}}function i(){return t.listLanguages()}function s(l,c){if(typeof l=="string")t.registerLanguage(l,c);else{let u;for(u in l)Object.hasOwn(l,u)&&t.registerLanguage(u,l[u])}}function a(l,c){if(typeof l=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:l});else{let u;for(u in l)if(Object.hasOwn(l,u)){const d=l[u];t.registerAliases(typeof d=="string"?d:[...d],{languageName:u})}}}function o(l){return!!t.getLanguage(l)}}class DS{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=this,r=t.split(".").map(function(a,o){return o?a+"_".repeat(o):n.options.classPrefix+a}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const mg=function(e){if(e==null)return $S;if(typeof e=="function")return xa(e);if(typeof e=="object")return Array.isArray(e)?PS(e):BS(e);if(typeof e=="string")return FS(e);throw new Error("Expected function, string, or object as test")};function PS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mg(e[n]);return xa(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function BS(e){const t=e;return xa(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function FS(e){return xa(t);function t(n){return n&&n.type===e}}function xa(e){return t;function t(n,r,i){return!!(US(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $S(){return!0}function US(e){return e!==null&&typeof e=="object"&&"type"in e}const bg=[],qS=!0,Ud=!1,jS="skip";function zS(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=mg(i),a=r?-1:1;o(e,void 0,[])();function o(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=bg,p,g,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=HS(n(l,u)),f[0]===Ud))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==jS)for(g=(r?y.children.length:-1)+a,b=u.concat(y);g>-1&&g<y.children.length;){const w=y.children[g];if(p=o(w,g,b)(),p[0]===Ud)return p;g=typeof p[1]=="number"?p[1]:g+a}}return f}}}function HS(e){return Array.isArray(e)?e:typeof e=="number"?[qS,e]:e==null?bg:[e]}function GS(e,t,n,r){let i,s,a;s=t,a=n,i=r,zS(e,s,o,i);function o(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return a(l,d,u)}}const KS={};function yg(e){const t=e||KS,n=t.aliases,r=t.detect||!1,i=t.languages||FN,s=t.plainText,a=t.prefix,o=t.subset;let l="hljs";const c=MS(i);if(n&&c.registerAlias(n),a){const u=a.indexOf("-");l=u===-1?a:a.slice(0,u)}return function(u,d){GS(u,"element",function(h,f,p){if(h.tagName!=="code"||!p||p.type!=="element"||p.tagName!=="pre")return;const g=VS(h);if(g===!1||!g&&!r||g&&s&&s.includes(g))return;Array.isArray(h.properties.className)||(h.properties.className=[]),h.properties.className.includes(l)||h.properties.className.unshift(l);const b=dk(h,{whitespace:"pre"});let y;try{y=g?c.highlight(g,b,{prefix:a}):c.highlightAuto(b,{prefix:a,subset:o})}catch(w){const _=w;if(g&&/Unknown language/.test(_.message)){d.message("Cannot highlight as `"+g+"`, it’s not registered",{ancestors:[p,h],cause:_,place:h.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw _}!g&&y.data&&y.data.language&&h.properties.className.push("language-"+y.data.language),y.children.length>0&&(h.children=y.children)})}}function VS(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const i=String(t[n]);if(i==="no-highlight"||i==="nohighlight")return!1;!r&&i.slice(0,5)==="lang-"&&(r=i.slice(5)),!r&&i.slice(0,9)==="language-"&&(r=i.slice(9))}return r}function WS({article:e,onBack:t,onEdit:n,showActions:r=!1}){const{t:i}=Pt();return E.jsxs("div",{className:"mx-auto max-w-4xl",children:[(t||r&&n)&&E.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[t&&E.jsxs("button",{onClick:t,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),i("common.back")]}),r&&n&&E.jsxs("button",{onClick:()=>n(e),className:"flex items-center gap-2 rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),i("common.edit")]})]}),E.jsxs("article",{className:"rounded-lg bg-white p-8 shadow-md",children:[E.jsxs("header",{className:"border-b border-gray-200 pb-6",children:[E.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:e.title}),E.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[e.dateAt&&E.jsxs("span",{className:"flex items-center gap-2",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(e.dateAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]}),e.category&&E.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:e.category.title}),E.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${e.status===qe.Published?"bg-green-100 text-green-800":e.status===qe.Draft?"bg-gray-100 text-gray-800":e.status===qe.Review?"bg-yellow-100 text-yellow-800":e.status===qe.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:qe[e.status]})]}),e.tags&&e.tags.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.tags.map(s=>E.jsxs("span",{className:"rounded-md bg-gray-100 px-3 py-1 text-sm text-gray-700",children:["#",s.title]},s.tagId))}),e.roles&&e.roles.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.roles.map(s=>E.jsx("span",{className:"rounded-md bg-purple-100 px-3 py-1 text-sm text-purple-700",children:s.name},s.slug))})]}),E.jsx("div",{className:"prose prose-lg mt-8 max-w-none",children:E.jsx(sp,{remarkPlugins:[Dp],rehypePlugins:[yg],children:e.content})})]})]})}var xg=typeof global=="object"&&global&&global.Object===Object&&global,YS=typeof self=="object"&&self&&self.Object===Object&&self,gn=xg||YS||Function("return this")(),Un=gn.Symbol,Eg=Object.prototype,ZS=Eg.hasOwnProperty,XS=Eg.toString,mi=Un?Un.toStringTag:void 0;function JS(e){var t=ZS.call(e,mi),n=e[mi];try{e[mi]=void 0;var r=!0}catch{}var i=XS.call(e);return r&&(t?e[mi]=n:delete e[mi]),i}var QS=Object.prototype,eA=QS.toString;function tA(e){return eA.call(e)}var nA="[object Null]",rA="[object Undefined]",qd=Un?Un.toStringTag:void 0;function Yr(e){return e==null?e===void 0?rA:nA:qd&&qd in Object(e)?JS(e):tA(e)}function _n(e){return e!=null&&typeof e=="object"}var rr=Array.isArray;function jn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function wg(e){return e}var iA="[object AsyncFunction]",sA="[object Function]",aA="[object GeneratorFunction]",oA="[object Proxy]";function Cc(e){if(!jn(e))return!1;var t=Yr(e);return t==sA||t==aA||t==iA||t==oA}var Go=gn["__core-js_shared__"],jd=function(){var e=/[^.]+$/.exec(Go&&Go.keys&&Go.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function lA(e){return!!jd&&jd in e}var cA=Function.prototype,uA=cA.toString;function ur(e){if(e!=null){try{return uA.call(e)}catch{}try{return e+""}catch{}}return""}var dA=/[\\^$.*+?()[\]{}|]/g,fA=/^\[object .+?Constructor\]$/,hA=Function.prototype,pA=Object.prototype,gA=hA.toString,mA=pA.hasOwnProperty,bA=RegExp("^"+gA.call(mA).replace(dA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yA(e){if(!jn(e)||lA(e))return!1;var t=Cc(e)?bA:fA;return t.test(ur(e))}function xA(e,t){return e==null?void 0:e[t]}function dr(e,t){var n=xA(e,t);return yA(n)?n:void 0}var Sl=dr(gn,"WeakMap"),zd=Object.create,EA=function(){function e(){}return function(t){if(!jn(t))return{};if(zd)return zd(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function wA(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function vA(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var _A=800,kA=16,NA=Date.now;function SA(e){var t=0,n=0;return function(){var r=NA(),i=kA-(r-n);if(n=r,i>0){if(++t>=_A)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function AA(e){return function(){return e}}var Qs=function(){try{var e=dr(Object,"defineProperty");return e({},"",{}),e}catch{}}(),TA=Qs?function(e,t){return Qs(e,"toString",{configurable:!0,enumerable:!1,value:AA(t),writable:!0})}:wg,CA=SA(TA);function OA(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var IA=9007199254740991,RA=/^(?:0|[1-9]\d*)$/;function vg(e,t){var n=typeof e;return t=t??IA,!!t&&(n=="number"||n!="symbol"&&RA.test(e))&&e>-1&&e%1==0&&e<t}function Oc(e,t,n){t=="__proto__"&&Qs?Qs(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Wi(e,t){return e===t||e!==e&&t!==t}var LA=Object.prototype,MA=LA.hasOwnProperty;function _g(e,t,n){var r=e[t];(!(MA.call(e,t)&&Wi(r,n))||n===void 0&&!(t in e))&&Oc(e,t,n)}function DA(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=void 0;l===void 0&&(l=e[o]),i?Oc(n,o,l):_g(n,o,l)}return n}var Hd=Math.max;function PA(e,t,n){return t=Hd(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=Hd(r.length-t,0),a=Array(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),wA(e,this,o)}}function BA(e,t){return CA(PA(e,t,wg),e+"")}var FA=9007199254740991;function kg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=FA}function Ea(e){return e!=null&&kg(e.length)&&!Cc(e)}function $A(e,t,n){if(!jn(n))return!1;var r=typeof t;return(r=="number"?Ea(n)&&vg(t,n.length):r=="string"&&t in n)?Wi(n[t],e):!1}function UA(e){return BA(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,a&&$A(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var o=n[r];o&&e(t,o,r,s)}return t})}var qA=Object.prototype;function Ic(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||qA;return e===n}function jA(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var zA="[object Arguments]";function Gd(e){return _n(e)&&Yr(e)==zA}var Ng=Object.prototype,HA=Ng.hasOwnProperty,GA=Ng.propertyIsEnumerable,Al=Gd(function(){return arguments}())?Gd:function(e){return _n(e)&&HA.call(e,"callee")&&!GA.call(e,"callee")};function KA(){return!1}var Sg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Kd=Sg&&typeof module=="object"&&module&&!module.nodeType&&module,VA=Kd&&Kd.exports===Sg,Vd=VA?gn.Buffer:void 0,WA=Vd?Vd.isBuffer:void 0,Pi=WA||KA,YA="[object Arguments]",ZA="[object Array]",XA="[object Boolean]",JA="[object Date]",QA="[object Error]",eT="[object Function]",tT="[object Map]",nT="[object Number]",rT="[object Object]",iT="[object RegExp]",sT="[object Set]",aT="[object String]",oT="[object WeakMap]",lT="[object ArrayBuffer]",cT="[object DataView]",uT="[object Float32Array]",dT="[object Float64Array]",fT="[object Int8Array]",hT="[object Int16Array]",pT="[object Int32Array]",gT="[object Uint8Array]",mT="[object Uint8ClampedArray]",bT="[object Uint16Array]",yT="[object Uint32Array]",Le={};Le[uT]=Le[dT]=Le[fT]=Le[hT]=Le[pT]=Le[gT]=Le[mT]=Le[bT]=Le[yT]=!0;Le[YA]=Le[ZA]=Le[lT]=Le[XA]=Le[cT]=Le[JA]=Le[QA]=Le[eT]=Le[tT]=Le[nT]=Le[rT]=Le[iT]=Le[sT]=Le[aT]=Le[oT]=!1;function xT(e){return _n(e)&&kg(e.length)&&!!Le[Yr(e)]}function Rc(e){return function(t){return e(t)}}var Ag=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ai=Ag&&typeof module=="object"&&module&&!module.nodeType&&module,ET=Ai&&Ai.exports===Ag,Ko=ET&&xg.process,qr=function(){try{var e=Ai&&Ai.require&&Ai.require("util").types;return e||Ko&&Ko.binding&&Ko.binding("util")}catch{}}(),Wd=qr&&qr.isTypedArray,Lc=Wd?Rc(Wd):xT,wT=Object.prototype,vT=wT.hasOwnProperty;function Tg(e,t){var n=rr(e),r=!n&&Al(e),i=!n&&!r&&Pi(e),s=!n&&!r&&!i&&Lc(e),a=n||r||i||s,o=a?jA(e.length,String):[],l=o.length;for(var c in e)(t||vT.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||vg(c,l)))&&o.push(c);return o}function Cg(e,t){return function(n){return e(t(n))}}var _T=Cg(Object.keys,Object),kT=Object.prototype,NT=kT.hasOwnProperty;function ST(e){if(!Ic(e))return _T(e);var t=[];for(var n in Object(e))NT.call(e,n)&&n!="constructor"&&t.push(n);return t}function AT(e){return Ea(e)?Tg(e):ST(e)}function TT(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var CT=Object.prototype,OT=CT.hasOwnProperty;function IT(e){if(!jn(e))return TT(e);var t=Ic(e),n=[];for(var r in e)r=="constructor"&&(t||!OT.call(e,r))||n.push(r);return n}function Og(e){return Ea(e)?Tg(e,!0):IT(e)}var Bi=dr(Object,"create");function RT(){this.__data__=Bi?Bi(null):{},this.size=0}function LT(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var MT="__lodash_hash_undefined__",DT=Object.prototype,PT=DT.hasOwnProperty;function BT(e){var t=this.__data__;if(Bi){var n=t[e];return n===MT?void 0:n}return PT.call(t,e)?t[e]:void 0}var FT=Object.prototype,$T=FT.hasOwnProperty;function UT(e){var t=this.__data__;return Bi?t[e]!==void 0:$T.call(t,e)}var qT="__lodash_hash_undefined__";function jT(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Bi&&t===void 0?qT:t,this}function ir(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ir.prototype.clear=RT;ir.prototype.delete=LT;ir.prototype.get=BT;ir.prototype.has=UT;ir.prototype.set=jT;function zT(){this.__data__=[],this.size=0}function wa(e,t){for(var n=e.length;n--;)if(Wi(e[n][0],t))return n;return-1}var HT=Array.prototype,GT=HT.splice;function KT(e){var t=this.__data__,n=wa(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():GT.call(t,n,1),--this.size,!0}function VT(e){var t=this.__data__,n=wa(t,e);return n<0?void 0:t[n][1]}function WT(e){return wa(this.__data__,e)>-1}function YT(e,t){var n=this.__data__,r=wa(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function An(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}An.prototype.clear=zT;An.prototype.delete=KT;An.prototype.get=VT;An.prototype.has=WT;An.prototype.set=YT;var Fi=dr(gn,"Map");function ZT(){this.size=0,this.__data__={hash:new ir,map:new(Fi||An),string:new ir}}function XT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function va(e,t){var n=e.__data__;return XT(t)?n[typeof t=="string"?"string":"hash"]:n.map}function JT(e){var t=va(this,e).delete(e);return this.size-=t?1:0,t}function QT(e){return va(this,e).get(e)}function eC(e){return va(this,e).has(e)}function tC(e,t){var n=va(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function fr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fr.prototype.clear=ZT;fr.prototype.delete=JT;fr.prototype.get=QT;fr.prototype.has=eC;fr.prototype.set=tC;function nC(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Ig=Cg(Object.getPrototypeOf,Object),rC="[object Object]",iC=Function.prototype,sC=Object.prototype,Rg=iC.toString,aC=sC.hasOwnProperty,oC=Rg.call(Object);function lC(e){if(!_n(e)||Yr(e)!=rC)return!1;var t=Ig(e);if(t===null)return!0;var n=aC.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Rg.call(n)==oC}function cC(){this.__data__=new An,this.size=0}function uC(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function dC(e){return this.__data__.get(e)}function fC(e){return this.__data__.has(e)}var hC=200;function pC(e,t){var n=this.__data__;if(n instanceof An){var r=n.__data__;if(!Fi||r.length<hC-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new fr(r)}return n.set(e,t),this.size=n.size,this}function un(e){var t=this.__data__=new An(e);this.size=t.size}un.prototype.clear=cC;un.prototype.delete=uC;un.prototype.get=dC;un.prototype.has=fC;un.prototype.set=pC;var Lg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yd=Lg&&typeof module=="object"&&module&&!module.nodeType&&module,gC=Yd&&Yd.exports===Lg,Zd=gC?gn.Buffer:void 0,Xd=Zd?Zd.allocUnsafe:void 0;function Mg(e,t){if(t)return e.slice();var n=e.length,r=Xd?Xd(n):new e.constructor(n);return e.copy(r),r}function mC(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}function bC(){return[]}var yC=Object.prototype,xC=yC.propertyIsEnumerable,Jd=Object.getOwnPropertySymbols,EC=Jd?function(e){return e==null?[]:(e=Object(e),mC(Jd(e),function(t){return xC.call(e,t)}))}:bC;function wC(e,t,n){var r=t(e);return rr(e)?r:nC(r,n(e))}function Tl(e){return wC(e,AT,EC)}var Cl=dr(gn,"DataView"),Ol=dr(gn,"Promise"),Il=dr(gn,"Set"),Qd="[object Map]",vC="[object Object]",ef="[object Promise]",tf="[object Set]",nf="[object WeakMap]",rf="[object DataView]",_C=ur(Cl),kC=ur(Fi),NC=ur(Ol),SC=ur(Il),AC=ur(Sl),Gt=Yr;(Cl&&Gt(new Cl(new ArrayBuffer(1)))!=rf||Fi&&Gt(new Fi)!=Qd||Ol&&Gt(Ol.resolve())!=ef||Il&&Gt(new Il)!=tf||Sl&&Gt(new Sl)!=nf)&&(Gt=function(e){var t=Yr(e),n=t==vC?e.constructor:void 0,r=n?ur(n):"";if(r)switch(r){case _C:return rf;case kC:return Qd;case NC:return ef;case SC:return tf;case AC:return nf}return t});var TC=Object.prototype,CC=TC.hasOwnProperty;function OC(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&CC.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var ea=gn.Uint8Array;function Mc(e){var t=new e.constructor(e.byteLength);return new ea(t).set(new ea(e)),t}function IC(e,t){var n=Mc(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var RC=/\w*$/;function LC(e){var t=new e.constructor(e.source,RC.exec(e));return t.lastIndex=e.lastIndex,t}var sf=Un?Un.prototype:void 0,af=sf?sf.valueOf:void 0;function MC(e){return af?Object(af.call(e)):{}}function Dg(e,t){var n=t?Mc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var DC="[object Boolean]",PC="[object Date]",BC="[object Map]",FC="[object Number]",$C="[object RegExp]",UC="[object Set]",qC="[object String]",jC="[object Symbol]",zC="[object ArrayBuffer]",HC="[object DataView]",GC="[object Float32Array]",KC="[object Float64Array]",VC="[object Int8Array]",WC="[object Int16Array]",YC="[object Int32Array]",ZC="[object Uint8Array]",XC="[object Uint8ClampedArray]",JC="[object Uint16Array]",QC="[object Uint32Array]";function eO(e,t,n){var r=e.constructor;switch(t){case zC:return Mc(e);case DC:case PC:return new r(+e);case HC:return IC(e);case GC:case KC:case VC:case WC:case YC:case ZC:case XC:case JC:case QC:return Dg(e,n);case BC:return new r;case FC:case qC:return new r(e);case $C:return LC(e);case UC:return new r;case jC:return MC(e)}}function Pg(e){return typeof e.constructor=="function"&&!Ic(e)?EA(Ig(e)):{}}var tO="[object Map]";function nO(e){return _n(e)&&Gt(e)==tO}var of=qr&&qr.isMap,rO=of?Rc(of):nO,iO="[object Set]";function sO(e){return _n(e)&&Gt(e)==iO}var lf=qr&&qr.isSet,aO=lf?Rc(lf):sO,oO=1,Bg="[object Arguments]",lO="[object Array]",cO="[object Boolean]",uO="[object Date]",dO="[object Error]",Fg="[object Function]",fO="[object GeneratorFunction]",hO="[object Map]",pO="[object Number]",$g="[object Object]",gO="[object RegExp]",mO="[object Set]",bO="[object String]",yO="[object Symbol]",xO="[object WeakMap]",EO="[object ArrayBuffer]",wO="[object DataView]",vO="[object Float32Array]",_O="[object Float64Array]",kO="[object Int8Array]",NO="[object Int16Array]",SO="[object Int32Array]",AO="[object Uint8Array]",TO="[object Uint8ClampedArray]",CO="[object Uint16Array]",OO="[object Uint32Array]",Oe={};Oe[Bg]=Oe[lO]=Oe[EO]=Oe[wO]=Oe[cO]=Oe[uO]=Oe[vO]=Oe[_O]=Oe[kO]=Oe[NO]=Oe[SO]=Oe[hO]=Oe[pO]=Oe[$g]=Oe[gO]=Oe[mO]=Oe[bO]=Oe[yO]=Oe[AO]=Oe[TO]=Oe[CO]=Oe[OO]=!0;Oe[dO]=Oe[Fg]=Oe[xO]=!1;function Bs(e,t,n,r,i,s){var a,o=t&oO;if(a!==void 0)return a;if(!jn(e))return e;var l=rr(e);if(l)a=OC(e);else{var c=Gt(e),u=c==Fg||c==fO;if(Pi(e))return Mg(e,o);if(c==$g||c==Bg||u&&!i)a=u?{}:Pg(e);else{if(!Oe[c])return i?e:{};a=eO(e,c,o)}}s||(s=new un);var d=s.get(e);if(d)return d;s.set(e,a),aO(e)?e.forEach(function(p){a.add(Bs(p,t,n,p,e,s))}):rO(e)&&e.forEach(function(p,g){a.set(g,Bs(p,t,n,g,e,s))});var h=Tl,f=l?void 0:h(e);return OA(f||e,function(p,g){f&&(g=p,p=e[g]),_g(a,g,Bs(p,t,n,g,e,s))}),a}var IO=1,RO=4;function Dr(e){return Bs(e,IO|RO)}var LO="__lodash_hash_undefined__";function MO(e){return this.__data__.set(e,LO),this}function DO(e){return this.__data__.has(e)}function ta(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new fr;++t<n;)this.add(e[t])}ta.prototype.add=ta.prototype.push=MO;ta.prototype.has=DO;function PO(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function BO(e,t){return e.has(t)}var FO=1,$O=2;function Ug(e,t,n,r,i,s){var a=n&FO,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&$O?new ta:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],g=t[d];if(r)var b=a?r(g,p,d,t,e,s):r(p,g,d,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!PO(t,function(y,w){if(!BO(f,w)&&(p===y||i(p,y,n,r,s)))return f.push(w)})){h=!1;break}}else if(!(p===g||i(p,g,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function UO(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function qO(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var jO=1,zO=2,HO="[object Boolean]",GO="[object Date]",KO="[object Error]",VO="[object Map]",WO="[object Number]",YO="[object RegExp]",ZO="[object Set]",XO="[object String]",JO="[object Symbol]",QO="[object ArrayBuffer]",eI="[object DataView]",cf=Un?Un.prototype:void 0,Vo=cf?cf.valueOf:void 0;function tI(e,t,n,r,i,s,a){switch(n){case eI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case QO:return!(e.byteLength!=t.byteLength||!s(new ea(e),new ea(t)));case HO:case GO:case WO:return Wi(+e,+t);case KO:return e.name==t.name&&e.message==t.message;case YO:case XO:return e==t+"";case VO:var o=UO;case ZO:var l=r&jO;if(o||(o=qO),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=zO,a.set(e,t);var u=Ug(o(e),o(t),r,i,s,a);return a.delete(e),u;case JO:if(Vo)return Vo.call(e)==Vo.call(t)}return!1}var nI=1,rI=Object.prototype,iI=rI.hasOwnProperty;function sI(e,t,n,r,i,s){var a=n&nI,o=Tl(e),l=o.length,c=Tl(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=o[d];if(!(a?h in t:iI.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var b=a;++d<l;){h=o[d];var y=e[h],w=t[h];if(r)var _=a?r(w,y,h,t,e,s):r(y,w,h,e,t,s);if(!(_===void 0?y===w||i(y,w,n,r,s):_)){g=!1;break}b||(b=h=="constructor")}if(g&&!b){var A=e.constructor,O=t.constructor;A!=O&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof O=="function"&&O instanceof O)&&(g=!1)}return s.delete(e),s.delete(t),g}var aI=1,uf="[object Arguments]",df="[object Array]",As="[object Object]",oI=Object.prototype,ff=oI.hasOwnProperty;function lI(e,t,n,r,i,s){var a=rr(e),o=rr(t),l=a?df:Gt(e),c=o?df:Gt(t);l=l==uf?As:l,c=c==uf?As:c;var u=l==As,d=c==As,h=l==c;if(h&&Pi(e)){if(!Pi(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new un),a||Lc(e)?Ug(e,t,n,r,i,s):tI(e,t,l,n,r,i,s);if(!(n&aI)){var f=u&&ff.call(e,"__wrapped__"),p=d&&ff.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,b=p?t.value():t;return s||(s=new un),i(g,b,n,r,s)}}return h?(s||(s=new un),sI(e,t,n,r,i,s)):!1}function qg(e,t,n,r,i){return e===t?!0:e==null||t==null||!_n(e)&&!_n(t)?e!==e&&t!==t:lI(e,t,n,r,qg,i)}function cI(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[++i];if(n(s[l],l,s)===!1)break}return t}}var uI=cI();function Rl(e,t,n){(n!==void 0&&!Wi(e[t],n)||n===void 0&&!(t in e))&&Oc(e,t,n)}function dI(e){return _n(e)&&Ea(e)}function Ll(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function fI(e){return DA(e,Og(e))}function hI(e,t,n,r,i,s,a){var o=Ll(e,n),l=Ll(t,n),c=a.get(l);if(c){Rl(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=rr(l),f=!h&&Pi(l),p=!h&&!f&&Lc(l);u=l,h||f||p?rr(o)?u=o:dI(o)?u=vA(o):f?(d=!1,u=Mg(l,!0)):p?(d=!1,u=Dg(l,!0)):u=[]:lC(l)||Al(l)?(u=o,Al(o)?u=fI(o):(!jn(o)||Cc(o))&&(u=Pg(l))):d=!1}d&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),Rl(e,n,u)}function jg(e,t,n,r,i){e!==t&&uI(t,function(s,a){if(i||(i=new un),jn(s))hI(e,t,a,n,jg,r,i);else{var o=r?r(Ll(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),Rl(e,a,o)}},Og)}function Dn(e,t){return qg(e,t)}var $n=UA(function(e,t,n){jg(e,t,n)}),ne=(e=>(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(ne||{});class fn{constructor(t,n,r={}){this.attrName=t,this.keyName=n;const i=ne.TYPE&ne.ATTRIBUTE;this.scope=r.scope!=null?r.scope&ne.LEVEL|i:ne.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(t){return Array.from(t.attributes).map(n=>n.name)}add(t,n){return this.canAdd(t,n)?(t.setAttribute(this.keyName,n),!0):!1}canAdd(t,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const n=t.getAttribute(this.keyName);return this.canAdd(t,n)&&n?n:""}}class Pr extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const zg=class Ml{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,n=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(n){let r=null;try{r=t.parentNode}catch{return null}return this.find(r,n)}return null}create(t,n,r){const i=this.query(n);if(i==null)throw new Pr(`Unable to create ${n} blot`);const s=i,a=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:s.create(r),o=new s(t,a,r);return Ml.blots.set(o.domNode,o),o}find(t,n=!1){return Ml.find(t,n)}query(t,n=ne.ANY){let r;return typeof t=="string"?r=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?r=this.types.text:typeof t=="number"?t&ne.LEVEL&ne.BLOCK?r=this.types.block:t&ne.LEVEL&ne.INLINE&&(r=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[t.tagName]),r==null?null:"scope"in r&&n&ne.LEVEL&r.scope&&n&ne.TYPE&r.scope?r:null}register(...t){return t.map(n=>{const r="blotName"in n,i="attrName"in n;if(!r&&!i)throw new Pr("Invalid definition");if(r&&n.blotName==="abstract")throw new Pr("Cannot register abstract class");const s=r?n.blotName:i?n.attrName:void 0;return this.types[s]=n,i?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(a=>a.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(a=>{(this.tags[a]==null||n.className==null)&&(this.tags[a]=n)}))),n})}};zg.blots=new WeakMap;let jr=zg;function hf(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${t}-`)===0)}class pI extends fn{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(t,n){return this.canAdd(t,n)?(this.remove(t),t.classList.add(`${this.keyName}-${n}`),!0):!1}remove(t){hf(t,this.keyName).forEach(n=>{t.classList.remove(n)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const n=(hf(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,n)?n:""}}const Zt=pI;function Wo(e){const t=e.split("-"),n=t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return t[0]+n}class gI extends fn{static keys(t){return(t.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(t,n){return this.canAdd(t,n)?(t.style[Wo(this.keyName)]=n,!0):!1}remove(t){t.style[Wo(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const n=t.style[Wo(this.keyName)];return this.canAdd(t,n)?n:""}}const zn=gI;class mI{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,n){n?t.add(this.domNode,n)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=jr.find(this.domNode);if(t==null)return;const n=fn.keys(this.domNode),r=Zt.keys(this.domNode),i=zn.keys(this.domNode);n.concat(r).concat(i).forEach(s=>{const a=t.scroll.query(s,ne.ATTRIBUTE);a instanceof fn&&(this.attributes[a.attrName]=a)})}copy(t){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);t.format(n,r)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,n)=>(t[n]=this.attributes[n].value(this.domNode),t),{})}}const _a=mI,Hg=class{constructor(t,n){this.scroll=t,this.domNode=n,jr.blots.set(n,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new Pr("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof t=="string"?(r=t.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof t=="number"&&(r=t),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),jr.blots.delete(this.domNode)}deleteAt(t,n){this.isolate(t,n).remove()}formatAt(t,n,r,i){const s=this.isolate(t,n);if(this.scroll.query(r,ne.BLOT)!=null&&i)s.wrap(r,i);else if(this.scroll.query(r,ne.ATTRIBUTE)!=null){const a=this.scroll.create(this.statics.scope);s.wrap(a),a.format(r,i)}}insertAt(t,n,r){const i=r==null?this.scroll.create("text",n):this.scroll.create(n,r),s=this.split(t);this.parent.insertBefore(i,s||void 0)}isolate(t,n){const r=this.split(t);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(t,n){return t===0?this:this.next}update(t,n){}wrap(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Pr(`Cannot wrap ${t}`);return r.appendChild(this),r}};Hg.blotName="abstract";let Gg=Hg;const Kg=class extends Gg{static value(t){return!0}index(t,n){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(t,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Kg.scope=ne.INLINE_BLOT;let bI=Kg;const Qe=bI;class yI{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const n=t.slice(1);this.append(...n)}}at(t){const n=this.iterator();let r=n();for(;r&&t>0;)t-=1,r=n();return r}contains(t){const n=this.iterator();let r=n();for(;r;){if(r===t)return!0;r=n()}return!1}indexOf(t){const n=this.iterator();let r=n(),i=0;for(;r;){if(r===t)return i;i+=1,r=n()}return-1}insertBefore(t,n){t!=null&&(this.remove(t),t.next=n,n!=null?(t.prev=n.prev,n.prev!=null&&(n.prev.next=t),n.prev=t,n===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let n=0,r=this.head;for(;r!=null;){if(r===t)return n;n+=r.length(),r=r.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const n=t;return t!=null&&(t=t.next),n}}find(t,n=!1){const r=this.iterator();let i=r();for(;i;){const s=i.length();if(t<s||n&&t===s&&(i.next==null||i.next.length()!==0))return[i,t];t-=s,i=r()}return[null,0]}forEach(t){const n=this.iterator();let r=n();for(;r;)t(r),r=n()}forEachAt(t,n,r){if(n<=0)return;const[i,s]=this.find(t);let a=t-s;const o=this.iterator(i);let l=o();for(;l&&a<t+n;){const c=l.length();t>a?r(l,t-a,Math.min(n,a+c-t)):r(l,0,Math.min(c,t+n-a)),a+=c,l=o()}}map(t){return this.reduce((n,r)=>(n.push(t(r)),n),[])}reduce(t,n){const r=this.iterator();let i=r();for(;i;)n=t(n,i),i=r();return n}}function pf(e,t){const n=t.find(e);if(n)return n;try{return t.create(e)}catch{const r=t.create(ne.INLINE);return Array.from(e.childNodes).forEach(i=>{r.domNode.appendChild(i)}),e.parentNode&&e.parentNode.replaceChild(r.domNode,e),r.attach(),r}}const Vg=class Mn extends Gg{constructor(t,n){super(t,n),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,Mn.uiClass&&this.uiNode.classList.add(Mn.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new yI,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const n=pf(t,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Pr)return;throw n}})}deleteAt(t,n){if(t===0&&n===this.length())return this.remove();this.children.forEachAt(t,n,(r,i,s)=>{r.deleteAt(i,s)})}descendant(t,n=0){const[r,i]=this.children.find(n);return t.blotName==null&&t(r)||t.blotName!=null&&r instanceof t?[r,i]:r instanceof Mn?r.descendant(t,i):[null,-1]}descendants(t,n=0,r=Number.MAX_VALUE){let i=[],s=r;return this.children.forEachAt(n,r,(a,o,l)=>{(t.blotName==null&&t(a)||t.blotName!=null&&a instanceof t)&&i.push(a),a instanceof Mn&&(i=i.concat(a.descendants(t,o,s))),s-=l}),i}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(n=>{t||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===ne.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),t=!0):n instanceof Mn?n.unwrap():n.remove())})}formatAt(t,n,r,i){this.children.forEachAt(t,n,(s,a,o)=>{s.formatAt(a,o,r,i)})}insertAt(t,n,r){const[i,s]=this.children.find(t);if(i)i.insertAt(s,n,r);else{const a=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(a)}}insertBefore(t,n){t.parent!=null&&t.parent.children.remove(t);let r=null;this.children.insertBefore(t,n||null),t.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(t.domNode,r),t.attach()}length(){return this.children.reduce((t,n)=>t+n.length(),0)}moveChildren(t,n){this.children.forEach(r=>{t.insertBefore(r,n)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(t,n=!1){const[r,i]=this.children.find(t,n),s=[[this,t]];return r instanceof Mn?s.concat(r.path(i,n)):(r!=null&&s.push([r,i]),s)}removeChild(t){this.children.remove(t)}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return r instanceof Mn&&this.moveChildren(r),super.replaceWith(r)}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(t,this.length(),(i,s,a)=>{const o=i.split(s,n);o!=null&&r.appendChild(o)}),r}splitAfter(t){const n=this.clone();for(;t.next!=null;)n.appendChild(t.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,n){const r=[],i=[];t.forEach(s=>{s.target===this.domNode&&s.type==="childList"&&(r.push(...s.addedNodes),i.push(...s.removedNodes))}),i.forEach(s=>{if(s.parentNode!=null&&s.tagName!=="IFRAME"&&document.body.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const a=this.scroll.find(s);a!=null&&(a.domNode.parentNode==null||a.domNode.parentNode===this.domNode)&&a.detach()}),r.filter(s=>s.parentNode===this.domNode&&s!==this.uiNode).sort((s,a)=>s===a?0:s.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(s=>{let a=null;s.nextSibling!=null&&(a=this.scroll.find(s.nextSibling));const o=pf(s,this.scroll);(o.next!==a||o.next==null)&&(o.parent!=null&&o.parent.removeChild(this),this.insertBefore(o,a||void 0))}),this.enforceAllowedChildren()}};Vg.uiClass="";let xI=Vg;const Wt=xI;function EI(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}const Tr=class Cr extends Wt{static create(t){return super.create(t)}static formats(t,n){const r=n.query(Cr.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new _a(this.domNode)}format(t,n){if(t===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof Cr||(r=r.wrap(Cr.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(t,ne.INLINE);if(r==null)return;r instanceof fn?this.attributes.attribute(r,n):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n)}}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,i){this.formats()[r]!=null||this.scroll.query(r,ne.ATTRIBUTE)?this.isolate(t,n).format(r,i):super.formatAt(t,n,r,i)}optimize(t){super.optimize(t);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof Cr&&r.prev===this&&EI(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(t,n){const r=super.wrap(t,n);return r instanceof Cr&&this.attributes.move(r),r}};Tr.allowedChildren=[Tr,Qe],Tr.blotName="inline",Tr.scope=ne.INLINE_BLOT,Tr.tagName="SPAN";let wI=Tr;const Dc=wI,Or=class Dl extends Wt{static create(t){return super.create(t)}static formats(t,n){const r=n.query(Dl.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new _a(this.domNode)}format(t,n){const r=this.scroll.query(t,ne.BLOCK);r!=null&&(r instanceof fn?this.attributes.attribute(r,n):t===this.statics.blotName&&!n?this.replaceWith(Dl.blotName):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n))}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,i){this.scroll.query(r,ne.BLOCK)!=null?this.format(r,i):super.formatAt(t,n,r,i)}insertAt(t,n,r){if(r==null||this.scroll.query(n,ne.INLINE)!=null)super.insertAt(t,n,r);else{const i=this.split(t);if(i!=null){const s=this.scroll.create(n,r);i.parent.insertBefore(s,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Or.blotName="block",Or.scope=ne.BLOCK_BLOT,Or.tagName="P",Or.allowedChildren=[Dc,Or,Qe];let vI=Or;const $i=vI,Pl=class extends Wt{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,n){super.deleteAt(t,n),this.enforceAllowedChildren()}formatAt(t,n,r,i){super.formatAt(t,n,r,i),this.enforceAllowedChildren()}insertAt(t,n,r){super.insertAt(t,n,r),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Pl.blotName="container",Pl.scope=ne.BLOCK_BLOT;let _I=Pl;const ka=_I;class kI extends Qe{static formats(t,n){}format(t,n){super.formatAt(0,this.length(),t,n)}formatAt(t,n,r,i){t===0&&n===this.length()?this.format(r,i):super.formatAt(t,n,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Nt=kI,NI={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},SI=100,Ir=class extends Wt{constructor(t,n){super(null,n),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,NI),this.attach()}create(t,n){return this.registry.create(this,t,n)}find(t,n=!1){const r=this.registry.find(t,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(t,n=ne.ANY){return this.registry.query(t,n)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,n){this.update(),t===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(t,n)}formatAt(t,n,r,i){this.update(),super.formatAt(t,n,r,i)}insertAt(t,n,r){this.update(),super.insertAt(t,n,r)}optimize(t=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)t.push(i.pop());const s=(l,c=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(r.has(l.domNode)||r.set(l.domNode,[]),c&&s(l.parent))},a=l=>{r.has(l.domNode)&&(l instanceof Wt&&l.children.forEach(a),r.delete(l.domNode),l.optimize(n))};let o=t;for(let l=0;o.length>0;l+=1){if(l>=SI)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach(c=>{const u=this.find(c.target,!0);u!=null&&(u.domNode===c.target&&(c.type==="childList"?(s(this.find(c.previousSibling,!1)),Array.from(c.addedNodes).forEach(d=>{const h=this.find(d,!1);s(h,!1),h instanceof Wt&&h.children.forEach(f=>{s(f,!1)})})):c.type==="attributes"&&s(u.prev)),s(u))}),this.children.forEach(a),o=Array.from(this.observer.takeRecords()),i=o.slice();i.length>0;)t.push(i.pop())}}update(t,n={}){t=t||this.observer.takeRecords();const r=new WeakMap;t.map(i=>{const s=this.find(i.target,!0);return s==null?null:r.has(s.domNode)?(r.get(s.domNode).push(i),null):(r.set(s.domNode,[i]),s)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(t,n)}};Ir.blotName="scroll",Ir.defaultChild=$i,Ir.allowedChildren=[$i,ka],Ir.scope=ne.BLOCK_BLOT,Ir.tagName="DIV";let AI=Ir;const Pc=AI,Bl=class Wg extends Qe{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,n){super(t,n),this.text=this.statics.value(this.domNode)}deleteAt(t,n){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+n)}index(t,n){return this.domNode===t?n:-1}insertAt(t,n,r){r==null?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,n,r)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Wg&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,n=!1){return[this.domNode,t]}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(t,n){t.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Bl.blotName="text",Bl.scope=ne.INLINE_BLOT;let TI=Bl;const na=TI,CI=Object.freeze(Object.defineProperty({__proto__:null,Attributor:fn,AttributorStore:_a,BlockBlot:$i,ClassAttributor:Zt,ContainerBlot:ka,EmbedBlot:Nt,InlineBlot:Dc,LeafBlot:Qe,ParentBlot:Wt,Registry:jr,Scope:ne,ScrollBlot:Pc,StyleAttributor:zn,TextBlot:na},Symbol.toStringTag,{value:"Module"}));var Fl={exports:{}},_t=-1,ut=1,$e=0;function Ui(e,t,n,r,i){if(e===t)return e?[[$e,e]]:[];if(n!=null){var s=FI(e,t,n);if(s)return s}var a=Bc(e,t),o=e.substring(0,a);e=e.substring(a),t=t.substring(a),a=Na(e,t);var l=e.substring(e.length-a);e=e.substring(0,e.length-a),t=t.substring(0,t.length-a);var c=OI(e,t);return o&&c.unshift([$e,o]),l&&c.push([$e,l]),Fc(c,i),r&&LI(c),c}function OI(e,t){var n;if(!e)return[[ut,t]];if(!t)return[[_t,e]];var r=e.length>t.length?e:t,i=e.length>t.length?t:e,s=r.indexOf(i);if(s!==-1)return n=[[ut,r.substring(0,s)],[$e,i],[ut,r.substring(s+i.length)]],e.length>t.length&&(n[0][0]=n[2][0]=_t),n;if(i.length===1)return[[_t,e],[ut,t]];var a=RI(e,t);if(a){var o=a[0],l=a[1],c=a[2],u=a[3],d=a[4],h=Ui(o,c),f=Ui(l,u);return h.concat([[$e,d]],f)}return II(e,t)}function II(e,t){for(var n=e.length,r=t.length,i=Math.ceil((n+r)/2),s=i,a=2*i,o=new Array(a),l=new Array(a),c=0;c<a;c++)o[c]=-1,l[c]=-1;o[s+1]=0,l[s+1]=0;for(var u=n-r,d=u%2!==0,h=0,f=0,p=0,g=0,b=0;b<i;b++){for(var y=-b+h;y<=b-f;y+=2){var w=s+y,_;y===-b||y!==b&&o[w-1]<o[w+1]?_=o[w+1]:_=o[w-1]+1;for(var A=_-y;_<n&&A<r&&e.charAt(_)===t.charAt(A);)_++,A++;if(o[w]=_,_>n)f+=2;else if(A>r)h+=2;else if(d){var O=s+u-y;if(O>=0&&O<a&&l[O]!==-1){var N=n-l[O];if(_>=N)return gf(e,t,_,A)}}}for(var D=-b+p;D<=b-g;D+=2){var O=s+D,N;D===-b||D!==b&&l[O-1]<l[O+1]?N=l[O+1]:N=l[O-1]+1;for(var q=N-D;N<n&&q<r&&e.charAt(n-N-1)===t.charAt(r-q-1);)N++,q++;if(l[O]=N,N>n)g+=2;else if(q>r)p+=2;else if(!d){var w=s+u-D;if(w>=0&&w<a&&o[w]!==-1){var _=o[w],A=s+_-w;if(N=n-N,_>=N)return gf(e,t,_,A)}}}}return[[_t,e],[ut,t]]}function gf(e,t,n,r){var i=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),o=t.substring(r),l=Ui(i,s),c=Ui(a,o);return l.concat(c)}function Bc(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,s=0;n<i;)e.substring(s,i)==t.substring(s,i)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return Yg(e.charCodeAt(i-1))&&i--,i}function mf(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var s=0,a=1;;){var o=e.substring(i-a),l=t.indexOf(o);if(l==-1)return s;a+=l,(l==0||e.substring(i-a)==t.substring(0,a))&&(s=a,a++)}}function Na(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,s=0;n<i;)e.substring(e.length-i,e.length-s)==t.substring(t.length-i,t.length-s)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return Zg(e.charCodeAt(e.length-i))&&i--,i}function RI(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;function i(f,p,g){for(var b=f.substring(g,g+Math.floor(f.length/4)),y=-1,w="",_,A,O,N;(y=p.indexOf(b,y+1))!==-1;){var D=Bc(f.substring(g),p.substring(y)),q=Na(f.substring(0,g),p.substring(0,y));w.length<q+D&&(w=p.substring(y-q,y)+p.substring(y,y+D),_=f.substring(0,g-q),A=f.substring(g+D),O=p.substring(0,y-q),N=p.substring(y+D))}return w.length*2>=f.length?[_,A,O,N,w]:null}var s=i(n,r,Math.ceil(n.length/4)),a=i(n,r,Math.ceil(n.length/2)),o;if(!s&&!a)return null;a?s?o=s[4].length>a[4].length?s:a:o=a:o=s;var l,c,u,d;e.length>t.length?(l=o[0],c=o[1],u=o[2],d=o[3]):(u=o[0],d=o[1],l=o[2],c=o[3]);var h=o[4];return[l,c,u,d,h]}function LI(e){for(var t=!1,n=[],r=0,i=null,s=0,a=0,o=0,l=0,c=0;s<e.length;)e[s][0]==$e?(n[r++]=s,a=l,o=c,l=0,c=0,i=e[s][1]):(e[s][0]==ut?l+=e[s][1].length:c+=e[s][1].length,i&&i.length<=Math.max(a,o)&&i.length<=Math.max(l,c)&&(e.splice(n[r-1],0,[_t,i]),e[n[r-1]+1][0]=ut,r--,r--,s=r>0?n[r-1]:-1,a=0,o=0,l=0,c=0,i=null,t=!0)),s++;for(t&&Fc(e),PI(e),s=1;s<e.length;){if(e[s-1][0]==_t&&e[s][0]==ut){var u=e[s-1][1],d=e[s][1],h=mf(u,d),f=mf(d,u);h>=f?(h>=u.length/2||h>=d.length/2)&&(e.splice(s,0,[$e,d.substring(0,h)]),e[s-1][1]=u.substring(0,u.length-h),e[s+1][1]=d.substring(h),s++):(f>=u.length/2||f>=d.length/2)&&(e.splice(s,0,[$e,u.substring(0,f)]),e[s-1][0]=ut,e[s-1][1]=d.substring(0,d.length-f),e[s+1][0]=_t,e[s+1][1]=u.substring(f),s++),s++}s++}}var bf=/[^a-zA-Z0-9]/,yf=/\s/,xf=/[\r\n]/,MI=/\n\r?\n$/,DI=/^\r?\n\r?\n/;function PI(e){function t(f,p){if(!f||!p)return 6;var g=f.charAt(f.length-1),b=p.charAt(0),y=g.match(bf),w=b.match(bf),_=y&&g.match(yf),A=w&&b.match(yf),O=_&&g.match(xf),N=A&&b.match(xf),D=O&&f.match(MI),q=N&&p.match(DI);return D||q?5:O||N?4:y&&!_&&A?3:_||A?2:y||w?1:0}for(var n=1;n<e.length-1;){if(e[n-1][0]==$e&&e[n+1][0]==$e){var r=e[n-1][1],i=e[n][1],s=e[n+1][1],a=Na(r,i);if(a){var o=i.substring(i.length-a);r=r.substring(0,r.length-a),i=o+i.substring(0,i.length-a),s=o+s}for(var l=r,c=i,u=s,d=t(r,i)+t(i,s);i.charAt(0)===s.charAt(0);){r+=i.charAt(0),i=i.substring(1)+s.charAt(0),s=s.substring(1);var h=t(r,i)+t(i,s);h>=d&&(d=h,l=r,c=i,u=s)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=c,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}}function Fc(e,t){e.push([$e,""]);for(var n=0,r=0,i=0,s="",a="",o;n<e.length;){if(n<e.length-1&&!e[n][1]){e.splice(n,1);continue}switch(e[n][0]){case ut:i++,a+=e[n][1],n++;break;case _t:r++,s+=e[n][1],n++;break;case $e:var l=n-i-r-1;if(t){if(l>=0&&Jg(e[l][1])){var c=e[l][1].slice(-1);if(e[l][1]=e[l][1].slice(0,-1),s=c+s,a=c+a,!e[l][1]){e.splice(l,1),n--;var u=l-1;e[u]&&e[u][0]===ut&&(i++,a=e[u][1]+a,u--),e[u]&&e[u][0]===_t&&(r++,s=e[u][1]+s,u--),l=u}}if(Xg(e[n][1])){var c=e[n][1].charAt(0);e[n][1]=e[n][1].slice(1),s+=c,a+=c}}if(n<e.length-1&&!e[n][1]){e.splice(n,1);break}if(s.length>0||a.length>0){s.length>0&&a.length>0&&(o=Bc(a,s),o!==0&&(l>=0?e[l][1]+=a.substring(0,o):(e.splice(0,0,[$e,a.substring(0,o)]),n++),a=a.substring(o),s=s.substring(o)),o=Na(a,s),o!==0&&(e[n][1]=a.substring(a.length-o)+e[n][1],a=a.substring(0,a.length-o),s=s.substring(0,s.length-o)));var d=i+r;s.length===0&&a.length===0?(e.splice(n-d,d),n=n-d):s.length===0?(e.splice(n-d,d,[ut,a]),n=n-d+1):a.length===0?(e.splice(n-d,d,[_t,s]),n=n-d+1):(e.splice(n-d,d,[_t,s],[ut,a]),n=n-d+2)}n!==0&&e[n-1][0]===$e?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,i=0,r=0,s="",a="";break}}e[e.length-1][1]===""&&e.pop();var h=!1;for(n=1;n<e.length-1;)e[n-1][0]===$e&&e[n+1][0]===$e&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)===e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),h=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),h=!0)),n++;h&&Fc(e,t)}function Yg(e){return e>=55296&&e<=56319}function Zg(e){return e>=56320&&e<=57343}function Xg(e){return Zg(e.charCodeAt(0))}function Jg(e){return Yg(e.charCodeAt(e.length-1))}function BI(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}function Yo(e,t,n,r){return Jg(e)||Xg(r)?null:BI([[$e,e],[_t,t],[ut,n],[$e,r]])}function FI(e,t,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,i=typeof n=="number"?null:n.newRange,s=e.length,a=t.length;if(r.length===0&&(i===null||i.length===0)){var o=r.index,l=e.slice(0,o),c=e.slice(o),u=i?i.index:null;e:{var d=o+a-s;if(u!==null&&u!==d||d<0||d>a)break e;var h=t.slice(0,d),f=t.slice(d);if(f!==c)break e;var p=Math.min(o,d),g=l.slice(0,p),b=h.slice(0,p);if(g!==b)break e;var y=l.slice(p),w=h.slice(p);return Yo(g,y,w,c)}e:{if(u!==null&&u!==o)break e;var _=o,h=t.slice(0,_),f=t.slice(_);if(h!==l)break e;var A=Math.min(s-_,a-_),O=c.slice(c.length-A),N=f.slice(f.length-A);if(O!==N)break e;var y=c.slice(0,c.length-A),w=f.slice(0,f.length-A);return Yo(l,y,w,O)}}if(r.length>0&&i&&i.length===0)e:{var g=e.slice(0,r.index),O=e.slice(r.index+r.length),p=g.length,A=O.length;if(a<p+A)break e;var b=t.slice(0,p),N=t.slice(a-A);if(g!==b||O!==N)break e;var y=e.slice(p,s-A),w=t.slice(p,a-A);return Yo(g,y,w,O)}return null}function Sa(e,t,n,r){return Ui(e,t,n,r,!0)}Sa.INSERT=ut;Sa.DELETE=_t;Sa.EQUAL=$e;var $I=Sa,ra={exports:{}};ra.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",a="[object Array]",o="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",h="[object Map]",f="[object Number]",p="[object Object]",g="[object Promise]",b="[object RegExp]",y="[object Set]",w="[object String]",_="[object Symbol]",A="[object WeakMap]",O="[object ArrayBuffer]",N="[object DataView]",D="[object Float32Array]",q="[object Float64Array]",H="[object Int8Array]",C="[object Int16Array]",F="[object Int32Array]",M="[object Uint8Array]",V="[object Uint8ClampedArray]",z="[object Uint16Array]",Z="[object Uint32Array]",I=/[\\^$.*+?()[\]{}|]/g,U=/\w*$/,j=/^\[object .+?Constructor\]$/,W=/^(?:0|[1-9]\d*)$/,v={};v[s]=v[a]=v[O]=v[N]=v[o]=v[l]=v[D]=v[q]=v[H]=v[C]=v[F]=v[h]=v[f]=v[p]=v[b]=v[y]=v[w]=v[_]=v[M]=v[V]=v[z]=v[Z]=!0,v[c]=v[u]=v[A]=!1;var Y=typeof Mt=="object"&&Mt&&Mt.Object===Object&&Mt,ae=typeof self=="object"&&self&&self.Object===Object&&self,k=Y||ae||Function("return this")(),de=t&&!t.nodeType&&t,re=de&&!0&&e&&!e.nodeType&&e,_e=re&&re.exports===de;function Ve(m,x){return m.set(x[0],x[1]),m}function X(m,x){return m.add(x),m}function ye(m,x){for(var S=-1,P=m?m.length:0;++S<P&&x(m[S],S,m)!==!1;);return m}function Se(m,x){for(var S=-1,P=x.length,ue=m.length;++S<P;)m[ue+S]=x[S];return m}function je(m,x,S,P){for(var ue=-1,se=m?m.length:0;++ue<se;)S=x(S,m[ue],ue,m);return S}function it(m,x){for(var S=-1,P=Array(m);++S<m;)P[S]=x(S);return P}function Et(m,x){return m==null?void 0:m[x]}function St(m){var x=!1;if(m!=null&&typeof m.toString!="function")try{x=!!(m+"")}catch{}return x}function De(m){var x=-1,S=Array(m.size);return m.forEach(function(P,ue){S[++x]=[ue,P]}),S}function me(m,x){return function(S){return m(x(S))}}function We(m){var x=-1,S=Array(m.size);return m.forEach(function(P){S[++x]=P}),S}var oe=Array.prototype,Bt=Function.prototype,Ae=Object.prototype,xe=k["__core-js_shared__"],Ft=function(){var m=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""}(),ft=Bt.toString,Ye=Ae.hasOwnProperty,At=Ae.toString,T=RegExp("^"+ft.call(Ye).replace(I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=_e?k.Buffer:void 0,K=k.Symbol,J=k.Uint8Array,ie=me(Object.getPrototypeOf,Object),Ce=Object.create,ht=Ae.propertyIsEnumerable,st=oe.splice,$t=Object.getOwnPropertySymbols,Tt=R?R.isBuffer:void 0,Ue=me(Object.keys,Object),wt=qt(k,"DataView"),ze=qt(k,"Map"),Ut=qt(k,"Promise"),br=qt(k,"Set"),ei=qt(k,"WeakMap"),Hn=qt(Object,"create"),ti=at(wt),Gn=at(ze),ni=at(Ut),ri=at(br),ii=at(ei),Cn=K?K.prototype:void 0,rs=Cn?Cn.valueOf:void 0;function mn(m){var x=-1,S=m?m.length:0;for(this.clear();++x<S;){var P=m[x];this.set(P[0],P[1])}}function Fa(){this.__data__=Hn?Hn(null):{}}function $a(m){return this.has(m)&&delete this.__data__[m]}function Ua(m){var x=this.__data__;if(Hn){var S=x[m];return S===r?void 0:S}return Ye.call(x,m)?x[m]:void 0}function is(m){var x=this.__data__;return Hn?x[m]!==void 0:Ye.call(x,m)}function si(m,x){var S=this.__data__;return S[m]=Hn&&x===void 0?r:x,this}mn.prototype.clear=Fa,mn.prototype.delete=$a,mn.prototype.get=Ua,mn.prototype.has=is,mn.prototype.set=si;function He(m){var x=-1,S=m?m.length:0;for(this.clear();++x<S;){var P=m[x];this.set(P[0],P[1])}}function qa(){this.__data__=[]}function ja(m){var x=this.__data__,S=xr(x,m);if(S<0)return!1;var P=x.length-1;return S==P?x.pop():st.call(x,S,1),!0}function za(m){var x=this.__data__,S=xr(x,m);return S<0?void 0:x[S][1]}function Ha(m){return xr(this.__data__,m)>-1}function Ga(m,x){var S=this.__data__,P=xr(S,m);return P<0?S.push([m,x]):S[P][1]=x,this}He.prototype.clear=qa,He.prototype.delete=ja,He.prototype.get=za,He.prototype.has=Ha,He.prototype.set=Ga;function Ze(m){var x=-1,S=m?m.length:0;for(this.clear();++x<S;){var P=m[x];this.set(P[0],P[1])}}function Ka(){this.__data__={hash:new mn,map:new(ze||He),string:new mn}}function Va(m){return Vn(this,m).delete(m)}function Wa(m){return Vn(this,m).get(m)}function Ya(m){return Vn(this,m).has(m)}function Za(m,x){return Vn(this,m).set(m,x),this}Ze.prototype.clear=Ka,Ze.prototype.delete=Va,Ze.prototype.get=Wa,Ze.prototype.has=Ya,Ze.prototype.set=Za;function pt(m){this.__data__=new He(m)}function Xa(){this.__data__=new He}function Ja(m){return this.__data__.delete(m)}function Qa(m){return this.__data__.get(m)}function eo(m){return this.__data__.has(m)}function to(m,x){var S=this.__data__;if(S instanceof He){var P=S.__data__;if(!ze||P.length<n-1)return P.push([m,x]),this;S=this.__data__=new Ze(P)}return S.set(m,x),this}pt.prototype.clear=Xa,pt.prototype.delete=Ja,pt.prototype.get=Qa,pt.prototype.has=eo,pt.prototype.set=to;function yr(m,x){var S=ci(m)||wr(m)?it(m.length,String):[],P=S.length,ue=!!P;for(var se in m)Ye.call(m,se)&&!(ue&&(se=="length"||mo(se,P)))&&S.push(se);return S}function ss(m,x,S){var P=m[x];(!(Ye.call(m,x)&&us(P,S))||S===void 0&&!(x in m))&&(m[x]=S)}function xr(m,x){for(var S=m.length;S--;)if(us(m[S][0],x))return S;return-1}function en(m,x){return m&&li(x,di(x),m)}function ai(m,x,S,P,ue,se,ve){var we;if(P&&(we=se?P(m,ue,se,ve):P(m)),we!==void 0)return we;if(!nn(m))return m;var Pe=ci(m);if(Pe){if(we=po(m),!x)return uo(m,we)}else{var ke=yn(m),Xe=ke==u||ke==d;if(ds(m))return Er(m,x);if(ke==p||ke==s||Xe&&!se){if(St(m))return se?m:{};if(we=tn(Xe?{}:m),!x)return fo(m,en(we,m))}else{if(!v[ke])return se?m:{};we=go(m,ke,ai,x)}}ve||(ve=new pt);var gt=ve.get(m);if(gt)return gt;if(ve.set(m,we),!Pe)var Fe=S?ho(m):di(m);return ye(Fe||m,function(Je,Ge){Fe&&(Ge=Je,Je=m[Ge]),ss(we,Ge,ai(Je,x,S,P,Ge,m,ve))}),we}function no(m){return nn(m)?Ce(m):{}}function ro(m,x,S){var P=x(m);return ci(m)?P:Se(P,S(m))}function io(m){return At.call(m)}function so(m){if(!nn(m)||yo(m))return!1;var x=ui(m)||St(m)?T:j;return x.test(at(m))}function ao(m){if(!ls(m))return Ue(m);var x=[];for(var S in Object(m))Ye.call(m,S)&&S!="constructor"&&x.push(S);return x}function Er(m,x){if(x)return m.slice();var S=new m.constructor(m.length);return m.copy(S),S}function oi(m){var x=new m.constructor(m.byteLength);return new J(x).set(new J(m)),x}function Kn(m,x){var S=x?oi(m.buffer):m.buffer;return new m.constructor(S,m.byteOffset,m.byteLength)}function as(m,x,S){var P=x?S(De(m),!0):De(m);return je(P,Ve,new m.constructor)}function os(m){var x=new m.constructor(m.source,U.exec(m));return x.lastIndex=m.lastIndex,x}function oo(m,x,S){var P=x?S(We(m),!0):We(m);return je(P,X,new m.constructor)}function lo(m){return rs?Object(rs.call(m)):{}}function co(m,x){var S=x?oi(m.buffer):m.buffer;return new m.constructor(S,m.byteOffset,m.length)}function uo(m,x){var S=-1,P=m.length;for(x||(x=Array(P));++S<P;)x[S]=m[S];return x}function li(m,x,S,P){S||(S={});for(var ue=-1,se=x.length;++ue<se;){var ve=x[ue],we=void 0;ss(S,ve,we===void 0?m[ve]:we)}return S}function fo(m,x){return li(m,bn(m),x)}function ho(m){return ro(m,di,bn)}function Vn(m,x){var S=m.__data__;return bo(x)?S[typeof x=="string"?"string":"hash"]:S.map}function qt(m,x){var S=Et(m,x);return so(S)?S:void 0}var bn=$t?me($t,Object):Eo,yn=io;(wt&&yn(new wt(new ArrayBuffer(1)))!=N||ze&&yn(new ze)!=h||Ut&&yn(Ut.resolve())!=g||br&&yn(new br)!=y||ei&&yn(new ei)!=A)&&(yn=function(m){var x=At.call(m),S=x==p?m.constructor:void 0,P=S?at(S):void 0;if(P)switch(P){case ti:return N;case Gn:return h;case ni:return g;case ri:return y;case ii:return A}return x});function po(m){var x=m.length,S=m.constructor(x);return x&&typeof m[0]=="string"&&Ye.call(m,"index")&&(S.index=m.index,S.input=m.input),S}function tn(m){return typeof m.constructor=="function"&&!ls(m)?no(ie(m)):{}}function go(m,x,S,P){var ue=m.constructor;switch(x){case O:return oi(m);case o:case l:return new ue(+m);case N:return Kn(m,P);case D:case q:case H:case C:case F:case M:case V:case z:case Z:return co(m,P);case h:return as(m,P,S);case f:case w:return new ue(m);case b:return os(m);case y:return oo(m,P,S);case _:return lo(m)}}function mo(m,x){return x=x??i,!!x&&(typeof m=="number"||W.test(m))&&m>-1&&m%1==0&&m<x}function bo(m){var x=typeof m;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?m!=="__proto__":m===null}function yo(m){return!!Ft&&Ft in m}function ls(m){var x=m&&m.constructor,S=typeof x=="function"&&x.prototype||Ae;return m===S}function at(m){if(m!=null){try{return ft.call(m)}catch{}try{return m+""}catch{}}return""}function cs(m){return ai(m,!0,!0)}function us(m,x){return m===x||m!==m&&x!==x}function wr(m){return xo(m)&&Ye.call(m,"callee")&&(!ht.call(m,"callee")||At.call(m)==s)}var ci=Array.isArray;function vr(m){return m!=null&&fs(m.length)&&!ui(m)}function xo(m){return hs(m)&&vr(m)}var ds=Tt||wo;function ui(m){var x=nn(m)?At.call(m):"";return x==u||x==d}function fs(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=i}function nn(m){var x=typeof m;return!!m&&(x=="object"||x=="function")}function hs(m){return!!m&&typeof m=="object"}function di(m){return vr(m)?yr(m):ao(m)}function Eo(){return[]}function wo(){return!1}e.exports=cs})(ra,ra.exports);var Qg=ra.exports,ia={exports:{}};ia.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,s=2,a=9007199254740991,o="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",g="[object Map]",b="[object Number]",y="[object Null]",w="[object Object]",_="[object Promise]",A="[object Proxy]",O="[object RegExp]",N="[object Set]",D="[object String]",q="[object Symbol]",H="[object Undefined]",C="[object WeakMap]",F="[object ArrayBuffer]",M="[object DataView]",V="[object Float32Array]",z="[object Float64Array]",Z="[object Int8Array]",I="[object Int16Array]",U="[object Int32Array]",j="[object Uint8Array]",W="[object Uint8ClampedArray]",v="[object Uint16Array]",Y="[object Uint32Array]",ae=/[\\^$.*+?()[\]{}|]/g,k=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,re={};re[V]=re[z]=re[Z]=re[I]=re[U]=re[j]=re[W]=re[v]=re[Y]=!0,re[o]=re[l]=re[F]=re[u]=re[M]=re[d]=re[h]=re[f]=re[g]=re[b]=re[w]=re[O]=re[N]=re[D]=re[C]=!1;var _e=typeof Mt=="object"&&Mt&&Mt.Object===Object&&Mt,Ve=typeof self=="object"&&self&&self.Object===Object&&self,X=_e||Ve||Function("return this")(),ye=t&&!t.nodeType&&t,Se=ye&&!0&&e&&!e.nodeType&&e,je=Se&&Se.exports===ye,it=je&&_e.process,Et=function(){try{return it&&it.binding&&it.binding("util")}catch{}}(),St=Et&&Et.isTypedArray;function De(m,x){for(var S=-1,P=m==null?0:m.length,ue=0,se=[];++S<P;){var ve=m[S];x(ve,S,m)&&(se[ue++]=ve)}return se}function me(m,x){for(var S=-1,P=x.length,ue=m.length;++S<P;)m[ue+S]=x[S];return m}function We(m,x){for(var S=-1,P=m==null?0:m.length;++S<P;)if(x(m[S],S,m))return!0;return!1}function oe(m,x){for(var S=-1,P=Array(m);++S<m;)P[S]=x(S);return P}function Bt(m){return function(x){return m(x)}}function Ae(m,x){return m.has(x)}function xe(m,x){return m==null?void 0:m[x]}function Ft(m){var x=-1,S=Array(m.size);return m.forEach(function(P,ue){S[++x]=[ue,P]}),S}function ft(m,x){return function(S){return m(x(S))}}function Ye(m){var x=-1,S=Array(m.size);return m.forEach(function(P){S[++x]=P}),S}var At=Array.prototype,T=Function.prototype,R=Object.prototype,K=X["__core-js_shared__"],J=T.toString,ie=R.hasOwnProperty,Ce=function(){var m=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""}(),ht=R.toString,st=RegExp("^"+J.call(ie).replace(ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$t=je?X.Buffer:void 0,Tt=X.Symbol,Ue=X.Uint8Array,wt=R.propertyIsEnumerable,ze=At.splice,Ut=Tt?Tt.toStringTag:void 0,br=Object.getOwnPropertySymbols,ei=$t?$t.isBuffer:void 0,Hn=ft(Object.keys,Object),ti=bn(X,"DataView"),Gn=bn(X,"Map"),ni=bn(X,"Promise"),ri=bn(X,"Set"),ii=bn(X,"WeakMap"),Cn=bn(Object,"create"),rs=at(ti),mn=at(Gn),Fa=at(ni),$a=at(ri),Ua=at(ii),is=Tt?Tt.prototype:void 0,si=is?is.valueOf:void 0;function He(m){var x=-1,S=m==null?0:m.length;for(this.clear();++x<S;){var P=m[x];this.set(P[0],P[1])}}function qa(){this.__data__=Cn?Cn(null):{},this.size=0}function ja(m){var x=this.has(m)&&delete this.__data__[m];return this.size-=x?1:0,x}function za(m){var x=this.__data__;if(Cn){var S=x[m];return S===r?void 0:S}return ie.call(x,m)?x[m]:void 0}function Ha(m){var x=this.__data__;return Cn?x[m]!==void 0:ie.call(x,m)}function Ga(m,x){var S=this.__data__;return this.size+=this.has(m)?0:1,S[m]=Cn&&x===void 0?r:x,this}He.prototype.clear=qa,He.prototype.delete=ja,He.prototype.get=za,He.prototype.has=Ha,He.prototype.set=Ga;function Ze(m){var x=-1,S=m==null?0:m.length;for(this.clear();++x<S;){var P=m[x];this.set(P[0],P[1])}}function Ka(){this.__data__=[],this.size=0}function Va(m){var x=this.__data__,S=Er(x,m);if(S<0)return!1;var P=x.length-1;return S==P?x.pop():ze.call(x,S,1),--this.size,!0}function Wa(m){var x=this.__data__,S=Er(x,m);return S<0?void 0:x[S][1]}function Ya(m){return Er(this.__data__,m)>-1}function Za(m,x){var S=this.__data__,P=Er(S,m);return P<0?(++this.size,S.push([m,x])):S[P][1]=x,this}Ze.prototype.clear=Ka,Ze.prototype.delete=Va,Ze.prototype.get=Wa,Ze.prototype.has=Ya,Ze.prototype.set=Za;function pt(m){var x=-1,S=m==null?0:m.length;for(this.clear();++x<S;){var P=m[x];this.set(P[0],P[1])}}function Xa(){this.size=0,this.__data__={hash:new He,map:new(Gn||Ze),string:new He}}function Ja(m){var x=qt(this,m).delete(m);return this.size-=x?1:0,x}function Qa(m){return qt(this,m).get(m)}function eo(m){return qt(this,m).has(m)}function to(m,x){var S=qt(this,m),P=S.size;return S.set(m,x),this.size+=S.size==P?0:1,this}pt.prototype.clear=Xa,pt.prototype.delete=Ja,pt.prototype.get=Qa,pt.prototype.has=eo,pt.prototype.set=to;function yr(m){var x=-1,S=m==null?0:m.length;for(this.__data__=new pt;++x<S;)this.add(m[x])}function ss(m){return this.__data__.set(m,r),this}function xr(m){return this.__data__.has(m)}yr.prototype.add=yr.prototype.push=ss,yr.prototype.has=xr;function en(m){var x=this.__data__=new Ze(m);this.size=x.size}function ai(){this.__data__=new Ze,this.size=0}function no(m){var x=this.__data__,S=x.delete(m);return this.size=x.size,S}function ro(m){return this.__data__.get(m)}function io(m){return this.__data__.has(m)}function so(m,x){var S=this.__data__;if(S instanceof Ze){var P=S.__data__;if(!Gn||P.length<n-1)return P.push([m,x]),this.size=++S.size,this;S=this.__data__=new pt(P)}return S.set(m,x),this.size=S.size,this}en.prototype.clear=ai,en.prototype.delete=no,en.prototype.get=ro,en.prototype.has=io,en.prototype.set=so;function ao(m,x){var S=wr(m),P=!S&&us(m),ue=!S&&!P&&vr(m),se=!S&&!P&&!ue&&hs(m),ve=S||P||ue||se,we=ve?oe(m.length,String):[],Pe=we.length;for(var ke in m)ie.call(m,ke)&&!(ve&&(ke=="length"||ue&&(ke=="offset"||ke=="parent")||se&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||go(ke,Pe)))&&we.push(ke);return we}function Er(m,x){for(var S=m.length;S--;)if(cs(m[S][0],x))return S;return-1}function oi(m,x,S){var P=x(m);return wr(m)?P:me(P,S(m))}function Kn(m){return m==null?m===void 0?H:y:Ut&&Ut in Object(m)?yn(m):ls(m)}function as(m){return nn(m)&&Kn(m)==o}function os(m,x,S,P,ue){return m===x?!0:m==null||x==null||!nn(m)&&!nn(x)?m!==m&&x!==x:oo(m,x,S,P,os,ue)}function oo(m,x,S,P,ue,se){var ve=wr(m),we=wr(x),Pe=ve?l:tn(m),ke=we?l:tn(x);Pe=Pe==o?w:Pe,ke=ke==o?w:ke;var Xe=Pe==w,gt=ke==w,Fe=Pe==ke;if(Fe&&vr(m)){if(!vr(x))return!1;ve=!0,Xe=!1}if(Fe&&!Xe)return se||(se=new en),ve||hs(m)?li(m,x,S,P,ue,se):fo(m,x,Pe,S,P,ue,se);if(!(S&i)){var Je=Xe&&ie.call(m,"__wrapped__"),Ge=gt&&ie.call(x,"__wrapped__");if(Je||Ge){var On=Je?m.value():m,xn=Ge?x.value():x;return se||(se=new en),ue(On,xn,S,P,se)}}return Fe?(se||(se=new en),ho(m,x,S,P,ue,se)):!1}function lo(m){if(!fs(m)||bo(m))return!1;var x=ds(m)?st:k;return x.test(at(m))}function co(m){return nn(m)&&ui(m.length)&&!!re[Kn(m)]}function uo(m){if(!yo(m))return Hn(m);var x=[];for(var S in Object(m))ie.call(m,S)&&S!="constructor"&&x.push(S);return x}function li(m,x,S,P,ue,se){var ve=S&i,we=m.length,Pe=x.length;if(we!=Pe&&!(ve&&Pe>we))return!1;var ke=se.get(m);if(ke&&se.get(x))return ke==x;var Xe=-1,gt=!0,Fe=S&s?new yr:void 0;for(se.set(m,x),se.set(x,m);++Xe<we;){var Je=m[Xe],Ge=x[Xe];if(P)var On=ve?P(Ge,Je,Xe,x,m,se):P(Je,Ge,Xe,m,x,se);if(On!==void 0){if(On)continue;gt=!1;break}if(Fe){if(!We(x,function(xn,Wn){if(!Ae(Fe,Wn)&&(Je===xn||ue(Je,xn,S,P,se)))return Fe.push(Wn)})){gt=!1;break}}else if(!(Je===Ge||ue(Je,Ge,S,P,se))){gt=!1;break}}return se.delete(m),se.delete(x),gt}function fo(m,x,S,P,ue,se,ve){switch(S){case M:if(m.byteLength!=x.byteLength||m.byteOffset!=x.byteOffset)return!1;m=m.buffer,x=x.buffer;case F:return!(m.byteLength!=x.byteLength||!se(new Ue(m),new Ue(x)));case u:case d:case b:return cs(+m,+x);case h:return m.name==x.name&&m.message==x.message;case O:case D:return m==x+"";case g:var we=Ft;case N:var Pe=P&i;if(we||(we=Ye),m.size!=x.size&&!Pe)return!1;var ke=ve.get(m);if(ke)return ke==x;P|=s,ve.set(m,x);var Xe=li(we(m),we(x),P,ue,se,ve);return ve.delete(m),Xe;case q:if(si)return si.call(m)==si.call(x)}return!1}function ho(m,x,S,P,ue,se){var ve=S&i,we=Vn(m),Pe=we.length,ke=Vn(x),Xe=ke.length;if(Pe!=Xe&&!ve)return!1;for(var gt=Pe;gt--;){var Fe=we[gt];if(!(ve?Fe in x:ie.call(x,Fe)))return!1}var Je=se.get(m);if(Je&&se.get(x))return Je==x;var Ge=!0;se.set(m,x),se.set(x,m);for(var On=ve;++gt<Pe;){Fe=we[gt];var xn=m[Fe],Wn=x[Fe];if(P)var iu=ve?P(Wn,xn,Fe,x,m,se):P(xn,Wn,Fe,m,x,se);if(!(iu===void 0?xn===Wn||ue(xn,Wn,S,P,se):iu)){Ge=!1;break}On||(On=Fe=="constructor")}if(Ge&&!On){var ps=m.constructor,gs=x.constructor;ps!=gs&&"constructor"in m&&"constructor"in x&&!(typeof ps=="function"&&ps instanceof ps&&typeof gs=="function"&&gs instanceof gs)&&(Ge=!1)}return se.delete(m),se.delete(x),Ge}function Vn(m){return oi(m,di,po)}function qt(m,x){var S=m.__data__;return mo(x)?S[typeof x=="string"?"string":"hash"]:S.map}function bn(m,x){var S=xe(m,x);return lo(S)?S:void 0}function yn(m){var x=ie.call(m,Ut),S=m[Ut];try{m[Ut]=void 0;var P=!0}catch{}var ue=ht.call(m);return P&&(x?m[Ut]=S:delete m[Ut]),ue}var po=br?function(m){return m==null?[]:(m=Object(m),De(br(m),function(x){return wt.call(m,x)}))}:Eo,tn=Kn;(ti&&tn(new ti(new ArrayBuffer(1)))!=M||Gn&&tn(new Gn)!=g||ni&&tn(ni.resolve())!=_||ri&&tn(new ri)!=N||ii&&tn(new ii)!=C)&&(tn=function(m){var x=Kn(m),S=x==w?m.constructor:void 0,P=S?at(S):"";if(P)switch(P){case rs:return M;case mn:return g;case Fa:return _;case $a:return N;case Ua:return C}return x});function go(m,x){return x=x??a,!!x&&(typeof m=="number"||de.test(m))&&m>-1&&m%1==0&&m<x}function mo(m){var x=typeof m;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?m!=="__proto__":m===null}function bo(m){return!!Ce&&Ce in m}function yo(m){var x=m&&m.constructor,S=typeof x=="function"&&x.prototype||R;return m===S}function ls(m){return ht.call(m)}function at(m){if(m!=null){try{return J.call(m)}catch{}try{return m+""}catch{}}return""}function cs(m,x){return m===x||m!==m&&x!==x}var us=as(function(){return arguments}())?as:function(m){return nn(m)&&ie.call(m,"callee")&&!wt.call(m,"callee")},wr=Array.isArray;function ci(m){return m!=null&&ui(m.length)&&!ds(m)}var vr=ei||wo;function xo(m,x){return os(m,x)}function ds(m){if(!fs(m))return!1;var x=Kn(m);return x==f||x==p||x==c||x==A}function ui(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=a}function fs(m){var x=typeof m;return m!=null&&(x=="object"||x=="function")}function nn(m){return m!=null&&typeof m=="object"}var hs=St?Bt(St):co;function di(m){return ci(m)?ao(m):uo(m)}function Eo(){return[]}function wo(){return!1}e.exports=xo})(ia,ia.exports);var em=ia.exports,$c={};Object.defineProperty($c,"__esModule",{value:!0});const UI=Qg,qI=em;var $l;(function(e){function t(s={},a={},o=!1){typeof s!="object"&&(s={}),typeof a!="object"&&(a={});let l=UI(a);o||(l=Object.keys(l).reduce((c,u)=>(l[u]!=null&&(c[u]=l[u]),c),{}));for(const c in s)s[c]!==void 0&&a[c]===void 0&&(l[c]=s[c]);return Object.keys(l).length>0?l:void 0}e.compose=t;function n(s={},a={}){typeof s!="object"&&(s={}),typeof a!="object"&&(a={});const o=Object.keys(s).concat(Object.keys(a)).reduce((l,c)=>(qI(s[c],a[c])||(l[c]=a[c]===void 0?null:a[c]),l),{});return Object.keys(o).length>0?o:void 0}e.diff=n;function r(s={},a={}){s=s||{};const o=Object.keys(a).reduce((l,c)=>(a[c]!==s[c]&&s[c]!==void 0&&(l[c]=a[c]),l),{});return Object.keys(s).reduce((l,c)=>(s[c]!==a[c]&&a[c]===void 0&&(l[c]=null),l),o)}e.invert=r;function i(s,a,o=!1){if(typeof s!="object")return a;if(typeof a!="object")return;if(!o)return a;const l=Object.keys(a).reduce((c,u)=>(s[u]===void 0&&(c[u]=a[u]),c),{});return Object.keys(l).length>0?l:void 0}e.transform=i})($l||($l={}));$c.default=$l;var Aa={};Object.defineProperty(Aa,"__esModule",{value:!0});var Ul;(function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t})(Ul||(Ul={}));Aa.default=Ul;var Uc={};Object.defineProperty(Uc,"__esModule",{value:!0});const Ef=Aa;class jI{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);const n=this.ops[this.index];if(n){const r=this.offset,i=Ef.default.length(n);if(t>=i-r?(t=i-r,this.index+=1,this.offset=0):this.offset+=t,typeof n.delete=="number")return{delete:t};{const s={};return n.attributes&&(s.attributes=n.attributes),typeof n.retain=="number"?s.retain=t:typeof n.retain=="object"&&n.retain!==null?s.retain=n.retain:typeof n.insert=="string"?s.insert=n.insert.substr(r,t):s.insert=n.insert,s}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?Ef.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const t=this.ops[this.index];return t?typeof t.delete=="number"?"delete":typeof t.retain=="number"||typeof t.retain=="object"&&t.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const t=this.offset,n=this.index,r=this.next(),i=this.ops.slice(this.index);return this.offset=t,this.index=n,[r].concat(i)}}else return[]}}Uc.default=jI;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=$I,r=Qg,i=em,s=$c;t.AttributeMap=s.default;const a=Aa;t.Op=a.default;const o=Uc;t.OpIterator=o.default;const l="\0",c=(d,h)=>{if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const f=Object.keys(d)[0];if(!f||f!==Object.keys(h)[0])throw new Error(`embed types not matched: ${f} != ${Object.keys(h)[0]}`);return[f,d[f],h[f]]};class u{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,f){this.handlers[h]=f}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const f=this.handlers[h];if(!f)throw new Error(`no handlers for embed type "${h}"`);return f}insert(h,f){const p={};return typeof h=="string"&&h.length===0?this:(p.insert=h,f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,f){if(typeof h=="number"&&h<=0)return this;const p={retain:h};return f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p)}push(h){let f=this.ops.length,p=this.ops[f-1];if(h=r(h),typeof p=="object"){if(typeof h.delete=="number"&&typeof p.delete=="number")return this.ops[f-1]={delete:p.delete+h.delete},this;if(typeof p.delete=="number"&&h.insert!=null&&(f-=1,p=this.ops[f-1],typeof p!="object"))return this.ops.unshift(h),this;if(i(h.attributes,p.attributes)){if(typeof h.insert=="string"&&typeof p.insert=="string")return this.ops[f-1]={insert:p.insert+h.insert},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof p.retain=="number")return this.ops[f-1]={retain:p.retain+h.retain},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this}}return f===this.ops.length?this.ops.push(h):this.ops.splice(f,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const f=[],p=[];return this.forEach(g=>{(h(g)?f:p).push(g)}),[f,p]}reduce(h,f){return this.ops.reduce(h,f)}changeLength(){return this.reduce((h,f)=>f.insert?h+a.default.length(f):f.delete?h-f.delete:h,0)}length(){return this.reduce((h,f)=>h+a.default.length(f),0)}slice(h=0,f=1/0){const p=[],g=new o.default(this.ops);let b=0;for(;b<f&&g.hasNext();){let y;b<h?y=g.next(h-b):(y=g.next(f-b),p.push(y)),b+=a.default.length(y)}return new u(p)}compose(h){const f=new o.default(this.ops),p=new o.default(h.ops),g=[],b=p.peek();if(b!=null&&typeof b.retain=="number"&&b.attributes==null){let w=b.retain;for(;f.peekType()==="insert"&&f.peekLength()<=w;)w-=f.peekLength(),g.push(f.next());b.retain-w>0&&p.next(b.retain-w)}const y=new u(g);for(;f.hasNext()||p.hasNext();)if(p.peekType()==="insert")y.push(p.next());else if(f.peekType()==="delete")y.push(f.next());else{const w=Math.min(f.peekLength(),p.peekLength()),_=f.next(w),A=p.next(w);if(A.retain){const O={};if(typeof _.retain=="number")O.retain=typeof A.retain=="number"?w:A.retain;else if(typeof A.retain=="number")_.retain==null?O.insert=_.insert:O.retain=_.retain;else{const D=_.retain==null?"insert":"retain",[q,H,C]=c(_[D],A.retain),F=u.getHandler(q);O[D]={[q]:F.compose(H,C,D==="retain")}}const N=s.default.compose(_.attributes,A.attributes,typeof _.retain=="number");if(N&&(O.attributes=N),y.push(O),!p.hasNext()&&i(y.ops[y.ops.length-1],O)){const D=new u(f.rest());return y.concat(D).chop()}}else typeof A.delete=="number"&&(typeof _.retain=="number"||typeof _.retain=="object"&&_.retain!==null)&&y.push(A)}return y.chop()}concat(h){const f=new u(this.ops.slice());return h.ops.length>0&&(f.push(h.ops[0]),f.ops=f.ops.concat(h.ops.slice(1))),f}diff(h,f){if(this.ops===h.ops)return new u;const p=[this,h].map(_=>_.map(A=>{if(A.insert!=null)return typeof A.insert=="string"?A.insert:l;const O=_===h?"on":"with";throw new Error("diff() called "+O+" non-document")}).join("")),g=new u,b=n(p[0],p[1],f,!0),y=new o.default(this.ops),w=new o.default(h.ops);return b.forEach(_=>{let A=_[1].length;for(;A>0;){let O=0;switch(_[0]){case n.INSERT:O=Math.min(w.peekLength(),A),g.push(w.next(O));break;case n.DELETE:O=Math.min(A,y.peekLength()),y.next(O),g.delete(O);break;case n.EQUAL:O=Math.min(y.peekLength(),w.peekLength(),A);const N=y.next(O),D=w.next(O);i(N.insert,D.insert)?g.retain(O,s.default.diff(N.attributes,D.attributes)):g.push(D).delete(O);break}A-=O}}),g.chop()}eachLine(h,f=`
52
+ `){const p=new o.default(this.ops);let g=new u,b=0;for(;p.hasNext();){if(p.peekType()!=="insert")return;const y=p.peek(),w=a.default.length(y)-p.peekLength(),_=typeof y.insert=="string"?y.insert.indexOf(f,w)-w:-1;if(_<0)g.push(p.next());else if(_>0)g.push(p.next(_));else{if(h(g,p.next(1).attributes||{},b)===!1)return;b+=1,g=new u}}g.length()>0&&h(g,{},b)}invert(h){const f=new u;return this.reduce((p,g)=>{if(g.insert)f.delete(a.default.length(g));else{if(typeof g.retain=="number"&&g.attributes==null)return f.retain(g.retain),p+g.retain;if(g.delete||typeof g.retain=="number"){const b=g.delete||g.retain;return h.slice(p,p+b).forEach(w=>{g.delete?f.push(w):g.retain&&g.attributes&&f.retain(a.default.length(w),s.default.invert(g.attributes,w.attributes))}),p+b}else if(typeof g.retain=="object"&&g.retain!==null){const b=h.slice(p,p+1),y=new o.default(b.ops).next(),[w,_,A]=c(g.retain,y.insert),O=u.getHandler(w);return f.retain({[w]:O.invert(_,A)},s.default.invert(g.attributes,y.attributes)),p+1}}return p},0),f.chop()}transform(h,f=!1){if(f=!!f,typeof h=="number")return this.transformPosition(h,f);const p=h,g=new o.default(this.ops),b=new o.default(p.ops),y=new u;for(;g.hasNext()||b.hasNext();)if(g.peekType()==="insert"&&(f||b.peekType()!=="insert"))y.retain(a.default.length(g.next()));else if(b.peekType()==="insert")y.push(b.next());else{const w=Math.min(g.peekLength(),b.peekLength()),_=g.next(w),A=b.next(w);if(_.delete)continue;if(A.delete)y.push(A);else{const O=_.retain,N=A.retain;let D=typeof N=="object"&&N!==null?N:w;if(typeof O=="object"&&O!==null&&typeof N=="object"&&N!==null){const q=Object.keys(O)[0];if(q===Object.keys(N)[0]){const H=u.getHandler(q);H&&(D={[q]:H.transform(O[q],N[q],f)})}}y.retain(D,s.default.transform(_.attributes,A.attributes,f))}}return y.chop()}transformPosition(h,f=!1){f=!!f;const p=new o.default(this.ops);let g=0;for(;p.hasNext()&&g<=h;){const b=p.peekLength(),y=p.peekType();if(p.next(),y==="delete"){h-=Math.min(b,h-g);continue}else y==="insert"&&(g<h||!f)&&(h+=b);g+=b}return h}}u.Op=a.default,u.OpIterator=o.default,u.AttributeMap=s.default,u.handlers={},t.default=u,e.exports=u,e.exports.default=u})(Fl,Fl.exports);var Dt=Fl.exports;const te=Hi(Dt);class Xt extends Nt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Xt.blotName="break";Xt.tagName="BR";let Yt=class extends na{};const zI={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ta(e){return e.replace(/[&<>"']/g,t=>zI[t])}const ln=class ln extends Dc{static compare(t,n){const r=ln.order.indexOf(t),i=ln.order.indexOf(n);return r>=0||i>=0?r-i:t===n?0:t<n?-1:1}formatAt(t,n,r,i){if(ln.compare(this.statics.blotName,r)<0&&this.scroll.query(r,ne.BLOT)){const s=this.isolate(t,n);i&&s.wrap(r,i)}else super.formatAt(t,n,r,i)}optimize(t){if(super.optimize(t),this.parent instanceof ln&&ln.compare(this.statics.blotName,this.parent.statics.blotName)>0){const n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}};Q(ln,"allowedChildren",[ln,Xt,Nt,Yt]),Q(ln,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let hn=ln;const wf=1;class Ke extends $i{constructor(){super(...arguments);Q(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=tm(this)),this.cache.delta}deleteAt(n,r){super.deleteAt(n,r),this.cache={}}formatAt(n,r,i,s){r<=0||(this.scroll.query(i,ne.BLOCK)?n+r===this.length()&&this.format(i,s):super.formatAt(n,Math.min(r,this.length()-n-1),i,s),this.cache={})}insertAt(n,r,i){if(i!=null){super.insertAt(n,r,i),this.cache={};return}if(r.length===0)return;const s=r.split(`
53
+ `),a=s.shift();a.length>0&&(n<this.length()-1||this.children.tail==null?super.insertAt(Math.min(n,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});let o=this;s.reduce((l,c)=>(o=o.split(l,!0),o.insertAt(0,c),c.length),n+a.length)}insertBefore(n,r){const{head:i}=this.children;super.insertBefore(n,r),i instanceof Xt&&i.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+wf),this.cache.length}moveChildren(n,r){super.moveChildren(n,r),this.cache={}}optimize(n){super.optimize(n),this.cache={}}path(n){return super.path(n,!0)}removeChild(n){super.removeChild(n),this.cache={}}split(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(n===0||n>=this.length()-wf)){const s=this.clone();return n===0?(this.parent.insertBefore(s,this),this):(this.parent.insertBefore(s,this.next),s)}const i=super.split(n,r);return this.cache={},i}}Ke.blotName="block";Ke.tagName="P";Ke.defaultChild=Xt;Ke.allowedChildren=[Xt,hn,Nt,Yt];class Lt extends Nt{attach(){super.attach(),this.attributes=new _a(this.domNode)}delta(){return new te().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,n){const r=this.scroll.query(t,ne.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,n)}formatAt(t,n,r,i){this.format(r,i)}insertAt(t,n,r){if(r!=null){super.insertAt(t,n,r);return}const i=n.split(`
54
+ `),s=i.pop(),a=i.map(l=>{const c=this.scroll.create(Ke.blotName);return c.insertAt(0,l),c}),o=this.split(t);a.forEach(l=>{this.parent.insertBefore(l,o)}),s&&this.parent.insertBefore(this.scroll.create("text",s),o)}}Lt.scope=ne.BLOCK_BLOT;function tm(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.descendants(Qe).reduce((n,r)=>r.length()===0?n:n.insert(r.value(),It(r,{},t)),new te).insert(`
55
+ `,It(e))}function It(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e==null||("formats"in e&&typeof e.formats=="function"&&(t={...t,...e.formats()},n&&delete t["code-token"]),e.parent==null||e.parent.statics.blotName==="scroll"||e.parent.statics.scope!==e.statics.scope)?t:It(e.parent,t,n)}const Ct=class Ct extends Nt{static value(){}constructor(t,n,r){super(t,n),this.selection=r,this.textNode=document.createTextNode(Ct.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,n){if(this.savedLength!==0){super.format(t,n);return}let r=this,i=0;for(;r!=null&&r.statics.scope!==ne.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=Ct.CONTENTS.length,r.optimize(),r.formatAt(i,Ct.CONTENTS.length,t,n),this.savedLength=0)}index(t,n){return t===this.textNode?0:super.index(t,n)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const n=this.prev instanceof Yt?this.prev:null,r=n?n.length():0,i=this.next instanceof Yt?this.next:null,s=i?i.text:"",{textNode:a}=this,o=a.data.split(Ct.CONTENTS).join("");a.data=Ct.CONTENTS;let l;if(n)l=n,(o||i)&&(n.insertAt(n.length(),o+s),i&&i.remove());else if(i)l=i,i.insertAt(0,o);else{const c=document.createTextNode(o);l=this.scroll.create(c),this.parent.insertBefore(l,this)}if(this.remove(),t){const c=(h,f)=>n&&h===n.domNode?f:h===a?r+f-1:i&&h===i.domNode?r+o.length+f:null,u=c(t.start.node,t.start.offset),d=c(t.end.node,t.end.offset);if(u!==null&&d!==null)return{startNode:l.domNode,startOffset:u,endNode:l.domNode,endOffset:d}}return null}update(t,n){if(t.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore();r&&(n.range=r)}}optimize(t){super.optimize(t);let{parent:n}=this;for(;n;){if(n.domNode.tagName==="A"){this.savedLength=Ct.CONTENTS.length,n.isolate(this.offset(n),this.length()).unwrap(),this.savedLength=0;break}n=n.parent}}value(){return""}};Q(Ct,"blotName","cursor"),Q(Ct,"className","ql-cursor"),Q(Ct,"tagName","span"),Q(Ct,"CONTENTS","\uFEFF");let zr=Ct;var nm={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function s(l,c,u,d,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var f=new i(u,d||l,h),p=n?n+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],f]:l._events[p].push(f):(l._events[p]=f,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},o.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,f=d.length,p=new Array(f);h<f;h++)p[h]=d[h].fn;return p},o.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},o.prototype.emit=function(c,u,d,h,f,p){var g=n?n+c:c;if(!this._events[g])return!1;var b=this._events[g],y=arguments.length,w,_;if(b.fn){switch(b.once&&this.removeListener(c,b.fn,void 0,!0),y){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,u),!0;case 3:return b.fn.call(b.context,u,d),!0;case 4:return b.fn.call(b.context,u,d,h),!0;case 5:return b.fn.call(b.context,u,d,h,f),!0;case 6:return b.fn.call(b.context,u,d,h,f,p),!0}for(_=1,w=new Array(y-1);_<y;_++)w[_-1]=arguments[_];b.fn.apply(b.context,w)}else{var A=b.length,O;for(_=0;_<A;_++)switch(b[_].once&&this.removeListener(c,b[_].fn,void 0,!0),y){case 1:b[_].fn.call(b[_].context);break;case 2:b[_].fn.call(b[_].context,u);break;case 3:b[_].fn.call(b[_].context,u,d);break;case 4:b[_].fn.call(b[_].context,u,d,h);break;default:if(!w)for(O=1,w=new Array(y-1);O<y;O++)w[O-1]=arguments[O];b[_].fn.apply(b[_].context,w)}}return!0},o.prototype.on=function(c,u,d){return s(this,c,u,d,!1)},o.prototype.once=function(c,u,d){return s(this,c,u,d,!0)},o.prototype.removeListener=function(c,u,d,h){var f=n?n+c:c;if(!this._events[f])return this;if(!u)return a(this,f),this;var p=this._events[f];if(p.fn)p.fn===u&&(!h||p.once)&&(!d||p.context===d)&&a(this,f);else{for(var g=0,b=[],y=p.length;g<y;g++)(p[g].fn!==u||h&&!p[g].once||d&&p[g].context!==d)&&b.push(p[g]);b.length?this._events[f]=b.length===1?b[0]:b:a(this,f)}return this},o.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o})(nm);var HI=nm.exports;const GI=Hi(HI),ql=new WeakMap,jl=["error","warn","log","info"];let zl="warn";function rm(e){if(zl&&jl.indexOf(e)<=jl.indexOf(zl)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console[e](...n)}}function Tn(e){return jl.reduce((t,n)=>(t[n]=rm.bind(console,n,e),t),{})}Tn.level=e=>{zl=e};rm.level=Tn.level;const Zo=Tn("quill:events"),KI=["selectionchange","mousedown","mouseup","click"];KI.forEach(e=>{document.addEventListener(e,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(i=>{const s=ql.get(i);s&&s.emitter&&s.emitter.handleDOM(...n)})})});class ee extends GI{constructor(){super(),this.domListeners={},this.on("error",Zo.error)}emit(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Zo.log.call(Zo,...n),super.emit(...n)}handleDOM(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(this.domListeners[t.type]||[]).forEach(s=>{let{node:a,handler:o}=s;(t.target===a||a.contains(t.target))&&o(t,...r)})}listenDOM(t,n,r){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:n,handler:r})}}Q(ee,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),Q(ee,"sources",{API:"api",SILENT:"silent",USER:"user"});const Xo=Tn("quill:selection");class sr{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=n}}class VI{constructor(t,n){this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new sr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,ee.sources.USER),1)}),this.emitter.on(ee.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(ee.events.SCROLL_UPDATE,(i,s)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);const a=s.some(o=>o.type==="characterData"||o.type==="childList"||o.type==="attributes"&&o.target===this.root);this.update(a?ee.sources.SILENT:i)}catch{}})}),this.emitter.on(ee.events.SCROLL_OPTIMIZE,(r,i)=>{if(i.range){const{startNode:s,startOffset:a,endNode:o,endOffset:l}=i.range;this.setNativeRange(s,a,o,l),this.update(ee.sources.SILENT)}}),this.update(ee.sources.SILENT)}handleComposition(){this.emitter.on(ee.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(ee.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout(()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(ee.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,n){this.scroll.update();const r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(t,ne.BLOCK))){if(r.start.node!==this.cursor.textNode){const i=this.scroll.find(r.start.node,!1);if(i==null)return;if(i instanceof Qe){const s=i.split(r.start.offset);i.parent.insertBefore(this.cursor,s)}else i.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(t,n),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const r=this.scroll.length();t=Math.min(t,r-1),n=Math.min(t+n,r-1)-t;let i,[s,a]=this.scroll.leaf(t);if(s==null)return null;if(n>0&&a===s.length()){const[u]=this.scroll.leaf(t+1);if(u){const[d]=this.scroll.line(t),[h]=this.scroll.line(t+1);d===h&&(s=u,a=0)}}[i,a]=s.position(a,!0);const o=document.createRange();if(n>0)return o.setStart(i,a),[s,a]=this.scroll.leaf(t+n),s==null?null:([i,a]=s.position(a,!0),o.setEnd(i,a),o.getBoundingClientRect());let l="left",c;if(i instanceof Text){if(!i.data.length)return null;a<i.data.length?(o.setStart(i,a),o.setEnd(i,a+1)):(o.setStart(i,a-1),o.setEnd(i,a),l="right"),c=o.getBoundingClientRect()}else{if(!(s.domNode instanceof Element))return null;c=s.domNode.getBoundingClientRect(),a>0&&(l="right")}return{bottom:c.top+c.height,height:c.height,left:c[l],right:c[l],top:c.top,width:0}}getNativeRange(){const t=document.getSelection();if(t==null||t.rangeCount<=0)return null;const n=t.getRangeAt(0);if(n==null)return null;const r=this.normalizeNative(n);return Xo.info("getNativeRange",r),r}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const n=this.getNativeRange();return n==null?[null,null]:[this.normalizedToRange(n),n]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Jo(this.root,document.activeElement)}normalizedToRange(t){const n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);const r=n.map(a=>{const[o,l]=a,c=this.scroll.find(o,!0),u=c.offset(this.scroll);return l===0?u:c instanceof Qe?u+c.index(o,l):u+c.length()}),i=Math.min(Math.max(...r),this.scroll.length()-1),s=Math.min(i,...r);return new sr(s,i-s)}normalizeNative(t){if(!Jo(this.root,t.startContainer)||!t.collapsed&&!Jo(this.root,t.endContainer))return null;const n={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[n.start,n.end].forEach(r=>{let{node:i,offset:s}=r;for(;!(i instanceof Text)&&i.childNodes.length>0;)if(i.childNodes.length>s)i=i.childNodes[s],s=0;else if(i.childNodes.length===s)i=i.lastChild,i instanceof Text?s=i.data.length:i.childNodes.length>0?s=i.childNodes.length:s=i.childNodes.length+1;else break;r.node=i,r.offset=s}),n}rangeToNative(t){const n=this.scroll.length(),r=(i,s)=>{i=Math.min(n-1,i);const[a,o]=this.scroll.leaf(i);return a?a.position(o,s):[null,-1]};return[...r(t.index,!1),...r(t.index+t.length,!0)]}setNativeRange(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Xo.info("setNativeRange",t,n,r,i),t!=null&&(this.root.parentNode==null||t.parentNode==null||r.parentNode==null))return;const a=document.getSelection();if(a!=null)if(t!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:o}=this.getNativeRange()||{};if(o==null||s||t!==o.startContainer||n!==o.startOffset||r!==o.endContainer||i!==o.endOffset){t instanceof Element&&t.tagName==="BR"&&(n=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),r instanceof Element&&r.tagName==="BR"&&(i=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const l=document.createRange();l.setStart(t,n),l.setEnd(r,i),a.removeAllRanges(),a.addRange(l)}}else a.removeAllRanges(),this.root.blur()}setRange(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ee.sources.API;if(typeof n=="string"&&(r=n,n=!1),Xo.info("setRange",t),t!=null){const i=this.rangeToNative(t);this.setNativeRange(...i,n)}else this.setNativeRange(null);this.update(r)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ee.sources.USER;const n=this.lastRange,[r,i]=this.getRange();if(this.lastRange=r,this.lastNative=i,this.lastRange!=null&&(this.savedRange=this.lastRange),!Dn(n,this.lastRange)){if(!this.composing&&i!=null&&i.native.collapsed&&i.start.node!==this.cursor.textNode){const a=this.cursor.restore();a&&this.setNativeRange(a.startNode,a.startOffset,a.endNode,a.endOffset)}const s=[ee.events.SELECTION_CHANGE,Dr(this.lastRange),Dr(n),t];this.emitter.emit(ee.events.EDITOR_CHANGE,...s),t!==ee.sources.SILENT&&this.emitter.emit(...s)}}}function Jo(e,t){try{t.parentNode}catch{return!1}return e.contains(t)}const WI=/^[ -~]*$/;class YI{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let n=this.scroll.length();this.scroll.batchStart();const r=vf(t),i=new te;return XI(r.ops.slice()).reduce((a,o)=>{const l=Dt.Op.length(o);let c=o.attributes||{},u=!1,d=!1;if(o.insert!=null){if(i.retain(l),typeof o.insert=="string"){const p=o.insert;d=!p.endsWith(`
56
+ `)&&(n<=a||!!this.scroll.descendant(Lt,a)[0]),this.scroll.insertAt(a,p);const[g,b]=this.scroll.line(a);let y=$n({},It(g));if(g instanceof Ke){const[w]=g.descendant(Qe,b);w&&(y=$n(y,It(w)))}c=Dt.AttributeMap.diff(y,c)||{}}else if(typeof o.insert=="object"){const p=Object.keys(o.insert)[0];if(p==null)return a;const g=this.scroll.query(p,ne.INLINE)!=null;if(g)(n<=a||this.scroll.descendant(Lt,a)[0])&&(d=!0);else if(a>0){const[b,y]=this.scroll.descendant(Qe,a-1);b instanceof Yt?b.value()[y]!==`
57
+ `&&(u=!0):b instanceof Nt&&b.statics.scope===ne.INLINE_BLOT&&(u=!0)}if(this.scroll.insertAt(a,p,o.insert[p]),g){const[b]=this.scroll.descendant(Qe,a);if(b){const y=$n({},It(b));c=Dt.AttributeMap.diff(y,c)||{}}}}n+=l}else if(i.push(o),o.retain!==null&&typeof o.retain=="object"){const p=Object.keys(o.retain)[0];if(p==null)return a;this.scroll.updateEmbedAt(a,p,o.retain[p])}Object.keys(c).forEach(p=>{this.scroll.formatAt(a,l,p,c[p])});const h=u?1:0,f=d?1:0;return n+=h+f,i.retain(h),i.delete(f),a+l+h+f},0),i.reduce((a,o)=>typeof o.delete=="number"?(this.scroll.deleteAt(a,o.delete),a):a+Dt.Op.length(o),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(t,n){return this.scroll.deleteAt(t,n),this.update(new te().retain(t).delete(n))}formatLine(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(s=>{this.scroll.lines(t,Math.max(n,1)).forEach(a=>{a.format(s,r[s])})}),this.scroll.optimize();const i=new te().retain(t).retain(n,Dr(r));return this.update(i)}formatText(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(s=>{this.scroll.formatAt(t,n,s,r[s])});const i=new te().retain(t).retain(n,Dr(r));return this.update(i)}getContents(t,n){return this.delta.slice(t,t+n)}getDelta(){return this.scroll.lines().reduce((t,n)=>t.concat(n.delta()),new te)}getFormat(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],i=[];n===0?this.scroll.path(t).forEach(o=>{const[l]=o;l instanceof Ke?r.push(l):l instanceof Qe&&i.push(l)}):(r=this.scroll.lines(t,n),i=this.scroll.descendants(Qe,t,n));const[s,a]=[r,i].map(o=>{const l=o.shift();if(l==null)return{};let c=It(l);for(;Object.keys(c).length>0;){const u=o.shift();if(u==null)return c;c=ZI(It(u),c)}return c});return{...s,...a}}getHTML(t,n){const[r,i]=this.scroll.line(t);if(r){const s=r.length();return r.length()>=i+n&&!(i===0&&n===s)?qi(r,i,n,!0):qi(this.scroll,t,n,!0)}return""}getText(t,n){return this.getContents(t,n).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(t,n){const r=vf(n),i=new te().retain(t).concat(r);return this.scroll.insertContents(t,r),this.update(i)}insertEmbed(t,n,r){return this.scroll.insertAt(t,n,r),this.update(new te().retain(t).insert({[n]:r}))}insertText(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return n=n.replace(/\r\n/g,`
42
58
  `).replace(/\r/g,`
43
- `),this.scroll.insertAt(t,n),Object.keys(r).forEach(i=>{this.scroll.formatAt(t,n.length,i,r[i])}),this.update(new J().retain(t).insert(n,Tr(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if((t==null?void 0:t.statics.blotName)!==Ke.blotName)return!1;const n=t;return n.children.length>1?!1:n.children.head instanceof Vt}removeFormat(t,n){const r=this.getText(t,n),[i,s]=this.scroll.line(t+n);let o=0,a=new J;i!=null&&(o=i.length()-s,a=i.delta().slice(s,s+o-1).insert(`
44
- `));const c=this.getContents(t,n+o).diff(new J().insert(r).concat(a)),u=new J().retain(t).concat(c);return this.applyDelta(u)}update(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const i=this.delta;if(n.length===1&&n[0].type==="characterData"&&n[0].target.data.match(dO)&&this.scroll.find(n[0].target)){const s=this.scroll.find(n[0].target),o=Tt(s),a=s.offset(this.scroll),l=n[0].oldValue.replace(Pr.CONTENTS,""),c=new J().insert(l),u=new J().insert(s.value()),d=r&&{oldRange:Ld(r.oldRange,-a),newRange:Ld(r.newRange,-a)};t=new J().retain(a).concat(c.diff(u,d)).reduce((f,p)=>p.insert?f.insert(p.insert,o):f.push(p),new J),this.delta=i.compose(t)}else this.delta=this.getDelta(),(!t||!On(i.compose(t),this.delta))&&(t=i.diff(this.delta,r));return t}}function Nr(e,t,n){if(e.length===0){const[f]=Ra(n.pop());return t<=0?`</li></${f}>`:`</li></${f}>${Nr([],t-1,n)}`}const[{child:r,offset:i,length:s,indent:o,type:a},...l]=e,[c,u]=Ra(a);if(o>t)return n.push(a),o===t+1?`<${c}><li${u}>${Oi(r,i,s)}${Nr(l,o,n)}`:`<${c}><li>${Nr(e,t+1,n)}`;const d=n[n.length-1];if(o===t&&a===d)return`</li><li${u}>${Oi(r,i,s)}${Nr(l,o,n)}`;const[h]=Ra(n.pop());return`</li></${h}>${Nr(e,t-1,n)}`}function Oi(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in e&&typeof e.html=="function")return e.html(t,n);if(e instanceof Kt)return ho(e.value().slice(t,t+n)).replaceAll(" ","&nbsp;");if(e instanceof Gt){if(e.statics.blotName==="list-container"){const c=[];return e.children.forEachAt(t,n,(u,d,h)=>{const f="formats"in u&&typeof u.formats=="function"?u.formats():{};c.push({child:u,offset:d,length:h,indent:f.indent||0,type:f.list})}),Nr(c,-1,[])}const i=[];if(e.children.forEachAt(t,n,(c,u,d)=>{i.push(Oi(c,u,d))}),r||e.statics.blotName==="list")return i.join("");const{outerHTML:s,innerHTML:o}=e.domNode,[a,l]=s.split(`>${o}<`);return a==="<table"?`<table style="border: 1px solid #000;">${i.join("")}<${l}`:`${a}>${i.join("")}<${l}`}return e.domNode instanceof Element?e.domNode.outerHTML:""}function hO(e,t){return Object.keys(t).reduce((n,r)=>{if(e[r]==null)return n;const i=t[r];return i===e[r]?n[r]=i:Array.isArray(i)?i.indexOf(e[r])<0?n[r]=i.concat([e[r]]):n[r]=i:n[r]=[i,e[r]],n},{})}function Ra(e){const t=e==="ordered"?"ol":"ul";switch(e){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function Rd(e){return e.reduce((t,n)=>{if(typeof n.insert=="string"){const r=n.insert.replace(/\r\n/g,`
59
+ `),this.scroll.insertAt(t,n),Object.keys(r).forEach(i=>{this.scroll.formatAt(t,n.length,i,r[i])}),this.update(new te().retain(t).insert(n,Dr(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if((t==null?void 0:t.statics.blotName)!==Ke.blotName)return!1;const n=t;return n.children.length>1?!1:n.children.head instanceof Xt}removeFormat(t,n){const r=this.getText(t,n),[i,s]=this.scroll.line(t+n);let a=0,o=new te;i!=null&&(a=i.length()-s,o=i.delta().slice(s,s+a-1).insert(`
60
+ `));const c=this.getContents(t,n+a).diff(new te().insert(r).concat(o)),u=new te().retain(t).concat(c);return this.applyDelta(u)}update(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const i=this.delta;if(n.length===1&&n[0].type==="characterData"&&n[0].target.data.match(WI)&&this.scroll.find(n[0].target)){const s=this.scroll.find(n[0].target),a=It(s),o=s.offset(this.scroll),l=n[0].oldValue.replace(zr.CONTENTS,""),c=new te().insert(l),u=new te().insert(s.value()),d=r&&{oldRange:_f(r.oldRange,-o),newRange:_f(r.newRange,-o)};t=new te().retain(o).concat(c.diff(u,d)).reduce((f,p)=>p.insert?f.insert(p.insert,a):f.push(p),new te),this.delta=i.compose(t)}else this.delta=this.getDelta(),(!t||!Dn(i.compose(t),this.delta))&&(t=i.diff(this.delta,r));return t}}function Rr(e,t,n){if(e.length===0){const[f]=Qo(n.pop());return t<=0?`</li></${f}>`:`</li></${f}>${Rr([],t-1,n)}`}const[{child:r,offset:i,length:s,indent:a,type:o},...l]=e,[c,u]=Qo(o);if(a>t)return n.push(o),a===t+1?`<${c}><li${u}>${qi(r,i,s)}${Rr(l,a,n)}`:`<${c}><li>${Rr(e,t+1,n)}`;const d=n[n.length-1];if(a===t&&o===d)return`</li><li${u}>${qi(r,i,s)}${Rr(l,a,n)}`;const[h]=Qo(n.pop());return`</li></${h}>${Rr(e,t-1,n)}`}function qi(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in e&&typeof e.html=="function")return e.html(t,n);if(e instanceof Yt)return Ta(e.value().slice(t,t+n)).replaceAll(" ","&nbsp;");if(e instanceof Wt){if(e.statics.blotName==="list-container"){const c=[];return e.children.forEachAt(t,n,(u,d,h)=>{const f="formats"in u&&typeof u.formats=="function"?u.formats():{};c.push({child:u,offset:d,length:h,indent:f.indent||0,type:f.list})}),Rr(c,-1,[])}const i=[];if(e.children.forEachAt(t,n,(c,u,d)=>{i.push(qi(c,u,d))}),r||e.statics.blotName==="list")return i.join("");const{outerHTML:s,innerHTML:a}=e.domNode,[o,l]=s.split(`>${a}<`);return o==="<table"?`<table style="border: 1px solid #000;">${i.join("")}<${l}`:`${o}>${i.join("")}<${l}`}return e.domNode instanceof Element?e.domNode.outerHTML:""}function ZI(e,t){return Object.keys(t).reduce((n,r)=>{if(e[r]==null)return n;const i=t[r];return i===e[r]?n[r]=i:Array.isArray(i)?i.indexOf(e[r])<0?n[r]=i.concat([e[r]]):n[r]=i:n[r]=[i,e[r]],n},{})}function Qo(e){const t=e==="ordered"?"ol":"ul";switch(e){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function vf(e){return e.reduce((t,n)=>{if(typeof n.insert=="string"){const r=n.insert.replace(/\r\n/g,`
45
61
  `).replace(/\r/g,`
46
- `);return t.insert(r,n.attributes)}return t.push(n)},new J)}function Ld(e,t){let{index:n,length:r}=e;return new Qn(n+t,r)}function pO(e){const t=[];return e.forEach(n=>{typeof n.insert=="string"?n.insert.split(`
62
+ `);return t.insert(r,n.attributes)}return t.push(n)},new te)}function _f(e,t){let{index:n,length:r}=e;return new sr(n+t,r)}function XI(e){const t=[];return e.forEach(n=>{typeof n.insert=="string"?n.insert.split(`
47
63
  `).forEach((i,s)=>{s&&t.push({insert:`
48
- `,attributes:n.attributes}),i&&t.push({insert:i,attributes:n.attributes})}):t.push(n)}),t}class Yt{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=n}}V(Yt,"DEFAULTS",{});const ms="\uFEFF";class mc extends _t{constructor(t,n){super(t,n),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(ms),this.rightGuard=document.createTextNode(ms),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,n)}restore(t){let n=null,r;const i=t.data.split(ms).join("");if(t===this.leftGuard)if(this.prev instanceof Kt){const s=this.prev.length();this.prev.insertAt(s,i),n={startNode:this.prev.domNode,startOffset:s+i.length}}else r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this),n={startNode:r,startOffset:i.length};else t===this.rightGuard&&(this.next instanceof Kt?(this.next.insertAt(0,i),n={startNode:this.next.domNode,startOffset:i.length}):(r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this.next),n={startNode:r,startOffset:i.length}));return t.data=ms,n}update(t,n){t.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const i=this.restore(r.target);i&&(n.range=i)}})}}class gO{constructor(t,n){V(this,"isComposing",!1);this.scroll=t,this.emitter=n,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){const n=t.target instanceof Node?this.scroll.find(t.target,!0):null;n&&!(n instanceof mc)&&(this.emitter.emit(Z.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(Z.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(Z.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(Z.events.COMPOSITION_END,t),this.isComposing=!1}}const xi=class xi{constructor(t,n){V(this,"modules",{});this.quill=t,this.options=n}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){const n=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new n(this.quill,this.options.modules[t]||{}),this.modules[t]}};V(xi,"DEFAULTS",{modules:{}}),V(xi,"themes",{default:xi});let Br=xi;const mO=e=>e.parentElement||e.getRootNode().host||null,bO=e=>{const t=e.getBoundingClientRect(),n="offsetWidth"in e&&Math.abs(t.width)/e.offsetWidth||1,r="offsetHeight"in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*n,bottom:t.top+e.clientHeight*r,left:t.left}},bs=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:t},Md=(e,t,n,r,i,s)=>e<n&&t>r?0:e<n?-(n-e+i):t>r?t-e>r-n?e+i-n:t-r+s:0,yO=(e,t)=>{var s,o,a;const n=e.ownerDocument;let r=t,i=e;for(;i;){const l=i===n.body,c=l?{top:0,right:((s=window.visualViewport)==null?void 0:s.width)??n.documentElement.clientWidth,bottom:((o=window.visualViewport)==null?void 0:o.height)??n.documentElement.clientHeight,left:0}:bO(i),u=getComputedStyle(i),d=Md(r.left,r.right,c.left,c.right,bs(u.scrollPaddingLeft),bs(u.scrollPaddingRight)),h=Md(r.top,r.bottom,c.top,c.bottom,bs(u.scrollPaddingTop),bs(u.scrollPaddingBottom));if(d||h)if(l)(a=n.defaultView)==null||a.scrollBy(d,h);else{const{scrollLeft:f,scrollTop:p}=i;h&&(i.scrollTop+=h),d&&(i.scrollLeft+=d);const m=i.scrollLeft-f,b=i.scrollTop-p;r={left:r.left-m,top:r.top-b,right:r.right-m,bottom:r.bottom-b}}i=l||u.position==="fixed"?null:mO(i)}},xO=100,EO=["block","break","cursor","inline","scroll","text"],wO=(e,t,n)=>{const r=new Dr;return EO.forEach(i=>{const s=t.query(i);s&&r.register(s)}),e.forEach(i=>{let s=t.query(i);s||n.error(`Cannot register "${i}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;s;)if(r.register(s),s="blotName"in s?s.requiredContainer??null:null,o+=1,o>xO){n.error(`Cycle detected in registering blot requiredContainer: "${i}"`);break}}),r},Or=vn("quill"),ys=new Dr;Gt.uiClass="ql-ui";const $t=class $t{static debug(t){t===!0&&(t="log"),vn.level(t)}static find(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return bl.get(t)||ys.find(t,n)}static import(t){return this.imports[t]==null&&Or.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const t=arguments.length<=0?void 0:arguments[0],n=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in t?t.attrName:t.blotName;typeof r=="string"?this.register(`formats/${r}`,t,n):Object.keys(t).forEach(i=>{this.register(i,t[i],n)})}else{const t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!r&&Or.warn(`Overwriting ${t} with`,n),this.imports[t]=n,(t.startsWith("blots/")||t.startsWith("formats/"))&&n&&typeof n!="boolean"&&n.blotName!=="abstract"&&ys.register(n),typeof n.register=="function"&&n.register(ys)}}constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=_O(t,n),this.container=this.options.container,this.container==null){Or.error("Invalid Quill container",t);return}this.options.debug&&$t.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",bl.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new Z;const i=dc.blotName,s=this.options.registry.query(i);if(!s||!("blotName"in s))throw new Error(`Cannot initialize Quill without "${i}" blot`);if(this.scroll=new s(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new fO(this.scroll),this.selection=new uO(this.scroll,this.emitter),this.composition=new gO(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(Z.events.EDITOR_CHANGE,o=>{o===Z.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(Z.events.SCROLL_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;qt.call(this,()=>this.editor.update(null,a,u),o)}),this.emitter.on(Z.events.SCROLL_EMBED_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;qt.call(this,()=>{const d=new J().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(d,[],u)},$t.sources.USER)}),r){const o=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
49
- `});this.setContents(o)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){const r=t;t=document.createElement("div"),t.classList.add(r)}return this.container.insertBefore(t,n),t}blur(){this.selection.setRange(null)}deleteText(t,n,r){return[t,n,,r]=mn(t,n,r),qt.call(this,()=>this.editor.deleteText(t,n),r,t,-1*n)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const n=t();return this.allowReadOnlyEdits=!1,n}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Z.sources.API;return qt.call(this,()=>{const i=this.getSelection(!0);let s=new J;if(i==null)return s;if(this.scroll.query(t,ee.BLOCK))s=this.editor.formatLine(i.index,i.length,{[t]:n});else{if(i.length===0)return this.selection.format(t,n),s;s=this.editor.formatText(i.index,i.length,{[t]:n})}return this.setSelection(i,Z.sources.SILENT),s},r)}formatLine(t,n,r,i,s){let o;return[t,n,o,s]=mn(t,n,r,i,s),qt.call(this,()=>this.editor.formatLine(t,n,o),s,t,0)}formatText(t,n,r,i,s){let o;return[t,n,o,s]=mn(t,n,r,i,s),qt.call(this,()=>this.editor.formatText(t,n,o),s,t,0)}getBounds(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof t=="number"?r=this.selection.getBounds(t,n):r=this.selection.getBounds(t.index,t.length),!r)return null;const i=this.container.getBoundingClientRect();return{bottom:r.bottom-i.top,height:r.height,left:r.left-i.left,right:r.right-i.left,top:r.top-i.top,width:r.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,n]=mn(t,n),this.editor.getContents(t,n)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,n):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,n)}getModule(t){return this.theme.modules[t]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(n=n??this.getLength()-t),[t,n]=mn(t,n),this.editor.getHTML(t,n)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(n=n??this.getLength()-t),[t,n]=mn(t,n),this.editor.getText(t,n)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$t.sources.API;return qt.call(this,()=>this.editor.insertEmbed(t,n,r),i,t)}insertText(t,n,r,i,s){let o;return[t,,o,s]=mn(t,0,r,i,s),qt.call(this,()=>this.editor.insertText(t,n,o),s,t,n.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,n,r){return[t,n,,r]=mn(t,n,r),qt.call(this,()=>this.editor.removeFormat(t,n),r,t)}scrollRectIntoView(t){yO(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,n=t&&this.selection.getBounds(t.index,t.length);n&&this.scrollRectIntoView(n)}setContents(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Z.sources.API;return qt.call(this,()=>{t=new J(t);const r=this.getLength(),i=this.editor.deleteText(0,r),s=this.editor.insertContents(0,t),o=this.editor.deleteText(this.getLength()-1,1);return i.compose(s).compose(o)},n)}setSelection(t,n,r){t==null?this.selection.setRange(null,n||$t.sources.API):([t,n,,r]=mn(t,n,r),this.selection.setRange(new Qn(Math.max(0,t),n),r),r!==Z.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Z.sources.API;const r=new J().insert(t);return this.setContents(r,n)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z.sources.USER;const n=this.scroll.update(t);return this.selection.update(t),n}updateContents(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Z.sources.API;return qt.call(this,()=>(t=new J(t),this.editor.applyDelta(t)),n,!0)}};V($t,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:ys,theme:"default"}),V($t,"events",Z.events),V($t,"sources",Z.sources),V($t,"version","2.0.3"),V($t,"imports",{delta:J,parchment:KC,"core/module":Yt,"core/theme":Br});let D=$t;function Dd(e){return typeof e=="string"?document.querySelector(e):e}function La(e){return Object.entries(e??{}).reduce((t,n)=>{let[r,i]=n;return{...t,[r]:i===!0?{}:i}},{})}function Pd(e){return Object.fromEntries(Object.entries(e).filter(t=>t[1]!==void 0))}function _O(e,t){const n=Dd(e);if(!n)throw new Error("Invalid Quill container");const i=!t.theme||t.theme===D.DEFAULTS.theme?Br:D.import(`themes/${t.theme}`);if(!i)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);const{modules:s,...o}=D.DEFAULTS,{modules:a,...l}=i.DEFAULTS;let c=La(t.modules);c!=null&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const u=Mn({},La(s),La(a),c),d={...o,...Pd(l),...Pd(t)};let h=t.registry;return h?t.formats&&Or.warn('Ignoring "formats" option because "registry" is specified'):h=t.formats?wO(t.formats,d.registry,Or):d.registry,{...d,registry:h,container:n,theme:i,modules:Object.entries(u).reduce((f,p)=>{let[m,b]=p;if(!b)return f;const y=D.import(`modules/${m}`);return y==null?(Or.error(`Cannot load ${m} module. Are you sure you registered it?`),f):{...f,[m]:Mn({},y.DEFAULTS||{},b)}},{}),bounds:Dd(d.bounds)}}function qt(e,t,n,r){if(!this.isEnabled()&&t===Z.sources.USER&&!this.allowReadOnlyEdits)return new J;let i=n==null?null:this.getSelection();const s=this.editor.delta,o=e();if(i!=null&&(n===!0&&(n=i.index),r==null?i=Bd(i,o,t):r!==0&&(i=Bd(i,n,r,t)),this.setSelection(i,Z.sources.SILENT)),o.length()>0){const a=[Z.events.TEXT_CHANGE,o,s,t];this.emitter.emit(Z.events.EDITOR_CHANGE,...a),t!==Z.sources.SILENT&&this.emitter.emit(...a)}return o}function mn(e,t,n,r,i){let s={};return typeof e.index=="number"&&typeof e.length=="number"?typeof t!="number"?(i=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):typeof t!="number"&&(i=r,r=n,n=t,t=0),typeof n=="object"?(s=n,i=r):typeof n=="string"&&(r!=null?s[n]=r:i=n),i=i||Z.sources.API,[e,t,s,i]}function Bd(e,t,n,r){const i=typeof n=="number"?n:0;if(e==null)return null;let s,o;return t&&typeof t.transformPosition=="function"?[s,o]=[e.index,e.index+e.length].map(a=>t.transformPosition(a,r!==Z.sources.USER)):[s,o]=[e.index,e.index+e.length].map(a=>a<t||a===t&&r===Z.sources.USER?a:i>=0?a+i:Math.max(t,a+i)),new Qn(s,o-s)}class or extends lo{}function Fd(e){return e instanceof Ke||e instanceof Ot}function qd(e){return typeof e.updateContent=="function"}class Ar extends dc{constructor(t,n,r){let{emitter:i}=r;super(t,n),this.emitter=i,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",s=>this.handleDragStart(s))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(Z.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(Z.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,n){this.emitter.emit(Z.events.SCROLL_EMBED_UPDATE,t,n)}deleteAt(t,n){const[r,i]=this.line(t),[s]=this.line(t+n);if(super.deleteAt(t,n),s!=null&&r!==s&&i>0){if(r instanceof Ot||s instanceof Ot){this.optimize();return}const o=s.children.head instanceof Vt?null:s.children.head;r.moveChildren(s,o),r.remove()}this.optimize()}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,n,r,i){super.formatAt(t,n,r,i),this.optimize()}insertAt(t,n,r){if(t>=this.length())if(r==null||this.scroll.query(n,ee.BLOCK)==null){const i=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(i),r==null&&n.endsWith(`
50
- `)?i.insertAt(0,n.slice(0,-1),r):i.insertAt(0,n,r)}else{const i=this.scroll.create(n,r);this.appendChild(i)}else super.insertAt(t,n,r);this.optimize()}insertBefore(t,n){if(t.statics.scope===ee.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(t),super.insertBefore(r,n)}else super.insertBefore(t,n)}insertContents(t,n){const r=this.deltaToRenderBlocks(n.concat(new J().insert(`
51
- `))),i=r.pop();if(i==null)return;this.batchStart();const s=r.shift();if(s){const l=s.type==="block"&&(s.delta.length()===0||!this.descendant(Ot,t)[0]&&t<this.length()),c=s.type==="block"?s.delta:new J().insert({[s.key]:s.value});Ma(this,t,c);const u=s.type==="block"?1:0,d=t+c.length()+u;l&&this.insertAt(d-1,`
52
- `);const h=Tt(this.line(t)[0]),f=Rt.AttributeMap.diff(h,s.attributes)||{};Object.keys(f).forEach(p=>{this.formatAt(d-1,1,p,f[p])}),t=d}let[o,a]=this.children.find(t);if(r.length&&(o&&(o=o.split(a),a=0),r.forEach(l=>{if(l.type==="block"){const c=this.createBlock(l.attributes,o||void 0);Ma(c,0,l.delta)}else{const c=this.create(l.key,l.value);this.insertBefore(c,o||void 0),Object.keys(l.attributes).forEach(u=>{c.format(u,l.attributes[u])})}})),i.type==="block"&&i.delta.length()){const l=o?o.offset(o.scroll)+a:this.length();Ma(this,l,i.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){const n=this.path(t).pop();if(!n)return[null,-1];const[r,i]=n;return r instanceof Qe?[r,i]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(Fd,t)}lines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const r=(i,s,o)=>{let a=[],l=o;return i.children.forEachAt(s,o,(c,u,d)=>{Fd(c)?a.push(c):c instanceof lo&&(a=a.concat(r(c,u,l))),l-=d}),a};return r(this,t,n)}optimize(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(t,n),t.length>0&&this.emitter.emit(Z.events.SCROLL_OPTIMIZE,t,n))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){Array.isArray(t)&&(this.batch=this.batch.concat(t));return}let n=Z.sources.USER;typeof t=="string"&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter(r=>{let{target:i}=r;const s=this.find(i,!0);return s&&!qd(s)}),t.length>0&&this.emitter.emit(Z.events.SCROLL_BEFORE_UPDATE,n,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(Z.events.SCROLL_UPDATE,n,t)}updateEmbedAt(t,n,r){const[i]=this.descendant(s=>s instanceof Ot,t);i&&i.statics.blotName===n&&qd(i)&&i.updateContent(r)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const n=[];let r=new J;return t.forEach(i=>{const s=i==null?void 0:i.insert;if(s)if(typeof s=="string"){const o=s.split(`
53
- `);o.slice(0,-1).forEach(l=>{r.insert(l,i.attributes),n.push({type:"block",delta:r,attributes:i.attributes??{}}),r=new J});const a=o[o.length-1];a&&r.insert(a,i.attributes)}else{const o=Object.keys(s)[0];if(!o)return;this.query(o,ee.INLINE)?r.push(i):(r.length()&&n.push({type:"block",delta:r,attributes:{}}),r=new J,n.push({type:"blockEmbed",key:o,value:s[o],attributes:i.attributes??{}}))}}),r.length()&&n.push({type:"block",delta:r,attributes:{}}),n}createBlock(t,n){let r;const i={};Object.entries(t).forEach(a=>{let[l,c]=a;this.query(l,ee.BLOCK&ee.BLOT)!=null?r=l:i[l]=c});const s=this.create(r||this.statics.defaultChild.blotName,r?t[r]:void 0);this.insertBefore(s,n||void 0);const o=s.length();return Object.entries(i).forEach(a=>{let[l,c]=a;s.formatAt(0,o,l,c)}),s}}V(Ar,"blotName","scroll"),V(Ar,"className","ql-editor"),V(Ar,"tagName","DIV"),V(Ar,"defaultChild",Ke),V(Ar,"allowedChildren",[Ke,Ot,or]);function Ma(e,t,n){n.reduce((r,i)=>{const s=Rt.Op.length(i);let o=i.attributes||{};if(i.insert!=null){if(typeof i.insert=="string"){const a=i.insert;e.insertAt(r,a);const[l]=e.descendant(Qe,r),c=Tt(l);o=Rt.AttributeMap.diff(c,o)||{}}else if(typeof i.insert=="object"){const a=Object.keys(i.insert)[0];if(a==null)return r;if(e.insertAt(r,a,i.insert[a]),e.scroll.query(a,ee.INLINE)!=null){const[c]=e.descendant(Qe,r),u=Tt(c);o=Rt.AttributeMap.diff(u,o)||{}}}}return Object.keys(o).forEach(a=>{e.formatAt(r,s,a,o[a])}),r+s},t)}const bc={scope:ee.BLOCK,whitelist:["right","center","justify"]},vO=new ln("align","align",bc),lg=new Wt("align","ql-align",bc),cg=new Fn("align","text-align",bc);class ug extends Fn{value(t){let n=super.value(t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${n.split(",").map(i=>`00${parseInt(i,10).toString(16)}`.slice(-2)).join("")}`):n}}const kO=new Wt("color","ql-color",{scope:ee.INLINE}),yc=new ug("color","color",{scope:ee.INLINE}),NO=new Wt("background","ql-bg",{scope:ee.INLINE}),xc=new ug("background","background-color",{scope:ee.INLINE});class ar extends or{static create(t){const n=super.create(t);return n.setAttribute("spellcheck","false"),n}code(t,n){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
64
+ `,attributes:n.attributes}),i&&t.push({insert:i,attributes:n.attributes})}):t.push(n)}),t}class Jt{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=n}}Q(Jt,"DEFAULTS",{});const Ts="\uFEFF";class qc extends Nt{constructor(t,n){super(t,n),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(Ts),this.rightGuard=document.createTextNode(Ts),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,n)}restore(t){let n=null,r;const i=t.data.split(Ts).join("");if(t===this.leftGuard)if(this.prev instanceof Yt){const s=this.prev.length();this.prev.insertAt(s,i),n={startNode:this.prev.domNode,startOffset:s+i.length}}else r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this),n={startNode:r,startOffset:i.length};else t===this.rightGuard&&(this.next instanceof Yt?(this.next.insertAt(0,i),n={startNode:this.next.domNode,startOffset:i.length}):(r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this.next),n={startNode:r,startOffset:i.length}));return t.data=Ts,n}update(t,n){t.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const i=this.restore(r.target);i&&(n.range=i)}})}}class JI{constructor(t,n){Q(this,"isComposing",!1);this.scroll=t,this.emitter=n,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){const n=t.target instanceof Node?this.scroll.find(t.target,!0):null;n&&!(n instanceof qc)&&(this.emitter.emit(ee.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(ee.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(ee.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(ee.events.COMPOSITION_END,t),this.isComposing=!1}}const Ci=class Ci{constructor(t,n){Q(this,"modules",{});this.quill=t,this.options=n}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){const n=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new n(this.quill,this.options.modules[t]||{}),this.modules[t]}};Q(Ci,"DEFAULTS",{modules:{}}),Q(Ci,"themes",{default:Ci});let Hr=Ci;const QI=e=>e.parentElement||e.getRootNode().host||null,eR=e=>{const t=e.getBoundingClientRect(),n="offsetWidth"in e&&Math.abs(t.width)/e.offsetWidth||1,r="offsetHeight"in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*n,bottom:t.top+e.clientHeight*r,left:t.left}},Cs=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:t},kf=(e,t,n,r,i,s)=>e<n&&t>r?0:e<n?-(n-e+i):t>r?t-e>r-n?e+i-n:t-r+s:0,tR=(e,t)=>{var s,a,o;const n=e.ownerDocument;let r=t,i=e;for(;i;){const l=i===n.body,c=l?{top:0,right:((s=window.visualViewport)==null?void 0:s.width)??n.documentElement.clientWidth,bottom:((a=window.visualViewport)==null?void 0:a.height)??n.documentElement.clientHeight,left:0}:eR(i),u=getComputedStyle(i),d=kf(r.left,r.right,c.left,c.right,Cs(u.scrollPaddingLeft),Cs(u.scrollPaddingRight)),h=kf(r.top,r.bottom,c.top,c.bottom,Cs(u.scrollPaddingTop),Cs(u.scrollPaddingBottom));if(d||h)if(l)(o=n.defaultView)==null||o.scrollBy(d,h);else{const{scrollLeft:f,scrollTop:p}=i;h&&(i.scrollTop+=h),d&&(i.scrollLeft+=d);const g=i.scrollLeft-f,b=i.scrollTop-p;r={left:r.left-g,top:r.top-b,right:r.right-g,bottom:r.bottom-b}}i=l||u.position==="fixed"?null:QI(i)}},nR=100,rR=["block","break","cursor","inline","scroll","text"],iR=(e,t,n)=>{const r=new jr;return rR.forEach(i=>{const s=t.query(i);s&&r.register(s)}),e.forEach(i=>{let s=t.query(i);s||n.error(`Cannot register "${i}" specified in "formats" config. Are you sure it was registered?`);let a=0;for(;s;)if(r.register(s),s="blotName"in s?s.requiredContainer??null:null,a+=1,a>nR){n.error(`Cycle detected in registering blot requiredContainer: "${i}"`);break}}),r},Br=Tn("quill"),Os=new jr;Wt.uiClass="ql-ui";const Ht=class Ht{static debug(t){t===!0&&(t="log"),Tn.level(t)}static find(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ql.get(t)||Os.find(t,n)}static import(t){return this.imports[t]==null&&Br.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const t=arguments.length<=0?void 0:arguments[0],n=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in t?t.attrName:t.blotName;typeof r=="string"?this.register(`formats/${r}`,t,n):Object.keys(t).forEach(i=>{this.register(i,t[i],n)})}else{const t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!r&&Br.warn(`Overwriting ${t} with`,n),this.imports[t]=n,(t.startsWith("blots/")||t.startsWith("formats/"))&&n&&typeof n!="boolean"&&n.blotName!=="abstract"&&Os.register(n),typeof n.register=="function"&&n.register(Os)}}constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=sR(t,n),this.container=this.options.container,this.container==null){Br.error("Invalid Quill container",t);return}this.options.debug&&Ht.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",ql.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new ee;const i=Pc.blotName,s=this.options.registry.query(i);if(!s||!("blotName"in s))throw new Error(`Cannot initialize Quill without "${i}" blot`);if(this.scroll=new s(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new YI(this.scroll),this.selection=new VI(this.scroll,this.emitter),this.composition=new JI(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(ee.events.EDITOR_CHANGE,a=>{a===ee.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(ee.events.SCROLL_UPDATE,(a,o)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;jt.call(this,()=>this.editor.update(null,o,u),a)}),this.emitter.on(ee.events.SCROLL_EMBED_UPDATE,(a,o)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;jt.call(this,()=>{const d=new te().retain(a.offset(this)).retain({[a.statics.blotName]:o});return this.editor.update(d,[],u)},Ht.sources.USER)}),r){const a=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
65
+ `});this.setContents(a)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){const r=t;t=document.createElement("div"),t.classList.add(r)}return this.container.insertBefore(t,n),t}blur(){this.selection.setRange(null)}deleteText(t,n,r){return[t,n,,r]=En(t,n,r),jt.call(this,()=>this.editor.deleteText(t,n),r,t,-1*n)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const n=t();return this.allowReadOnlyEdits=!1,n}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ee.sources.API;return jt.call(this,()=>{const i=this.getSelection(!0);let s=new te;if(i==null)return s;if(this.scroll.query(t,ne.BLOCK))s=this.editor.formatLine(i.index,i.length,{[t]:n});else{if(i.length===0)return this.selection.format(t,n),s;s=this.editor.formatText(i.index,i.length,{[t]:n})}return this.setSelection(i,ee.sources.SILENT),s},r)}formatLine(t,n,r,i,s){let a;return[t,n,a,s]=En(t,n,r,i,s),jt.call(this,()=>this.editor.formatLine(t,n,a),s,t,0)}formatText(t,n,r,i,s){let a;return[t,n,a,s]=En(t,n,r,i,s),jt.call(this,()=>this.editor.formatText(t,n,a),s,t,0)}getBounds(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof t=="number"?r=this.selection.getBounds(t,n):r=this.selection.getBounds(t.index,t.length),!r)return null;const i=this.container.getBoundingClientRect();return{bottom:r.bottom-i.top,height:r.height,left:r.left-i.left,right:r.right-i.left,top:r.top-i.top,width:r.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,n]=En(t,n),this.editor.getContents(t,n)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,n):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,n)}getModule(t){return this.theme.modules[t]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(n=n??this.getLength()-t),[t,n]=En(t,n),this.editor.getHTML(t,n)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(n=n??this.getLength()-t),[t,n]=En(t,n),this.editor.getText(t,n)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ht.sources.API;return jt.call(this,()=>this.editor.insertEmbed(t,n,r),i,t)}insertText(t,n,r,i,s){let a;return[t,,a,s]=En(t,0,r,i,s),jt.call(this,()=>this.editor.insertText(t,n,a),s,t,n.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,n,r){return[t,n,,r]=En(t,n,r),jt.call(this,()=>this.editor.removeFormat(t,n),r,t)}scrollRectIntoView(t){tR(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,n=t&&this.selection.getBounds(t.index,t.length);n&&this.scrollRectIntoView(n)}setContents(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.sources.API;return jt.call(this,()=>{t=new te(t);const r=this.getLength(),i=this.editor.deleteText(0,r),s=this.editor.insertContents(0,t),a=this.editor.deleteText(this.getLength()-1,1);return i.compose(s).compose(a)},n)}setSelection(t,n,r){t==null?this.selection.setRange(null,n||Ht.sources.API):([t,n,,r]=En(t,n,r),this.selection.setRange(new sr(Math.max(0,t),n),r),r!==ee.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.sources.API;const r=new te().insert(t);return this.setContents(r,n)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ee.sources.USER;const n=this.scroll.update(t);return this.selection.update(t),n}updateContents(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.sources.API;return jt.call(this,()=>(t=new te(t),this.editor.applyDelta(t)),n,!0)}};Q(Ht,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Os,theme:"default"}),Q(Ht,"events",ee.events),Q(Ht,"sources",ee.sources),Q(Ht,"version","2.0.3"),Q(Ht,"imports",{delta:te,parchment:CI,"core/module":Jt,"core/theme":Hr});let B=Ht;function Nf(e){return typeof e=="string"?document.querySelector(e):e}function el(e){return Object.entries(e??{}).reduce((t,n)=>{let[r,i]=n;return{...t,[r]:i===!0?{}:i}},{})}function Sf(e){return Object.fromEntries(Object.entries(e).filter(t=>t[1]!==void 0))}function sR(e,t){const n=Nf(e);if(!n)throw new Error("Invalid Quill container");const i=!t.theme||t.theme===B.DEFAULTS.theme?Hr:B.import(`themes/${t.theme}`);if(!i)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);const{modules:s,...a}=B.DEFAULTS,{modules:o,...l}=i.DEFAULTS;let c=el(t.modules);c!=null&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const u=$n({},el(s),el(o),c),d={...a,...Sf(l),...Sf(t)};let h=t.registry;return h?t.formats&&Br.warn('Ignoring "formats" option because "registry" is specified'):h=t.formats?iR(t.formats,d.registry,Br):d.registry,{...d,registry:h,container:n,theme:i,modules:Object.entries(u).reduce((f,p)=>{let[g,b]=p;if(!b)return f;const y=B.import(`modules/${g}`);return y==null?(Br.error(`Cannot load ${g} module. Are you sure you registered it?`),f):{...f,[g]:$n({},y.DEFAULTS||{},b)}},{}),bounds:Nf(d.bounds)}}function jt(e,t,n,r){if(!this.isEnabled()&&t===ee.sources.USER&&!this.allowReadOnlyEdits)return new te;let i=n==null?null:this.getSelection();const s=this.editor.delta,a=e();if(i!=null&&(n===!0&&(n=i.index),r==null?i=Af(i,a,t):r!==0&&(i=Af(i,n,r,t)),this.setSelection(i,ee.sources.SILENT)),a.length()>0){const o=[ee.events.TEXT_CHANGE,a,s,t];this.emitter.emit(ee.events.EDITOR_CHANGE,...o),t!==ee.sources.SILENT&&this.emitter.emit(...o)}return a}function En(e,t,n,r,i){let s={};return typeof e.index=="number"&&typeof e.length=="number"?typeof t!="number"?(i=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):typeof t!="number"&&(i=r,r=n,n=t,t=0),typeof n=="object"?(s=n,i=r):typeof n=="string"&&(r!=null?s[n]=r:i=n),i=i||ee.sources.API,[e,t,s,i]}function Af(e,t,n,r){const i=typeof n=="number"?n:0;if(e==null)return null;let s,a;return t&&typeof t.transformPosition=="function"?[s,a]=[e.index,e.index+e.length].map(o=>t.transformPosition(o,r!==ee.sources.USER)):[s,a]=[e.index,e.index+e.length].map(o=>o<t||o===t&&r===ee.sources.USER?o:i>=0?o+i:Math.max(t,o+i)),new sr(s,a-s)}class hr extends ka{}function Tf(e){return e instanceof Ke||e instanceof Lt}function Cf(e){return typeof e.updateContent=="function"}class Lr extends Pc{constructor(t,n,r){let{emitter:i}=r;super(t,n),this.emitter=i,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",s=>this.handleDragStart(s))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(ee.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(ee.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,n){this.emitter.emit(ee.events.SCROLL_EMBED_UPDATE,t,n)}deleteAt(t,n){const[r,i]=this.line(t),[s]=this.line(t+n);if(super.deleteAt(t,n),s!=null&&r!==s&&i>0){if(r instanceof Lt||s instanceof Lt){this.optimize();return}const a=s.children.head instanceof Xt?null:s.children.head;r.moveChildren(s,a),r.remove()}this.optimize()}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,n,r,i){super.formatAt(t,n,r,i),this.optimize()}insertAt(t,n,r){if(t>=this.length())if(r==null||this.scroll.query(n,ne.BLOCK)==null){const i=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(i),r==null&&n.endsWith(`
66
+ `)?i.insertAt(0,n.slice(0,-1),r):i.insertAt(0,n,r)}else{const i=this.scroll.create(n,r);this.appendChild(i)}else super.insertAt(t,n,r);this.optimize()}insertBefore(t,n){if(t.statics.scope===ne.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(t),super.insertBefore(r,n)}else super.insertBefore(t,n)}insertContents(t,n){const r=this.deltaToRenderBlocks(n.concat(new te().insert(`
67
+ `))),i=r.pop();if(i==null)return;this.batchStart();const s=r.shift();if(s){const l=s.type==="block"&&(s.delta.length()===0||!this.descendant(Lt,t)[0]&&t<this.length()),c=s.type==="block"?s.delta:new te().insert({[s.key]:s.value});tl(this,t,c);const u=s.type==="block"?1:0,d=t+c.length()+u;l&&this.insertAt(d-1,`
68
+ `);const h=It(this.line(t)[0]),f=Dt.AttributeMap.diff(h,s.attributes)||{};Object.keys(f).forEach(p=>{this.formatAt(d-1,1,p,f[p])}),t=d}let[a,o]=this.children.find(t);if(r.length&&(a&&(a=a.split(o),o=0),r.forEach(l=>{if(l.type==="block"){const c=this.createBlock(l.attributes,a||void 0);tl(c,0,l.delta)}else{const c=this.create(l.key,l.value);this.insertBefore(c,a||void 0),Object.keys(l.attributes).forEach(u=>{c.format(u,l.attributes[u])})}})),i.type==="block"&&i.delta.length()){const l=a?a.offset(a.scroll)+o:this.length();tl(this,l,i.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){const n=this.path(t).pop();if(!n)return[null,-1];const[r,i]=n;return r instanceof Qe?[r,i]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(Tf,t)}lines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const r=(i,s,a)=>{let o=[],l=a;return i.children.forEachAt(s,a,(c,u,d)=>{Tf(c)?o.push(c):c instanceof ka&&(o=o.concat(r(c,u,l))),l-=d}),o};return r(this,t,n)}optimize(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(t,n),t.length>0&&this.emitter.emit(ee.events.SCROLL_OPTIMIZE,t,n))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){Array.isArray(t)&&(this.batch=this.batch.concat(t));return}let n=ee.sources.USER;typeof t=="string"&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter(r=>{let{target:i}=r;const s=this.find(i,!0);return s&&!Cf(s)}),t.length>0&&this.emitter.emit(ee.events.SCROLL_BEFORE_UPDATE,n,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(ee.events.SCROLL_UPDATE,n,t)}updateEmbedAt(t,n,r){const[i]=this.descendant(s=>s instanceof Lt,t);i&&i.statics.blotName===n&&Cf(i)&&i.updateContent(r)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const n=[];let r=new te;return t.forEach(i=>{const s=i==null?void 0:i.insert;if(s)if(typeof s=="string"){const a=s.split(`
69
+ `);a.slice(0,-1).forEach(l=>{r.insert(l,i.attributes),n.push({type:"block",delta:r,attributes:i.attributes??{}}),r=new te});const o=a[a.length-1];o&&r.insert(o,i.attributes)}else{const a=Object.keys(s)[0];if(!a)return;this.query(a,ne.INLINE)?r.push(i):(r.length()&&n.push({type:"block",delta:r,attributes:{}}),r=new te,n.push({type:"blockEmbed",key:a,value:s[a],attributes:i.attributes??{}}))}}),r.length()&&n.push({type:"block",delta:r,attributes:{}}),n}createBlock(t,n){let r;const i={};Object.entries(t).forEach(o=>{let[l,c]=o;this.query(l,ne.BLOCK&ne.BLOT)!=null?r=l:i[l]=c});const s=this.create(r||this.statics.defaultChild.blotName,r?t[r]:void 0);this.insertBefore(s,n||void 0);const a=s.length();return Object.entries(i).forEach(o=>{let[l,c]=o;s.formatAt(0,a,l,c)}),s}}Q(Lr,"blotName","scroll"),Q(Lr,"className","ql-editor"),Q(Lr,"tagName","DIV"),Q(Lr,"defaultChild",Ke),Q(Lr,"allowedChildren",[Ke,Lt,hr]);function tl(e,t,n){n.reduce((r,i)=>{const s=Dt.Op.length(i);let a=i.attributes||{};if(i.insert!=null){if(typeof i.insert=="string"){const o=i.insert;e.insertAt(r,o);const[l]=e.descendant(Qe,r),c=It(l);a=Dt.AttributeMap.diff(c,a)||{}}else if(typeof i.insert=="object"){const o=Object.keys(i.insert)[0];if(o==null)return r;if(e.insertAt(r,o,i.insert[o]),e.scroll.query(o,ne.INLINE)!=null){const[c]=e.descendant(Qe,r),u=It(c);a=Dt.AttributeMap.diff(u,a)||{}}}}return Object.keys(a).forEach(o=>{e.formatAt(r,s,o,a[o])}),r+s},t)}const jc={scope:ne.BLOCK,whitelist:["right","center","justify"]},aR=new fn("align","align",jc),im=new Zt("align","ql-align",jc),sm=new zn("align","text-align",jc);class am extends zn{value(t){let n=super.value(t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${n.split(",").map(i=>`00${parseInt(i,10).toString(16)}`.slice(-2)).join("")}`):n}}const oR=new Zt("color","ql-color",{scope:ne.INLINE}),zc=new am("color","color",{scope:ne.INLINE}),lR=new Zt("background","ql-bg",{scope:ne.INLINE}),Hc=new am("background","background-color",{scope:ne.INLINE});class pr extends hr{static create(t){const n=super.create(t);return n.setAttribute("spellcheck","false"),n}code(t,n){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
54
70
  `).slice(t,t+n)}html(t,n){return`<pre>
55
- ${ho(this.code(t,n))}
56
- </pre>`}}class tt extends Ke{static register(){D.register(ar)}}V(tt,"TAB"," ");class Ec extends cn{}Ec.blotName="code";Ec.tagName="CODE";tt.blotName="code-block";tt.className="ql-code-block";tt.tagName="DIV";ar.blotName="code-block-container";ar.className="ql-code-block-container";ar.tagName="DIV";ar.allowedChildren=[tt];tt.allowedChildren=[Kt,Vt,Pr];tt.requiredContainer=ar;const wc={scope:ee.BLOCK,whitelist:["rtl"]},dg=new ln("direction","dir",wc),fg=new Wt("direction","ql-direction",wc),hg=new Fn("direction","direction",wc),pg={scope:ee.INLINE,whitelist:["serif","monospace"]},gg=new Wt("font","ql-font",pg);class AO extends Fn{value(t){return super.value(t).replace(/["']/g,"")}}const mg=new AO("font","font-family",pg),bg=new Wt("size","ql-size",{scope:ee.INLINE,whitelist:["small","large","huge"]}),yg=new Fn("size","font-size",{scope:ee.INLINE,whitelist:["10px","18px","32px"]}),SO=vn("quill:keyboard"),TO=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class po extends Yt{static match(t,n){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!n[r]!==t[r]&&n[r]!==null)?!1:n.key===t.key||n.key===t.which}constructor(t,n){super(t,n),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=OO(t);if(i==null){SO.warn("Attempted to add invalid keyboard binding",i);return}typeof n=="function"&&(n={handler:n}),typeof r=="function"&&(r={handler:r}),(Array.isArray(i.key)?i.key:[i.key]).forEach(o=>{const a={...i,key:o,...n,...r};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;const i=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(y=>po.match(t,y));if(i.length===0)return;const s=D.find(t.target,!0);if(s&&s.scroll!==this.quill.scroll)return;const o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;const[a,l]=this.quill.getLine(o.index),[c,u]=this.quill.getLeaf(o.index),[d,h]=o.length===0?[c,u]:this.quill.getLeaf(o.index+o.length),f=c instanceof $s?c.value().slice(0,u):"",p=d instanceof $s?d.value().slice(h):"",m={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:l,prefix:f,suffix:p,event:t};i.some(y=>{if(y.collapsed!=null&&y.collapsed!==m.collapsed||y.empty!=null&&y.empty!==m.empty||y.offset!=null&&y.offset!==m.offset)return!1;if(Array.isArray(y.format)){if(y.format.every(_=>m.format[_]==null))return!1}else if(typeof y.format=="object"&&!Object.keys(y.format).every(_=>y.format[_]===!0?m.format[_]!=null:y.format[_]===!1?m.format[_]==null:On(y.format[_],m.format[_])))return!1;return y.prefix!=null&&!y.prefix.test(m.prefix)||y.suffix!=null&&!y.suffix.test(m.suffix)?!1:y.handler.call(this,o,m,y)!==!0})&&t.preventDefault()})}handleBackspace(t,n){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(n.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let i={};const[s]=this.quill.getLine(t.index);let o=new J().retain(t.index-r).delete(r);if(n.offset===0){const[a]=this.quill.getLine(t.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){const c=s.formats(),u=this.quill.getFormat(t.index-1,1);if(i=Rt.AttributeMap.diff(c,u)||{},Object.keys(i).length>0){const d=new J().retain(t.index+s.length()-2).retain(1,i);o=o.compose(d)}}}this.quill.updateContents(o,D.sources.USER),this.quill.focus()}handleDelete(t,n){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(n.suffix)?2:1;if(t.index>=this.quill.getLength()-r)return;let i={};const[s]=this.quill.getLine(t.index);let o=new J().retain(t.index).delete(r);if(n.offset>=s.length()-1){const[a]=this.quill.getLine(t.index+1);if(a){const l=s.formats(),c=this.quill.getFormat(t.index,1);i=Rt.AttributeMap.diff(l,c)||{},Object.keys(i).length>0&&(o=o.retain(a.length()-1).retain(1,i))}}this.quill.updateContents(o,D.sources.USER),this.quill.focus()}handleDeleteRange(t){_c({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,n){const r=Object.keys(n.format).reduce((s,o)=>(this.quill.scroll.query(o,ee.BLOCK)&&!Array.isArray(n.format[o])&&(s[o]=n.format[o]),s),{}),i=new J().retain(t.index).delete(t.length).insert(`
57
- `,r);this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(t.index+1,D.sources.SILENT),this.quill.focus()}}const CO={bindings:{bold:Da("bold"),italic:Da("italic"),underline:Da("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",D.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",D.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(e,t){t.format.indent!=null?this.quill.format("indent","-1",D.sources.USER):t.format.list!=null&&this.quill.format("list",!1,D.sources.USER)}},"indent code-block":Ud(!0),"outdent code-block":Ud(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(e){this.quill.deleteText(e.index-1,1,D.sources.USER)}},tab:{key:"Tab",handler(e,t){if(t.format.table)return!0;this.quill.history.cutoff();const n=new J().retain(e.index).delete(e.length).insert(" ");return this.quill.updateContents(n,D.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,D.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,D.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(e,t){const n={list:!1};t.format.indent&&(n.indent=!1),this.quill.formatLine(e.index,e.length,n,D.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(e){const[t,n]=this.quill.getLine(e.index),r={...t.formats(),list:"checked"},i=new J().retain(e.index).insert(`
58
- `,r).retain(t.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(e.index+1,D.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(e,t){const[n,r]=this.quill.getLine(e.index),i=new J().retain(e.index).insert(`
59
- `,t.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(e.index+1,D.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(e){const t=this.quill.getModule("table");if(t){const[n,r,i,s]=t.getTable(e),o=IO(n,r,i,s);if(o==null)return;let a=n.offset();if(o<0){const l=new J().retain(a).insert(`
60
- `);this.quill.updateContents(l,D.sources.USER),this.quill.setSelection(e.index+1,e.length,D.sources.SILENT)}else if(o>0){a+=n.length();const l=new J().retain(a).insert(`
61
- `);this.quill.updateContents(l,D.sources.USER),this.quill.setSelection(a,D.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(e,t){const{event:n,line:r}=t,i=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,D.sources.USER):this.quill.setSelection(i+r.length(),D.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(e,t){if(this.quill.scroll.query("list")==null)return!0;const{length:n}=t.prefix,[r,i]=this.quill.getLine(e.index);if(i>n)return!0;let s;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",D.sources.USER),this.quill.history.cutoff();const o=new J().retain(e.index-i).delete(n+1).retain(r.length()-2-i).retain(1,{list:s});return this.quill.updateContents(o,D.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,D.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(e){const[t,n]=this.quill.getLine(e.index);let r=2,i=t;for(;i!=null&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,r-=1,r<=0){const s=new J().retain(e.index+t.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(s,D.sources.USER),this.quill.setSelection(e.index-1,D.sources.SILENT),!1}return!0}},"embed left":xs("ArrowLeft",!1),"embed left shift":xs("ArrowLeft",!0),"embed right":xs("ArrowRight",!1),"embed right shift":xs("ArrowRight",!0),"table down":$d(!1),"table up":$d(!0)}};po.DEFAULTS=CO;function Ud(e){return{key:"Tab",shiftKey:!e,format:{"code-block":!0},handler(t,n){let{event:r}=n;const i=this.quill.scroll.query("code-block"),{TAB:s}=i;if(t.length===0&&!r.shiftKey){this.quill.insertText(t.index,s,D.sources.USER),this.quill.setSelection(t.index+s.length,D.sources.SILENT);return}const o=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:a,length:l}=t;o.forEach((c,u)=>{e?(c.insertAt(0,s),u===0?a+=s.length:l+=s.length):c.domNode.textContent.startsWith(s)&&(c.deleteAt(0,s.length),u===0?a-=s.length:l-=s.length)}),this.quill.update(D.sources.USER),this.quill.setSelection(a,l,D.sources.SILENT)}}}function xs(e,t){return{key:e,shiftKey:t,altKey:null,[e==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:i}=r;e==="ArrowRight"&&(i+=r.length+1);const[s]=this.quill.getLeaf(i);return s instanceof _t?(e==="ArrowLeft"?t?this.quill.setSelection(r.index-1,r.length+1,D.sources.USER):this.quill.setSelection(r.index-1,D.sources.USER):t?this.quill.setSelection(r.index,r.length+1,D.sources.USER):this.quill.setSelection(r.index+r.length+1,D.sources.USER),!1):!0}}}function Da(e){return{key:e[0],shortKey:!0,handler(t,n){this.quill.format(e,!n.format[e],D.sources.USER)}}}function $d(e){return{key:e?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,n){const r=e?"prev":"next",i=n.line,s=i.parent[r];if(s!=null){if(s.statics.blotName==="table-row"){let o=s.children.head,a=i;for(;a.prev!=null;)a=a.prev,o=o.next;const l=o.offset(this.quill.scroll)+Math.min(n.offset,o.length()-1);this.quill.setSelection(l,0,D.sources.USER)}}else{const o=i.table()[r];o!=null&&(e?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,D.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,D.sources.USER))}return!1}}}function OO(e){if(typeof e=="string"||typeof e=="number")e={key:e};else if(typeof e=="object")e=Tr(e);else return null;return e.shortKey&&(e[TO]=e.shortKey,delete e.shortKey),e}function _c(e){let{quill:t,range:n}=e;const r=t.getLines(n);let i={};if(r.length>1){const s=r[0].formats(),o=r[r.length-1].formats();i=Rt.AttributeMap.diff(o,s)||{}}t.deleteText(n,D.sources.USER),Object.keys(i).length>0&&t.formatLine(n.index,1,i,D.sources.USER),t.setSelection(n.index,D.sources.SILENT)}function IO(e,t,n,r){return t.prev==null&&t.next==null?n.prev==null&&n.next==null?r===0?-1:1:n.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}const RO=/font-weight:\s*normal/,LO=["P","OL","UL"],zd=e=>e&&LO.includes(e.tagName),MO=e=>{Array.from(e.querySelectorAll("br")).filter(t=>zd(t.previousElementSibling)&&zd(t.nextElementSibling)).forEach(t=>{var n;(n=t.parentNode)==null||n.removeChild(t)})},DO=e=>{Array.from(e.querySelectorAll('b[style*="font-weight"]')).filter(t=>{var n;return(n=t.getAttribute("style"))==null?void 0:n.match(RO)}).forEach(t=>{var r;const n=e.createDocumentFragment();n.append(...t.childNodes),(r=t.parentNode)==null||r.replaceChild(n,t)})};function PO(e){e.querySelector('[id^="docs-internal-guid-"]')&&(DO(e),MO(e))}const BO=/\bmso-list:[^;]*ignore/i,FO=/\bmso-list:[^;]*\bl(\d+)/i,qO=/\bmso-list:[^;]*\blevel(\d+)/i,UO=(e,t)=>{const n=e.getAttribute("style"),r=n==null?void 0:n.match(FO);if(!r)return null;const i=Number(r[1]),s=n==null?void 0:n.match(qO),o=s?Number(s[1]):1,a=new RegExp(`@list l${i}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=t.match(a),c=l&&l[1]==="bullet"?"bullet":"ordered";return{id:i,indent:o,type:c,element:e}},$O=e=>{var o,a;const t=Array.from(e.querySelectorAll("[style*=mso-list]")),n=[],r=[];t.forEach(l=>{(l.getAttribute("style")||"").match(BO)?n.push(l):r.push(l)}),n.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)});const i=e.documentElement.innerHTML,s=r.map(l=>UO(l,i)).filter(l=>l);for(;s.length;){const l=[];let c=s.shift();for(;c;)l.push(c),c=s.length&&((o=s[0])==null?void 0:o.element)===c.element.nextElementSibling&&s[0].id===c.id?s.shift():null;const u=document.createElement("ul");l.forEach(f=>{const p=document.createElement("li");p.setAttribute("data-list",f.type),f.indent>1&&p.setAttribute("class",`ql-indent-${f.indent-1}`),p.innerHTML=f.element.innerHTML,u.appendChild(p)});const d=(a=l[0])==null?void 0:a.element,{parentNode:h}=d??{};d&&(h==null||h.replaceChild(u,d)),l.slice(1).forEach(f=>{let{element:p}=f;h==null||h.removeChild(p)})}};function zO(e){e.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&$O(e)}const jO=[zO,PO],HO=e=>{e.documentElement&&jO.forEach(t=>{t(e)})},GO=vn("quill:clipboard"),KO=[[Node.TEXT_NODE,iI],[Node.TEXT_NODE,Hd],["br",XO],[Node.ELEMENT_NODE,Hd],[Node.ELEMENT_NODE,ZO],[Node.ELEMENT_NODE,YO],[Node.ELEMENT_NODE,nI],["li",eI],["ol, ul",tI],["pre",QO],["tr",rI],["b",Pa("bold")],["i",Pa("italic")],["strike",Pa("strike")],["style",JO]],WO=[vO,dg].reduce((e,t)=>(e[t.keyName]=t,e),{}),jd=[cg,xc,yc,hg,mg,yg].reduce((e,t)=>(e[t.keyName]=t,e),{});class xg extends Yt{constructor(t,n){super(t,n),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],KO.concat(this.options.matchers??[]).forEach(r=>{let[i,s]=r;this.addMatcher(i,s)})}addMatcher(t,n){this.matchers.push([t,n])}convert(t){let{html:n,text:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i[tt.blotName])return new J().insert(r||"",{[tt.blotName]:i[tt.blotName]});if(!n)return new J().insert(r||"",i);const s=this.convertHTML(n);return Fi(s,`
62
- `)&&(s.ops[s.ops.length-1].attributes==null||i.table)?s.compose(new J().retain(s.length()-1).delete(1)):s}normalizeHTML(t){HO(t)}convertHTML(t){const n=new DOMParser().parseFromString(t,"text/html");this.normalizeHTML(n);const r=n.body,i=new WeakMap,[s,o]=this.prepareMatching(r,i);return vc(this.quill.scroll,r,s,o,i)}dangerouslyPasteHTML(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:D.sources.API;if(typeof t=="string"){const i=this.convert({html:t,text:""});this.quill.setContents(i,n),this.quill.setSelection(0,D.sources.SILENT)}else{const i=this.convert({html:n,text:""});this.quill.updateContents(new J().retain(t).concat(i),r),this.quill.setSelection(t+i.length(),D.sources.SILENT)}}onCaptureCopy(t){var o,a;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.defaultPrevented)return;t.preventDefault();const[r]=this.quill.selection.getRange();if(r==null)return;const{html:i,text:s}=this.onCopy(r,n);(o=t.clipboardData)==null||o.setData("text/plain",s),(a=t.clipboardData)==null||a.setData("text/html",i),n&&_c({range:r,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter(n=>n[0]!=="#").join(`
63
- `)}onCapturePaste(t){var o,a,l,c,u;if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const n=this.quill.getSelection(!0);if(n==null)return;const r=(o=t.clipboardData)==null?void 0:o.getData("text/html");let i=(a=t.clipboardData)==null?void 0:a.getData("text/plain");if(!r&&!i){const d=(l=t.clipboardData)==null?void 0:l.getData("text/uri-list");d&&(i=this.normalizeURIList(d))}const s=Array.from(((c=t.clipboardData)==null?void 0:c.files)||[]);if(!r&&s.length>0){this.quill.uploader.upload(n,s);return}if(r&&s.length>0){const d=new DOMParser().parseFromString(r,"text/html");if(d.body.childElementCount===1&&((u=d.body.firstElementChild)==null?void 0:u.tagName)==="IMG"){this.quill.uploader.upload(n,s);return}}this.onPaste(n,{html:r,text:i})}onCopy(t){const n=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:n}}onPaste(t,n){let{text:r,html:i}=n;const s=this.quill.getFormat(t.index),o=this.convert({text:r,html:i},s);GO.log("onPaste",o,{text:r,html:i});const a=new J().retain(t.index).delete(t.length).concat(o);this.quill.updateContents(a,D.sources.USER),this.quill.setSelection(a.length()-t.length,D.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,n){const r=[],i=[];return this.matchers.forEach(s=>{const[o,a]=s;switch(o){case Node.TEXT_NODE:i.push(a);break;case Node.ELEMENT_NODE:r.push(a);break;default:Array.from(t.querySelectorAll(o)).forEach(l=>{if(n.has(l)){const c=n.get(l);c==null||c.push(a)}else n.set(l,[a])});break}}),[r,i]}}V(xg,"DEFAULTS",{matchers:[]});function lr(e,t,n,r){return r.query(t)?e.reduce((i,s)=>{if(!s.insert)return i;if(s.attributes&&s.attributes[t])return i.push(s);const o=n?{[t]:n}:{};return i.insert(s.insert,{...o,...s.attributes})},new J):e}function Fi(e,t){let n="";for(let r=e.ops.length-1;r>=0&&n.length<t.length;--r){const i=e.ops[r];if(typeof i.insert!="string")break;n=i.insert+n}return n.slice(-1*t.length)===t}function Rn(e,t){if(!(e instanceof Element))return!1;const n=t.query(e);return n&&n.prototype instanceof _t?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(e.tagName.toLowerCase())}function VO(e,t){return e.previousElementSibling&&e.nextElementSibling&&!Rn(e.previousElementSibling,t)&&!Rn(e.nextElementSibling,t)}const Es=new WeakMap;function Eg(e){return e==null?!1:(Es.has(e)||(e.tagName==="PRE"?Es.set(e,!0):Es.set(e,Eg(e.parentNode))),Es.get(e))}function vc(e,t,n,r,i){return t.nodeType===t.TEXT_NODE?r.reduce((s,o)=>o(t,s,e),new J):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((s,o)=>{let a=vc(e,o,n,r,i);return o.nodeType===t.ELEMENT_NODE&&(a=n.reduce((l,c)=>c(o,l,e),a),a=(i.get(o)||[]).reduce((l,c)=>c(o,l,e),a)),s.concat(a)},new J):new J}function Pa(e){return(t,n,r)=>lr(n,e,!0,r)}function YO(e,t,n){const r=ln.keys(e),i=Wt.keys(e),s=Fn.keys(e),o={};return r.concat(i).concat(s).forEach(a=>{let l=n.query(a,ee.ATTRIBUTE);l!=null&&(o[l.attrName]=l.value(e),o[l.attrName])||(l=WO[a],l!=null&&(l.attrName===a||l.keyName===a)&&(o[l.attrName]=l.value(e)||void 0),l=jd[a],l!=null&&(l.attrName===a||l.keyName===a)&&(l=jd[a],o[l.attrName]=l.value(e)||void 0))}),Object.entries(o).reduce((a,l)=>{let[c,u]=l;return lr(a,c,u,n)},t)}function ZO(e,t,n){const r=n.query(e);if(r==null)return t;if(r.prototype instanceof _t){const i={},s=r.value(e);if(s!=null)return i[r.blotName]=s,new J().insert(i,r.formats(e,n))}else if(r.prototype instanceof Ti&&!Fi(t,`
71
+ ${Ta(this.code(t,n))}
72
+ </pre>`}}class nt extends Ke{static register(){B.register(pr)}}Q(nt,"TAB"," ");class Gc extends hn{}Gc.blotName="code";Gc.tagName="CODE";nt.blotName="code-block";nt.className="ql-code-block";nt.tagName="DIV";pr.blotName="code-block-container";pr.className="ql-code-block-container";pr.tagName="DIV";pr.allowedChildren=[nt];nt.allowedChildren=[Yt,Xt,zr];nt.requiredContainer=pr;const Kc={scope:ne.BLOCK,whitelist:["rtl"]},om=new fn("direction","dir",Kc),lm=new Zt("direction","ql-direction",Kc),cm=new zn("direction","direction",Kc),um={scope:ne.INLINE,whitelist:["serif","monospace"]},dm=new Zt("font","ql-font",um);class cR extends zn{value(t){return super.value(t).replace(/["']/g,"")}}const fm=new cR("font","font-family",um),hm=new Zt("size","ql-size",{scope:ne.INLINE,whitelist:["small","large","huge"]}),pm=new zn("size","font-size",{scope:ne.INLINE,whitelist:["10px","18px","32px"]}),uR=Tn("quill:keyboard"),dR=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Ca extends Jt{static match(t,n){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!n[r]!==t[r]&&n[r]!==null)?!1:n.key===t.key||n.key===t.which}constructor(t,n){super(t,n),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=hR(t);if(i==null){uR.warn("Attempted to add invalid keyboard binding",i);return}typeof n=="function"&&(n={handler:n}),typeof r=="function"&&(r={handler:r}),(Array.isArray(i.key)?i.key:[i.key]).forEach(a=>{const o={...i,key:a,...n,...r};this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;const i=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(y=>Ca.match(t,y));if(i.length===0)return;const s=B.find(t.target,!0);if(s&&s.scroll!==this.quill.scroll)return;const a=this.quill.getSelection();if(a==null||!this.quill.hasFocus())return;const[o,l]=this.quill.getLine(a.index),[c,u]=this.quill.getLeaf(a.index),[d,h]=a.length===0?[c,u]:this.quill.getLeaf(a.index+a.length),f=c instanceof na?c.value().slice(0,u):"",p=d instanceof na?d.value().slice(h):"",g={collapsed:a.length===0,empty:a.length===0&&o.length()<=1,format:this.quill.getFormat(a),line:o,offset:l,prefix:f,suffix:p,event:t};i.some(y=>{if(y.collapsed!=null&&y.collapsed!==g.collapsed||y.empty!=null&&y.empty!==g.empty||y.offset!=null&&y.offset!==g.offset)return!1;if(Array.isArray(y.format)){if(y.format.every(w=>g.format[w]==null))return!1}else if(typeof y.format=="object"&&!Object.keys(y.format).every(w=>y.format[w]===!0?g.format[w]!=null:y.format[w]===!1?g.format[w]==null:Dn(y.format[w],g.format[w])))return!1;return y.prefix!=null&&!y.prefix.test(g.prefix)||y.suffix!=null&&!y.suffix.test(g.suffix)?!1:y.handler.call(this,a,g,y)!==!0})&&t.preventDefault()})}handleBackspace(t,n){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(n.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let i={};const[s]=this.quill.getLine(t.index);let a=new te().retain(t.index-r).delete(r);if(n.offset===0){const[o]=this.quill.getLine(t.index-1);if(o&&!(o.statics.blotName==="block"&&o.length()<=1)){const c=s.formats(),u=this.quill.getFormat(t.index-1,1);if(i=Dt.AttributeMap.diff(c,u)||{},Object.keys(i).length>0){const d=new te().retain(t.index+s.length()-2).retain(1,i);a=a.compose(d)}}}this.quill.updateContents(a,B.sources.USER),this.quill.focus()}handleDelete(t,n){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(n.suffix)?2:1;if(t.index>=this.quill.getLength()-r)return;let i={};const[s]=this.quill.getLine(t.index);let a=new te().retain(t.index).delete(r);if(n.offset>=s.length()-1){const[o]=this.quill.getLine(t.index+1);if(o){const l=s.formats(),c=this.quill.getFormat(t.index,1);i=Dt.AttributeMap.diff(l,c)||{},Object.keys(i).length>0&&(a=a.retain(o.length()-1).retain(1,i))}}this.quill.updateContents(a,B.sources.USER),this.quill.focus()}handleDeleteRange(t){Vc({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,n){const r=Object.keys(n.format).reduce((s,a)=>(this.quill.scroll.query(a,ne.BLOCK)&&!Array.isArray(n.format[a])&&(s[a]=n.format[a]),s),{}),i=new te().retain(t.index).delete(t.length).insert(`
73
+ `,r);this.quill.updateContents(i,B.sources.USER),this.quill.setSelection(t.index+1,B.sources.SILENT),this.quill.focus()}}const fR={bindings:{bold:nl("bold"),italic:nl("italic"),underline:nl("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",B.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",B.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(e,t){t.format.indent!=null?this.quill.format("indent","-1",B.sources.USER):t.format.list!=null&&this.quill.format("list",!1,B.sources.USER)}},"indent code-block":Of(!0),"outdent code-block":Of(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(e){this.quill.deleteText(e.index-1,1,B.sources.USER)}},tab:{key:"Tab",handler(e,t){if(t.format.table)return!0;this.quill.history.cutoff();const n=new te().retain(e.index).delete(e.length).insert(" ");return this.quill.updateContents(n,B.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,B.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,B.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(e,t){const n={list:!1};t.format.indent&&(n.indent=!1),this.quill.formatLine(e.index,e.length,n,B.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(e){const[t,n]=this.quill.getLine(e.index),r={...t.formats(),list:"checked"},i=new te().retain(e.index).insert(`
74
+ `,r).retain(t.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(i,B.sources.USER),this.quill.setSelection(e.index+1,B.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(e,t){const[n,r]=this.quill.getLine(e.index),i=new te().retain(e.index).insert(`
75
+ `,t.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(i,B.sources.USER),this.quill.setSelection(e.index+1,B.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(e){const t=this.quill.getModule("table");if(t){const[n,r,i,s]=t.getTable(e),a=pR(n,r,i,s);if(a==null)return;let o=n.offset();if(a<0){const l=new te().retain(o).insert(`
76
+ `);this.quill.updateContents(l,B.sources.USER),this.quill.setSelection(e.index+1,e.length,B.sources.SILENT)}else if(a>0){o+=n.length();const l=new te().retain(o).insert(`
77
+ `);this.quill.updateContents(l,B.sources.USER),this.quill.setSelection(o,B.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(e,t){const{event:n,line:r}=t,i=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,B.sources.USER):this.quill.setSelection(i+r.length(),B.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(e,t){if(this.quill.scroll.query("list")==null)return!0;const{length:n}=t.prefix,[r,i]=this.quill.getLine(e.index);if(i>n)return!0;let s;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",B.sources.USER),this.quill.history.cutoff();const a=new te().retain(e.index-i).delete(n+1).retain(r.length()-2-i).retain(1,{list:s});return this.quill.updateContents(a,B.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,B.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(e){const[t,n]=this.quill.getLine(e.index);let r=2,i=t;for(;i!=null&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,r-=1,r<=0){const s=new te().retain(e.index+t.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(s,B.sources.USER),this.quill.setSelection(e.index-1,B.sources.SILENT),!1}return!0}},"embed left":Is("ArrowLeft",!1),"embed left shift":Is("ArrowLeft",!0),"embed right":Is("ArrowRight",!1),"embed right shift":Is("ArrowRight",!0),"table down":If(!1),"table up":If(!0)}};Ca.DEFAULTS=fR;function Of(e){return{key:"Tab",shiftKey:!e,format:{"code-block":!0},handler(t,n){let{event:r}=n;const i=this.quill.scroll.query("code-block"),{TAB:s}=i;if(t.length===0&&!r.shiftKey){this.quill.insertText(t.index,s,B.sources.USER),this.quill.setSelection(t.index+s.length,B.sources.SILENT);return}const a=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:o,length:l}=t;a.forEach((c,u)=>{e?(c.insertAt(0,s),u===0?o+=s.length:l+=s.length):c.domNode.textContent.startsWith(s)&&(c.deleteAt(0,s.length),u===0?o-=s.length:l-=s.length)}),this.quill.update(B.sources.USER),this.quill.setSelection(o,l,B.sources.SILENT)}}}function Is(e,t){return{key:e,shiftKey:t,altKey:null,[e==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:i}=r;e==="ArrowRight"&&(i+=r.length+1);const[s]=this.quill.getLeaf(i);return s instanceof Nt?(e==="ArrowLeft"?t?this.quill.setSelection(r.index-1,r.length+1,B.sources.USER):this.quill.setSelection(r.index-1,B.sources.USER):t?this.quill.setSelection(r.index,r.length+1,B.sources.USER):this.quill.setSelection(r.index+r.length+1,B.sources.USER),!1):!0}}}function nl(e){return{key:e[0],shortKey:!0,handler(t,n){this.quill.format(e,!n.format[e],B.sources.USER)}}}function If(e){return{key:e?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,n){const r=e?"prev":"next",i=n.line,s=i.parent[r];if(s!=null){if(s.statics.blotName==="table-row"){let a=s.children.head,o=i;for(;o.prev!=null;)o=o.prev,a=a.next;const l=a.offset(this.quill.scroll)+Math.min(n.offset,a.length()-1);this.quill.setSelection(l,0,B.sources.USER)}}else{const a=i.table()[r];a!=null&&(e?this.quill.setSelection(a.offset(this.quill.scroll)+a.length()-1,0,B.sources.USER):this.quill.setSelection(a.offset(this.quill.scroll),0,B.sources.USER))}return!1}}}function hR(e){if(typeof e=="string"||typeof e=="number")e={key:e};else if(typeof e=="object")e=Dr(e);else return null;return e.shortKey&&(e[dR]=e.shortKey,delete e.shortKey),e}function Vc(e){let{quill:t,range:n}=e;const r=t.getLines(n);let i={};if(r.length>1){const s=r[0].formats(),a=r[r.length-1].formats();i=Dt.AttributeMap.diff(a,s)||{}}t.deleteText(n,B.sources.USER),Object.keys(i).length>0&&t.formatLine(n.index,1,i,B.sources.USER),t.setSelection(n.index,B.sources.SILENT)}function pR(e,t,n,r){return t.prev==null&&t.next==null?n.prev==null&&n.next==null?r===0?-1:1:n.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}const gR=/font-weight:\s*normal/,mR=["P","OL","UL"],Rf=e=>e&&mR.includes(e.tagName),bR=e=>{Array.from(e.querySelectorAll("br")).filter(t=>Rf(t.previousElementSibling)&&Rf(t.nextElementSibling)).forEach(t=>{var n;(n=t.parentNode)==null||n.removeChild(t)})},yR=e=>{Array.from(e.querySelectorAll('b[style*="font-weight"]')).filter(t=>{var n;return(n=t.getAttribute("style"))==null?void 0:n.match(gR)}).forEach(t=>{var r;const n=e.createDocumentFragment();n.append(...t.childNodes),(r=t.parentNode)==null||r.replaceChild(n,t)})};function xR(e){e.querySelector('[id^="docs-internal-guid-"]')&&(yR(e),bR(e))}const ER=/\bmso-list:[^;]*ignore/i,wR=/\bmso-list:[^;]*\bl(\d+)/i,vR=/\bmso-list:[^;]*\blevel(\d+)/i,_R=(e,t)=>{const n=e.getAttribute("style"),r=n==null?void 0:n.match(wR);if(!r)return null;const i=Number(r[1]),s=n==null?void 0:n.match(vR),a=s?Number(s[1]):1,o=new RegExp(`@list l${i}:level${a}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=t.match(o),c=l&&l[1]==="bullet"?"bullet":"ordered";return{id:i,indent:a,type:c,element:e}},kR=e=>{var a,o;const t=Array.from(e.querySelectorAll("[style*=mso-list]")),n=[],r=[];t.forEach(l=>{(l.getAttribute("style")||"").match(ER)?n.push(l):r.push(l)}),n.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)});const i=e.documentElement.innerHTML,s=r.map(l=>_R(l,i)).filter(l=>l);for(;s.length;){const l=[];let c=s.shift();for(;c;)l.push(c),c=s.length&&((a=s[0])==null?void 0:a.element)===c.element.nextElementSibling&&s[0].id===c.id?s.shift():null;const u=document.createElement("ul");l.forEach(f=>{const p=document.createElement("li");p.setAttribute("data-list",f.type),f.indent>1&&p.setAttribute("class",`ql-indent-${f.indent-1}`),p.innerHTML=f.element.innerHTML,u.appendChild(p)});const d=(o=l[0])==null?void 0:o.element,{parentNode:h}=d??{};d&&(h==null||h.replaceChild(u,d)),l.slice(1).forEach(f=>{let{element:p}=f;h==null||h.removeChild(p)})}};function NR(e){e.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&kR(e)}const SR=[NR,xR],AR=e=>{e.documentElement&&SR.forEach(t=>{t(e)})},TR=Tn("quill:clipboard"),CR=[[Node.TEXT_NODE,qR],[Node.TEXT_NODE,Mf],["br",MR],[Node.ELEMENT_NODE,Mf],[Node.ELEMENT_NODE,LR],[Node.ELEMENT_NODE,RR],[Node.ELEMENT_NODE,$R],["li",BR],["ol, ul",FR],["pre",DR],["tr",UR],["b",rl("bold")],["i",rl("italic")],["strike",rl("strike")],["style",PR]],OR=[aR,om].reduce((e,t)=>(e[t.keyName]=t,e),{}),Lf=[sm,Hc,zc,cm,fm,pm].reduce((e,t)=>(e[t.keyName]=t,e),{});class gm extends Jt{constructor(t,n){super(t,n),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],CR.concat(this.options.matchers??[]).forEach(r=>{let[i,s]=r;this.addMatcher(i,s)})}addMatcher(t,n){this.matchers.push([t,n])}convert(t){let{html:n,text:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i[nt.blotName])return new te().insert(r||"",{[nt.blotName]:i[nt.blotName]});if(!n)return new te().insert(r||"",i);const s=this.convertHTML(n);return Yi(s,`
78
+ `)&&(s.ops[s.ops.length-1].attributes==null||i.table)?s.compose(new te().retain(s.length()-1).delete(1)):s}normalizeHTML(t){AR(t)}convertHTML(t){const n=new DOMParser().parseFromString(t,"text/html");this.normalizeHTML(n);const r=n.body,i=new WeakMap,[s,a]=this.prepareMatching(r,i);return Wc(this.quill.scroll,r,s,a,i)}dangerouslyPasteHTML(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:B.sources.API;if(typeof t=="string"){const i=this.convert({html:t,text:""});this.quill.setContents(i,n),this.quill.setSelection(0,B.sources.SILENT)}else{const i=this.convert({html:n,text:""});this.quill.updateContents(new te().retain(t).concat(i),r),this.quill.setSelection(t+i.length(),B.sources.SILENT)}}onCaptureCopy(t){var a,o;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.defaultPrevented)return;t.preventDefault();const[r]=this.quill.selection.getRange();if(r==null)return;const{html:i,text:s}=this.onCopy(r,n);(a=t.clipboardData)==null||a.setData("text/plain",s),(o=t.clipboardData)==null||o.setData("text/html",i),n&&Vc({range:r,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter(n=>n[0]!=="#").join(`
79
+ `)}onCapturePaste(t){var a,o,l,c,u;if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const n=this.quill.getSelection(!0);if(n==null)return;const r=(a=t.clipboardData)==null?void 0:a.getData("text/html");let i=(o=t.clipboardData)==null?void 0:o.getData("text/plain");if(!r&&!i){const d=(l=t.clipboardData)==null?void 0:l.getData("text/uri-list");d&&(i=this.normalizeURIList(d))}const s=Array.from(((c=t.clipboardData)==null?void 0:c.files)||[]);if(!r&&s.length>0){this.quill.uploader.upload(n,s);return}if(r&&s.length>0){const d=new DOMParser().parseFromString(r,"text/html");if(d.body.childElementCount===1&&((u=d.body.firstElementChild)==null?void 0:u.tagName)==="IMG"){this.quill.uploader.upload(n,s);return}}this.onPaste(n,{html:r,text:i})}onCopy(t){const n=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:n}}onPaste(t,n){let{text:r,html:i}=n;const s=this.quill.getFormat(t.index),a=this.convert({text:r,html:i},s);TR.log("onPaste",a,{text:r,html:i});const o=new te().retain(t.index).delete(t.length).concat(a);this.quill.updateContents(o,B.sources.USER),this.quill.setSelection(o.length()-t.length,B.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,n){const r=[],i=[];return this.matchers.forEach(s=>{const[a,o]=s;switch(a){case Node.TEXT_NODE:i.push(o);break;case Node.ELEMENT_NODE:r.push(o);break;default:Array.from(t.querySelectorAll(a)).forEach(l=>{if(n.has(l)){const c=n.get(l);c==null||c.push(o)}else n.set(l,[o])});break}}),[r,i]}}Q(gm,"DEFAULTS",{matchers:[]});function gr(e,t,n,r){return r.query(t)?e.reduce((i,s)=>{if(!s.insert)return i;if(s.attributes&&s.attributes[t])return i.push(s);const a=n?{[t]:n}:{};return i.insert(s.insert,{...a,...s.attributes})},new te):e}function Yi(e,t){let n="";for(let r=e.ops.length-1;r>=0&&n.length<t.length;--r){const i=e.ops[r];if(typeof i.insert!="string")break;n=i.insert+n}return n.slice(-1*t.length)===t}function Bn(e,t){if(!(e instanceof Element))return!1;const n=t.query(e);return n&&n.prototype instanceof Nt?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(e.tagName.toLowerCase())}function IR(e,t){return e.previousElementSibling&&e.nextElementSibling&&!Bn(e.previousElementSibling,t)&&!Bn(e.nextElementSibling,t)}const Rs=new WeakMap;function mm(e){return e==null?!1:(Rs.has(e)||(e.tagName==="PRE"?Rs.set(e,!0):Rs.set(e,mm(e.parentNode))),Rs.get(e))}function Wc(e,t,n,r,i){return t.nodeType===t.TEXT_NODE?r.reduce((s,a)=>a(t,s,e),new te):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((s,a)=>{let o=Wc(e,a,n,r,i);return a.nodeType===t.ELEMENT_NODE&&(o=n.reduce((l,c)=>c(a,l,e),o),o=(i.get(a)||[]).reduce((l,c)=>c(a,l,e),o)),s.concat(o)},new te):new te}function rl(e){return(t,n,r)=>gr(n,e,!0,r)}function RR(e,t,n){const r=fn.keys(e),i=Zt.keys(e),s=zn.keys(e),a={};return r.concat(i).concat(s).forEach(o=>{let l=n.query(o,ne.ATTRIBUTE);l!=null&&(a[l.attrName]=l.value(e),a[l.attrName])||(l=OR[o],l!=null&&(l.attrName===o||l.keyName===o)&&(a[l.attrName]=l.value(e)||void 0),l=Lf[o],l!=null&&(l.attrName===o||l.keyName===o)&&(l=Lf[o],a[l.attrName]=l.value(e)||void 0))}),Object.entries(a).reduce((o,l)=>{let[c,u]=l;return gr(o,c,u,n)},t)}function LR(e,t,n){const r=n.query(e);if(r==null)return t;if(r.prototype instanceof Nt){const i={},s=r.value(e);if(s!=null)return i[r.blotName]=s,new te().insert(i,r.formats(e,n))}else if(r.prototype instanceof $i&&!Yi(t,`
64
80
  `)&&t.insert(`
65
- `),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return lr(t,r.blotName,r.formats(e,n),n);return t}function XO(e,t){return Fi(t,`
81
+ `),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return gr(t,r.blotName,r.formats(e,n),n);return t}function MR(e,t){return Yi(t,`
66
82
  `)||t.insert(`
67
- `),t}function QO(e,t,n){const r=n.query("code-block"),i=r&&"formats"in r&&typeof r.formats=="function"?r.formats(e,n):!0;return lr(t,"code-block",i,n)}function JO(){return new J}function eI(e,t,n){const r=n.query(e);if(r==null||r.blotName!=="list"||!Fi(t,`
68
- `))return t;let i=-1,s=e.parentNode;for(;s!=null;)["OL","UL"].includes(s.tagName)&&(i+=1),s=s.parentNode;return i<=0?t:t.reduce((o,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?o.push(a):o.insert(a.insert,{indent:i,...a.attributes||{}}):o,new J)}function tI(e,t,n){const r=e;let i=r.tagName==="OL"?"ordered":"bullet";const s=r.getAttribute("data-checked");return s&&(i=s==="true"?"checked":"unchecked"),lr(t,"list",i,n)}function Hd(e,t,n){if(!Fi(t,`
69
- `)){if(Rn(e,n)&&(e.childNodes.length>0||e instanceof HTMLParagraphElement))return t.insert(`
70
- `);if(t.length()>0&&e.nextSibling){let r=e.nextSibling;for(;r!=null;){if(Rn(r,n))return t.insert(`
71
- `);const i=n.query(r);if(i&&i.prototype instanceof Ot)return t.insert(`
72
- `);r=r.firstChild}}}return t}function nI(e,t,n){var s;const r={},i=e.style||{};return i.fontStyle==="italic"&&(r.italic=!0),i.textDecoration==="underline"&&(r.underline=!0),i.textDecoration==="line-through"&&(r.strike=!0),((s=i.fontWeight)!=null&&s.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(r.bold=!0),t=Object.entries(r).reduce((o,a)=>{let[l,c]=a;return lr(o,l,c,n)},t),parseFloat(i.textIndent||0)>0?new J().insert(" ").concat(t):t}function rI(e,t,n){var i,s;const r=((i=e.parentElement)==null?void 0:i.tagName)==="TABLE"?e.parentElement:(s=e.parentElement)==null?void 0:s.parentElement;if(r!=null){const a=Array.from(r.querySelectorAll("tr")).indexOf(e)+1;return lr(t,"table",a,n)}return t}function iI(e,t,n){var i;let r=e.data;if(((i=e.parentElement)==null?void 0:i.tagName)==="O:P")return t.insert(r.trim());if(!Eg(e)){if(r.trim().length===0&&r.includes(`
73
- `)&&!VO(e,n))return t;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(e.previousSibling==null&&e.parentElement!=null&&Rn(e.parentElement,n)||e.previousSibling instanceof Element&&Rn(e.previousSibling,n))&&(r=r.replace(/^ /,"")),(e.nextSibling==null&&e.parentElement!=null&&Rn(e.parentElement,n)||e.nextSibling instanceof Element&&Rn(e.nextSibling,n))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return t.insert(r)}class wg extends Yt{constructor(n,r){super(n,r);V(this,"lastRecorded",0);V(this,"ignoreChange",!1);V(this,"stack",{undo:[],redo:[]});V(this,"currentRange",null);this.quill.on(D.events.EDITOR_CHANGE,(i,s,o,a)=>{i===D.events.SELECTION_CHANGE?s&&a!==D.sources.SILENT&&(this.currentRange=s):i===D.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===D.sources.USER?this.record(s,o):this.transform(s)),this.currentRange=El(this.currentRange,s))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",i=>{i.inputType==="historyUndo"?(this.undo(),i.preventDefault()):i.inputType==="historyRedo"&&(this.redo(),i.preventDefault())})}change(n,r){if(this.stack[n].length===0)return;const i=this.stack[n].pop();if(!i)return;const s=this.quill.getContents(),o=i.delta.invert(s);this.stack[r].push({delta:o,range:El(i.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(i.delta,D.sources.USER),this.ignoreChange=!1,this.restoreSelection(i)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(n,r){if(n.ops.length===0)return;this.stack.redo=[];let i=n.invert(r),s=this.currentRange;const o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(i=i.compose(a.delta),s=a.range)}else this.lastRecorded=o;i.length()!==0&&(this.stack.undo.push({delta:i,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(n){Gd(this.stack.undo,n),Gd(this.stack.redo,n)}undo(){this.change("undo","redo")}restoreSelection(n){if(n.range)this.quill.setSelection(n.range,D.sources.USER);else{const r=oI(this.quill.scroll,n.delta);this.quill.setSelection(r,D.sources.USER)}}}V(wg,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Gd(e,t){let n=t;for(let r=e.length-1;r>=0;r-=1){const i=e[r];e[r]={delta:n.transform(i.delta,!0),range:i.range&&El(i.range,n)},n=i.delta.transform(n),e[r].delta.length()===0&&e.splice(r,1)}}function sI(e,t){const n=t.ops[t.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(`
74
- `):n.attributes!=null?Object.keys(n.attributes).some(r=>e.query(r,ee.BLOCK)!=null):!1}function oI(e,t){const n=t.reduce((i,s)=>i+(s.delete||0),0);let r=t.length()-n;return sI(e,t)&&(r-=1),r}function El(e,t){if(!e)return e;const n=t.transformPosition(e.index),r=t.transformPosition(e.index+e.length);return{index:n,length:r-n}}class _g extends Yt{constructor(t,n){super(t,n),t.root.addEventListener("drop",r=>{var o;r.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r.clientX,r.clientY);i=document.createRange(),i.setStart(a.offsetNode,a.offset),i.setEnd(a.offsetNode,a.offset)}const s=i&&t.selection.normalizeNative(i);if(s){const a=t.selection.normalizedToRange(s);(o=r.dataTransfer)!=null&&o.files&&this.upload(a,r.dataTransfer.files)}})}upload(t,n){const r=[];Array.from(n).forEach(i=>{var s;i&&((s=this.options.mimetypes)!=null&&s.includes(i.type))&&r.push(i)}),r.length>0&&this.options.handler.call(this,t,r)}}_g.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(e,t){if(!this.quill.scroll.query("image"))return;const n=t.map(r=>new Promise(i=>{const s=new FileReader;s.onload=()=>{i(s.result)},s.readAsDataURL(r)}));Promise.all(n).then(r=>{const i=r.reduce((s,o)=>s.insert({image:o}),new J().retain(e.index).delete(e.length));this.quill.updateContents(i,Z.sources.USER),this.quill.setSelection(e.index+r.length,Z.sources.SILENT)})}};const aI=["insertText","insertReplacementText"];let lI=class extends Yt{constructor(t,n){super(t,n),t.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||t.on(D.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){_c({range:t,quill:this.quill})}replaceText(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(n){const r=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new J().retain(t.index).insert(n,r),D.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+n.length,0,D.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!aI.includes(t.inputType))return;const n=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!n||n.collapsed===!0)return;const r=cI(t);if(r==null)return;const i=this.quill.selection.normalizeNative(n),s=i?this.quill.selection.normalizedToRange(i):null;s&&this.replaceText(s,r)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}};function cI(e){var t;return typeof e.data=="string"?e.data:(t=e.dataTransfer)!=null&&t.types.includes("text/plain")?e.dataTransfer.getData("text/plain"):null}const uI=/Mac/i.test(navigator.platform),dI=100,fI=e=>!!(e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="ArrowUp"||e.key==="ArrowDown"||e.key==="Home"||uI&&e.key==="a"&&e.ctrlKey===!0);class hI extends Yt{constructor(n,r){super(n,r);V(this,"isListening",!1);V(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(n,r){let{line:i,event:s}=r;if(!(i instanceof Gt)||!i.uiNode)return!0;const o=getComputedStyle(i.domNode).direction==="rtl";return o&&s.key!=="ArrowRight"||!o&&s.key!=="ArrowLeft"?!0:(this.quill.setSelection(n.index-1,n.length+(s.shiftKey?1:0),D.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",n=>{!n.defaultPrevented&&fI(n)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+dI,this.isListening)return;this.isListening=!0;const n=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",n,{once:!0})}handleSelectionChange(){const n=document.getSelection();if(!n)return;const r=n.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const i=this.quill.scroll.find(r.startContainer);if(!(i instanceof Gt)||!i.uiNode)return;const s=document.createRange();s.setStartAfter(i.uiNode),s.setEndAfter(i.uiNode),n.removeAllRanges(),n.addRange(s)}}D.register({"blots/block":Ke,"blots/block/embed":Ot,"blots/break":Vt,"blots/container":or,"blots/cursor":Pr,"blots/embed":mc,"blots/inline":cn,"blots/scroll":Ar,"blots/text":Kt,"modules/clipboard":xg,"modules/history":wg,"modules/keyboard":po,"modules/uploader":_g,"modules/input":lI,"modules/uiNode":hI});class pI extends Wt{add(t,n){let r=0;if(n==="+1"||n==="-1"){const i=this.value(t)||0;r=n==="+1"?i+1:i-1}else typeof n=="number"&&(r=n);return r===0?(this.remove(t),!0):super.add(t,r.toString())}canAdd(t,n){return super.canAdd(t,n)||super.canAdd(t,parseInt(n,10))}value(t){return parseInt(super.value(t),10)||void 0}}const gI=new pI("indent","ql-indent",{scope:ee.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class wl extends Ke{}V(wl,"blotName","blockquote"),V(wl,"tagName","blockquote");class _l extends Ke{static formats(t){return this.tagName.indexOf(t.tagName)+1}}V(_l,"blotName","header"),V(_l,"tagName",["H1","H2","H3","H4","H5","H6"]);class qi extends or{}qi.blotName="list-container";qi.tagName="OL";class Ui extends Ke{static create(t){const n=super.create();return n.setAttribute("data-list",t),n}static formats(t){return t.getAttribute("data-list")||void 0}static register(){D.register(qi)}constructor(t,n){super(t,n);const r=n.ownerDocument.createElement("span"),i=s=>{if(!t.isEnabled())return;const o=this.statics.formats(n,t);o==="checked"?(this.format("list","unchecked"),s.preventDefault()):o==="unchecked"&&(this.format("list","checked"),s.preventDefault())};r.addEventListener("mousedown",i),r.addEventListener("touchstart",i),this.attachUI(r)}format(t,n){t===this.statics.blotName&&n?this.domNode.setAttribute("data-list",n):super.format(t,n)}}Ui.blotName="list";Ui.tagName="LI";qi.allowedChildren=[Ui];Ui.requiredContainer=qi;class Ii extends cn{static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}V(Ii,"blotName","bold"),V(Ii,"tagName",["STRONG","B"]);class vl extends Ii{}V(vl,"blotName","italic"),V(vl,"tagName",["EM","I"]);class Ln extends cn{static create(t){const n=super.create(t);return n.setAttribute("href",this.sanitize(t)),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}static formats(t){return t.getAttribute("href")}static sanitize(t){return vg(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,n){t!==this.statics.blotName||!n?super.format(t,n):this.domNode.setAttribute("href",this.constructor.sanitize(n))}}V(Ln,"blotName","link"),V(Ln,"tagName","A"),V(Ln,"SANITIZED_URL","about:blank"),V(Ln,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function vg(e,t){const n=document.createElement("a");n.href=e;const r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}class kl extends cn{static create(t){return t==="super"?document.createElement("sup"):t==="sub"?document.createElement("sub"):super.create(t)}static formats(t){if(t.tagName==="SUB")return"sub";if(t.tagName==="SUP")return"super"}}V(kl,"blotName","script"),V(kl,"tagName",["SUB","SUP"]);class Nl extends Ii{}V(Nl,"blotName","strike"),V(Nl,"tagName",["S","STRIKE"]);class Al extends cn{}V(Al,"blotName","underline"),V(Al,"tagName","U");class As extends mc{static create(t){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const n=super.create(t);return typeof t=="string"&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}V(As,"blotName","formula"),V(As,"className","ql-formula"),V(As,"tagName","SPAN");const Kd=["alt","height","width"];var _s;let mI=(_s=class extends _t{static create(t){const n=super.create(t);return typeof t=="string"&&n.setAttribute("src",this.sanitize(t)),n}static formats(t){return Kd.reduce((n,r)=>(t.hasAttribute(r)&&(n[r]=t.getAttribute(r)),n),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return vg(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,n){Kd.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):super.format(t,n)}},V(_s,"blotName","image"),V(_s,"tagName","IMG"),_s);const Wd=["height","width"];class Ss extends Ot{static create(t){const n=super.create(t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen","true"),n.setAttribute("src",this.sanitize(t)),n}static formats(t){return Wd.reduce((n,r)=>(t.hasAttribute(r)&&(n[r]=t.getAttribute(r)),n),{})}static sanitize(t){return Ln.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,n){Wd.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):super.format(t,n)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}V(Ss,"blotName","video"),V(Ss,"className","ql-video"),V(Ss,"tagName","IFRAME");const hi=new Wt("code-token","hljs",{scope:ee.INLINE});class xn extends cn{static formats(t,n){for(;t!=null&&t!==n.domNode;){if(t.classList&&t.classList.contains(tt.className))return super.formats(t,n);t=t.parentNode}}constructor(t,n,r){super(t,n,r),hi.add(this.domNode,r)}format(t,n){t!==xn.blotName?super.format(t,n):n?hi.add(this.domNode,n):(hi.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),hi.value(this.domNode)||this.unwrap()}}xn.blotName="code-token";xn.className="ql-token";class Ct extends tt{static create(t){const n=super.create(t);return typeof t=="string"&&n.setAttribute("data-language",t),n}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,n){t===this.statics.blotName&&n?this.domNode.setAttribute("data-language",n):super.format(t,n)}replaceWith(t,n){return this.formatAt(0,this.length(),xn.blotName,!1),super.replaceWith(t,n)}}class yi extends ar{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,n){t===Ct.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(t,n)}))}formatAt(t,n,r,i){r===Ct.blotName&&(this.forceNext=!0),super.formatAt(t,n,r,i)}highlight(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const i=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(`
83
+ `),t}function DR(e,t,n){const r=n.query("code-block"),i=r&&"formats"in r&&typeof r.formats=="function"?r.formats(e,n):!0;return gr(t,"code-block",i,n)}function PR(){return new te}function BR(e,t,n){const r=n.query(e);if(r==null||r.blotName!=="list"||!Yi(t,`
84
+ `))return t;let i=-1,s=e.parentNode;for(;s!=null;)["OL","UL"].includes(s.tagName)&&(i+=1),s=s.parentNode;return i<=0?t:t.reduce((a,o)=>o.insert?o.attributes&&typeof o.attributes.indent=="number"?a.push(o):a.insert(o.insert,{indent:i,...o.attributes||{}}):a,new te)}function FR(e,t,n){const r=e;let i=r.tagName==="OL"?"ordered":"bullet";const s=r.getAttribute("data-checked");return s&&(i=s==="true"?"checked":"unchecked"),gr(t,"list",i,n)}function Mf(e,t,n){if(!Yi(t,`
85
+ `)){if(Bn(e,n)&&(e.childNodes.length>0||e instanceof HTMLParagraphElement))return t.insert(`
86
+ `);if(t.length()>0&&e.nextSibling){let r=e.nextSibling;for(;r!=null;){if(Bn(r,n))return t.insert(`
87
+ `);const i=n.query(r);if(i&&i.prototype instanceof Lt)return t.insert(`
88
+ `);r=r.firstChild}}}return t}function $R(e,t,n){var s;const r={},i=e.style||{};return i.fontStyle==="italic"&&(r.italic=!0),i.textDecoration==="underline"&&(r.underline=!0),i.textDecoration==="line-through"&&(r.strike=!0),((s=i.fontWeight)!=null&&s.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(r.bold=!0),t=Object.entries(r).reduce((a,o)=>{let[l,c]=o;return gr(a,l,c,n)},t),parseFloat(i.textIndent||0)>0?new te().insert(" ").concat(t):t}function UR(e,t,n){var i,s;const r=((i=e.parentElement)==null?void 0:i.tagName)==="TABLE"?e.parentElement:(s=e.parentElement)==null?void 0:s.parentElement;if(r!=null){const o=Array.from(r.querySelectorAll("tr")).indexOf(e)+1;return gr(t,"table",o,n)}return t}function qR(e,t,n){var i;let r=e.data;if(((i=e.parentElement)==null?void 0:i.tagName)==="O:P")return t.insert(r.trim());if(!mm(e)){if(r.trim().length===0&&r.includes(`
89
+ `)&&!IR(e,n))return t;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(e.previousSibling==null&&e.parentElement!=null&&Bn(e.parentElement,n)||e.previousSibling instanceof Element&&Bn(e.previousSibling,n))&&(r=r.replace(/^ /,"")),(e.nextSibling==null&&e.parentElement!=null&&Bn(e.parentElement,n)||e.nextSibling instanceof Element&&Bn(e.nextSibling,n))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return t.insert(r)}class bm extends Jt{constructor(n,r){super(n,r);Q(this,"lastRecorded",0);Q(this,"ignoreChange",!1);Q(this,"stack",{undo:[],redo:[]});Q(this,"currentRange",null);this.quill.on(B.events.EDITOR_CHANGE,(i,s,a,o)=>{i===B.events.SELECTION_CHANGE?s&&o!==B.sources.SILENT&&(this.currentRange=s):i===B.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||o===B.sources.USER?this.record(s,a):this.transform(s)),this.currentRange=Hl(this.currentRange,s))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",i=>{i.inputType==="historyUndo"?(this.undo(),i.preventDefault()):i.inputType==="historyRedo"&&(this.redo(),i.preventDefault())})}change(n,r){if(this.stack[n].length===0)return;const i=this.stack[n].pop();if(!i)return;const s=this.quill.getContents(),a=i.delta.invert(s);this.stack[r].push({delta:a,range:Hl(i.range,a)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(i.delta,B.sources.USER),this.ignoreChange=!1,this.restoreSelection(i)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(n,r){if(n.ops.length===0)return;this.stack.redo=[];let i=n.invert(r),s=this.currentRange;const a=Date.now();if(this.lastRecorded+this.options.delay>a&&this.stack.undo.length>0){const o=this.stack.undo.pop();o&&(i=i.compose(o.delta),s=o.range)}else this.lastRecorded=a;i.length()!==0&&(this.stack.undo.push({delta:i,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(n){Df(this.stack.undo,n),Df(this.stack.redo,n)}undo(){this.change("undo","redo")}restoreSelection(n){if(n.range)this.quill.setSelection(n.range,B.sources.USER);else{const r=zR(this.quill.scroll,n.delta);this.quill.setSelection(r,B.sources.USER)}}}Q(bm,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Df(e,t){let n=t;for(let r=e.length-1;r>=0;r-=1){const i=e[r];e[r]={delta:n.transform(i.delta,!0),range:i.range&&Hl(i.range,n)},n=i.delta.transform(n),e[r].delta.length()===0&&e.splice(r,1)}}function jR(e,t){const n=t.ops[t.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(`
90
+ `):n.attributes!=null?Object.keys(n.attributes).some(r=>e.query(r,ne.BLOCK)!=null):!1}function zR(e,t){const n=t.reduce((i,s)=>i+(s.delete||0),0);let r=t.length()-n;return jR(e,t)&&(r-=1),r}function Hl(e,t){if(!e)return e;const n=t.transformPosition(e.index),r=t.transformPosition(e.index+e.length);return{index:n,length:r-n}}class ym extends Jt{constructor(t,n){super(t,n),t.root.addEventListener("drop",r=>{var a;r.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const o=document.caretPositionFromPoint(r.clientX,r.clientY);i=document.createRange(),i.setStart(o.offsetNode,o.offset),i.setEnd(o.offsetNode,o.offset)}const s=i&&t.selection.normalizeNative(i);if(s){const o=t.selection.normalizedToRange(s);(a=r.dataTransfer)!=null&&a.files&&this.upload(o,r.dataTransfer.files)}})}upload(t,n){const r=[];Array.from(n).forEach(i=>{var s;i&&((s=this.options.mimetypes)!=null&&s.includes(i.type))&&r.push(i)}),r.length>0&&this.options.handler.call(this,t,r)}}ym.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(e,t){if(!this.quill.scroll.query("image"))return;const n=t.map(r=>new Promise(i=>{const s=new FileReader;s.onload=()=>{i(s.result)},s.readAsDataURL(r)}));Promise.all(n).then(r=>{const i=r.reduce((s,a)=>s.insert({image:a}),new te().retain(e.index).delete(e.length));this.quill.updateContents(i,ee.sources.USER),this.quill.setSelection(e.index+r.length,ee.sources.SILENT)})}};const HR=["insertText","insertReplacementText"];let GR=class extends Jt{constructor(t,n){super(t,n),t.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||t.on(B.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){Vc({range:t,quill:this.quill})}replaceText(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(n){const r=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new te().retain(t.index).insert(n,r),B.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+n.length,0,B.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!HR.includes(t.inputType))return;const n=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!n||n.collapsed===!0)return;const r=KR(t);if(r==null)return;const i=this.quill.selection.normalizeNative(n),s=i?this.quill.selection.normalizedToRange(i):null;s&&this.replaceText(s,r)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}};function KR(e){var t;return typeof e.data=="string"?e.data:(t=e.dataTransfer)!=null&&t.types.includes("text/plain")?e.dataTransfer.getData("text/plain"):null}const VR=/Mac/i.test(navigator.platform),WR=100,YR=e=>!!(e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="ArrowUp"||e.key==="ArrowDown"||e.key==="Home"||VR&&e.key==="a"&&e.ctrlKey===!0);class ZR extends Jt{constructor(n,r){super(n,r);Q(this,"isListening",!1);Q(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(n,r){let{line:i,event:s}=r;if(!(i instanceof Wt)||!i.uiNode)return!0;const a=getComputedStyle(i.domNode).direction==="rtl";return a&&s.key!=="ArrowRight"||!a&&s.key!=="ArrowLeft"?!0:(this.quill.setSelection(n.index-1,n.length+(s.shiftKey?1:0),B.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",n=>{!n.defaultPrevented&&YR(n)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+WR,this.isListening)return;this.isListening=!0;const n=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",n,{once:!0})}handleSelectionChange(){const n=document.getSelection();if(!n)return;const r=n.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const i=this.quill.scroll.find(r.startContainer);if(!(i instanceof Wt)||!i.uiNode)return;const s=document.createRange();s.setStartAfter(i.uiNode),s.setEndAfter(i.uiNode),n.removeAllRanges(),n.addRange(s)}}B.register({"blots/block":Ke,"blots/block/embed":Lt,"blots/break":Xt,"blots/container":hr,"blots/cursor":zr,"blots/embed":qc,"blots/inline":hn,"blots/scroll":Lr,"blots/text":Yt,"modules/clipboard":gm,"modules/history":bm,"modules/keyboard":Ca,"modules/uploader":ym,"modules/input":GR,"modules/uiNode":ZR});class XR extends Zt{add(t,n){let r=0;if(n==="+1"||n==="-1"){const i=this.value(t)||0;r=n==="+1"?i+1:i-1}else typeof n=="number"&&(r=n);return r===0?(this.remove(t),!0):super.add(t,r.toString())}canAdd(t,n){return super.canAdd(t,n)||super.canAdd(t,parseInt(n,10))}value(t){return parseInt(super.value(t),10)||void 0}}const JR=new XR("indent","ql-indent",{scope:ne.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class Gl extends Ke{}Q(Gl,"blotName","blockquote"),Q(Gl,"tagName","blockquote");class Kl extends Ke{static formats(t){return this.tagName.indexOf(t.tagName)+1}}Q(Kl,"blotName","header"),Q(Kl,"tagName",["H1","H2","H3","H4","H5","H6"]);class Zi extends hr{}Zi.blotName="list-container";Zi.tagName="OL";class Xi extends Ke{static create(t){const n=super.create();return n.setAttribute("data-list",t),n}static formats(t){return t.getAttribute("data-list")||void 0}static register(){B.register(Zi)}constructor(t,n){super(t,n);const r=n.ownerDocument.createElement("span"),i=s=>{if(!t.isEnabled())return;const a=this.statics.formats(n,t);a==="checked"?(this.format("list","unchecked"),s.preventDefault()):a==="unchecked"&&(this.format("list","checked"),s.preventDefault())};r.addEventListener("mousedown",i),r.addEventListener("touchstart",i),this.attachUI(r)}format(t,n){t===this.statics.blotName&&n?this.domNode.setAttribute("data-list",n):super.format(t,n)}}Xi.blotName="list";Xi.tagName="LI";Zi.allowedChildren=[Xi];Xi.requiredContainer=Zi;class ji extends hn{static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}Q(ji,"blotName","bold"),Q(ji,"tagName",["STRONG","B"]);class Vl extends ji{}Q(Vl,"blotName","italic"),Q(Vl,"tagName",["EM","I"]);class Fn extends hn{static create(t){const n=super.create(t);return n.setAttribute("href",this.sanitize(t)),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}static formats(t){return t.getAttribute("href")}static sanitize(t){return xm(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,n){t!==this.statics.blotName||!n?super.format(t,n):this.domNode.setAttribute("href",this.constructor.sanitize(n))}}Q(Fn,"blotName","link"),Q(Fn,"tagName","A"),Q(Fn,"SANITIZED_URL","about:blank"),Q(Fn,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function xm(e,t){const n=document.createElement("a");n.href=e;const r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}class Wl extends hn{static create(t){return t==="super"?document.createElement("sup"):t==="sub"?document.createElement("sub"):super.create(t)}static formats(t){if(t.tagName==="SUB")return"sub";if(t.tagName==="SUP")return"super"}}Q(Wl,"blotName","script"),Q(Wl,"tagName",["SUB","SUP"]);class Yl extends ji{}Q(Yl,"blotName","strike"),Q(Yl,"tagName",["S","STRIKE"]);class Zl extends hn{}Q(Zl,"blotName","underline"),Q(Zl,"tagName","U");class Fs extends qc{static create(t){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const n=super.create(t);return typeof t=="string"&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}Q(Fs,"blotName","formula"),Q(Fs,"className","ql-formula"),Q(Fs,"tagName","SPAN");const Pf=["alt","height","width"];var Ms;let QR=(Ms=class extends Nt{static create(t){const n=super.create(t);return typeof t=="string"&&n.setAttribute("src",this.sanitize(t)),n}static formats(t){return Pf.reduce((n,r)=>(t.hasAttribute(r)&&(n[r]=t.getAttribute(r)),n),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return xm(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,n){Pf.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):super.format(t,n)}},Q(Ms,"blotName","image"),Q(Ms,"tagName","IMG"),Ms);const Bf=["height","width"];class $s extends Lt{static create(t){const n=super.create(t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen","true"),n.setAttribute("src",this.sanitize(t)),n}static formats(t){return Bf.reduce((n,r)=>(t.hasAttribute(r)&&(n[r]=t.getAttribute(r)),n),{})}static sanitize(t){return Fn.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,n){Bf.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):super.format(t,n)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}Q($s,"blotName","video"),Q($s,"className","ql-video"),Q($s,"tagName","IFRAME");const wi=new Zt("code-token","hljs",{scope:ne.INLINE});class kn extends hn{static formats(t,n){for(;t!=null&&t!==n.domNode;){if(t.classList&&t.classList.contains(nt.className))return super.formats(t,n);t=t.parentNode}}constructor(t,n,r){super(t,n,r),wi.add(this.domNode,r)}format(t,n){t!==kn.blotName?super.format(t,n):n?wi.add(this.domNode,n):(wi.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),wi.value(this.domNode)||this.unwrap()}}kn.blotName="code-token";kn.className="ql-token";class Rt extends nt{static create(t){const n=super.create(t);return typeof t=="string"&&n.setAttribute("data-language",t),n}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,n){t===this.statics.blotName&&n?this.domNode.setAttribute("data-language",n):super.format(t,n)}replaceWith(t,n){return this.formatAt(0,this.length(),kn.blotName,!1),super.replaceWith(t,n)}}class Ti extends pr{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,n){t===Rt.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(t,n)}))}formatAt(t,n,r,i){r===Rt.blotName&&(this.forceNext=!0),super.formatAt(t,n,r,i)}highlight(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const i=`${Array.from(this.domNode.childNodes).filter(a=>a!==this.uiNode).map(a=>a.textContent).join(`
75
91
  `)}
76
- `,s=Ct.formats(this.children.head.domNode);if(n||this.forceNext||this.cachedText!==i){if(i.trim().length>0||this.cachedText==null){const o=this.children.reduce((l,c)=>l.concat(sg(c,!1)),new J),a=t(i,s);o.diff(a).reduce((l,c)=>{let{retain:u,attributes:d}=c;return u?(d&&Object.keys(d).forEach(h=>{[Ct.blotName,xn.blotName].includes(h)&&this.formatAt(l,u,h,d[h])}),l+u):l},0)}this.cachedText=i,this.forceNext=!1}}html(t,n){const[r]=this.children.find(t);return`<pre data-language="${r?Ct.formats(r.domNode):"plain"}">
77
- ${ho(this.code(t,n))}
78
- </pre>`}optimize(t){if(super.optimize(t),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const n=Ct.formats(this.children.head.domNode);n!==this.uiNode.value&&(this.uiNode.value=n)}}}yi.allowedChildren=[Ct];Ct.requiredContainer=yi;Ct.allowedChildren=[xn,Pr,Kt,Vt];const bI=(e,t,n)=>{if(typeof e.versionString=="string"){const r=e.versionString.split(".")[0];if(parseInt(r,10)>=11)return e.highlight(n,{language:t}).value}return e.highlight(t,n).value};class kg extends Yt{static register(){D.register(xn,!0),D.register(Ct,!0),D.register(yi,!0)}constructor(t,n){if(super(t,n),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,i)=>{let{key:s}=i;return r[s]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(D.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof yi))return;const n=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:i,label:s}=r;const o=n.ownerDocument.createElement("option");o.textContent=s,o.setAttribute("value",i),n.appendChild(o)}),n.addEventListener("change",()=>{t.format(Ct.blotName,n.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(n),t.children.head&&(n.value=Ct.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(D.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(D.sources.USER);const r=this.quill.getSelection();(t==null?this.quill.scroll.descendants(yi):[t]).forEach(s=>{s.highlight(this.highlightBlot,n)}),this.quill.update(D.sources.SILENT),r!=null&&this.quill.setSelection(r,D.sources.SILENT)}highlightBlot(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(n=this.languages[n]?n:"plain",n==="plain")return ho(t).split(`
79
- `).reduce((i,s,o)=>(o!==0&&i.insert(`
80
- `,{[tt.blotName]:n}),i.insert(s)),new J);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(tt.className),r.innerHTML=bI(this.options.hljs,n,t),vc(this.quill.scroll,r,[(i,s)=>{const o=hi.value(i);return o?s.compose(new J().retain(s.length(),{[xn.blotName]:o})):s}],[(i,s)=>i.data.split(`
81
- `).reduce((o,a,l)=>(l!==0&&o.insert(`
82
- `,{[tt.blotName]:n}),o.insert(a)),s)],new WeakMap)}}kg.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Ei=class Ei extends Ke{static create(t){const n=super.create();return t?n.setAttribute("data-row",t):n.setAttribute("data-row",kc()),n}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,n){t===Ei.blotName&&n?this.domNode.setAttribute("data-row",n):super.format(t,n)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};V(Ei,"blotName","table"),V(Ei,"tagName","TD");let jt=Ei;class En extends or{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats(),n=this.children.tail.formats(),r=this.next.children.head.formats(),i=this.next.children.tail.formats();return t.table===n.table&&t.table===r.table&&t.table===i.table}return!1}optimize(t){super.optimize(t),this.children.forEach(n=>{if(n.next==null)return;const r=n.formats(),i=n.next.formats();if(r.table!==i.table){const s=this.splitAfter(n);s&&s.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}V(En,"blotName","table-row"),V(En,"tagName","TR");class an extends or{}V(an,"blotName","table-body"),V(an,"tagName","TBODY");class Fr extends or{balanceCells(){const t=this.descendants(En),n=t.reduce((r,i)=>Math.max(i.children.length,r),0);t.forEach(r=>{new Array(n-r.children.length).fill(0).forEach(()=>{let i;r.children.head!=null&&(i=jt.formats(r.children.head.domNode));const s=this.scroll.create(jt.blotName,i);r.appendChild(s),s.optimize()})})}cells(t){return this.rows().map(n=>n.children.at(t))}deleteColumn(t){const[n]=this.descendant(an);n==null||n.children.head==null||n.children.forEach(r=>{const i=r.children.at(t);i!=null&&i.remove()})}insertColumn(t){const[n]=this.descendant(an);n==null||n.children.head==null||n.children.forEach(r=>{const i=r.children.at(t),s=jt.formats(r.children.head.domNode),o=this.scroll.create(jt.blotName,s);r.insertBefore(o,i)})}insertRow(t){const[n]=this.descendant(an);if(n==null||n.children.head==null)return;const r=kc(),i=this.scroll.create(En.blotName);n.children.head.children.forEach(()=>{const o=this.scroll.create(jt.blotName,r);i.appendChild(o)});const s=n.children.at(t);n.insertBefore(i,s)}rows(){const t=this.children.head;return t==null?[]:t.children.map(n=>n)}}V(Fr,"blotName","table-container"),V(Fr,"tagName","TABLE");Fr.allowedChildren=[an];an.requiredContainer=Fr;an.allowedChildren=[En];En.requiredContainer=an;En.allowedChildren=[jt];jt.requiredContainer=En;function kc(){return`row-${Math.random().toString(36).slice(2,6)}`}class yI extends Yt{static register(){D.register(jt),D.register(En),D.register(an),D.register(Fr)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Fr).forEach(t=>{t.balanceCells()})}deleteColumn(){const[t,,n]=this.getTable();n!=null&&(t.deleteColumn(n.cellOffset()),this.quill.update(D.sources.USER))}deleteRow(){const[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(D.sources.USER))}deleteTable(){const[t]=this.getTable();if(t==null)return;const n=t.offset();t.remove(),this.quill.update(D.sources.USER),this.quill.setSelection(n,D.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[n,r]=this.quill.getLine(t.index);if(n==null||n.statics.blotName!==jt.blotName)return[null,null,null,-1];const i=n.parent;return[i.parent.parent,i,n,r]}insertColumn(t){const n=this.quill.getSelection();if(!n)return;const[r,i,s]=this.getTable(n);if(s==null)return;const o=s.cellOffset();r.insertColumn(o+t),this.quill.update(D.sources.USER);let a=i.rowOffset();t===0&&(a+=1),this.quill.setSelection(n.index+a,n.length,D.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const n=this.quill.getSelection();if(!n)return;const[r,i,s]=this.getTable(n);if(s==null)return;const o=i.rowOffset();r.insertRow(o+t),this.quill.update(D.sources.USER),t>0?this.quill.setSelection(n,D.sources.SILENT):this.quill.setSelection(n.index+i.children.length,n.length,D.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,n){const r=this.quill.getSelection();if(r==null)return;const i=new Array(t).fill(0).reduce(s=>{const o=new Array(n).fill(`
83
- `).join("");return s.insert(o,{table:kc()})},new J().retain(r.index));this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(r.index,D.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(D.events.SCROLL_OPTIMIZE,t=>{t.some(n=>["TD","TR","TBODY","TABLE"].includes(n.target.tagName)?(this.quill.once(D.events.TEXT_CHANGE,(r,i,s)=>{s===D.sources.USER&&this.balanceTables()}),!0):!1)})}}const Vd=vn("quill:toolbar");class Nc extends Yt{constructor(t,n){var r,i;if(super(t,n),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),xI(s,this.options.container),(i=(r=t.container)==null?void 0:r.parentNode)==null||i.insertBefore(s,t.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Vd.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{var a;const o=(a=this.options.handlers)==null?void 0:a[s];o&&this.addHandler(s,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(D.events.EDITOR_CHANGE,()=>{const[s]=this.quill.selection.getRange();this.update(s)})}addHandler(t,n){this.handlers[t]=n}attach(t){let n=Array.from(t.classList).find(i=>i.indexOf("ql-")===0);if(!n)return;if(n=n.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[n]==null&&this.quill.scroll.query(n)==null){Vd.warn("ignoring attaching to nonexistent format",n,t);return}const r=t.tagName==="SELECT"?"change":"click";t.addEventListener(r,i=>{let s;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const a=t.options[t.selectedIndex];a.hasAttribute("selected")?s=!1:s=a.value||!1}else t.classList.contains("ql-active")?s=!1:s=t.value||!t.hasAttribute("value"),i.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[n]!=null)this.handlers[n].call(this,s);else if(this.quill.scroll.query(n).prototype instanceof _t){if(s=prompt(`Enter ${n}`),!s)return;this.quill.updateContents(new J().retain(o.index).delete(o.length).insert({[n]:s}),D.sources.USER)}else this.quill.format(n,s,D.sources.USER);this.update(o)}),this.controls.push([n,t])}update(t){const n=t==null?{}:this.quill.getFormat(t);this.controls.forEach(r=>{const[i,s]=r;if(s.tagName==="SELECT"){let o=null;if(t==null)o=null;else if(n[i]==null)o=s.querySelector("option[selected]");else if(!Array.isArray(n[i])){let a=n[i];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=s.querySelector(`option[value="${a}"]`)}o==null?(s.value="",s.selectedIndex=-1):o.selected=!0}else if(t==null)s.classList.remove("ql-active"),s.setAttribute("aria-pressed","false");else if(s.hasAttribute("value")){const o=n[i],a=o===s.getAttribute("value")||o!=null&&o.toString()===s.getAttribute("value")||o==null&&!s.getAttribute("value");s.classList.toggle("ql-active",a),s.setAttribute("aria-pressed",a.toString())}else{const o=n[i]!=null;s.classList.toggle("ql-active",o),s.setAttribute("aria-pressed",o.toString())}})}}Nc.DEFAULTS={};function Yd(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),n!=null?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}function xI(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(n=>{const r=document.createElement("span");r.classList.add("ql-formats"),n.forEach(i=>{if(typeof i=="string")Yd(r,i);else{const s=Object.keys(i)[0],o=i[s];Array.isArray(o)?EI(r,s,o):Yd(r,s,o)}}),e.appendChild(r)})}function EI(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach(i=>{const s=document.createElement("option");i!==!1?s.setAttribute("value",String(i)):s.setAttribute("selected","selected"),r.appendChild(s)}),e.appendChild(r)}Nc.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(e!=null)if(e.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(n=>{this.quill.scroll.query(n,ee.INLINE)!=null&&this.quill.format(n,!1,D.sources.USER)})}else this.quill.removeFormat(e.index,e.length,D.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();e==="rtl"&&t==null?this.quill.format("align","right",D.sources.USER):!e&&t==="right"&&this.quill.format("align",!1,D.sources.USER),this.quill.format("direction",e,D.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e==="+1"||e==="-1"){let i=e==="+1"?1:-1;n.direction==="rtl"&&(i*=-1),this.quill.format("indent",r+i,D.sources.USER)}},link(e){e===!0&&(e=prompt("Enter link URL:")),this.quill.format("link",e,D.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);e==="check"?n.list==="checked"||n.list==="unchecked"?this.quill.format("list",!1,D.sources.USER):this.quill.format("list","unchecked",D.sources.USER):this.quill.format("list",e,D.sources.USER)}}};const wI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',_I='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',vI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',kI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',NI='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',AI='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',SI='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',TI='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Zd='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',CI='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',OI='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',II='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',RI='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',LI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',MI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',DI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',PI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',BI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',FI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',qI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',UI='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',$I='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',zI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',jI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',HI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',GI='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',KI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',WI='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',VI='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',YI='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',ZI='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',XI='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',QI='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Ri={align:{"":wI,center:_I,right:vI,justify:kI},background:NI,blockquote:AI,bold:SI,clean:TI,code:Zd,"code-block":Zd,color:CI,direction:{"":OI,rtl:II},formula:RI,header:{1:LI,2:MI,3:DI,4:PI,5:BI,6:FI},italic:qI,image:UI,indent:{"+1":$I,"-1":zI},link:jI,list:{bullet:HI,check:GI,ordered:KI},script:{sub:WI,super:VI},strike:YI,table:ZI,underline:XI,video:QI},JI='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let Xd=0;function Qd(e,t){e.setAttribute(t,`${e.getAttribute(t)!=="true"}`)}class go{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),n.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Qd(this.label,"aria-expanded"),Qd(this.options,"aria-hidden")}buildItem(t){const n=document.createElement("span");n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&n.setAttribute("data-value",r),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",()=>{this.selectItem(n,!0)}),n.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(n,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),n}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=JI,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${Xd}`,Xd+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(n=>{const r=this.buildItem(n);t.appendChild(r),n.selected===!0&&this.selectItem(r)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");t!==r&&(r!=null&&r.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),n&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const n=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}class Ng extends go{constructor(t,n){super(t),this.label.innerHTML=n,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(t){const n=super.buildItem(t);return n.style.backgroundColor=t.getAttribute("value")||"",n}selectItem(t,n){super.selectItem(t,n);const r=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=i:r.style.fill=i)}}class Ag extends go{constructor(t,n){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=n[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,n){super.selectItem(t,n);const r=t||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const eR=e=>{const{overflowY:t}=getComputedStyle(e,null);return t!=="visible"&&t!=="clip"};class Sg{constructor(t,n){this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,eR(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const n=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${n}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),s=this.root.getBoundingClientRect();let o=0;if(s.right>i.right&&(o=i.right-s.right,this.root.style.left=`${n+o}px`),s.left<i.left&&(o=i.left-s.left,this.root.style.left=`${n+o}px`),s.bottom>i.bottom){const a=s.bottom-s.top,l=t.bottom-t.top+a;this.root.style.top=`${r-l}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const tR=[!1,"center","right","justify"],nR=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],rR=[!1,"serif","monospace"],iR=["1","2","3",!1],sR=["small",!1,"large","huge"];class $i extends Br{constructor(t,n){super(t,n);const r=i=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(s=>{s.container.contains(i.target)||s.close()})};t.emitter.listenDOM("click",document.body,r)}addModule(t){const n=super.addModule(t);return t==="toolbar"&&this.extendToolbar(n),n}buildButtons(t,n){Array.from(t).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(s=>{if(s.startsWith("ql-")&&(s=s.slice(3),n[s]!=null))if(s==="direction")r.innerHTML=n[s][""]+n[s].rtl;else if(typeof n[s]=="string")r.innerHTML=n[s];else{const o=r.value||"";o!=null&&n[s][o]&&(r.innerHTML=n[s][o])}})})}buildPickers(t,n){this.pickers=Array.from(t).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&ci(i,tR),typeof n.align=="object"))return new Ag(i,n.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const s=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&ci(i,nR,s==="background"?"#ffffff":"#000000"),new Ng(i,n[s])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?ci(i,rR):i.classList.contains("ql-header")?ci(i,iR):i.classList.contains("ql-size")&&ci(i,sR)),new go(i)});const r=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(Z.events.EDITOR_CHANGE,r)}}$i.DEFAULTS=Mn({},Br.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");e==null&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Tg extends Sg{constructor(t,n){super(t,n),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;n!=null?this.textbox.value=n:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:n}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,Z.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,Z.sources.USER)),this.quill.root.scrollTop=n;break}case"video":t=oR(t);case"formula":{if(!t)break;const n=this.quill.getSelection(!0);if(n!=null){const r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,Z.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",Z.sources.USER),this.quill.setSelection(r+2,Z.sources.USER)}break}}this.textbox.value="",this.hide()}}function oR(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:e}function ci(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(r=>{const i=document.createElement("option");r===n?i.setAttribute("selected","selected"):i.setAttribute("value",String(r)),e.appendChild(i)})}const aR=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Cg extends Tg{constructor(t,n){super(t,n),this.quill.on(Z.events.EDITOR_CHANGE,(r,i,s,o)=>{if(r===Z.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&o===Z.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const a=this.quill.getLines(i.index,i.length);if(a.length===1){const l=this.quill.getBounds(i);l!=null&&this.position(l)}else{const l=a[a.length-1],c=this.quill.getIndex(l),u=Math.min(l.length()-1,i.index+i.length-c),d=this.quill.getBounds(new Qn(c,u));d!=null&&this.position(d)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Z.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const n=this.quill.getBounds(t);n!=null&&this.position(n)}},1)})}cancel(){this.show()}position(t){const n=super.position(t),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",n!==0&&(r.style.marginLeft=`${-1*n-r.offsetWidth/2}px`),n}}V(Cg,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class Og extends $i{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=aR),super(t,n),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new Cg(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),Ri),this.buildPickers(t.container.querySelectorAll("select"),Ri))}}Og.DEFAULTS=Mn({},$i.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,D.sources.USER)}}}}});const lR=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Ig extends Tg{constructor(){super(...arguments);V(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",n=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),n.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",n=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,Z.sources.USER),delete this.linkRange}n.preventDefault(),this.hide()}),this.quill.on(Z.events.SELECTION_CHANGE,(n,r,i)=>{if(n!=null){if(n.length===0&&i===Z.sources.USER){const[s,o]=this.quill.scroll.descendant(Ln,n.index);if(s!=null){this.linkRange=new Qn(n.index-o,s.length());const a=Ln.formats(s.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const l=this.quill.getBounds(this.linkRange);l!=null&&this.position(l);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}V(Ig,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class Rg extends $i{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=lR),super(t,n),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),Ri),this.buildPickers(t.container.querySelectorAll("select"),Ri),this.tooltip=new Ig(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(n,r)=>{t.handlers.link.call(t,!r.format.link)}))}}Rg.DEFAULTS=Mn({},$i.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const t=this.quill.getSelection();if(t==null||t.length===0)return;let n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&n.indexOf("mailto:")!==0&&(n=`mailto:${n}`);const{tooltip:r}=this.quill.theme;r.edit("link",n)}else this.quill.format("link",!1,D.sources.USER)}}}}});D.register({"attributors/attribute/direction":dg,"attributors/class/align":lg,"attributors/class/background":NO,"attributors/class/color":kO,"attributors/class/direction":fg,"attributors/class/font":gg,"attributors/class/size":bg,"attributors/style/align":cg,"attributors/style/background":xc,"attributors/style/color":yc,"attributors/style/direction":hg,"attributors/style/font":mg,"attributors/style/size":yg},!0);D.register({"formats/align":lg,"formats/direction":fg,"formats/indent":gI,"formats/background":xc,"formats/color":yc,"formats/font":gg,"formats/size":bg,"formats/blockquote":wl,"formats/code-block":tt,"formats/header":_l,"formats/list":Ui,"formats/bold":Ii,"formats/code":Ec,"formats/italic":vl,"formats/link":Ln,"formats/script":kl,"formats/strike":Nl,"formats/underline":Al,"formats/formula":As,"formats/image":mI,"formats/video":Ss,"modules/syntax":kg,"modules/table":yI,"modules/toolbar":Nc,"themes/bubble":Og,"themes/snow":Rg,"ui/icons":Ri,"ui/picker":go,"ui/icon-picker":Ag,"ui/color-picker":Ng,"ui/tooltip":Sg},!0);class mo extends q.Component{constructor(t){super(t),this.editingAreaRef=q.createRef(),this.containerRef=q.createRef(),this.dirtyProps=["modules","formats","bounds","theme","children"],this.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],this.state={generation:0},this.selection=null,this.onEditorChange=(r,i,s,o)=>{var a,l;r==="text-change"?(a=this.onEditorChangeText)==null||a.call(this,this.editor.getSemanticHTML(),i,o,this.unprivilegedEditor):r==="selection-change"&&((l=this.onEditorChangeSelection)==null||l.call(this,i,o,this.unprivilegedEditor))};const n=this.isControlled()?t.value:t.defaultValue;this.value=n??""}validateProps(t){if(q.Children.count(t.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(q.Children.count(t.children)){const n=q.Children.only(t.children);if((n==null?void 0:n.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&t.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")}shouldComponentUpdate(t,n){if(this.validateProps(t),!this.editor||this.state.generation!==n.generation)return!0;if("value"in t){const r=this.getEditorContents(),i=t.value??"";this.isEqualValue(i,r)||this.setEditorContents(this.editor,i)}return t.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,t.readOnly),[...this.cleanProps,...this.dirtyProps].some(r=>!On(t[r],this.props[r]))}shouldComponentRegenerate(t){return this.dirtyProps.some(n=>!On(t[n],this.props[n]))}componentDidMount(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())}componentWillUnmount(){this.destroyEditor()}componentDidUpdate(t,n){if(this.editor&&this.shouldComponentRegenerate(t)){const r=this.editor.getContents(),i=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:i},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.editor&&t.placeholder!==this.props.placeholder&&(this.editor.root.dataset.placeholder=this.props.placeholder||""),this.state.generation!==n.generation){const{delta:r,selection:i}=this.regenerationSnapshot;delete this.regenerationSnapshot,this.instantiateEditor();const s=this.editor;s.setContents(r),Jd(()=>this.setEditorSelection(s,i))}}instantiateEditor(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())}destroyEditor(){var r,i;if(!this.editor)return;this.unhookEditor(this.editor);const t=(r=this.props.modules)==null?void 0:r.toolbar;if(!(typeof t=="object"&&t&&"container"in t&&typeof t.container=="string"||typeof t=="string")){const s=(i=this.containerRef.current)==null?void 0:i.querySelector(".ql-toolbar");s&&s.remove()}delete this.editor}isControlled(){return"value"in this.props}getEditorConfig(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,tabIndex:this.props.tabIndex,theme:this.props.theme}}getEditor(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor}createEditor(t,n){const r=new D(t,n);return n.tabIndex!=null&&this.setEditorTabIndex(r,n.tabIndex),this.hookEditor(r),r}hookEditor(t){this.unprivilegedEditor=this.makeUnprivilegedEditor(t),t.on("editor-change",this.onEditorChange)}unhookEditor(t){t.off("editor-change",this.onEditorChange)}getEditorContents(){return this.value}getEditorSelection(){return this.selection}isDelta(t){return t&&t.ops}isEqualValue(t,n){return this.isDelta(t)&&this.isDelta(n)?On(t.ops,n.ops):On(t,n)}setEditorContents(t,n){this.value=n;const r=this.getEditorSelection();typeof n=="string"?t.setContents(t.clipboard.convert({html:n})):t.setContents(n),Jd(()=>this.setEditorSelection(t,r))}setEditorSelection(t,n){if(this.selection=n,n){const r=t.getLength();n.index=Math.max(0,Math.min(n.index,r-1)),n.length=Math.max(0,Math.min(n.length,r-1-n.index)),t.setSelection(n)}}setEditorTabIndex(t,n){var r;(r=t==null?void 0:t.scroll)!=null&&r.domNode&&(t.scroll.domNode.tabIndex=n)}setEditorReadOnly(t,n){n?t.disable():t.enable()}makeUnprivilegedEditor(t){const n=t;return{getHTML:()=>n.root.innerHTML,getSemanticHTML:n.getSemanticHTML.bind(n),getLength:n.getLength.bind(n),getText:n.getText.bind(n),getContents:n.getContents.bind(n),getSelection:n.getSelection.bind(n),getBounds:n.getBounds.bind(n)}}getEditingArea(){const t=this.editingAreaRef.current;if(!t)throw new Error("Cannot find element for editing area");if(t.nodeType===3)throw new Error("Editing area cannot be a text node");return t}renderEditingArea(){const{children:t,preserveWhitespace:n}=this.props,{generation:r}=this.state,i={key:r,ref:this.editingAreaRef};return q.Children.count(t)?q.cloneElement(q.Children.only(t),i):n?q.createElement("pre",{...i}):q.createElement("div",{...i})}render(){return q.createElement("div",{ref:this.containerRef,id:this.props.id,style:this.props.style,key:this.state.generation,className:`quill ${this.props.className??""}`,onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())}onEditorChangeText(t,n,r,i){var o,a;if(!this.editor)return;const s=this.isDelta(this.value)?i.getContents():i.getSemanticHTML();s!==this.getEditorContents()&&(this.lastDeltaChangeSet=n,this.value=s,(a=(o=this.props).onChange)==null||a.call(o,t,n,r,i))}onEditorChangeSelection(t,n,r){var a,l,c,u,d,h;if(!this.editor)return;const i=this.getEditorSelection(),s=!i&&t,o=i&&!t;On(t,i)||(this.selection=t,(l=(a=this.props).onChangeSelection)==null||l.call(a,t,n,r),s?(u=(c=this.props).onFocus)==null||u.call(c,t,n,r):o&&((h=(d=this.props).onBlur)==null||h.call(d,i,n,r)))}focus(){this.editor&&this.editor.focus()}blur(){this.editor&&(this.selection=null,this.editor.blur())}}mo.displayName="React Quill";mo.Quill=D;mo.defaultProps={theme:"snow",modules:{},readOnly:!1};function Jd(e){Promise.resolve().then(e)}function Lg({value:e,onChange:t,placeholder:n="Write your content...",error:r}){const i=q.useRef(null),s=q.useMemo(()=>({toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]}],[{align:[]}],["link","image","video"],["blockquote","code-block"],["clean"]]}),[]),o=q.useMemo(()=>["header","bold","italic","underline","strike","list","bullet","color","background","align","link","image","video","blockquote","code-block"],[]);return E.jsxs("div",{className:`quill-editor-wrapper rounded-md border ${r?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"}`,children:[E.jsx("style",{children:`
92
+ `,s=Rt.formats(this.children.head.domNode);if(n||this.forceNext||this.cachedText!==i){if(i.trim().length>0||this.cachedText==null){const a=this.children.reduce((l,c)=>l.concat(tm(c,!1)),new te),o=t(i,s);a.diff(o).reduce((l,c)=>{let{retain:u,attributes:d}=c;return u?(d&&Object.keys(d).forEach(h=>{[Rt.blotName,kn.blotName].includes(h)&&this.formatAt(l,u,h,d[h])}),l+u):l},0)}this.cachedText=i,this.forceNext=!1}}html(t,n){const[r]=this.children.find(t);return`<pre data-language="${r?Rt.formats(r.domNode):"plain"}">
93
+ ${Ta(this.code(t,n))}
94
+ </pre>`}optimize(t){if(super.optimize(t),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const n=Rt.formats(this.children.head.domNode);n!==this.uiNode.value&&(this.uiNode.value=n)}}}Ti.allowedChildren=[Rt];Rt.requiredContainer=Ti;Rt.allowedChildren=[kn,zr,Yt,Xt];const eL=(e,t,n)=>{if(typeof e.versionString=="string"){const r=e.versionString.split(".")[0];if(parseInt(r,10)>=11)return e.highlight(n,{language:t}).value}return e.highlight(t,n).value};class Em extends Jt{static register(){B.register(kn,!0),B.register(Rt,!0),B.register(Ti,!0)}constructor(t,n){if(super(t,n),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,i)=>{let{key:s}=i;return r[s]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(B.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof Ti))return;const n=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:i,label:s}=r;const a=n.ownerDocument.createElement("option");a.textContent=s,a.setAttribute("value",i),n.appendChild(a)}),n.addEventListener("change",()=>{t.format(Rt.blotName,n.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(n),t.children.head&&(n.value=Rt.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(B.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(B.sources.USER);const r=this.quill.getSelection();(t==null?this.quill.scroll.descendants(Ti):[t]).forEach(s=>{s.highlight(this.highlightBlot,n)}),this.quill.update(B.sources.SILENT),r!=null&&this.quill.setSelection(r,B.sources.SILENT)}highlightBlot(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(n=this.languages[n]?n:"plain",n==="plain")return Ta(t).split(`
95
+ `).reduce((i,s,a)=>(a!==0&&i.insert(`
96
+ `,{[nt.blotName]:n}),i.insert(s)),new te);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(nt.className),r.innerHTML=eL(this.options.hljs,n,t),Wc(this.quill.scroll,r,[(i,s)=>{const a=wi.value(i);return a?s.compose(new te().retain(s.length(),{[kn.blotName]:a})):s}],[(i,s)=>i.data.split(`
97
+ `).reduce((a,o,l)=>(l!==0&&a.insert(`
98
+ `,{[nt.blotName]:n}),a.insert(o)),s)],new WeakMap)}}Em.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Oi=class Oi extends Ke{static create(t){const n=super.create();return t?n.setAttribute("data-row",t):n.setAttribute("data-row",Yc()),n}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,n){t===Oi.blotName&&n?this.domNode.setAttribute("data-row",n):super.format(t,n)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};Q(Oi,"blotName","table"),Q(Oi,"tagName","TD");let Kt=Oi;class Nn extends hr{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats(),n=this.children.tail.formats(),r=this.next.children.head.formats(),i=this.next.children.tail.formats();return t.table===n.table&&t.table===r.table&&t.table===i.table}return!1}optimize(t){super.optimize(t),this.children.forEach(n=>{if(n.next==null)return;const r=n.formats(),i=n.next.formats();if(r.table!==i.table){const s=this.splitAfter(n);s&&s.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}Q(Nn,"blotName","table-row"),Q(Nn,"tagName","TR");class dn extends hr{}Q(dn,"blotName","table-body"),Q(dn,"tagName","TBODY");class Gr extends hr{balanceCells(){const t=this.descendants(Nn),n=t.reduce((r,i)=>Math.max(i.children.length,r),0);t.forEach(r=>{new Array(n-r.children.length).fill(0).forEach(()=>{let i;r.children.head!=null&&(i=Kt.formats(r.children.head.domNode));const s=this.scroll.create(Kt.blotName,i);r.appendChild(s),s.optimize()})})}cells(t){return this.rows().map(n=>n.children.at(t))}deleteColumn(t){const[n]=this.descendant(dn);n==null||n.children.head==null||n.children.forEach(r=>{const i=r.children.at(t);i!=null&&i.remove()})}insertColumn(t){const[n]=this.descendant(dn);n==null||n.children.head==null||n.children.forEach(r=>{const i=r.children.at(t),s=Kt.formats(r.children.head.domNode),a=this.scroll.create(Kt.blotName,s);r.insertBefore(a,i)})}insertRow(t){const[n]=this.descendant(dn);if(n==null||n.children.head==null)return;const r=Yc(),i=this.scroll.create(Nn.blotName);n.children.head.children.forEach(()=>{const a=this.scroll.create(Kt.blotName,r);i.appendChild(a)});const s=n.children.at(t);n.insertBefore(i,s)}rows(){const t=this.children.head;return t==null?[]:t.children.map(n=>n)}}Q(Gr,"blotName","table-container"),Q(Gr,"tagName","TABLE");Gr.allowedChildren=[dn];dn.requiredContainer=Gr;dn.allowedChildren=[Nn];Nn.requiredContainer=dn;Nn.allowedChildren=[Kt];Kt.requiredContainer=Nn;function Yc(){return`row-${Math.random().toString(36).slice(2,6)}`}class tL extends Jt{static register(){B.register(Kt),B.register(Nn),B.register(dn),B.register(Gr)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Gr).forEach(t=>{t.balanceCells()})}deleteColumn(){const[t,,n]=this.getTable();n!=null&&(t.deleteColumn(n.cellOffset()),this.quill.update(B.sources.USER))}deleteRow(){const[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(B.sources.USER))}deleteTable(){const[t]=this.getTable();if(t==null)return;const n=t.offset();t.remove(),this.quill.update(B.sources.USER),this.quill.setSelection(n,B.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[n,r]=this.quill.getLine(t.index);if(n==null||n.statics.blotName!==Kt.blotName)return[null,null,null,-1];const i=n.parent;return[i.parent.parent,i,n,r]}insertColumn(t){const n=this.quill.getSelection();if(!n)return;const[r,i,s]=this.getTable(n);if(s==null)return;const a=s.cellOffset();r.insertColumn(a+t),this.quill.update(B.sources.USER);let o=i.rowOffset();t===0&&(o+=1),this.quill.setSelection(n.index+o,n.length,B.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const n=this.quill.getSelection();if(!n)return;const[r,i,s]=this.getTable(n);if(s==null)return;const a=i.rowOffset();r.insertRow(a+t),this.quill.update(B.sources.USER),t>0?this.quill.setSelection(n,B.sources.SILENT):this.quill.setSelection(n.index+i.children.length,n.length,B.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,n){const r=this.quill.getSelection();if(r==null)return;const i=new Array(t).fill(0).reduce(s=>{const a=new Array(n).fill(`
99
+ `).join("");return s.insert(a,{table:Yc()})},new te().retain(r.index));this.quill.updateContents(i,B.sources.USER),this.quill.setSelection(r.index,B.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(B.events.SCROLL_OPTIMIZE,t=>{t.some(n=>["TD","TR","TBODY","TABLE"].includes(n.target.tagName)?(this.quill.once(B.events.TEXT_CHANGE,(r,i,s)=>{s===B.sources.USER&&this.balanceTables()}),!0):!1)})}}const Ff=Tn("quill:toolbar");class Zc extends Jt{constructor(t,n){var r,i;if(super(t,n),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),nL(s,this.options.container),(i=(r=t.container)==null?void 0:r.parentNode)==null||i.insertBefore(s,t.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Ff.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{var o;const a=(o=this.options.handlers)==null?void 0:o[s];a&&this.addHandler(s,a)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(B.events.EDITOR_CHANGE,()=>{const[s]=this.quill.selection.getRange();this.update(s)})}addHandler(t,n){this.handlers[t]=n}attach(t){let n=Array.from(t.classList).find(i=>i.indexOf("ql-")===0);if(!n)return;if(n=n.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[n]==null&&this.quill.scroll.query(n)==null){Ff.warn("ignoring attaching to nonexistent format",n,t);return}const r=t.tagName==="SELECT"?"change":"click";t.addEventListener(r,i=>{let s;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const o=t.options[t.selectedIndex];o.hasAttribute("selected")?s=!1:s=o.value||!1}else t.classList.contains("ql-active")?s=!1:s=t.value||!t.hasAttribute("value"),i.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(this.handlers[n]!=null)this.handlers[n].call(this,s);else if(this.quill.scroll.query(n).prototype instanceof Nt){if(s=prompt(`Enter ${n}`),!s)return;this.quill.updateContents(new te().retain(a.index).delete(a.length).insert({[n]:s}),B.sources.USER)}else this.quill.format(n,s,B.sources.USER);this.update(a)}),this.controls.push([n,t])}update(t){const n=t==null?{}:this.quill.getFormat(t);this.controls.forEach(r=>{const[i,s]=r;if(s.tagName==="SELECT"){let a=null;if(t==null)a=null;else if(n[i]==null)a=s.querySelector("option[selected]");else if(!Array.isArray(n[i])){let o=n[i];typeof o=="string"&&(o=o.replace(/"/g,'\\"')),a=s.querySelector(`option[value="${o}"]`)}a==null?(s.value="",s.selectedIndex=-1):a.selected=!0}else if(t==null)s.classList.remove("ql-active"),s.setAttribute("aria-pressed","false");else if(s.hasAttribute("value")){const a=n[i],o=a===s.getAttribute("value")||a!=null&&a.toString()===s.getAttribute("value")||a==null&&!s.getAttribute("value");s.classList.toggle("ql-active",o),s.setAttribute("aria-pressed",o.toString())}else{const a=n[i]!=null;s.classList.toggle("ql-active",a),s.setAttribute("aria-pressed",a.toString())}})}}Zc.DEFAULTS={};function $f(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),n!=null?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}function nL(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(n=>{const r=document.createElement("span");r.classList.add("ql-formats"),n.forEach(i=>{if(typeof i=="string")$f(r,i);else{const s=Object.keys(i)[0],a=i[s];Array.isArray(a)?rL(r,s,a):$f(r,s,a)}}),e.appendChild(r)})}function rL(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach(i=>{const s=document.createElement("option");i!==!1?s.setAttribute("value",String(i)):s.setAttribute("selected","selected"),r.appendChild(s)}),e.appendChild(r)}Zc.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(e!=null)if(e.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(n=>{this.quill.scroll.query(n,ne.INLINE)!=null&&this.quill.format(n,!1,B.sources.USER)})}else this.quill.removeFormat(e.index,e.length,B.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();e==="rtl"&&t==null?this.quill.format("align","right",B.sources.USER):!e&&t==="right"&&this.quill.format("align",!1,B.sources.USER),this.quill.format("direction",e,B.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e==="+1"||e==="-1"){let i=e==="+1"?1:-1;n.direction==="rtl"&&(i*=-1),this.quill.format("indent",r+i,B.sources.USER)}},link(e){e===!0&&(e=prompt("Enter link URL:")),this.quill.format("link",e,B.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);e==="check"?n.list==="checked"||n.list==="unchecked"?this.quill.format("list",!1,B.sources.USER):this.quill.format("list","unchecked",B.sources.USER):this.quill.format("list",e,B.sources.USER)}}};const iL='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',sL='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',aL='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',oL='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',lL='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',cL='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',uL='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',dL='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Uf='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',fL='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',hL='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',pL='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',gL='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',mL='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',bL='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',yL='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',xL='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',EL='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',wL='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',vL='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',_L='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',kL='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',NL='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',SL='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',AL='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',TL='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',CL='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',OL='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',IL='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',RL='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',LL='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',ML='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',DL='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',zi={align:{"":iL,center:sL,right:aL,justify:oL},background:lL,blockquote:cL,bold:uL,clean:dL,code:Uf,"code-block":Uf,color:fL,direction:{"":hL,rtl:pL},formula:gL,header:{1:mL,2:bL,3:yL,4:xL,5:EL,6:wL},italic:vL,image:_L,indent:{"+1":kL,"-1":NL},link:SL,list:{bullet:AL,check:TL,ordered:CL},script:{sub:OL,super:IL},strike:RL,table:LL,underline:ML,video:DL},PL='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let qf=0;function jf(e,t){e.setAttribute(t,`${e.getAttribute(t)!=="true"}`)}class Oa{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),n.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),jf(this.label,"aria-expanded"),jf(this.options,"aria-hidden")}buildItem(t){const n=document.createElement("span");n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&n.setAttribute("data-value",r),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",()=>{this.selectItem(n,!0)}),n.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(n,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),n}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=PL,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${qf}`,qf+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(n=>{const r=this.buildItem(n);t.appendChild(r),n.selected===!0&&this.selectItem(r)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");t!==r&&(r!=null&&r.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),n&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const n=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}class wm extends Oa{constructor(t,n){super(t),this.label.innerHTML=n,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(t){const n=super.buildItem(t);return n.style.backgroundColor=t.getAttribute("value")||"",n}selectItem(t,n){super.selectItem(t,n);const r=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=i:r.style.fill=i)}}class vm extends Oa{constructor(t,n){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=n[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,n){super.selectItem(t,n);const r=t||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const BL=e=>{const{overflowY:t}=getComputedStyle(e,null);return t!=="visible"&&t!=="clip"};class _m{constructor(t,n){this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,BL(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const n=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${n}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),s=this.root.getBoundingClientRect();let a=0;if(s.right>i.right&&(a=i.right-s.right,this.root.style.left=`${n+a}px`),s.left<i.left&&(a=i.left-s.left,this.root.style.left=`${n+a}px`),s.bottom>i.bottom){const o=s.bottom-s.top,l=t.bottom-t.top+o;this.root.style.top=`${r-l}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const FL=[!1,"center","right","justify"],$L=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],UL=[!1,"serif","monospace"],qL=["1","2","3",!1],jL=["small",!1,"large","huge"];class Ji extends Hr{constructor(t,n){super(t,n);const r=i=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(s=>{s.container.contains(i.target)||s.close()})};t.emitter.listenDOM("click",document.body,r)}addModule(t){const n=super.addModule(t);return t==="toolbar"&&this.extendToolbar(n),n}buildButtons(t,n){Array.from(t).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(s=>{if(s.startsWith("ql-")&&(s=s.slice(3),n[s]!=null))if(s==="direction")r.innerHTML=n[s][""]+n[s].rtl;else if(typeof n[s]=="string")r.innerHTML=n[s];else{const a=r.value||"";a!=null&&n[s][a]&&(r.innerHTML=n[s][a])}})})}buildPickers(t,n){this.pickers=Array.from(t).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&bi(i,FL),typeof n.align=="object"))return new vm(i,n.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const s=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&bi(i,$L,s==="background"?"#ffffff":"#000000"),new wm(i,n[s])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?bi(i,UL):i.classList.contains("ql-header")?bi(i,qL):i.classList.contains("ql-size")&&bi(i,jL)),new Oa(i)});const r=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(ee.events.EDITOR_CHANGE,r)}}Ji.DEFAULTS=$n({},Hr.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");e==null&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class km extends _m{constructor(t,n){super(t,n),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;n!=null?this.textbox.value=n:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:n}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,ee.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,ee.sources.USER)),this.quill.root.scrollTop=n;break}case"video":t=zL(t);case"formula":{if(!t)break;const n=this.quill.getSelection(!0);if(n!=null){const r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,ee.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",ee.sources.USER),this.quill.setSelection(r+2,ee.sources.USER)}break}}this.textbox.value="",this.hide()}}function zL(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:e}function bi(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(r=>{const i=document.createElement("option");r===n?i.setAttribute("selected","selected"):i.setAttribute("value",String(r)),e.appendChild(i)})}const HL=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Nm extends km{constructor(t,n){super(t,n),this.quill.on(ee.events.EDITOR_CHANGE,(r,i,s,a)=>{if(r===ee.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&a===ee.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const o=this.quill.getLines(i.index,i.length);if(o.length===1){const l=this.quill.getBounds(i);l!=null&&this.position(l)}else{const l=o[o.length-1],c=this.quill.getIndex(l),u=Math.min(l.length()-1,i.index+i.length-c),d=this.quill.getBounds(new sr(c,u));d!=null&&this.position(d)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(ee.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const n=this.quill.getBounds(t);n!=null&&this.position(n)}},1)})}cancel(){this.show()}position(t){const n=super.position(t),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",n!==0&&(r.style.marginLeft=`${-1*n-r.offsetWidth/2}px`),n}}Q(Nm,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class Sm extends Ji{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=HL),super(t,n),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new Nm(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),zi),this.buildPickers(t.container.querySelectorAll("select"),zi))}}Sm.DEFAULTS=$n({},Ji.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,B.sources.USER)}}}}});const GL=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Am extends km{constructor(){super(...arguments);Q(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",n=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),n.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",n=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,ee.sources.USER),delete this.linkRange}n.preventDefault(),this.hide()}),this.quill.on(ee.events.SELECTION_CHANGE,(n,r,i)=>{if(n!=null){if(n.length===0&&i===ee.sources.USER){const[s,a]=this.quill.scroll.descendant(Fn,n.index);if(s!=null){this.linkRange=new sr(n.index-a,s.length());const o=Fn.formats(s.domNode);this.preview.textContent=o,this.preview.setAttribute("href",o),this.show();const l=this.quill.getBounds(this.linkRange);l!=null&&this.position(l);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}Q(Am,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class Tm extends Ji{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=GL),super(t,n),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),zi),this.buildPickers(t.container.querySelectorAll("select"),zi),this.tooltip=new Am(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(n,r)=>{t.handlers.link.call(t,!r.format.link)}))}}Tm.DEFAULTS=$n({},Ji.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const t=this.quill.getSelection();if(t==null||t.length===0)return;let n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&n.indexOf("mailto:")!==0&&(n=`mailto:${n}`);const{tooltip:r}=this.quill.theme;r.edit("link",n)}else this.quill.format("link",!1,B.sources.USER)}}}}});B.register({"attributors/attribute/direction":om,"attributors/class/align":im,"attributors/class/background":lR,"attributors/class/color":oR,"attributors/class/direction":lm,"attributors/class/font":dm,"attributors/class/size":hm,"attributors/style/align":sm,"attributors/style/background":Hc,"attributors/style/color":zc,"attributors/style/direction":cm,"attributors/style/font":fm,"attributors/style/size":pm},!0);B.register({"formats/align":im,"formats/direction":lm,"formats/indent":JR,"formats/background":Hc,"formats/color":zc,"formats/font":dm,"formats/size":hm,"formats/blockquote":Gl,"formats/code-block":nt,"formats/header":Kl,"formats/list":Xi,"formats/bold":ji,"formats/code":Gc,"formats/italic":Vl,"formats/link":Fn,"formats/script":Wl,"formats/strike":Yl,"formats/underline":Zl,"formats/formula":Fs,"formats/image":QR,"formats/video":$s,"modules/syntax":Em,"modules/table":tL,"modules/toolbar":Zc,"themes/bubble":Sm,"themes/snow":Tm,"ui/icons":zi,"ui/picker":Oa,"ui/icon-picker":vm,"ui/color-picker":wm,"ui/tooltip":_m},!0);class Ia extends $.Component{constructor(t){super(t),this.editingAreaRef=$.createRef(),this.containerRef=$.createRef(),this.dirtyProps=["modules","formats","bounds","theme","children"],this.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],this.state={generation:0},this.selection=null,this.onEditorChange=(r,i,s,a)=>{var o,l;r==="text-change"?(o=this.onEditorChangeText)==null||o.call(this,this.editor.getSemanticHTML(),i,a,this.unprivilegedEditor):r==="selection-change"&&((l=this.onEditorChangeSelection)==null||l.call(this,i,a,this.unprivilegedEditor))};const n=this.isControlled()?t.value:t.defaultValue;this.value=n??""}validateProps(t){if($.Children.count(t.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if($.Children.count(t.children)){const n=$.Children.only(t.children);if((n==null?void 0:n.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&t.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")}shouldComponentUpdate(t,n){if(this.validateProps(t),!this.editor||this.state.generation!==n.generation)return!0;if("value"in t){const r=this.getEditorContents(),i=t.value??"";this.isEqualValue(i,r)||this.setEditorContents(this.editor,i)}return t.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,t.readOnly),[...this.cleanProps,...this.dirtyProps].some(r=>!Dn(t[r],this.props[r]))}shouldComponentRegenerate(t){return this.dirtyProps.some(n=>!Dn(t[n],this.props[n]))}componentDidMount(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())}componentWillUnmount(){this.destroyEditor()}componentDidUpdate(t,n){if(this.editor&&this.shouldComponentRegenerate(t)){const r=this.editor.getContents(),i=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:i},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.editor&&t.placeholder!==this.props.placeholder&&(this.editor.root.dataset.placeholder=this.props.placeholder||""),this.state.generation!==n.generation){const{delta:r,selection:i}=this.regenerationSnapshot;delete this.regenerationSnapshot,this.instantiateEditor();const s=this.editor;s.setContents(r),zf(()=>this.setEditorSelection(s,i))}}instantiateEditor(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())}destroyEditor(){var r,i;if(!this.editor)return;this.unhookEditor(this.editor);const t=(r=this.props.modules)==null?void 0:r.toolbar;if(!(typeof t=="object"&&t&&"container"in t&&typeof t.container=="string"||typeof t=="string")){const s=(i=this.containerRef.current)==null?void 0:i.querySelector(".ql-toolbar");s&&s.remove()}delete this.editor}isControlled(){return"value"in this.props}getEditorConfig(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,tabIndex:this.props.tabIndex,theme:this.props.theme}}getEditor(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor}createEditor(t,n){const r=new B(t,n);return n.tabIndex!=null&&this.setEditorTabIndex(r,n.tabIndex),this.hookEditor(r),r}hookEditor(t){this.unprivilegedEditor=this.makeUnprivilegedEditor(t),t.on("editor-change",this.onEditorChange)}unhookEditor(t){t.off("editor-change",this.onEditorChange)}getEditorContents(){return this.value}getEditorSelection(){return this.selection}isDelta(t){return t&&t.ops}isEqualValue(t,n){return this.isDelta(t)&&this.isDelta(n)?Dn(t.ops,n.ops):Dn(t,n)}setEditorContents(t,n){this.value=n;const r=this.getEditorSelection();typeof n=="string"?t.setContents(t.clipboard.convert({html:n})):t.setContents(n),zf(()=>this.setEditorSelection(t,r))}setEditorSelection(t,n){if(this.selection=n,n){const r=t.getLength();n.index=Math.max(0,Math.min(n.index,r-1)),n.length=Math.max(0,Math.min(n.length,r-1-n.index)),t.setSelection(n)}}setEditorTabIndex(t,n){var r;(r=t==null?void 0:t.scroll)!=null&&r.domNode&&(t.scroll.domNode.tabIndex=n)}setEditorReadOnly(t,n){n?t.disable():t.enable()}makeUnprivilegedEditor(t){const n=t;return{getHTML:()=>n.root.innerHTML,getSemanticHTML:n.getSemanticHTML.bind(n),getLength:n.getLength.bind(n),getText:n.getText.bind(n),getContents:n.getContents.bind(n),getSelection:n.getSelection.bind(n),getBounds:n.getBounds.bind(n)}}getEditingArea(){const t=this.editingAreaRef.current;if(!t)throw new Error("Cannot find element for editing area");if(t.nodeType===3)throw new Error("Editing area cannot be a text node");return t}renderEditingArea(){const{children:t,preserveWhitespace:n}=this.props,{generation:r}=this.state,i={key:r,ref:this.editingAreaRef};return $.Children.count(t)?$.cloneElement($.Children.only(t),i):n?$.createElement("pre",{...i}):$.createElement("div",{...i})}render(){return $.createElement("div",{ref:this.containerRef,id:this.props.id,style:this.props.style,key:this.state.generation,className:`quill ${this.props.className??""}`,onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())}onEditorChangeText(t,n,r,i){var a,o;if(!this.editor)return;const s=this.isDelta(this.value)?i.getContents():i.getSemanticHTML();s!==this.getEditorContents()&&(this.lastDeltaChangeSet=n,this.value=s,(o=(a=this.props).onChange)==null||o.call(a,t,n,r,i))}onEditorChangeSelection(t,n,r){var o,l,c,u,d,h;if(!this.editor)return;const i=this.getEditorSelection(),s=!i&&t,a=i&&!t;Dn(t,i)||(this.selection=t,(l=(o=this.props).onChangeSelection)==null||l.call(o,t,n,r),s?(u=(c=this.props).onFocus)==null||u.call(c,t,n,r):a&&((h=(d=this.props).onBlur)==null||h.call(d,i,n,r)))}focus(){this.editor&&this.editor.focus()}blur(){this.editor&&(this.selection=null,this.editor.blur())}}Ia.displayName="React Quill";Ia.Quill=B;Ia.defaultProps={theme:"snow",modules:{},readOnly:!1};function zf(e){Promise.resolve().then(e)}function Cm({value:e,onChange:t,placeholder:n,error:r}){const{t:i}=Pt(),s=$.useRef(null),a=n||i("richTextEditor.placeholder"),o=$.useMemo(()=>({toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]}],[{align:[]}],["link","image","video"],["blockquote","code-block"],["clean"]]}),[]),l=$.useMemo(()=>["header","bold","italic","underline","strike","list","bullet","color","background","align","link","image","video","blockquote","code-block"],[]);return E.jsxs("div",{className:`quill-editor-wrapper rounded-md border ${r?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"}`,children:[E.jsx("style",{children:`
84
100
  /* Dark mode styles for Quill editor */
85
101
  .dark .quill-editor-wrapper .ql-toolbar {
86
102
  background-color: rgb(17 24 39);
87
103
  border-color: rgb(75 85 99);
88
104
  }
89
-
105
+
90
106
  .dark .quill-editor-wrapper .ql-toolbar .ql-stroke {
91
107
  stroke: rgb(209 213 219);
92
108
  }
93
-
109
+
94
110
  .dark .quill-editor-wrapper .ql-toolbar .ql-fill {
95
111
  fill: rgb(209 213 219);
96
112
  }
97
-
113
+
98
114
  .dark .quill-editor-wrapper .ql-toolbar .ql-picker-label {
99
115
  color: rgb(209 213 219);
100
116
  }
101
-
117
+
102
118
  .dark .quill-editor-wrapper .ql-toolbar button:hover,
103
119
  .dark .quill-editor-wrapper .ql-toolbar button.ql-active {
104
120
  background-color: rgb(55 65 81);
105
121
  }
106
-
122
+
107
123
  .dark .quill-editor-wrapper .ql-toolbar button:hover .ql-stroke,
108
124
  .dark .quill-editor-wrapper .ql-toolbar button.ql-active .ql-stroke {
109
125
  stroke: rgb(96 165 250);
110
126
  }
111
-
127
+
112
128
  .dark .quill-editor-wrapper .ql-toolbar button:hover .ql-fill,
113
129
  .dark .quill-editor-wrapper .ql-toolbar button.ql-active .ql-fill {
114
130
  fill: rgb(96 165 250);
115
131
  }
116
-
132
+
117
133
  .dark .quill-editor-wrapper .ql-container {
118
134
  background-color: rgb(17 24 39);
119
135
  border-color: rgb(75 85 99);
120
136
  color: rgb(243 244 246);
121
137
  }
122
-
138
+
123
139
  .dark .quill-editor-wrapper .ql-editor.ql-blank::before {
124
140
  color: rgb(107 114 128);
125
141
  }
126
-
142
+
127
143
  .dark .quill-editor-wrapper .ql-editor {
128
144
  color: rgb(243 244 246);
129
145
  }
130
-
146
+
131
147
  .dark .quill-editor-wrapper .ql-picker-options {
132
148
  background-color: rgb(31 41 55);
133
149
  border-color: rgb(75 85 99);
134
150
  }
135
-
151
+
136
152
  .dark .quill-editor-wrapper .ql-picker-item {
137
153
  color: rgb(209 213 219);
138
154
  }
139
-
155
+
140
156
  .dark .quill-editor-wrapper .ql-picker-item:hover {
141
157
  background-color: rgb(55 65 81);
142
158
  color: rgb(96 165 250);
143
159
  }
144
-
160
+
145
161
  .dark .quill-editor-wrapper .ql-tooltip {
146
162
  background-color: rgb(31 41 55);
147
163
  border-color: rgb(75 85 99);
148
164
  color: rgb(243 244 246);
149
165
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
150
166
  }
151
-
167
+
152
168
  .dark .quill-editor-wrapper .ql-tooltip input {
153
169
  background-color: rgb(17 24 39);
154
170
  border-color: rgb(75 85 99);
155
171
  color: rgb(243 244 246);
156
172
  }
157
-
173
+
158
174
  .dark .quill-editor-wrapper .ql-tooltip input::placeholder {
159
175
  color: rgb(107 114 128);
160
176
  }
161
-
177
+
162
178
  .dark .quill-editor-wrapper .ql-toolbar .ql-picker-label:hover,
163
179
  .dark .quill-editor-wrapper .ql-toolbar .ql-picker-label.ql-active {
164
180
  color: rgb(96 165 250);
165
181
  }
166
- `}),E.jsx(mo,{ref:i,theme:"snow",value:e,onChange:t,placeholder:n,modules:s,formats:o,className:"min-h-[400px]"})]})}function Mg(e,t){return function(){return e.apply(t,arguments)}}const{toString:cR}=Object.prototype,{getPrototypeOf:Ac}=Object,{iterator:bo,toStringTag:Dg}=Symbol,yo=(e=>t=>{const n=cR.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zt=e=>(e=e.toLowerCase(),t=>yo(t)===e),xo=e=>t=>typeof t===e,{isArray:jr}=Array,qr=xo("undefined");function zi(e){return e!==null&&!qr(e)&&e.constructor!==null&&!qr(e.constructor)&&pt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pg=Zt("ArrayBuffer");function uR(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pg(e.buffer),t}const dR=xo("string"),pt=xo("function"),Bg=xo("number"),ji=e=>e!==null&&typeof e=="object",fR=e=>e===!0||e===!1,Ts=e=>{if(yo(e)!=="object")return!1;const t=Ac(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Dg in e)&&!(bo in e)},hR=e=>{if(!ji(e)||zi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},pR=Zt("Date"),gR=Zt("File"),mR=Zt("Blob"),bR=Zt("FileList"),yR=e=>ji(e)&&pt(e.pipe),xR=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||pt(e.append)&&((t=yo(e))==="formdata"||t==="object"&&pt(e.toString)&&e.toString()==="[object FormData]"))},ER=Zt("URLSearchParams"),[wR,_R,vR,kR]=["ReadableStream","Request","Response","Headers"].map(Zt),NR=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),jr(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(zi(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}function Fg(e,t){if(zi(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Kn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qg=e=>!qr(e)&&e!==Kn;function Sl(){const{caseless:e,skipUndefined:t}=qg(this)&&this||{},n={},r=(i,s)=>{const o=e&&Fg(n,s)||s;Ts(n[o])&&Ts(i)?n[o]=Sl(n[o],i):Ts(i)?n[o]=Sl({},i):jr(i)?n[o]=i.slice():(!t||!qr(i))&&(n[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&Hi(arguments[i],r);return n}const AR=(e,t,n,{allOwnKeys:r}={})=>(Hi(t,(i,s)=>{n&&pt(i)?e[s]=Mg(i,n):e[s]=i},{allOwnKeys:r}),e),SR=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),TR=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},CR=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Ac(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},OR=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},IR=e=>{if(!e)return null;if(jr(e))return e;let t=e.length;if(!Bg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},RR=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ac(Uint8Array)),LR=(e,t)=>{const r=(e&&e[bo]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},MR=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},DR=Zt("HTMLFormElement"),PR=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ef=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),BR=Zt("RegExp"),Ug=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Hi(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},FR=e=>{Ug(e,(t,n)=>{if(pt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(pt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},qR=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return jr(e)?r(e):r(String(e).split(t)),n},UR=()=>{},$R=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function zR(e){return!!(e&&pt(e.append)&&e[Dg]==="FormData"&&e[bo])}const jR=e=>{const t=new Array(10),n=(r,i)=>{if(ji(r)){if(t.indexOf(r)>=0)return;if(zi(r))return r;if(!("toJSON"in r)){t[i]=r;const s=jr(r)?[]:{};return Hi(r,(o,a)=>{const l=n(o,i+1);!qr(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},HR=Zt("AsyncFunction"),GR=e=>e&&(ji(e)||pt(e))&&pt(e.then)&&pt(e.catch),$g=((e,t)=>e?setImmediate:t?((n,r)=>(Kn.addEventListener("message",({source:i,data:s})=>{i===Kn&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Kn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",pt(Kn.postMessage)),KR=typeof queueMicrotask<"u"?queueMicrotask.bind(Kn):typeof process<"u"&&process.nextTick||$g,WR=e=>e!=null&&pt(e[bo]),R={isArray:jr,isArrayBuffer:Pg,isBuffer:zi,isFormData:xR,isArrayBufferView:uR,isString:dR,isNumber:Bg,isBoolean:fR,isObject:ji,isPlainObject:Ts,isEmptyObject:hR,isReadableStream:wR,isRequest:_R,isResponse:vR,isHeaders:kR,isUndefined:qr,isDate:pR,isFile:gR,isBlob:mR,isRegExp:BR,isFunction:pt,isStream:yR,isURLSearchParams:ER,isTypedArray:RR,isFileList:bR,forEach:Hi,merge:Sl,extend:AR,trim:NR,stripBOM:SR,inherits:TR,toFlatObject:CR,kindOf:yo,kindOfTest:Zt,endsWith:OR,toArray:IR,forEachEntry:LR,matchAll:MR,isHTMLForm:DR,hasOwnProperty:ef,hasOwnProp:ef,reduceDescriptors:Ug,freezeMethods:FR,toObjectSet:qR,toCamelCase:PR,noop:UR,toFiniteNumber:$R,findKey:Fg,global:Kn,isContextDefined:qg,isSpecCompliantForm:zR,toJSONObject:jR,isAsyncFn:HR,isThenable:GR,setImmediate:$g,asap:KR,isIterable:WR};function de(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}R.inherits(de,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const zg=de.prototype,jg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{jg[e]={value:e}});Object.defineProperties(de,jg);Object.defineProperty(zg,"isAxiosError",{value:!0});de.from=(e,t,n,r,i,s)=>{const o=Object.create(zg);R.toFlatObject(e,o,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return de.call(o,a,l,n,r,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",s&&Object.assign(o,s),o};const VR=null;function Tl(e){return R.isPlainObject(e)||R.isArray(e)}function Hg(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function tf(e,t,n){return e?e.concat(t).map(function(i,s){return i=Hg(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function YR(e){return R.isArray(e)&&!e.some(Tl)}const ZR=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function Eo(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!R.isUndefined(b[m])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(R.isDate(p))return p.toISOString();if(R.isBoolean(p))return p.toString();if(!l&&R.isBlob(p))throw new de("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(p)||R.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,m,b){let y=p;if(p&&!b&&typeof p=="object"){if(R.endsWith(m,"{}"))m=r?m:m.slice(0,-2),p=JSON.stringify(p);else if(R.isArray(p)&&YR(p)||(R.isFileList(p)||R.endsWith(m,"[]"))&&(y=R.toArray(p)))return m=Hg(m),y.forEach(function(v,T){!(R.isUndefined(v)||v===null)&&t.append(o===!0?tf([m],T,s):o===null?m:m+"[]",c(v))}),!1}return Tl(p)?!0:(t.append(tf(b,m,s),c(p)),!1)}const d=[],h=Object.assign(ZR,{defaultVisitor:u,convertValue:c,isVisitable:Tl});function f(p,m){if(!R.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(p),R.forEach(p,function(y,_){(!(R.isUndefined(y)||y===null)&&i.call(t,y,R.isString(_)?_.trim():_,m,h))===!0&&f(y,m?m.concat(_):[_])}),d.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return f(e),t}function nf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Sc(e,t){this._pairs=[],e&&Eo(e,this,t)}const Gg=Sc.prototype;Gg.append=function(t,n){this._pairs.push([t,n])};Gg.toString=function(t){const n=t?function(r){return t.call(this,r,nf)}:nf;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function XR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Kg(e,t,n){if(!t)return e;const r=n&&n.encode||XR;R.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=R.isURLSearchParams(t)?t.toString():new Sc(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class rf{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Wg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},QR=typeof URLSearchParams<"u"?URLSearchParams:Sc,JR=typeof FormData<"u"?FormData:null,eL=typeof Blob<"u"?Blob:null,tL={isBrowser:!0,classes:{URLSearchParams:QR,FormData:JR,Blob:eL},protocols:["http","https","file","blob","url","data"]},Tc=typeof window<"u"&&typeof document<"u",Cl=typeof navigator=="object"&&navigator||void 0,nL=Tc&&(!Cl||["ReactNative","NativeScript","NS"].indexOf(Cl.product)<0),rL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",iL=Tc&&window.location.href||"http://localhost",sL=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Tc,hasStandardBrowserEnv:nL,hasStandardBrowserWebWorkerEnv:rL,navigator:Cl,origin:iL},Symbol.toStringTag,{value:"Module"})),Je={...sL,...tL};function oL(e,t){return Eo(e,new Je.classes.URLSearchParams,{visitor:function(n,r,i,s){return Je.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function aL(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function lL(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function Vg(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=n.length;return o=!o&&R.isArray(i)?i.length:o,l?(R.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!R.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&R.isArray(i[o])&&(i[o]=lL(i[o])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,i)=>{t(aL(r),i,n,0)}),n}return null}function cL(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Gi={transitional:Wg,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=R.isObject(t);if(s&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return i?JSON.stringify(Vg(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return oL(t,this.formSerializer).toString();if((a=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Eo(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),cL(t)):t}],transformResponse:[function(t){const n=this.transitional||Gi.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?de.from(a,de.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Je.classes.FormData,Blob:Je.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{Gi.headers[e]={}});const uL=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dL=e=>{const t={};let n,r,i;return e&&e.split(`
167
- `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&uL[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},sf=Symbol("internals");function ui(e){return e&&String(e).trim().toLowerCase()}function Cs(e){return e===!1||e==null?e:R.isArray(e)?e.map(Cs):String(e)}function fL(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const hL=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ba(e,t,n,r,i){if(R.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function pL(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function gL(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let gt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,c){const u=ui(l);if(!u)throw new Error("header name must be a non-empty string");const d=R.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Cs(a))}const o=(a,l)=>R.forEach(a,(c,u)=>s(c,u,l));if(R.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(R.isString(t)&&(t=t.trim())&&!hL(t))o(dL(t),n);else if(R.isObject(t)&&R.isIterable(t)){let a={},l,c;for(const u of t){if(!R.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?R.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}o(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=ui(t),t){const r=R.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return fL(i);if(R.isFunction(n))return n.call(this,i,r);if(R.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ui(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ba(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=ui(o),o){const a=R.findKey(r,o);a&&(!n||Ba(r,r[a],a,n))&&(delete r[a],i=!0)}}return R.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||Ba(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return R.forEach(this,(i,s)=>{const o=R.findKey(r,s);if(o){n[o]=Cs(i),delete n[s];return}const a=t?pL(s):String(s).trim();a!==s&&delete n[s],n[a]=Cs(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
168
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[sf]=this[sf]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=ui(o);r[a]||(gL(i,o),r[a]=!0)}return R.isArray(t)?t.forEach(s):s(t),this}};gt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.reduceDescriptors(gt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});R.freezeMethods(gt);function Fa(e,t){const n=this||Gi,r=t||n,i=gt.from(r.headers);let s=r.data;return R.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Yg(e){return!!(e&&e.__CANCEL__)}function Hr(e,t,n){de.call(this,e??"canceled",de.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(Hr,de,{__CANCEL__:!0});function Zg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new de("Request failed with status code "+n.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function mL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bL(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let d=s,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(h*1e3/f):void 0}}function yL(e,t){let n=0,r=1e3/t,i,s;const o=(c,u=Date.now())=>{n=u,i=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?o(c,u):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const Hs=(e,t,n=3)=>{let r=0;const i=bL(50,250);return yL(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=i(l),u=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},of=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},af=e=>(...t)=>R.asap(()=>e(...t)),xL=Je.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Je.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Je.origin),Je.navigator&&/(msie|trident)/i.test(Je.navigator.userAgent)):()=>!0,EL=Je.hasStandardBrowserEnv?{write(e,t,n,r,i,s,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];R.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),R.isString(r)&&a.push(`path=${r}`),R.isString(i)&&a.push(`domain=${i}`),s===!0&&a.push("secure"),R.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function wL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _L(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xg(e,t,n){let r=!wL(t);return e&&(r||n==!1)?_L(e,t):t}const lf=e=>e instanceof gt?{...e}:e;function Jn(e,t){t=t||{};const n={};function r(c,u,d,h){return R.isPlainObject(c)&&R.isPlainObject(u)?R.merge.call({caseless:h},c,u):R.isPlainObject(u)?R.merge({},u):R.isArray(u)?u.slice():u}function i(c,u,d,h){if(R.isUndefined(u)){if(!R.isUndefined(c))return r(void 0,c,d,h)}else return r(c,u,d,h)}function s(c,u){if(!R.isUndefined(u))return r(void 0,u)}function o(c,u){if(R.isUndefined(u)){if(!R.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,d)=>i(lf(c),lf(u),d,!0)};return R.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||i,h=d(e[u],t[u],u);R.isUndefined(h)&&d!==a||(n[u]=h)}),n}const Qg=e=>{const t=Jn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=gt.from(o),t.url=Kg(Xg(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),R.isFormData(n)){if(Je.hasStandardBrowserEnv||Je.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(R.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&o.set(u,d)})}}if(Je.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&xL(t.url))){const l=i&&s&&EL.read(s);l&&o.set(i,l)}return t},vL=typeof XMLHttpRequest<"u",kL=vL&&function(e){return new Promise(function(n,r){const i=Qg(e);let s=i.data;const o=gt.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,d,h,f,p;function m(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function y(){if(!b)return;const v=gt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:v,config:e,request:b};Zg(function(B){n(B),m()},function(B){r(B),m()},C),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(y)},b.onabort=function(){b&&(r(new de("Request aborted",de.ECONNABORTED,e,b)),b=null)},b.onerror=function(T){const C=T&&T.message?T.message:"Network Error",N=new de(C,de.ERR_NETWORK,e,b);N.event=T||null,r(N),b=null},b.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||Wg;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new de(T,C.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,b)),b=null},s===void 0&&o.setContentType(null),"setRequestHeader"in b&&R.forEach(o.toJSON(),function(T,C){b.setRequestHeader(C,T)}),R.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),a&&a!=="json"&&(b.responseType=i.responseType),c&&([h,p]=Hs(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,f]=Hs(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(u=v=>{b&&(r(!v||v.type?new Hr(null,e,b):v),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const _=mL(i.url);if(_&&Je.protocols.indexOf(_)===-1){r(new de("Unsupported protocol "+_+":",de.ERR_BAD_REQUEST,e));return}b.send(s||null)})},NL=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof de?u:new Hr(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new de(`timeout ${t} of ms exceeded`,de.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>R.asap(a),l}},AL=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},SL=async function*(e,t){for await(const n of TL(e))yield*AL(n,t)},TL=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},cf=(e,t,n,r)=>{const i=SL(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let h=s+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},uf=64*1024,{isFunction:ws}=R,CL=(({Request:e,Response:t})=>({Request:e,Response:t}))(R.global),{ReadableStream:df,TextEncoder:ff}=R.global,hf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},OL=e=>{e=R.merge.call({skipUndefined:!0},CL,e);const{fetch:t,Request:n,Response:r}=e,i=t?ws(t):typeof fetch=="function",s=ws(n),o=ws(r);if(!i)return!1;const a=i&&ws(df),l=i&&(typeof ff=="function"?(p=>m=>p.encode(m))(new ff):async p=>new Uint8Array(await new n(p).arrayBuffer())),c=s&&a&&hf(()=>{let p=!1;const m=new n(Je.origin,{body:new df,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!m}),u=o&&a&&hf(()=>R.isReadableStream(new r("").body)),d={stream:u&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(m,b)=>{let y=m&&m[p];if(y)return y.call(m);throw new de(`Response type '${p}' is not supported`,de.ERR_NOT_SUPPORT,b)})});const h=async p=>{if(p==null)return 0;if(R.isBlob(p))return p.size;if(R.isSpecCompliantForm(p))return(await new n(Je.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(R.isArrayBufferView(p)||R.isArrayBuffer(p))return p.byteLength;if(R.isURLSearchParams(p)&&(p=p+""),R.isString(p))return(await l(p)).byteLength},f=async(p,m)=>{const b=R.toFiniteNumber(p.getContentLength());return b??h(m)};return async p=>{let{url:m,method:b,data:y,signal:_,cancelToken:v,timeout:T,onDownloadProgress:C,onUploadProgress:N,responseType:B,headers:U,withCredentials:G="same-origin",fetchOptions:O}=Qg(p),H=t||fetch;B=B?(B+"").toLowerCase():"text";let P=NL([_,v&&v.toAbortSignal()],T),ne=null;const X=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let Y;try{if(N&&c&&b!=="get"&&b!=="head"&&(Y=await f(U,y))!==0){let Q=new n(m,{method:"POST",body:y,duplex:"half"}),le;if(R.isFormData(y)&&(le=Q.headers.get("content-type"))&&U.setContentType(le),Q.body){const[k,ge]=of(Y,Hs(af(N)));y=cf(Q.body,uf,k,ge)}}R.isString(G)||(G=G?"include":"omit");const L=s&&"credentials"in n.prototype,$={...O,signal:P,method:b.toUpperCase(),headers:U.normalize().toJSON(),body:y,duplex:"half",credentials:L?G:void 0};ne=s&&new n(m,$);let F=await(s?H(ne,O):H(m,$));const K=u&&(B==="stream"||B==="response");if(u&&(C||K&&X)){const Q={};["status","statusText","headers"].forEach(se=>{Q[se]=F[se]});const le=R.toFiniteNumber(F.headers.get("content-length")),[k,ge]=C&&of(le,Hs(af(C),!0))||[];F=new r(cf(F.body,uf,k,()=>{ge&&ge(),X&&X()}),Q)}B=B||"text";let w=await d[R.findKey(d,B)||"text"](F,p);return!K&&X&&X(),await new Promise((Q,le)=>{Zg(Q,le,{data:w,headers:gt.from(F.headers),status:F.status,statusText:F.statusText,config:p,request:ne})})}catch(L){throw X&&X(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new de("Network Error",de.ERR_NETWORK,p,ne),{cause:L.cause||L}):de.from(L,L&&L.code,p,ne)}}},IL=new Map,Jg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let o=s.length,a=o,l,c,u=IL;for(;a--;)l=s[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:OL(t)),u=c;return c};Jg();const Cc={http:VR,xhr:kL,fetch:{get:Jg}};R.forEach(Cc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pf=e=>`- ${e}`,RL=e=>R.isFunction(e)||e===null||e===!1;function LL(e,t){e=R.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let o=0;o<n;o++){r=e[o];let a;if(i=r,!RL(r)&&(i=Cc[(a=String(r)).toLowerCase()],i===void 0))throw new de(`Unknown adapter '${a}'`);if(i&&(R.isFunction(i)||(i=i.get(t))))break;s[a||"#"+o]=i}if(!i){const o=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
169
- `+o.map(pf).join(`
170
- `):" "+pf(o[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const em={getAdapter:LL,adapters:Cc};function qa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Hr(null,e)}function gf(e){return qa(e),e.headers=gt.from(e.headers),e.data=Fa.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),em.getAdapter(e.adapter||Gi.adapter,e)(e).then(function(r){return qa(e),r.data=Fa.call(e,e.transformResponse,r),r.headers=gt.from(r.headers),r},function(r){return Yg(r)||(qa(e),r&&r.response&&(r.response.data=Fa.call(e,e.transformResponse,r.response),r.response.headers=gt.from(r.response.headers))),Promise.reject(r)})}const tm="1.13.2",wo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wo[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const mf={};wo.transitional=function(t,n,r){function i(s,o){return"[Axios v"+tm+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new de(i(o," has been removed"+(n?" in "+n:"")),de.ERR_DEPRECATED);return n&&!mf[o]&&(mf[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};wo.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ML(e,t,n){if(typeof e!="object")throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new de("option "+s+" must be "+l,de.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new de("Unknown option "+s,de.ERR_BAD_OPTION)}}const Os={assertOptions:ML,validators:wo},en=Os.validators;let Vn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new rf,response:new rf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
171
- `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Jn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Os.assertOptions(r,{silentJSONParsing:en.transitional(en.boolean),forcedJSONParsing:en.transitional(en.boolean),clarifyTimeoutError:en.transitional(en.boolean)},!1),i!=null&&(R.isFunction(i)?n.paramsSerializer={serialize:i}:Os.assertOptions(i,{encode:en.function,serialize:en.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Os.assertOptions(n,{baseUrl:en.spelling("baseURL"),withXsrfToken:en.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&R.merge(s.common,s[n.method]);s&&R.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=gt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const p=[gf.bind(this),void 0];for(p.unshift(...a),p.push(...c),h=p.length,u=Promise.resolve(n);d<h;)u=u.then(p[d++],p[d++]);return u}h=a.length;let f=n;for(;d<h;){const p=a[d++],m=a[d++];try{f=p(f)}catch(b){m.call(this,b);break}}try{u=gf.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Jn(this.defaults,t);const n=Xg(t.baseURL,t.url,t.allowAbsoluteUrls);return Kg(n,t.params,t.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(t){Vn.prototype[t]=function(n,r){return this.request(Jn(r||{},{method:t,url:n,data:(r||{}).data}))}});R.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(Jn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Vn.prototype[t]=n(),Vn.prototype[t+"Form"]=n(!0)});let DL=class nm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Hr(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new nm(function(i){t=i}),cancel:t}}};function PL(e){return function(n){return e.apply(null,n)}}function BL(e){return R.isObject(e)&&e.isAxiosError===!0}const Ol={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ol).forEach(([e,t])=>{Ol[t]=e});function rm(e){const t=new Vn(e),n=Mg(Vn.prototype.request,t);return R.extend(n,Vn.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return rm(Jn(e,i))},n}const Le=rm(Gi);Le.Axios=Vn;Le.CanceledError=Hr;Le.CancelToken=DL;Le.isCancel=Yg;Le.VERSION=tm;Le.toFormData=Eo;Le.AxiosError=de;Le.Cancel=Le.CanceledError;Le.all=function(t){return Promise.all(t)};Le.spread=PL;Le.isAxiosError=BL;Le.mergeConfig=Jn;Le.AxiosHeaders=gt;Le.formToJSON=e=>Vg(R.isHTMLForm(e)?new FormData(e):e);Le.getAdapter=em.getAdapter;Le.HttpStatusCode=Ol;Le.default=Le;const{Axios:N2,AxiosError:A2,CanceledError:S2,isCancel:T2,CancelToken:C2,VERSION:O2,all:I2,Cancel:R2,isAxiosError:L2,spread:M2,toFormData:D2,AxiosHeaders:P2,HttpStatusCode:B2,formToJSON:F2,getAdapter:q2,mergeConfig:U2}=Le,st={ARTICLES:"/article",ARTICLES_FILTER:"/article/filter",ARTICLE_BY_ID:e=>`/article/${e}`,IMAGE_UPLOAD:"/Image/uploadImage",INSERT_WITH_AI:"/article/insertWithAI",UPDATE_WITH_AI:"/article/updateWithAI"};class im{constructor(t){this.client=t}async uploadImage(t){const n=new FormData;n.append("file",t),console.log("[ArticleAPI] uploadImage - Request:",{fileName:t.name,fileSize:t.size});const r=await this.client.post(st.IMAGE_UPLOAD,n,{headers:{"Content-Type":"multipart/form-data"}});return console.log("[ArticleAPI] uploadImage - Response:",r.data),r.data}async listArticles(t,n=1,r=10){const i={page:n,pageSize:r};t&&(i.categoryId=t),console.log("[ArticleAPI] listArticles - Request:",{url:st.ARTICLES,params:i});const s=await this.client.get(st.ARTICLES,{params:i});return console.log("[ArticleAPI] listArticles - Response:",s.data),this.transformArticleDates(s.data)}async filterArticles(t,n,r=1,i=10){const s={page:r,pageSize:i};t&&t.length>0&&(s.roles=t.join(",")),n!==void 0&&(s.parentId=n);const o=await this.client.get(st.ARTICLES_FILTER,{params:s});return this.transformArticleDates(o.data)}async getArticleById(t){const n=await this.client.get(st.ARTICLE_BY_ID(t));return this.transformArticleDate(n.data)}async createArticle(t){console.log("[ArticleAPI] createArticle - Request:",{url:st.ARTICLES,data:t});const n=await this.client.post(st.ARTICLES,t);return console.log("[ArticleAPI] createArticle - Response:",n.data),this.transformArticleDate(n.data)}async updateArticle(t){console.log("[ArticleAPI] updateArticle - Request:",{url:st.ARTICLES,data:t});const n=await this.client.put(st.ARTICLES,t);return console.log("[ArticleAPI] updateArticle - Response:",n.data),this.transformArticleDate(n.data)}async deleteArticle(t){console.log("[ArticleAPI] deleteArticle - Request:",{id:t,url:st.ARTICLE_BY_ID(t)}),await this.client.delete(st.ARTICLE_BY_ID(t)),console.log("[ArticleAPI] deleteArticle - Success")}async createArticleWithAI(t){console.log("[ArticleAPI] createArticleWithAI - Request:",{url:st.INSERT_WITH_AI,data:t});const n=await this.client.post(st.INSERT_WITH_AI,t);return console.log("[ArticleAPI] createArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}async updateArticleWithAI(t){if(!t.articleId)throw new Error("articleId is required for updateWithAI");console.log("[ArticleAPI] updateArticleWithAI - Request:",{url:st.UPDATE_WITH_AI,data:t});const n=await this.client.put(st.UPDATE_WITH_AI,t);return console.log("[ArticleAPI] updateArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}transformArticleDate(t){return{...t,dateAt:t.dateAt?new Date(t.dateAt):void 0,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0,category:t.category?{...t.category,createdAt:t.category.createdAt?new Date(t.category.createdAt):void 0,updatedAt:t.category.updatedAt?new Date(t.category.updatedAt):void 0}:void 0}}transformArticleDates(t){return{...t,items:t.items.map(n=>this.transformArticleDate(n))}}}const tn={CATEGORIES:"/category",CATEGORIES_FILTER:"/category/filter",CATEGORY_BY_ID:e=>`/category/${e}`};class sm{constructor(t){this.client=t}async listCategories(){console.log("[CategoryAPI] listCategories - Request:",{url:tn.CATEGORIES});const t=await this.client.get(tn.CATEGORIES);return console.log("[CategoryAPI] listCategories - Response:",t.data),this.transformCategoryDates(t.data)}async filterCategories(t,n){const r={};t&&t.length>0&&(r.roles=t.join(",")),n!==void 0&&(r.parentId=n);const i=await this.client.get(tn.CATEGORIES_FILTER,{params:r});return this.transformCategoryDates(i.data)}async getCategoryById(t){const n=await this.client.get(tn.CATEGORY_BY_ID(t));return this.transformCategoryDate(n.data)}async createCategory(t){console.log("[CategoryAPI] createCategory - Request:",{url:tn.CATEGORIES,data:t});const n=await this.client.post(tn.CATEGORIES,t);return console.log("[CategoryAPI] createCategory - Response:",n.data),this.transformCategoryDate(n.data)}async updateCategory(t){console.log("[CategoryAPI] updateCategory - Request:",{url:tn.CATEGORIES,data:t});const n=await this.client.put(tn.CATEGORIES,t);return console.log("[CategoryAPI] updateCategory - Response:",n.data),this.transformCategoryDate(n.data)}async deleteCategory(t){console.log("[CategoryAPI] deleteCategory - Request:",{id:t,url:tn.CATEGORY_BY_ID(t)}),await this.client.delete(tn.CATEGORY_BY_ID(t)),console.log("[CategoryAPI] deleteCategory - Success")}transformCategoryDate(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0}}transformCategoryDates(t){return t.map(n=>this.transformCategoryDate(n))}}const Ut={TAGS:"/tag",TAG_BY_ID:e=>`/tag/${e}`,TAG_MERGE:(e,t)=>`/Tag/merge/${e}/${t}`};class om{constructor(t){this.client=t}async listTags(){console.log("[TagAPI] listTags - Request:",{url:Ut.TAGS});const t=await this.client.get(Ut.TAGS);return console.log("[TagAPI] listTags - Response:",t.data),t.data}async getTagById(t){console.log("[TagAPI] getTagById - Request:",{id:t,url:Ut.TAG_BY_ID(t)});const n=await this.client.get(Ut.TAG_BY_ID(t));return console.log("[TagAPI] getTagById - Response:",n.data),n.data}async createTag(t){console.log("[TagAPI] createTag - Request:",{url:Ut.TAGS,data:t});const n=await this.client.post(Ut.TAGS,t);return console.log("[TagAPI] createTag - Response:",n.data),n.data}async updateTag(t){console.log("[TagAPI] updateTag - Request:",{url:Ut.TAGS,data:t});const n=await this.client.put(Ut.TAGS,t);return console.log("[TagAPI] updateTag - Response:",n.data),n.data}async deleteTag(t){console.log("[TagAPI] deleteTag - Request:",{id:t,url:Ut.TAG_BY_ID(t)}),await this.client.delete(Ut.TAG_BY_ID(t)),console.log("[TagAPI] deleteTag - Success")}async mergeTags(t,n){const r=Ut.TAG_MERGE(t,n);console.log("[TagAPI] mergeTags - Request:",{url:r,sourceTagId:t,targetTagId:n}),await this.client.post(r),console.log("[TagAPI] mergeTags - Success")}}const am=q.createContext(void 0);function FL({config:e,children:t}){const n=q.useRef(e);q.useEffect(()=>{var i;n.current=e,console.log("[NNews] Config updated:",{apiUrl:e.apiUrl,hasAuthHeader:!!((i=e.headers)!=null&&i.Authorization)})},[e]);const r=q.useMemo(()=>{const i=e.apiClient||Le.create({baseURL:e.apiUrl,headers:{"Content-Type":"application/json"}});i.interceptors.request.use(l=>{var u,d,h;const c=n.current.headers;return c&&Object.entries(c).forEach(([f,p])=>{p&&l.headers.set(f,p)}),console.log("[NNews] Request interceptor:",{method:(u=l.method)==null?void 0:u.toUpperCase(),url:`${l.baseURL||""}${l.url||""}`,headers:{Authorization:((d=l.headers)==null?void 0:d.Authorization)||"(not set)","Content-Type":((h=l.headers)==null?void 0:h["Content-Type"])||"(not set)"}}),l});const s=new im(i),o=new sm(i),a=new om(i);return{config:e,apiClient:i,articleApi:s,categoryApi:o,tagApi:a}},[e.apiUrl,e.apiClient]);return E.jsx(am.Provider,{value:r,children:t})}function Gr(){const e=q.useContext(am);if(!e)throw new Error("useNNews must be used within a NNewsProvider");return e}function qL({article:e,categories:t=[],availableRoles:n,onFetchRoles:r,onSave:i,onCancel:s,loading:o=!1}){const{articleApi:a}=Gr(),[l,c]=q.useState(""),[u,d]=q.useState(""),[h,f]=q.useState(""),[p,m]=q.useState(""),[b,y]=q.useState(!1),[_,v]=q.useState(ze.Draft),[T,C]=q.useState(null),[N,B]=q.useState(""),[U,G]=q.useState(""),[O,H]=q.useState(!0),[P,ne]=q.useState(new Set),[X,Y]=q.useState([]),[L,$]=q.useState(!1),[F,K]=q.useState({});q.useEffect(()=>{var te;e&&(c(e.title),d(e.content),f(e.imageName||""),console.log("imageName:",e.imageName),e.imageName&&m(e.imageName),v(e.status),C(e.categoryId||null),B(e.dateAt?new Date(e.dateAt).toISOString().slice(0,16):""),G(((te=e.tags)==null?void 0:te.map(ce=>ce.title).join(", "))||""),e.roles&&e.roles.length>0?(H(!1),ne(new Set(e.roles.map(ce=>ce.slug)))):(H(!0),ne(new Set)))},[e]);const w=n||X;q.useEffect(()=>{if(n&&n.length>0||!r)return;let te=!1;return $(!0),r().then(ce=>{te||Y(ce)}).catch(ce=>{console.warn("Failed to fetch roles:",ce)}).finally(()=>{te||$(!1)}),()=>{te=!0}},[n,r]);const Q=q.useCallback(te=>{H(te),te&&ne(new Set)},[]),le=q.useCallback(te=>{ne(ce=>{const Ne=new Set(ce);return Ne.has(te)?Ne.delete(te):Ne.add(te),Ne})},[]),k=()=>{const te={};return l.trim()||(te.title="Title is required"),u.trim()||(te.content="Content is required"),K(te),Object.keys(te).length===0},ge=async te=>{if(te.preventDefault(),!k())return;const ce=O?[]:Array.from(P),Ne={title:l.trim(),content:u.trim(),imageName:h||void 0,status:_,categoryId:T||void 0,dateAt:N||void 0,tagList:U.trim()||void 0,roles:ce.length>0?ce:void 0};e?await i({articleId:e.articleId,...Ne}):await i(Ne)},se=async te=>{var qe;const ce=(qe=te.target.files)==null?void 0:qe[0];if(!ce)return;if(!ce.type.startsWith("image/")){K({...F,image:"Please select an image file"});return}if(ce.size>5*1024*1024){K({...F,image:"Image size must be less than 5MB"});return}K({...F,image:""});const Ne=new FileReader;Ne.onloadend=()=>{m(Ne.result)},Ne.readAsDataURL(ce);try{y(!0);const Ue=await a.uploadImage(ce);f(Ue),K({...F,image:""})}catch(Ue){console.error("Error uploading image:",Ue),K({...F,image:"Failed to upload image. Please try again."})}finally{y(!1)}},_e=()=>{m(""),f("")};return E.jsxs("form",{onSubmit:ge,className:"space-y-6",children:[E.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[E.jsxs("div",{className:"col-span-2 p-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:l,onChange:te=>c(te.target.value),className:`w-full rounded-md border ${F.title?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"} px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter article title"}),F.title&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:F.title})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"dateAt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Publication Date"}),E.jsx("input",{id:"dateAt",type:"datetime-local",value:N,onChange:te=>B(te.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Category"}),E.jsxs("select",{id:"category",value:T||"",onChange:te=>C(te.target.value?Number(te.target.value):null),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:"No Category"}),t.map(te=>E.jsx("option",{value:te.categoryId,children:te.title},te.categoryId))]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"status",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"}),E.jsxs("select",{id:"status",value:_,onChange:te=>v(Number(te.target.value)),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:ze.Draft,children:"Draft"}),E.jsx("option",{value:ze.Published,children:"Published"}),E.jsx("option",{value:ze.Archived,children:"Archived"}),E.jsx("option",{value:ze.Scheduled,children:"Scheduled"}),E.jsx("option",{value:ze.Review,children:"Review"})]})]})]}),E.jsx("div",{className:"col-span-1",children:E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"image",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Featured Image"}),p?E.jsxs("div",{className:"relative",children:[E.jsx("img",{src:p,alt:"Preview",className:"w-full h-[250px] object-cover rounded-md border border-gray-300 dark:border-gray-600",style:{height:"250px"}}),E.jsx("button",{type:"button",onClick:_e,className:"absolute top-2 right-2 rounded-full bg-red-600 p-2 text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500",disabled:b,style:{top:"2px",right:"2px"},children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:E.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),b&&E.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black bg-opacity-50 rounded-md",children:E.jsx("span",{className:"text-white text-sm",children:"Uploading..."})})]}):E.jsx("div",{className:"flex items-center",children:E.jsx("input",{id:"image",type:"file",accept:"image/*",onChange:se,disabled:b,className:"block w-full text-sm text-gray-900 dark:text-gray-100 border border-gray-300 dark:border-gray-600 rounded-md cursor-pointer bg-white dark:bg-gray-900 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500"})}),F.image&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:F.image}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"JPG, PNG, GIF. Max 5MB"})]})})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Content *"}),E.jsx(Lg,{value:u,onChange:d,placeholder:"Write your article content...",error:F.content}),F.content&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:F.content})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"tags",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Tags"}),E.jsx("input",{id:"tags",type:"text",value:U,onChange:te=>G(te.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Enter tags separated by commas (e.g., AI, Technology, Innovation)"}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of tags. Tags will be created automatically if they don't exist."})]}),E.jsxs("div",{className:"space-y-3",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Visibilidade"}),E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("input",{type:"checkbox",checked:O,onChange:te=>Q(te.target.checked),className:"h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500"}),E.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Visível para todos"})]}),!O&&E.jsx("div",{className:"ml-6 space-y-2",children:L?E.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Carregando perfis..."}):w.length>0?E.jsxs("div",{className:"space-y-2",children:[E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Selecione os perfis que podem visualizar este artigo:"}),w.map(te=>E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("input",{type:"checkbox",checked:P.has(te.slug),onChange:()=>le(te.slug),className:"h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500"}),E.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:te.name})]},te.slug))]}):E.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Nenhum perfil disponível."})})]}),E.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[E.jsx("button",{type:"button",onClick:s,disabled:o,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:o,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:o?"Saving...":e?"Update Article":"Create Article"})]})]})}function UL({mode:e,articleId:t,isOpen:n,onSuccess:r,onClose:i}){const{articleApi:s}=Gr(),[o,a]=q.useState(""),[l,c]=q.useState(!1),[u,d]=q.useState(!1),[h,f]=q.useState(null),[p,m]=q.useState(""),b=()=>o.trim()?o.trim().length<10?(f("Prompt must be at least 10 characters long"),!1):o.length>2e3?(f("Prompt must be less than 2000 characters"),!1):!0:(f("Prompt is required"),!1),y=async()=>{if(b()){if(e==="update"&&!t){f("Article ID is required for update mode");return}d(!0),f(null),m(e==="create"?"Creating article with AI...":"Updating article with AI...");try{const C={...e==="update"&&t&&{articleId:t},prompt:o.trim(),generateImage:l};l&&m("Generating content and image with AI... This may take a few moments.");let N;e==="create"?N=await s.createArticleWithAI(C):N=await s.updateArticleWithAI(C),m(""),r(N),a(""),c(!1),i()}catch(C){console.error("Error generating article with AI:",C),f(C.message||"Failed to generate article with AI. Please try again."),m("")}finally{d(!1)}}},_=()=>{u||(a(""),c(!1),f(null),i())},v=e==="create"?'Describe the article you want to create (e.g., "Write a comprehensive article about AI trends in 2024, including ChatGPT-4, Gemini, and practical applications in different industries")':'Describe the changes you want to make (e.g., "Add a new section about the latest ChatGPT-4 updates launched in January 2024 and improve the introduction to make it more engaging")',T=()=>{const C="w-full rounded-md border px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",N=h&&!o.trim()?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600";return`${C} ${N}`};return n?E.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:E.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4 text-center sm:p-0",children:[E.jsx("div",{className:"fixed inset-0 bg-gray-500 dark:bg-gray-900 bg-opacity-75 dark:bg-opacity-75 transition-opacity",onClick:_}),E.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-2xl",children:[E.jsxs("div",{className:"bg-white dark:bg-gray-800 px-6 pb-4 pt-5",children:[E.jsxs("div",{className:"flex items-start justify-between mb-4",children:[E.jsxs("div",{className:"flex items-start gap-3",children:[E.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900",children:E.jsx("svg",{className:"h-6 w-6 text-blue-600 dark:text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),E.jsxs("div",{children:[E.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",id:"modal-title",children:e==="create"?"Create Article with AI":"Update Article with AI"}),E.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:e==="create"?"Use AI to generate a complete article with title, content, and tags based on your description.":"Use AI to modify the existing article content based on your instructions."})]})]}),E.jsxs("button",{type:"button",onClick:_,disabled:u,className:"rounded-md text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 disabled:opacity-50",children:[E.jsx("span",{className:"sr-only",children:"Close"}),E.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]})]}),E.jsxs("div",{className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"prompt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Description / Instructions *"}),E.jsx("textarea",{id:"prompt",value:o,onChange:C=>a(C.target.value),rows:6,disabled:u,className:T(),placeholder:v,minLength:10,maxLength:2e3}),E.jsxs("div",{className:"flex justify-between items-center",children:[E.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[o.length," / 2000 characters (minimum 10)"]}),h&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:h})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("input",{type:"checkbox",checked:l,onChange:C=>c(C.target.checked),disabled:u,className:"h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"}),E.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Generate image with DALL-E 3"})]}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 ml-6",children:"AI will create an illustrative image for the article. This may take a few extra seconds."})]}),u&&p&&E.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-800 bg-yellow-50 dark:bg-yellow-900/20 p-4",children:E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsxs("svg",{className:"h-5 w-5 text-yellow-600 dark:text-yellow-400 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[E.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),E.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),E.jsxs("div",{children:[E.jsx("p",{className:"text-sm font-medium text-yellow-900 dark:text-yellow-100",children:p}),E.jsx("p",{className:"text-xs text-yellow-700 dark:text-yellow-300 mt-1",children:"Please wait..."})]})]})})]})]}),E.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 px-6 py-4 flex justify-end gap-3",children:[E.jsx("button",{type:"button",onClick:_,disabled:u,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),E.jsx("button",{type:"button",onClick:y,disabled:u||o.trim().length<10,className:"rounded-md bg-gradient-to-r from-blue-600 to-purple-600 px-6 py-2 text-white hover:from-blue-700 hover:to-purple-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:u?E.jsxs(E.Fragment,{children:[E.jsxs("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[E.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),E.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),E.jsx("span",{children:"Generating..."})]}):E.jsxs(E.Fragment,{children:[E.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),E.jsx("span",{children:e==="create"?"Create with AI":"Update with AI"})]})})]})]})]})}):null}function $L({value:e,onChange:t,placeholder:n="Write your content in Markdown...",label:r,error:i,minHeight:s="400px"}){const[o,a]=q.useState("edit");return E.jsxs("div",{className:"space-y-2",children:[r&&E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r}),E.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900",children:[E.jsxs("div",{className:"flex border-b border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800",children:[E.jsx("button",{type:"button",onClick:()=>a("edit"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="edit"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Edit"}),E.jsx("button",{type:"button",onClick:()=>a("preview"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="preview"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Preview"})]}),E.jsx("div",{style:{minHeight:s},children:o==="edit"?E.jsx("textarea",{value:e,onChange:l=>t(l.target.value),placeholder:n,className:"h-full w-full resize-none border-0 p-4 font-mono text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-0",style:{minHeight:s}}):E.jsx("div",{className:"prose dark:prose-invert max-w-none p-4 text-gray-900 dark:text-gray-100",children:e?E.jsx(ch,{remarkPlugins:[qh],rehypePlugins:[_p],children:e}):E.jsx("div",{className:"text-gray-400 dark:text-gray-500",children:"Nothing to preview"})})})]}),i&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:i}),E.jsxs("div",{className:"rounded-md bg-gray-50 dark:bg-gray-800 p-3 text-xs text-gray-600 dark:text-gray-400",children:[E.jsx("p",{className:"font-medium",children:"Markdown Syntax Help:"}),E.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[E.jsxs("div",{children:[E.jsx("strong",{children:"# Heading 1"})," - Main heading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"## Heading 2"})," - Subheading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"**bold text**"})," - Bold"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"*italic text*"})," - Italic"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"[link](url)"})," - Link"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"![alt](image.jpg)"})," - Image"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"- item"})," - Bullet list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"1. item"})," - Numbered list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"`code`"})," - Inline code"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"```language```"})," - Code block"]})]})]})]})}/**
182
+ `}),E.jsx(Ia,{ref:s,theme:"snow",value:e,onChange:t,placeholder:a,modules:o,formats:l,className:"min-h-[400px]"})]})}function Om(e,t){return function(){return e.apply(t,arguments)}}const{toString:KL}=Object.prototype,{getPrototypeOf:Xc}=Object,{iterator:Ra,toStringTag:Im}=Symbol,La=(e=>t=>{const n=KL.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Qt=e=>(e=e.toLowerCase(),t=>La(t)===e),Ma=e=>t=>typeof t===e,{isArray:Zr}=Array,Kr=Ma("undefined");function Qi(e){return e!==null&&!Kr(e)&&e.constructor!==null&&!Kr(e.constructor)&&bt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Rm=Qt("ArrayBuffer");function VL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Rm(e.buffer),t}const WL=Ma("string"),bt=Ma("function"),Lm=Ma("number"),es=e=>e!==null&&typeof e=="object",YL=e=>e===!0||e===!1,Us=e=>{if(La(e)!=="object")return!1;const t=Xc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Im in e)&&!(Ra in e)},ZL=e=>{if(!es(e)||Qi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},XL=Qt("Date"),JL=Qt("File"),QL=Qt("Blob"),eM=Qt("FileList"),tM=e=>es(e)&&bt(e.pipe),nM=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bt(e.append)&&((t=La(e))==="formdata"||t==="object"&&bt(e.toString)&&e.toString()==="[object FormData]"))},rM=Qt("URLSearchParams"),[iM,sM,aM,oM]=["ReadableStream","Request","Response","Headers"].map(Qt),lM=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ts(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Zr(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Qi(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let o;for(r=0;r<a;r++)o=s[r],t.call(null,e[o],o,e)}}function Mm(e,t){if(Qi(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Jn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Dm=e=>!Kr(e)&&e!==Jn;function Xl(){const{caseless:e,skipUndefined:t}=Dm(this)&&this||{},n={},r=(i,s)=>{const a=e&&Mm(n,s)||s;Us(n[a])&&Us(i)?n[a]=Xl(n[a],i):Us(i)?n[a]=Xl({},i):Zr(i)?n[a]=i.slice():(!t||!Kr(i))&&(n[a]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&ts(arguments[i],r);return n}const cM=(e,t,n,{allOwnKeys:r}={})=>(ts(t,(i,s)=>{n&&bt(i)?e[s]=Om(i,n):e[s]=i},{allOwnKeys:r}),e),uM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),dM=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},fM=(e,t,n,r)=>{let i,s,a;const o={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],(!r||r(a,e,t))&&!o[a]&&(t[a]=e[a],o[a]=!0);e=n!==!1&&Xc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},hM=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},pM=e=>{if(!e)return null;if(Zr(e))return e;let t=e.length;if(!Lm(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},gM=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Xc(Uint8Array)),mM=(e,t)=>{const r=(e&&e[Ra]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},bM=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},yM=Qt("HTMLFormElement"),xM=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Hf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),EM=Qt("RegExp"),Pm=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ts(n,(i,s)=>{let a;(a=t(i,s,e))!==!1&&(r[s]=a||i)}),Object.defineProperties(e,r)},wM=e=>{Pm(e,(t,n)=>{if(bt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(bt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},vM=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Zr(e)?r(e):r(String(e).split(t)),n},_M=()=>{},kM=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function NM(e){return!!(e&&bt(e.append)&&e[Im]==="FormData"&&e[Ra])}const SM=e=>{const t=new Array(10),n=(r,i)=>{if(es(r)){if(t.indexOf(r)>=0)return;if(Qi(r))return r;if(!("toJSON"in r)){t[i]=r;const s=Zr(r)?[]:{};return ts(r,(a,o)=>{const l=n(a,i+1);!Kr(l)&&(s[o]=l)}),t[i]=void 0,s}}return r};return n(e,0)},AM=Qt("AsyncFunction"),TM=e=>e&&(es(e)||bt(e))&&bt(e.then)&&bt(e.catch),Bm=((e,t)=>e?setImmediate:t?((n,r)=>(Jn.addEventListener("message",({source:i,data:s})=>{i===Jn&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Jn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bt(Jn.postMessage)),CM=typeof queueMicrotask<"u"?queueMicrotask.bind(Jn):typeof process<"u"&&process.nextTick||Bm,OM=e=>e!=null&&bt(e[Ra]),L={isArray:Zr,isArrayBuffer:Rm,isBuffer:Qi,isFormData:nM,isArrayBufferView:VL,isString:WL,isNumber:Lm,isBoolean:YL,isObject:es,isPlainObject:Us,isEmptyObject:ZL,isReadableStream:iM,isRequest:sM,isResponse:aM,isHeaders:oM,isUndefined:Kr,isDate:XL,isFile:JL,isBlob:QL,isRegExp:EM,isFunction:bt,isStream:tM,isURLSearchParams:rM,isTypedArray:gM,isFileList:eM,forEach:ts,merge:Xl,extend:cM,trim:lM,stripBOM:uM,inherits:dM,toFlatObject:fM,kindOf:La,kindOfTest:Qt,endsWith:hM,toArray:pM,forEachEntry:mM,matchAll:bM,isHTMLForm:yM,hasOwnProperty:Hf,hasOwnProp:Hf,reduceDescriptors:Pm,freezeMethods:wM,toObjectSet:vM,toCamelCase:xM,noop:_M,toFiniteNumber:kM,findKey:Mm,global:Jn,isContextDefined:Dm,isSpecCompliantForm:NM,toJSONObject:SM,isAsyncFn:AM,isThenable:TM,setImmediate:Bm,asap:CM,isIterable:OM};function fe(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}L.inherits(fe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:L.toJSONObject(this.config),code:this.code,status:this.status}}});const Fm=fe.prototype,$m={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{$m[e]={value:e}});Object.defineProperties(fe,$m);Object.defineProperty(Fm,"isAxiosError",{value:!0});fe.from=(e,t,n,r,i,s)=>{const a=Object.create(Fm);L.toFlatObject(e,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const o=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return fe.call(a,o,l,n,r,i),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",s&&Object.assign(a,s),a};const IM=null;function Jl(e){return L.isPlainObject(e)||L.isArray(e)}function Um(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function Gf(e,t,n){return e?e.concat(t).map(function(i,s){return i=Um(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function RM(e){return L.isArray(e)&&!e.some(Jl)}const LM=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function Da(e,t,n){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,b){return!L.isUndefined(b[g])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(L.isDate(p))return p.toISOString();if(L.isBoolean(p))return p.toString();if(!l&&L.isBlob(p))throw new fe("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(p)||L.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,g,b){let y=p;if(p&&!b&&typeof p=="object"){if(L.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(L.isArray(p)&&RM(p)||(L.isFileList(p)||L.endsWith(g,"[]"))&&(y=L.toArray(p)))return g=Um(g),y.forEach(function(_,A){!(L.isUndefined(_)||_===null)&&t.append(a===!0?Gf([g],A,s):a===null?g:g+"[]",c(_))}),!1}return Jl(p)?!0:(t.append(Gf(b,g,s),c(p)),!1)}const d=[],h=Object.assign(LM,{defaultVisitor:u,convertValue:c,isVisitable:Jl});function f(p,g){if(!L.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(p),L.forEach(p,function(y,w){(!(L.isUndefined(y)||y===null)&&i.call(t,y,L.isString(w)?w.trim():w,g,h))===!0&&f(y,g?g.concat(w):[w])}),d.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return f(e),t}function Kf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Jc(e,t){this._pairs=[],e&&Da(e,this,t)}const qm=Jc.prototype;qm.append=function(t,n){this._pairs.push([t,n])};qm.toString=function(t){const n=t?function(r){return t.call(this,r,Kf)}:Kf;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function MM(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function jm(e,t,n){if(!t)return e;const r=n&&n.encode||MM;L.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=L.isURLSearchParams(t)?t.toString():new Jc(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Vf{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(r){r!==null&&t(r)})}}const zm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},DM=typeof URLSearchParams<"u"?URLSearchParams:Jc,PM=typeof FormData<"u"?FormData:null,BM=typeof Blob<"u"?Blob:null,FM={isBrowser:!0,classes:{URLSearchParams:DM,FormData:PM,Blob:BM},protocols:["http","https","file","blob","url","data"]},Qc=typeof window<"u"&&typeof document<"u",Ql=typeof navigator=="object"&&navigator||void 0,$M=Qc&&(!Ql||["ReactNative","NativeScript","NS"].indexOf(Ql.product)<0),UM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qM=Qc&&window.location.href||"http://localhost",jM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qc,hasStandardBrowserEnv:$M,hasStandardBrowserWebWorkerEnv:UM,navigator:Ql,origin:qM},Symbol.toStringTag,{value:"Module"})),et={...jM,...FM};function zM(e,t){return Da(e,new et.classes.URLSearchParams,{visitor:function(n,r,i,s){return et.isNode&&L.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function HM(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function GM(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function Hm(e){function t(n,r,i,s){let a=n[s++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),l=s>=n.length;return a=!a&&L.isArray(i)?i.length:a,l?(L.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!o):((!i[a]||!L.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],s)&&L.isArray(i[a])&&(i[a]=GM(i[a])),!o)}if(L.isFormData(e)&&L.isFunction(e.entries)){const n={};return L.forEachEntry(e,(r,i)=>{t(HM(r),i,n,0)}),n}return null}function KM(e,t,n){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ns={transitional:zm,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=L.isObject(t);if(s&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return i?JSON.stringify(Hm(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return zM(t,this.formSerializer).toString();if((o=L.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Da(o?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),KM(t)):t}],transformResponse:[function(t){const n=this.transitional||ns.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(o){if(a)throw o.name==="SyntaxError"?fe.from(o,fe.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],e=>{ns.headers[e]={}});const VM=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),WM=e=>{const t={};let n,r,i;return e&&e.split(`
183
+ `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&VM[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Wf=Symbol("internals");function yi(e){return e&&String(e).trim().toLowerCase()}function qs(e){return e===!1||e==null?e:L.isArray(e)?e.map(qs):String(e)}function YM(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const ZM=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function il(e,t,n,r,i){if(L.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!L.isString(t)){if(L.isString(r))return t.indexOf(r)!==-1;if(L.isRegExp(r))return r.test(t)}}function XM(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function JM(e,t){const n=L.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,a){return this[r].call(this,t,i,s,a)},configurable:!0})})}let yt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(o,l,c){const u=yi(l);if(!u)throw new Error("header name must be a non-empty string");const d=L.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=qs(o))}const a=(o,l)=>L.forEach(o,(c,u)=>s(c,u,l));if(L.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(L.isString(t)&&(t=t.trim())&&!ZM(t))a(WM(t),n);else if(L.isObject(t)&&L.isIterable(t)){let o={},l,c;for(const u of t){if(!L.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[c=u[0]]=(l=o[c])?L.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}a(o,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=yi(t),t){const r=L.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return YM(i);if(L.isFunction(n))return n.call(this,i,r);if(L.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=yi(t),t){const r=L.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||il(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(a){if(a=yi(a),a){const o=L.findKey(r,a);o&&(!n||il(r,r[o],o,n))&&(delete r[o],i=!0)}}return L.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||il(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return L.forEach(this,(i,s)=>{const a=L.findKey(r,s);if(a){n[a]=qs(i),delete n[s];return}const o=t?XM(s):String(s).trim();o!==s&&delete n[s],n[o]=qs(i),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return L.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&L.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
184
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Wf]=this[Wf]={accessors:{}}).accessors,i=this.prototype;function s(a){const o=yi(a);r[o]||(JM(i,a),r[o]=!0)}return L.isArray(t)?t.forEach(s):s(t),this}};yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(yt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});L.freezeMethods(yt);function sl(e,t){const n=this||ns,r=t||n,i=yt.from(r.headers);let s=r.data;return L.forEach(e,function(o){s=o.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Gm(e){return!!(e&&e.__CANCEL__)}function Xr(e,t,n){fe.call(this,e??"canceled",fe.ERR_CANCELED,t,n),this.name="CanceledError"}L.inherits(Xr,fe,{__CANCEL__:!0});function Km(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new fe("Request failed with status code "+n.status,[fe.ERR_BAD_REQUEST,fe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function QM(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function e2(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];a||(a=c),n[i]=l,r[i]=c;let d=s,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-a<t)return;const f=u&&c-u;return f?Math.round(h*1e3/f):void 0}}function t2(e,t){let n=0,r=1e3/t,i,s;const a=(c,u=Date.now())=>{n=u,i=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?a(c,u):(i=c,s||(s=setTimeout(()=>{s=null,a(i)},r-d)))},()=>i&&a(i)]}const sa=(e,t,n=3)=>{let r=0;const i=e2(50,250);return t2(s=>{const a=s.loaded,o=s.lengthComputable?s.total:void 0,l=a-r,c=i(l),u=a<=o;r=a;const d={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&u?(o-a)/c:void 0,event:s,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(d)},n)},Yf=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Zf=e=>(...t)=>L.asap(()=>e(...t)),n2=et.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,et.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(et.origin),et.navigator&&/(msie|trident)/i.test(et.navigator.userAgent)):()=>!0,r2=et.hasStandardBrowserEnv?{write(e,t,n,r,i,s,a){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];L.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),L.isString(r)&&o.push(`path=${r}`),L.isString(i)&&o.push(`domain=${i}`),s===!0&&o.push("secure"),L.isString(a)&&o.push(`SameSite=${a}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function i2(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function s2(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Vm(e,t,n){let r=!i2(t);return e&&(r||n==!1)?s2(e,t):t}const Xf=e=>e instanceof yt?{...e}:e;function ar(e,t){t=t||{};const n={};function r(c,u,d,h){return L.isPlainObject(c)&&L.isPlainObject(u)?L.merge.call({caseless:h},c,u):L.isPlainObject(u)?L.merge({},u):L.isArray(u)?u.slice():u}function i(c,u,d,h){if(L.isUndefined(u)){if(!L.isUndefined(c))return r(void 0,c,d,h)}else return r(c,u,d,h)}function s(c,u){if(!L.isUndefined(u))return r(void 0,u)}function a(c,u){if(L.isUndefined(u)){if(!L.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function o(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,u,d)=>i(Xf(c),Xf(u),d,!0)};return L.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||i,h=d(e[u],t[u],u);L.isUndefined(h)&&d!==o||(n[u]=h)}),n}const Wm=e=>{const t=ar({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:o}=t;if(t.headers=a=yt.from(a),t.url=jm(Vm(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),L.isFormData(n)){if(et.hasStandardBrowserEnv||et.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(L.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&a.set(u,d)})}}if(et.hasStandardBrowserEnv&&(r&&L.isFunction(r)&&(r=r(t)),r||r!==!1&&n2(t.url))){const l=i&&s&&r2.read(s);l&&a.set(i,l)}return t},a2=typeof XMLHttpRequest<"u",o2=a2&&function(e){return new Promise(function(n,r){const i=Wm(e);let s=i.data;const a=yt.from(i.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=i,u,d,h,f,p;function g(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function y(){if(!b)return;const _=yt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),O={data:!o||o==="text"||o==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:_,config:e,request:b};Km(function(D){n(D),g()},function(D){r(D),g()},O),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(y)},b.onabort=function(){b&&(r(new fe("Request aborted",fe.ECONNABORTED,e,b)),b=null)},b.onerror=function(A){const O=A&&A.message?A.message:"Network Error",N=new fe(O,fe.ERR_NETWORK,e,b);N.event=A||null,r(N),b=null},b.ontimeout=function(){let A=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const O=i.transitional||zm;i.timeoutErrorMessage&&(A=i.timeoutErrorMessage),r(new fe(A,O.clarifyTimeoutError?fe.ETIMEDOUT:fe.ECONNABORTED,e,b)),b=null},s===void 0&&a.setContentType(null),"setRequestHeader"in b&&L.forEach(a.toJSON(),function(A,O){b.setRequestHeader(O,A)}),L.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),o&&o!=="json"&&(b.responseType=i.responseType),c&&([h,p]=sa(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,f]=sa(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(u=_=>{b&&(r(!_||_.type?new Xr(null,e,b):_),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const w=QM(i.url);if(w&&et.protocols.indexOf(w)===-1){r(new fe("Unsupported protocol "+w+":",fe.ERR_BAD_REQUEST,e));return}b.send(s||null)})},l2=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,o();const u=c instanceof Error?c:this.reason;r.abort(u instanceof fe?u:new Xr(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,s(new fe(`timeout ${t} of ms exceeded`,fe.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>L.asap(o),l}},c2=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},u2=async function*(e,t){for await(const n of d2(e))yield*c2(n,t)},d2=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Jf=(e,t,n,r)=>{const i=u2(e,t);let s=0,a,o=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){o(),l.close();return}let d=u.byteLength;if(n){let h=s+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw o(c),c}},cancel(l){return o(l),i.return()}},{highWaterMark:2})},Qf=64*1024,{isFunction:Ls}=L,f2=(({Request:e,Response:t})=>({Request:e,Response:t}))(L.global),{ReadableStream:eh,TextEncoder:th}=L.global,nh=(e,...t)=>{try{return!!e(...t)}catch{return!1}},h2=e=>{e=L.merge.call({skipUndefined:!0},f2,e);const{fetch:t,Request:n,Response:r}=e,i=t?Ls(t):typeof fetch=="function",s=Ls(n),a=Ls(r);if(!i)return!1;const o=i&&Ls(eh),l=i&&(typeof th=="function"?(p=>g=>p.encode(g))(new th):async p=>new Uint8Array(await new n(p).arrayBuffer())),c=s&&o&&nh(()=>{let p=!1;const g=new n(et.origin,{body:new eh,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!g}),u=a&&o&&nh(()=>L.isReadableStream(new r("").body)),d={stream:u&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(g,b)=>{let y=g&&g[p];if(y)return y.call(g);throw new fe(`Response type '${p}' is not supported`,fe.ERR_NOT_SUPPORT,b)})});const h=async p=>{if(p==null)return 0;if(L.isBlob(p))return p.size;if(L.isSpecCompliantForm(p))return(await new n(et.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(L.isArrayBufferView(p)||L.isArrayBuffer(p))return p.byteLength;if(L.isURLSearchParams(p)&&(p=p+""),L.isString(p))return(await l(p)).byteLength},f=async(p,g)=>{const b=L.toFiniteNumber(p.getContentLength());return b??h(g)};return async p=>{let{url:g,method:b,data:y,signal:w,cancelToken:_,timeout:A,onDownloadProgress:O,onUploadProgress:N,responseType:D,headers:q,withCredentials:H="same-origin",fetchOptions:C}=Wm(p),F=t||fetch;D=D?(D+"").toLowerCase():"text";let M=l2([w,_&&_.toAbortSignal()],A),V=null;const z=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let Z;try{if(N&&c&&b!=="get"&&b!=="head"&&(Z=await f(q,y))!==0){let Y=new n(g,{method:"POST",body:y,duplex:"half"}),ae;if(L.isFormData(y)&&(ae=Y.headers.get("content-type"))&&q.setContentType(ae),Y.body){const[k,de]=Yf(Z,sa(Zf(N)));y=Jf(Y.body,Qf,k,de)}}L.isString(H)||(H=H?"include":"omit");const I=s&&"credentials"in n.prototype,U={...C,signal:M,method:b.toUpperCase(),headers:q.normalize().toJSON(),body:y,duplex:"half",credentials:I?H:void 0};V=s&&new n(g,U);let j=await(s?F(V,C):F(g,U));const W=u&&(D==="stream"||D==="response");if(u&&(O||W&&z)){const Y={};["status","statusText","headers"].forEach(re=>{Y[re]=j[re]});const ae=L.toFiniteNumber(j.headers.get("content-length")),[k,de]=O&&Yf(ae,sa(Zf(O),!0))||[];j=new r(Jf(j.body,Qf,k,()=>{de&&de(),z&&z()}),Y)}D=D||"text";let v=await d[L.findKey(d,D)||"text"](j,p);return!W&&z&&z(),await new Promise((Y,ae)=>{Km(Y,ae,{data:v,headers:yt.from(j.headers),status:j.status,statusText:j.statusText,config:p,request:V})})}catch(I){throw z&&z(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new fe("Network Error",fe.ERR_NETWORK,p,V),{cause:I.cause||I}):fe.from(I,I&&I.code,p,V)}}},p2=new Map,Ym=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let a=s.length,o=a,l,c,u=p2;for(;o--;)l=s[o],c=u.get(l),c===void 0&&u.set(l,c=o?new Map:h2(t)),u=c;return c};Ym();const eu={http:IM,xhr:o2,fetch:{get:Ym}};L.forEach(eu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const rh=e=>`- ${e}`,g2=e=>L.isFunction(e)||e===null||e===!1;function m2(e,t){e=L.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let a=0;a<n;a++){r=e[a];let o;if(i=r,!g2(r)&&(i=eu[(o=String(r)).toLowerCase()],i===void 0))throw new fe(`Unknown adapter '${o}'`);if(i&&(L.isFunction(i)||(i=i.get(t))))break;s[o||"#"+a]=i}if(!i){const a=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=n?a.length>1?`since :
185
+ `+a.map(rh).join(`
186
+ `):" "+rh(a[0]):"as no adapter specified";throw new fe("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i}const Zm={getAdapter:m2,adapters:eu};function al(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xr(null,e)}function ih(e){return al(e),e.headers=yt.from(e.headers),e.data=sl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Zm.getAdapter(e.adapter||ns.adapter,e)(e).then(function(r){return al(e),r.data=sl.call(e,e.transformResponse,r),r.headers=yt.from(r.headers),r},function(r){return Gm(r)||(al(e),r&&r.response&&(r.response.data=sl.call(e,e.transformResponse,r.response),r.response.headers=yt.from(r.response.headers))),Promise.reject(r)})}const Xm="1.13.2",Pa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Pa[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const sh={};Pa.transitional=function(t,n,r){function i(s,a){return"[Axios v"+Xm+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,o)=>{if(t===!1)throw new fe(i(a," has been removed"+(n?" in "+n:"")),fe.ERR_DEPRECATED);return n&&!sh[a]&&(sh[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,o):!0}};Pa.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function b2(e,t,n){if(typeof e!="object")throw new fe("options must be an object",fe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],a=t[s];if(a){const o=e[s],l=o===void 0||a(o,s,e);if(l!==!0)throw new fe("option "+s+" must be "+l,fe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new fe("Unknown option "+s,fe.ERR_BAD_OPTION)}}const js={assertOptions:b2,validators:Pa},rn=js.validators;let er=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Vf,response:new Vf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
187
+ `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ar(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&js.assertOptions(r,{silentJSONParsing:rn.transitional(rn.boolean),forcedJSONParsing:rn.transitional(rn.boolean),clarifyTimeoutError:rn.transitional(rn.boolean)},!1),i!=null&&(L.isFunction(i)?n.paramsSerializer={serialize:i}:js.assertOptions(i,{encode:rn.function,serialize:rn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),js.assertOptions(n,{baseUrl:rn.spelling("baseURL"),withXsrfToken:rn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&L.merge(s.common,s[n.method]);s&&L.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=yt.concat(a,s);const o=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,o.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,d=0,h;if(!l){const p=[ih.bind(this),void 0];for(p.unshift(...o),p.push(...c),h=p.length,u=Promise.resolve(n);d<h;)u=u.then(p[d++],p[d++]);return u}h=o.length;let f=n;for(;d<h;){const p=o[d++],g=o[d++];try{f=p(f)}catch(b){g.call(this,b);break}}try{u=ih.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=ar(this.defaults,t);const n=Vm(t.baseURL,t.url,t.allowAbsoluteUrls);return jm(n,t.params,t.paramsSerializer)}};L.forEach(["delete","get","head","options"],function(t){er.prototype[t]=function(n,r){return this.request(ar(r||{},{method:t,url:n,data:(r||{}).data}))}});L.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,o){return this.request(ar(o||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}er.prototype[t]=n(),er.prototype[t+"Form"]=n(!0)});let y2=class Jm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{r.subscribe(o),s=o}).then(i);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,o){r.reason||(r.reason=new Xr(s,a,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Jm(function(i){t=i}),cancel:t}}};function x2(e){return function(n){return e.apply(null,n)}}function E2(e){return L.isObject(e)&&e.isAxiosError===!0}const ec={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ec).forEach(([e,t])=>{ec[t]=e});function Qm(e){const t=new er(e),n=Om(er.prototype.request,t);return L.extend(n,er.prototype,t,{allOwnKeys:!0}),L.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Qm(ar(e,i))},n}const Me=Qm(ns);Me.Axios=er;Me.CanceledError=Xr;Me.CancelToken=y2;Me.isCancel=Gm;Me.VERSION=Xm;Me.toFormData=Da;Me.AxiosError=fe;Me.Cancel=Me.CanceledError;Me.all=function(t){return Promise.all(t)};Me.spread=x2;Me.isAxiosError=E2;Me.mergeConfig=ar;Me.AxiosHeaders=yt;Me.formToJSON=e=>Hm(L.isHTMLForm(e)?new FormData(e):e);Me.getAdapter=Zm.getAdapter;Me.HttpStatusCode=ec;Me.default=Me;const{Axios:aP,AxiosError:oP,CanceledError:lP,isCancel:cP,CancelToken:uP,VERSION:dP,all:fP,Cancel:hP,isAxiosError:pP,spread:gP,toFormData:mP,AxiosHeaders:bP,HttpStatusCode:yP,formToJSON:xP,getAdapter:EP,mergeConfig:wP}=Me,ot={ARTICLES:"/article",ARTICLES_FILTER:"/article/filter",ARTICLE_BY_ID:e=>`/article/${e}`,IMAGE_UPLOAD:"/Image/uploadImage",INSERT_WITH_AI:"/article/insertWithAI",UPDATE_WITH_AI:"/article/updateWithAI"};class eb{constructor(t){this.client=t}async uploadImage(t){const n=new FormData;n.append("file",t),console.log("[ArticleAPI] uploadImage - Request:",{fileName:t.name,fileSize:t.size});const r=await this.client.post(ot.IMAGE_UPLOAD,n,{headers:{"Content-Type":"multipart/form-data"}});return console.log("[ArticleAPI] uploadImage - Response:",r.data),r.data}async listArticles(t,n=1,r=10){const i={page:n,pageSize:r};t&&(i.categoryId=t),console.log("[ArticleAPI] listArticles - Request:",{url:ot.ARTICLES,params:i});const s=await this.client.get(ot.ARTICLES,{params:i});return console.log("[ArticleAPI] listArticles - Response:",s.data),this.transformArticleDates(s.data)}async filterArticles(t,n,r=1,i=10){const s={page:r,pageSize:i};t&&t.length>0&&(s.roles=t.join(",")),n!==void 0&&(s.parentId=n);const a=await this.client.get(ot.ARTICLES_FILTER,{params:s});return this.transformArticleDates(a.data)}async getArticleById(t){const n=await this.client.get(ot.ARTICLE_BY_ID(t));return this.transformArticleDate(n.data)}async createArticle(t){console.log("[ArticleAPI] createArticle - Request:",{url:ot.ARTICLES,data:t});const n=await this.client.post(ot.ARTICLES,t);return console.log("[ArticleAPI] createArticle - Response:",n.data),this.transformArticleDate(n.data)}async updateArticle(t){console.log("[ArticleAPI] updateArticle - Request:",{url:ot.ARTICLES,data:t});const n=await this.client.put(ot.ARTICLES,t);return console.log("[ArticleAPI] updateArticle - Response:",n.data),this.transformArticleDate(n.data)}async deleteArticle(t){console.log("[ArticleAPI] deleteArticle - Request:",{id:t,url:ot.ARTICLE_BY_ID(t)}),await this.client.delete(ot.ARTICLE_BY_ID(t)),console.log("[ArticleAPI] deleteArticle - Success")}async createArticleWithAI(t){console.log("[ArticleAPI] createArticleWithAI - Request:",{url:ot.INSERT_WITH_AI,data:t});const n=await this.client.post(ot.INSERT_WITH_AI,t);return console.log("[ArticleAPI] createArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}async updateArticleWithAI(t){if(!t.articleId)throw new Error("articleId is required for updateWithAI");console.log("[ArticleAPI] updateArticleWithAI - Request:",{url:ot.UPDATE_WITH_AI,data:t});const n=await this.client.put(ot.UPDATE_WITH_AI,t);return console.log("[ArticleAPI] updateArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}transformArticleDate(t){return{...t,dateAt:t.dateAt?new Date(t.dateAt):void 0,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0,category:t.category?{...t.category,createdAt:t.category.createdAt?new Date(t.category.createdAt):void 0,updatedAt:t.category.updatedAt?new Date(t.category.updatedAt):void 0}:void 0}}transformArticleDates(t){return{...t,items:t.items.map(n=>this.transformArticleDate(n))}}}const sn={CATEGORIES:"/category",CATEGORIES_FILTER:"/category/filter",CATEGORY_BY_ID:e=>`/category/${e}`};class tb{constructor(t){this.client=t}async listCategories(){console.log("[CategoryAPI] listCategories - Request:",{url:sn.CATEGORIES});const t=await this.client.get(sn.CATEGORIES);return console.log("[CategoryAPI] listCategories - Response:",t.data),this.transformCategoryDates(t.data)}async filterCategories(t,n){const r={};t&&t.length>0&&(r.roles=t.join(",")),n!==void 0&&(r.parentId=n);const i=await this.client.get(sn.CATEGORIES_FILTER,{params:r});return this.transformCategoryDates(i.data)}async getCategoryById(t){const n=await this.client.get(sn.CATEGORY_BY_ID(t));return this.transformCategoryDate(n.data)}async createCategory(t){console.log("[CategoryAPI] createCategory - Request:",{url:sn.CATEGORIES,data:t});const n=await this.client.post(sn.CATEGORIES,t);return console.log("[CategoryAPI] createCategory - Response:",n.data),this.transformCategoryDate(n.data)}async updateCategory(t){console.log("[CategoryAPI] updateCategory - Request:",{url:sn.CATEGORIES,data:t});const n=await this.client.put(sn.CATEGORIES,t);return console.log("[CategoryAPI] updateCategory - Response:",n.data),this.transformCategoryDate(n.data)}async deleteCategory(t){console.log("[CategoryAPI] deleteCategory - Request:",{id:t,url:sn.CATEGORY_BY_ID(t)}),await this.client.delete(sn.CATEGORY_BY_ID(t)),console.log("[CategoryAPI] deleteCategory - Success")}transformCategoryDate(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0}}transformCategoryDates(t){return t.map(n=>this.transformCategoryDate(n))}}const zt={TAGS:"/tag",TAG_BY_ID:e=>`/tag/${e}`,TAG_MERGE:(e,t)=>`/Tag/merge/${e}/${t}`};class nb{constructor(t){this.client=t}async listTags(){console.log("[TagAPI] listTags - Request:",{url:zt.TAGS});const t=await this.client.get(zt.TAGS);return console.log("[TagAPI] listTags - Response:",t.data),t.data}async getTagById(t){console.log("[TagAPI] getTagById - Request:",{id:t,url:zt.TAG_BY_ID(t)});const n=await this.client.get(zt.TAG_BY_ID(t));return console.log("[TagAPI] getTagById - Response:",n.data),n.data}async createTag(t){console.log("[TagAPI] createTag - Request:",{url:zt.TAGS,data:t});const n=await this.client.post(zt.TAGS,t);return console.log("[TagAPI] createTag - Response:",n.data),n.data}async updateTag(t){console.log("[TagAPI] updateTag - Request:",{url:zt.TAGS,data:t});const n=await this.client.put(zt.TAGS,t);return console.log("[TagAPI] updateTag - Response:",n.data),n.data}async deleteTag(t){console.log("[TagAPI] deleteTag - Request:",{id:t,url:zt.TAG_BY_ID(t)}),await this.client.delete(zt.TAG_BY_ID(t)),console.log("[TagAPI] deleteTag - Success")}async mergeTags(t,n){const r=zt.TAG_MERGE(t,n);console.log("[TagAPI] mergeTags - Request:",{url:r,sourceTagId:t,targetTagId:n}),await this.client.post(r),console.log("[TagAPI] mergeTags - Success")}}const rb=$.createContext(void 0);function w2({config:e,children:t}){const n=$.useMemo(()=>Eh(e.language,e.translations),[e.language,e.translations]),r=$.useRef(e.language);$.useEffect(()=>{e.language&&e.language!==r.current&&(n.changeLanguage(e.language),r.current=e.language)},[e.language,n]);const i=$.useRef(e);$.useEffect(()=>{var a;i.current=e,console.log("[NNews] Config updated:",{apiUrl:e.apiUrl,hasAuthHeader:!!((a=e.headers)!=null&&a.Authorization)})},[e]);const s=$.useMemo(()=>{const a=e.apiClient||Me.create({baseURL:e.apiUrl,headers:{"Content-Type":"application/json"}});a.interceptors.request.use(u=>{var h,f,p;const d=i.current.headers;return d&&Object.entries(d).forEach(([g,b])=>{b&&u.headers.set(g,b)}),console.log("[NNews] Request interceptor:",{method:(h=u.method)==null?void 0:h.toUpperCase(),url:`${u.baseURL||""}${u.url||""}`,headers:{Authorization:((f=u.headers)==null?void 0:f.Authorization)||"(not set)","Content-Type":((p=u.headers)==null?void 0:p["Content-Type"])||"(not set)"}}),u});const o=new eb(a),l=new tb(a),c=new nb(a);return{config:e,apiClient:a,articleApi:o,categoryApi:l,tagApi:c}},[e.apiUrl,e.apiClient]);return E.jsx(_y,{i18n:n,children:E.jsx(rb.Provider,{value:s,children:t})})}function Jr(){const e=$.useContext(rb);if(!e)throw new Error("useNNews must be used within a NNewsProvider");return e}function v2({article:e,categories:t=[],availableRoles:n,onFetchRoles:r,onSave:i,onCancel:s,loading:a=!1}){const{articleApi:o}=Jr(),{t:l}=Pt(),[c,u]=$.useState(""),[d,h]=$.useState(""),[f,p]=$.useState(""),[g,b]=$.useState(""),[y,w]=$.useState(!1),[_,A]=$.useState(qe.Draft),[O,N]=$.useState(null),[D,q]=$.useState(""),[H,C]=$.useState(""),[F,M]=$.useState(!0),[V,z]=$.useState(new Set),[Z,I]=$.useState([]),[U,j]=$.useState(!1),[W,v]=$.useState({});$.useEffect(()=>{var X;e&&(u(e.title),h(e.content),p(e.imageName||""),console.log("imageName:",e.imageName),e.imageName&&b(e.imageName),A(e.status),N(e.categoryId||null),q(e.dateAt?new Date(e.dateAt).toISOString().slice(0,16):""),C(((X=e.tags)==null?void 0:X.map(ye=>ye.title).join(", "))||""),e.roles&&e.roles.length>0?(M(!1),z(new Set(e.roles.map(ye=>ye.slug)))):(M(!0),z(new Set)))},[e]);const Y=n||Z;$.useEffect(()=>{if(n&&n.length>0||!r)return;let X=!1;return j(!0),r().then(ye=>{X||I(ye)}).catch(ye=>{console.warn("Failed to fetch roles:",ye)}).finally(()=>{X||j(!1)}),()=>{X=!0}},[n,r]);const ae=$.useCallback(X=>{M(X),X&&z(new Set)},[]),k=$.useCallback(X=>{z(ye=>{const Se=new Set(ye);return Se.has(X)?Se.delete(X):Se.add(X),Se})},[]),de=()=>{const X={};return c.trim()||(X.title=l("validation.titleRequired")),d.trim()||(X.content=l("validation.contentRequired")),v(X),Object.keys(X).length===0},re=async X=>{if(X.preventDefault(),!de())return;const ye=F?[]:Array.from(V),Se={title:c.trim(),content:d.trim(),imageName:f||void 0,status:_,categoryId:O||void 0,dateAt:D||void 0,tagList:H.trim()||void 0,roles:ye.length>0?ye:void 0};e?await i({articleId:e.articleId,...Se}):await i(Se)},_e=async X=>{var je;const ye=(je=X.target.files)==null?void 0:je[0];if(!ye)return;if(!ye.type.startsWith("image/")){v({...W,image:l("validation.imageFileType")});return}if(ye.size>5*1024*1024){v({...W,image:l("validation.imageSizeLimit")});return}v({...W,image:""});const Se=new FileReader;Se.onloadend=()=>{b(Se.result)},Se.readAsDataURL(ye);try{w(!0);const it=await o.uploadImage(ye);p(it),v({...W,image:""})}catch(it){console.error("Error uploading image:",it),v({...W,image:l("validation.imageUploadFailed")})}finally{w(!1)}},Ve=()=>{b(""),p("")};return E.jsxs("form",{onSubmit:re,className:"space-y-6",children:[E.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[E.jsxs("div",{className:"col-span-2 p-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:l("common.titleRequired")}),E.jsx("input",{id:"title",type:"text",value:c,onChange:X=>u(X.target.value),className:`w-full rounded-md border ${W.title?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"} px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:l("articleEditor.enterTitle")}),W.title&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:W.title})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"dateAt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:l("articleEditor.publicationDate")}),E.jsx("input",{id:"dateAt",type:"datetime-local",value:D,onChange:X=>q(X.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:l("articleEditor.category")}),E.jsxs("select",{id:"category",value:O||"",onChange:X=>N(X.target.value?Number(X.target.value):null),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:l("common.noCategory")}),t.map(X=>E.jsx("option",{value:X.categoryId,children:X.title},X.categoryId))]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"status",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:l("articleEditor.status")}),E.jsxs("select",{id:"status",value:_,onChange:X=>A(Number(X.target.value)),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:qe.Draft,children:l("articleEditor.statusDraft")}),E.jsx("option",{value:qe.Published,children:l("articleEditor.statusPublished")}),E.jsx("option",{value:qe.Archived,children:l("articleEditor.statusArchived")}),E.jsx("option",{value:qe.Scheduled,children:l("articleEditor.statusScheduled")}),E.jsx("option",{value:qe.Review,children:l("articleEditor.statusReview")})]})]})]}),E.jsx("div",{className:"col-span-1",children:E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"image",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:l("articleEditor.featuredImage")}),g?E.jsxs("div",{className:"relative",children:[E.jsx("img",{src:g,alt:"Preview",className:"w-full h-[250px] object-cover rounded-md border border-gray-300 dark:border-gray-600",style:{height:"250px"}}),E.jsx("button",{type:"button",onClick:Ve,className:"absolute top-2 right-2 rounded-full bg-red-600 p-2 text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500",disabled:y,style:{top:"2px",right:"2px"},children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:E.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),y&&E.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black bg-opacity-50 rounded-md",children:E.jsx("span",{className:"text-white text-sm",children:l("articleEditor.uploading")})})]}):E.jsx("div",{className:"flex items-center",children:E.jsx("input",{id:"image",type:"file",accept:"image/*",onChange:_e,disabled:y,className:"block w-full text-sm text-gray-900 dark:text-gray-100 border border-gray-300 dark:border-gray-600 rounded-md cursor-pointer bg-white dark:bg-gray-900 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500"})}),W.image&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:W.image}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l("articleEditor.imageHint")})]})})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:l("articleEditor.contentLabel")}),E.jsx(Cm,{value:d,onChange:h,placeholder:l("articleEditor.contentPlaceholder"),error:W.content}),W.content&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:W.content})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"tags",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:l("articleEditor.tags")}),E.jsx("input",{id:"tags",type:"text",value:H,onChange:X=>C(X.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:l("articleEditor.tagsPlaceholder")}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l("articleEditor.tagsHint")})]}),E.jsxs("div",{className:"space-y-3",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:l("articleEditor.visibility")}),E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("input",{type:"checkbox",checked:F,onChange:X=>ae(X.target.checked),className:"h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500"}),E.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:l("articleEditor.visibleToAll")})]}),!F&&E.jsx("div",{className:"ml-6 space-y-2",children:U?E.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:l("articleEditor.loadingRoles")}):Y.length>0?E.jsxs("div",{className:"space-y-2",children:[E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l("articleEditor.selectRolesHint")}),Y.map(X=>E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("input",{type:"checkbox",checked:V.has(X.slug),onChange:()=>k(X.slug),className:"h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500"}),E.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:X.name})]},X.slug))]}):E.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:l("articleEditor.noRolesAvailable")})})]}),E.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[E.jsx("button",{type:"button",onClick:s,disabled:a,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50",children:l("common.cancel")}),E.jsx("button",{type:"submit",disabled:a,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:l(a?"common.saving":e?"articleEditor.updateArticle":"articleEditor.createArticle")})]})]})}function _2({mode:e,articleId:t,isOpen:n,onSuccess:r,onClose:i}){const{articleApi:s}=Jr(),{t:a}=Pt(),[o,l]=$.useState(""),[c,u]=$.useState(!1),[d,h]=$.useState(!1),[f,p]=$.useState(null),[g,b]=$.useState(""),y=()=>o.trim()?o.trim().length<10?(p(a("validation.promptMinLength")),!1):o.length>2e3?(p(a("validation.promptMaxLength")),!1):!0:(p(a("validation.promptRequired")),!1),w=async()=>{if(y()){if(e==="update"&&!t){p(a("validation.articleIdRequired"));return}h(!0),p(null),b(a(e==="create"?"aiGenerator.creatingWithAI":"aiGenerator.updatingWithAI"));try{const N={...e==="update"&&t&&{articleId:t},prompt:o.trim(),generateImage:c};c&&b(a("aiGenerator.generatingContentImage"));let D;e==="create"?D=await s.createArticleWithAI(N):D=await s.updateArticleWithAI(N),b(""),r(D),l(""),u(!1),i()}catch(N){console.error("Error generating article with AI:",N),p(N.message||a("aiGenerator.generationFailed")),b("")}finally{h(!1)}}},_=()=>{d||(l(""),u(!1),p(null),i())},A=a(e==="create"?"aiGenerator.createPlaceholder":"aiGenerator.updatePlaceholder"),O=()=>{const N="w-full rounded-md border px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",D=f&&!o.trim()?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600";return`${N} ${D}`};return n?E.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:E.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4 text-center sm:p-0",children:[E.jsx("div",{className:"fixed inset-0 bg-gray-500 dark:bg-gray-900 bg-opacity-75 dark:bg-opacity-75 transition-opacity",onClick:_}),E.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-2xl",children:[E.jsxs("div",{className:"bg-white dark:bg-gray-800 px-6 pb-4 pt-5",children:[E.jsxs("div",{className:"flex items-start justify-between mb-4",children:[E.jsxs("div",{className:"flex items-start gap-3",children:[E.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900",children:E.jsx("svg",{className:"h-6 w-6 text-blue-600 dark:text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),E.jsxs("div",{children:[E.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",id:"modal-title",children:a(e==="create"?"aiGenerator.createTitle":"aiGenerator.updateTitle")}),E.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:a(e==="create"?"aiGenerator.createDescription":"aiGenerator.updateDescription")})]})]}),E.jsxs("button",{type:"button",onClick:_,disabled:d,className:"rounded-md text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 disabled:opacity-50",children:[E.jsx("span",{className:"sr-only",children:a("common.close")}),E.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]})]}),E.jsxs("div",{className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"prompt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:a("aiGenerator.descriptionLabel")}),E.jsx("textarea",{id:"prompt",value:o,onChange:N=>l(N.target.value),rows:6,disabled:d,className:O(),placeholder:A,minLength:10,maxLength:2e3}),E.jsxs("div",{className:"flex justify-between items-center",children:[E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:a("aiGenerator.characterCount",{count:o.length})}),f&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:f})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("input",{type:"checkbox",checked:c,onChange:N=>u(N.target.checked),disabled:d,className:"h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"}),E.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:a("aiGenerator.generateImage")})]}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 ml-6",children:a("aiGenerator.generateImageHint")})]}),d&&g&&E.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-800 bg-yellow-50 dark:bg-yellow-900/20 p-4",children:E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsxs("svg",{className:"h-5 w-5 text-yellow-600 dark:text-yellow-400 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[E.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),E.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),E.jsxs("div",{children:[E.jsx("p",{className:"text-sm font-medium text-yellow-900 dark:text-yellow-100",children:g}),E.jsx("p",{className:"text-xs text-yellow-700 dark:text-yellow-300 mt-1",children:a("common.pleaseWait")})]})]})})]})]}),E.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 px-6 py-4 flex justify-end gap-3",children:[E.jsx("button",{type:"button",onClick:_,disabled:d,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",children:a("common.cancel")}),E.jsx("button",{type:"button",onClick:w,disabled:d||o.trim().length<10,className:"rounded-md bg-gradient-to-r from-blue-600 to-purple-600 px-6 py-2 text-white hover:from-blue-700 hover:to-purple-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:d?E.jsxs(E.Fragment,{children:[E.jsxs("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[E.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),E.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),E.jsx("span",{children:a("aiGenerator.generating")})]}):E.jsxs(E.Fragment,{children:[E.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),E.jsx("span",{children:a(e==="create"?"aiGenerator.createWithAI":"aiGenerator.updateWithAI")})]})})]})]})]})}):null}function k2({value:e,onChange:t,placeholder:n,label:r,error:i,minHeight:s="400px"}){const{t:a}=Pt(),[o,l]=$.useState("edit"),c=n||a("markdownEditor.placeholder");return E.jsxs("div",{className:"space-y-2",children:[r&&E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r}),E.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900",children:[E.jsxs("div",{className:"flex border-b border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800",children:[E.jsx("button",{type:"button",onClick:()=>l("edit"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="edit"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:a("markdownEditor.editTab")}),E.jsx("button",{type:"button",onClick:()=>l("preview"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="preview"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:a("markdownEditor.previewTab")})]}),E.jsx("div",{style:{minHeight:s},children:o==="edit"?E.jsx("textarea",{value:e,onChange:u=>t(u.target.value),placeholder:c,className:"h-full w-full resize-none border-0 p-4 font-mono text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-0",style:{minHeight:s}}):E.jsx("div",{className:"prose dark:prose-invert max-w-none p-4 text-gray-900 dark:text-gray-100",children:e?E.jsx(sp,{remarkPlugins:[Dp],rehypePlugins:[yg],children:e}):E.jsx("div",{className:"text-gray-400 dark:text-gray-500",children:a("markdownEditor.nothingToPreview")})})})]}),i&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:i}),E.jsxs("div",{className:"rounded-md bg-gray-50 dark:bg-gray-800 p-3 text-xs text-gray-600 dark:text-gray-400",children:[E.jsx("p",{className:"font-medium",children:a("markdownEditor.syntaxHelp")}),E.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[E.jsxs("div",{children:[E.jsx("strong",{children:"# Heading 1"})," - ",a("markdownEditor.heading1")]}),E.jsxs("div",{children:[E.jsx("strong",{children:"## Heading 2"})," - ",a("markdownEditor.heading2")]}),E.jsxs("div",{children:[E.jsx("strong",{children:"**bold text**"})," - ",a("markdownEditor.bold")]}),E.jsxs("div",{children:[E.jsx("strong",{children:"*italic text*"})," - ",a("markdownEditor.italic")]}),E.jsxs("div",{children:[E.jsx("strong",{children:"[link](url)"})," - ",a("markdownEditor.link")]}),E.jsxs("div",{children:[E.jsx("strong",{children:"![alt](image.jpg)"})," - ",a("markdownEditor.image")]}),E.jsxs("div",{children:[E.jsx("strong",{children:"- item"})," - ",a("markdownEditor.bulletList")]}),E.jsxs("div",{children:[E.jsx("strong",{children:"1. item"})," - ",a("markdownEditor.numberedList")]}),E.jsxs("div",{children:[E.jsx("strong",{children:"`code`"})," - ",a("markdownEditor.inlineCode")]}),E.jsxs("div",{children:[E.jsx("strong",{children:"```language```"})," - ",a("markdownEditor.codeBlock")]})]})]})]})}/**
172
188
  * @license lucide-react v0.462.0 - ISC
173
189
  *
174
190
  * This source code is licensed under the ISC license.
175
191
  * See the LICENSE file in the root directory of this source tree.
176
- */const zL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
192
+ */const N2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ib=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
177
193
  * @license lucide-react v0.462.0 - ISC
178
194
  *
179
195
  * This source code is licensed under the ISC license.
180
196
  * See the LICENSE file in the root directory of this source tree.
181
- */var jL={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
197
+ */var S2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
182
198
  * @license lucide-react v0.462.0 - ISC
183
199
  *
184
200
  * This source code is licensed under the ISC license.
185
201
  * See the LICENSE file in the root directory of this source tree.
186
- */const HL=q.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>q.createElement("svg",{ref:l,...jL,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:lm("lucide",i),...a},[...o.map(([c,u])=>q.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
202
+ */const A2=$.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...o},l)=>$.createElement("svg",{ref:l,...S2,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ib("lucide",i),...o},[...a.map(([c,u])=>$.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
187
203
  * @license lucide-react v0.462.0 - ISC
188
204
  *
189
205
  * This source code is licensed under the ISC license.
190
206
  * See the LICENSE file in the root directory of this source tree.
191
- */const Oc=(e,t)=>{const n=q.forwardRef(({className:r,...i},s)=>q.createElement(HL,{ref:s,iconNode:t,className:lm(`lucide-${zL(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
207
+ */const tu=(e,t)=>{const n=$.forwardRef(({className:r,...i},s)=>$.createElement(A2,{ref:s,iconNode:t,className:ib(`lucide-${N2(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
192
208
  * @license lucide-react v0.462.0 - ISC
193
209
  *
194
210
  * This source code is licensed under the ISC license.
195
211
  * See the LICENSE file in the root directory of this source tree.
196
- */const GL=Oc("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
212
+ */const T2=tu("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
197
213
  * @license lucide-react v0.462.0 - ISC
198
214
  *
199
215
  * This source code is licensed under the ISC license.
200
216
  * See the LICENSE file in the root directory of this source tree.
201
- */const cm=Oc("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
217
+ */const sb=tu("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
202
218
  * @license lucide-react v0.462.0 - ISC
203
219
  *
204
220
  * This source code is licensed under the ISC license.
205
221
  * See the LICENSE file in the root directory of this source tree.
206
- */const um=Oc("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function KL({categories:e,loading:t=!1,error:n=null,onCategoryClick:r,onEditClick:i,onDeleteClick:s,showActions:o=!1,emptyMessage:a="No categories found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading categories..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading categories: ",n.message]})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:a})}):E.jsx("div",{className:"w-full overflow-x-auto",children:E.jsxs("table",{className:"w-full table-fixed divide-y divide-gray-200 dark:divide-gray-700",children:[E.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800",children:E.jsxs("tr",{children:[E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[40%]",children:"Title"}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[20%]",children:"Articles"}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[25%]",children:"Parent"}),o&&E.jsx("th",{scope:"col",className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[15%]",children:"Actions"})]})}),E.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.map(l=>E.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100",children:E.jsx("div",{className:r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":"",onClick:()=>r==null?void 0:r(l),children:l.title})}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.articleCount||0}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.parentId?`Parent ID: ${l.parentId}`:"-"}),o&&E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:E.jsxs("div",{className:"flex justify-end gap-2",children:[i&&E.jsx("button",{onClick:()=>i(l),className:"text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 transition-colors",title:"Edit",children:E.jsx(cm,{className:"h-4 w-4"})}),s&&E.jsx("button",{onClick:()=>s(l),className:"text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300 transition-colors",title:"Delete",children:E.jsx(um,{className:"h-4 w-4"})})]})})]},l.categoryId))})]})})}function WL({category:e,categories:t=[],isOpen:n,onClose:r,onSave:i,loading:s=!1}){const[o,a]=q.useState(""),[l,c]=q.useState(null),[u,d]=q.useState({});q.useEffect(()=>{e?(a(e.title),c(e.parentId||null)):h()},[e,n]);const h=()=>{a(""),c(null),d({})},f=()=>{const b={};return o.trim()||(b.title="Title is required"),d(b),Object.keys(b).length===0},p=async b=>{if(b.preventDefault(),!f())return;const y={title:o.trim(),parentId:l||void 0};try{e?await i({categoryId:e.categoryId,...y}):await i(y),r()}catch(_){console.error("Failed to save category:",_)}};if(!n)return null;const m=t.filter(b=>b.categoryId!==(e==null?void 0:e.categoryId));return E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Category":"Create Category"}),E.jsxs("form",{onSubmit:p,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:o,onChange:b=>a(b.target.value),className:`w-full rounded-md border ${u.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter category title"}),u.title&&E.jsx("p",{className:"text-sm text-red-600",children:u.title})]}),m.length>0&&E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"parent",className:"block text-sm font-medium text-gray-700",children:"Parent Category"}),E.jsxs("select",{id:"parent",value:l||"",onChange:b=>c(b.target.value?Number(b.target.value):null),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:"None (Top Level)"}),m.map(b=>E.jsx("option",{value:b.categoryId,children:b.title},b.categoryId))]})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:s,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:s?"Saving...":e?"Update":"Create"})]})]})]})})}function VL({tags:e,loading:t=!1,error:n=null,onTagClick:r,onEditClick:i,onDeleteClick:s,onMergeClick:o,showActions:a=!1,emptyMessage:l="No tags found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading tags..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading tags: ",n.message]})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:l})}):E.jsx("div",{className:"flex flex-wrap gap-3",children:e.map(c=>E.jsxs("div",{className:"group relative flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2 shadow-sm hover:shadow-md transition-shadow",children:[E.jsxs("span",{className:`text-sm font-medium text-gray-900 ${r?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>r==null?void 0:r(c),children:["#",c.title]}),c.articleCount!==void 0&&E.jsx("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full",children:c.articleCount}),a&&(i||s||o)&&E.jsxs("div",{className:"flex gap-1 ml-2",children:[i&&E.jsx("button",{onClick:()=>i(c),className:"rounded p-1 text-blue-600 hover:bg-blue-50 transition-colors",title:"Edit",children:E.jsx(cm,{className:"h-4 w-4"})}),o&&E.jsx("button",{onClick:()=>o(c),className:"rounded p-1 text-purple-600 hover:bg-purple-50 transition-colors",title:"Merge",children:E.jsx(GL,{className:"h-4 w-4"})}),s&&E.jsx("button",{onClick:()=>s(c),className:"rounded p-1 text-red-600 hover:bg-red-50 transition-colors",title:"Delete",children:E.jsx(um,{className:"h-4 w-4"})})]})]},c.tagId))})}function YL({tag:e,isOpen:t,onClose:n,onSave:r,loading:i=!1}){const[s,o]=q.useState(""),[a,l]=q.useState(""),[c,u]=q.useState({});q.useEffect(()=>{e?(o(e.title),l(e.slug||"")):d()},[e,t]);const d=()=>{o(""),l(""),u({})},h=()=>{const p={};return s.trim()||(p.title="Title is required"),u(p),Object.keys(p).length===0},f=async p=>{if(p.preventDefault(),!h())return;const m={title:s.trim(),slug:a.trim()||void 0};try{e?await r({tagId:e.tagId,...m}):await r(m),n()}catch(b){console.error("Failed to save tag:",b)}};return t?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Tag":"Create Tag"}),E.jsxs("form",{onSubmit:f,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:s,onChange:p=>o(p.target.value),className:`w-full rounded-md border ${c.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter tag title"}),c.title&&E.jsx("p",{className:"text-sm text-red-600",children:c.title})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-gray-700",children:"Slug"}),E.jsx("input",{id:"slug",type:"text",value:a,onChange:p=>l(p.target.value),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"tag-slug (optional)"}),E.jsx("p",{className:"text-xs text-gray-500",children:"URL-friendly version of the title. Leave empty to auto-generate."})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:n,disabled:i,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:i?"Saving...":e?"Update":"Create"})]})]})]})}):null}function ZL({sourceTag:e,availableTags:t,isOpen:n,onClose:r,onMerge:i,loading:s=!1}){const[o,a]=q.useState(null),[l,c]=q.useState({}),u=t.filter(f=>f.tagId!==e.tagId);q.useEffect(()=>{n||(a(null),c({}))},[n]);const d=()=>{const f={};return o||(f.targetTag="Please select a target tag"),c(f),Object.keys(f).length===0},h=async f=>{if(f.preventDefault(),!(!d()||!o))try{await i(e.tagId||0,o),r()}catch(p){console.error("Failed to merge tags:",p)}};return n?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:"Merge Tags"}),E.jsx("div",{className:"mb-6 rounded-md bg-blue-50 p-4",children:E.jsxs("p",{className:"text-sm text-blue-800",children:["All articles tagged with"," ",E.jsxs("strong",{className:"font-semibold",children:["#",e.title]})," will be moved to the selected target tag, and the source tag will be deleted."]})}),E.jsxs("form",{onSubmit:h,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Source Tag"}),E.jsxs("div",{className:"rounded-md border border-gray-300 bg-gray-50 px-4 py-2",children:[E.jsxs("span",{className:"font-medium text-gray-900",children:["#",e.title]}),e.slug&&E.jsxs("span",{className:"ml-2 text-xs font-mono text-gray-500",children:["(",e.slug,")"]})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"targetTag",className:"block text-sm font-medium text-gray-700",children:"Target Tag *"}),E.jsxs("select",{id:"targetTag",value:o||"",onChange:f=>a(Number(f.target.value)),className:`w-full rounded-md border ${l.targetTag?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,children:[E.jsx("option",{value:"",children:"Select target tag"}),u.map(f=>E.jsxs("option",{value:f.tagId,children:["#",f.title," ",f.slug?`(${f.slug})`:""]},f.tagId))]}),l.targetTag&&E.jsx("p",{className:"text-sm text-red-600",children:l.targetTag}),E.jsx("p",{className:"text-xs text-gray-500",children:"Select the tag that will receive all articles from the source tag"})]}),u.length===0&&E.jsx("div",{className:"rounded-md bg-yellow-50 p-4",children:E.jsx("p",{className:"text-sm text-yellow-800",children:"No other tags available. You need at least 2 tags to perform a merge."})}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:s||u.length===0,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:s?"Merging...":"Merge Tags"})]})]})]})}):null}function XL(){const{articleApi:e}=Gr(),[t,n]=q.useState(null),[r,i]=q.useState(!1),[s,o]=q.useState(null),[a,l]=q.useState(),c=q.useCallback(async m=>{i(!0),o(null),l(m);try{let b;m!=null&&m.roles&&m.roles.length>0?b=await e.filterArticles(m.roles,m.categoryId,m.page,m.pageSize):b=await e.listArticles(m==null?void 0:m.categoryId,m==null?void 0:m.page,m==null?void 0:m.pageSize),n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch articles");throw o(y),y}finally{i(!1)}},[e]),u=q.useCallback(async m=>{i(!0),o(null);try{return await e.getArticleById(m)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch article");throw o(y),y}finally{i(!1)}},[e]),d=q.useCallback(async m=>{i(!0),o(null);try{const b=await e.createArticle(m);return a&&await c(a),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create article");throw o(y),y}finally{i(!1)}},[e,a,c]),h=q.useCallback(async m=>{i(!0),o(null);try{const b=await e.updateArticle(m);return a&&await c(a),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update article");throw o(y),y}finally{i(!1)}},[e,a,c]),f=q.useCallback(async m=>{i(!0),o(null);try{await e.deleteArticle(m),a&&await c(a)}catch(b){const y=b instanceof Error?b:new Error("Failed to delete article");throw o(y),y}finally{i(!1)}},[e,a,c]),p=q.useCallback(async()=>{a&&await c(a)},[a,c]);return{articles:t,loading:r,error:s,fetchArticles:c,getArticleById:u,createArticle:d,updateArticle:h,deleteArticle:f,refresh:p}}function QL(){const{categoryApi:e}=Gr(),[t,n]=q.useState([]),[r,i]=q.useState(!1),[s,o]=q.useState(null),[a,l]=q.useState(),c=q.useCallback(async m=>{i(!0),o(null),l(m);try{let b;if(m!=null&&m.roles&&m.roles.length>0?b=await e.filterCategories(m.roles,m.parentId):(m==null?void 0:m.parentId)!==void 0?b=await e.filterCategories(void 0,m.parentId):b=await e.listCategories(),m!=null&&m.searchTerm){const y=m.searchTerm.toLowerCase();b=b.filter(_=>_.title.toLowerCase().includes(y))}n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch categories");throw o(y),y}finally{i(!1)}},[e]),u=q.useCallback(async m=>{i(!0),o(null);try{return await e.getCategoryById(m)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch category");throw o(y),y}finally{i(!1)}},[e]),d=q.useCallback(async m=>{i(!0),o(null);try{const b=await e.createCategory(m);return a!==void 0?await c(a):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create category");throw o(y),y}finally{i(!1)}},[e,a,c]),h=q.useCallback(async m=>{i(!0),o(null);try{const b=await e.updateCategory(m);return a!==void 0?await c(a):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update category");throw o(y),y}finally{i(!1)}},[e,a,c]),f=q.useCallback(async m=>{i(!0),o(null);try{await e.deleteCategory(m),a!==void 0?await c(a):await c()}catch(b){const y=b instanceof Error?b:new Error("Failed to delete category");throw o(y),y}finally{i(!1)}},[e,a,c]),p=q.useCallback(async()=>{a!==void 0?await c(a):await c()},[a,c]);return{categories:t,loading:r,error:s,fetchCategories:c,getCategoryById:u,createCategory:d,updateCategory:h,deleteCategory:f,refresh:p}}function JL(){const{tagApi:e}=Gr(),[t,n]=q.useState([]),[r,i]=q.useState(!1),[s,o]=q.useState(null),[a,l]=q.useState(),c=q.useCallback(async b=>{i(!0),o(null),l(b);try{let y=await e.listTags();if(b!=null&&b.searchTerm){const _=b.searchTerm.toLowerCase();y=y.filter(v=>v.title.toLowerCase().includes(_)||v.slug&&v.slug.toLowerCase().includes(_))}n(y)}catch(y){const _=y instanceof Error?y:new Error("Failed to fetch tags");throw o(_),_}finally{i(!1)}},[e]),u=q.useCallback(async b=>{i(!0),o(null);try{return await e.getTagById(b)}catch(y){const _=y instanceof Error?y:new Error("Failed to fetch tag");throw o(_),_}finally{i(!1)}},[e]),d=q.useCallback(async b=>{i(!0),o(null);try{const y=await e.createTag(b);return a!==void 0?await c(a):await c(),y}catch(y){const _=y instanceof Error?y:new Error("Failed to create tag");throw o(_),_}finally{i(!1)}},[e,a,c]),h=q.useCallback(async b=>{i(!0),o(null);try{const y=await e.updateTag(b);return a!==void 0?await c(a):await c(),y}catch(y){const _=y instanceof Error?y:new Error("Failed to update tag");throw o(_),_}finally{i(!1)}},[e,a,c]),f=q.useCallback(async b=>{i(!0),o(null);try{await e.deleteTag(b),a!==void 0?await c(a):await c()}catch(y){const _=y instanceof Error?y:new Error("Failed to delete tag");throw o(_),_}finally{i(!1)}},[e,a,c]),p=q.useCallback(async(b,y)=>{i(!0),o(null);try{await e.mergeTags(b,y),a!==void 0?await c(a):await c()}catch(_){const v=_ instanceof Error?_:new Error("Failed to merge tags");throw o(v),v}finally{i(!1)}},[e,a,c]),m=q.useCallback(async()=>{a!==void 0?await c(a):await c()},[a,c]);return{tags:t,loading:r,error:s,fetchTags:c,getTagById:u,createTag:d,updateTag:h,deleteTag:f,mergeTags:p,refresh:m}}function bf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function eM(...e){return t=>{let n=!1;const r=e.map(i=>{const s=bf(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():bf(e[i],null)}}}}var tM=Symbol.for("react.lazy"),Gs=pe[" use ".trim().toString()];function nM(e){return typeof e=="object"&&e!==null&&"then"in e}function dm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===tM&&"_payload"in e&&nM(e._payload)}function fm(e){const t=iM(e),n=pe.forwardRef((r,i)=>{let{children:s,...o}=r;dm(s)&&typeof Gs=="function"&&(s=Gs(s._payload));const a=pe.Children.toArray(s),l=a.find(oM);if(l){const c=l.props.children,u=a.map(d=>d===l?pe.Children.count(c)>1?pe.Children.only(null):pe.isValidElement(c)?c.props.children:null:d);return E.jsx(t,{...o,ref:i,children:pe.isValidElement(c)?pe.cloneElement(c,void 0,u):null})}return E.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var rM=fm("Slot");function iM(e){const t=pe.forwardRef((n,r)=>{let{children:i,...s}=n;if(dm(i)&&typeof Gs=="function"&&(i=Gs(i._payload)),pe.isValidElement(i)){const o=lM(i),a=aM(s,i.props);return i.type!==pe.Fragment&&(a.ref=r?eM(r,o):o),pe.cloneElement(i,a)}return pe.Children.count(i)>1?pe.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sM=Symbol("radix.slottable");function oM(e){return pe.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sM}function aM(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function lM(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function hm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=hm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pm(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hm(e))&&(r&&(r+=" "),r+=t);return r}const yf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xf=pm,gm=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const h=yf(u)||yf(d);return i[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(p=>{let[m,b]=p;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...c,d,h]:c},[]);return xf(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ic="-",cM=e=>{const t=dM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Ic);return a[0]===""&&a.length!==1&&a.shift(),mm(a,t)||uM(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},mm=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?mm(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Ic);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Ef=/^\[(.+)\]$/,uM=e=>{if(Ef.test(e)){const t=Ef.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},dM=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return hM(Object.entries(e.classGroups),n).forEach(([s,o])=>{Il(o,r,s,t)}),r},Il=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:wf(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(fM(i)){Il(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Il(o,wf(t,s),n,r)})})},wf=(e,t)=>{let n=e;return t.split(Ic).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},fM=e=>e.isThemeGetter,hM=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,pM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},bm="!",gM=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let b=0;b<a.length;b++){let y=a[b];if(c===0){if(y===i&&(r||a.slice(b,b+s)===t)){l.push(a.slice(u,b)),u=b+s;continue}if(y==="/"){d=b;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(bm),p=f?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},mM=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},bM=e=>({cache:pM(e.cacheSize),parseClassName:gM(e),...cM(e)}),yM=/\s+/,xM=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(yM);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(c);let p=!!f,m=r(p?h.substring(0,f):h);if(!m){if(!p){a=c+(a.length>0?" "+a:a);continue}if(m=r(h),!m){a=c+(a.length>0?" "+a:a);continue}p=!1}const b=mM(u).join(":"),y=d?b+bm:b,_=y+m;if(s.includes(_))continue;s.push(_);const v=i(m,p);for(let T=0;T<v.length;++T){const C=v[T];s.push(y+C)}a=c+(a.length>0?" "+a:a)}return a};function EM(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ym(t))&&(r&&(r+=" "),r+=n);return r}const ym=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ym(e[r]))&&(n&&(n+=" "),n+=t);return n};function wM(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=bM(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=xM(l,n);return i(l,u),u}return function(){return s(EM.apply(null,arguments))}}const Ie=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},xm=/^\[(?:([a-z-]+):)?(.+)\]$/i,_M=/^\d+\/\d+$/,vM=new Set(["px","full","screen"]),kM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,AM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,SM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bn=e=>Ir(e)||vM.has(e)||_M.test(e),Sn=e=>Kr(e,"length",PM),Ir=e=>!!e&&!Number.isNaN(Number(e)),Ua=e=>Kr(e,"number",Ir),di=e=>!!e&&Number.isInteger(Number(e)),CM=e=>e.endsWith("%")&&Ir(e.slice(0,-1)),fe=e=>xm.test(e),Tn=e=>kM.test(e),OM=new Set(["length","size","percentage"]),IM=e=>Kr(e,OM,Em),RM=e=>Kr(e,"position",Em),LM=new Set(["image","url"]),MM=e=>Kr(e,LM,FM),DM=e=>Kr(e,"",BM),fi=()=>!0,Kr=(e,t,n)=>{const r=xm.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},PM=e=>NM.test(e)&&!AM.test(e),Em=()=>!1,BM=e=>SM.test(e),FM=e=>TM.test(e),qM=()=>{const e=Ie("colors"),t=Ie("spacing"),n=Ie("blur"),r=Ie("brightness"),i=Ie("borderColor"),s=Ie("borderRadius"),o=Ie("borderSpacing"),a=Ie("borderWidth"),l=Ie("contrast"),c=Ie("grayscale"),u=Ie("hueRotate"),d=Ie("invert"),h=Ie("gap"),f=Ie("gradientColorStops"),p=Ie("gradientColorStopPositions"),m=Ie("inset"),b=Ie("margin"),y=Ie("opacity"),_=Ie("padding"),v=Ie("saturate"),T=Ie("scale"),C=Ie("sepia"),N=Ie("skew"),B=Ie("space"),U=Ie("translate"),G=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",fe,t],P=()=>[fe,t],ne=()=>["",bn,Sn],X=()=>["auto",Ir,fe],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",fe],w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[Ir,fe];return{cacheSize:500,separator:":",theme:{colors:[fi],spacing:[bn,Sn],blur:["none","",Tn,fe],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Tn,fe],borderSpacing:P(),borderWidth:ne(),contrast:Q(),grayscale:K(),hueRotate:Q(),invert:K(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[CM,Sn],inset:H(),margin:H(),opacity:Q(),padding:P(),saturate:Q(),scale:Q(),sepia:K(),skew:Q(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[Tn]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),fe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",di,fe]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",fe]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",di,fe]}],"grid-cols":[{"grid-cols":[fi]}],"col-start-end":[{col:["auto",{span:["full",di,fe]},fe]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[fi]}],"row-start-end":[{row:["auto",{span:[di,fe]},fe]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",fe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",fe,t]}],"min-w":[{"min-w":[fe,t,"min","max","fit"]}],"max-w":[{"max-w":[fe,t,"none","full","min","max","fit","prose",{screen:[Tn]},Tn]}],h:[{h:[fe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[fe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Tn,Sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ua]}],"font-family":[{font:[fi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",fe]}],"line-clamp":[{"line-clamp":["none",Ir,Ua]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",bn,fe]}],"list-image":[{"list-image":["none",fe]}],"list-style-type":[{list:["none","disc","decimal",fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",bn,Sn]}],"underline-offset":[{"underline-offset":["auto",bn,fe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),RM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",IM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},MM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:L()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[bn,fe]}],"outline-w":[{outline:[bn,Sn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[bn,Sn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Tn,DM]}],"shadow-color":[{shadow:[fi]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Tn,fe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",fe]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[di,fe]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",fe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",fe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[bn,Sn,Ua]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},UM=wM(qM);function cr(...e){return UM(pm(e))}const $M=gm("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",destructive:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600",outline:"border border-outline bg-background text-outline-foreground hover:bg-accent hover:text-accent-foreground",secondary:"bg-gray-200 text-gray-900 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",ghost:"hover:bg-gray-100 dark:hover:bg-gray-800",link:"text-blue-600 dark:text-blue-400 underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),wm=pe.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?rM:"button";return E.jsx(o,{className:cr($M({variant:t,size:n,className:e})),ref:s,...i})});wm.displayName="Button";const _m=pe.forwardRef(({className:e,type:t,...n},r)=>E.jsx("input",{type:t,className:cr("flex h-10 w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-500 dark:placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));_m.displayName="Input";var zM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_o=zM.reduce((e,t)=>{const n=fm(`Primitive.${t}`),r=pe.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),jM="Label",vm=pe.forwardRef((e,t)=>E.jsx(_o.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));vm.displayName=jM;var km=vm;const HM=gm("text-sm font-medium leading-none text-gray-900 dark:text-gray-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nm=pe.forwardRef(({className:e,...t},n)=>E.jsx(km,{ref:n,className:cr(HM(),e),...t}));Nm.displayName=km.displayName;function GM(e,t=[]){let n=[];function r(s,o){const a=pe.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const c=d=>{var y;const{scope:h,children:f,...p}=d,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,b=pe.useMemo(()=>p,Object.values(p));return E.jsx(m.Provider,{value:b,children:f})};c.displayName=s+"Provider";function u(d,h){var m;const f=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,p=pe.useContext(f);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(o=>pe.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return pe.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,KM(i,...t)]}function KM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return pe.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function WM(e){const t=pe.useRef(e);return pe.useEffect(()=>{t.current=e}),pe.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Rl=globalThis!=null&&globalThis.document?pe.useLayoutEffect:()=>{},Ll={exports:{}},$a={};/**
207
- * @license React
208
- * use-sync-external-store-shim.production.js
209
- *
210
- * Copyright (c) Meta Platforms, Inc. and affiliates.
211
- *
212
- * This source code is licensed under the MIT license found in the
213
- * LICENSE file in the root directory of this source tree.
214
- */var _f;function VM(){if(_f)return $a;_f=1;var e=q;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(d,h){var f=h(),p=r({inst:{value:f,getSnapshot:h}}),m=p[0].inst,b=p[1];return s(function(){m.value=f,m.getSnapshot=h,l(m)&&b({inst:m})},[d,f,h]),i(function(){return l(m)&&b({inst:m}),d(function(){l(m)&&b({inst:m})})},[d]),o(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return $a.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,$a}var za={};/**
215
- * @license React
216
- * use-sync-external-store-shim.development.js
217
- *
218
- * Copyright (c) Meta Platforms, Inc. and affiliates.
219
- *
220
- * This source code is licensed under the MIT license found in the
221
- * LICENSE file in the root directory of this source tree.
222
- */var vf;function YM(){return vf||(vf=1,process.env.NODE_ENV!=="production"&&function(){function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){u||i.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=p();if(!d){var b=p();s(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=o({inst:{value:m,getSnapshot:p}});var y=b[0].inst,_=b[1];return l(function(){y.value=m,y.getSnapshot=p,n(y)&&_({inst:y})},[f,m,p]),a(function(){return n(y)&&_({inst:y}),f(function(){n(y)&&_({inst:y})})},[f]),c(m),m}function n(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!s(f,m)}catch{return!0}}function r(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=q,s=typeof Object.is=="function"?Object.is:e,o=i.useState,a=i.useEffect,l=i.useLayoutEffect,c=i.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;za.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),za}process.env.NODE_ENV==="production"?Ll.exports=VM():Ll.exports=YM();var ZM=Ll.exports;function XM(){return ZM.useSyncExternalStore(QM,()=>!0,()=>!1)}function QM(){return()=>{}}var Rc="Avatar",[JM]=GM(Rc),[e2,Am]=JM(Rc),Sm=pe.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,s]=pe.useState("idle");return E.jsx(e2,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:E.jsx(_o.span,{...r,ref:t})})});Sm.displayName=Rc;var Tm="AvatarImage",Cm=pe.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=e,o=Am(Tm,n),a=t2(r,s),l=WM(c=>{i(c),o.onImageLoadingStatusChange(c)});return Rl(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?E.jsx(_o.img,{...s,ref:t,src:r}):null});Cm.displayName=Tm;var Om="AvatarFallback",Im=pe.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,s=Am(Om,n),[o,a]=pe.useState(r===void 0);return pe.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&s.imageLoadingStatus!=="loaded"?E.jsx(_o.span,{...i,ref:t}):null});Im.displayName=Om;function kf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function t2(e,{referrerPolicy:t,crossOrigin:n}){const r=XM(),i=pe.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[o,a]=pe.useState(()=>kf(s,e));return Rl(()=>{a(kf(s,e))},[s,e]),Rl(()=>{const l=d=>()=>{a(d)};if(!s)return;const c=l("loaded"),u=l("error");return s.addEventListener("load",c),s.addEventListener("error",u),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",c),s.removeEventListener("error",u)}},[s,n,t]),o}var Rm=Sm,Lm=Cm,Mm=Im;const Dm=pe.forwardRef(({className:e,...t},n)=>E.jsx(Rm,{ref:n,className:cr("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Dm.displayName=Rm.displayName;const Pm=pe.forwardRef(({className:e,...t},n)=>E.jsx(Lm,{ref:n,className:cr("aspect-square h-full w-full",e),...t}));Pm.displayName=Lm.displayName;const Bm=pe.forwardRef(({className:e,...t},n)=>E.jsx(Mm,{ref:n,className:cr("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Bm.displayName=Mm.displayName;function n2(e){if(e=e.replace(/[^\d]/g,""),e.length!==11||/^(\d)\1+$/.test(e))return!1;let t=0;for(let r=0;r<9;r++)t+=parseInt(e.charAt(r))*(10-r);let n=11-t%11;if(n>=10&&(n=0),n!==parseInt(e.charAt(9)))return!1;t=0;for(let r=0;r<10;r++)t+=parseInt(e.charAt(r))*(11-r);return n=11-t%11,n>=10&&(n=0),n===parseInt(e.charAt(10))}function r2(e){if(e=e.replace(/[^\d]/g,""),e.length!==14||/^(\d)\1+$/.test(e))return!1;let t=e.length-2,n=e.substring(0,t);const r=e.substring(t);let i=0,s=t-7;for(let a=t;a>=1;a--)i+=parseInt(n.charAt(t-a))*s--,s<2&&(s=9);let o=i%11<2?0:11-i%11;if(o!==parseInt(r.charAt(0)))return!1;t=t+1,n=e.substring(0,t),i=0,s=t-7;for(let a=t;a>=1;a--)i+=parseInt(n.charAt(t-a))*s--,s<2&&(s=9);return o=i%11<2?0:11-i%11,o===parseInt(r.charAt(1))}function i2(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function s2(e){const t=e.replace(/[^\d]/g,"");return t.length>=10&&t.length<=11}function o2(e){const t=e.replace(/[^\d]/g,"");return t.length===11?t.replace(/(\d{2})(\d{5})(\d{4})/,"($1) $2-$3"):t.length===10?t.replace(/(\d{2})(\d{4})(\d{4})/,"($1) $2-$3"):e}function a2(e){const t=e.replace(/[^\d]/g,"");return t.length===11?t.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/,"$1.$2.$3-$4"):t.length===14?t.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/,"$1.$2.$3/$4-$5"):e}function l2(e){const t=e.replace(/[^\d]/g,"");return t.length===8?t.replace(/(\d{5})(\d{3})/,"$1-$2"):e}function c2(e,t={}){const{minLength:n=8,requireUppercase:r=!0,requireLowercase:i=!0,requireNumbers:s=!0,requireSpecialChars:o=!0}=t,a=[];let l=0;e.length<n?a.push(`Password must be at least ${n} characters long`):(l++,e.length>=12&&l++),r&&!/[A-Z]/.test(e)?a.push("Password must contain at least one uppercase letter"):/[A-Z]/.test(e)&&l++,i&&!/[a-z]/.test(e)?a.push("Password must contain at least one lowercase letter"):/[a-z]/.test(e)&&l++,s&&!/\d/.test(e)?a.push("Password must contain at least one number"):/\d/.test(e)&&l++,o&&!/[!@#$%^&*(),.?":{}|<>]/.test(e)?a.push("Password must contain at least one special character"):/[!@#$%^&*(),.?":{}|<>]/.test(e)&&l++;const c=a.length===0;return{score:Math.min(l,4),feedback:a,isValid:c}}function u2(e,t){let n=null;return function(...i){const s=()=>{n=null,e(...i)};n&&clearTimeout(n),n=setTimeout(s,t)}}function d2(e,t){let n;return function(...i){n||(e(...i),n=!0,setTimeout(()=>n=!1,t))}}function f2(e){return e.map(t=>t.title).join(", ")}function Fm(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function h2(e){return!e||e.trim().length<10?{valid:!1,error:"Prompt must be at least 10 characters long"}:e.length>2e3?{valid:!1,error:"Prompt must be less than 2000 characters"}:{valid:!0}}function p2(e){if(!e||!e.trim())return{valid:!0,tags:[]};const t=Fm(e);return t.length===0?{valid:!1,error:"Invalid tag format. Use comma-separated values."}:e.split(",").some(i=>i.trim().length===0&&i.length>0)?{valid:!1,error:"Tags cannot be empty. Remove extra commas."}:t.filter(i=>i.length>50).length>0?{valid:!1,error:"Individual tags must be less than 50 characters"}:{valid:!0,tags:t}}exports.AIArticleGenerator=UL;exports.ArticleAPI=im;exports.ArticleEditor=qL;exports.ArticleList=zm;exports.ArticleStatus=ze;exports.ArticleViewer=dN;exports.Avatar=Dm;exports.AvatarFallback=Bm;exports.AvatarImage=Pm;exports.Button=wm;exports.CategoryAPI=sm;exports.CategoryList=KL;exports.CategoryModal=WL;exports.Input=_m;exports.Label=Nm;exports.MarkdownEditor=$L;exports.NNewsProvider=FL;exports.RichTextEditor=Lg;exports.TagAPI=om;exports.TagList=VL;exports.TagMerge=ZL;exports.TagModal=YL;exports.cn=cr;exports.debounce=u2;exports.formatDocument=a2;exports.formatPhone=o2;exports.formatZipCode=l2;exports.stringToTagsPreview=Fm;exports.tagsToString=f2;exports.throttle=d2;exports.useArticles=XL;exports.useCategories=QL;exports.useNNews=Gr;exports.useTags=JL;exports.validateCNPJ=r2;exports.validateCPF=n2;exports.validateEmail=i2;exports.validatePasswordStrength=c2;exports.validatePhone=s2;exports.validatePrompt=h2;exports.validateTagList=p2;
222
+ */const ab=tu("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function C2({categories:e,loading:t=!1,error:n=null,onCategoryClick:r,onEditClick:i,onDeleteClick:s,showActions:a=!1,emptyMessage:o}){const{t:l}=Pt(),c=o||l("categoryList.noCategories");return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:l("categoryList.loadingCategories")})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsx("div",{className:"text-sm text-red-800",children:l("categoryList.errorLoading",{message:n.message})})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:c})}):E.jsx("div",{className:"w-full overflow-x-auto",children:E.jsxs("table",{className:"w-full table-fixed divide-y divide-gray-200 dark:divide-gray-700",children:[E.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800",children:E.jsxs("tr",{children:[E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[40%]",children:l("common.title")}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[20%]",children:l("categoryList.articles")}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[25%]",children:l("categoryList.parent")}),a&&E.jsx("th",{scope:"col",className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[15%]",children:l("common.actions")})]})}),E.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.map(u=>E.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100",children:E.jsx("div",{className:r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":"",onClick:()=>r==null?void 0:r(u),children:u.title})}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:u.articleCount||0}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:u.parentId?l("categoryList.parentId",{id:u.parentId}):"-"}),a&&E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:E.jsxs("div",{className:"flex justify-end gap-2",children:[i&&E.jsx("button",{onClick:()=>i(u),className:"text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 transition-colors",title:l("common.edit"),children:E.jsx(sb,{className:"h-4 w-4"})}),s&&E.jsx("button",{onClick:()=>s(u),className:"text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300 transition-colors",title:l("common.delete"),children:E.jsx(ab,{className:"h-4 w-4"})})]})})]},u.categoryId))})]})})}function O2({category:e,categories:t=[],isOpen:n,onClose:r,onSave:i,loading:s=!1}){const{t:a}=Pt(),[o,l]=$.useState(""),[c,u]=$.useState(null),[d,h]=$.useState({});$.useEffect(()=>{e?(l(e.title),u(e.parentId||null)):f()},[e,n]);const f=()=>{l(""),u(null),h({})},p=()=>{const y={};return o.trim()||(y.title=a("validation.titleRequired")),h(y),Object.keys(y).length===0},g=async y=>{if(y.preventDefault(),!p())return;const w={title:o.trim(),parentId:c||void 0};try{e?await i({categoryId:e.categoryId,...w}):await i(w),r()}catch(_){console.error("Failed to save category:",_)}};if(!n)return null;const b=t.filter(y=>y.categoryId!==(e==null?void 0:e.categoryId));return E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:a(e?"categoryModal.editCategory":"categoryModal.createCategory")}),E.jsxs("form",{onSubmit:g,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:a("common.titleRequired")}),E.jsx("input",{id:"title",type:"text",value:o,onChange:y=>l(y.target.value),className:`w-full rounded-md border ${d.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:a("categoryModal.enterTitle")}),d.title&&E.jsx("p",{className:"text-sm text-red-600",children:d.title})]}),b.length>0&&E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"parent",className:"block text-sm font-medium text-gray-700",children:a("categoryModal.parentCategory")}),E.jsxs("select",{id:"parent",value:c||"",onChange:y=>u(y.target.value?Number(y.target.value):null),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:a("categoryModal.noneTopLevel")}),b.map(y=>E.jsx("option",{value:y.categoryId,children:y.title},y.categoryId))]})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:a("common.cancel")}),E.jsx("button",{type:"submit",disabled:s,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:a(s?"common.saving":e?"common.update":"common.create")})]})]})]})})}function I2({tags:e,loading:t=!1,error:n=null,onTagClick:r,onEditClick:i,onDeleteClick:s,onMergeClick:a,showActions:o=!1,emptyMessage:l}){const{t:c}=Pt(),u=l||c("tagList.noTags");return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:c("tagList.loadingTags")})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsx("div",{className:"text-sm text-red-800",children:c("tagList.errorLoading",{message:n.message})})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:u})}):E.jsx("div",{className:"flex flex-wrap gap-3",children:e.map(d=>E.jsxs("div",{className:"group relative flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2 shadow-sm hover:shadow-md transition-shadow",children:[E.jsxs("span",{className:`text-sm font-medium text-gray-900 ${r?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>r==null?void 0:r(d),children:["#",d.title]}),d.articleCount!==void 0&&E.jsx("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full",children:d.articleCount}),o&&(i||s||a)&&E.jsxs("div",{className:"flex gap-1 ml-2",children:[i&&E.jsx("button",{onClick:()=>i(d),className:"rounded p-1 text-blue-600 hover:bg-blue-50 transition-colors",title:c("common.edit"),children:E.jsx(sb,{className:"h-4 w-4"})}),a&&E.jsx("button",{onClick:()=>a(d),className:"rounded p-1 text-purple-600 hover:bg-purple-50 transition-colors",title:c("tagList.merge"),children:E.jsx(T2,{className:"h-4 w-4"})}),s&&E.jsx("button",{onClick:()=>s(d),className:"rounded p-1 text-red-600 hover:bg-red-50 transition-colors",title:c("common.delete"),children:E.jsx(ab,{className:"h-4 w-4"})})]})]},d.tagId))})}function R2({tag:e,isOpen:t,onClose:n,onSave:r,loading:i=!1}){const{t:s}=Pt(),[a,o]=$.useState(""),[l,c]=$.useState(""),[u,d]=$.useState({});$.useEffect(()=>{e?(o(e.title),c(e.slug||"")):h()},[e,t]);const h=()=>{o(""),c(""),d({})},f=()=>{const g={};return a.trim()||(g.title=s("validation.titleRequired")),d(g),Object.keys(g).length===0},p=async g=>{if(g.preventDefault(),!f())return;const b={title:a.trim(),slug:l.trim()||void 0};try{e?await r({tagId:e.tagId,...b}):await r(b),n()}catch(y){console.error("Failed to save tag:",y)}};return t?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:s(e?"tagModal.editTag":"tagModal.createTag")}),E.jsxs("form",{onSubmit:p,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:s("common.titleRequired")}),E.jsx("input",{id:"title",type:"text",value:a,onChange:g=>o(g.target.value),className:`w-full rounded-md border ${u.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:s("tagModal.enterTitle")}),u.title&&E.jsx("p",{className:"text-sm text-red-600",children:u.title})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-gray-700",children:s("common.slug")}),E.jsx("input",{id:"slug",type:"text",value:l,onChange:g=>c(g.target.value),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:s("tagModal.slugPlaceholder")}),E.jsx("p",{className:"text-xs text-gray-500",children:s("tagModal.slugHint")})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:n,disabled:i,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:s("common.cancel")}),E.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:s(i?"common.saving":e?"common.update":"common.create")})]})]})]})}):null}function L2({sourceTag:e,availableTags:t,isOpen:n,onClose:r,onMerge:i,loading:s=!1}){const{t:a}=Pt(),[o,l]=$.useState(null),[c,u]=$.useState({}),d=t.filter(p=>p.tagId!==e.tagId);$.useEffect(()=>{n||(l(null),u({}))},[n]);const h=()=>{const p={};return o||(p.targetTag=a("validation.targetTagRequired")),u(p),Object.keys(p).length===0},f=async p=>{if(p.preventDefault(),!(!h()||!o))try{await i(e.tagId||0,o),r()}catch(g){console.error("Failed to merge tags:",g)}};return n?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:a("tagMerge.title")}),E.jsx("div",{className:"mb-6 rounded-md bg-blue-50 p-4",children:E.jsx("p",{className:"text-sm text-blue-800",dangerouslySetInnerHTML:{__html:a("tagMerge.description",{tag:e.title})}})}),E.jsxs("form",{onSubmit:f,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700",children:a("tagMerge.sourceTag")}),E.jsxs("div",{className:"rounded-md border border-gray-300 bg-gray-50 px-4 py-2",children:[E.jsxs("span",{className:"font-medium text-gray-900",children:["#",e.title]}),e.slug&&E.jsxs("span",{className:"ml-2 text-xs font-mono text-gray-500",children:["(",e.slug,")"]})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"targetTag",className:"block text-sm font-medium text-gray-700",children:a("tagMerge.targetTag")}),E.jsxs("select",{id:"targetTag",value:o||"",onChange:p=>l(Number(p.target.value)),className:`w-full rounded-md border ${c.targetTag?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,children:[E.jsx("option",{value:"",children:a("tagMerge.selectTarget")}),d.map(p=>E.jsxs("option",{value:p.tagId,children:["#",p.title," ",p.slug?`(${p.slug})`:""]},p.tagId))]}),c.targetTag&&E.jsx("p",{className:"text-sm text-red-600",children:c.targetTag}),E.jsx("p",{className:"text-xs text-gray-500",children:a("tagMerge.targetHint")})]}),d.length===0&&E.jsx("div",{className:"rounded-md bg-yellow-50 p-4",children:E.jsx("p",{className:"text-sm text-yellow-800",children:a("tagMerge.noTagsAvailable")})}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:a("common.cancel")}),E.jsx("button",{type:"submit",disabled:s||d.length===0,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:a(s?"tagMerge.merging":"tagMerge.mergeTags")})]})]})]})}):null}function M2(){const{articleApi:e}=Jr(),[t,n]=$.useState(null),[r,i]=$.useState(!1),[s,a]=$.useState(null),[o,l]=$.useState(),c=$.useCallback(async g=>{i(!0),a(null),l(g);try{let b;g!=null&&g.roles&&g.roles.length>0?b=await e.filterArticles(g.roles,g.categoryId,g.page,g.pageSize):b=await e.listArticles(g==null?void 0:g.categoryId,g==null?void 0:g.page,g==null?void 0:g.pageSize),n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch articles");throw a(y),y}finally{i(!1)}},[e]),u=$.useCallback(async g=>{i(!0),a(null);try{return await e.getArticleById(g)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch article");throw a(y),y}finally{i(!1)}},[e]),d=$.useCallback(async g=>{i(!0),a(null);try{const b=await e.createArticle(g);return o&&await c(o),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create article");throw a(y),y}finally{i(!1)}},[e,o,c]),h=$.useCallback(async g=>{i(!0),a(null);try{const b=await e.updateArticle(g);return o&&await c(o),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update article");throw a(y),y}finally{i(!1)}},[e,o,c]),f=$.useCallback(async g=>{i(!0),a(null);try{await e.deleteArticle(g),o&&await c(o)}catch(b){const y=b instanceof Error?b:new Error("Failed to delete article");throw a(y),y}finally{i(!1)}},[e,o,c]),p=$.useCallback(async()=>{o&&await c(o)},[o,c]);return{articles:t,loading:r,error:s,fetchArticles:c,getArticleById:u,createArticle:d,updateArticle:h,deleteArticle:f,refresh:p}}function D2(){const{categoryApi:e}=Jr(),[t,n]=$.useState([]),[r,i]=$.useState(!1),[s,a]=$.useState(null),[o,l]=$.useState(),c=$.useCallback(async g=>{i(!0),a(null),l(g);try{let b;if(g!=null&&g.roles&&g.roles.length>0?b=await e.filterCategories(g.roles,g.parentId):(g==null?void 0:g.parentId)!==void 0?b=await e.filterCategories(void 0,g.parentId):b=await e.listCategories(),g!=null&&g.searchTerm){const y=g.searchTerm.toLowerCase();b=b.filter(w=>w.title.toLowerCase().includes(y))}n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch categories");throw a(y),y}finally{i(!1)}},[e]),u=$.useCallback(async g=>{i(!0),a(null);try{return await e.getCategoryById(g)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch category");throw a(y),y}finally{i(!1)}},[e]),d=$.useCallback(async g=>{i(!0),a(null);try{const b=await e.createCategory(g);return o!==void 0?await c(o):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create category");throw a(y),y}finally{i(!1)}},[e,o,c]),h=$.useCallback(async g=>{i(!0),a(null);try{const b=await e.updateCategory(g);return o!==void 0?await c(o):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update category");throw a(y),y}finally{i(!1)}},[e,o,c]),f=$.useCallback(async g=>{i(!0),a(null);try{await e.deleteCategory(g),o!==void 0?await c(o):await c()}catch(b){const y=b instanceof Error?b:new Error("Failed to delete category");throw a(y),y}finally{i(!1)}},[e,o,c]),p=$.useCallback(async()=>{o!==void 0?await c(o):await c()},[o,c]);return{categories:t,loading:r,error:s,fetchCategories:c,getCategoryById:u,createCategory:d,updateCategory:h,deleteCategory:f,refresh:p}}function P2(){const{tagApi:e}=Jr(),[t,n]=$.useState([]),[r,i]=$.useState(!1),[s,a]=$.useState(null),[o,l]=$.useState(),c=$.useCallback(async b=>{i(!0),a(null),l(b);try{let y=await e.listTags();if(b!=null&&b.searchTerm){const w=b.searchTerm.toLowerCase();y=y.filter(_=>_.title.toLowerCase().includes(w)||_.slug&&_.slug.toLowerCase().includes(w))}n(y)}catch(y){const w=y instanceof Error?y:new Error("Failed to fetch tags");throw a(w),w}finally{i(!1)}},[e]),u=$.useCallback(async b=>{i(!0),a(null);try{return await e.getTagById(b)}catch(y){const w=y instanceof Error?y:new Error("Failed to fetch tag");throw a(w),w}finally{i(!1)}},[e]),d=$.useCallback(async b=>{i(!0),a(null);try{const y=await e.createTag(b);return o!==void 0?await c(o):await c(),y}catch(y){const w=y instanceof Error?y:new Error("Failed to create tag");throw a(w),w}finally{i(!1)}},[e,o,c]),h=$.useCallback(async b=>{i(!0),a(null);try{const y=await e.updateTag(b);return o!==void 0?await c(o):await c(),y}catch(y){const w=y instanceof Error?y:new Error("Failed to update tag");throw a(w),w}finally{i(!1)}},[e,o,c]),f=$.useCallback(async b=>{i(!0),a(null);try{await e.deleteTag(b),o!==void 0?await c(o):await c()}catch(y){const w=y instanceof Error?y:new Error("Failed to delete tag");throw a(w),w}finally{i(!1)}},[e,o,c]),p=$.useCallback(async(b,y)=>{i(!0),a(null);try{await e.mergeTags(b,y),o!==void 0?await c(o):await c()}catch(w){const _=w instanceof Error?w:new Error("Failed to merge tags");throw a(_),_}finally{i(!1)}},[e,o,c]),g=$.useCallback(async()=>{o!==void 0?await c(o):await c()},[o,c]);return{tags:t,loading:r,error:s,fetchTags:c,getTagById:u,createTag:d,updateTag:h,deleteTag:f,mergeTags:p,refresh:g}}function ah(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function B2(...e){return t=>{let n=!1;const r=e.map(i=>{const s=ah(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():ah(e[i],null)}}}}var F2=Symbol.for("react.lazy"),aa=ge[" use ".trim().toString()];function $2(e){return typeof e=="object"&&e!==null&&"then"in e}function ob(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===F2&&"_payload"in e&&$2(e._payload)}function lb(e){const t=q2(e),n=ge.forwardRef((r,i)=>{let{children:s,...a}=r;ob(s)&&typeof aa=="function"&&(s=aa(s._payload));const o=ge.Children.toArray(s),l=o.find(z2);if(l){const c=l.props.children,u=o.map(d=>d===l?ge.Children.count(c)>1?ge.Children.only(null):ge.isValidElement(c)?c.props.children:null:d);return E.jsx(t,{...a,ref:i,children:ge.isValidElement(c)?ge.cloneElement(c,void 0,u):null})}return E.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var U2=lb("Slot");function q2(e){const t=ge.forwardRef((n,r)=>{let{children:i,...s}=n;if(ob(i)&&typeof aa=="function"&&(i=aa(i._payload)),ge.isValidElement(i)){const a=G2(i),o=H2(s,i.props);return i.type!==ge.Fragment&&(o.ref=r?B2(r,a):a),ge.cloneElement(i,o)}return ge.Children.count(i)>1?ge.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var j2=Symbol("radix.slottable");function z2(e){return ge.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j2}function H2(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function G2(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function cb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=cb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ub(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=cb(e))&&(r&&(r+=" "),r+=t);return r}const oh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lh=ub,db=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return lh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const h=oh(u)||oh(d);return i[c][h]}),o=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(p=>{let[g,b]=p;return Array.isArray(b)?b.includes({...s,...o}[g]):{...s,...o}[g]===b})?[...c,d,h]:c},[]);return lh(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},nu="-",K2=e=>{const t=W2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const o=a.split(nu);return o[0]===""&&o.length!==1&&o.shift(),fb(o,t)||V2(a)},getConflictingClassGroupIds:(a,o)=>{const l=n[a]||[];return o&&r[a]?[...l,...r[a]]:l}}},fb=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?fb(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(nu);return(a=t.validators.find(({validator:o})=>o(s)))==null?void 0:a.classGroupId},ch=/^\[(.+)\]$/,V2=e=>{if(ch.test(e)){const t=ch.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},W2=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Z2(Object.entries(e.classGroups),n).forEach(([s,a])=>{tc(a,r,s,t)}),r},tc=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:uh(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(Y2(i)){tc(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{tc(a,uh(t,s),n,r)})})},uh=(e,t)=>{let n=e;return t.split(nu).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Y2=e=>e.isThemeGetter,Z2=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,o])=>[t+a,o])):s);return[n,i]}):e,X2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},hb="!",J2=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,a=o=>{const l=[];let c=0,u=0,d;for(let b=0;b<o.length;b++){let y=o[b];if(c===0){if(y===i&&(r||o.slice(b,b+s)===t)){l.push(o.slice(u,b)),u=b+s;continue}if(y==="/"){d=b;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?o:o.substring(u),f=h.startsWith(hb),p=f?h.substring(1):h,g=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:g}};return n?o=>n({className:o,parseClassName:a}):a},Q2=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},eD=e=>({cache:X2(e.cacheSize),parseClassName:J2(e),...K2(e)}),tD=/\s+/,nD=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],a=e.trim().split(tD);let o="";for(let l=a.length-1;l>=0;l-=1){const c=a[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(c);let p=!!f,g=r(p?h.substring(0,f):h);if(!g){if(!p){o=c+(o.length>0?" "+o:o);continue}if(g=r(h),!g){o=c+(o.length>0?" "+o:o);continue}p=!1}const b=Q2(u).join(":"),y=d?b+hb:b,w=y+g;if(s.includes(w))continue;s.push(w);const _=i(g,p);for(let A=0;A<_.length;++A){const O=_[A];s.push(y+O)}o=c+(o.length>0?" "+o:o)}return o};function rD(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=pb(t))&&(r&&(r+=" "),r+=n);return r}const pb=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=pb(e[r]))&&(n&&(n+=" "),n+=t);return n};function iD(e,...t){let n,r,i,s=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=eD(c),r=n.cache.get,i=n.cache.set,s=o,o(l)}function o(l){const c=r(l);if(c)return c;const u=nD(l,n);return i(l,u),u}return function(){return s(rD.apply(null,arguments))}}const Re=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},gb=/^\[(?:([a-z-]+):)?(.+)\]$/i,sD=/^\d+\/\d+$/,aD=new Set(["px","full","screen"]),oD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wn=e=>Fr(e)||aD.has(e)||sD.test(e),Rn=e=>Qr(e,"length",xD),Fr=e=>!!e&&!Number.isNaN(Number(e)),ol=e=>Qr(e,"number",Fr),xi=e=>!!e&&Number.isInteger(Number(e)),fD=e=>e.endsWith("%")&&Fr(e.slice(0,-1)),he=e=>gb.test(e),Ln=e=>oD.test(e),hD=new Set(["length","size","percentage"]),pD=e=>Qr(e,hD,mb),gD=e=>Qr(e,"position",mb),mD=new Set(["image","url"]),bD=e=>Qr(e,mD,wD),yD=e=>Qr(e,"",ED),Ei=()=>!0,Qr=(e,t,n)=>{const r=gb.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},xD=e=>lD.test(e)&&!cD.test(e),mb=()=>!1,ED=e=>uD.test(e),wD=e=>dD.test(e),vD=()=>{const e=Re("colors"),t=Re("spacing"),n=Re("blur"),r=Re("brightness"),i=Re("borderColor"),s=Re("borderRadius"),a=Re("borderSpacing"),o=Re("borderWidth"),l=Re("contrast"),c=Re("grayscale"),u=Re("hueRotate"),d=Re("invert"),h=Re("gap"),f=Re("gradientColorStops"),p=Re("gradientColorStopPositions"),g=Re("inset"),b=Re("margin"),y=Re("opacity"),w=Re("padding"),_=Re("saturate"),A=Re("scale"),O=Re("sepia"),N=Re("skew"),D=Re("space"),q=Re("translate"),H=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",he,t],M=()=>[he,t],V=()=>["",wn,Rn],z=()=>["auto",Fr,he],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",he],v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[Fr,he];return{cacheSize:500,separator:":",theme:{colors:[Ei],spacing:[wn,Rn],blur:["none","",Ln,he],brightness:Y(),borderColor:[e],borderRadius:["none","","full",Ln,he],borderSpacing:M(),borderWidth:V(),contrast:Y(),grayscale:W(),hueRotate:Y(),invert:W(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[fD,Rn],inset:F(),margin:F(),opacity:Y(),padding:M(),saturate:Y(),scale:Y(),sepia:W(),skew:Y(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[Ln]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),he]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",xi,he]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",xi,he]}],"grid-cols":[{"grid-cols":[Ei]}],"col-start-end":[{col:["auto",{span:["full",xi,he]},he]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[Ei]}],"row-start-end":[{row:["auto",{span:[xi,he]},he]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",he,t]}],"min-w":[{"min-w":[he,t,"min","max","fit"]}],"max-w":[{"max-w":[he,t,"none","full","min","max","fit","prose",{screen:[Ln]},Ln]}],h:[{h:[he,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ln,Rn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ol]}],"font-family":[{font:[Ei]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",he]}],"line-clamp":[{"line-clamp":["none",Fr,ol]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",wn,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",wn,Rn]}],"underline-offset":[{"underline-offset":["auto",wn,he]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),gD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",pD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:I()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[wn,he]}],"outline-w":[{outline:[wn,Rn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[wn,Rn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ln,yD]}],"shadow-color":[{shadow:[Ei]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ln,he]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[_]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",he]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[xi,he]}],"translate-x":[{"translate-x":[q]}],"translate-y":[{"translate-y":[q]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",he]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[wn,Rn,ol]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},_D=iD(vD);function mr(...e){return _D(ub(e))}const kD=db("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",destructive:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600",outline:"border border-outline bg-background text-outline-foreground hover:bg-accent hover:text-accent-foreground",secondary:"bg-gray-200 text-gray-900 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",ghost:"hover:bg-gray-100 dark:hover:bg-gray-800",link:"text-blue-600 dark:text-blue-400 underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),bb=ge.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const a=r?U2:"button";return E.jsx(a,{className:mr(kD({variant:t,size:n,className:e})),ref:s,...i})});bb.displayName="Button";const yb=ge.forwardRef(({className:e,type:t,...n},r)=>E.jsx("input",{type:t,className:mr("flex h-10 w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-500 dark:placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));yb.displayName="Input";var ND=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ba=ND.reduce((e,t)=>{const n=lb(`Primitive.${t}`),r=ge.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),SD="Label",xb=ge.forwardRef((e,t)=>E.jsx(Ba.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));xb.displayName=SD;var Eb=xb;const AD=db("text-sm font-medium leading-none text-gray-900 dark:text-gray-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wb=ge.forwardRef(({className:e,...t},n)=>E.jsx(Eb,{ref:n,className:mr(AD(),e),...t}));wb.displayName=Eb.displayName;function TD(e,t=[]){let n=[];function r(s,a){const o=ge.createContext(a);o.displayName=s+"Context";const l=n.length;n=[...n,a];const c=d=>{var y;const{scope:h,children:f,...p}=d,g=((y=h==null?void 0:h[e])==null?void 0:y[l])||o,b=ge.useMemo(()=>p,Object.values(p));return E.jsx(g.Provider,{value:b,children:f})};c.displayName=s+"Provider";function u(d,h){var g;const f=((g=h==null?void 0:h[e])==null?void 0:g[l])||o,p=ge.useContext(f);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(a=>ge.createContext(a));return function(o){const l=(o==null?void 0:o[e])||s;return ge.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[r,CD(i,...t)]}function CD(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...o,...d}},{});return ge.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function OD(e){const t=ge.useRef(e);return ge.useEffect(()=>{t.current=e}),ge.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var nc=globalThis!=null&&globalThis.document?ge.useLayoutEffect:()=>{};function ID(){return xh.useSyncExternalStore(RD,()=>!0,()=>!1)}function RD(){return()=>{}}var ru="Avatar",[LD]=TD(ru),[MD,vb]=LD(ru),_b=ge.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,s]=ge.useState("idle");return E.jsx(MD,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:E.jsx(Ba.span,{...r,ref:t})})});_b.displayName=ru;var kb="AvatarImage",Nb=ge.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=e,a=vb(kb,n),o=DD(r,s),l=OD(c=>{i(c),a.onImageLoadingStatusChange(c)});return nc(()=>{o!=="idle"&&l(o)},[o,l]),o==="loaded"?E.jsx(Ba.img,{...s,ref:t,src:r}):null});Nb.displayName=kb;var Sb="AvatarFallback",Ab=ge.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,s=vb(Sb,n),[a,o]=ge.useState(r===void 0);return ge.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>o(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&s.imageLoadingStatus!=="loaded"?E.jsx(Ba.span,{...i,ref:t}):null});Ab.displayName=Sb;function dh(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function DD(e,{referrerPolicy:t,crossOrigin:n}){const r=ID(),i=ge.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[a,o]=ge.useState(()=>dh(s,e));return nc(()=>{o(dh(s,e))},[s,e]),nc(()=>{const l=d=>()=>{o(d)};if(!s)return;const c=l("loaded"),u=l("error");return s.addEventListener("load",c),s.addEventListener("error",u),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",c),s.removeEventListener("error",u)}},[s,n,t]),a}var Tb=_b,Cb=Nb,Ob=Ab;const Ib=ge.forwardRef(({className:e,...t},n)=>E.jsx(Tb,{ref:n,className:mr("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ib.displayName=Tb.displayName;const Rb=ge.forwardRef(({className:e,...t},n)=>E.jsx(Cb,{ref:n,className:mr("aspect-square h-full w-full",e),...t}));Rb.displayName=Cb.displayName;const Lb=ge.forwardRef(({className:e,...t},n)=>E.jsx(Ob,{ref:n,className:mr("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Lb.displayName=Ob.displayName;function PD(e){if(e=e.replace(/[^\d]/g,""),e.length!==11||/^(\d)\1+$/.test(e))return!1;let t=0;for(let r=0;r<9;r++)t+=parseInt(e.charAt(r))*(10-r);let n=11-t%11;if(n>=10&&(n=0),n!==parseInt(e.charAt(9)))return!1;t=0;for(let r=0;r<10;r++)t+=parseInt(e.charAt(r))*(11-r);return n=11-t%11,n>=10&&(n=0),n===parseInt(e.charAt(10))}function BD(e){if(e=e.replace(/[^\d]/g,""),e.length!==14||/^(\d)\1+$/.test(e))return!1;let t=e.length-2,n=e.substring(0,t);const r=e.substring(t);let i=0,s=t-7;for(let o=t;o>=1;o--)i+=parseInt(n.charAt(t-o))*s--,s<2&&(s=9);let a=i%11<2?0:11-i%11;if(a!==parseInt(r.charAt(0)))return!1;t=t+1,n=e.substring(0,t),i=0,s=t-7;for(let o=t;o>=1;o--)i+=parseInt(n.charAt(t-o))*s--,s<2&&(s=9);return a=i%11<2?0:11-i%11,a===parseInt(r.charAt(1))}function FD(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function $D(e){const t=e.replace(/[^\d]/g,"");return t.length>=10&&t.length<=11}function UD(e){const t=e.replace(/[^\d]/g,"");return t.length===11?t.replace(/(\d{2})(\d{5})(\d{4})/,"($1) $2-$3"):t.length===10?t.replace(/(\d{2})(\d{4})(\d{4})/,"($1) $2-$3"):e}function qD(e){const t=e.replace(/[^\d]/g,"");return t.length===11?t.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/,"$1.$2.$3-$4"):t.length===14?t.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/,"$1.$2.$3/$4-$5"):e}function jD(e){const t=e.replace(/[^\d]/g,"");return t.length===8?t.replace(/(\d{5})(\d{3})/,"$1-$2"):e}function zD(e,t={}){const{minLength:n=8,requireUppercase:r=!0,requireLowercase:i=!0,requireNumbers:s=!0,requireSpecialChars:a=!0,t:o}=t,l=(h,f,p)=>o?o(h,p):f,c=[];let u=0;e.length<n?c.push(l("validation.passwordMinLength",`Password must be at least ${n} characters long`,{minLength:n})):(u++,e.length>=12&&u++),r&&!/[A-Z]/.test(e)?c.push(l("validation.passwordUppercase","Password must contain at least one uppercase letter")):/[A-Z]/.test(e)&&u++,i&&!/[a-z]/.test(e)?c.push(l("validation.passwordLowercase","Password must contain at least one lowercase letter")):/[a-z]/.test(e)&&u++,s&&!/\d/.test(e)?c.push(l("validation.passwordNumber","Password must contain at least one number")):/\d/.test(e)&&u++,a&&!/[!@#$%^&*(),.?":{}|<>]/.test(e)?c.push(l("validation.passwordSpecialChar","Password must contain at least one special character")):/[!@#$%^&*(),.?":{}|<>]/.test(e)&&u++;const d=c.length===0;return{score:Math.min(u,4),feedback:c,isValid:d}}function HD(e,t){let n=null;return function(...i){const s=()=>{n=null,e(...i)};n&&clearTimeout(n),n=setTimeout(s,t)}}function GD(e,t){let n;return function(...i){n||(e(...i),n=!0,setTimeout(()=>n=!1,t))}}function KD(e){return e.map(t=>t.title).join(", ")}function Mb(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function VD(e,t){const n=(r,i)=>t?t(r):i;return!e||e.trim().length<10?{valid:!1,error:n("validation.promptMinLength","Prompt must be at least 10 characters long")}:e.length>2e3?{valid:!1,error:n("validation.promptMaxLength","Prompt must be less than 2000 characters")}:{valid:!0}}function WD(e,t){const n=(a,o)=>t?t(a):o;if(!e||!e.trim())return{valid:!0,tags:[]};const r=Mb(e);return r.length===0?{valid:!1,error:n("validation.tagFormatInvalid","Invalid tag format. Use comma-separated values.")}:e.split(",").some(a=>a.trim().length===0&&a.length>0)?{valid:!1,error:n("validation.tagEmpty","Tags cannot be empty. Remove extra commas.")}:r.filter(a=>a.length>50).length>0?{valid:!1,error:n("validation.tagTooLong","Individual tags must be less than 50 characters")}:{valid:!0,tags:r}}exports.AIArticleGenerator=_2;exports.ArticleAPI=eb;exports.ArticleEditor=v2;exports.ArticleList=Ny;exports.ArticleStatus=qe;exports.ArticleViewer=WS;exports.Avatar=Ib;exports.AvatarFallback=Lb;exports.AvatarImage=Rb;exports.Button=bb;exports.CategoryAPI=tb;exports.CategoryList=C2;exports.CategoryModal=O2;exports.Input=yb;exports.Label=wb;exports.MarkdownEditor=k2;exports.NAMESPACE=vn;exports.NNewsProvider=w2;exports.RichTextEditor=Cm;exports.TagAPI=nb;exports.TagList=I2;exports.TagMerge=L2;exports.TagModal=R2;exports.cn=mr;exports.createI18nInstance=Eh;exports.debounce=HD;exports.defaultTranslations=ky;exports.enTranslations=rc;exports.formatDocument=qD;exports.formatPhone=UD;exports.formatZipCode=jD;exports.ptTranslations=ic;exports.stringToTagsPreview=Mb;exports.tagsToString=KD;exports.throttle=GD;exports.useArticles=M2;exports.useCategories=D2;exports.useNNews=Jr;exports.useNNewsTranslation=Pt;exports.useTags=P2;exports.validateCNPJ=BD;exports.validateCPF=PD;exports.validateEmail=FD;exports.validatePasswordStrength=zD;exports.validatePhone=$D;exports.validatePrompt=VD;exports.validateTagList=WD;
223
223
  //# sourceMappingURL=index.cjs.map