nnews-react 0.3.4 → 0.3.6

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,7 +1,7 @@
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"),$=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($);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 q=B,G,O;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(G){O=t.events[q][1].end;break}G=!0}for(y(r),N=B;N<t.events.length;)t.events[N][1].end={...O},N++;wt(t.events,q+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,q){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)):q(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)):q(Y)}function X(Y){return Y===null||ae(Y)?(N.exit("codeFencedFence"),B(Y)):q(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):q(k)}function B(k){return k===l?(e.consume(k),l=null,G):k===null||ae(k)?n(k):(e.consume(k),B)}function q(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),q)}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),U):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 U(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),q):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,U(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,U(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=_,U(w)):(e.consume(w),_)}function v(w){return w===null?n(w):w===63?(e.consume(w),T):ae(w)?(o=v,U(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,U(w)):be(w)?(e.consume(w),B):L(w)}function q(w){return w===45||et(w)?(e.consume(w),q):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,U(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,U(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,U(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,U(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 U(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?[]:(q(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){q(H,P.from)}function N(H,P){P.restore()}function B(H,P){return ne;function ne(X,Y,L){let U,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 U=_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<U.length?k(U[F]):L}}}function q(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=`
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
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(U),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(q),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 q(){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 U(){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:`
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
5
  `}]}function ox(e,t){const n=t.value?t.value+`
6
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
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:`
@@ -26,14 +26,14 @@
26
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
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
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"),q(O))}function q(O){return O===null||O===124||Se(O)?(e.exit("data"),B(O)):(e.consume(O),O===92?G:q)}function G(O){return O===92||O===124?(e.consume(O),q):q(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(`
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
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},q={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,q,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},q={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,q,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"}}]},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:{_:[...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*=>",U={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:q},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,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:[_,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:`
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
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(?!\\()"),q={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,q,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,q,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,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:T,contains:["self",ne,o,q,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 q=B;return N=N||[],C.map(G=>G.match(/\|\d+$/)||N.includes(G)?G:q(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)]}),q=(me="")=>({begin:ke(me,/"/),end:ke(/"/,me),contains:[T(me),N(me)]}),G={className:"string",variants:[B(),B("#"),B("##"),B("###"),q(),q("#"),q("##"),q("###")]},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}+`},U=[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,...U,...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,...U];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,...U,...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"}}]},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:{_:[...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*=>",U={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:q},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,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:[_,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 U=L.className+" ";U+=L.parentNode?L.parentNode.className:"";const F=a.languageDetectRe.exec(U);if(F){const K=q(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 U.split(/\s+/).find(K=>l(K)||q(K))}function u(L,U,F){let K="",w="";typeof U=="object"?(K=L,F=U.ignoreIllegals,w=U.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=U),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,U,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=U.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+=U.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=q(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(U,Ae);else{for(oe.matcher.considerAll();;){Ve++,kt?kt=!1:oe.matcher.considerAll(),oe.matcher.lastIndex=ct;const S=oe.matcher.exec(U);if(!S)break;const I=U.substring(ct,S.index),j=vt(I,S);ct=S.index+j}vt(U.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(U),illegal:!0,relevance:0,_illegalBy:{message:S.message,index:ct,context:U.slice(ct-100,ct+100),mode:S.mode,resultSoFar:We},_emitter:Ae};if(i)return{language:L,value:va(U),illegal:!1,relevance:0,errorRaised:S,_emitter:Ae,_top:oe};throw S}}function h(L){const U={value:va(L),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return U._emitter.addText(L),U}function f(L,U){U=U||a.languages||Object.keys(t);const F=h(L),K=U.filter(q).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(q(ge.language).supersetOf===se.language)return 1;if(q(se.language).supersetOf===ge.language)return-1}return 0}),[Q,le]=w,k=Q;return k.secondBest=le,k}function p(L,U,F){const K=U&&n[U]||F;L.classList.add("hljs"),L.classList.add(`language-${K}`)}function m(L){let U=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);U=L;const K=U.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,U){let F=null;try{F=U(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=U.bind(null,e),F.aliases&&G(F.aliases,{languageName:L})}function N(L){delete t[L];for(const U of Object.keys(n))n[U]===L&&delete n[U]}function B(){return Object.keys(t)}function q(L){return L=(L||"").toLowerCase(),t[L]||t[n[L]]}function G(L,{languageName:U}){typeof L=="string"&&(L=[L]),L.forEach(F=>{n[F.toLowerCase()]=U})}function O(L){const U=q(L);return U&&!U.disableAutodetect}function H(L){L["before:highlightBlock"]&&!L["before:highlightElement"]&&(L["before:highlightElement"]=U=>{L["before:highlightBlock"](Object.assign({block:U.el},U))}),L["after:highlightBlock"]&&!L["after:highlightElement"]&&(L["after:highlightElement"]=U=>{L["after:highlightBlock"](Object.assign({block:U.el},U))})}function P(L){H(L),r.push(L)}function ne(L){const U=r.indexOf(L);U!==-1&&r.splice(U,1)}function X(L,U){const F=L;r.forEach(function(K){K[F]&&K[F](U)})}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:q,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 q=N-B;N<n&&q<r&&e.charAt(n-N-1)===t.charAt(r-q-1);)N++,q++;if(l[C]=N,N>n)m+=2;else if(q>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)),q=co(f.substring(0,m),p.substring(0,y));_.length<q+B&&(_=p.substring(y-q,y)+p.substring(y,y+B),v=f.substring(0,m-q),T=f.substring(m+B),C=p.substring(0,y-q),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),q=N&&p.match(QC);return B||q?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]",q="[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,U=/\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[q]=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,U.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 q: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]",q="[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]",U="[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[U]=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 q: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",[q,G,O]=c(v[B],T.retain),H=u.getHandler(q);C[B]={[q]: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 q=Object.keys(C)[0];if(q===Object.keys(N)[0]){const G=u.getHandler(q);G&&(B={[q]:G.transform(C[q],N[q],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(`
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
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
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
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(`
@@ -80,7 +80,7 @@ ${ho(this.code(t,n))}
80
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
81
  `).reduce((o,a,l)=>(l!==0&&o.insert(`
82
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 $.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,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($.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=>!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 $.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 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=$.useRef(null),s=$.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=$.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:`
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:`
84
84
  /* Dark mode styles for Quill editor */
85
85
  .dark .quill-editor-wrapper .ql-toolbar {
86
86
  background-color: rgb(17 24 39);
@@ -165,10 +165,10 @@ ${ho(this.code(t,n))}
165
165
  }
166
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
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:q,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(q,y))!==0){let Q=new n(m,{method:"POST",body:y,duplex:"half"}),le;if(R.isFormData(y)&&(le=Q.headers.get("content-type"))&&q.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,U={...O,signal:P,method:b.toUpperCase(),headers:q.normalize().toJSON(),body:y,duplex:"half",credentials:L?G:void 0};ne=s&&new n(m,U);let F=await(s?H(ne,O):H(m,U));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 :
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
169
  `+o.map(pf).join(`
170
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=$.createContext(void 0);function FL({config:e,children:t}){const n=$.useMemo(()=>{const r=e.apiClient||Le.create({baseURL:e.apiUrl,headers:{"Content-Type":"application/json",...e.headers}}),i=new im(r),s=new sm(r),o=new om(r);return{config:e,apiClient:r,articleApi:i,categoryApi:s,tagApi:o}},[e]);return E.jsx(am.Provider,{value:n,children:t})}function Gr(){const e=$.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]=$.useState(""),[u,d]=$.useState(""),[h,f]=$.useState(""),[p,m]=$.useState(""),[b,y]=$.useState(!1),[_,v]=$.useState(ze.Draft),[T,C]=$.useState(null),[N,B]=$.useState(""),[q,G]=$.useState(""),[O,H]=$.useState(!0),[P,ne]=$.useState(new Set),[X,Y]=$.useState([]),[L,U]=$.useState(!1),[F,K]=$.useState({});$.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;$.useEffect(()=>{if(n&&n.length>0||!r)return;let te=!1;return U(!0),r().then(ce=>{te||Y(ce)}).catch(ce=>{console.warn("Failed to fetch roles:",ce)}).finally(()=>{te||U(!1)}),()=>{te=!0}},[n,r]);const Q=$.useCallback(te=>{H(te),te&&ne(new Set)},[]),le=$.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:q.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:q,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]=$.useState(""),[l,c]=$.useState(!1),[u,d]=$.useState(!1),[h,f]=$.useState(null),[p,m]=$.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]=$.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"]})]})]})]})}/**
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"]})]})]})]})}/**
172
172
  * @license lucide-react v0.462.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
@@ -183,12 +183,12 @@ ${ho(this.code(t,n))}
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
- */const HL=$.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>$.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])=>$.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
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]]));/**
187
187
  * @license lucide-react v0.462.0 - ISC
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
- */const Oc=(e,t)=>{const n=$.forwardRef(({className:r,...i},s)=>$.createElement(HL,{ref:s,iconNode:t,className:lm(`lucide-${zL(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
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};/**
192
192
  * @license lucide-react v0.462.0 - ISC
193
193
  *
194
194
  * This source code is licensed under the ISC license.
@@ -203,7 +203,7 @@ ${ho(this.code(t,n))}
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * 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]=$.useState(""),[l,c]=$.useState(null),[u,d]=$.useState({});$.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]=$.useState(""),[a,l]=$.useState(""),[c,u]=$.useState({});$.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]=$.useState(null),[l,c]=$.useState({}),u=t.filter(f=>f.tagId!==e.tagId);$.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]=$.useState(null),[r,i]=$.useState(!1),[s,o]=$.useState(null),[a,l]=$.useState(),c=$.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=$.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=$.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=$.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=$.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=$.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]=$.useState([]),[r,i]=$.useState(!1),[s,o]=$.useState(null),[a,l]=$.useState(),c=$.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=$.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=$.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=$.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=$.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=$.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]=$.useState([]),[r,i]=$.useState(!1),[s,o]=$.useState(null),[a,l]=$.useState(),c=$.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=$.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=$.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=$.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=$.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=$.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=$.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"),q=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"],U=()=>["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":[...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",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":[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",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={};/**
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
207
  * @license React
208
208
  * use-sync-external-store-shim.production.js
209
209
  *
@@ -211,7 +211,7 @@ ${ho(this.code(t,n))}
211
211
  *
212
212
  * This source code is licensed under the MIT license found in the
213
213
  * LICENSE file in the root directory of this source tree.
214
- */var _f;function VM(){if(_f)return $a;_f=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,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={};/**
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
215
  * @license React
216
216
  * use-sync-external-store-shim.development.js
217
217
  *
@@ -219,5 +219,5 @@ ${ho(this.code(t,n))}
219
219
  *
220
220
  * This source code is licensed under the MIT license found in the
221
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=$,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
+ */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;
223
223
  //# sourceMappingURL=index.cjs.map